summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/property/propertysethelper.cxx2
-rw-r--r--compilerplugins/clang/passstuffbyref.cxx11
-rw-r--r--connectivity/source/drivers/evoab2/NDriver.hxx2
-rw-r--r--framework/source/services/dispatchhelper.cxx2
-rw-r--r--include/framework/dispatchhelper.hxx7
-rw-r--r--include/oox/export/DMLPresetShapeExport.hxx7
-rw-r--r--include/sfx2/docfile.hxx2
-rw-r--r--include/sfx2/sidebar/Panel.hxx2
-rw-r--r--include/svx/svdobj.hxx2
-rw-r--r--include/tools/wldcrd.hxx2
-rw-r--r--include/unotools/localedatawrapper.hxx4
-rw-r--r--include/unotools/moduleoptions.hxx2
-rw-r--r--include/vcl/graphicfilter.hxx4
-rw-r--r--include/vcl/menubarupdateicon.hxx4
-rw-r--r--include/vcl/test/GraphicsRenderTests.hxx6
-rw-r--r--oox/source/drawingml/shape.cxx6
-rw-r--r--oox/source/export/DMLPresetShapeExport.cxx6
-rw-r--r--sc/source/core/tool/interpr6.cxx4
-rw-r--r--sc/source/filter/excel/xeescher.cxx2
-rw-r--r--sc/source/filter/inc/xeescher.hxx2
-rw-r--r--sdext/source/presenter/PresenterToolBar.cxx4
-rw-r--r--sfx2/source/doc/docfile.cxx2
-rw-r--r--sfx2/source/sidebar/Panel.cxx2
-rw-r--r--starmath/inc/mathml/element.hxx4
-rw-r--r--starmath/inc/node.hxx2
-rw-r--r--svtools/source/misc/templatefoldercache.cxx4
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--sw/inc/shellio.hxx2
-rw-r--r--sw/source/filter/ascii/parasc.cxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx2
-rw-r--r--unotools/source/config/moduleoptions.cxx2
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx4
-rw-r--r--vcl/inc/headless/svpframe.hxx2
-rw-r--r--vcl/inc/impfont.hxx2
-rw-r--r--vcl/source/font/font.cxx4
35 files changed, 65 insertions, 54 deletions
diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx
index ce5f84f95d6e..1568aca9b49d 100644
--- a/comphelper/source/property/propertysethelper.cxx
+++ b/comphelper/source/property/propertysethelper.cxx
@@ -30,7 +30,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
-static PropertyMapEntry const * find( rtl::Reference<PropertySetInfo>& mxInfo, const OUString& aName ) noexcept
+static PropertyMapEntry const * find( const rtl::Reference<PropertySetInfo>& mxInfo, const OUString& aName ) noexcept
{
PropertyMap::const_iterator aIter = mxInfo->getPropertyMap().find( aName );
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx
index cff1e781455c..d6ab91fc82a1 100644
--- a/compilerplugins/clang/passstuffbyref.cxx
+++ b/compilerplugins/clang/passstuffbyref.cxx
@@ -286,8 +286,17 @@ void PassStuffByRef::checkReturnValue(const FunctionDecl * functionDecl, const C
if (startswith(type.getAsString(), "struct o3tl::strong_int")) {
return;
}
+ auto tc = loplugin::TypeCheck(functionDecl->getReturnType());
+ // these functions are passed by function-pointer
+ if (functionDecl->getIdentifier() && functionDecl->getName() == "GetRanges"
+ && tc.Struct("WhichRangesContainer").GlobalNamespace())
+ return;
+ // extremely simple class, might as well pass by value
+ if (tc.Class("Color")) {
+ return;
+ }
// extremely simple class, might as well pass by value
- if (loplugin::TypeCheck(functionDecl->getReturnType()).Class("Color")) {
+ if (tc.Struct("TranslateId")) {
return;
}
diff --git a/connectivity/source/drivers/evoab2/NDriver.hxx b/connectivity/source/drivers/evoab2/NDriver.hxx
index a5c8c8ee76bd..9015add76be8 100644
--- a/connectivity/source/drivers/evoab2/NDriver.hxx
+++ b/connectivity/source/drivers/evoab2/NDriver.hxx
@@ -63,7 +63,7 @@ namespace connectivity::evoab
virtual sal_Int32 SAL_CALL getMinorVersion( ) override;
public:
- css::uno::Reference< css::uno::XComponentContext > getComponentContext( ) const { return m_xContext; }
+ const css::uno::Reference< css::uno::XComponentContext >& getComponentContext( ) const { return m_xContext; }
// static methods
static bool acceptsURL_Stat( std::u16string_view url );
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index 30e424df94ff..e5defdff6210 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -119,7 +119,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch(
return executeDispatch(xDispatch, aURL, true, lArguments);
}
-css::uno::Any
+const css::uno::Any&
DispatchHelper::executeDispatch(const css::uno::Reference<css::frame::XDispatch>& xDispatch,
const css::util::URL& aURL, bool SyncronFlag,
const css::uno::Sequence<css::beans::PropertyValue>& lArguments)
diff --git a/include/framework/dispatchhelper.hxx b/include/framework/dispatchhelper.hxx
index ca7e2b2ccf12..7c89a2d79aac 100644
--- a/include/framework/dispatchhelper.hxx
+++ b/include/framework/dispatchhelper.hxx
@@ -93,9 +93,10 @@ public:
// not a public XDispatchHelper-method, need in sfx2/source/control/statcach.cxx for extensions
/// @throws css::uno::RuntimeException
- css::uno::Any executeDispatch(const css::uno::Reference<css::frame::XDispatch>& xDispatch,
- const css::util::URL& aURL, bool SyncronFlag,
- const css::uno::Sequence<css::beans::PropertyValue>& lArguments);
+ const css::uno::Any&
+ executeDispatch(const css::uno::Reference<css::frame::XDispatch>& xDispatch,
+ const css::util::URL& aURL, bool SyncronFlag,
+ const css::uno::Sequence<css::beans::PropertyValue>& lArguments);
// XDispatchResultListener
virtual void SAL_CALL dispatchFinished(const css::frame::DispatchResultEvent& aResult) override;
diff --git a/include/oox/export/DMLPresetShapeExport.hxx b/include/oox/export/DMLPresetShapeExport.hxx
index 1baf1d44cabc..37cd1c3743b2 100644
--- a/include/oox/export/DMLPresetShapeExport.hxx
+++ b/include/oox/export/DMLPresetShapeExport.hxx
@@ -104,11 +104,12 @@ private:
bool IsYFlipped() { return m_bIsFlipped.second; };
// Returns with the shape type, like triangle for example
- OUString GetShapeType();
+ const OUString& GetShapeType();
// Returns with the handle points
- css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>> GetHandleValues();
+ const css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>& GetHandleValues();
// Returns with the adjustment values
- css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue> GetAdjustmentValues();
+ const css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>&
+ GetAdjustmentValues();
// Returns with the raw value of the given property of the shape geometry.
css::uno::Any GetHandleValueOfModificationPoint(sal_Int32 nPoint, std::u16string_view sType);
// Returns with the appropriate value of the handle point.
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 83bcb91c5812..55b31202bcab 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -101,7 +101,7 @@ public:
void AddToCheckEditableWorkerList();
void SetWorkerReloadEvent(ImplSVEvent* pEvent);
ImplSVEvent* GetWorkerReloadEvent() const;
- std::shared_ptr<std::recursive_mutex> GetCheckEditableMutex() const;
+ const std::shared_ptr<std::recursive_mutex>& GetCheckEditableMutex() const;
void CancelCheckEditableEntry(bool bRemoveEvent = true);
void UseInteractionHandler( bool );
diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx
index 485063f2152d..7ea94a49960a 100644
--- a/include/sfx2/sidebar/Panel.hxx
+++ b/include/sfx2/sidebar/Panel.hxx
@@ -69,7 +69,7 @@ public:
{
return mxPanelComponent;
}
- css::uno::Reference<css::awt::XWindow> GetElementParentWindow();
+ const css::uno::Reference<css::awt::XWindow>& GetElementParentWindow();
css::uno::Reference<css::awt::XWindow> GetElementWindow();
void SetExpanded(const bool bIsExpanded);
bool IsExpanded() const { return mbIsExpanded; }
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 5a4460dd9ddd..760f53f3a019 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -869,7 +869,7 @@ public:
// If fillstyle is drawing::FillStyle_BITMAP, returns the graphic.
const Graphic* getFillGraphic() const;
- OUString getHyperlink() const { return msHyperlink; }
+ const OUString& getHyperlink() const { return msHyperlink; }
void setHyperlink(const OUString& sHyperlink) { msHyperlink = sHyperlink; }
protected:
diff --git a/include/tools/wldcrd.hxx b/include/tools/wldcrd.hxx
index b50bbcd11fc9..dfb1e9d87bc3 100644
--- a/include/tools/wldcrd.hxx
+++ b/include/tools/wldcrd.hxx
@@ -48,7 +48,7 @@ public:
{
}
- OUString getGlob() const
+ const OUString & getGlob() const
{
return aWildString;
}
diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx
index 94cc9be3425a..7584055e1751 100644
--- a/include/unotools/localedatawrapper.hxx
+++ b/include/unotools/localedatawrapper.hxx
@@ -158,7 +158,7 @@ public:
css::uno::Sequence< css::i18n::FormatElement > getAllFormats() const;
css::i18n::ForbiddenCharacters getForbiddenCharacters() const;
const css::uno::Sequence< css::lang::Locale > & getAllInstalledLocaleNames() const;
- css::uno::Sequence< OUString > getDateAcceptancePatterns() const;
+ const css::uno::Sequence< OUString > & getDateAcceptancePatterns() const;
/// same as the wrapper implementation but static
@@ -199,7 +199,7 @@ public:
Indian grouping. The sal_Int32* getConstArray() can be passed directly
to the ::rtl::math::doubleToString() methods as argument for the
pGroups parameter. */
- css::uno::Sequence< sal_Int32 > getDigitGrouping() const;
+ const css::uno::Sequence< sal_Int32 >& getDigitGrouping() const;
// Functionality of class International methods, LocaleItem
diff --git a/include/unotools/moduleoptions.hxx b/include/unotools/moduleoptions.hxx
index 1324e4d06e18..b5051fb1ecf7 100644
--- a/include/unotools/moduleoptions.hxx
+++ b/include/unotools/moduleoptions.hxx
@@ -92,7 +92,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtModuleOptions final : public utl::de
bool IsModuleInstalled ( EModule eModule ) const;
OUString GetModuleName ( EModule eModule ) const;
- OUString GetFactoryName ( EFactory eFactory ) const;
+ const OUString & GetFactoryName ( EFactory eFactory ) const;
OUString GetFactoryStandardTemplate( EFactory eFactory ) const;
OUString GetFactoryEmptyDocumentURL( EFactory eFactory ) const;
OUString GetFactoryDefaultFilter ( EFactory eFactory ) const;
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 833007e28088..17e1b9e3a07f 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -232,13 +232,13 @@ public:
* Returns the logic size, according to the map mode available via GetPreferredMapMode(). Prefer
* this size over GetSize_100TH_MM().
*/
- std::optional<Size> GetPreferredLogSize() const { return maPreferredLogSize; }
+ const std::optional<Size>& GetPreferredLogSize() const { return maPreferredLogSize; }
/**
* If available, this returns the map mode the graphic prefers, which may be other than pixel or
* 100th mm. Prefer this map mode over just assuming MapUnit::Map100thMM.
*/
- std::optional<MapMode> GetPreferredMapMode() const { return maPreferredMapMode; }
+ const std::optional<MapMode>& GetPreferredMapMode() const { return maPreferredMapMode; }
/** @return bits/pixel or 0 **/
sal_uInt16 GetBitsPerPixel() const { return nBitsPerPixel; }
diff --git a/include/vcl/menubarupdateicon.hxx b/include/vcl/menubarupdateicon.hxx
index 7aacad52d3ec..b8e2b717a3dd 100644
--- a/include/vcl/menubarupdateicon.hxx
+++ b/include/vcl/menubarupdateicon.hxx
@@ -77,8 +77,8 @@ public:
bool GetShowMenuIcon() const { return mbShowMenuIcon; }
bool GetShowBubble() const { return mbShowBubble; }
- OUString GetBubbleTitle() const { return maBubbleTitle; }
- OUString GetBubbleText() const { return maBubbleText; }
+ const OUString& GetBubbleTitle() const { return maBubbleTitle; }
+ const OUString& GetBubbleText() const { return maBubbleText; }
void RemoveBubbleWindow(bool bRemoveIcon);
diff --git a/include/vcl/test/GraphicsRenderTests.hxx b/include/vcl/test/GraphicsRenderTests.hxx
index 7aaca9c5874d..b311aeecebae 100644
--- a/include/vcl/test/GraphicsRenderTests.hxx
+++ b/include/vcl/test/GraphicsRenderTests.hxx
@@ -32,9 +32,9 @@ public:
, m_aResultantBitmap(atestBitmap)
{
}
- OUString getTestName() { return m_aTestName; }
- OUString getStatus() { return m_aTestStatus; }
- Bitmap getBitmap() { return m_aResultantBitmap; }
+ const OUString& getTestName() { return m_aTestName; }
+ const OUString& getStatus() { return m_aTestStatus; }
+ const Bitmap& getBitmap() { return m_aResultantBitmap; }
};
class VCL_PLUGIN_PUBLIC GraphicsRenderTests
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index f4d5a7c576ec..b1567e09ef33 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -660,11 +660,11 @@ void lcl_doSpecialMSOWidthHeightToggle(basegfx::B2DHomMatrix& aTransformation)
return;
}
-void lcl_RotateAtCenter(basegfx::B2DHomMatrix& aTransformation, const sal_Int32& rMSORotationAngle)
+void lcl_RotateAtCenter(basegfx::B2DHomMatrix& aTransformation,sal_Int32 nMSORotationAngle)
{
- if (rMSORotationAngle == 0)
+ if (nMSORotationAngle == 0)
return;
- double fRad = basegfx::deg2rad(rMSORotationAngle / 60000.0);
+ double fRad = basegfx::deg2rad(nMSORotationAngle / 60000.0);
basegfx::B2DPoint aCenter(0.5, 0.5);
aCenter *= aTransformation;
aTransformation.translate(-aCenter);
diff --git a/oox/source/export/DMLPresetShapeExport.cxx b/oox/source/export/DMLPresetShapeExport.cxx
index 9da095bf2dc3..b3c405f2f31e 100644
--- a/oox/source/export/DMLPresetShapeExport.cxx
+++ b/oox/source/export/DMLPresetShapeExport.cxx
@@ -95,15 +95,15 @@ DMLPresetShapeExporter::~DMLPresetShapeExporter(){
bool DMLPresetShapeExporter::HasHandleValue() { return m_bHasHandleValues; }
-OUString DMLPresetShapeExporter::GetShapeType() { return m_sPresetShapeType; }
+const OUString& DMLPresetShapeExporter::GetShapeType() { return m_sPresetShapeType; }
-css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>
+const css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>&
DMLPresetShapeExporter::GetHandleValues()
{
return m_HandleValues;
};
-css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>
+const css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>&
DMLPresetShapeExporter::GetAdjustmentValues()
{
return m_AdjustmentValues;
diff --git a/sc/source/core/tool/interpr6.cxx b/sc/source/core/tool/interpr6.cxx
index 1c7ed73d5c93..a291b444ecdc 100644
--- a/sc/source/core/tool/interpr6.cxx
+++ b/sc/source/core/tool/interpr6.cxx
@@ -261,7 +261,7 @@ public:
}
FormulaError getError() const { return mnError; }
- KahanSum getResult() const { return maSum; }
+ const KahanSum& getResult() const { return maSum; }
};
class NumericCellCounter
@@ -369,7 +369,7 @@ public:
};
FormulaError getError() const { return mnError; }
- KahanSum getSum() const { return mfSum; }
+ const KahanSum& getSum() const { return mfSum; }
sal_uInt32 getNumberFormat() const { return mnNumFmt; }
};
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index 144782ddbbc1..f81f35b13f78 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -1807,7 +1807,7 @@ void XclMacroHelper::WriteMacroSubRec( XclExpStream& rStrm )
WriteFormulaSubRec( rStrm, EXC_ID_OBJMACRO, *mxMacroLink );
}
-OUString XclMacroHelper::GetMacroName() const { return maMacroName; }
+const OUString& XclMacroHelper::GetMacroName() const { return maMacroName; }
bool
XclMacroHelper::SetMacroLink( const ScriptEventDescriptor& rEvent, const XclTbxEventType& nEventType )
diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx
index 6ffc5d3bf1ab..f0be1425d76e 100644
--- a/sc/source/filter/inc/xeescher.hxx
+++ b/sc/source/filter/inc/xeescher.hxx
@@ -208,7 +208,7 @@ public:
/** Sets the name of a macro
@return true = The passed macro name has been found. */
bool SetMacroLink( const OUString& rMacro );
- OUString GetMacroName() const;
+ const OUString& GetMacroName() const;
};
class XclExpShapeObj : public XclObjAny, public XclMacroHelper
diff --git a/sdext/source/presenter/PresenterToolBar.cxx b/sdext/source/presenter/PresenterToolBar.cxx
index a840165914b1..c3236235c5b0 100644
--- a/sdext/source/presenter/PresenterToolBar.cxx
+++ b/sdext/source/presenter/PresenterToolBar.cxx
@@ -305,7 +305,7 @@ namespace {
virtual void restart() override;
virtual bool isPaused() override;
virtual void setPauseStatus(const bool pauseStatus) override;
- TimeValue getPauseTimeValue() const;
+ const TimeValue& getPauseTimeValue() const;
void setPauseTimeValue(const TimeValue pauseTime);
private:
TimeValue maStartTimeValue;
@@ -1840,7 +1840,7 @@ void PresentationTimeLabel::setPauseStatus(const bool pauseStatus)
paused = pauseStatus;
}
-TimeValue PresentationTimeLabel::getPauseTimeValue() const
+const TimeValue& PresentationTimeLabel::getPauseTimeValue() const
{
return pauseTimeValue;
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index c8d1ab4bcc63..4e21ee41d1c6 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -4506,7 +4506,7 @@ bool SfxMedium::IsInCheckIn( ) const
}
// should only be called on main thread
-std::shared_ptr<std::recursive_mutex> SfxMedium::GetCheckEditableMutex() const
+const std::shared_ptr<std::recursive_mutex>& SfxMedium::GetCheckEditableMutex() const
{
return pImpl->m_pCheckEditableWorkerMutex;
}
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx
index 789f6000a82b..a18f1879b898 100644
--- a/sfx2/source/sidebar/Panel.cxx
+++ b/sfx2/source/sidebar/Panel.cxx
@@ -227,7 +227,7 @@ Reference<awt::XWindow> Panel::GetElementWindow()
return nullptr;
}
-Reference<awt::XWindow> Panel::GetElementParentWindow()
+const Reference<awt::XWindow>& Panel::GetElementParentWindow()
{
if (!mxXWindow)
{
diff --git a/starmath/inc/mathml/element.hxx b/starmath/inc/mathml/element.hxx
index d51f5b07e01c..3a6514542856 100644
--- a/starmath/inc/mathml/element.hxx
+++ b/starmath/inc/mathml/element.hxx
@@ -111,7 +111,7 @@ public: // location in the source
* Returns the location in the source code of the node type
* @return selection
*/
- ESelection getESelection() const { return m_aESelection; };
+ const ESelection& getESelection() const { return m_aESelection; };
/**
* Returns the location in the source code of the node type
@@ -280,7 +280,7 @@ public: // text elements
/**
* Returns the element text
*/
- OUString getText() const { return m_aText; };
+ const OUString& getText() const { return m_aText; };
/**
* Returns the element text
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 7014f7c2363f..427966279dd6 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -390,7 +390,7 @@ public:
* Gets node position in input text.
* @return node position in input text
*/
- ESelection GetSelection() const { return m_aESelection; }
+ const ESelection& GetSelection() const { return m_aESelection; }
/**
* Gets node position in input text.
diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx
index 1faa04470f41..cf9d5e5aace6 100644
--- a/svtools/source/misc/templatefoldercache.cxx
+++ b/svtools/source/misc/templatefoldercache.cxx
@@ -422,7 +422,7 @@ namespace svt
static bool equalStates( const TemplateFolderContent& _rLHS, const TemplateFolderContent& _rRHS );
// late initialize m_xOfficeInstDirs
- uno::Reference< util::XOfficeInstallationDirectories > getOfficeInstDirs();
+ const uno::Reference< util::XOfficeInstallationDirectories >& getOfficeInstDirs();
};
@@ -753,7 +753,7 @@ namespace svt
}
- uno::Reference< util::XOfficeInstallationDirectories >
+ const uno::Reference< util::XOfficeInstallationDirectories >&
TemplateFolderCacheImpl::getOfficeInstDirs()
{
if ( !m_xOfficeInstDirs.is() )
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 8f469715bae9..f31dd910aa78 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -2623,7 +2623,7 @@ bool SdrObjEditView::SupportsFormatPaintbrush(SdrInventor nObjectInventor,
}
}
-static WhichRangesContainer GetFormatRangeImpl(bool bTextOnly)
+static const WhichRangesContainer& GetFormatRangeImpl(bool bTextOnly)
{
static const WhichRangesContainer gFull(
svl::Items<XATTR_LINE_FIRST, XATTR_LINE_LAST, XATTR_FILL_FIRST, XATTRSET_FILL,
diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx
index 1cdda8e0ed5a..d1b015a772a8 100644
--- a/sw/inc/shellio.hxx
+++ b/sw/inc/shellio.hxx
@@ -95,7 +95,7 @@ public:
}
// for the automatic conversion (mail/news/...)
void ReadUserData( const OUString& );
- void WriteUserData( OUString& );
+ void WriteUserData( OUString& ) const;
SwAsciiOptions() { Reset(); }
};
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index 60e1f230a7ac..7d3d347bc648 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -72,7 +72,7 @@ public:
bool bReadNewDoc, const SwAsciiOptions& rOpts );
ErrCode CallParser();
- SwAsciiOptions GetUsedAsciiOptions() {return m_usedAsciiOptions;};
+ const SwAsciiOptions& GetUsedAsciiOptions() {return m_usedAsciiOptions;};
};
}
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 27e7f1e7ba55..8e421a3610b4 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -571,7 +571,7 @@ void SwAsciiOptions::ReadUserData( const OUString& rStr )
m_bIncludeHidden = !(sToken.equalsIgnoreAsciiCase("FALSE"));
}
-void SwAsciiOptions::WriteUserData(OUString& rStr)
+void SwAsciiOptions::WriteUserData(OUString& rStr) const
{
// 1. charset
rStr = NameFromCharSet(m_eCharSet) + ",";
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 3e5443295c41..a4f4c509e839 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -817,7 +817,7 @@ bool SvtModuleOptions::IsModuleInstalled( EModule eModule ) const
return m_pImpl->IsModuleInstalled( eModule );
}
-OUString SvtModuleOptions::GetFactoryName( EFactory eFactory ) const
+const OUString & SvtModuleOptions::GetFactoryName( EFactory eFactory ) const
{
// doesn't need mutex, never modified
return m_pImpl->GetFactoryName( eFactory );
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 1793b8594eeb..e30c7d30f558 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -909,7 +909,7 @@ void LocaleDataWrapper::loadDigitGrouping()
}
}
-css::uno::Sequence< sal_Int32 > LocaleDataWrapper::getDigitGrouping() const
+const css::uno::Sequence< sal_Int32 >& LocaleDataWrapper::getDigitGrouping() const
{
return aGrouping;
}
@@ -1538,7 +1538,7 @@ css::uno::Sequence< css::i18n::Calendar2 > LocaleDataWrapper::getAllCalendars()
// --- XLocaleData4 ----------------------------------------------------------
-css::uno::Sequence< OUString > LocaleDataWrapper::getDateAcceptancePatterns() const
+const css::uno::Sequence< OUString > & LocaleDataWrapper::getDateAcceptancePatterns() const
{
return aDateAcceptancePatterns;
}
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 4c6dd98e2ca9..84dca0c84cdc 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -66,7 +66,7 @@ public:
void LoseFocus();
void PostPaint() const;
- OUString title() const { return m_sTitle; }
+ const OUString& title() const { return m_sTitle; }
SalFrameStyleFlags style() const { return m_nStyle; }
bool isVisible() const { return m_bVisible; }
bool hasFocus() const { return s_pFocusFrame == this; }
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index 35150abc87c0..e21a61c49c07 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -97,7 +97,7 @@ public:
private:
friend class vcl::Font;
friend SvStream& ReadImplFont( SvStream& rIStm, ImplFont&, tools::Long& );
- friend SvStream& WriteImplFont( SvStream& rOStm, const ImplFont&, const tools::Long& );
+ friend SvStream& WriteImplFont( SvStream& rOStm, const ImplFont&, tools::Long );
void AskConfig();
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index cc5042fc9506..c4fc55300893 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -471,7 +471,7 @@ SvStream& ReadImplFont( SvStream& rIStm, ImplFont& rImplFont, tools::Long& rnNor
return rIStm;
}
-SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& rImplFont, const tools::Long& rnNormedFontScaling )
+SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& rImplFont, tools::Long nNormedFontScaling )
{
// tdf#127471 increase to version 4
VersionCompatWrite aCompat( rOStm, 4 );
@@ -508,7 +508,7 @@ SvStream& WriteImplFont( SvStream& rOStm, const ImplFont& rImplFont, const tools
rOStm.WriteUInt16( rImplFont.meOverline );
// new in version 4, NormedFontScaling
- rOStm.WriteInt32(rnNormedFontScaling);
+ rOStm.WriteInt32(nNormedFontScaling);
return rOStm;
}