Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/4027
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/27/4027/1
Show only filename in "Recent Files" list on Start Center
Change-Id: I57f7564aae035ce158b819ca1495a547754a95f8
---
M framework/source/services/backingwindow.cxx
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/framework/source/services/backingwindow.cxx
b/framework/source/services/backingwindow.cxx
index f18152b..2cb9f0f 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -353,25 +353,15 @@
if ( aURLObj.GetProtocol() == INET_PROT_FILE )
{
- // Do handle file URL differently => convert it to a system
- // path and abbreviate it with a special function:
- String aFileSystemPath( aURLObj.getFSysPath( INetURLObject::FSYS_DETECT ) );
-
- OUString aSystemPath( aFileSystemPath );
- OUString aCompactedSystemPath;
-
- oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData,
&aCompactedSystemPath.pData, 46, NULL );
- if ( !nError )
- aMenuTitle = String( aCompactedSystemPath );
- else
- aMenuTitle = aSystemPath;
+ // Do handle file URL differently: don't show the protocol, just the file name
+ aMenuTitle = aURLObj.GetLastName(INetURLObject::DECODE_WITH_CHARSET,
RTL_TEXTENCODING_UTF8);
}
else
{
- // Use INetURLObject to abbreviate all other URLs
- Reference< util::XStringWidth > xStringLength( new RecentFilesStringLength() );
- aMenuTitle = aURLObj.getAbbreviated( xStringLength, 46,
INetURLObject::DECODE_UNAMBIGUOUS );
+ // In all other URLs show the protocol name before the file name
+ aMenuTitle = aURLObj.GetSchemeName(aURLObj.GetProtocol()) + ": " +
aURLObj.getName();
}
+
OUStringBuffer aBuf( aMenuTitle.getLength() + 5 );
if( i < 9 )
{
@@ -382,7 +372,7 @@
aBuf.appendAscii( "1~0" );
else
aBuf.append( i+1 );
- aBuf.appendAscii( ": " );
+ aBuf.appendAscii( ". " );
aBuf.append( aMenuTitle );
mpRecentMenu->InsertItem( static_cast<sal_uInt16>(i+1), aBuf.makeStringAndClear() );
}
--
To view, visit https://gerrit.libreoffice.org/4027
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I57f7564aae035ce158b819ca1495a547754a95f8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Prashant Pandey <prashant3.yishu@gmail.com>
Context
- [PATCH] Show only filename in "Recent Files" list on Start Center · Prashant Pandey (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.