[Libreoffice-commits] core.git: cui/source include/svl include/svtools include/svx include/test include/vcl sc/source svx/source sw/source test/source
Noel Grandin
noel.grandin at collabora.co.uk
Sun Jul 8 06:32:06 UTC 2018
cui/source/inc/FontFeaturesDialog.hxx | 2 +-
include/svl/zformat.hxx | 2 +-
include/svtools/valueset.hxx | 2 +-
include/svx/svdograf.hxx | 2 +-
include/test/sheet/xcellrangereferrer.hxx | 2 +-
include/test/sheet/xdocumentauditing.hxx | 2 +-
include/test/sheet/xformulaquery.hxx | 2 +-
include/vcl/font/FeatureParser.hxx | 7 +++++--
include/vcl/weld.hxx | 2 +-
sc/source/ui/dataprovider/datatransformation.cxx | 8 ++++----
sc/source/ui/inc/datatransformation.hxx | 8 ++++----
sc/source/ui/inc/docsh.hxx | 2 +-
svx/source/svdraw/svdograf.cxx | 2 +-
sw/source/filter/ww8/attributeoutputbase.hxx | 2 +-
sw/source/ui/vba/vbaapplication.cxx | 2 +-
sw/source/ui/vba/vbaapplication.hxx | 2 +-
sw/source/ui/vba/vbamailmerge.cxx | 2 +-
sw/source/ui/vba/vbamailmerge.hxx | 2 +-
sw/source/uibase/shells/textsh1.cxx | 4 ++--
test/source/sheet/xdocumentauditing.cxx | 3 +--
20 files changed, 31 insertions(+), 29 deletions(-)
New commits:
commit 40b1e5d40667e5863aa213a31fa1b06085bd407a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Jul 6 19:00:38 2018 +0200
loplugin:passstuffbyref
Change-Id: I6e6c47020073ec183c6c8ff9cd026a0bec23b177
Reviewed-on: https://gerrit.libreoffice.org/57088
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/cui/source/inc/FontFeaturesDialog.hxx b/cui/source/inc/FontFeaturesDialog.hxx
index 9f1421594ac9..533384d2e972 100644
--- a/cui/source/inc/FontFeaturesDialog.hxx
+++ b/cui/source/inc/FontFeaturesDialog.hxx
@@ -54,7 +54,7 @@ public:
void dispose() override;
short Execute() override;
- OUString getResultFontName() { return m_sResultFontName; }
+ OUString const& getResultFontName() { return m_sResultFontName; }
void updateFontPreview();
};
diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index dfab60c4beb3..092895645cc6 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -93,7 +93,7 @@ public:
bool IsSet() const { return bSet; }
void SetDate( bool bDateP ) { bDate = bDateP; }
void SetParams(const OUString& s) { sParams = s; }
- OUString GetParams() const { return sParams; }
+ OUString const & GetParams() const { return sParams; }
};
class CharClass;
diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx
index 0a0e2fd26ed1..9d774063d11e 100644
--- a/include/svtools/valueset.hxx
+++ b/include/svtools/valueset.hxx
@@ -490,7 +490,7 @@ public:
virtual void Select();
virtual OUString RequestHelp(tools::Rectangle& rHelpRect) override;
- OUString GetText() const { return maText; }
+ OUString const & GetText() const { return maText; }
void SetText(const OUString& rText) { maText = rText; }
void SetStyle(WinBits nStyle);
WinBits GetStyle() const { return mnStyle; }
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index c609df2ba2b1..6f59b3659bda 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -205,7 +205,7 @@ public:
GDIMetaFile getMetafileFromEmbeddedVectorGraphicData() const;
bool isEmbeddedPdfData() const;
- std::shared_ptr<css::uno::Sequence<sal_Int8>> getEmbeddedPdfData() const;
+ std::shared_ptr<css::uno::Sequence<sal_Int8>> const & getEmbeddedPdfData() const;
/// Returns the page number of the embedded data (typically to re-render or import it).
sal_Int32 getEmbeddedPageNumber() const;
diff --git a/include/test/sheet/xcellrangereferrer.hxx b/include/test/sheet/xcellrangereferrer.hxx
index 4fcdd5d003aa..f840a6bd1355 100644
--- a/include/test/sheet/xcellrangereferrer.hxx
+++ b/include/test/sheet/xcellrangereferrer.hxx
@@ -24,7 +24,7 @@ public:
virtual css::uno::Reference< css::uno::XInterface > init() = 0;
void setCellRange(css::table::CellRangeAddress aCellRange) { m_aCellRange = aCellRange; }
- const css::table::CellRangeAddress getCellRange() { return m_aCellRange; }
+ const css::table::CellRangeAddress & getCellRange() { return m_aCellRange; }
void testGetReferredCells();
protected:
diff --git a/include/test/sheet/xdocumentauditing.hxx b/include/test/sheet/xdocumentauditing.hxx
index 6453c06c8e7b..71fe119980cf 100644
--- a/include/test/sheet/xdocumentauditing.hxx
+++ b/include/test/sheet/xdocumentauditing.hxx
@@ -35,7 +35,7 @@ protected:
private:
bool hasRightAmountOfShapes(const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage,
- const sal_Int32& nElementCount, const sal_Int32& nShapes);
+ sal_Int32 nElementCount, sal_Int32 nShapes);
void dispatch(const css::uno::Reference<css::frame::XFrame>& xFrame,
const css::uno::Sequence<css::beans::PropertyValue>& rArguments);
css::awt::Point m_Position;
diff --git a/include/test/sheet/xformulaquery.hxx b/include/test/sheet/xformulaquery.hxx
index 5dcfea27b49f..a306a6838cf4 100644
--- a/include/test/sheet/xformulaquery.hxx
+++ b/include/test/sheet/xformulaquery.hxx
@@ -35,7 +35,7 @@ public:
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
virtual css::uno::Reference<css::uno::XInterface> getXSpreadsheet() = 0;
void setXCell(css::uno::Reference<css::table::XCell> xCell) { m_xCell = xCell; }
- css::uno::Reference<css::table::XCell> getXCell() { return m_xCell; }
+ css::uno::Reference<css::table::XCell> const& getXCell() { return m_xCell; }
void testQueryDependents();
void testQueryPrecedents();
diff --git a/include/vcl/font/FeatureParser.hxx b/include/vcl/font/FeatureParser.hxx
index 595bb0354b79..351caf19c7b7 100644
--- a/include/vcl/font/FeatureParser.hxx
+++ b/include/vcl/font/FeatureParser.hxx
@@ -37,9 +37,12 @@ private:
public:
FeatureParser(OUString const& sFontName);
- OUString getLanguage() const { return m_sLanguage; }
+ OUString const& getLanguage() const { return m_sLanguage; }
- std::vector<std::pair<sal_uInt32, sal_uInt32>> getFeatures() const { return m_aFeatures; }
+ std::vector<std::pair<sal_uInt32, sal_uInt32>> const& getFeatures() const
+ {
+ return m_aFeatures;
+ }
std::unordered_map<sal_uInt32, sal_uInt32> getFeaturesMap();
};
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 39ee0c867886..a7f2ab8d0543 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -286,7 +286,7 @@ public:
}
void save_value() { m_sSavedValue = get_active_text(); }
- OUString get_saved_value() const { return m_sSavedValue; }
+ OUString const& get_saved_value() const { return m_sSavedValue; }
bool get_value_changed_from_saved() const { return m_sSavedValue != get_active_text(); }
};
diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx
index fd779bf6587a..27bf47d75ea0 100644
--- a/sc/source/ui/dataprovider/datatransformation.cxx
+++ b/sc/source/ui/dataprovider/datatransformation.cxx
@@ -49,7 +49,7 @@ TransformationType ColumnRemoveTransformation::getTransformationType() const
return TransformationType::DELETE_TRANSFORMATION;
}
-std::set<SCCOL> ColumnRemoveTransformation::getColumns() const
+const std::set<SCCOL> & ColumnRemoveTransformation::getColumns() const
{
return maColumns;
}
@@ -144,12 +144,12 @@ TransformationType MergeColumnTransformation::getTransformationType() const
return TransformationType::MERGE_TRANSFORMATION;
}
-OUString MergeColumnTransformation::getMergeString() const
+const OUString & MergeColumnTransformation::getMergeString() const
{
return maMergeString;
}
-std::set<SCCOL> MergeColumnTransformation::getColumns() const
+const std::set<SCCOL> & MergeColumnTransformation::getColumns() const
{
return maColumns;
}
@@ -169,7 +169,7 @@ TransformationType SortTransformation::getTransformationType() const
return TransformationType::SORT_TRANSFORMATION;
}
-ScSortParam SortTransformation::getSortParam() const
+const ScSortParam & SortTransformation::getSortParam() const
{
return maSortParam;
}
diff --git a/sc/source/ui/inc/datatransformation.hxx b/sc/source/ui/inc/datatransformation.hxx
index 305e35a3cd54..6e49a3263bc9 100644
--- a/sc/source/ui/inc/datatransformation.hxx
+++ b/sc/source/ui/inc/datatransformation.hxx
@@ -60,7 +60,7 @@ public:
virtual ~ColumnRemoveTransformation() override;
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
- std::set<SCCOL> getColumns() const;
+ const std::set<SCCOL> & getColumns() const;
};
class SC_DLLPUBLIC SplitColumnTransformation : public DataTransformation
@@ -87,8 +87,8 @@ public:
MergeColumnTransformation(const std::set<SCCOL>& rColumns, const OUString& rMergeString);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
- OUString getMergeString() const;
- std::set<SCCOL> getColumns() const;
+ const OUString & getMergeString() const;
+ const std::set<SCCOL> & getColumns() const;
};
class SC_DLLPUBLIC SortTransformation : public DataTransformation
@@ -99,7 +99,7 @@ public:
SortTransformation(const ScSortParam& rParam);
virtual void Transform(ScDocument& rDoc) const override;
virtual TransformationType getTransformationType() const override;
- ScSortParam getSortParam() const;
+ const ScSortParam & getSortParam() const;
};
class SC_DLLPUBLIC TextTransformation : public DataTransformation
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 41c7e9b5845e..1005799e192f 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -227,7 +227,7 @@ public:
ScDocument& GetDocument() { return m_aDocument; }
ScDocFunc& GetDocFunc() { return *m_pDocFunc; }
- css::uno::Reference<css::datatransfer::XTransferable2> GetClipData() { return m_xClipData; }
+ css::uno::Reference<css::datatransfer::XTransferable2> const & GetClipData() { return m_xClipData; }
void SetClipData(const css::uno::Reference<css::datatransfer::XTransferable2>& xTransferable) { m_xClipData = xTransferable; }
SfxPrinter* GetPrinter( bool bCreateIfNotExist = true );
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 3b6e673662ae..f4a68a78f22c 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1075,7 +1075,7 @@ bool SdrGrafObj::isEmbeddedPdfData() const
return mpGraphicObject->GetGraphic().hasPdfData();
}
-std::shared_ptr<uno::Sequence<sal_Int8>> SdrGrafObj::getEmbeddedPdfData() const
+std::shared_ptr<uno::Sequence<sal_Int8>> const & SdrGrafObj::getEmbeddedPdfData() const
{
return mpGraphicObject->GetGraphic().getPdfData();
}
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index fc1648e77031..7a9100937163 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -682,7 +682,7 @@ public:
sal_Char GetDirective() { return m_cDirective; }
sal_uInt32 GetRubyHeight() { return m_nRubyHeight; }
sal_uInt32 GetBaseHeight() { return m_nBaseHeight; }
- OUString GetFontFamily() { return m_sFontFamily; }
+ OUString const & GetFontFamily() { return m_sFontFamily; }
};
#endif // INCLUDED_SW_SOURCE_FILTER_WW8_ATTRIBUTEOUTPUTBASE_HXX
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index e4f0363ede4b..a1ff66bdaf1a 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -139,7 +139,7 @@ SwVbaApplication::getActiveSwVbaWindow()
return new SwVbaWindow( uno::Reference< XHelperInterface >(), mxContext, xModel, xController );
}
-uno::Reference< css::uno::XComponentContext >
+uno::Reference< css::uno::XComponentContext > const &
SwVbaApplication::getContext()
{
return mxContext;
diff --git a/sw/source/ui/vba/vbaapplication.hxx b/sw/source/ui/vba/vbaapplication.hxx
index 6ef51fec5d37..96b4be10100f 100644
--- a/sw/source/ui/vba/vbaapplication.hxx
+++ b/sw/source/ui/vba/vbaapplication.hxx
@@ -58,7 +58,7 @@ public:
void RemoveSink( sal_uInt32 nNumber );
SwVbaWindow* getActiveSwVbaWindow();
- css::uno::Reference< css::uno::XComponentContext > getContext();
+ css::uno::Reference< css::uno::XComponentContext > const & getContext();
// XApplication
virtual OUString SAL_CALL getName() override;
diff --git a/sw/source/ui/vba/vbamailmerge.cxx b/sw/source/ui/vba/vbamailmerge.cxx
index 59711d7de8a8..48973f80963f 100644
--- a/sw/source/ui/vba/vbamailmerge.cxx
+++ b/sw/source/ui/vba/vbamailmerge.cxx
@@ -20,7 +20,7 @@ SwVbaMailMerge::SwVbaMailMerge(const css::uno::Reference<ooo::vba::XHelperInterf
SwVbaMailMerge::~SwVbaMailMerge() {}
-rtl::Reference<SwVbaMailMerge>
+rtl::Reference<SwVbaMailMerge> const&
SwVbaMailMerge::get(const css::uno::Reference<ooo::vba::XHelperInterface>& xParent,
const css::uno::Reference<css::uno::XComponentContext>& xContext)
{
diff --git a/sw/source/ui/vba/vbamailmerge.hxx b/sw/source/ui/vba/vbamailmerge.hxx
index 7718815da344..bfc28667d784 100644
--- a/sw/source/ui/vba/vbamailmerge.hxx
+++ b/sw/source/ui/vba/vbamailmerge.hxx
@@ -27,7 +27,7 @@ class SwVbaMailMerge : public SwVbaMailMerge_BASE
public:
virtual ~SwVbaMailMerge() override;
- static rtl::Reference<SwVbaMailMerge>
+ static rtl::Reference<SwVbaMailMerge> const&
get(const css::uno::Reference<ooo::vba::XHelperInterface>& xParent,
const css::uno::Reference<css::uno::XComponentContext>& xContext);
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index e905d9667913..fe39d8b76c73 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -129,7 +129,7 @@ using namespace ::com::sun::star::container;
using namespace com::sun::star::style;
using namespace svx::sidebar;
-static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std::shared_ptr<SfxItemSet> pCoreSet, bool bSel, bool bSelectionPut, SfxRequest *pReq);
+static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std::shared_ptr<SfxItemSet> const & pCoreSet, bool bSel, bool bSelectionPut, SfxRequest *pReq);
void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const SfxItemSet *pArgs, SfxRequest *pReq )
{
@@ -220,7 +220,7 @@ void sw_CharDialog(SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot, const
}
}
-static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std::shared_ptr<SfxItemSet> pCoreSet, bool bSel, bool bSelectionPut, SfxRequest *pReq)
+static void sw_CharDialogResult(const SfxItemSet* pSet, SwWrtShell &rWrtSh, std::shared_ptr<SfxItemSet> const & pCoreSet, bool bSel, bool bSelectionPut, SfxRequest *pReq)
{
SfxItemSet aTmpSet( *pSet );
::ConvertAttrGenToChar(aTmpSet, *pCoreSet);
diff --git a/test/source/sheet/xdocumentauditing.cxx b/test/source/sheet/xdocumentauditing.cxx
index 7b1565a62a43..42846b7f302c 100644
--- a/test/source/sheet/xdocumentauditing.cxx
+++ b/test/source/sheet/xdocumentauditing.cxx
@@ -57,8 +57,7 @@ void XDocumentAuditing::dispatch(const uno::Reference<frame::XFrame>& xFrame,
}
bool XDocumentAuditing::hasRightAmountOfShapes(const uno::Reference<drawing::XDrawPage>& xDrawPage,
- const sal_Int32& nElementCount,
- const sal_Int32& nShapes)
+ sal_Int32 nElementCount, sal_Int32 nShapes)
{
const sal_Int32 nCount = xDrawPage->getCount();
if (nCount != nElementCount + nShapes)
More information about the Libreoffice-commits
mailing list