summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/svapp.cxx8
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx44
-rw-r--r--vcl/source/filter/FilterConfigCache.hxx22
-rw-r--r--vcl/source/filter/graphicfilter.cxx10
-rw-r--r--vcl/source/gdi/graph.cxx4
-rw-r--r--vcl/source/image/Image.cxx4
-rw-r--r--vcl/source/treelist/headbar.cxx4
-rw-r--r--vcl/source/window/builder.cxx4
-rw-r--r--vcl/source/window/floatwin.cxx2
-rw-r--r--vcl/source/window/status.cxx4
10 files changed, 53 insertions, 53 deletions
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 527bcde60c99..fdfed6c05e5d 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1157,13 +1157,13 @@ void Application::SetAppName( const OUString& rUniqueName )
pSVData->maAppData.mxAppName = rUniqueName;
}
-OUString Application::GetAppName()
+const OUString & Application::GetAppName()
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maAppData.mxAppName )
return *(pSVData->maAppData.mxAppName);
else
- return OUString();
+ return EMPTY_OUSTRING;
}
enum {hwAll=0, hwEnv=1, hwUI=2};
@@ -1391,13 +1391,13 @@ Help* Application::GetHelp()
return ImplGetSVData()->maAppData.mpHelp;
}
-OUString Application::GetToolkitName()
+const OUString & Application::GetToolkitName()
{
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maAppData.mxToolkitName )
return *(pSVData->maAppData.mxToolkitName);
else
- return OUString();
+ return EMPTY_OUSTRING;
}
vcl::Window* Dialog::GetDefDialogParent()
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index de3536731f09..fbaceecdbc75 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -272,11 +272,11 @@ FilterConfigCache::~FilterConfigCache()
{
}
-OUString FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetImportFilterName( sal_uInt16 nFormat )
{
if( nFormat < aImport.size() )
return aImport[ nFormat ].sFilterName;
- return OUString();
+ return EMPTY_OUSTRING;
}
sal_uInt16 FilterConfigCache::GetImportFormatNumber( std::u16string_view rFormatName )
@@ -331,18 +331,18 @@ sal_uInt16 FilterConfigCache::GetImportFormatNumberForTypeName( std::u16string_v
return GRFILTER_FORMAT_NOTFOUND;
}
-OUString FilterConfigCache::GetImportFormatName( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetImportFormatName( sal_uInt16 nFormat )
{
if( nFormat < aImport.size() )
return aImport[ nFormat ].sUIName;
- return OUString();
+ return EMPTY_OUSTRING;
}
-OUString FilterConfigCache::GetImportFormatMediaType( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetImportFormatMediaType( sal_uInt16 nFormat )
{
if( nFormat < aImport.size() )
return aImport[ nFormat ].sMediaType;
- return OUString();
+ return EMPTY_OUSTRING;
}
OUString FilterConfigCache::GetImportFormatShortName( sal_uInt16 nFormat )
@@ -352,25 +352,25 @@ OUString FilterConfigCache::GetImportFormatShortName( sal_uInt16 nFormat )
return OUString();
}
-OUString FilterConfigCache::GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry )
+const OUString & FilterConfigCache::GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry )
{
if ( (nFormat < aImport.size()) && (o3tl::make_unsigned(nEntry) < aImport[ nFormat ].lExtensionList.size()) )
return aImport[ nFormat ].lExtensionList[ nEntry ];
- return OUString();
+ return EMPTY_OUSTRING;
}
-OUString FilterConfigCache::GetImportFilterType( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetImportFilterType( sal_uInt16 nFormat )
{
if( nFormat < aImport.size() )
return aImport[ nFormat ].sType;
- return OUString();
+ return EMPTY_OUSTRING;
}
-OUString FilterConfigCache::GetImportFilterTypeName( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetImportFilterTypeName( sal_uInt16 nFormat )
{
if( nFormat < aImport.size() )
return aImport[ nFormat ].sFilterType;
- return OUString();
+ return EMPTY_OUSTRING;
}
OUString FilterConfigCache::GetImportWildcard(sal_uInt16 nFormat, sal_Int32 nEntry)
@@ -381,11 +381,11 @@ OUString FilterConfigCache::GetImportWildcard(sal_uInt16 nFormat, sal_Int32 nEnt
return aWildcard;
}
-OUString FilterConfigCache::GetExportFilterName( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetExportFilterName( sal_uInt16 nFormat )
{
if( nFormat < aExport.size() )
return aExport[ nFormat ].sFilterName;
- return OUString();
+ return EMPTY_OUSTRING;
}
sal_uInt16 FilterConfigCache::GetExportFormatNumber(std::u16string_view rFormatName)
@@ -436,18 +436,18 @@ sal_uInt16 FilterConfigCache::GetExportFormatNumberForTypeName( std::u16string_v
return GRFILTER_FORMAT_NOTFOUND;
}
-OUString FilterConfigCache::GetExportFormatName( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetExportFormatName( sal_uInt16 nFormat )
{
if( nFormat < aExport.size() )
return aExport[ nFormat ].sUIName;
- return OUString();
+ return EMPTY_OUSTRING;
}
-OUString FilterConfigCache::GetExportFormatMediaType( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetExportFormatMediaType( sal_uInt16 nFormat )
{
if( nFormat < aExport.size() )
return aExport[ nFormat ].sMediaType;
- return OUString();
+ return EMPTY_OUSTRING;
}
OUString FilterConfigCache::GetExportFormatShortName( sal_uInt16 nFormat )
@@ -457,18 +457,18 @@ OUString FilterConfigCache::GetExportFormatShortName( sal_uInt16 nFormat )
return OUString();
}
-OUString FilterConfigCache::GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry )
+const OUString & FilterConfigCache::GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry )
{
if ( (nFormat < aExport.size()) && (o3tl::make_unsigned(nEntry) < aExport[ nFormat ].lExtensionList.size()) )
return aExport[ nFormat ].lExtensionList[ nEntry ];
- return OUString();
+ return EMPTY_OUSTRING;
}
-OUString FilterConfigCache::GetExportInternalFilterName( sal_uInt16 nFormat )
+const OUString & FilterConfigCache::GetExportInternalFilterName( sal_uInt16 nFormat )
{
if( nFormat < aExport.size() )
return aExport[ nFormat ].sInternalFilterName;
- return OUString();
+ return EMPTY_OUSTRING;
}
OUString FilterConfigCache::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry )
diff --git a/vcl/source/filter/FilterConfigCache.hxx b/vcl/source/filter/FilterConfigCache.hxx
index 4aec5d9045b1..ce2e8432416d 100644
--- a/vcl/source/filter/FilterConfigCache.hxx
+++ b/vcl/source/filter/FilterConfigCache.hxx
@@ -62,14 +62,14 @@ public:
sal_uInt16 GetImportFormatNumberForShortName( std::u16string_view rShortName );
sal_uInt16 GetImportFormatNumberForTypeName( std::u16string_view rType );
sal_uInt16 GetImportFormatNumberForExtension( std::u16string_view rExt );
- OUString GetImportFilterName( sal_uInt16 nFormat );
- OUString GetImportFormatName( sal_uInt16 nFormat );
- OUString GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
- OUString GetImportFormatMediaType( sal_uInt16 nFormat );
+ const OUString & GetImportFilterName( sal_uInt16 nFormat );
+ const OUString & GetImportFormatName( sal_uInt16 nFormat );
+ const OUString & GetImportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0);
+ const OUString & GetImportFormatMediaType( sal_uInt16 nFormat );
OUString GetImportFormatShortName( sal_uInt16 nFormat );
OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
- OUString GetImportFilterType( sal_uInt16 nFormat );
- OUString GetImportFilterTypeName( sal_uInt16 nFormat );
+ const OUString & GetImportFilterType( sal_uInt16 nFormat );
+ const OUString & GetImportFilterTypeName( sal_uInt16 nFormat );
sal_uInt16 GetExportFormatCount() const
@@ -78,13 +78,13 @@ public:
sal_uInt16 GetExportFormatNumberForMediaType( std::u16string_view rMediaType );
sal_uInt16 GetExportFormatNumberForShortName( std::u16string_view rShortName );
sal_uInt16 GetExportFormatNumberForTypeName( std::u16string_view rType );
- OUString GetExportFilterName( sal_uInt16 nFormat );
- OUString GetExportFormatName( sal_uInt16 nFormat );
- OUString GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
- OUString GetExportFormatMediaType( sal_uInt16 nFormat );
+ const OUString & GetExportFilterName( sal_uInt16 nFormat );
+ const OUString & GetExportFormatName( sal_uInt16 nFormat );
+ const OUString & GetExportFormatExtension( sal_uInt16 nFormat, sal_Int32 nEntry = 0 );
+ const OUString & GetExportFormatMediaType( sal_uInt16 nFormat );
OUString GetExportFormatShortName( sal_uInt16 nFormat );
OUString GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry );
- OUString GetExportInternalFilterName( sal_uInt16 nFormat );
+ const OUString & GetExportInternalFilterName( sal_uInt16 nFormat );
bool IsExportPixelFormat( sal_uInt16 nFormat );
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 00cdc7777f2e..97303ac8b07e 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -331,12 +331,12 @@ sal_uInt16 GraphicFilter::GetImportFormatNumberForTypeName( std::u16string_view
return pConfig->GetImportFormatNumberForTypeName( rType );
}
-OUString GraphicFilter::GetImportFormatName( sal_uInt16 nFormat )
+const OUString & GraphicFilter::GetImportFormatName( sal_uInt16 nFormat )
{
return pConfig->GetImportFormatName( nFormat );
}
-OUString GraphicFilter::GetImportFormatTypeName( sal_uInt16 nFormat )
+const OUString & GraphicFilter::GetImportFormatTypeName( sal_uInt16 nFormat )
{
return pConfig->GetImportFilterTypeName( nFormat );
}
@@ -378,7 +378,7 @@ sal_uInt16 GraphicFilter::GetExportFormatNumberForShortName( std::u16string_view
return pConfig->GetExportFormatNumberForShortName( rShortName );
}
-OUString GraphicFilter::GetExportInternalFilterName( sal_uInt16 nFormat )
+const OUString & GraphicFilter::GetExportInternalFilterName( sal_uInt16 nFormat )
{
return pConfig->GetExportInternalFilterName( nFormat );
}
@@ -388,12 +388,12 @@ sal_uInt16 GraphicFilter::GetExportFormatNumberForTypeName( std::u16string_view
return pConfig->GetExportFormatNumberForTypeName( rType );
}
-OUString GraphicFilter::GetExportFormatName( sal_uInt16 nFormat )
+const OUString & GraphicFilter::GetExportFormatName( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatName( nFormat );
}
-OUString GraphicFilter::GetExportFormatMediaType( sal_uInt16 nFormat )
+const OUString & GraphicFilter::GetExportFormatMediaType( sal_uInt16 nFormat )
{
return pConfig->GetExportFormatMediaType( nFormat );
}
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 803ec4589680..06b033709941 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -517,13 +517,13 @@ sal_Int32 Graphic::getPageNumber() const
return mxImpGraphic->getPageNumber();
}
-OUString Graphic::getOriginURL() const
+const OUString & Graphic::getOriginURL() const
{
if (mxImpGraphic)
{
return mxImpGraphic->getOriginURL();
}
- return OUString();
+ return EMPTY_OUSTRING;
}
void Graphic::setOriginURL(OUString const & rOriginURL)
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index c92f609a535c..d368b9ece343 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -78,11 +78,11 @@ void Image::ImplInit(const BitmapEx& rBitmapEx)
mpImplData = std::make_shared<ImplImage>(rBitmapEx);
}
-OUString Image::GetStock() const
+const OUString & Image::GetStock() const
{
if (mpImplData)
return mpImplData->getStock();
- return OUString();
+ return EMPTY_OUSTRING;
}
Size Image::GetSizePixel() const
diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx
index 78b508258e1f..2e34f15439b1 100644
--- a/vcl/source/treelist/headbar.cxx
+++ b/vcl/source/treelist/headbar.cxx
@@ -1222,12 +1222,12 @@ void HeaderBar::SetItemText( sal_uInt16 nItemId, const OUString& rText )
}
}
-OUString HeaderBar::GetItemText( sal_uInt16 nItemId ) const
+const OUString & HeaderBar::GetItemText( sal_uInt16 nItemId ) const
{
sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return mvItemList[ nPos ]->maText;
- return OUString();
+ return EMPTY_OUSTRING;
}
OUString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 5e41df185bd1..fb613b3e6ba6 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -94,7 +94,7 @@ bool toBool(std::u16string_view rValue)
namespace
{
- OUString mapStockToImageResource(std::u16string_view sType)
+ const OUString & mapStockToImageResource(std::u16string_view sType)
{
if (sType == u"view-refresh")
return SV_RESID_BITMAP_REFRESH;
@@ -118,7 +118,7 @@ namespace
return IMG_CALENDAR;
else if (sType == u"accessories-character-map")
return IMG_CHARACTER_MAP;
- return OUString();
+ return EMPTY_OUSTRING;
}
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index bf68500d6a70..196f2126cf5b 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -50,7 +50,7 @@ FloatingWindow::ImplData::ImplData()
mpBox = nullptr;
}
-AbsoluteScreenPixelRectangle FloatingWindow::ImplGetItemEdgeClipRect()
+const AbsoluteScreenPixelRectangle & FloatingWindow::ImplGetItemEdgeClipRect()
{
return mpImplData->maItemEdgeClipRect;
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 5df8df387bdf..6fbf44d36c38 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1222,14 +1222,14 @@ void StatusBar::SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand )
}
}
-OUString StatusBar::GetItemCommand( sal_uInt16 nItemId )
+const OUString & StatusBar::GetItemCommand( sal_uInt16 nItemId )
{
sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return mvItemList[ nPos ]->maCommand;
- return OUString();
+ return EMPTY_OUSTRING;
}
void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )