summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-08 16:12:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-09 08:28:56 +0200
commit719a2adfbdac8ce26a035e5fedeeaade8706832d (patch)
tree541a185d2c60d83da75306bab6bd93527c9b4d73 /vcl
parent4763091bbecab8722a43d0ed73eafc0a1f596242 (diff)
remove unnecessary empty OUString fields and vars
Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7 Reviewed-on: https://gerrit.libreoffice.org/37394 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/unx/fontmanager.hxx2
-rw-r--r--vcl/inc/unx/helper.hxx2
-rw-r--r--vcl/source/gdi/configsettings.cxx5
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx5
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.hxx2
-rw-r--r--vcl/unx/generic/fontmanager/fontmanager.cxx5
-rw-r--r--vcl/unx/generic/fontmanager/helper.cxx5
-rw-r--r--vcl/win/gdi/salfont.cxx3
8 files changed, 12 insertions, 17 deletions
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 521ac458d5a7..2e89c5f655be 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -240,7 +240,7 @@ public:
// routines to get font info in small pieces
// get a specific fonts PSName name
- const OUString& getPSName( fontID nFontID ) const;
+ OUString getPSName( fontID nFontID ) const;
// get a specific fonts italic type
FontItalic getFontItalic( fontID nFontID ) const
diff --git a/vcl/inc/unx/helper.hxx b/vcl/inc/unx/helper.hxx
index a5f475e099e1..ce4f10876ec7 100644
--- a/vcl/inc/unx/helper.hxx
+++ b/vcl/inc/unx/helper.hxx
@@ -47,7 +47,7 @@ void splitPath( OString& rOrgPath, OString& rDir, OString& rBase );
enum class whichOfficePath { InstallationRootPath, UserPath, ConfigPath };
-OUString const & getOfficePath( whichOfficePath ePath );
+OUString getOfficePath( whichOfficePath ePath );
} // namespace
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index ab5348a59c5d..fe9c69c1c7a0 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -120,13 +120,12 @@ void SettingsConfigItem::getValues()
}
}
-const OUString& SettingsConfigItem::getValue( const OUString& rGroup, const OUString& rKey ) const
+OUString SettingsConfigItem::getValue( const OUString& rGroup, const OUString& rKey ) const
{
std::unordered_map< OUString, SmallOUStrMap, OUStringHash >::const_iterator group = m_aSettings.find( rGroup );
if( group == m_aSettings.end() || group->second.find( rKey ) == group->second.end() )
{
- static OUString aEmpty;
- return aEmpty;
+ return OUString();
}
return group->second.find(rKey)->second;
}
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index dff6aa2127c0..10045e76b144 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -689,16 +689,15 @@ SelectionManager& SelectionManager::get( const OUString& rDisplayName )
return *pInstance;
}
-const OUString& SelectionManager::getString( Atom aAtom )
+OUString SelectionManager::getString( Atom aAtom )
{
osl::MutexGuard aGuard(m_aMutex);
if( m_aAtomToString.find( aAtom ) == m_aAtomToString.end() )
{
- static OUString aEmpty;
char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : nullptr;
if( ! pAtom )
- return aEmpty;
+ return OUString();
OUString aString( OStringToOUString( pAtom, RTL_TEXTENCODING_ISO_8859_1 ) );
XFree( pAtom );
m_aStringToAtom[ aString ] = aAtom;
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx
index 516c9dc6c8f8..550e24a31a9f 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -433,7 +433,7 @@ namespace x11 {
osl::Mutex& getMutex() { return m_aMutex; }
Atom getAtom( const OUString& rString );
- const OUString& getString( Atom nAtom );
+ OUString getString( Atom nAtom );
// type conversion
// note: convertTypeToNative does NOT clear the list, so you can append
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index d9c78fcb408b..2b961e58fa06 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -947,16 +947,15 @@ OString PrintFontManager::getFontFile(const PrintFont* pFont) const
return aPath;
}
-const OUString& PrintFontManager::getPSName( fontID nFontID ) const
+OUString PrintFontManager::getPSName( fontID nFontID ) const
{
- static OUString aEmpty;
PrintFont* pFont = getFont( nFontID );
if (pFont && pFont->m_aPSName.isEmpty())
{
analyzeSfntFile(pFont);
}
- return pFont ? pFont->m_aPSName : aEmpty;
+ return pFont ? pFont->m_aPSName : OUString();
}
int PrintFontManager::getFontAscend( fontID nFontID ) const
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index 0377ead5a0c4..0c8ba1e33003 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -37,12 +37,11 @@ using ::rtl::Bootstrap;
namespace psp {
-OUString const & getOfficePath( whichOfficePath ePath )
+OUString getOfficePath( whichOfficePath ePath )
{
static OUString aInstallationRootPath;
static OUString aUserPath;
static OUString aConfigPath;
- static OUString aEmpty;
static bool bOnce = false;
if( ! bOnce )
@@ -86,7 +85,7 @@ OUString const & getOfficePath( whichOfficePath ePath )
case whichOfficePath::InstallationRootPath: return aInstallationRootPath;
case whichOfficePath::UserPath: return aUserPath;
}
- return aEmpty;
+ return OUString();
}
static OString getEnvironmentPath( const char* pKey )
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 97a7384da70e..942898364291 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1285,14 +1285,13 @@ void WinSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
if( rcOSL == osl::FileBase::E_None )
{
osl::DirectoryItem aDirItem;
- OUString aEmptyString;
while( aFontDir.getNextItem( aDirItem, 10 ) == osl::FileBase::E_None )
{
osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL );
rcOSL = aDirItem.getFileStatus( aFileStatus );
if ( rcOSL == osl::FileBase::E_None )
- AddTempDevFont( pFontCollection, aFileStatus.getFileURL(), aEmptyString );
+ AddTempDevFont( pFontCollection, aFileStatus.getFileURL(), "" );
}
}
}