diff options
-rw-r--r-- | include/vcl/builderbase.hxx | 4 | ||||
-rw-r--r-- | include/vcl/graph.hxx | 2 | ||||
-rw-r--r-- | include/vcl/graphicfilter.hxx | 10 | ||||
-rw-r--r-- | include/vcl/headbar.hxx | 2 | ||||
-rw-r--r-- | include/vcl/image.hxx | 2 | ||||
-rw-r--r-- | include/vcl/menu.hxx | 2 | ||||
-rw-r--r-- | include/vcl/print.hxx | 2 | ||||
-rw-r--r-- | include/vcl/status.hxx | 2 | ||||
-rw-r--r-- | include/vcl/svapp.hxx | 4 | ||||
-rw-r--r-- | include/vcl/toolkit/floatwin.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/font/EmphasisMark.hxx | 6 | ||||
-rw-r--r-- | vcl/inc/ppdparser.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/qt5/QtHyperlinkLabel.hxx | 4 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigCache.cxx | 44 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigCache.hxx | 22 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 4 | ||||
-rw-r--r-- | vcl/source/image/Image.cxx | 4 | ||||
-rw-r--r-- | vcl/source/treelist/headbar.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/floatwin.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/status.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 8 |
24 files changed, 80 insertions, 80 deletions
diff --git a/include/vcl/builderbase.hxx b/include/vcl/builderbase.hxx index 428141860a09..34ce94d69c0d 100644 --- a/include/vcl/builderbase.hxx +++ b/include/vcl/builderbase.hxx @@ -100,8 +100,8 @@ protected: static OUString getStyleClass(xmlreader::XmlReader& reader); static bool hasOrientationVertical(stringmap& rMap); - OUString getUIFileUrl() { return m_sUIFileUrl; } - OUString getHelpRoot() { return m_sHelpRoot; } + const OUString& getUIFileUrl() { return m_sUIFileUrl; } + const OUString& getHelpRoot() { return m_sHelpRoot; } bool isLegacy() { return m_bLegacy; } const std::locale& getResLocale() const; const std::vector<SizeGroup>& getSizeGroups() const; diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index 838b870bd7e7..0bea2ad9535d 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -172,7 +172,7 @@ public: BitmapChecksum GetChecksum() const; - OUString getOriginURL() const; + const OUString & getOriginURL() const; void setOriginURL(OUString const & rOriginURL); SAL_DLLPRIVATE OString getUniqueID() const; diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index 1e80cdd7c511..3c09f949ba26 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -234,8 +234,8 @@ public: sal_uInt16 GetImportFormatNumber( std::u16string_view rFormatName ); sal_uInt16 GetImportFormatNumberForShortName( std::u16string_view rShortName ); sal_uInt16 GetImportFormatNumberForTypeName( std::u16string_view rType ); - OUString GetImportFormatName( sal_uInt16 nFormat ); - OUString GetImportFormatTypeName( sal_uInt16 nFormat ); + const OUString & GetImportFormatName( sal_uInt16 nFormat ); + const OUString & GetImportFormatTypeName( sal_uInt16 nFormat ); #ifdef _WIN32 OUString GetImportFormatMediaType( sal_uInt16 nFormat ); #endif @@ -246,10 +246,10 @@ public: sal_uInt16 GetExportFormatNumber( std::u16string_view rFormatName ); sal_uInt16 GetExportFormatNumberForMediaType( std::u16string_view rShortName ); sal_uInt16 GetExportFormatNumberForShortName( std::u16string_view rShortName ); - OUString GetExportInternalFilterName( sal_uInt16 nFormat ); + const OUString & GetExportInternalFilterName( sal_uInt16 nFormat ); sal_uInt16 GetExportFormatNumberForTypeName( std::u16string_view rType ); - OUString GetExportFormatName( sal_uInt16 nFormat ); - OUString GetExportFormatMediaType( sal_uInt16 nFormat ); + const OUString & GetExportFormatName( sal_uInt16 nFormat ); + const OUString & GetExportFormatMediaType( sal_uInt16 nFormat ); OUString GetExportFormatShortName( sal_uInt16 nFormat ); OUString GetExportWildcard( sal_uInt16 nFormat ); bool IsExportPixelFormat( sal_uInt16 nFormat ); diff --git a/include/vcl/headbar.hxx b/include/vcl/headbar.hxx index f3c022f3796f..b94815bce7ce 100644 --- a/include/vcl/headbar.hxx +++ b/include/vcl/headbar.hxx @@ -294,7 +294,7 @@ public: HeaderBarItemBits GetItemBits( sal_uInt16 nItemId ) const; void SetItemText( sal_uInt16 nItemId, const OUString& rText ); - OUString GetItemText( sal_uInt16 nItemId ) const; + const OUString & GetItemText( sal_uInt16 nItemId ) const; OUString GetHelpText( sal_uInt16 nItemId ) const; diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx index 6c130bf4cd2b..f7184820fc8e 100644 --- a/include/vcl/image.hxx +++ b/include/vcl/image.hxx @@ -59,7 +59,7 @@ public: return !(Image::operator==(rImage)); } - OUString GetStock() const; + const OUString & GetStock() const; void Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle, const Size* pSize = nullptr); diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 8847348b5170..90f6d22b0ebd 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -321,7 +321,7 @@ public: OUString GetHelpId( sal_uInt16 nItemId ) const; void SetHelpId( const OUString& rHelpId ) { m_sMenuHelpId = rHelpId; } - OUString GetHelpId() const { return m_sMenuHelpId; } + const OUString & GetHelpId() const { return m_sMenuHelpId; } void SetActivateHdl( const Link<Menu *, bool>& rLink ) { diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index 3728c2ca0219..f511af70d977 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -228,7 +228,7 @@ public: void SetUsePrintDialogSetting(bool bUsed) { mbUsePrintSetting = bUsed; } bool IsUsePrintDialogSetting() { return mbUsePrintSetting; } void SetPrintPageSize(Size aPrintPageSize) { maPrintPageSize = aPrintPageSize; } - Size GetPrintPageSize() { return maPrintPageSize; } + const Size & GetPrintPageSize() { return maPrintPageSize; } bool SetOrientation( Orientation eOrient ); Orientation GetOrientation() const; SAL_DLLPRIVATE void SetDuplexMode( DuplexMode ); diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx index 0c287ddbc1b1..9f02061418cd 100644 --- a/include/vcl/status.hxx +++ b/include/vcl/status.hxx @@ -160,7 +160,7 @@ public: void* GetItemData( sal_uInt16 nItemId ) const; void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ); - OUString GetItemCommand( sal_uInt16 nItemId ); + const OUString & GetItemCommand( sal_uInt16 nItemId ); void SetHelpText( sal_uInt16 nItemId, const OUString& rText ); const OUString& GetHelpText( sal_uInt16 nItemId ) const; diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index ea1c3838aa33..719ced7a0e21 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -912,7 +912,7 @@ public: @returns The application name. */ - static OUString GetAppName(); + static const OUString & GetAppName(); /** * Get the OS version based on the OS specific implementation. @@ -961,7 +961,7 @@ public: @returns The toolkit name. */ - static OUString GetToolkitName(); + static const OUString & GetToolkitName(); /** Get the number of screens available for the display. diff --git a/include/vcl/toolkit/floatwin.hxx b/include/vcl/toolkit/floatwin.hxx index d2dcca050599..e0e218c6176e 100644 --- a/include/vcl/toolkit/floatwin.hxx +++ b/include/vcl/toolkit/floatwin.hxx @@ -101,7 +101,7 @@ public: static AbsoluteScreenPixelRectangle ImplConvertToAbsPos(vcl::Window* pReference, const tools::Rectangle& rRect); SAL_DLLPRIVATE static tools::Rectangle ImplConvertToRelPos(vcl::Window* pReference, const AbsoluteScreenPixelRectangle& rRect); SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPtr<vcl::Window>& xFocusId ); - SAL_DLLPRIVATE AbsoluteScreenPixelRectangle ImplGetItemEdgeClipRect(); + SAL_DLLPRIVATE const AbsoluteScreenPixelRectangle & ImplGetItemEdgeClipRect(); SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; } void PixelInvalidate(const tools::Rectangle* pRectangle) override; diff --git a/vcl/inc/font/EmphasisMark.hxx b/vcl/inc/font/EmphasisMark.hxx index 5e902da26294..2b1ed7f9c472 100644 --- a/vcl/inc/font/EmphasisMark.hxx +++ b/vcl/inc/font/EmphasisMark.hxx @@ -25,10 +25,10 @@ class VCL_DLLPUBLIC EmphasisMark public: EmphasisMark(FontEmphasisMark eEmphasis, tools::Long nHeight, sal_Int32 nDPIY); - tools::PolyPolygon GetShape() const { return maPolyPoly; } + const tools::PolyPolygon& GetShape() const { return maPolyPoly; } bool IsShapePolyLine() const { return mbIsPolyLine; } - tools::Rectangle GetRect1() const { return maRect1; } - tools::Rectangle GetRect2() const { return maRect2; } + const tools::Rectangle& GetRect1() const { return maRect1; } + const tools::Rectangle& GetRect2() const { return maRect2; } tools::Long GetYOffset() const { return mnYOff; } tools::Long GetWidth() const { return mnWidth; } diff --git a/vcl/inc/ppdparser.hxx b/vcl/inc/ppdparser.hxx index ef62c8778e2f..8782d9b8cca1 100644 --- a/vcl/inc/ppdparser.hxx +++ b/vcl/inc/ppdparser.hxx @@ -183,7 +183,7 @@ public: const ::std::vector< PPDConstraint >& getConstraints() const { return m_aConstraints; } - OUString getDefaultPaperDimension() const; + const OUString & getDefaultPaperDimension() const; void getDefaultPaperDimension( int& rWidth, int& rHeight ) const { getPaperDimension( getDefaultPaperDimension(), rWidth, rHeight ); } bool getPaperDimension( std::u16string_view rPaperName, @@ -202,7 +202,7 @@ public: // values int pt - OUString getDefaultInputSlot() const; + const OUString & getDefaultInputSlot() const; void getDefaultResolution( int& rXRes, int& rYRes ) const; // values in dpi diff --git a/vcl/inc/qt5/QtHyperlinkLabel.hxx b/vcl/inc/qt5/QtHyperlinkLabel.hxx index f188f2ba9e18..a10f148fb448 100644 --- a/vcl/inc/qt5/QtHyperlinkLabel.hxx +++ b/vcl/inc/qt5/QtHyperlinkLabel.hxx @@ -24,10 +24,10 @@ class QtHyperlinkLabel : public QLabel public: QtHyperlinkLabel(QWidget* pParent); - QString displayText() const { return m_sDisplayText; } + const QString& displayText() const { return m_sDisplayText; } void setDisplayText(const QString& rDisplayText); - QString uri() const { return m_sUri; } + const QString& uri() const { return m_sUri; } void setUri(const QString& rUri); private: 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 ) diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 7f1df3848537..ce9be1ffe874 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -1348,12 +1348,12 @@ void PPDParser::parseConstraint( const OString& rLine ) m_aConstraints.push_back( aConstraint ); } -OUString PPDParser::getDefaultPaperDimension() const +const OUString & PPDParser::getDefaultPaperDimension() const { if( m_pDefaultPaperDimension ) return m_pDefaultPaperDimension->m_aOption; - return OUString(); + return EMPTY_OUSTRING; } bool PPDParser::getMargins( @@ -1477,11 +1477,11 @@ OUString PPDParser::matchPaper(int nWidth, int nHeight, psp::orientation* pOrien return matchPaperImpl(nHeight, nWidth, false, pOrientation); } -OUString PPDParser::getDefaultInputSlot() const +const OUString & PPDParser::getDefaultInputSlot() const { if( m_pDefaultInputSlot ) return m_pDefaultInputSlot->m_aValue; - return OUString(); + return EMPTY_OUSTRING; } void PPDParser::getResolutionFromString(std::u16string_view rString, |