diff options
102 files changed, 485 insertions, 430 deletions
diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index d566276922dc..febd85b37092 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -286,7 +286,7 @@ class SbiRuntime void DllCall( const OUString&, const OUString&, SbxArray*, SbxDataType, bool ); // #56204 swap out DIM-functionality into help method (step0.cxx) - void DimImpl( SbxVariableRef refVar ); + void DimImpl(const SbxVariableRef& refVar); static bool implIsClass( SbxObject const * pObj, const OUString& aClass ); diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index bb4d933445b3..6ccf64f22dd1 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -2081,7 +2081,7 @@ void SbiRuntime::StepDIM() } // #56204 swap out DIM-functionality into a help method (step0.cxx) -void SbiRuntime::DimImpl( SbxVariableRef refVar ) +void SbiRuntime::DimImpl(const SbxVariableRef& refVar) { // If refDim then this DIM statement is terminating a ReDIM and // previous StepERASE_CLEAR for an array, the following actions have diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 361b16d43056..787760578bc1 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -181,9 +181,10 @@ private: }; -uno::Reference<drawing::XShape> getShapeByName(const uno::Reference<drawing::XShapes>& rShapes, - const OUString& rName, - std::function<bool(const uno::Reference<drawing::XShape>&)> pCondition = nullptr) +uno::Reference<drawing::XShape> +getShapeByName(const uno::Reference<drawing::XShapes>& rShapes, const OUString& rName, + const std::function<bool(const uno::Reference<drawing::XShape>&)>& pCondition + = nullptr) { uno::Reference<container::XIndexAccess> XIndexAccess(rShapes, uno::UNO_QUERY); for (sal_Int32 i = 0; i < XIndexAccess->getCount(); ++i) diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx index 7c7a398cef9a..41dc9761a76a 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx @@ -172,10 +172,12 @@ template< typename PROPERTYTYPE > class WrappedStatisticProperty : public WrappedSeriesOrDiagramProperty< PROPERTYTYPE > { public: - explicit WrappedStatisticProperty( const OUString& rName, const Any& rDefaulValue - , std::shared_ptr< Chart2ModelContact > spChart2ModelContact - , tSeriesOrDiagramPropertyType ePropertyType ) - : WrappedSeriesOrDiagramProperty< PROPERTYTYPE >(rName,rDefaulValue,spChart2ModelContact,ePropertyType) + explicit WrappedStatisticProperty( + const OUString& rName, const Any& rDefaulValue, + const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact, + tSeriesOrDiagramPropertyType ePropertyType) + : WrappedSeriesOrDiagramProperty<PROPERTYTYPE>(rName, rDefaulValue, spChart2ModelContact, + ePropertyType) {} protected: diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx index a21b3499b0f5..521bf62985f9 100644 --- a/chart2/source/view/inc/ShapeFactory.hxx +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -271,7 +271,8 @@ public: getOrCreateChartRootShape( const css::uno::Reference< css::drawing::XDrawPage>& xPage ); - void setPageSize( css::uno::Reference < css::drawing::XShapes > xChartShapes, const css::awt::Size& rSize ); + void setPageSize(const css::uno::Reference<css::drawing::XShapes>& xChartShapes, + const css::awt::Size& rSize); static css::uno::Reference< css::drawing::XShapes > getChartRootShape( const css::uno::Reference< css::drawing::XDrawPage>& xPage ); diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index 351bf209c376..d488cc197680 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -107,9 +107,7 @@ uno::Reference< drawing::XShapes > ShapeFactory::getOrCreateChartRootShape( return xRet; } -void ShapeFactory::setPageSize(uno::Reference< drawing::XShapes >, const awt::Size& ) -{ -} +void ShapeFactory::setPageSize(const uno::Reference<drawing::XShapes>&, const awt::Size&) {} // diverse tools::PolyPolygon create methods diff --git a/comphelper/source/misc/graphicmimetype.cxx b/comphelper/source/misc/graphicmimetype.cxx index 0c0ca8057549..4c335f348173 100644 --- a/comphelper/source/misc/graphicmimetype.cxx +++ b/comphelper/source/misc/graphicmimetype.cxx @@ -64,7 +64,7 @@ OUString GraphicMimeTypeHelper::GetMimeTypeForExtension(const OString& rExt) return aMimeType; } -OUString GraphicMimeTypeHelper::GetMimeTypeForXGraphic(Reference<XGraphic> xGraphic) +OUString GraphicMimeTypeHelper::GetMimeTypeForXGraphic(const Reference<XGraphic>& xGraphic) { OUString aSourceMimeType; Reference<XPropertySet> const xGraphicPropertySet(xGraphic, UNO_QUERY); @@ -76,7 +76,8 @@ OUString GraphicMimeTypeHelper::GetMimeTypeForXGraphic(Reference<XGraphic> xGrap return OUString(""); } -OUString GraphicMimeTypeHelper::GetMimeTypeForImageStream(Reference<XInputStream> xInputStream) +OUString +GraphicMimeTypeHelper::GetMimeTypeForImageStream(const Reference<XInputStream>& xInputStream) { // Create the graphic to retrieve the mimetype from it Reference<XGraphicProvider> xProvider diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx index 4ce5d66e4f38..c62b6d14f7cc 100644 --- a/comphelper/source/misc/storagehelper.cxx +++ b/comphelper/source/misc/storagehelper.cxx @@ -705,7 +705,7 @@ uno::Reference< io::XStream > OStorageHelper::GetStreamAtPackageURL( return nullptr; } -OUString OStorageHelper::GetODFVersionFromStorage(uno::Reference<embed::XStorage> xStorage) +OUString OStorageHelper::GetODFVersionFromStorage(const uno::Reference<embed::XStorage>& xStorage) { OUString aODFVersion; try diff --git a/cui/source/dialogs/SignSignatureLineDialog.cxx b/cui/source/dialogs/SignSignatureLineDialog.cxx index 29b26f4f645e..9b3be762b2d9 100644 --- a/cui/source/dialogs/SignSignatureLineDialog.cxx +++ b/cui/source/dialogs/SignSignatureLineDialog.cxx @@ -18,6 +18,7 @@ #include <comphelper/processfactory.hxx> #include <tools/stream.hxx> #include <unotools/streamwrap.hxx> +#include <utility> #include <vcl/weld.hxx> #include <sfx2/objsh.hxx> @@ -48,7 +49,7 @@ using namespace css::graphic; using namespace css::security; SignSignatureLineDialog::SignSignatureLineDialog(weld::Widget* pParent, Reference<XModel> xModel) - : SignatureLineDialogBase(pParent, xModel, "cui/ui/signsignatureline.ui", + : SignatureLineDialogBase(pParent, std::move(xModel), "cui/ui/signsignatureline.ui", "SignSignatureLineDialog") , m_xEditName(m_xBuilder->weld_entry("edit_name")) , m_xEditComment(m_xBuilder->weld_text_view("edit_comment")) diff --git a/cui/source/dialogs/SignatureLineDialog.cxx b/cui/source/dialogs/SignatureLineDialog.cxx index 335a33fd7395..c582df2d8d59 100644 --- a/cui/source/dialogs/SignatureLineDialog.cxx +++ b/cui/source/dialogs/SignatureLineDialog.cxx @@ -13,6 +13,7 @@ #include <comphelper/xmltools.hxx> #include <tools/stream.hxx> #include <unotools/streamwrap.hxx> +#include <utility> #include <vcl/weld.hxx> #include <com/sun/star/beans/XPropertySet.hpp> @@ -48,7 +49,8 @@ using namespace css::graphic; SignatureLineDialog::SignatureLineDialog(weld::Widget* pParent, Reference<XModel> xModel, bool bEditExisting) - : SignatureLineDialogBase(pParent, xModel, "cui/ui/signatureline.ui", "SignatureLineDialog") + : SignatureLineDialogBase(pParent, std::move(xModel), "cui/ui/signatureline.ui", + "SignatureLineDialog") , m_xEditName(m_xBuilder->weld_entry("edit_name")) , m_xEditTitle(m_xBuilder->weld_entry("edit_title")) , m_xEditEmail(m_xBuilder->weld_entry("edit_email")) diff --git a/cui/source/dialogs/SignatureLineDialogBase.cxx b/cui/source/dialogs/SignatureLineDialogBase.cxx index 3028d2941a37..a4806bdf1c01 100644 --- a/cui/source/dialogs/SignatureLineDialogBase.cxx +++ b/cui/source/dialogs/SignatureLineDialogBase.cxx @@ -9,6 +9,7 @@ #include <SignatureLineDialogBase.hxx> +#include <utility> #include <vcl/weld.hxx> using namespace css; @@ -18,7 +19,7 @@ using namespace css::frame; SignatureLineDialogBase::SignatureLineDialogBase(weld::Widget* pParent, Reference<XModel> xModel, const OUString& rUIFile, const OString& rDialogId) : GenericDialogController(pParent, rUIFile, rDialogId) - , m_xModel(xModel) + , m_xModel(std::move(xModel)) { } diff --git a/dbaccess/source/filter/hsqldb/columndef.cxx b/dbaccess/source/filter/hsqldb/columndef.cxx index dd71e81f28b3..62bd7b541bf1 100644 --- a/dbaccess/source/filter/hsqldb/columndef.cxx +++ b/dbaccess/source/filter/hsqldb/columndef.cxx @@ -26,7 +26,7 @@ namespace dbahsql using namespace css::sdbc; ColumnDefinition::ColumnDefinition(const OUString& sName, sal_Int32 eType, - const std::vector<sal_Int32> aParams, bool bPrimary, + const std::vector<sal_Int32>& aParams, bool bPrimary, sal_Int32 nAutoIncr, bool bNullable, bool bCaseInsensitive, const OUString& sDefault) : m_sName(sName) diff --git a/dbaccess/source/filter/hsqldb/columndef.hxx b/dbaccess/source/filter/hsqldb/columndef.hxx index fd23ed313abb..849e7c757a9b 100644 --- a/dbaccess/source/filter/hsqldb/columndef.hxx +++ b/dbaccess/source/filter/hsqldb/columndef.hxx @@ -29,7 +29,7 @@ private: OUString m_sDefaultValue; public: - ColumnDefinition(const OUString& sName, sal_Int32 eType, const std::vector<sal_Int32> aParams, + ColumnDefinition(const OUString& sName, sal_Int32 eType, const std::vector<sal_Int32>& aParams, bool bPrimary = false, sal_Int32 nAutoIncr = -1, bool bNullable = true, bool bCaseInsensitive = false, const OUString& sDefault = OUString{}); diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx index 9b6df5d61a70..600e7729c03e 100644 --- a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx +++ b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx @@ -86,7 +86,7 @@ OUString lcl_double_dabble(const std::vector<sal_uInt8>& bytes) return rtl::OStringToOUString(OString(scratch.data(), scratch.size()), RTL_TEXTENCODING_UTF8); } -OUString lcl_makeStringFromBigint(const std::vector<sal_uInt8> bytes) +OUString lcl_makeStringFromBigint(const std::vector<sal_uInt8>& bytes) { std::vector<sal_uInt8> aBytes{ bytes }; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index ab29517d9370..fc3065172717 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -171,7 +171,8 @@ void EnhancedShapeDumper::dumpBrightnessAsAttribute(double aBrightness) xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("brightness"), "%f", aBrightness); } -void EnhancedShapeDumper::dumpEnhancedCustomShapeParameterPair(drawing::EnhancedCustomShapeParameterPair aParameterPair) +void EnhancedShapeDumper::dumpEnhancedCustomShapeParameterPair( + const drawing::EnhancedCustomShapeParameterPair& aParameterPair) { { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "First" )); @@ -515,7 +516,7 @@ void EnhancedShapeDumper::dumpAdjustmentValuesAsElement(const uno::Sequence< dra xmlTextWriterEndElement( xmlWriter ); } -void EnhancedShapeDumper::dumpPropertyValueAsElement(beans::PropertyValue aPropertyValue) +void EnhancedShapeDumper::dumpPropertyValueAsElement(const beans::PropertyValue& aPropertyValue) { xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PropertyValue" )); @@ -753,7 +754,8 @@ void EnhancedShapeDumper::dumpRefRAsAttribute(sal_Int32 aRefR) xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("refR"), "%" SAL_PRIdINT32, aRefR); } -void EnhancedShapeDumper::dumpEnhancedCustomShapeParameter(drawing::EnhancedCustomShapeParameter aParameter) +void EnhancedShapeDumper::dumpEnhancedCustomShapeParameter( + const drawing::EnhancedCustomShapeParameter& aParameter) { uno::Any aAny = aParameter.Value; OUString sValue; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.hxx b/drawinglayer/source/dumper/EnhancedShapeDumper.hxx index 58f7e5f6e886..9de2ca3e9097 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.hxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.hxx @@ -39,10 +39,12 @@ public: } // auxiliary functions - void dumpEnhancedCustomShapeParameterPair(css::drawing::EnhancedCustomShapeParameterPair aParameterPair); + void dumpEnhancedCustomShapeParameterPair( + const css::drawing::EnhancedCustomShapeParameterPair& aParameterPair); void dumpDirection3D(css::drawing::Direction3D aDirection3D); - void dumpPropertyValueAsElement(css::beans::PropertyValue aPropertyValue); - void dumpEnhancedCustomShapeParameter(css::drawing::EnhancedCustomShapeParameter aParameter); + void dumpPropertyValueAsElement(const css::beans::PropertyValue& aPropertyValue); + void + dumpEnhancedCustomShapeParameter(const css::drawing::EnhancedCustomShapeParameter& aParameter); // EnhancedCustomShapeExtrusion.idl void dumpEnhancedCustomShapeExtrusionService(const css::uno::Reference< css::beans::XPropertySet >& xPropSet); diff --git a/include/comphelper/graphicmimetype.hxx b/include/comphelper/graphicmimetype.hxx index 6b8ed4293805..7cf1e88240c0 100644 --- a/include/comphelper/graphicmimetype.hxx +++ b/include/comphelper/graphicmimetype.hxx @@ -24,9 +24,10 @@ class COMPHELPER_DLLPUBLIC GraphicMimeTypeHelper { public: static OUString GetMimeTypeForExtension(const OString& rExt); - static OUString GetMimeTypeForXGraphic(css::uno::Reference<css::graphic::XGraphic> xGraphic); static OUString - GetMimeTypeForImageStream(css::uno::Reference<css::io::XInputStream> xInputStream); + GetMimeTypeForXGraphic(const css::uno::Reference<css::graphic::XGraphic>& xGraphic); + static OUString + GetMimeTypeForImageStream(const css::uno::Reference<css::io::XInputStream>& xInputStream); static OUString GetMimeTypeForConvertDataFormat(ConvertDataFormat convertDataFormat); }; } diff --git a/include/comphelper/storagehelper.hxx b/include/comphelper/storagehelper.hxx index e8fcc0d11cb7..ef82b83effae 100644 --- a/include/comphelper/storagehelper.hxx +++ b/include/comphelper/storagehelper.hxx @@ -195,7 +195,7 @@ public: LifecycleProxy const & rNastiness ); static OUString - GetODFVersionFromStorage(css::uno::Reference<css::embed::XStorage> xStorage); + GetODFVersionFromStorage(const css::uno::Reference<css::embed::XStorage>& xStorage); }; } diff --git a/include/oox/export/vmlexport.hxx b/include/oox/export/vmlexport.hxx index bea395e32ce3..7aa445cfddf9 100644 --- a/include/oox/export/vmlexport.hxx +++ b/include/oox/export/vmlexport.hxx @@ -143,7 +143,9 @@ public: void SetSkipwzName(bool bSkipwzName) { m_bSkipwzName = bSkipwzName; } void SetHashMarkForType(bool bUseHashMarkForType) { m_bUseHashMarkForType = bUseHashMarkForType; } - void OverrideShapeIDGen(bool bOverrideShapeIdGeneration, const OString sShapeIDPrefix = OString()); + void OverrideShapeIDGen(bool bOverrideShapeIdGeneration, + const OString& sShapeIDPrefix = OString()); + protected: /// Add an attribute to the generated <v:shape/> element. /// diff --git a/include/oox/ppt/layoutfragmenthandler.hxx b/include/oox/ppt/layoutfragmenthandler.hxx index a1f0bc9bf7dd..838ba947d1a5 100644 --- a/include/oox/ppt/layoutfragmenthandler.hxx +++ b/include/oox/ppt/layoutfragmenthandler.hxx @@ -34,7 +34,8 @@ namespace oox { namespace ppt { class LayoutFragmentHandler : public SlideFragmentHandler { public: - LayoutFragmentHandler(::oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, SlidePersistPtr pMasterPersistPtr); + LayoutFragmentHandler(::oox::core::XmlFilterBase& rFilter, const OUString& rFragmentPath, + const SlidePersistPtr& pMasterPersistPtr); virtual ~LayoutFragmentHandler() override; virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs ) override; diff --git a/include/oox/ppt/presentationfragmenthandler.hxx b/include/oox/ppt/presentationfragmenthandler.hxx index cb7c45412c4e..ab24a8262fae 100644 --- a/include/oox/ppt/presentationfragmenthandler.hxx +++ b/include/oox/ppt/presentationfragmenthandler.hxx @@ -50,7 +50,7 @@ private: void importSlide( const ::oox::core::FragmentHandlerRef& rSlideFragmentHandler, const oox::ppt::SlidePersistPtr& rPersist ); void importSlide(sal_uInt32 nSlide, bool bFirstSlide, bool bImportNotes); - void saveThemeToGrabBag(oox::drawingml::ThemePtr pThemePtr, const OUString& sTheme); + void saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr, const OUString& sTheme); std::vector< OUString > maSlideMasterVector; std::vector< OUString > maSlidesVector; diff --git a/include/oox/vml/vmlshapecontext.hxx b/include/oox/vml/vmlshapecontext.hxx index 7243684f6350..84694e655865 100644 --- a/include/oox/vml/vmlshapecontext.hxx +++ b/include/oox/vml/vmlshapecontext.hxx @@ -121,10 +121,8 @@ private: class ShapeContext : public ShapeTypeContext { public: - explicit ShapeContext( - ::oox::core::ContextHandler2Helper const & rParent, - std::shared_ptr<ShapeBase> pShape, - const AttributeList& rAttribs ); + explicit ShapeContext(::oox::core::ContextHandler2Helper const& rParent, + const std::shared_ptr<ShapeBase>& pShape, const AttributeList& rAttribs); virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override; @@ -154,10 +152,9 @@ private: class GroupShapeContext : public ShapeContext { public: - explicit GroupShapeContext( - ::oox::core::ContextHandler2Helper const & rParent, - std::shared_ptr<GroupShape> pShape, - const AttributeList& rAttribs ); + explicit GroupShapeContext(::oox::core::ContextHandler2Helper const& rParent, + const std::shared_ptr<GroupShape>& pShape, + const AttributeList& rAttribs); virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override; @@ -170,10 +167,9 @@ private: class RectangleShapeContext : public ShapeContext { public: - explicit RectangleShapeContext( - ::oox::core::ContextHandler2Helper const & rParent, - const AttributeList& rAttribs, - std::shared_ptr<RectangleShape> pShape); + explicit RectangleShapeContext(::oox::core::ContextHandler2Helper const& rParent, + const AttributeList& rAttribs, + const std::shared_ptr<RectangleShape>& pShape); virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override; diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index 0fa8fbbae69c..dd2f1304e015 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -266,11 +266,11 @@ public: SAL_DLLPRIVATE bool SignContents_Impl(bool bSignScriptingContent, bool bHasValidDocumentSignature, const OUString& aSignatureLineId = OUString(), - const css::uno::Reference<css::security::XCertificate> xCert + const css::uno::Reference<css::security::XCertificate>& xCert = css::uno::Reference<css::security::XCertificate>(), - const css::uno::Reference<css::graphic::XGraphic> xValidGraphic + const css::uno::Reference<css::graphic::XGraphic>& xValidGraphic = css::uno::Reference<css::graphic::XGraphic>(), - const css::uno::Reference<css::graphic::XGraphic> xInvalidGraphic + const css::uno::Reference<css::graphic::XGraphic>& xInvalidGraphic = css::uno::Reference<css::graphic::XGraphic>(), const OUString& aComment = OUString()); diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 382e4c692e87..1c31ed32d9c6 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -362,9 +362,9 @@ public: SignatureState GetDocumentSignatureState(); void SignDocumentContent(weld::Window* pDialogParent); void SignSignatureLine(weld::Window* pDialogParent, const OUString& aSignatureLineId, - const css::uno::Reference<css::security::XCertificate> xCert, - const css::uno::Reference<css::graphic::XGraphic> xValidGraphic, - const css::uno::Reference<css::graphic::XGraphic> xInvalidGraphic, + const css::uno::Reference<css::security::XCertificate>& xCert, + const css::uno::Reference<css::graphic::XGraphic>& xValidGraphic, + const css::uno::Reference<css::graphic::XGraphic>& xInvalidGraphic, const OUString& aComment); SignatureState GetScriptingSignatureState(); void SignScriptingContent(weld::Window* pDialogParent); diff --git a/include/test/xmltesttools.hxx b/include/test/xmltesttools.hxx index eba5c84a0644..231a3e448fd6 100644 --- a/include/test/xmltesttools.hxx +++ b/include/test/xmltesttools.hxx @@ -65,7 +65,7 @@ protected: const OString& rAttribute = OString(), const OUString& rExpectedValue = OUString()); void assertXPathAttrs(xmlDocPtr pXmlDoc, const OString& rXPath, - std::vector<std::pair<OString, OUString>> aPairVector); + const std::vector<std::pair<OString, OUString>>& aPairVector); /** * Assert that rXPath exists, and returns exactly nNumberOfNodes nodes. * Useful for checking that we do _not_ export some node (nNumberOfNodes == 0). diff --git a/include/tools/XmlWalker.hxx b/include/tools/XmlWalker.hxx index 85507f46583d..28dddcb51778 100644 --- a/include/tools/XmlWalker.hxx +++ b/include/tools/XmlWalker.hxx @@ -45,7 +45,7 @@ public: void parent(); void next(); bool isValid() const; - OString attribute(OString sName); + OString attribute(const OString& sName); }; } // end tools namespace diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index ccf3380c8f5a..a9dc49dccb1e 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -157,9 +157,9 @@ public: size_t GetActionSize() const; - void AddAction( rtl::Reference<MetaAction> pAction ); - void AddAction( rtl::Reference<MetaAction> pAction, size_t nPos ); - void push_back( rtl::Reference<MetaAction> pAction ); + void AddAction(const rtl::Reference<MetaAction>& pAction); + void AddAction(const rtl::Reference<MetaAction>& pAction, size_t nPos); + void push_back(const rtl::Reference<MetaAction>& pAction); /** * @param pAction takes ownership * @param nAction the action to replace diff --git a/include/vcl/listctrl.hxx b/include/vcl/listctrl.hxx index d640ad2c7ee6..aa825f205b47 100644 --- a/include/vcl/listctrl.hxx +++ b/include/vcl/listctrl.hxx @@ -43,7 +43,8 @@ public: virtual ~ListControl() override; virtual void dispose() override; - void addEntry(VclPtr<vcl::Window> xEntry, sal_uInt32 nPos = std::numeric_limits<sal_uInt16>::max()); + void addEntry(const VclPtr<vcl::Window>& xEntry, + sal_uInt32 nPos = std::numeric_limits<sal_uInt16>::max()); std::vector<VclPtr<vcl::Window>> const & getEntries() const; void deleteEntry(sal_uInt32 nPos); diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx index b88d859840c8..382756b18e9f 100644 --- a/include/vcl/ppdparser.hxx +++ b/include/vcl/ppdparser.hxx @@ -167,7 +167,7 @@ private: std::unique_ptr<PPDTranslator> m_pTranslator; PPDParser( const OUString& rFile ); - PPDParser( const OUString& rFile, std::vector<PPDKey*> keys ); + PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys); void parseOrderDependency(const OString& rLine); void parseOpenUI(const OString& rLine, const OString& rPPDGroup); diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index f0ae63b1cb15..a582fe20a119 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -371,7 +371,7 @@ public: // by repeated calls to ExecutePrintJob(). Used by mailmerge. static bool PreparePrintJob( std::shared_ptr<vcl::PrinterController> i_pController, const JobSetup& i_rInitSetup ); - static bool ExecutePrintJob( std::shared_ptr<vcl::PrinterController> i_pController ); + static bool ExecutePrintJob(const std::shared_ptr<vcl::PrinterController>& i_pController); static void FinishPrintJob( const std::shared_ptr<vcl::PrinterController>& i_pController ); /** Implementation detail of PrintJob being asynchronous diff --git a/include/xmloff/xformsimport.hxx b/include/xmloff/xformsimport.hxx index 6624a94acd77..99c511790883 100644 --- a/include/xmloff/xformsimport.hxx +++ b/include/xmloff/xformsimport.hxx @@ -45,25 +45,24 @@ XMLOFF_DLLPUBLIC SvXMLImportContext* createXFormsModelContext( * @param pair<XForms binding ID, reference to control> */ void bindXFormsValueBinding( - css::uno::Reference<css::frame::XModel> const &, - std::pair<css::uno::Reference<css::beans::XPropertySet>,OUString> ); - + css::uno::Reference<css::frame::XModel> const&, + const std::pair<css::uno::Reference<css::beans::XPropertySet>, OUString>&); /** perform the actual binding of an XForms-binding as list source with a list control * @param document which contains the XForms-model(s) * @param pair<XForms binding ID, reference to control> */ void bindXFormsListBinding( - css::uno::Reference<css::frame::XModel> const &, - std::pair<css::uno::Reference<css::beans::XPropertySet>,OUString> ); + css::uno::Reference<css::frame::XModel> const&, + const std::pair<css::uno::Reference<css::beans::XPropertySet>, OUString>&); /** perform the actual binding of an XForms submission with the suitable control * @param document which contains the XForms-model(s) * @param pair<XForms submission ID, reference to control> */ void bindXFormsSubmission( - css::uno::Reference<css::frame::XModel> const &, - std::pair<css::uno::Reference<css::beans::XPropertySet>,OUString> ); + css::uno::Reference<css::frame::XModel> const&, + const std::pair<css::uno::Reference<css::beans::XPropertySet>, OUString>&); /** applies the given settings to the given XForms container */ diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index db6c183a8cef..7e9457ff4fa1 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -46,6 +46,7 @@ #include <rtl/textenc.h> #include <sal/log.hxx> +#include <utility> #include <vector> #include <set> #include <string.h> @@ -76,8 +77,10 @@ SpellChecker::SpellChecker() : { } -SpellChecker::DictItem::DictItem(OUString i_DName, Locale i_DLoc, rtl_TextEncoding i_DEnc): - m_aDName(i_DName), m_aDLoc(i_DLoc), m_aDEnc(i_DEnc) +SpellChecker::DictItem::DictItem(OUString i_DName, Locale i_DLoc, rtl_TextEncoding i_DEnc) + : m_aDName(std::move(i_DName)) + , m_aDLoc(std::move(i_DLoc)) + , m_aDEnc(i_DEnc) { } diff --git a/oox/inc/drawingml/textbodycontext.hxx b/oox/inc/drawingml/textbodycontext.hxx index 39ae7b8a1b59..577316258fec 100644 --- a/oox/inc/drawingml/textbodycontext.hxx +++ b/oox/inc/drawingml/textbodycontext.hxx @@ -32,7 +32,7 @@ class TextBodyContext final : public ::oox::core::ContextHandler2 { public: TextBodyContext( ::oox::core::ContextHandler2Helper const & rParent, TextBody& rTextBody ); - TextBodyContext( ::oox::core::ContextHandler2Helper const & rParent, ShapePtr pShapePtr ); + TextBodyContext(::oox::core::ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; diff --git a/oox/inc/drawingml/textbodypropertiescontext.hxx b/oox/inc/drawingml/textbodypropertiescontext.hxx index b6305866e014..7964f1546be6 100644 --- a/oox/inc/drawingml/textbodypropertiescontext.hxx +++ b/oox/inc/drawingml/textbodypropertiescontext.hxx @@ -34,8 +34,8 @@ public: const ::oox::AttributeList& rAttributes, TextBodyProperties& rTextBodyProp ); - TextBodyPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent, - const ::oox::AttributeList& rAttributes, ShapePtr pShapePtr ); + TextBodyPropertiesContext(::oox::core::ContextHandler2Helper const& rParent, + const ::oox::AttributeList& rAttributes, const ShapePtr& pShapePtr); virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override; diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 2f7cd0722938..6b5f9ac79b0e 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -429,12 +429,11 @@ static inline SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust ) return SDRTEXTHORZADJUST_LEFT; } -static inline void lcl_createPresetShape( uno::Reference<drawing::XShape>& xShape, - const OUString& rClass, - const OUString& rPresetType, - const CustomShapePropertiesPtr pCustomShapePropertiesPtr, - const TextBodyPtr pTextBody, - const GraphicHelper& rGraphicHelper ) +static inline void lcl_createPresetShape(uno::Reference<drawing::XShape>& xShape, + const OUString& rClass, const OUString& rPresetType, + const CustomShapePropertiesPtr& pCustomShapePropertiesPtr, + const TextBodyPtr& pTextBody, + const GraphicHelper& rGraphicHelper) { if (!xShape.is() || !pCustomShapePropertiesPtr || !pTextBody) return; diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index 6279b129cf02..cbd1e420ee5a 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -164,8 +164,8 @@ TextBodyContext::TextBodyContext( ContextHandler2Helper const & rParent, TextBod { } -TextBodyContext::TextBodyContext( ContextHandler2Helper const & rParent, ShapePtr pShapePtr ) -: TextBodyContext( rParent, *pShapePtr->getTextBody() ) +TextBodyContext::TextBodyContext(ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr) + : TextBodyContext(rParent, *pShapePtr->getTextBody()) { mpShapePtr = pShapePtr; } diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 6de4a0764cbd..9f1549c87126 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -49,9 +49,10 @@ using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { // CT_TextBodyProperties -TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper const & rParent, - const AttributeList& rAttribs, ShapePtr pShapePtr ) -: TextBodyPropertiesContext( rParent, rAttribs, pShapePtr->getTextBody()->getTextProperties() ) +TextBodyPropertiesContext::TextBodyPropertiesContext(ContextHandler2Helper const& rParent, + const AttributeList& rAttribs, + const ShapePtr& pShapePtr) + : TextBodyPropertiesContext(rParent, rAttribs, pShapePtr->getTextBody()->getTextProperties()) { mpShapePtr = pShapePtr; } diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index a071c6d4ff12..e980c9a7d325 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -210,7 +210,7 @@ bool VMLExport::IsWaterMarkShape(const OUString& rStr) return rStr.match("PowerPlusWaterMarkObject") || rStr.match("WordPictureWatermark"); } -void VMLExport::OverrideShapeIDGen(bool bOverrideShapeIdGen, const OString sShapeIDPrefix) +void VMLExport::OverrideShapeIDGen(bool bOverrideShapeIdGen, const OString& sShapeIDPrefix) { m_bOverrideShapeIdGeneration = bOverrideShapeIdGen; if(bOverrideShapeIdGen) diff --git a/oox/source/ppt/layoutfragmenthandler.cxx b/oox/source/ppt/layoutfragmenthandler.cxx index e73a33e1d0c1..2f5f237dae90 100644 --- a/oox/source/ppt/layoutfragmenthandler.cxx +++ b/oox/source/ppt/layoutfragmenthandler.cxx @@ -42,7 +42,7 @@ namespace oox { namespace ppt { // CT_SlideLayout LayoutFragmentHandler::LayoutFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath, - SlidePersistPtr pMasterPersistPtr) + const SlidePersistPtr& pMasterPersistPtr) : SlideFragmentHandler(rFilter, rFragmentPath, pMasterPersistPtr, Layout) { } diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index bb939fbaf70d..1ba3cdbd2e7e 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -159,7 +159,8 @@ void ResolveTextFields( XmlFilterBase const & rFilter ) } } -void PresentationFragmentHandler::saveThemeToGrabBag(oox::drawingml::ThemePtr pThemePtr, const OUString& sTheme) +void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr, + const OUString& sTheme) { if (!pThemePtr) return; diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index efeb188a42b5..eb78598274c5 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -452,11 +452,11 @@ void ShapeTypeContext::setStyle( const OUString& rStyle ) } } -ShapeContext::ShapeContext(ContextHandler2Helper const & rParent, - std::shared_ptr<ShapeBase> pShape, const AttributeList& rAttribs) - : ShapeTypeContext( rParent, pShape, rAttribs ) - , mrShape( *pShape ) - , mrShapeModel( pShape->getShapeModel() ) +ShapeContext::ShapeContext(ContextHandler2Helper const& rParent, + const std::shared_ptr<ShapeBase>& pShape, const AttributeList& rAttribs) + : ShapeTypeContext(rParent, pShape, rAttribs) + , mrShape(*pShape) + , mrShapeModel(pShape->getShapeModel()) { // collect shape specific attributes mrShapeModel.maType = rAttribs.getXString( XML_type, OUString() ); @@ -562,10 +562,11 @@ void ShapeContext::setVmlPath( const OUString& rPath ) mrShapeModel.maVmlPath = rPath; } -GroupShapeContext::GroupShapeContext(ContextHandler2Helper const & rParent, - std::shared_ptr<GroupShape> pShape, const AttributeList& rAttribs) - : ShapeContext( rParent, pShape, rAttribs ) - , mrShapes( pShape->getChildren() ) +GroupShapeContext::GroupShapeContext(ContextHandler2Helper const& rParent, + const std::shared_ptr<GroupShape>& pShape, + const AttributeList& rAttribs) + : ShapeContext(rParent, pShape, rAttribs) + , mrShapes(pShape->getChildren()) { } @@ -577,9 +578,10 @@ ContextHandlerRef GroupShapeContext::onCreateContext( sal_Int32 nElement, const return xContext.get() ? xContext : ShapeContext::onCreateContext( nElement, rAttribs ); } -RectangleShapeContext::RectangleShapeContext(ContextHandler2Helper const & rParent, - const AttributeList& rAttribs, std::shared_ptr<RectangleShape> pShape) - : ShapeContext( rParent, pShape, rAttribs ) +RectangleShapeContext::RectangleShapeContext(ContextHandler2Helper const& rParent, + const AttributeList& rAttribs, + const std::shared_ptr<RectangleShape>& pShape) + : ShapeContext(rParent, pShape, rAttribs) { } diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx index 861e17740a44..c144edcf2100 100644 --- a/reportdesign/source/core/sdr/UndoActions.cxx +++ b/reportdesign/source/core/sdr/UndoActions.cxx @@ -38,6 +38,7 @@ #include <comphelper/types.hxx> #include <connectivity/dbtools.hxx> #include <tools/diagnose_ex.h> +#include <utility> #include <vcl/svapp.hxx> #include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> @@ -240,15 +241,14 @@ void OUndoContainerAction::Redo() } } -OUndoGroupSectionAction::OUndoGroupSectionAction(SdrModel& _rMod - ,Action _eAction - ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction - ,const uno::Reference< report::XGroup >& _xGroup - ,const Reference< XInterface > & xElem - ,const char* pCommentId) -:OUndoContainerAction(_rMod,_eAction,nullptr,xElem,pCommentId) -,m_aGroupHelper(_xGroup) -,m_pMemberFunction(_pMemberFunction) +OUndoGroupSectionAction::OUndoGroupSectionAction( + SdrModel& _rMod, Action _eAction, + ::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction, + const uno::Reference<report::XGroup>& _xGroup, const Reference<XInterface>& xElem, + const char* pCommentId) + : OUndoContainerAction(_rMod, _eAction, nullptr, xElem, pCommentId) + , m_aGroupHelper(_xGroup) + , m_pMemberFunction(std::move(_pMemberFunction)) { } @@ -285,15 +285,14 @@ void OUndoGroupSectionAction::implReRemove( ) m_xOwnElement = m_xElement; } -OUndoReportSectionAction::OUndoReportSectionAction(SdrModel& _rMod - ,Action _eAction - ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction - ,const uno::Reference< report::XReportDefinition >& _xReport - ,const Reference< XInterface > & xElem - ,const char* pCommentId) -:OUndoContainerAction(_rMod,_eAction,nullptr,xElem,pCommentId) -,m_aReportHelper(_xReport) -,m_pMemberFunction(_pMemberFunction) +OUndoReportSectionAction::OUndoReportSectionAction( + SdrModel& _rMod, Action _eAction, + ::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction, + const uno::Reference<report::XReportDefinition>& _xReport, const Reference<XInterface>& xElem, + const char* pCommentId) + : OUndoContainerAction(_rMod, _eAction, nullptr, xElem, pCommentId) + , m_aReportHelper(_xReport) + , m_pMemberFunction(std::move(_pMemberFunction)) { } @@ -384,14 +383,13 @@ OUString ORptUndoPropertyAction::GetComment() const return aStr.replaceFirst("#", m_aPropertyName); } -OUndoPropertyGroupSectionAction::OUndoPropertyGroupSectionAction(SdrModel& _rMod - ,const PropertyChangeEvent& evt - ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction - ,const uno::Reference< report::XGroup >& _xGroup - ) -:ORptUndoPropertyAction(_rMod,evt) -,m_aGroupHelper(_xGroup) -,m_pMemberFunction(_pMemberFunction) +OUndoPropertyGroupSectionAction::OUndoPropertyGroupSectionAction( + SdrModel& _rMod, const PropertyChangeEvent& evt, + ::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction, + const uno::Reference<report::XGroup>& _xGroup) + : ORptUndoPropertyAction(_rMod, evt) + , m_aGroupHelper(_xGroup) + , m_pMemberFunction(std::move(_pMemberFunction)) { } @@ -400,14 +398,13 @@ Reference< XPropertySet> OUndoPropertyGroupSectionAction::getObject() return m_pMemberFunction(&m_aGroupHelper).get(); } -OUndoPropertyReportSectionAction::OUndoPropertyReportSectionAction(SdrModel& _rMod - ,const PropertyChangeEvent& evt - ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction - ,const uno::Reference< report::XReportDefinition >& _xReport - ) -:ORptUndoPropertyAction(_rMod,evt) -,m_aReportHelper(_xReport) -,m_pMemberFunction(_pMemberFunction) +OUndoPropertyReportSectionAction::OUndoPropertyReportSectionAction( + SdrModel& _rMod, const PropertyChangeEvent& evt, + ::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction, + const uno::Reference<report::XReportDefinition>& _xReport) + : ORptUndoPropertyAction(_rMod, evt) + , m_aReportHelper(_xReport) + , m_pMemberFunction(std::move(_pMemberFunction)) { } diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx index a08bf82a27a5..14610862eace 100644 --- a/reportdesign/source/ui/inc/SectionWindow.hxx +++ b/reportdesign/source/ui/inc/SectionWindow.hxx @@ -66,7 +66,11 @@ namespace rptui * \param _pIsSectionOn * @return sal_True when title was set otherwise FALSE */ - bool setGroupSectionTitle(const css::uno::Reference< css::report::XGroup>& _xGroup,const char* pResId,::std::function<css::uno::Reference< css::report::XSection>(OGroupHelper *)> _pGetSection, const ::std::function<bool(OGroupHelper *)>& _pIsSectionOn); + bool setGroupSectionTitle( + const css::uno::Reference<css::report::XGroup>& _xGroup, const char* pResId, + const ::std::function<css::uno::Reference<css::report::XSection>(OGroupHelper*)>& + _pGetSection, + const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn); /** set the title of the (report/page) header or footer * @@ -76,7 +80,11 @@ namespace rptui * \param _pIsSectionOn * @return sal_True when title was set otherwise FALSE */ - bool setReportSectionTitle(const css::uno::Reference< css::report::XReportDefinition>& _xReport,const char* pResId,::std::function<css::uno::Reference< css::report::XSection>(OReportHelper *)> _pGetSection, const ::std::function<bool(OReportHelper *)>& _pIsSectionOn); + bool setReportSectionTitle( + const css::uno::Reference<css::report::XReportDefinition>& _xReport, const char* pResId, + const ::std::function<css::uno::Reference<css::report::XSection>(OReportHelper*)>& + _pGetSection, + const ::std::function<bool(OReportHelper*)>& _pIsSectionOn); void ImplInitSettings(); DECL_LINK(Collapsed, OColorListener&, void); diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx index 10ee07c39fed..dc8b823d0f24 100644 --- a/reportdesign/source/ui/misc/RptUndo.cxx +++ b/reportdesign/source/ui/misc/RptUndo.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/awt/Size.hpp> #include <comphelper/types.hxx> #include <svx/unoshape.hxx> +#include <utility> #include <vcl/settings.hxx> #include <functional> @@ -215,14 +216,13 @@ void OSectionUndo::Redo() } } - -OReportSectionUndo::OReportSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot - ,::std::function<uno::Reference< report::XSection >(OReportHelper *)> _pMemberFunction - ,const uno::Reference< report::XReportDefinition >& _xReport - ,Action _eAction) -: OSectionUndo(_rMod,_nSlot,_eAction,nullptr) -,m_aReportHelper(_xReport) -,m_pMemberFunction(_pMemberFunction) +OReportSectionUndo::OReportSectionUndo( + OReportModel& _rMod, sal_uInt16 _nSlot, + ::std::function<uno::Reference<report::XSection>(OReportHelper*)> _pMemberFunction, + const uno::Reference<report::XReportDefinition>& _xReport, Action _eAction) + : OSectionUndo(_rMod, _nSlot, _eAction, nullptr) + , m_aReportHelper(_xReport) + , m_pMemberFunction(std::move(_pMemberFunction)) { if( m_eAction == Removed ) collectControls(m_pMemberFunction(&m_aReportHelper)); @@ -251,15 +251,13 @@ void OReportSectionUndo::implReRemove( ) m_bInserted = false; } - -OGroupSectionUndo::OGroupSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot - ,::std::function<uno::Reference< report::XSection >(OGroupHelper *)> _pMemberFunction - ,const uno::Reference< report::XGroup >& _xGroup - ,Action _eAction - ,const char* pCommentID) -: OSectionUndo(_rMod,_nSlot,_eAction,pCommentID) -,m_aGroupHelper(_xGroup) -,m_pMemberFunction(_pMemberFunction) +OGroupSectionUndo::OGroupSectionUndo( + OReportModel& _rMod, sal_uInt16 _nSlot, + ::std::function<uno::Reference<report::XSection>(OGroupHelper*)> _pMemberFunction, + const uno::Reference<report::XGroup>& _xGroup, Action _eAction, const char* pCommentID) + : OSectionUndo(_rMod, _nSlot, _eAction, pCommentID) + , m_aGroupHelper(_xGroup) + , m_pMemberFunction(std::move(_pMemberFunction)) { if( m_eAction == Removed ) { diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 015775bd9e40..ae30403c5f56 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -165,7 +165,10 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) } } -bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReportDefinition>& _xReport,const char* pResId,::std::function<uno::Reference<report::XSection>(OReportHelper *)> _pGetSection, const ::std::function<bool(OReportHelper *)>& _pIsSectionOn) +bool OSectionWindow::setReportSectionTitle( + const uno::Reference<report::XReportDefinition>& _xReport, const char* pResId, + const ::std::function<uno::Reference<report::XSection>(OReportHelper*)>& _pGetSection, + const ::std::function<bool(OReportHelper*)>& _pIsSectionOn) { OReportHelper aReportHelper(_xReport); const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection->getSection(); @@ -178,7 +181,10 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport return bRet; } -bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>& _xGroup,const char* pResId,::std::function<uno::Reference<report::XSection>(OGroupHelper *)> _pGetSection, const ::std::function<bool(OGroupHelper *)>& _pIsSectionOn) +bool OSectionWindow::setGroupSectionTitle( + const uno::Reference<report::XGroup>& _xGroup, const char* pResId, + const ::std::function<uno::Reference<report::XSection>(OGroupHelper*)>& _pGetSection, + const ::std::function<bool(OGroupHelper*)>& _pIsSectionOn) { OGroupHelper aGroupHelper(_xGroup); const bool bRet = _pIsSectionOn(&aGroupHelper) && _pGetSection(&aGroupHelper) == m_aReportSection->getSection() ; diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx index 45d536dfb7c9..90889484ab07 100644 --- a/sc/inc/colorscale.hxx +++ b/sc/inc/colorscale.hxx @@ -77,7 +77,7 @@ public: void SetType( ScColorScaleEntryType eType ); void SetRepaintCallback(ScConditionalFormat* pParent); - void SetRepaintCallback(std::function<void()> func); + void SetRepaintCallback(const std::function<void()>& func); }; namespace databar diff --git a/sc/inc/datamapper.hxx b/sc/inc/datamapper.hxx index 2c20897b7356..c1da6ff83eb4 100644 --- a/sc/inc/datamapper.hxx +++ b/sc/inc/datamapper.hxx @@ -97,7 +97,7 @@ public: void refresh(ScDocument* pDoc, bool bDeterministic = false); - void AddDataTransformation(std::shared_ptr<sc::DataTransformation> mpDataTransformation); + void AddDataTransformation(const std::shared_ptr<sc::DataTransformation>& mpDataTransformation); const std::vector<std::shared_ptr<sc::DataTransformation>>& getDataTransformation() const; }; diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 3617dcf7401f..46dea0e3f124 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -346,7 +346,7 @@ void ScColorScaleEntry::setListener() } } -void ScColorScaleEntry::SetRepaintCallback(std::function<void()> func) +void ScColorScaleEntry::SetRepaintCallback(const std::function<void()>& func) { mpListener->setCallback(func); } diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index 5bf0269f3978..6a365098a5a5 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -950,10 +950,11 @@ template<class Base> class DynamicKernelSlidingArgument : public Base { public: - DynamicKernelSlidingArgument( const ScCalcConfig& config, const std::string& s, - FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen, - int index ) : - Base(config, s, ft, index), mpCodeGen(CodeGen) + DynamicKernelSlidingArgument(const ScCalcConfig& config, const std::string& s, + const FormulaTreeNodeRef& ft, + std::shared_ptr<SlidingFunctionBase>& CodeGen, int index) + : Base(config, s, ft, index) + , mpCodeGen(CodeGen) { FormulaToken* t = ft->GetFormulaToken(); if (t->GetType() != formula::svDoubleVectorRef) @@ -1175,8 +1176,9 @@ public: typedef std::map<const formula::FormulaToken*, DynamicKernelArgumentRef> ArgumentMap; // This avoids instability caused by using pointer as the key type SymbolTable() : mCurId(0) { } - template<class T> - const DynamicKernelArgument* DeclRefArg( const ScCalcConfig& config, FormulaTreeNodeRef, SlidingFunctionBase* pCodeGen, int nResultSize ); + template <class T> + const DynamicKernelArgument* DeclRefArg(const ScCalcConfig& config, const FormulaTreeNodeRef&, + SlidingFunctionBase* pCodeGen, int nResultSize); /// Used to generate sliding window helpers void DumpSlidingWindowFunctions( std::stringstream& ss ) { @@ -1211,10 +1213,11 @@ template<class Base> class ParallelReductionVectorRef : public Base { public: - ParallelReductionVectorRef( const ScCalcConfig& config, const std::string& s, - FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen, - int index ) : - Base(config, s, ft, index), mpCodeGen(CodeGen) + ParallelReductionVectorRef(const ScCalcConfig& config, const std::string& s, + const FormulaTreeNodeRef& ft, + std::shared_ptr<SlidingFunctionBase>& CodeGen, int index) + : Base(config, s, ft, index) + , mpCodeGen(CodeGen) { FormulaToken* t = ft->GetFormulaToken(); if (t->GetType() != formula::svDoubleVectorRef) @@ -3544,9 +3547,10 @@ void DynamicKernel::Launch( size_t nr ) // Symbol lookup. If there is no such symbol created, allocate one // kernel with argument with unique name and return so. // The template argument T must be a subclass of DynamicKernelArgument -template<typename T> -const DynamicKernelArgument* SymbolTable::DeclRefArg( const ScCalcConfig& config, - FormulaTreeNodeRef t, SlidingFunctionBase* pCodeGen, int nResultSize ) +template <typename T> +const DynamicKernelArgument* SymbolTable::DeclRefArg(const ScCalcConfig& config, + const FormulaTreeNodeRef& t, + SlidingFunctionBase* pCodeGen, int nResultSize) { FormulaToken* ref = t->GetFormulaToken(); ArgumentMap::iterator it = mSymbols.find(ref); diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 51a63f548afe..89bc5fdf3dcc 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -60,6 +60,7 @@ using ::std::vector; #include <com/sun/star/sheet/FormulaToken.hpp> #include <com/sun/star/sheet/ReferenceFlags.hpp> #include <com/sun/star/sheet/NameToken.hpp> +#include <utility> using namespace formula; using namespace com::sun::star; @@ -939,8 +940,9 @@ bool ScTableRefToken::operator==( const FormulaToken& r ) const return true; } -ScJumpMatrixToken::ScJumpMatrixToken( std::shared_ptr<ScJumpMatrix> p ) - : FormulaToken( formula::svJumpMatrix ), mpJumpMatrix( p ) +ScJumpMatrixToken::ScJumpMatrixToken(std::shared_ptr<ScJumpMatrix> p) + : FormulaToken(formula::svJumpMatrix) + , mpJumpMatrix(std::move(p)) {} ScJumpMatrixToken::ScJumpMatrixToken( const ScJumpMatrixToken & ) = default; diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index 16fc8f3c84f7..3998bba8298a 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -203,7 +203,7 @@ void AddressWalkerWriter::writeValue(double aValue) // DataCellIterator -DataCellIterator::DataCellIterator(ScRange aInputRange, bool aByColumn) +DataCellIterator::DataCellIterator(const ScRange& aInputRange, bool aByColumn) : mInputRange(aInputRange) , mByColumn(aByColumn) , mCol(0) @@ -282,9 +282,9 @@ sal_Int32 DataRangeIterator::index() // DataRangeByColumnIterator -DataRangeByColumnIterator::DataRangeByColumnIterator(ScRange aInputRange) : - DataRangeIterator(aInputRange), - mCol(aInputRange.aStart.Col()) +DataRangeByColumnIterator::DataRangeByColumnIterator(const ScRange& aInputRange) + : DataRangeIterator(aInputRange) + , mCol(aInputRange.aStart.Col()) {} bool DataRangeByColumnIterator::hasNext() @@ -323,9 +323,9 @@ DataCellIterator DataRangeByColumnIterator::iterateCells() // DataRangeByRowIterator -DataRangeByRowIterator::DataRangeByRowIterator(ScRange aInputRange) : - DataRangeIterator(aInputRange), - mRow(aInputRange.aStart.Row()) +DataRangeByRowIterator::DataRangeByRowIterator(const ScRange& aInputRange) + : DataRangeIterator(aInputRange) + , mRow(aInputRange.aStart.Row()) {} bool DataRangeByRowIterator::hasNext() diff --git a/sc/source/ui/dataprovider/csvdataprovider.cxx b/sc/source/ui/dataprovider/csvdataprovider.cxx index c787ee4ce0c6..92176f9a55f6 100644 --- a/sc/source/ui/dataprovider/csvdataprovider.cxx +++ b/sc/source/ui/dataprovider/csvdataprovider.cxx @@ -12,6 +12,7 @@ #include <stringutil.hxx> #include <orcus/csv_parser.hpp> +#include <utility> namespace { @@ -59,15 +60,15 @@ public: } namespace sc { - -CSVFetchThread::CSVFetchThread(ScDocument& rDoc, const OUString& mrURL, std::function<void()> aImportFinishedHdl, - const std::vector<std::shared_ptr<sc::DataTransformation>>& rDataTransformations): - Thread("CSV Fetch Thread"), - mrDocument(rDoc), - maURL (mrURL), - mbTerminate(false), - maDataTransformations(rDataTransformations), - maImportFinishedHdl(aImportFinishedHdl) +CSVFetchThread::CSVFetchThread( + ScDocument& rDoc, const OUString& mrURL, std::function<void()> aImportFinishedHdl, + const std::vector<std::shared_ptr<sc::DataTransformation>>& rDataTransformations) + : Thread("CSV Fetch Thread") + , mrDocument(rDoc) + , maURL(mrURL) + , mbTerminate(false) + , maDataTransformations(rDataTransformations) + , maImportFinishedHdl(std::move(aImportFinishedHdl)) { maConfig.delimiters.push_back(','); maConfig.text_qualifier = '"'; diff --git a/sc/source/ui/dataprovider/dataprovider.cxx b/sc/source/ui/dataprovider/dataprovider.cxx index 353d19d42b76..01408c778fa9 100644 --- a/sc/source/ui/dataprovider/dataprovider.cxx +++ b/sc/source/ui/dataprovider/dataprovider.cxx @@ -163,7 +163,8 @@ void ExternalDataSource::refresh(ScDocument* pDoc, bool bDeterministic) mpDataProvider->Import(); } -void ExternalDataSource::AddDataTransformation(std::shared_ptr<sc::DataTransformation> mpDataTransformation) +void ExternalDataSource::AddDataTransformation( + const std::shared_ptr<sc::DataTransformation>& mpDataTransformation) { maDataTransformations.push_back(mpDataTransformation); } diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx index ff3aab748fa9..0c4e64a83f3e 100644 --- a/sc/source/ui/dataprovider/datatransformation.cxx +++ b/sc/source/ui/dataprovider/datatransformation.cxx @@ -452,17 +452,19 @@ std::set<SCCOL> AggregateFunction::getColumns() const return maColumns; } -NumberTransformation::NumberTransformation(const std::set<SCCOL> nCol, const NUMBER_TRANSFORM_TYPE rType): - mnCol(nCol), - maType(rType), - maPrecision(-1) +NumberTransformation::NumberTransformation(const std::set<SCCOL>& nCol, + const NUMBER_TRANSFORM_TYPE rType) + : mnCol(nCol) + , maType(rType) + , maPrecision(-1) { } -NumberTransformation::NumberTransformation(const std::set<SCCOL> nCol,const NUMBER_TRANSFORM_TYPE rType, int nPrecision): - mnCol(nCol), - maType(rType), - maPrecision(nPrecision) +NumberTransformation::NumberTransformation(const std::set<SCCOL>& nCol, + const NUMBER_TRANSFORM_TYPE rType, int nPrecision) + : mnCol(nCol) + , maType(rType) + , maPrecision(nPrecision) { } @@ -708,9 +710,10 @@ std::set<SCCOL> NumberTransformation::getColumn() const return mnCol; } -ReplaceNullTransformation::ReplaceNullTransformation(const std::set<SCCOL> nCol, const OUString sReplaceWith): - mnCol(nCol), - msReplaceWith(sReplaceWith) +ReplaceNullTransformation::ReplaceNullTransformation(const std::set<SCCOL>& nCol, + const OUString& sReplaceWith) + : mnCol(nCol) + , msReplaceWith(sReplaceWith) { } @@ -757,10 +760,10 @@ TransformationType ReplaceNullTransformation::getTransformationType() const return TransformationType::REMOVE_NULL_TRANSFORMATION; } - -DateTimeTransformation::DateTimeTransformation(const std::set<SCCOL> nCol,const DATETIME_TRANSFORMATION_TYPE rType): - mnCol(nCol), - maType(rType) +DateTimeTransformation::DateTimeTransformation(const std::set<SCCOL>& nCol, + const DATETIME_TRANSFORMATION_TYPE rType) + : mnCol(nCol) + , maType(rType) { } diff --git a/sc/source/ui/dataprovider/htmldataprovider.cxx b/sc/source/ui/dataprovider/htmldataprovider.cxx index b95b448c1989..b83a046f0d36 100644 --- a/sc/source/ui/dataprovider/htmldataprovider.cxx +++ b/sc/source/ui/dataprovider/htmldataprovider.cxx @@ -18,6 +18,7 @@ #include <libxml/xpathInternals.h> #include <comphelper/string.hxx> +#include <utility> namespace sc { @@ -41,14 +42,16 @@ public: virtual void execute() override; }; -HTMLFetchThread::HTMLFetchThread(ScDocument& rDoc, const OUString& rURL, const OUString& rID, std::function<void()> aImportFinishedHdl, - const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations): - salhelper::Thread("HTML Fetch Thread"), - mrDocument(rDoc), - maURL(rURL), - maID(rID), - maDataTransformations(rTransformations), - maImportFinishedHdl(aImportFinishedHdl) +HTMLFetchThread::HTMLFetchThread( + ScDocument& rDoc, const OUString& rURL, const OUString& rID, + std::function<void()> aImportFinishedHdl, + const std::vector<std::shared_ptr<sc::DataTransformation>>& rTransformations) + : salhelper::Thread("HTML Fetch Thread") + , mrDocument(rDoc) + , maURL(rURL) + , maID(rID) + , maDataTransformations(rTransformations) + , maImportFinishedHdl(std::move(aImportFinishedHdl)) { } diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx b/sc/source/ui/dataprovider/xmldataprovider.cxx index 43fb36cf79b1..95c5e467e1f2 100644 --- a/sc/source/ui/dataprovider/xmldataprovider.cxx +++ b/sc/source/ui/dataprovider/xmldataprovider.cxx @@ -14,6 +14,7 @@ #include <filter.hxx> #include <document.hxx> #include <orcusfilters.hxx> +#include <utility> using namespace com::sun::star; @@ -46,7 +47,7 @@ XMLFetchThread::XMLFetchThread( , maID(rID) , maParam(rParam) , maDataTransformations(rTransformations) - , maImportFinishedHdl(aImportFinishedHdl) + , maImportFinishedHdl(std::move(aImportFinishedHdl)) { } diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx index 073c89d98b0d..c52cf2838fb0 100644 --- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx +++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx @@ -101,7 +101,7 @@ private: SCROW mRow; public: - DataCellIterator(ScRange aInputRange, bool aByColumn); + DataCellIterator(const ScRange& aInputRange, bool aByColumn); ~DataCellIterator(); bool hasNext(); @@ -136,7 +136,7 @@ class DataRangeByColumnIterator final : public DataRangeIterator SCCOL mCol; public: - DataRangeByColumnIterator(ScRange aInputRange); + DataRangeByColumnIterator(const ScRange& aInputRange); virtual bool hasNext() override; virtual void next() override; @@ -151,7 +151,7 @@ class DataRangeByRowIterator final : public DataRangeIterator SCROW mRow; public: - DataRangeByRowIterator(ScRange aInputRange); + DataRangeByRowIterator(const ScRange& aInputRange); virtual bool hasNext() override; virtual void next() override; diff --git a/sc/source/ui/inc/datatransformation.hxx b/sc/source/ui/inc/datatransformation.hxx index 4d68046ffd85..a8c54dabbd59 100644 --- a/sc/source/ui/inc/datatransformation.hxx +++ b/sc/source/ui/inc/datatransformation.hxx @@ -145,13 +145,14 @@ class SC_DLLPUBLIC NumberTransformation : public DataTransformation int maPrecision; public: - NumberTransformation(const std::set<SCCOL> nCol, const NUMBER_TRANSFORM_TYPE rType); - NumberTransformation(const std::set<SCCOL> nCol, const NUMBER_TRANSFORM_TYPE rType, int nPrecision); - virtual void Transform(ScDocument& rDoc) const override; - virtual TransformationType getTransformationType() const override; - NUMBER_TRANSFORM_TYPE getNumberTransfromationType() const; - int getPrecision() const; - std::set<SCCOL> getColumn() const; + NumberTransformation(const std::set<SCCOL>& nCol, const NUMBER_TRANSFORM_TYPE rType); + NumberTransformation(const std::set<SCCOL>& nCol, const NUMBER_TRANSFORM_TYPE rType, + int nPrecision); + virtual void Transform(ScDocument& rDoc) const override; + virtual TransformationType getTransformationType() const override; + NUMBER_TRANSFORM_TYPE getNumberTransfromationType() const; + int getPrecision() const; + std::set<SCCOL> getColumn() const; }; class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation @@ -160,11 +161,11 @@ class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation OUString msReplaceWith; public: - ReplaceNullTransformation(const std::set<SCCOL> nCol, const OUString sReplaceWith); - virtual void Transform(ScDocument& rDoc) const override; - virtual TransformationType getTransformationType() const override; - std::set<SCCOL> getColumn() const; - OUString getReplaceString() const; + ReplaceNullTransformation(const std::set<SCCOL>& nCol, const OUString& sReplaceWith); + virtual void Transform(ScDocument& rDoc) const override; + virtual TransformationType getTransformationType() const override; + std::set<SCCOL> getColumn() const; + OUString getReplaceString() const; }; class SC_DLLPUBLIC DateTimeTransformation : public DataTransformation @@ -173,11 +174,12 @@ class SC_DLLPUBLIC DateTimeTransformation : public DataTransformation DATETIME_TRANSFORMATION_TYPE maType; public: - DateTimeTransformation(const std::set<SCCOL> nCol, const DATETIME_TRANSFORMATION_TYPE rType); - virtual void Transform(ScDocument& rDoc) const override; - virtual TransformationType getTransformationType() const override; - DATETIME_TRANSFORMATION_TYPE getDateTimeTransfromationType() const; - std::set<SCCOL> getColumn() const; + DateTimeTransformation(const std::set<SCCOL>& nCol, + const DATETIME_TRANSFORMATION_TYPE rType); + virtual void Transform(ScDocument& rDoc) const override; + virtual TransformationType getTransformationType() const override; + DATETIME_TRANSFORMATION_TYPE getDateTimeTransfromationType() const; + std::set<SCCOL> getColumn() const; }; } diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index 99e2d1ff988b..0eb80137c926 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -139,11 +139,11 @@ private: class ScUndoCut: public ScBlockUndo { public: - ScUndoCut( ScDocShell* pNewDocShell, - ScRange aRange, // adjusted for merged cells - const ScAddress& aOldEnd, // end position without adjustment - const ScMarkData& rMark, // selected sheets - ScDocumentUniquePtr pNewUndoDoc ); + ScUndoCut(ScDocShell* pNewDocShell, + const ScRange& aRange, // adjusted for merged cells + const ScAddress& aOldEnd, // end position without adjustment + const ScMarkData& rMark, // selected sheets + ScDocumentUniquePtr pNewUndoDoc); virtual ~ScUndoCut() override; virtual void Undo() override; diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx index b637c5d4770d..85cdd20e29cd 100644 --- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx +++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx @@ -16,6 +16,7 @@ #include <comphelper/string.hxx> #include <sal/log.hxx> +#include <utility> #include <vcl/lstbox.hxx> constexpr int MENU_START = 0; @@ -267,10 +268,11 @@ public: DECL_LINK(DeleteHdl, Button*, void); }; -ScDeleteColumnTransformationControl::ScDeleteColumnTransformationControl(vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation): - ScDataTransformationBaseControl(pParent, "modules/scalc/ui/deletecolumnentry.ui"), - maIndex(aIndex), - maDeleteTransformation(aDeleteTransformation) +ScDeleteColumnTransformationControl::ScDeleteColumnTransformationControl( + vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation) + : ScDataTransformationBaseControl(pParent, "modules/scalc/ui/deletecolumnentry.ui") + , maIndex(aIndex) + , maDeleteTransformation(std::move(aDeleteTransformation)) { get(maColumnNums, "ed_columns"); get(maDelete, "ed_delete"); @@ -331,11 +333,13 @@ public: DECL_LINK(DeleteHdl, Button*, void); }; -ScSplitColumnTransformationControl::ScSplitColumnTransformationControl(vcl::Window* pParent, SCCOL nCol, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation): - ScDataTransformationBaseControl(pParent, "modules/scalc/ui/splitcolumnentry.ui"), - mnCol(nCol), - maIndex(aIndex), - maDeleteTransformation(aDeleteTransformation) +ScSplitColumnTransformationControl::ScSplitColumnTransformationControl( + vcl::Window* pParent, SCCOL nCol, sal_uInt32 aIndex, + std::function<void(sal_uInt32&)> aDeleteTransformation) + : ScDataTransformationBaseControl(pParent, "modules/scalc/ui/splitcolumnentry.ui") + , mnCol(nCol) + , maIndex(aIndex) + , maDeleteTransformation(std::move(aDeleteTransformation)) { get(maSeparator, "ed_separator"); get(maNumColumns, "num_cols"); @@ -383,10 +387,12 @@ public: DECL_LINK(DeleteHdl, Button*, void); }; -ScMergeColumnTransformationControl::ScMergeColumnTransformationControl(vcl::Window* pParent, SCCOL nStartCol, SCCOL nEndCol, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation): - ScDataTransformationBaseControl(pParent, "modules/scalc/ui/mergecolumnentry.ui"), - maIndex(aIndex), - maDeleteTransformation(aDeleteTransformation) +ScMergeColumnTransformationControl::ScMergeColumnTransformationControl( + vcl::Window* pParent, SCCOL nStartCol, SCCOL nEndCol, sal_uInt32 aIndex, + std::function<void(sal_uInt32&)> aDeleteTransformation) + : ScDataTransformationBaseControl(pParent, "modules/scalc/ui/mergecolumnentry.ui") + , maIndex(aIndex) + , maDeleteTransformation(std::move(aDeleteTransformation)) { get(mpSeparator, "ed_separator"); get(mpEdColumns, "ed_columns"); @@ -459,10 +465,11 @@ public: DECL_LINK(DeleteHdl, Button*, void); }; -ScSortTransformationControl::ScSortTransformationControl(vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation): - ScDataTransformationBaseControl(pParent, "modules/scalc/ui/sorttransformationentry.ui"), - maIndex(aIndex), - maDeleteTransformation(aDeleteTransformation) +ScSortTransformationControl::ScSortTransformationControl( + vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation) + : ScDataTransformationBaseControl(pParent, "modules/scalc/ui/sorttransformationentry.ui") + , maIndex(aIndex) + , maDeleteTransformation(std::move(aDeleteTransformation)) { get(mpAscending, "ed_ascending"); get(mpEdColumns, "ed_columns"); @@ -522,10 +529,11 @@ public: DECL_LINK(DeleteHdl, Button*, void); }; -ScColumnTextTransformation::ScColumnTextTransformation(vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation): - ScDataTransformationBaseControl(pParent,"modules/scalc/ui/texttransformationentry.ui"), - maIndex(aIndex), - maDeleteTransformation(aDeleteTransformation) +ScColumnTextTransformation::ScColumnTextTransformation( + vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation) + : ScDataTransformationBaseControl(pParent, "modules/scalc/ui/texttransformationentry.ui") + , maIndex(aIndex) + , maDeleteTransformation(std::move(aDeleteTransformation)) { get(maColumnNums, "ed_columns"); get(maType, "ed_lst"); @@ -602,10 +610,11 @@ public: DECL_LINK(DeleteHdl, Button*, void); }; -ScAggregateFunction::ScAggregateFunction(vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation): - ScDataTransformationBaseControl(pParent,"modules/scalc/ui/aggregatefunctionentry.ui"), - maIndex(aIndex), - maDeleteTransformation(aDeleteTransformation) +ScAggregateFunction::ScAggregateFunction(vcl::Window* pParent, sal_uInt32 aIndex, + std::function<void(sal_uInt32&)> aDeleteTransformation) + : ScDataTransformationBaseControl(pParent, "modules/scalc/ui/aggregatefunctionentry.ui") + , maIndex(aIndex) + , maDeleteTransformation(std::move(aDeleteTransformation)) { get(maColumnNums, "ed_columns"); get(maType, "ed_lst"); @@ -681,10 +690,11 @@ public: DECL_LINK(DeleteHdl, Button*, void); }; -ScNumberTransformation::ScNumberTransformation(vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation): - ScDataTransformationBaseControl(pParent,"modules/scalc/ui/numbertransformationentry.ui"), - maIndex(aIndex), - maDeleteTransformation(aDeleteTransformation) +ScNumberTransformation::ScNumberTransformation( + vcl::Window* pParent, sal_uInt32 aIndex, std::function<void(sal_uInt32&)> aDeleteTransformation) + : ScDataTransformationBaseControl(pParent, "modules/scalc/ui/numbertransformationentry.ui") + , maIndex(aIndex) + , maDeleteTransformation(std::move(aDeleteTransformation)) { get(maColumnNums, "ed_columns"); get(maType, "ed_lst"); @@ -826,10 +836,11 @@ std::shared_ptr<sc::DataTransformation> ScReplaceNullTransformation::getTransfor } -ScDataProviderDlg::ScDataProviderDlg(vcl::Window* pParent, std::shared_ptr<ScDocument> pDoc, ScDocument* pDocument): - ModalDialog(pParent, "dataproviderdlg", "modules/scalc/ui/dataproviderdlg.ui", true), - mpDoc(pDoc), - mpBar(VclPtr<MenuBar>::Create()) +ScDataProviderDlg::ScDataProviderDlg(vcl::Window* pParent, std::shared_ptr<ScDocument> pDoc, + ScDocument* pDocument) + : ModalDialog(pParent, "dataproviderdlg", "modules/scalc/ui/dataproviderdlg.ui", true) + , mpDoc(std::move(pDoc)) + , mpBar(VclPtr<MenuBar>::Create()) { get(mpTable, "data_table"); get(mpList, "operation_ctrl"); diff --git a/sc/source/ui/miscdlgs/datatableview.cxx b/sc/source/ui/miscdlgs/datatableview.cxx index 05dacaf2e2a8..174342653d93 100644 --- a/sc/source/ui/miscdlgs/datatableview.cxx +++ b/sc/source/ui/miscdlgs/datatableview.cxx @@ -20,6 +20,7 @@ #include <datatableview.hxx> #include <document.hxx> +#include <utility> #include <viewdata.hxx> #include <output.hxx> #include <fillinfo.hxx> @@ -165,7 +166,7 @@ ScDataTableView::ScDataTableView(vcl::Window* pParent): void ScDataTableView::Init(std::shared_ptr<ScDocument> pDoc) { - mpDoc = pDoc; + mpDoc = std::move(pDoc); mpColView->Init(mpDoc.get()); mpRowView->Init(mpDoc.get()); } diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index 07ff4ff622b8..ce81044707a0 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -799,13 +799,12 @@ bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr; } -ScUndoCut::ScUndoCut( ScDocShell* pNewDocShell, - ScRange aRange, const ScAddress& aOldEnd, const ScMarkData& rMark, - ScDocumentUniquePtr pNewUndoDoc ) : - ScBlockUndo( pNewDocShell, ScRange(aRange.aStart, aOldEnd), SC_UNDO_AUTOHEIGHT ), - aMarkData( rMark ), - pUndoDoc( std::move(pNewUndoDoc) ), - aExtendedRange( aRange ) +ScUndoCut::ScUndoCut(ScDocShell* pNewDocShell, const ScRange& aRange, const ScAddress& aOldEnd, + const ScMarkData& rMark, ScDocumentUniquePtr pNewUndoDoc) + : ScBlockUndo(pNewDocShell, ScRange(aRange.aStart, aOldEnd), SC_UNDO_AUTOHEIGHT) + , aMarkData(rMark) + , pUndoDoc(std::move(pNewUndoDoc)) + , aExtendedRange(aRange) { SetChangeTrack(); } diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx index 91dc355b8cc7..4d2bbad231f2 100644 --- a/sd/inc/CustomAnimationEffect.hxx +++ b/sd/inc/CustomAnimationEffect.hxx @@ -307,7 +307,9 @@ public: // text group methods SAL_DLLPRIVATE CustomAnimationTextGroupPtr findGroup( sal_Int32 nGroupId ); - CustomAnimationTextGroupPtr createTextGroup( CustomAnimationEffectPtr pEffect, sal_Int32 nTextGrouping, double fTextGroupingAuto, bool bAnimateForm, bool bTextReverse ); + CustomAnimationTextGroupPtr createTextGroup(const CustomAnimationEffectPtr& pEffect, + sal_Int32 nTextGrouping, double fTextGroupingAuto, + bool bAnimateForm, bool bTextReverse); SAL_DLLPRIVATE void setTextGrouping( const CustomAnimationTextGroupPtr& pTextGroup, sal_Int32 nTextGrouping ); SAL_DLLPRIVATE void setAnimateForm( const CustomAnimationTextGroupPtr& pTextGroup, bool bAnimateForm ); SAL_DLLPRIVATE void setTextGroupingAuto( const CustomAnimationTextGroupPtr& pTextGroup, double fTextGroupingAuto ); diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 3e5bd8ef3bfb..e34de2d9d141 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -168,8 +168,8 @@ public: namespace { - -uno::Reference<awt::XBitmap> getBitmapFromTable(sd::DrawDocShellRef xDocShRef, OUString const & rName) +uno::Reference<awt::XBitmap> getBitmapFromTable(const sd::DrawDocShellRef& xDocShRef, + OUString const& rName) { uno::Reference<awt::XBitmap> xBitmap; diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 964ec585865e..f10210ca9c72 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -2331,7 +2331,10 @@ void EffectSequenceHelper::updateTextGroups() } } -CustomAnimationTextGroupPtr EffectSequenceHelper::createTextGroup( CustomAnimationEffectPtr pEffect, sal_Int32 nTextGrouping, double fTextGroupingAuto, bool bAnimateForm, bool bTextReverse ) +CustomAnimationTextGroupPtr +EffectSequenceHelper::createTextGroup(const CustomAnimationEffectPtr& pEffect, + sal_Int32 nTextGrouping, double fTextGroupingAuto, + bool bAnimateForm, bool bTextReverse) { // first finde a free group-id sal_Int32 nGroupId = 0; diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index 4f1a1540da20..2e2c6a8ad844 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -92,8 +92,8 @@ private: virtual void ImplWriteNotes( sal_uInt32 nPageNum ) override; virtual void ImplWriteSlideMaster( sal_uInt32 nPageNum, css::uno::Reference< css::beans::XPropertySet > const & aXBackgroundPropSet ) override; void ImplWritePPTXLayout( sal_Int32 nOffset, sal_uInt32 nMasterNum ); - bool WriteColorSchemes(FSHelperPtr pFS, const OUString& rThemePath); - void WriteDefaultColorSchemes(FSHelperPtr pFS); + bool WriteColorSchemes(const FSHelperPtr& pFS, const OUString& rThemePath); + void WriteDefaultColorSchemes(const FSHelperPtr& pFS); void WriteTheme( sal_Int32 nThemeNum ); virtual bool ImplCreateDocument() override; diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index e625a98da656..6cb4c8c41a73 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -1682,7 +1682,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap </a:bgFillStyleLst>\ </a:fmtScheme>" -void PowerPointExport::WriteDefaultColorSchemes(FSHelperPtr pFS) +void PowerPointExport::WriteDefaultColorSchemes(const FSHelperPtr& pFS) { for (int nId = PredefinedClrSchemeId::dk2; nId != PredefinedClrSchemeId::Count; nId++) { @@ -1741,7 +1741,7 @@ void PowerPointExport::WriteDefaultColorSchemes(FSHelperPtr pFS) } } -bool PowerPointExport::WriteColorSchemes(FSHelperPtr pFS, const OUString& rThemePath) +bool PowerPointExport::WriteColorSchemes(const FSHelperPtr& pFS, const OUString& rThemePath) { try { diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 5d1888a60d5c..0da123becf7f 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -3649,12 +3649,11 @@ void SfxMedium::CreateTempFileNoCopy() CloseStorage(); } -bool SfxMedium::SignContents_Impl(bool bSignScriptingContent, - bool bHasValidDocumentSignature, +bool SfxMedium::SignContents_Impl(bool bSignScriptingContent, bool bHasValidDocumentSignature, const OUString& aSignatureLineId, - const Reference<XCertificate> xCert, - const Reference<XGraphic> xValidGraphic, - const Reference<XGraphic> xInvalidGraphic, + const Reference<XCertificate>& xCert, + const Reference<XGraphic>& xValidGraphic, + const Reference<XGraphic>& xInvalidGraphic, const OUString& aComment) { bool bChanges = false; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 1755be26b741..b3db07931fbc 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1609,9 +1609,9 @@ void SfxObjectShell::SignDocumentContent(weld::Window* pDialogParent) void SfxObjectShell::SignSignatureLine(weld::Window* pDialogParent, const OUString& aSignatureLineId, - const Reference<XCertificate> xCert, - const Reference<XGraphic> xValidGraphic, - const Reference<XGraphic> xInvalidGraphic, + const Reference<XCertificate>& xCert, + const Reference<XGraphic>& xValidGraphic, + const Reference<XGraphic>& xInvalidGraphic, const OUString& aComment) { if (!PrepareForSigning(pDialogParent)) diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index b0692592213a..13617fb279df 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -785,9 +785,9 @@ public: /// Is hyphenation active somewhere else? static bool HasHyphIter(); - void HandleCorrectionError( const OUString aText, SwPosition aPos, - sal_Int32 nBegin, sal_Int32 nLen, SwPaM* pCursor, - const Point* pPt, SwRect& rSelectRect ); + void HandleCorrectionError(const OUString& aText, SwPosition aPos, sal_Int32 nBegin, + sal_Int32 nLen, SwPaM* pCursor, const Point* pPt, + SwRect& rSelectRect); css::uno::Reference< css::linguistic2::XSpellAlternatives > GetCorrection( const Point* pPt, SwRect& rSelectRect ); diff --git a/sw/inc/swscanner.hxx b/sw/inc/swscanner.hxx index 70793def9257..de273d679b8b 100644 --- a/sw/inc/swscanner.hxx +++ b/sw/inc/swscanner.hxx @@ -47,12 +47,9 @@ class SwScanner bool m_bClip; public: - SwScanner( std::function<LanguageType (sal_Int32, sal_Int32, bool)> pGetLangOfChar, - const OUString& rText, - const LanguageType* pLang, - const ModelToViewHelper& rConvMap, - sal_uInt16 nWordType, - sal_Int32 nStart, sal_Int32 nEnde, bool bClip = false ); + SwScanner(const std::function<LanguageType(sal_Int32, sal_Int32, bool)>& pGetLangOfChar, + const OUString& rText, const LanguageType* pLang, const ModelToViewHelper& rConvMap, + sal_uInt16 nWordType, sal_Int32 nStart, sal_Int32 nEnde, bool bClip = false); SwScanner( const SwTextNode& rNd, const OUString& rText, const LanguageType* pLang, const ModelToViewHelper& rConvMap, diff --git a/sw/qa/extras/accessibility/accessible_relation_set.cxx b/sw/qa/extras/accessibility/accessible_relation_set.cxx index bb283698ad02..68eb27c17ec1 100644 --- a/sw/qa/extras/accessibility/accessible_relation_set.cxx +++ b/sw/qa/extras/accessibility/accessible_relation_set.cxx @@ -43,13 +43,13 @@ class AccessibilityTools { public: static css::uno::Reference<css::accessibility::XAccessibleContext> - getAccessibleObjectForRole(css::uno::Reference<css::accessibility::XAccessible> xacc, + getAccessibleObjectForRole(const css::uno::Reference<css::accessibility::XAccessible>& xacc, sal_Int16 role); }; css::uno::Reference<css::accessibility::XAccessibleContext> AccessibilityTools::getAccessibleObjectForRole( - css::uno::Reference<css::accessibility::XAccessible> xacc, sal_Int16 role) + const css::uno::Reference<css::accessibility::XAccessible>& xacc, sal_Int16 role) { css::uno::Reference<css::accessibility::XAccessibleContext> ac = xacc->getAccessibleContext(); bool isShowing = ac->getAccessibleStateSet()->contains(AccessibleStateType::SHOWING); diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 43ec52565128..4666ca93aaf0 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -56,6 +56,7 @@ #include <sfx2/classificationhelper.hxx> #include <svx/ClassificationCommon.hxx> #include <svl/cryptosign.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -1269,7 +1270,7 @@ void SwEditShell::ApplyParagraphClassification(std::vector<svx::ClassificationRe uno::Reference<frame::XModel> xModel = pDocShell->GetBaseModel(); uno::Reference<text::XTextContent> xParent = SwXParagraph::CreateXParagraph(*pNode->GetDoc(), pNode); - lcl_ApplyParagraphClassification(GetDoc(), xModel, xParent, aResults); + lcl_ApplyParagraphClassification(GetDoc(), xModel, xParent, std::move(aResults)); } std::vector<svx::ClassificationResult> lcl_CollectParagraphClassification(const uno::Reference<frame::XModel>& xModel, const uno::Reference<text::XTextContent>& xParagraph) diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 13187c6889d4..c6a28d3162e2 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -814,10 +814,9 @@ void SwEditShell::HyphIgnore() g_pHyphIter->ShowSelection(); } -void SwEditShell::HandleCorrectionError( - const OUString aText, SwPosition aPos, sal_Int32 nBegin, - sal_Int32 nLen, SwPaM* pCursor, - const Point* pPt, SwRect& rSelectRect ) +void SwEditShell::HandleCorrectionError(const OUString& aText, SwPosition aPos, sal_Int32 nBegin, + sal_Int32 nLen, SwPaM* pCursor, const Point* pPt, + SwRect& rSelectRect) { // save the start and end positions of the line and the starting point Push(); diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 5756edf07e43..e761e259b326 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -273,7 +273,7 @@ public: void adaptFrameAreasToTransformations(); // Modify current definitions by applying the given transformation - void transform(const basegfx::B2DHomMatrix aTransform); + void transform(const basegfx::B2DHomMatrix& aTransform); }; /** diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 0b76176ff7aa..613bd5d6a73f 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -466,7 +466,7 @@ static void lcl_Padded(OStringBuffer& rOut, const long n, size_t length = 5) } /// output the frame as plain text. -static void lcl_FrameRect(OStringBuffer& rOut, const char* hint, const SwRect rect) +static void lcl_FrameRect(OStringBuffer& rOut, const char* hint, const SwRect& rect) { rOut.append("["); rOut.append(hint); diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index bc41904eea2c..42b6fb90d0cd 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -272,7 +272,7 @@ void TransformableSwFrame::restoreFrameAreas() } // transform by given B2DHomMatrix -void TransformableSwFrame::transform(const basegfx::B2DHomMatrix aTransform) +void TransformableSwFrame::transform(const basegfx::B2DHomMatrix& aTransform) { maFrameAreaTransformation *= aTransform; maFramePrintAreaTransformation *= aTransform; diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 19a239c7cca8..46fe039ee514 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -738,19 +738,18 @@ SwScanner::SwScanner( const SwTextNode& rNd, const OUString& rText, { } -SwScanner::SwScanner( - std::function<LanguageType (sal_Int32, sal_Int32, bool)> const pGetLangOfChar, - const OUString& rText, - const LanguageType* pLang, const ModelToViewHelper& rConvMap, - sal_uInt16 nType, sal_Int32 nStart, sal_Int32 nEnde, bool bClp ) - : m_pGetLangOfChar( pGetLangOfChar ) +SwScanner::SwScanner(std::function<LanguageType(sal_Int32, sal_Int32, bool)> const& pGetLangOfChar, + const OUString& rText, const LanguageType* pLang, + const ModelToViewHelper& rConvMap, sal_uInt16 nType, sal_Int32 nStart, + sal_Int32 nEnde, bool bClp) + : m_pGetLangOfChar(pGetLangOfChar) , m_aPreDashReplacementText(rText) - , m_pLanguage( pLang ) - , m_ModelToView( rConvMap ) - , m_nLength( 0 ) - , m_nOverriddenDashCount( 0 ) - , m_nWordType( nType ) - , m_bClip( bClp ) + , m_pLanguage(pLang) + , m_ModelToView(rConvMap) + , m_nLength(0) + , m_nOverriddenDashCount(0) + , m_nWordType(nType) + , m_bClip(bClp) { m_nStartPos = m_nBegin = nStart; m_nEndPos = nEnde; diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index e5a8b05e993b..90587f8c3cff 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -20,6 +20,7 @@ #include <hintids.hxx> #include <com/sun/star/i18n/ScriptType.hpp> #include <comphelper/string.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> #include <svtools/htmlout.hxx> @@ -1569,16 +1570,15 @@ const SwHTMLFormatInfo *HTMLEndPosLst::GetFormatInfo( const SwFormat& rFormat, return pFormatInfo; } -HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl, - boost::optional<Color> xDfltCol, bool bStyles, - sal_uLong nMode, const OUString& rText, - std::set<OUString>& rStyles ): - pDoc( pD ), - pTemplate( pTempl ), - xDfltColor( xDfltCol ), - rScriptTextStyles( rStyles ), - nHTMLMode( nMode ), - bOutStyles( bStyles ) +HTMLEndPosLst::HTMLEndPosLst(SwDoc* pD, SwDoc* pTempl, boost::optional<Color> xDfltCol, + bool bStyles, sal_uLong nMode, const OUString& rText, + std::set<OUString>& rStyles) + : pDoc(pD) + , pTemplate(pTempl) + , xDfltColor(std::move(xDfltCol)) + , rScriptTextStyles(rStyles) + , nHTMLMode(nMode) + , bOutStyles(bStyles) { sal_Int32 nEndPos = rText.getLength(); sal_Int32 nPos = 0; diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 1b96c9aab0cb..778446e79c36 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -1046,8 +1046,9 @@ public: void StartCommentOutput( const OUString& rName ); void EndCommentOutput( const OUString& rName ); void OutGrf(const ww8::Frame &rFrame); - bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const & xOleStg, - tools::SvRef<SotStorage> xObjStg, OUString const &rStorageName, SwOLENode *pOLENd); + bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg, + const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName, + SwOLENode* pOLENd); virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) override; virtual void AppendBookmark( const OUString& rName ) override; diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx index e1db0e0a33e8..3bb894d99ad2 100644 --- a/sw/source/filter/ww8/wrtww8gr.cxx +++ b/sw/source/filter/ww8/wrtww8gr.cxx @@ -92,9 +92,9 @@ void WW8Export::OutputGrfNode( const SwGrfNode& /*rNode*/ ) } } -bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, - tools::SvRef<SotStorage> const & xOleStg, tools::SvRef<SotStorage> xObjStg, OUString const &rStorageName, - SwOLENode *pOLENd) +bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg, + const tools::SvRef<SotStorage>& xObjStg, + OUString const& rStorageName, SwOLENode* pOLENd) { bool bGraphicNeeded = false; SfxItemIter aIter( rSet ); diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 64c49ba6c5a1..38bdcaa078c6 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1886,8 +1886,8 @@ public: // really private, but can only be done public static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc); static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67); - static bool ImportOleWMF( tools::SvRef<SotStorage> xSrc1, GDIMetaFile &rWMF, - long &rX, long &rY); + static bool ImportOleWMF(const tools::SvRef<SotStorage>& xSrc1, GDIMetaFile& rWMF, long& rX, + long& rY); static Color GetCol(sal_uInt8 nIco); SwWW8ImplReader( sal_uInt8 nVersionPara, SotStorage* pStorage, SvStream* pSt, diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index b22115331faf..1a7370f03da9 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -309,8 +309,8 @@ SwFrameFormat* SwWW8ImplReader::ImportOle(const Graphic* pGrf, return pFormat; } -bool SwWW8ImplReader::ImportOleWMF(tools::SvRef<SotStorage> xSrc1,GDIMetaFile &rWMF, - long &rX,long &rY) +bool SwWW8ImplReader::ImportOleWMF(const tools::SvRef<SotStorage>& xSrc1, GDIMetaFile& rWMF, + long& rX, long& rY) { bool bOk = false; OLE_MFP aMfp; diff --git a/sw/source/uibase/docvw/PageBreakWin.cxx b/sw/source/uibase/docvw/PageBreakWin.cxx index 7d68143d0acb..87f2b1fb442f 100644 --- a/sw/source/uibase/docvw/PageBreakWin.cxx +++ b/sw/source/uibase/docvw/PageBreakWin.cxx @@ -323,7 +323,7 @@ void SwPageBreakWin::Activate( ) MenuButton::Activate(); } -void SwPageBreakWin::UpdatePosition( boost::optional<Point> xEvtPt ) +void SwPageBreakWin::UpdatePosition(const boost::optional<Point>& xEvtPt) { if ( xEvtPt ) { diff --git a/sw/source/uibase/inc/PageBreakWin.hxx b/sw/source/uibase/inc/PageBreakWin.hxx index 5b84ee1d8a6a..e51766641b7c 100644 --- a/sw/source/uibase/inc/PageBreakWin.hxx +++ b/sw/source/uibase/inc/PageBreakWin.hxx @@ -44,7 +44,7 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Activate( ) override; - void UpdatePosition( boost::optional<Point> xEvtPt = boost::optional<Point>() ); + void UpdatePosition(const boost::optional<Point>& xEvtPt = boost::optional<Point>()); virtual void ShowAll( bool bShow ) override; virtual bool Contains( const Point &rDocPt ) const override; diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx index c3e314e49ed4..cae81afa77a3 100644 --- a/test/source/xmltesttools.cxx +++ b/test/source/xmltesttools.cxx @@ -105,8 +105,8 @@ void XmlTestTools::assertXPath(xmlDocPtr pXmlDoc, const OString& rXPath, const O rExpectedValue, aValue); } - -void XmlTestTools::assertXPathAttrs(xmlDocPtr pXmlDoc, const OString& rXPath, std::vector<std::pair<OString, OUString>> aPairVector) +void XmlTestTools::assertXPathAttrs(xmlDocPtr pXmlDoc, const OString& rXPath, + const std::vector<std::pair<OString, OUString>>& aPairVector) { for (auto& rPair : aPairVector) { diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx index 61aedee7e6e4..3deae82288b9 100644 --- a/tools/source/xml/XmlWalker.cxx +++ b/tools/source/xml/XmlWalker.cxx @@ -89,7 +89,7 @@ void XmlWalker::parent() mpImpl->mpStack.pop_back(); } -OString XmlWalker::attribute(OString sName) +OString XmlWalker::attribute(const OString& sName) { xmlChar* xmlName = xmlCharStrdup(sName.getStr()); xmlChar* xmlAttribute = xmlGetProp(mpImpl->mpCurrent, xmlName); diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx index 474942bb6040..71ca460b160e 100644 --- a/ucb/source/ucp/file/filtask.cxx +++ b/ucb/source/ucp/file/filtask.cxx @@ -2619,9 +2619,8 @@ TaskManager::getContentDeletedEventListeners( const OUString& aName ) return listeners; } - -void -TaskManager::notifyInsert( std::vector< std::unique_ptr<ContentEventNotifier> > listeners, const OUString& aChildName ) +void TaskManager::notifyInsert(const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners, + const OUString& aChildName) { for (const auto & l : listeners ) { @@ -2629,9 +2628,8 @@ TaskManager::notifyInsert( std::vector< std::unique_ptr<ContentEventNotifier> > } } - -void -TaskManager::notifyContentDeleted( std::vector< std::unique_ptr< ContentEventNotifier> > listeners ) +void TaskManager::notifyContentDeleted( + const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners) { for( auto const & l : listeners ) { @@ -2639,10 +2637,8 @@ TaskManager::notifyContentDeleted( std::vector< std::unique_ptr< ContentEventNot } } - -void -TaskManager::notifyContentRemoved( std::vector< std::unique_ptr<ContentEventNotifier> > listeners, - const OUString& aChildName ) +void TaskManager::notifyContentRemoved( + const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners, const OUString& aChildName) { for( auto const & l : listeners ) { @@ -2672,10 +2668,9 @@ TaskManager::getPropertySetListeners( const OUString& aName ) return listeners; } - -void -TaskManager::notifyPropertyAdded( std::vector< std::unique_ptr< PropertySetInfoChangeNotifier > > listeners, - const OUString& aPropertyName ) +void TaskManager::notifyPropertyAdded( + const std::vector<std::unique_ptr<PropertySetInfoChangeNotifier>>& listeners, + const OUString& aPropertyName) { for( auto const & l : listeners ) { @@ -2683,10 +2678,9 @@ TaskManager::notifyPropertyAdded( std::vector< std::unique_ptr< PropertySetInfoC } } - -void -TaskManager::notifyPropertyRemoved( std::vector< std::unique_ptr< PropertySetInfoChangeNotifier > > listeners, - const OUString& aPropertyName ) +void TaskManager::notifyPropertyRemoved( + const std::vector<std::unique_ptr<PropertySetInfoChangeNotifier>>& listeners, + const OUString& aPropertyName) { for( auto const & l : listeners ) { @@ -2781,9 +2775,8 @@ TaskManager::getContentExchangedEventListeners( const OUString& aOldPrefix, return aVector; } - -void -TaskManager::notifyContentExchanged( std::vector< std::unique_ptr< ContentEventNotifier > > listeners_vec ) +void TaskManager::notifyContentExchanged( + const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners_vec) { for( auto & l : listeners_vec) { @@ -2813,9 +2806,9 @@ TaskManager::getPropertyChangeNotifier( const OUString& aName ) return listeners; } - -void TaskManager::notifyPropertyChanges( std::vector< std::unique_ptr< PropertyChangeNotifier > > listeners, - const uno::Sequence< beans::PropertyChangeEvent >& seqChanged ) +void TaskManager::notifyPropertyChanges( + const std::vector<std::unique_ptr<PropertyChangeNotifier>>& listeners, + const uno::Sequence<beans::PropertyChangeEvent>& seqChanged) { for( auto const & l : listeners ) { diff --git a/ucb/source/ucp/file/filtask.hxx b/ucb/source/ucp/file/filtask.hxx index 6b151c2d45f3..6b0e5963ad04 100644 --- a/ucb/source/ucp/file/filtask.hxx +++ b/ucb/source/ucp/file/filtask.hxx @@ -536,30 +536,30 @@ namespace fileaccess /********************************************************************************/ static void notifyPropertyChanges( - std::vector< std::unique_ptr< PropertyChangeNotifier > > listeners, - const css::uno::Sequence< css::beans::PropertyChangeEvent >& seqChanged ); + const std::vector<std::unique_ptr<PropertyChangeNotifier>>& listeners, + const css::uno::Sequence<css::beans::PropertyChangeEvent>& seqChanged); static void notifyContentExchanged( - std::vector< std::unique_ptr< ContentEventNotifier > > listeners_vec ); + const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners_vec); - static void notifyInsert( - std::vector< std::unique_ptr< ContentEventNotifier > > listeners, const OUString& aChildName ); + static void + notifyInsert(const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners, + const OUString& aChildName); - static void notifyContentDeleted( - std::vector< std::unique_ptr< ContentEventNotifier > > listeners ); + static void + notifyContentDeleted(const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners); - static void notifyContentRemoved( - std::vector< std::unique_ptr< ContentEventNotifier > > listeners, - const OUString& aChildName ); + static void + notifyContentRemoved(const std::vector<std::unique_ptr<ContentEventNotifier>>& listeners, + const OUString& aChildName); static void notifyPropertyAdded( - std::vector< std::unique_ptr< PropertySetInfoChangeNotifier > > listeners, - const OUString& aPropertyName ); + const std::vector<std::unique_ptr<PropertySetInfoChangeNotifier>>& listeners, + const OUString& aPropertyName); static void notifyPropertyRemoved( - std::vector< std::unique_ptr< PropertySetInfoChangeNotifier > > listeners, - const OUString& aPropertyName ); - + const std::vector<std::unique_ptr<PropertySetInfoChangeNotifier>>& listeners, + const OUString& aPropertyName); /********************************************************************************/ /* remove persistent propertyset */ diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx index c8a029474ae1..c2231b66a2ad 100644 --- a/vcl/backendtest/VisualBackendTest.cxx +++ b/vcl/backendtest/VisualBackendTest.cxx @@ -51,7 +51,8 @@ using namespace css; -void drawBitmapCentered(tools::Rectangle const & rRect, Bitmap aBitmap, vcl::RenderContext& rRenderContext) +void drawBitmapCentered(tools::Rectangle const& rRect, const Bitmap& aBitmap, + vcl::RenderContext& rRenderContext) { long nWidth = rRect.GetWidth(); long nHeight = rRect.GetHeight(); diff --git a/vcl/inc/opengl/LineRenderUtils.hxx b/vcl/inc/opengl/LineRenderUtils.hxx index 1fa4e785d5fe..eec665f68edb 100644 --- a/vcl/inc/opengl/LineRenderUtils.hxx +++ b/vcl/inc/opengl/LineRenderUtils.hxx @@ -39,9 +39,12 @@ public: void appendAndConnectLinePoint(const glm::vec2& rPoint, const glm::vec2& aNormal, GLfloat aExtrusion); - void appendMiterJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 const & nextLineVector); - void appendBevelJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector); - void appendRoundJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector); + void appendMiterJoint(glm::vec2 const& point, const glm::vec2& prevLineVector, + glm::vec2 const& nextLineVector); + void appendBevelJoint(glm::vec2 const& point, const glm::vec2& prevLineVector, + const glm::vec2& nextLineVector); + void appendRoundJoint(glm::vec2 const& point, const glm::vec2& prevLineVector, + const glm::vec2& nextLineVector); void appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2); void appendSquareLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2); }; diff --git a/vcl/inc/unx/cpdmgr.hxx b/vcl/inc/unx/cpdmgr.hxx index 12d6603bfc09..a9caaead9942 100644 --- a/vcl/inc/unx/cpdmgr.hxx +++ b/vcl/inc/unx/cpdmgr.hxx @@ -96,9 +96,9 @@ class CPDManager : public PrinterInfoManager public: #if ENABLE_DBUS && ENABLE_GIO // Functions involved in initialization - GDBusProxy * getProxy( std::string target ); + GDBusProxy* getProxy(const std::string& target); void addBackend( std::pair< std::string, GDBusProxy * > pair ); - void addTempBackend( std::pair< std::string, gchar* > pair ); + void addTempBackend(const std::pair<std::string, gchar*>& pair); std::vector<std::pair<std::string, gchar*>> const & getTempBackends(); void addNewPrinter( const OUString&, const OUString&, CPDPrinter * ); #endif diff --git a/vcl/opengl/LineRenderUtils.cxx b/vcl/opengl/LineRenderUtils.cxx index 6ba78048b9e0..e62d884b3b6e 100644 --- a/vcl/opengl/LineRenderUtils.cxx +++ b/vcl/opengl/LineRenderUtils.cxx @@ -93,7 +93,8 @@ void LineBuilder::appendAndConnectLinePoint(const glm::vec2& rPoint, const glm:: } } -void LineBuilder::appendMiterJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 const & nextLineVector) +void LineBuilder::appendMiterJoint(glm::vec2 const& point, const glm::vec2& prevLineVector, + glm::vec2 const& nextLineVector) { // With miter join we calculate the extrusion vector by adding normals of // previous and next line segment. The vector shows the way but we also @@ -111,7 +112,8 @@ void LineBuilder::appendMiterJoint(glm::vec2 const & point, glm::vec2 prevLineVe appendAndConnectLinePoint(point, extrusionVector, length); } -void LineBuilder::appendBevelJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector) +void LineBuilder::appendBevelJoint(glm::vec2 const& point, const glm::vec2& prevLineVector, + const glm::vec2& nextLineVector) { // For bevel join we just add 2 additional vertices and use previous // line segment normal and next line segment normal as extrusion vector. @@ -125,7 +127,8 @@ void LineBuilder::appendBevelJoint(glm::vec2 const & point, glm::vec2 prevLineVe appendAndConnectLinePoint(point, nextNormal, 1.0f); } -void LineBuilder::appendRoundJoint(glm::vec2 const & point, glm::vec2 prevLineVector, glm::vec2 nextLineVector) +void LineBuilder::appendRoundJoint(glm::vec2 const& point, const glm::vec2& prevLineVector, + const glm::vec2& nextLineVector) { // For round join we do a similar thing as in bevel, we add more intermediate // vertices and add normals to get extrusion vectors in the between the diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index a65a973958dc..2d7b54bfbdca 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -32,6 +32,7 @@ #include <svdata.hxx> #include <messagedialog.hxx> #include <unotools/accessiblerelationsethelper.hxx> +#include <utility> #include <vcl/builder.hxx> #include <vcl/combobox.hxx> #include <vcl/lstbox.hxx> @@ -1875,7 +1876,7 @@ public: , m_xDrawingArea(pDrawingArea) { m_xDrawingArea->SetAccessible(rAlly); - m_xDrawingArea->SetUITestFactory(pUITestFactoryFunction, pUserData); + m_xDrawingArea->SetUITestFactory(std::move(pUITestFactoryFunction), pUserData); m_xDrawingArea->SetPaintHdl(LINK(this, SalInstanceDrawingArea, PaintHdl)); m_xDrawingArea->SetResizeHdl(LINK(this, SalInstanceDrawingArea, ResizeHdl)); m_xDrawingArea->SetMousePressHdl(LINK(this, SalInstanceDrawingArea, MousePressHdl)); diff --git a/vcl/source/control/listctrl.cxx b/vcl/source/control/listctrl.cxx index 97c16db80492..73c6b43c555d 100644 --- a/vcl/source/control/listctrl.cxx +++ b/vcl/source/control/listctrl.cxx @@ -124,7 +124,7 @@ IMPL_LINK_NOARG( ListControl, ScrollHdl, ScrollBar*, void ) DoScroll(mpScrollBar->GetDelta()); } -void ListControl::addEntry(VclPtr<Window> xEntry, sal_uInt32 nPos) +void ListControl::addEntry(const VclPtr<Window>& xEntry, sal_uInt32 nPos) { xEntry->Show(); if (nPos < maEntries.size()) diff --git a/vcl/source/font/Feature.cxx b/vcl/source/font/Feature.cxx index 7569467704ad..07810c1b011b 100644 --- a/vcl/source/font/Feature.cxx +++ b/vcl/source/font/Feature.cxx @@ -8,6 +8,7 @@ * */ +#include <utility> #include <vcl/font/Feature.hxx> #include <strings.hrc> #include <svdata.hxx> @@ -44,7 +45,7 @@ Feature::Feature(FeatureID const& rID, FeatureType eType) FeatureParameter::FeatureParameter(sal_uInt32 nCode, OUString aDescription) : m_nCode(nCode) - , m_sDescription(aDescription) + , m_sDescription(std::move(aDescription)) , m_pDescriptionID(nullptr) { } @@ -103,7 +104,7 @@ FeatureDefinition::FeatureDefinition(sal_uInt32 nCode, const char* pDescriptionI : m_nCode(nCode) , m_pDescriptionID(pDescriptionID) , m_eType(FeatureParameterType::ENUM) - , m_aEnumParameters(aEnumParameters) + , m_aEnumParameters(std::move(aEnumParameters)) { } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 2c6a981d1542..046f0b888bc4 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -543,7 +543,7 @@ void GDIMetaFile::WindPrev() --m_nCurrentActionElement; } -void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction ) +void GDIMetaFile::AddAction(const rtl::Reference<MetaAction>& pAction) { m_aList.push_back( pAction ); @@ -553,7 +553,7 @@ void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction ) } } -void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction, size_t nPos ) +void GDIMetaFile::AddAction(const rtl::Reference<MetaAction>& pAction, size_t nPos) { if ( nPos < m_aList.size() ) { @@ -570,7 +570,7 @@ void GDIMetaFile::AddAction( rtl::Reference<MetaAction> pAction, size_t nPos ) } } -void GDIMetaFile::push_back( rtl::Reference<MetaAction> pAction ) +void GDIMetaFile::push_back(const rtl::Reference<MetaAction>& pAction) { m_aList.push_back( pAction ); } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index bcffc811fc67..4a7da7d9e7d3 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -507,7 +507,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController, return true; } -bool Printer::ExecutePrintJob(std::shared_ptr<PrinterController> xController) +bool Printer::ExecutePrintJob(const std::shared_ptr<PrinterController>& xController) { OUString aJobName; css::beans::PropertyValue* pJobNameVal = xController->getValue( OUString( "JobName" ) ); diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx index d69b0bea726e..356f943b62dc 100644 --- a/vcl/unx/generic/printer/cpdmgr.cxx +++ b/vcl/unx/generic/printer/cpdmgr.cxx @@ -170,7 +170,8 @@ void CPDManager::printerRemoved (GDBusConnection *, pManager->m_aPrinters.erase(printersIt); } -GDBusProxy * CPDManager::getProxy(std::string target) { +GDBusProxy* CPDManager::getProxy(const std::string& target) +{ std::unordered_map<std::string, GDBusProxy *>::const_iterator it = m_pBackends.find(target); if (it == m_pBackends.end()) { return nullptr; @@ -182,7 +183,8 @@ void CPDManager::addBackend(std::pair<std::string, GDBusProxy *> pair) { m_pBackends.insert(pair); } -void CPDManager::addTempBackend(std::pair<std::string, gchar*> pair) { +void CPDManager::addTempBackend(const std::pair<std::string, gchar*>& pair) +{ m_tBackends.push_back(pair); } diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index c453f3dc91fc..dd259fdf3e8b 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -585,18 +585,18 @@ const PPDParser* PPDParser::getParser( const OUString& rFile ) return pNewParser; } -PPDParser::PPDParser( const OUString& rFile, std::vector<PPDKey*> keys) : - m_aFile( rFile ), - m_bColorDevice( false ), - m_bType42Capable( false ), - m_nLanguageLevel( 0 ), - m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ), - m_pImageableAreas( nullptr ), - m_pDefaultPaperDimension( nullptr ), - m_pPaperDimensions( nullptr ), - m_pDefaultInputSlot( nullptr ), - m_pDefaultResolution( nullptr ), - m_pTranslator( new PPDTranslator() ) +PPDParser::PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys) + : m_aFile(rFile) + , m_bColorDevice(false) + , m_bType42Capable(false) + , m_nLanguageLevel(0) + , m_aFileEncoding(RTL_TEXTENCODING_MS_1252) + , m_pImageableAreas(nullptr) + , m_pDefaultPaperDimension(nullptr) + , m_pPaperDimensions(nullptr) + , m_pDefaultInputSlot(nullptr) + , m_pDefaultResolution(nullptr) + , m_pTranslator(new PPDTranslator()) { for (auto & key: keys) { diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 67965fac188e..6110ab1a9269 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -161,8 +161,7 @@ data2string(void *data, return result.makeStringAndClear(); } -static OUString -any2string(uno::Any any) +static OUString any2string(const uno::Any& any) { return data2string(const_cast<void*>(any.getValue()), any.pType); } diff --git a/xmloff/source/xforms/xformsimport.cxx b/xmloff/source/xforms/xformsimport.cxx index 7b4db9784e44..03b1ca1d6043 100644 --- a/xmloff/source/xforms/xformsimport.cxx +++ b/xmloff/source/xforms/xformsimport.cxx @@ -63,9 +63,8 @@ SvXMLImportContext* createXFormsModelContext( return new XFormsModelContext( rImport, nPrefix, rLocalName ); } -void bindXFormsValueBinding( - Reference<XModel> const & xModel, - pair<Reference<XPropertySet>,OUString> aPair ) +void bindXFormsValueBinding(Reference<XModel> const& xModel, + const pair<Reference<XPropertySet>, OUString>& aPair) { Reference<XBindableValue> xBindable( aPair.first, @@ -88,9 +87,8 @@ void bindXFormsValueBinding( } } -void bindXFormsListBinding( - Reference<XModel> const & xModel, - ::pair<Reference<XPropertySet>,OUString> aPair ) +void bindXFormsListBinding(Reference<XModel> const& xModel, + const ::pair<Reference<XPropertySet>, OUString>& aPair) { Reference<XListEntrySink> xListEntrySink( aPair.first, @@ -113,9 +111,8 @@ void bindXFormsListBinding( } } -void bindXFormsSubmission( - Reference<XModel> const & xModel, - pair<Reference<XPropertySet>,OUString> aPair ) +void bindXFormsSubmission(Reference<XModel> const& xModel, + const pair<Reference<XPropertySet>, OUString>& aPair) { Reference<XSubmissionSupplier> xSubmissionSupp( aPair.first, UNO_QUERY ); Reference<XSubmission> xSubmission( |