diff options
Diffstat (limited to 'sc/source/ui')
162 files changed, 635 insertions, 531 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleContextBase.cxx b/sc/source/ui/Accessibility/AccessibleContextBase.cxx index 464e9a9f362d..3dc2034b36da 100644 --- a/sc/source/ui/Accessibility/AccessibleContextBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleContextBase.cxx @@ -28,6 +28,7 @@ #include <comphelper/sequence.hxx> #include <cppuhelper/supportsservice.hxx> #include <unotools/accessiblerelationsethelper.hxx> +#include <utility> #include <vcl/unohelp.hxx> #include <comphelper/accessibleeventnotifier.hxx> #include <vcl/svapp.hxx> @@ -36,11 +37,11 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::accessibility; ScAccessibleContextBase::ScAccessibleContextBase( - const uno::Reference<XAccessible>& rxParent, + uno::Reference<XAccessible> xParent, const sal_Int16 aRole) : ScAccessibleContextBaseWeakImpl(m_aMutex), - mxParent(rxParent), + mxParent(std::move(xParent)), mnClientId(0), maRole(aRole) { diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index 0fb6f1e3a039..3155affcea98 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -1280,11 +1280,11 @@ css::uno::Reference<css::accessibility::XAccessible> SAL_CALL ScAccessibleCsvGri ScAccessibleCsvCell::ScAccessibleCsvCell( ScCsvGrid& rGrid, - const OUString& rCellText, + OUString aCellText, sal_Int32 nRow, sal_Int32 nColumn ) : ScAccessibleCsvControl( rGrid ), AccessibleStaticTextBase( SvxEditSourcePtr() ), - maCellText( rCellText ), + maCellText(std::move( aCellText )), mnLine( nRow ? (nRow + rGrid.GetFirstVisLine() - 1) : CSV_LINE_HEADER ), mnColumn( lcl_GetGridColumn( nColumn ) ), mnIndex( nRow * (rGrid.GetColumnCount() + 1) + nColumn ) diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx index a13a2789833d..b8a40b814b00 100644 --- a/sc/source/ui/Accessibility/AccessibleDocument.cxx +++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx @@ -56,6 +56,7 @@ #include <sfx2/docfile.hxx> #include <unotools/accessiblerelationsethelper.hxx> #include <toolkit/helper/convert.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svx/AccessibleControlShape.hxx> @@ -101,7 +102,7 @@ struct ScAccessibleShapeData } ScAccessibleShapeData::ScAccessibleShapeData(css::uno::Reference< css::drawing::XShape > xShape_) - : xShape(xShape_), + : xShape(std::move(xShape_)), bSelected(false), bSelectable(true) { static constexpr OUStringLiteral gsLayerId = u"LayerID"; diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 13c67f73730b..9bc283716d41 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -41,6 +41,7 @@ #include <editeng/justifyitem.hxx> #include <svx/svdmodel.hxx> #include <svx/algitem.hxx> +#include <utility> #include <vcl/svapp.hxx> class ScViewForwarder : public SvxViewForwarder @@ -977,10 +978,10 @@ ScDocShell* ScAccessiblePreviewCellTextData::GetDocShell(ScPreviewShell* pViewSh // ScAccessiblePreviewHeaderCellTextData: shared data between sub objects of an accessible cell text object ScAccessiblePreviewHeaderCellTextData::ScAccessiblePreviewHeaderCellTextData(ScPreviewShell* pViewShell, - const OUString& rText, const ScAddress& rP, bool bColHeader, bool bRowHeader) + OUString aText, const ScAddress& rP, bool bColHeader, bool bRowHeader) : ScAccessibleCellBaseTextData(GetDocShell(pViewShell), rP), mpViewShell(pViewShell), - maText(rText), + maText(std::move(aText)), mbColHeader(bColHeader), mbRowHeader(bRowHeader) { @@ -1181,11 +1182,11 @@ SvxViewForwarder* ScAccessibleHeaderTextData::GetViewForwarder() } ScAccessibleNoteTextData::ScAccessibleNoteTextData(ScPreviewShell* pViewShell, - const OUString& sText, const ScAddress& aCellPos, bool bMarkNote) + OUString sText, const ScAddress& aCellPos, bool bMarkNote) : mpViewShell(pViewShell), mpDocSh(nullptr), - msText(sText), + msText(std::move(sText)), maCellPos(aCellPos), mbMarkNote(bMarkNote), mbDataValid(false) @@ -1327,10 +1328,10 @@ void ScCsvViewForwarder::SetInvalid() ScAccessibleCsvTextData::ScAccessibleCsvTextData( OutputDevice* pWindow, EditEngine* pEditEngine, - const OUString& rCellText, const Size& rCellSize ) : + OUString aCellText, const Size& rCellSize ) : mpWindow( pWindow ), mpEditEngine( pEditEngine ), - maCellText( rCellText ), + maCellText(std::move( aCellText )), maCellSize( rCellSize ) { } diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 8cd335b2e946..5c4d5ef811dd 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -50,6 +50,7 @@ #include <docsh.hxx> #include <drwlayer.hxx> #include <drawview.hxx> +#include <utility> #include <viewdata.hxx> #include <scmod.hxx> #include <dragdata.hxx> @@ -66,9 +67,9 @@ constexpr sal_uInt32 SCDRAWTRANS_TYPE_DRAWMODEL = 2; constexpr sal_uInt32 SCDRAWTRANS_TYPE_DOCUMENT = 3; ScDrawTransferObj::ScDrawTransferObj( std::unique_ptr<SdrModel> pClipModel, ScDocShell* pContainerShell, - const TransferableObjectDescriptor& rDesc ) : + TransferableObjectDescriptor aDesc ) : m_pModel( std::move(pClipModel) ), - m_aObjDesc( rDesc ), + m_aObjDesc(std::move( aDesc )), m_bGraphic( false ), m_bGrIsBit( false ), m_bOleObj( false ), diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 3e9fe8e917de..bfbb446e1364 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -49,6 +49,7 @@ #include <svl/zforlist.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/charclass.hxx> +#include <utility> #include <vcl/help.hxx> #include <vcl/jsdialog/executor.hxx> #include <vcl/commandevent.hxx> @@ -4605,12 +4606,12 @@ void ScInputHandler::InputTurnOffWinEngine() ScInputHdlState::ScInputHdlState( const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, - const OUString& rString, + OUString _aString, const EditTextObject* pData ) : aCursorPos ( rCurPos ), aStartPos ( rStartPos ), aEndPos ( rEndPos ), - aString ( rString ), + aString (std::move( _aString )), pEditData ( pData ? pData->Clone() : nullptr ) { } diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx index 330b8479b9a3..ba17bf006ea1 100644 --- a/sc/source/ui/app/rfindlst.cxx +++ b/sc/source/ui/app/rfindlst.cxx @@ -19,6 +19,7 @@ #include <rfindlst.hxx> #include <tools/debug.hxx> +#include <utility> #define SC_RANGECOLORS 8 @@ -26,8 +27,8 @@ const Color aColNames[SC_RANGECOLORS] = { COL_LIGHTBLUE, COL_LIGHTRED, COL_LIGHTMAGENTA, COL_GREEN, COL_BLUE, COL_RED, COL_MAGENTA, COL_BROWN }; -ScRangeFindList::ScRangeFindList(const OUString& rName) : - aDocName( rName ), +ScRangeFindList::ScRangeFindList(OUString aName) : + aDocName(std::move( aName )), bHidden( false ), nIndexColor( 0 ) { diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 3eb6f4f143e6..670ad23976d6 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -32,6 +32,7 @@ #include <comphelper/storagehelper.hxx> #include <comphelper/servicehelper.hxx> #include <sot/storage.hxx> +#include <utility> #include <vcl/gdimtf.hxx> #include <vcl/jobset.hxx> #include <vcl/svapp.hxx> @@ -109,10 +110,10 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument& rDoc, double nPr ScPrintFunc::DrawToDev( rDoc, pDev, nPrintFactor, aBound, &aViewData, false/*bMetaFile*/ ); } -ScTransferObj::ScTransferObj( const std::shared_ptr<ScDocument>& pClipDoc, const TransferableObjectDescriptor& rDesc ) : +ScTransferObj::ScTransferObj( const std::shared_ptr<ScDocument>& pClipDoc, TransferableObjectDescriptor aDesc ) : m_pDoc( pClipDoc ), m_nNonFiltered(0), - m_aObjDesc( rDesc ), + m_aObjDesc(std::move( aDesc )), m_nDragHandleX( 0 ), m_nDragHandleY( 0 ), m_nSourceCursorX( m_pDoc->MaxCol() + 1 ), diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index 91cb50b079b2..ca3062c9fe30 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -25,18 +25,19 @@ #include <osl/diagnose.h> #include <editeng/editobj.hxx> +#include <utility> /** * Status update for entry field */ ScInputStatusItem::ScInputStatusItem( sal_uInt16 nWhichP, const ScAddress& rCurPos, const ScAddress& rStartPos, - const ScAddress& rEndPos, const OUString& rString, const EditTextObject* pData ) : + const ScAddress& rEndPos, OUString _aString, const EditTextObject* pData ) : SfxPoolItem ( nWhichP ), aCursorPos ( rCurPos ), aStartPos ( rStartPos ), aEndPos ( rEndPos ), - aString ( rString ), + aString (std::move( _aString )), pEditData ( pData ? pData->Clone() : nullptr ), mpMisspellRanges(nullptr) { diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx index 7d3443bb029c..7888e2656207 100644 --- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx +++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx @@ -19,6 +19,7 @@ #include <tbzoomsliderctrl.hxx> #include <comphelper/propertyvalue.hxx> +#include <utility> #include <vcl/InterimItemWindow.hxx> #include <vcl/event.hxx> #include <vcl/image.hxx> @@ -204,13 +205,13 @@ void ScZoomSliderWnd::dispose() InterimItemWindow::dispose(); } -ScZoomSlider::ScZoomSlider(const css::uno::Reference< css::frame::XDispatchProvider>& rDispatchProvider, +ScZoomSlider::ScZoomSlider(css::uno::Reference< css::frame::XDispatchProvider> xDispatchProvider, sal_uInt16 nCurrentZoom) : mnCurrentZoom( nCurrentZoom ), mnMinZoom( 10 ), mnMaxZoom( 400 ), mbOmitPaint( false ), - m_xDispatchProvider(rDispatchProvider) + m_xDispatchProvider(std::move(xDispatchProvider)) { maSliderButton = Image(StockImage::Yes, RID_SVXBMP_SLIDERBUTTON); maIncreaseButton = Image(StockImage::Yes, RID_SVXBMP_SLIDERINCREASE); diff --git a/sc/source/ui/dataprovider/csvdataprovider.cxx b/sc/source/ui/dataprovider/csvdataprovider.cxx index 29391c378db9..b6ca0d023d97 100644 --- a/sc/source/ui/dataprovider/csvdataprovider.cxx +++ b/sc/source/ui/dataprovider/csvdataprovider.cxx @@ -13,6 +13,7 @@ #include <stringutil.hxx> #include <tools/stream.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <docsh.hxx> #include <orcus/csv_parser.hpp> @@ -65,11 +66,11 @@ public: namespace sc { CSVFetchThread::CSVFetchThread( - ScDocument& rDoc, const OUString& mrURL, std::function<void()> aImportFinishedHdl, + ScDocument& rDoc, OUString aURL, std::function<void()> aImportFinishedHdl, std::vector<std::shared_ptr<sc::DataTransformation>>&& rDataTransformations) : Thread("CSV Fetch Thread") , mrDocument(rDoc) - , maURL(mrURL) + , maURL(std::move(aURL)) , mbTerminate(false) , maDataTransformations(std::move(rDataTransformations)) , maImportFinishedHdl(std::move(aImportFinishedHdl)) diff --git a/sc/source/ui/dataprovider/dataprovider.cxx b/sc/source/ui/dataprovider/dataprovider.cxx index 72f674a7b99d..cc83294366cb 100644 --- a/sc/source/ui/dataprovider/dataprovider.cxx +++ b/sc/source/ui/dataprovider/dataprovider.cxx @@ -24,6 +24,7 @@ #include <datamapper.hxx> #include <dbdata.hxx> #include <docsh.hxx> +#include <utility> using namespace com::sun::star; @@ -63,10 +64,10 @@ std::unique_ptr<SvStream> DataProvider::FetchStreamFromURL(const OUString& rURL, } } -ExternalDataSource::ExternalDataSource(const OUString& rURL, - const OUString& rProvider, ScDocument* pDoc) - : maURL(rURL) - , maProvider(rProvider) +ExternalDataSource::ExternalDataSource(OUString aURL, + OUString aProvider, ScDocument* pDoc) + : maURL(std::move(aURL)) + , maProvider(std::move(aProvider)) , mpDoc(pDoc) { } @@ -246,8 +247,8 @@ void ScDBDataManager::WriteToDoc(ScDocument& rDoc) pDocShell->PostPaint(aDestRange, PaintPartFlags::All); } -ScDBDataManager::ScDBDataManager(const OUString& rDBName, ScDocument* pDoc): - maDBName(rDBName), +ScDBDataManager::ScDBDataManager(OUString aDBName, ScDocument* pDoc): + maDBName(std::move(aDBName)), mpDoc(pDoc) { } diff --git a/sc/source/ui/dataprovider/datatransformation.cxx b/sc/source/ui/dataprovider/datatransformation.cxx index 62c82adb93d4..b5ba65f5a5b8 100644 --- a/sc/source/ui/dataprovider/datatransformation.cxx +++ b/sc/source/ui/dataprovider/datatransformation.cxx @@ -15,6 +15,7 @@ #include <svl/numformat.hxx> #include <svl/zforlist.hxx> #include <unotools/charclass.hxx> +#include <utility> namespace { @@ -112,9 +113,9 @@ sal_Unicode SplitColumnTransformation::getSeparator() const return mcSeparator; } -MergeColumnTransformation::MergeColumnTransformation( std::set<SCCOL>&& rColumns, const OUString& rMergeString): +MergeColumnTransformation::MergeColumnTransformation( std::set<SCCOL>&& rColumns, OUString aMergeString): maColumns(std::move(rColumns)), - maMergeString(rMergeString) + maMergeString(std::move(aMergeString)) { } @@ -650,9 +651,9 @@ const std::set<SCCOL>& NumberTransformation::getColumn() const } ReplaceNullTransformation::ReplaceNullTransformation(std::set<SCCOL>&& nCol, - const OUString& sReplaceWith) + OUString sReplaceWith) : mnCol(std::move(nCol)) - , msReplaceWith(sReplaceWith) + , msReplaceWith(std::move(sReplaceWith)) { } @@ -1136,10 +1137,10 @@ const std::set<SCCOL>& DateTimeTransformation::getColumn() const return mnCol; } -FindReplaceTransformation::FindReplaceTransformation(SCCOL nCol, const OUString& aFindString, const OUString& aReplaceString) +FindReplaceTransformation::FindReplaceTransformation(SCCOL nCol, OUString aFindString, OUString aReplaceString) : mnCol(nCol) - , maFindString(aFindString) - , maReplaceString(aReplaceString) + , maFindString(std::move(aFindString)) + , maReplaceString(std::move(aReplaceString)) { } @@ -1181,9 +1182,9 @@ const OUString& FindReplaceTransformation::getReplaceString() const return maReplaceString; } -DeleteRowTransformation::DeleteRowTransformation(SCCOL nCol, const OUString& aFindString) +DeleteRowTransformation::DeleteRowTransformation(SCCOL nCol, OUString aFindString) : mnCol(nCol) - , maFindString(aFindString) + , maFindString(std::move(aFindString)) { } diff --git a/sc/source/ui/dataprovider/htmldataprovider.cxx b/sc/source/ui/dataprovider/htmldataprovider.cxx index 8b241ddfe049..b45fdaad568b 100644 --- a/sc/source/ui/dataprovider/htmldataprovider.cxx +++ b/sc/source/ui/dataprovider/htmldataprovider.cxx @@ -11,6 +11,7 @@ #include <datamapper.hxx> #include <datatransformation.hxx> #include <salhelper/thread.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <tools/stream.hxx> diff --git a/sc/source/ui/dataprovider/sqldataprovider.cxx b/sc/source/ui/dataprovider/sqldataprovider.cxx index a7d27dfa9426..a1907092afd7 100644 --- a/sc/source/ui/dataprovider/sqldataprovider.cxx +++ b/sc/source/ui/dataprovider/sqldataprovider.cxx @@ -18,6 +18,7 @@ #include <com/sun/star/sdbc/XResultSetMetaData.hpp> #include <dbdocutl.hxx> #include <datamapper.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <comphelper/processfactory.hxx> #include <tools/diagnose_ex.h> diff --git a/sc/source/ui/dataprovider/xmldataprovider.cxx b/sc/source/ui/dataprovider/xmldataprovider.cxx index 4ffa45bd16e7..d3f0735d69a2 100644 --- a/sc/source/ui/dataprovider/xmldataprovider.cxx +++ b/sc/source/ui/dataprovider/xmldataprovider.cxx @@ -13,6 +13,7 @@ #include <filter.hxx> #include <document.hxx> #include <datamapper.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <orcusfilters.hxx> #include <utility> diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 9244a4d7e3e5..bd42fab6af47 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -22,6 +22,7 @@ #include <scmod.hxx> #include <memory> +#include <utility> #include <vector> #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp> @@ -30,8 +31,8 @@ using namespace css::uno; using namespace css::sheet; -ScItemValue::ScItemValue(OUString const & aName, SCCOL nColumn, PivotFunc nFunctionMask) : - maName(aName), +ScItemValue::ScItemValue(OUString aName, SCCOL nColumn, PivotFunc nFunctionMask) : + maName(std::move(aName)), maFunctionData(nColumn, nFunctionMask), mpOriginalItemValue(this) {} diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 90a13e920352..84fde939a580 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -36,6 +36,7 @@ #include <globstr.hrc> #include <dputil.hxx> +#include <utility> #include <vector> using namespace ::com::sun::star::sheet; @@ -645,7 +646,7 @@ namespace } ScDPSubtotalOptDlg::ScDPSubtotalOptDlg(weld::Window* pParent, ScDPObject& rDPObj, - const ScDPLabelData& rLabelData, const ScDPNameVec& rDataFields, + ScDPLabelData aLabelData, const ScDPNameVec& rDataFields, bool bEnableLayout ) : GenericDialogController(pParent, "modules/scalc/ui/datafieldoptionsdialog.ui", "DataFieldOptionsDialog") @@ -671,7 +672,7 @@ ScDPSubtotalOptDlg::ScDPSubtotalOptDlg(weld::Window* pParent, ScDPObject& rDPObj , m_xBtnOk(m_xBuilder->weld_button("ok")) , m_xBtnCancel(m_xBuilder->weld_button("cancel")) , mrDPObj(rDPObj) - , maLabelData(rLabelData) + , maLabelData(std::move(aLabelData)) { m_xLbHide->enable_toggle_buttons(weld::ColumnToggleType::Check); diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index e04f0b672939..82748d997674 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -29,14 +29,15 @@ #include <imoptdlg.hxx> #include <svx/txencbox.hxx> #include <o3tl/string_view.hxx> +#include <utility> // ScDelimiterTable class ScDelimiterTable { public: - explicit ScDelimiterTable( const OUString& rDelTab ) - : theDelTab ( rDelTab ), + explicit ScDelimiterTable( OUString aDelTab ) + : theDelTab (std::move( aDelTab )), nDelIdx ( 0 ) {} diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index 8d3a89a1659d..64fb1e963aaf 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -19,6 +19,7 @@ #include <sfx2/fcontnr.hxx> #include <sfx2/linkmgr.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> #include <unotools/charclass.hxx> @@ -46,17 +47,17 @@ #include <clipparam.hxx> -ScAreaLink::ScAreaLink( SfxObjectShell* pShell, const OUString& rFile, - const OUString& rFilter, const OUString& rOpt, - const OUString& rArea, const ScRange& rDest, +ScAreaLink::ScAreaLink( SfxObjectShell* pShell, OUString aFile, + OUString aFilter, OUString aOpt, + OUString aArea, const ScRange& rDest, sal_Int32 nRefreshDelaySeconds ) : ::sfx2::SvBaseLink(SfxLinkUpdateMode::ONCALL,SotClipboardFormatId::SIMPLE_FILE), ScRefreshTimer ( nRefreshDelaySeconds ), m_pDocSh(static_cast<ScDocShell*>(pShell)), - aFileName (rFile), - aFilterName (rFilter), - aOptions (rOpt), - aSourceArea (rArea), + aFileName (std::move(aFile)), + aFilterName (std::move(aFilter)), + aOptions (std::move(aOpt)), + aSourceArea (std::move(aArea)), aDestArea (rDest), bAddUndo (true), bInCreate (false), diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 9c4d8848ffc7..b429a26dbe1f 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -27,6 +27,7 @@ #include <editeng/justifyitem.hxx> #include <sfx2/linkmgr.hxx> #include <sfx2/bindings.hxx> +#include <utility> #include <vcl/weld.hxx> #include <vcl/stdtext.hxx> #include <vcl/svapp.hxx> @@ -1151,8 +1152,8 @@ namespace { sal_Int32 nIndex; SfxItemSet aItemSet; - ScMyRememberItem(const SfxItemSet& rItemSet, sal_Int32 nTempIndex) : - nIndex(nTempIndex), aItemSet(rItemSet) {} + ScMyRememberItem(SfxItemSet _aItemSet, sal_Int32 nTempIndex) : + nIndex(nTempIndex), aItemSet(std::move(_aItemSet)) {} }; } diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 4fc7556c6daf..cfe1a1f5c6fa 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -27,6 +27,7 @@ #include <scextopt.hxx> #include <rangenam.hxx> #include <formulacell.hxx> +#include <utility> #include <viewdata.hxx> #include <tabvwsh.hxx> #include <sc.hrc> @@ -471,8 +472,8 @@ ScExternalRefCache::TokenRef ScExternalRefCache::Table::getEmptyOrNullToken( return TokenRef(); } -ScExternalRefCache::TableName::TableName(const OUString& rUpper, const OUString& rReal) : - maUpperName(rUpper), maRealName(rReal) +ScExternalRefCache::TableName::TableName(OUString aUpper, OUString aReal) : + maUpperName(std::move(aUpper)), maRealName(std::move(aReal)) { } diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx index 21fe08519773..7fd32eb23780 100644 --- a/sc/source/ui/docshell/tablink.cxx +++ b/sc/source/ui/docshell/tablink.cxx @@ -30,6 +30,7 @@ #include <sfx2/fcontnr.hxx> #include <sfx2/frame.hxx> #include <sfx2/linkmgr.hxx> +#include <utility> #include <vcl/weld.hxx> #include <tools/urlobj.hxx> #include <unotools/transliterationwrapper.hxx> @@ -61,15 +62,15 @@ struct TableLink_Impl }; -ScTableLink::ScTableLink(ScDocShell* pDocSh, const OUString& rFile, - const OUString& rFilter, const OUString& rOpt, +ScTableLink::ScTableLink(ScDocShell* pDocSh, OUString aFile, + OUString aFilter, OUString aOpt, sal_Int32 nRefreshDelaySeconds ): ::sfx2::SvBaseLink(SfxLinkUpdateMode::ONCALL,SotClipboardFormatId::SIMPLE_FILE), ScRefreshTimer( nRefreshDelaySeconds ), pImpl( new TableLink_Impl ), - aFileName(rFile), - aFilterName(rFilter), - aOptions(rOpt), + aFileName(std::move(aFile)), + aFilterName(std::move(aFilter)), + aOptions(std::move(aOpt)), bInCreate( false ), bInEdit( false ), bAddUndo( true ) @@ -77,15 +78,15 @@ ScTableLink::ScTableLink(ScDocShell* pDocSh, const OUString& rFile, pImpl->m_pDocSh = pDocSh; } -ScTableLink::ScTableLink(SfxObjectShell* pShell, const OUString& rFile, - const OUString& rFilter, const OUString& rOpt, +ScTableLink::ScTableLink(SfxObjectShell* pShell, OUString aFile, + OUString aFilter, OUString aOpt, sal_Int32 nRefreshDelaySeconds ): ::sfx2::SvBaseLink(SfxLinkUpdateMode::ONCALL,SotClipboardFormatId::SIMPLE_FILE), ScRefreshTimer( nRefreshDelaySeconds ), pImpl( new TableLink_Impl ), - aFileName(rFile), - aFilterName(rFilter), - aOptions(rOpt), + aFileName(std::move(aFile)), + aFilterName(std::move(aFilter)), + aOptions(std::move(aOpt)), bInCreate( false ), bInEdit( false ), bAddUndo( true ) diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index 0a1465cfbb1b..879de23a7442 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -60,7 +60,7 @@ class ScAccessibleContextBase public: //===== internal ======================================================== ScAccessibleContextBase( - const css::uno::Reference<css::accessibility::XAccessible>& rxParent, + css::uno::Reference<css::accessibility::XAccessible> xParent, const sal_Int16 aRole); virtual void Init(); diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index 65a2ddb02b46..576389f1d73e 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -443,7 +443,7 @@ private: public: explicit ScAccessibleCsvCell( ScCsvGrid& rGrid, - const OUString& rCellText, + OUString aCellText, sal_Int32 nRow, sal_Int32 nColumn); virtual ~ScAccessibleCsvCell() override; diff --git a/sc/source/ui/inc/AccessibleText.hxx b/sc/source/ui/inc/AccessibleText.hxx index 23fdb3cb25ea..b4706a09c858 100644 --- a/sc/source/ui/inc/AccessibleText.hxx +++ b/sc/source/ui/inc/AccessibleText.hxx @@ -178,7 +178,7 @@ class ScAccessiblePreviewHeaderCellTextData : public ScAccessibleCellBaseTextDat { public: ScAccessiblePreviewHeaderCellTextData(ScPreviewShell* pViewShell, - const OUString& rText, const ScAddress& rP, bool bColHeader, bool bRowHeader); + OUString aText, const ScAddress& rP, bool bColHeader, bool bRowHeader); virtual ~ScAccessiblePreviewHeaderCellTextData() override; virtual ScAccessibleTextData* Clone() const override; @@ -231,7 +231,7 @@ class ScAccessibleNoteTextData : public ScAccessibleTextData { public: ScAccessibleNoteTextData(ScPreviewShell* pViewShell, - const OUString& sText, const ScAddress& aCellPos, bool bMarkNote); + OUString sText, const ScAddress& aCellPos, bool bMarkNote); virtual ~ScAccessibleNoteTextData() override; virtual ScAccessibleTextData* Clone() const override; @@ -272,7 +272,7 @@ public: explicit ScAccessibleCsvTextData( OutputDevice* pWindow, EditEngine* pEditEngine, - const OUString& rCellText, + OUString aCellText, const Size& rCellSize ); virtual ~ScAccessibleCsvTextData() override; diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index 0ce026bf4047..ade3085feeae 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -25,7 +25,7 @@ public: ScPivotFuncData maFunctionData; ScItemValue* mpOriginalItemValue; - ScItemValue(OUString const & aName, SCCOL nColumn, PivotFunc nFunctionMask); + ScItemValue(OUString aName, SCCOL nColumn, PivotFunc nFunctionMask); ScItemValue(const ScItemValue* pInputItemValue); ~ScItemValue(); diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx index a0c0cd9eb517..891455cc82bb 100644 --- a/sc/source/ui/inc/autostyl.hxx +++ b/sc/source/ui/inc/autostyl.hxx @@ -20,6 +20,7 @@ #pragma once #include <address.hxx> +#include <utility> #include <vector> #include <rtl/ustring.hxx> #include <tools/solar.h> @@ -35,8 +36,8 @@ struct ScAutoStyleData ScRange aRange; OUString aStyle; - ScAutoStyleData( sal_uLong nT, const ScRange& rR, const OUString& rT ) : - nTimeout(nT), aRange(rR), aStyle(rT) {} + ScAutoStyleData( sal_uLong nT, const ScRange& rR, OUString aT ) : + nTimeout(nT), aRange(rR), aStyle(std::move(aT)) {} }; struct ScAutoStyleInitData { @@ -45,8 +46,8 @@ struct ScAutoStyleInitData sal_uLong nTimeout; OUString aStyle2; - ScAutoStyleInitData( const ScRange& rR, const OUString& rSt1, sal_uLong nT, const OUString& rSt2 ) : - aRange(rR), aStyle1(rSt1), nTimeout(nT), aStyle2(rSt2) {} + ScAutoStyleInitData( const ScRange& rR, OUString aSt1, sal_uLong nT, OUString aSt2 ) : + aRange(rR), aStyle1(std::move(aSt1)), nTimeout(nT), aStyle2(std::move(aSt2)) {} }; diff --git a/sc/source/ui/inc/condformatuno.hxx b/sc/source/ui/inc/condformatuno.hxx index 253aed098eab..16b971a538f8 100644 --- a/sc/source/ui/inc/condformatuno.hxx +++ b/sc/source/ui/inc/condformatuno.hxx @@ -68,7 +68,7 @@ class ScCondFormatObj : public cppu::WeakImplHelper<css::sheet::XConditionalForm css::beans::XPropertySet> { public: - ScCondFormatObj(ScDocShell* pDocShell, rtl::Reference<ScCondFormatsObj> const & xCondFormats, sal_Int32 nKey); + ScCondFormatObj(ScDocShell* pDocShell, rtl::Reference<ScCondFormatsObj> xCondFormats, sal_Int32 nKey); virtual ~ScCondFormatObj() override; @@ -156,7 +156,7 @@ class ScColorScaleFormatObj : public cppu::WeakImplHelper<css::beans::XPropertyS { public: - ScColorScaleFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, const ScColorScaleFormat* pFormat); + ScColorScaleFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScColorScaleFormat* pFormat); virtual ~ScColorScaleFormatObj() override; // XConditionEntry @@ -190,7 +190,7 @@ private: class ScColorScaleEntryObj : public cppu::WeakImplHelper<css::sheet::XColorScaleEntry> { public: - ScColorScaleEntryObj(rtl::Reference<ScColorScaleFormatObj> const & xParent, size_t nPos); + ScColorScaleEntryObj(rtl::Reference<ScColorScaleFormatObj> xParent, size_t nPos); virtual ~ScColorScaleEntryObj() override; @@ -217,7 +217,7 @@ class ScDataBarFormatObj : public cppu::WeakImplHelper<css::beans::XPropertySet, css::sheet::XConditionEntry> { public: - ScDataBarFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, + ScDataBarFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScDataBarFormat* pFormat); virtual ~ScDataBarFormatObj() override; @@ -251,7 +251,7 @@ private: class ScDataBarEntryObj : public cppu::WeakImplHelper<css::sheet::XDataBarEntry> { public: - ScDataBarEntryObj(rtl::Reference<ScDataBarFormatObj> const & xParent, size_t nPos); + ScDataBarEntryObj(rtl::Reference<ScDataBarFormatObj> xParent, size_t nPos); virtual ~ScDataBarEntryObj() override; @@ -274,7 +274,7 @@ class ScIconSetFormatObj : public cppu::WeakImplHelper<css::beans::XPropertySet, css::sheet::XConditionEntry> { public: - ScIconSetFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, + ScIconSetFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScIconSetFormat* pFormat); virtual ~ScIconSetFormatObj() override; @@ -308,7 +308,7 @@ private: class ScIconSetEntryObj : public cppu::WeakImplHelper<css::sheet::XIconSetEntry> { public: - ScIconSetEntryObj(rtl::Reference<ScIconSetFormatObj> const & xParent, size_t nPos); + ScIconSetEntryObj(rtl::Reference<ScIconSetFormatObj> xParent, size_t nPos); virtual ~ScIconSetEntryObj() override; @@ -331,7 +331,7 @@ class ScCondDateFormatObj : public cppu::WeakImplHelper<css::beans::XPropertySet css::sheet::XConditionEntry> { public: - ScCondDateFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, + ScCondDateFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScCondDateFormatEntry* pFormat); virtual ~ScCondDateFormatObj() override; diff --git a/sc/source/ui/inc/dataprovider.hxx b/sc/source/ui/inc/dataprovider.hxx index e6457c48e243..e053a72eb4e2 100644 --- a/sc/source/ui/inc/dataprovider.hxx +++ b/sc/source/ui/inc/dataprovider.hxx @@ -48,7 +48,7 @@ class CSVFetchThread : public salhelper::Thread public: - CSVFetchThread(ScDocument& rDoc, const OUString&, std::function<void()> aImportFinishedHdl, + CSVFetchThread(ScDocument& rDoc, OUString , std::function<void()> aImportFinishedHdl, std::vector<std::shared_ptr<sc::DataTransformation>>&& mrDataTransformations); virtual ~CSVFetchThread() override; @@ -121,7 +121,7 @@ class ScDBDataManager ScDocument* mpDoc; public: - ScDBDataManager(const OUString& rDBName, ScDocument* pDoc); + ScDBDataManager(OUString aDBName, ScDocument* pDoc); ~ScDBDataManager(); void SetDatabase(const OUString& rDBName); diff --git a/sc/source/ui/inc/datatransformation.hxx b/sc/source/ui/inc/datatransformation.hxx index e69b21f423e4..aa822340fa80 100644 --- a/sc/source/ui/inc/datatransformation.hxx +++ b/sc/source/ui/inc/datatransformation.hxx @@ -96,7 +96,7 @@ class SC_DLLPUBLIC MergeColumnTransformation : public DataTransformation public: - MergeColumnTransformation(std::set<SCCOL>&& rColumns, const OUString& rMergeString); + MergeColumnTransformation(std::set<SCCOL>&& rColumns, OUString aMergeString); virtual void Transform(ScDocument& rDoc) const override; virtual TransformationType getTransformationType() const override; const OUString & getMergeString() const; @@ -163,7 +163,7 @@ class SC_DLLPUBLIC ReplaceNullTransformation : public DataTransformation OUString msReplaceWith; public: - ReplaceNullTransformation(std::set<SCCOL>&& nCol, const OUString& sReplaceWith); + ReplaceNullTransformation(std::set<SCCOL>&& nCol, OUString sReplaceWith); virtual void Transform(ScDocument& rDoc) const override; virtual TransformationType getTransformationType() const override; const std::set<SCCOL>& getColumn() const; @@ -191,7 +191,7 @@ class FindReplaceTransformation : public DataTransformation OUString maReplaceString; public: - FindReplaceTransformation(SCCOL nCol, const OUString& aFindString, const OUString& aReplaceString); + FindReplaceTransformation(SCCOL nCol, OUString aFindString, OUString aReplaceString); virtual void Transform(ScDocument& rDoc) const override; virtual TransformationType getTransformationType() const override; SCCOL getColumn() const; @@ -205,7 +205,7 @@ class DeleteRowTransformation : public DataTransformation OUString maFindString; public: - DeleteRowTransformation(SCCOL nCol, const OUString& aFindString); + DeleteRowTransformation(SCCOL nCol, OUString aFindString); virtual void Transform(ScDocument& rDoc) const override; virtual TransformationType getTransformationType() const override; SCCOL getColumn() const; diff --git a/sc/source/ui/inc/drwtrans.hxx b/sc/source/ui/inc/drwtrans.hxx index 99fdcf0d40a7..34e4af7063fc 100644 --- a/sc/source/ui/inc/drwtrans.hxx +++ b/sc/source/ui/inc/drwtrans.hxx @@ -66,7 +66,7 @@ private: public: ScDrawTransferObj( std::unique_ptr<SdrModel> pClipModel, ScDocShell* pContainerShell, - const TransferableObjectDescriptor& rDesc ); + TransferableObjectDescriptor aDesc ); virtual ~ScDrawTransferObj() override; virtual void AddSupportedFormats() override; diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx index c52452841b6c..8c8203746526 100644 --- a/sc/source/ui/inc/filldlg.hxx +++ b/sc/source/ui/inc/filldlg.hxx @@ -32,7 +32,7 @@ public: FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd, - const OUString& aStartStr, + OUString aStartStr, double fStep, double fMax, SCSIZE nSelectHeight, diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index 765c32522b29..353a94167a37 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -310,7 +310,7 @@ public: ScInputHdlState( const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, - const OUString& rString, + OUString aString, const EditTextObject* pData ); ScInputHdlState( const ScInputHdlState& rCpy ); ~ScInputHdlState(); diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index 9d121a928fa6..c6e89ab9fed0 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -27,7 +27,7 @@ class ScDocument; class ScMoveTableDlg : public weld::GenericDialogController { public: - ScMoveTableDlg(weld::Window* pParent, const OUString& rDefault); + ScMoveTableDlg(weld::Window* pParent, OUString aDefault); virtual ~ScMoveTableDlg() override; sal_uInt16 GetSelectedDocument () const { return nDocument; } diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx index 1ed812d0fb82..5fb1d6e94704 100644 --- a/sc/source/ui/inc/notemark.hxx +++ b/sc/source/ui/inc/notemark.hxx @@ -55,7 +55,7 @@ private: public: ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* pBottom, vcl::Window* pDiagonal, - ScDocument* pD, const ScAddress& aPos, const OUString& rUser, + ScDocument* pD, const ScAddress& aPos, OUString aUser, const MapMode& rMap, bool bLeftEdge, bool bForce, bool bKeyboard); ~ScNoteMarker(); diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 538a4a536009..1c2329a6aff1 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -69,10 +69,10 @@ class ScOptSolverSave css::uno::Sequence<css::beans::PropertyValue> maProperties; public: - ScOptSolverSave( const OUString& rObjective, bool bMax, bool bMin, bool bValue, - const OUString& rTarget, const OUString& rVariable, + ScOptSolverSave( OUString aObjective, bool bMax, bool bMin, bool bValue, + OUString aTarget, OUString aVariable, std::vector<ScOptConditionRow>&& rConditions, - const OUString& rEngine, + OUString aEngine, const css::uno::Sequence<css::beans::PropertyValue>& rProperties ); const OUString& GetObjective() const { return maObjective; } diff --git a/sc/source/ui/inc/overlayobject.hxx b/sc/source/ui/inc/overlayobject.hxx index ea7a4adf3aba..35ea695edaf0 100644 --- a/sc/source/ui/inc/overlayobject.hxx +++ b/sc/source/ui/inc/overlayobject.hxx @@ -44,7 +44,7 @@ private: class ScOverlayHint : public sdr::overlay::OverlayObject { public: - ScOverlayHint(const OUString& rTit, const OUString& rMsg, const Color& rColor, const vcl::Font& rFont); + ScOverlayHint(OUString aTit, const OUString& rMsg, const Color& rColor, vcl::Font aFont); Size GetSizePixel() const; void SetPos(const Point& rPos, const MapMode& rMode); diff --git a/sc/source/ui/inc/pfuncache.hxx b/sc/source/ui/inc/pfuncache.hxx index c3324e2f69f6..5621cd2628ac 100644 --- a/sc/source/ui/inc/pfuncache.hxx +++ b/sc/source/ui/inc/pfuncache.hxx @@ -93,7 +93,7 @@ class ScPrintFuncCache public: ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark, - const ScPrintSelectionStatus& rStatus ); + ScPrintSelectionStatus aStatus ); ~ScPrintFuncCache(); bool IsSameSelection( const ScPrintSelectionStatus& rStatus ) const; diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index 17a20526be02..9a7fa4a1f2b4 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -137,7 +137,7 @@ class ScDPSubtotalOptDlg : public weld::GenericDialogController { public: explicit ScDPSubtotalOptDlg(weld::Window* pParent, ScDPObject& rDPObj, - const ScDPLabelData& rLabelData, const ScDPNameVec& rDataFields, + ScDPLabelData aLabelData, const ScDPNameVec& rDataFields, bool bEnableLayout ); virtual ~ScDPSubtotalOptDlg() override; void FillLabelData( ScDPLabelData& rLabelData ) const; diff --git a/sc/source/ui/inc/rfindlst.hxx b/sc/source/ui/inc/rfindlst.hxx index bd8f6cff10eb..18e13a09b2d3 100644 --- a/sc/source/ui/inc/rfindlst.hxx +++ b/sc/source/ui/inc/rfindlst.hxx @@ -45,7 +45,7 @@ class ScRangeFindList sal_uInt16 nIndexColor; public: - ScRangeFindList(const OUString& rName); + ScRangeFindList(OUString aName); sal_uLong Count() const { return maEntries.size(); } Color Insert( const ScRangeFindData &rNew ); diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx index 5e39ef758a4c..a43a6b6320e0 100644 --- a/sc/source/ui/inc/solveroptions.hxx +++ b/sc/source/ui/inc/solveroptions.hxx @@ -19,6 +19,7 @@ #pragma once +#include <utility> #include <vcl/weld.hxx> #include <com/sun/star/uno/Sequence.hxx> @@ -34,11 +35,11 @@ class ScSolverOptionsString OUString msStr; public: - explicit ScSolverOptionsString(const OUString& rStr) + explicit ScSolverOptionsString(OUString aStr) : mbIsDouble(false) , mfDoubleValue(0.0) , mnIntValue(0) - , msStr(rStr) + , msStr(std::move(aStr)) { } @@ -82,7 +83,7 @@ public: ScSolverOptionsDialog( weld::Window* pParent, const css::uno::Sequence<OUString>& rImplNames, const css::uno::Sequence<OUString>& rDescriptions, - const OUString& rEngine, + OUString aEngine, const css::uno::Sequence<css::beans::PropertyValue>& rProperties ); virtual ~ScSolverOptionsDialog() override; diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx index c6d75675d397..98baa5c8e46a 100644 --- a/sc/source/ui/inc/spelleng.hxx +++ b/sc/source/ui/inc/spelleng.hxx @@ -130,7 +130,7 @@ public: explicit ScTextConversionEngine( SfxItemPool* pEnginePool, ScViewData& rViewData, - const ScConversionParam& rConvParam, + ScConversionParam aConvParam, ScDocument* pUndoDoc, ScDocument* pRedoDoc ); diff --git a/sc/source/ui/inc/spellparam.hxx b/sc/source/ui/inc/spellparam.hxx index ba6f56d7f4ef..7aff4317fd1d 100644 --- a/sc/source/ui/inc/spellparam.hxx +++ b/sc/source/ui/inc/spellparam.hxx @@ -47,7 +47,7 @@ public: ScConversionType eConvType, LanguageType eSourceLang, LanguageType eTargetLang, - const vcl::Font& rTargetFont, + vcl::Font aTargetFont, sal_Int32 nOptions, bool bIsInteractive ); diff --git a/sc/source/ui/inc/tbzoomsliderctrl.hxx b/sc/source/ui/inc/tbzoomsliderctrl.hxx index 36710d6bb1d2..93a3716f7a2f 100644 --- a/sc/source/ui/inc/tbzoomsliderctrl.hxx +++ b/sc/source/ui/inc/tbzoomsliderctrl.hxx @@ -59,7 +59,7 @@ private: void DoPaint(vcl::RenderContext& rRenderContext); public: - ScZoomSlider(const css::uno::Reference<css::frame::XDispatchProvider>& rDispatchProvider, + ScZoomSlider(css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider, sal_uInt16 nCurrentZoom); void UpdateFromItem(const SvxZoomSliderItem* pZoomSliderItem); diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx index adc58b6a5b3d..8429b6e6c257 100644 --- a/sc/source/ui/inc/transobj.hxx +++ b/sc/source/ui/inc/transobj.hxx @@ -67,7 +67,7 @@ private: static void GetAreaSize( const ScDocument& rDoc, SCTAB nTab1, SCTAB nTab2, SCROW& nRow, SCCOL& nCol ); public: - ScTransferObj( const std::shared_ptr<ScDocument>& pClipDoc, const TransferableObjectDescriptor& rDesc ); + ScTransferObj( const std::shared_ptr<ScDocument>& pClipDoc, TransferableObjectDescriptor aDesc ); virtual ~ScTransferObj() override; virtual void AddSupportedFormats() override; diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx index 7a16c79f2bac..71216eb687b9 100644 --- a/sc/source/ui/inc/uiitems.hxx +++ b/sc/source/ui/inc/uiitems.hxx @@ -55,7 +55,7 @@ public: const ScAddress& rCurPos, const ScAddress& rStartPos, const ScAddress& rEndPos, - const OUString& rString, + OUString aString, const EditTextObject* pData ); ScInputStatusItem( const ScInputStatusItem& rItem ); virtual ~ScInputStatusItem() override; diff --git a/sc/source/ui/inc/undo/UndoDeleteSparklineGroup.hxx b/sc/source/ui/inc/undo/UndoDeleteSparklineGroup.hxx index 081a741ab347..7ca6c6007782 100644 --- a/sc/source/ui/inc/undo/UndoDeleteSparklineGroup.hxx +++ b/sc/source/ui/inc/undo/UndoDeleteSparklineGroup.hxx @@ -28,7 +28,7 @@ private: public: UndoDeleteSparklineGroup(ScDocShell& rDocShell, - std::shared_ptr<sc::SparklineGroup> const& pSparklineGroup, + std::shared_ptr<sc::SparklineGroup> pSparklineGroup, SCTAB nSheetIndex); virtual ~UndoDeleteSparklineGroup() override; diff --git a/sc/source/ui/inc/undo/UndoEditSparkline.hxx b/sc/source/ui/inc/undo/UndoEditSparkline.hxx index 4e33eaa1f5df..78bd096bc9c3 100644 --- a/sc/source/ui/inc/undo/UndoEditSparkline.hxx +++ b/sc/source/ui/inc/undo/UndoEditSparkline.hxx @@ -30,8 +30,8 @@ private: ScRangeList maNewDataRange; public: - UndoEditSparkline(ScDocShell& rDocShell, std::shared_ptr<sc::Sparkline> const& rpSparkline, - SCTAB nTab, ScRangeList const& rDataRange); + UndoEditSparkline(ScDocShell& rDocShell, std::shared_ptr<sc::Sparkline> pSparkline, SCTAB nTab, + ScRangeList rDataRange); virtual ~UndoEditSparkline() override; diff --git a/sc/source/ui/inc/undo/UndoEditSparklineGroup.hxx b/sc/source/ui/inc/undo/UndoEditSparklineGroup.hxx index 4ab3e6a4e48f..b529c0234db6 100644 --- a/sc/source/ui/inc/undo/UndoEditSparklineGroup.hxx +++ b/sc/source/ui/inc/undo/UndoEditSparklineGroup.hxx @@ -29,7 +29,7 @@ private: public: UndoEditSparklneGroup(ScDocShell& rDocShell, std::shared_ptr<sc::SparklineGroup> const& rSparklineGroup, - sc::SparklineAttributes const& rAttributes); + sc::SparklineAttributes aAttributes); virtual ~UndoEditSparklneGroup() override; void Undo() override; diff --git a/sc/source/ui/inc/undo/UndoGroupSparklines.hxx b/sc/source/ui/inc/undo/UndoGroupSparklines.hxx index bcbc470bcd86..e67778c21309 100644 --- a/sc/source/ui/inc/undo/UndoGroupSparklines.hxx +++ b/sc/source/ui/inc/undo/UndoGroupSparklines.hxx @@ -12,17 +12,18 @@ #include <undobase.hxx> #include <memory> +#include <utility> namespace sc { /** Previous sparkline group data, which is restored at Undo grouping */ struct UndoGroupSparklinesData { - UndoGroupSparklinesData(ScAddress const& rAddress, ScRangeList const& rDataRangeList, - std::shared_ptr<sc::SparklineGroup> const& rpGroup) + UndoGroupSparklinesData(ScAddress const& rAddress, ScRangeList aDataRangeList, + std::shared_ptr<sc::SparklineGroup> pGroup) : m_aAddress(rAddress) - , m_aDataRangeList(rDataRangeList) - , m_pSparklineGroup(rpGroup) + , m_aDataRangeList(std::move(aDataRangeList)) + , m_pSparklineGroup(std::move(pGroup)) { } @@ -41,7 +42,7 @@ private: public: UndoGroupSparklines(ScDocShell& rDocShell, ScRange const& rRange, - std::shared_ptr<sc::SparklineGroup> const& rpSparklineGroup); + std::shared_ptr<sc::SparklineGroup> pSparklineGroup); virtual ~UndoGroupSparklines() override; void Undo() override; diff --git a/sc/source/ui/inc/undo/UndoInsertSparkline.hxx b/sc/source/ui/inc/undo/UndoInsertSparkline.hxx index d9e1885f171c..5262297a2495 100644 --- a/sc/source/ui/inc/undo/UndoInsertSparkline.hxx +++ b/sc/source/ui/inc/undo/UndoInsertSparkline.hxx @@ -27,8 +27,7 @@ private: std::shared_ptr<sc::SparklineGroup> mpSparklineGroup; public: - UndoInsertSparkline(ScDocShell& rDocShell, - std::vector<SparklineData> const& rSparklineDataVector, + UndoInsertSparkline(ScDocShell& rDocShell, std::vector<SparklineData> pSparklineDataVector, std::shared_ptr<sc::SparklineGroup> pSparklineGroup); virtual ~UndoInsertSparkline() override; diff --git a/sc/source/ui/inc/undo/UndoUngroupSparklines.hxx b/sc/source/ui/inc/undo/UndoUngroupSparklines.hxx index ce49d701e72b..7c836ac2d1ce 100644 --- a/sc/source/ui/inc/undo/UndoUngroupSparklines.hxx +++ b/sc/source/ui/inc/undo/UndoUngroupSparklines.hxx @@ -12,17 +12,18 @@ #include <undobase.hxx> #include <memory> +#include <utility> namespace sc { /** Previous sparkline group data, which is restored at undo ungroupping */ struct SparklineUndoData { - SparklineUndoData(ScAddress const& rAddress, ScRangeList const& rDataRangeList, - std::shared_ptr<sc::SparklineGroup> const& rpGroup) + SparklineUndoData(ScAddress const& rAddress, ScRangeList aDataRangeList, + std::shared_ptr<sc::SparklineGroup> pGroup) : m_aAddress(rAddress) - , m_aDataRangeList(rDataRangeList) - , m_pSparklineGroup(rpGroup) + , m_aDataRangeList(std::move(aDataRangeList)) + , m_pSparklineGroup(std::move(pGroup)) { } diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx index 460702a5fbaa..25cee7e5c5a5 100644 --- a/sc/source/ui/inc/undobase.hxx +++ b/sc/source/ui/inc/undobase.hxx @@ -103,7 +103,7 @@ protected: class SC_DLLPUBLIC ScMultiBlockUndo: public ScSimpleUndo { public: - ScMultiBlockUndo(ScDocShell* pDocSh, const ScRangeList& rRanges); + ScMultiBlockUndo(ScDocShell* pDocSh, ScRangeList aRanges); virtual ~ScMultiBlockUndo() override; protected: diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index a0de06cb698d..fef867d5bbdf 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -137,7 +137,7 @@ public: ScUndoCut(ScDocShell* pNewDocShell, const ScRange& aRange, // adjusted for merged cells const ScAddress& aOldEnd, // end position without adjustment - const ScMarkData& rMark, // selected sheets + ScMarkData aMark, // selected sheets ScDocumentUniquePtr pNewUndoDoc); virtual ~ScUndoCut() override; @@ -181,7 +181,7 @@ class SC_DLLPUBLIC ScUndoPaste: public ScMultiBlockUndo { public: ScUndoPaste(ScDocShell* pNewDocShell, const ScRangeList& rRanges, - const ScMarkData& rMark, + ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc, InsertDeleteFlags nNewFlags, std::unique_ptr<ScRefUndoData> pRefData, @@ -249,7 +249,7 @@ class ScUndoDeleteContents: public ScSimpleUndo { public: ScUndoDeleteContents( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, const ScRange& rRange, ScDocumentUniquePtr&& pNewUndoDoc, bool bNewMulti, InsertDeleteFlags nNewFlags, bool bObjects ); @@ -284,7 +284,7 @@ class ScUndoFillTable: public ScSimpleUndo { public: ScUndoFillTable( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocumentUniquePtr pNewUndoDoc, bool bNewMulti, SCTAB nSrc, @@ -320,7 +320,7 @@ class ScUndoSelectionAttr: public ScSimpleUndo { public: ScUndoSelectionAttr( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocumentUniquePtr pNewUndoDoc, bool bNewMulti, @@ -357,7 +357,7 @@ class ScUndoWidthOrHeight: public ScSimpleUndo { public: ScUndoWidthOrHeight( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab, ScDocumentUniquePtr pNewUndoDoc, @@ -394,7 +394,7 @@ class ScUndoAutoFill: public ScBlockUndo public: ScUndoAutoFill( ScDocShell* pNewDocShell, const ScRange& rRange, const ScRange& rSourceArea, - ScDocumentUniquePtr pNewUndoDoc, const ScMarkData& rMark, + ScDocumentUniquePtr pNewUndoDoc, ScMarkData aMark, FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd, double fNewStartValue, double fNewStepValue, double fNewMaxValue ); @@ -427,7 +427,7 @@ private: class ScUndoMerge: public ScSimpleUndo { public: - ScUndoMerge( ScDocShell* pNewDocShell, const ScCellMergeOption& rOption, + ScUndoMerge( ScDocShell* pNewDocShell, ScCellMergeOption aOption, bool bMergeContents, ScDocumentUniquePtr pUndoDoc, std::unique_ptr<SdrUndoAction> pDrawUndo); virtual ~ScUndoMerge() override; @@ -453,7 +453,7 @@ class ScUndoAutoFormat: public ScBlockUndo public: ScUndoAutoFormat( ScDocShell* pNewDocShell, const ScRange& rRange, ScDocumentUniquePtr pNewUndoDoc, - const ScMarkData& rMark, + ScMarkData aMark, bool bNewSize, sal_uInt16 nNewFormatNo ); virtual ~ScUndoAutoFormat() override; @@ -476,9 +476,9 @@ class ScUndoReplace: public ScSimpleUndo { public: ScUndoReplace( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - const OUString& rNewUndoStr, ScDocumentUniquePtr pNewUndoDoc, + OUString aNewUndoStr, ScDocumentUniquePtr pNewUndoDoc, const SvxSearchItem* pItem ); virtual ~ScUndoReplace() override; @@ -537,10 +537,10 @@ class ScUndoConversion : public ScSimpleUndo { public: - ScUndoConversion( ScDocShell* pNewDocShell, const ScMarkData& rMark, + ScUndoConversion( ScDocShell* pNewDocShell, ScMarkData aMark, SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScDocumentUniquePtr pNewUndoDoc, SCCOL nNewX, SCROW nNewY, SCTAB nNewZ, ScDocumentUniquePtr pNewRedoDoc, - const ScConversionParam& rConvParam ); + ScConversionParam aConvParam ); virtual ~ScUndoConversion() override; virtual void Undo() override; @@ -568,7 +568,7 @@ class ScUndoRefConversion: public ScSimpleUndo { public: ScUndoRefConversion( ScDocShell* pNewDocShell, - const ScRange& aMarkRange, const ScMarkData& rMark, + const ScRange& aMarkRange, ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc, bool bNewMulti); virtual ~ScUndoRefConversion() override; @@ -659,9 +659,9 @@ class ScUndoUseScenario: public ScSimpleUndo { public: ScUndoUseScenario( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, const ScArea& rDestArea, ScDocumentUniquePtr pNewUndoDoc, - const OUString& rNewName ); + OUString aNewName ); virtual ~ScUndoUseScenario() override; virtual void Undo() override; @@ -683,9 +683,9 @@ class ScUndoSelectionStyle: public ScSimpleUndo { public: ScUndoSelectionStyle( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, const ScRange& rRange, - const OUString& rName, + OUString aName, ScDocumentUniquePtr pNewUndoDoc ); virtual ~ScUndoSelectionStyle() override; @@ -730,7 +730,7 @@ public: ScUndoEnterMatrix( ScDocShell* pNewDocShell, const ScRange& rArea, ScDocumentUniquePtr pNewUndoDoc, - const OUString& rForm ); + OUString aForm ); virtual ~ScUndoEnterMatrix() override; virtual void Undo() override; @@ -754,9 +754,9 @@ class ScUndoInsertAreaLink : public ScSimpleUndo { public: ScUndoInsertAreaLink( ScDocShell* pShell, - const OUString& rDocName, - const OUString& rFltName, const OUString& rOptions, - const OUString& rAreaName, const ScRange& rDestRange, + OUString aDocName, + OUString aFltName, OUString aOptions, + OUString aAreaName, const ScRange& rDestRange, sal_uLong nRefreshDelay ); virtual ~ScUndoInsertAreaLink() override; @@ -780,9 +780,9 @@ class ScUndoRemoveAreaLink : public ScSimpleUndo { public: ScUndoRemoveAreaLink( ScDocShell* pShell, - const OUString& rDocName, - const OUString& rFltName, const OUString& rOptions, - const OUString& rAreaName, const ScRange& rDestRange, + OUString aDocName, + OUString aFltName, OUString aOptions, + OUString aAreaName, const ScRange& rDestRange, sal_uLong nRefreshDelay ); virtual ~ScUndoRemoveAreaLink() override; @@ -806,13 +806,13 @@ class ScUndoUpdateAreaLink : public ScSimpleUndo //! also change BlockUnd { public: ScUndoUpdateAreaLink(ScDocShell* pShell, - const OUString& rOldD, - const OUString& rOldF, const OUString& rOldO, - const OUString& rOldA, const ScRange& rOldR, + OUString aOldD, + OUString aOldF, OUString aOldO, + OUString aOldA, const ScRange& rOldR, sal_uLong nOldRD, - const OUString& rNewD, - const OUString& rNewF, const OUString& rNewO, - const OUString& rNewA, const ScRange& rNewR, + OUString aNewD, + OUString aNewF, OUString aNewO, + OUString aNewA, const ScRange& rNewR, sal_uLong nNewRD, ScDocumentUniquePtr pUndo, ScDocumentUniquePtr pRedo, bool bDoInsert); diff --git a/sc/source/ui/inc/undocell.hxx b/sc/source/ui/inc/undocell.hxx index 206ed7d31713..bfc82abe97f6 100644 --- a/sc/source/ui/inc/undocell.hxx +++ b/sc/source/ui/inc/undocell.hxx @@ -85,7 +85,7 @@ public: ScUndoEnterData( ScDocShell* pNewDocShell, const ScAddress& rPos, - ValuesType& rOldValues, const OUString& rNewStr, std::unique_ptr<EditTextObject> pObj ); + ValuesType& rOldValues, OUString aNewStr, std::unique_ptr<EditTextObject> pObj ); virtual void Undo() override; virtual void Redo() override; @@ -113,7 +113,7 @@ class ScUndoEnterValue: public ScSimpleUndo public: ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos, - const ScCellValue& rUndoCell, double nVal ); + ScCellValue aUndoCell, double nVal ); virtual ~ScUndoEnterValue() override; @@ -138,7 +138,7 @@ private: class ScUndoSetCell : public ScSimpleUndo { public: - ScUndoSetCell( ScDocShell* pDocSh, const ScAddress& rPos, const ScCellValue& rOldVal, const ScCellValue& rNewVal ); + ScUndoSetCell( ScDocShell* pDocSh, const ScAddress& rPos, ScCellValue aOldVal, ScCellValue aNewVal ); virtual ~ScUndoSetCell() override; @@ -216,7 +216,7 @@ class ScUndoThesaurus: public ScSimpleUndo public: ScUndoThesaurus( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, - const ScCellValue& rOldText, const ScCellValue& rNewText ); + ScCellValue aOldText, ScCellValue aNewText ); virtual ~ScUndoThesaurus() override; virtual void Undo() override; @@ -256,8 +256,8 @@ public: ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rPos, - const ScNoteData& rOldData, - const ScNoteData& rNewData, + ScNoteData aOldData, + ScNoteData aNewData, std::unique_ptr<SdrUndoAction> pDrawUndo ); virtual ~ScUndoReplaceNote() override; diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx index 486fe07d11ca..5060bf0c1059 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -244,7 +244,7 @@ private: public: ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange, - const OUString& rName, bool bSet ); + OUString aName, bool bSet ); virtual ~ScUndoAutoFilter() override; virtual void Undo() override; @@ -388,10 +388,10 @@ class ScUndoChartData: public ScSimpleUndo { public: ScUndoChartData( ScDocShell* pNewDocShell, - const OUString& rName, const ScRange& rNew, + OUString aName, const ScRange& rNew, bool bColHdr, bool bRowHdr, bool bAdd ); ScUndoChartData( ScDocShell* pNewDocShell, - const OUString& rName, const ScRangeListRef& rNew, + OUString aName, ScRangeListRef xNew, bool bColHdr, bool bRowHdr, bool bAdd ); virtual ~ScUndoChartData() override; diff --git a/sc/source/ui/inc/undosort.hxx b/sc/source/ui/inc/undosort.hxx index 64b4f0da7859..40ba12cac95a 100644 --- a/sc/source/ui/inc/undosort.hxx +++ b/sc/source/ui/inc/undosort.hxx @@ -19,7 +19,7 @@ class UndoSort : public ScSimpleUndo ReorderParam maParam; public: - UndoSort( ScDocShell* pDocSh, const ReorderParam& rParam ); + UndoSort( ScDocShell* pDocSh, ReorderParam aParam ); virtual OUString GetComment() const override; virtual void Undo() override; diff --git a/sc/source/ui/inc/undostyl.hxx b/sc/source/ui/inc/undostyl.hxx index 6c169c43e32b..39b55c0bda81 100644 --- a/sc/source/ui/inc/undostyl.hxx +++ b/sc/source/ui/inc/undostyl.hxx @@ -74,7 +74,7 @@ public: class ScUndoApplyPageStyle: public ScSimpleUndo { public: - ScUndoApplyPageStyle( ScDocShell* pDocSh, const OUString& rNewStyle ); + ScUndoApplyPageStyle( ScDocShell* pDocSh, OUString aNewStyle ); virtual ~ScUndoApplyPageStyle() override; void AddSheetAction( SCTAB nTab, const OUString& rOld ); @@ -91,7 +91,7 @@ private: { SCTAB mnTab; OUString maOldStyle; - explicit ApplyStyleEntry( SCTAB nTab, const OUString& rOldStyle ); + explicit ApplyStyleEntry( SCTAB nTab, OUString aOldStyle ); }; typedef ::std::vector< ApplyStyleEntry > ApplyStyleVec; diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx index 2d94d69657c0..ce9a9d190fdb 100644 --- a/sc/source/ui/inc/undotab.hxx +++ b/sc/source/ui/inc/undotab.hxx @@ -41,7 +41,7 @@ public: ScDocShell* pNewDocShell, SCTAB nTabNum, bool bApp, - const OUString& rNewName); + OUString aNewName); virtual ~ScUndoInsertTab() override; virtual void Undo() override; @@ -225,7 +225,7 @@ public: ScUndoMakeScenario( ScDocShell* pNewDocShell, SCTAB nSrc, SCTAB nDest, - const OUString& rN, const OUString& rC, + OUString aN, OUString aC, const Color& rCol, ScScenarioFlags nF, const ScMarkData& rMark ); virtual ~ScUndoMakeScenario() override; @@ -277,7 +277,7 @@ class ScUndoRemoveLink : public ScSimpleUndo public: ScUndoRemoveLink( // Call before delete! ScDocShell* pShell, - const OUString& rDoc ); + OUString aDoc ); virtual ~ScUndoRemoveLink() override; virtual void Undo() override; @@ -398,8 +398,8 @@ class ScUndoScenarioFlags: public ScSimpleUndo public: ScUndoScenarioFlags( ScDocShell* pNewDocShell, SCTAB nT, - const OUString& rON, const OUString& rNN, - const OUString& rOC, const OUString& rNC, + OUString aON, OUString aNN, + OUString aOC, OUString aNC, const Color& rOCol, const Color& rNCol, ScScenarioFlags nOF, ScScenarioFlags nNF); @@ -428,8 +428,8 @@ class ScUndoRenameObject: public ScSimpleUndo { public: ScUndoRenameObject( - ScDocShell* pNewDocShell, const OUString& rPN, - const OUString& rON, const OUString& rNN ); + ScDocShell* pNewDocShell, OUString aPN, + OUString aON, OUString aNN ); virtual ~ScUndoRenameObject() override; diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx index f26e2ae7a76f..b5b55b723222 100644 --- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx +++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx @@ -19,6 +19,7 @@ #include <sal/log.hxx> #include <sfx2/filedlghelper.hxx> #include <unotools/charclass.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <utility> @@ -524,7 +525,7 @@ ScReplaceNullTransformation::ScReplaceNullTransformation(const ScDocument *pDoc, , mxColumnNums(mxBuilder->weld_entry("ed_columns")) , mxReplaceString(mxBuilder->weld_entry("ed_str")) , mxDelete(mxBuilder->weld_button("ed_delete")) - , maDeleteTransformation(aDeleteTransformation) + , maDeleteTransformation(std::move(aDeleteTransformation)) , mpDoc(pDoc) { mxDelete->connect_clicked(LINK(this,ScReplaceNullTransformation, DeleteHdl)); @@ -575,7 +576,7 @@ ScDateTimeTransformation::ScDateTimeTransformation(const ScDocument* pDoc, weld: , mxColumnNums(mxBuilder->weld_entry("ed_columns")) , mxType(mxBuilder->weld_combo_box("ed_lst")) , mxDelete(mxBuilder->weld_button("ed_delete")) - , maDeleteTransformation(aDeleteTransformation) + , maDeleteTransformation(std::move(aDeleteTransformation)) , mpDoc(pDoc) { mxDelete->connect_clicked(LINK(this,ScDateTimeTransformation, DeleteHdl)); diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index c72201d26fb5..2210df0f8e9a 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -20,6 +20,7 @@ #undef SC_DLLIMPLEMENTATION #include <svl/numformat.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -35,14 +36,14 @@ ScFillSeriesDlg::ScFillSeriesDlg( weld::Window* pParent, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd, - const OUString& aStartStr, + OUString aStartStr, double fStep, double fMax, const SCSIZE nSelectHeight, const SCSIZE nSelectWidth, sal_uInt16 nPossDir ) : GenericDialogController(pParent, "modules/scalc/ui/filldlg.ui", "FillSeriesDialog") - , aStartStrVal(aStartStr) + , aStartStrVal(std::move(aStartStr)) , aErrMsgInvalidVal(ScResId(SCSTR_VALERR)) , rDoc(rDocument) , theFillDir(eFillDir) diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 80eeaeadecfa..9cc587aa56e0 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -25,10 +25,11 @@ #include <globstr.hrc> #include <scresid.hxx> #include <comphelper/lok.hxx> +#include <utility> -ScMoveTableDlg::ScMoveTableDlg(weld::Window* pParent, const OUString& rDefault) +ScMoveTableDlg::ScMoveTableDlg(weld::Window* pParent, OUString aDefault) : GenericDialogController(pParent, "modules/scalc/ui/movecopysheet.ui", "MoveCopySheetDialog") - , maDefaultName(rDefault) + , maDefaultName(std::move(aDefault)) , mnCurrentDocPos(0) , nDocument(0) , nTable(0) diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index f0f5eb30c5d7..f423ceb1d7a5 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -20,6 +20,7 @@ #include <rangelst.hxx> #include <sfx2/bindings.hxx> #include <svl/numformat.hxx> +#include <utility> #include <vcl/commandinfoprovider.hxx> #include <vcl/weld.hxx> #include <vcl/svapp.hxx> @@ -131,19 +132,19 @@ IMPL_LINK(ScCursorRefEdit, KeyInputHdl, const KeyEvent&, rKEvt, bool) return formula::RefEdit::KeyInput(rKEvt); } -ScOptSolverSave::ScOptSolverSave( const OUString& rObjective, bool bMax, bool bMin, bool bValue, - const OUString& rTarget, const OUString& rVariable, +ScOptSolverSave::ScOptSolverSave( OUString aObjective, bool bMax, bool bMin, bool bValue, + OUString aTarget, OUString aVariable, std::vector<ScOptConditionRow>&& rConditions, - const OUString& rEngine, + OUString aEngine, const uno::Sequence<beans::PropertyValue>& rProperties ) : - maObjective( rObjective ), + maObjective( std::move(aObjective) ), mbMax( bMax ), mbMin( bMin ), mbValue( bValue ), - maTarget( rTarget ), - maVariable( rVariable ), + maTarget( std::move(aTarget) ), + maVariable( std::move(aVariable) ), maConditions( std::move(rConditions) ), - maEngine( rEngine ), + maEngine( std::move(aEngine) ), maProperties( rProperties ) { } diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index 41603b6d517e..3541084906cc 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -33,6 +33,7 @@ #include <com/sun/star/sheet/XSolver.hpp> #include <com/sun/star/sheet/XSolverDescription.hpp> #include <com/sun/star/beans/PropertyValue.hpp> +#include <utility> using namespace com::sun::star; @@ -57,11 +58,11 @@ struct ScSolverOptionsEntry ScSolverOptionsDialog::ScSolverOptionsDialog(weld::Window* pParent, const uno::Sequence<OUString>& rImplNames, const uno::Sequence<OUString>& rDescriptions, - const OUString& rEngine, + OUString aEngine, const uno::Sequence<beans::PropertyValue>& rProperties ) : GenericDialogController(pParent, "modules/scalc/ui/solveroptionsdialog.ui", "SolverOptionsDialog") , maImplNames(rImplNames) - , maEngine(rEngine) + , maEngine(std::move(aEngine)) , maProperties(rProperties) , m_xLbEngine(m_xBuilder->weld_combo_box("engine")) , m_xLbSettings(m_xBuilder->weld_tree_view("settings")) diff --git a/sc/source/ui/sparklines/SparklineGroup.cxx b/sc/source/ui/sparklines/SparklineGroup.cxx index 1ba235e75014..a7fe2fe4682b 100644 --- a/sc/source/ui/sparklines/SparklineGroup.cxx +++ b/sc/source/ui/sparklines/SparklineGroup.cxx @@ -9,11 +9,12 @@ */ #include <SparklineGroup.hxx> +#include <utility> namespace sc { -SparklineGroup::SparklineGroup(SparklineAttributes const& rSparklineAttributes) - : m_aAttributes(rSparklineAttributes) +SparklineGroup::SparklineGroup(SparklineAttributes aSparklineAttributes) + : m_aAttributes(std::move(aSparklineAttributes)) , m_aGUID(tools::Guid::Generate) { } diff --git a/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx b/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx index 9a8e4eb5df48..71702560b03c 100644 --- a/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx +++ b/sc/source/ui/undo/UndoDeleteSparklineGroup.cxx @@ -16,13 +16,14 @@ #include <Sparkline.hxx> #include <SparklineList.hxx> #include <SparklineGroup.hxx> +#include <utility> namespace sc { UndoDeleteSparklineGroup::UndoDeleteSparklineGroup( - ScDocShell& rDocShell, std::shared_ptr<sc::SparklineGroup> const& pSparklineGroup, SCTAB nTab) + ScDocShell& rDocShell, std::shared_ptr<sc::SparklineGroup> pSparklineGroup, SCTAB nTab) : ScSimpleUndo(&rDocShell) - , mpSparklineGroup(pSparklineGroup) + , mpSparklineGroup(std::move(pSparklineGroup)) , mnTab(nTab) { } diff --git a/sc/source/ui/undo/UndoEditSparkline.cxx b/sc/source/ui/undo/UndoEditSparkline.cxx index b1f6f38f5dc4..f33b7fa7aabe 100644 --- a/sc/source/ui/undo/UndoEditSparkline.cxx +++ b/sc/source/ui/undo/UndoEditSparkline.cxx @@ -14,17 +14,18 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> +#include <utility> namespace sc { UndoEditSparkline::UndoEditSparkline(ScDocShell& rDocShell, - std::shared_ptr<sc::Sparkline> const& rpSparkline, SCTAB nTab, - ScRangeList const& rDataRange) + std::shared_ptr<sc::Sparkline> pSparkline, SCTAB nTab, + ScRangeList aDataRange) : ScSimpleUndo(&rDocShell) - , mpSparkline(rpSparkline) + , mpSparkline(std::move(pSparkline)) , mnTab(nTab) , maOldDataRange(mpSparkline->getInputRange()) - , maNewDataRange(rDataRange) + , maNewDataRange(std::move(aDataRange)) { } diff --git a/sc/source/ui/undo/UndoEditSparklineGroup.cxx b/sc/source/ui/undo/UndoEditSparklineGroup.cxx index 8136003d6b20..dbe7a7b59987 100644 --- a/sc/source/ui/undo/UndoEditSparklineGroup.cxx +++ b/sc/source/ui/undo/UndoEditSparklineGroup.cxx @@ -16,15 +16,16 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> #include <SparklineAttributes.hxx> +#include <utility> namespace sc { UndoEditSparklneGroup::UndoEditSparklneGroup( ScDocShell& rDocShell, std::shared_ptr<sc::SparklineGroup> const& pSparklineGroup, - sc::SparklineAttributes const& rAttributes) + sc::SparklineAttributes aAttributes) : ScSimpleUndo(&rDocShell) , m_pSparklineGroup(pSparklineGroup) - , m_aNewAttributes(rAttributes) + , m_aNewAttributes(std::move(aAttributes)) , m_aOriginalAttributes(pSparklineGroup->getAttributes()) { } diff --git a/sc/source/ui/undo/UndoGroupSparklines.cxx b/sc/source/ui/undo/UndoGroupSparklines.cxx index ac2182714fc1..c8570995b655 100644 --- a/sc/source/ui/undo/UndoGroupSparklines.cxx +++ b/sc/source/ui/undo/UndoGroupSparklines.cxx @@ -16,15 +16,15 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> #include <SparklineAttributes.hxx> +#include <utility> namespace sc { -UndoGroupSparklines::UndoGroupSparklines( - ScDocShell& rDocShell, ScRange const& rRange, - std::shared_ptr<sc::SparklineGroup> const& rpSparklineGroup) +UndoGroupSparklines::UndoGroupSparklines(ScDocShell& rDocShell, ScRange const& rRange, + std::shared_ptr<sc::SparklineGroup> pSparklineGroup) : ScSimpleUndo(&rDocShell) , m_aRange(rRange) - , m_pSparklineGroup(rpSparklineGroup) + , m_pSparklineGroup(std::move(pSparklineGroup)) { } diff --git a/sc/source/ui/undo/UndoInsertSparkline.cxx b/sc/source/ui/undo/UndoInsertSparkline.cxx index c35cc3f6dc03..708f3d746f91 100644 --- a/sc/source/ui/undo/UndoInsertSparkline.cxx +++ b/sc/source/ui/undo/UndoInsertSparkline.cxx @@ -15,15 +15,16 @@ #include <Sparkline.hxx> #include <SparklineGroup.hxx> #include <SparklineData.hxx> +#include <utility> namespace sc { UndoInsertSparkline::UndoInsertSparkline(ScDocShell& rDocShell, - std::vector<SparklineData> const& rSparklineDataVector, + std::vector<SparklineData> aSparklineDataVector, std::shared_ptr<sc::SparklineGroup> pSparklineGroup) : ScSimpleUndo(&rDocShell) - , maSparklineDataVector(rSparklineDataVector) - , mpSparklineGroup(pSparklineGroup) + , maSparklineDataVector(std::move(aSparklineDataVector)) + , mpSparklineGroup(std::move(pSparklineGroup)) { } diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index cc7b8069cfe5..c9a233604281 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> #include <vcl/virdev.hxx> #include <svx/svdundo.hxx> @@ -343,9 +344,9 @@ void ScBlockUndo::ShowBlock() } ScMultiBlockUndo::ScMultiBlockUndo( - ScDocShell* pDocSh, const ScRangeList& rRanges) : + ScDocShell* pDocSh, ScRangeList aRanges) : ScSimpleUndo(pDocSh), - maBlockRanges(rRanges) + maBlockRanges(std::move(aRanges)) { mpDrawUndo = GetSdrUndoAction( &pDocShell->GetDocument() ); } diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index e3b10f78bca8..68f9351c5897 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -18,6 +18,7 @@ */ #include <scitems.hxx> +#include <utility> #include <vcl/virdev.hxx> #include <editeng/boxitem.hxx> #include <sfx2/app.hxx> @@ -813,9 +814,9 @@ bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoCut::ScUndoCut(ScDocShell* pNewDocShell, const ScRange& aRange, const ScAddress& aOldEnd, - const ScMarkData& rMark, ScDocumentUniquePtr pNewUndoDoc) + ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc) : ScBlockUndo(pNewDocShell, ScRange(aRange.aStart, aOldEnd), SC_UNDO_AUTOHEIGHT) - , aMarkData(rMark) + , aMarkData(std::move(aMark)) , pUndoDoc(std::move(pNewUndoDoc)) , aExtendedRange(aRange) { @@ -912,13 +913,13 @@ bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell, const ScRangeList& rRanges, - const ScMarkData& rMark, + ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc, InsertDeleteFlags nNewFlags, std::unique_ptr<ScRefUndoData> pRefData, bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) : ScMultiBlockUndo( pNewDocShell, rRanges ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), pUndoDoc( std::move(pNewUndoDoc) ), pRedoDoc( std::move(pNewRedoDoc) ), nFlags( nNewFlags ), @@ -1670,14 +1671,14 @@ bool ScUndoConditionalFormatList::CanRepeat(SfxRepeatTarget& ) const } ScUndoUseScenario::ScUndoUseScenario( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, /*C*/ const ScArea& rDestArea, ScDocumentUniquePtr pNewUndoDoc, - const OUString& rNewName ) : + OUString aNewName ) : ScSimpleUndo( pNewDocShell ), pUndoDoc( std::move(pNewUndoDoc) ), - aMarkData( rMark ), - aName( rNewName ) + aMarkData(std::move( aMark )), + aName(std::move( aNewName )) { aRange.aStart.SetCol(rDestArea.nColStart); aRange.aStart.SetRow(rDestArea.nRowStart); @@ -1789,14 +1790,14 @@ bool ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoSelectionStyle::ScUndoSelectionStyle( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, const ScRange& rRange, - const OUString& rName, + OUString aName, ScDocumentUniquePtr pNewUndoDoc ) : ScSimpleUndo( pNewDocShell ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), pUndoDoc( std::move(pNewUndoDoc) ), - aStyleName( rName ), + aStyleName(std::move( aName )), aRange( rRange ) { aMarkData.MarkToMulti(); @@ -1893,10 +1894,10 @@ bool ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoEnterMatrix::ScUndoEnterMatrix( ScDocShell* pNewDocShell, const ScRange& rArea, - ScDocumentUniquePtr pNewUndoDoc, const OUString& rForm ) : + ScDocumentUniquePtr pNewUndoDoc, OUString aForm ) : ScBlockUndo( pNewDocShell, rArea, SC_UNDO_SIMPLE ), pUndoDoc( std::move(pNewUndoDoc) ), - aFormula( rForm ) + aFormula(std::move( aForm )) { SetChangeTrack(); } diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index 52ee421cc3de..c296d0b811c1 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -31,16 +31,17 @@ #include <undoolk.hxx> #include <svx/svdundo.hxx> +#include <utility> /** Change column widths or row heights */ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab, ScDocumentUniquePtr pNewUndoDoc, std::vector<sc::ColRowSpan>&& rRanges, std::unique_ptr<ScOutlineTable> pNewUndoTab, ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, bool bNewWidth ) : ScSimpleUndo( pNewDocShell ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), nStart( nNewStart ), nEnd( nNewEnd ), nStartTab( nNewStartTab ), diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 4aa05b5780e8..79c4c7252705 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -26,6 +26,7 @@ #include <editeng/justifyitem.hxx> #include <svl/srchitem.hxx> #include <sfx2/linkmgr.hxx> +#include <utility> #include <vcl/virdev.hxx> #include <sfx2/app.hxx> #include <svx/svdundo.hxx> @@ -57,12 +58,12 @@ ScUndoDeleteContents::ScUndoDeleteContents( ScDocShell* pNewDocShell, - const ScMarkData& rMark, const ScRange& rRange, + ScMarkData aMark, const ScRange& rRange, ScDocumentUniquePtr&& pNewUndoDoc, bool bNewMulti, InsertDeleteFlags nNewFlags, bool bObjects ) : ScSimpleUndo( pNewDocShell ), aRange ( rRange ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), nFlags ( nNewFlags ), bMulti ( bNewMulti ) // unnecessary @@ -203,14 +204,14 @@ bool ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocumentUniquePtr pNewUndoDoc, bool bNewMulti, SCTAB nSrc, InsertDeleteFlags nFlg, ScPasteFunc nFunc, bool bSkip, bool bLink ) : ScSimpleUndo( pNewDocShell ), aRange ( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), nFlags ( nFlg ), nFunction ( nFunc ), @@ -339,7 +340,7 @@ bool ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell, - const ScMarkData& rMark, + ScMarkData aMark, SCCOL nStartX, SCROW nStartY, SCTAB nStartZ, SCCOL nEndX, SCROW nEndY, SCTAB nEndZ, ScDocumentUniquePtr pNewUndoDoc, bool bNewMulti, @@ -347,7 +348,7 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell, const SvxBoxItem* pNewOuter, const SvxBoxInfoItem* pNewInner, const ScRange* pRangeCover ) : ScSimpleUndo( pNewDocShell ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), aRange ( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), mpDataArray(new ScEditDataArray), pUndoDoc ( std::move(pNewUndoDoc) ), @@ -482,12 +483,12 @@ bool ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoAutoFill::ScUndoAutoFill( ScDocShell* pNewDocShell, const ScRange& rRange, const ScRange& rSourceArea, - ScDocumentUniquePtr pNewUndoDoc, const ScMarkData& rMark, + ScDocumentUniquePtr pNewUndoDoc, ScMarkData aMark, FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd, double fNewStartValue, double fNewStepValue, double fNewMaxValue ) : ScBlockUndo( pNewDocShell, rRange, SC_UNDO_AUTOHEIGHT ), aSource ( rSourceArea ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), eFillDir ( eNewFillDir ), eFillCmd ( eNewFillCmd ), @@ -634,10 +635,10 @@ bool ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr; } -ScUndoMerge::ScUndoMerge(ScDocShell* pNewDocShell, const ScCellMergeOption& rOption, +ScUndoMerge::ScUndoMerge(ScDocShell* pNewDocShell, ScCellMergeOption aOption, bool bMergeContents, ScDocumentUniquePtr pUndoDoc, std::unique_ptr<SdrUndoAction> pDrawUndo) : ScSimpleUndo(pNewDocShell) - , maOption(rOption) + , maOption(std::move(aOption)) , mbMergeContents(bMergeContents) , mxUndoDoc(std::move(pUndoDoc)) , mpDrawUndo(std::move(pDrawUndo)) @@ -766,10 +767,10 @@ bool ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoAutoFormat::ScUndoAutoFormat( ScDocShell* pNewDocShell, const ScRange& rRange, ScDocumentUniquePtr pNewUndoDoc, - const ScMarkData& rMark, bool bNewSize, sal_uInt16 nNewFormatNo ) + ScMarkData aMark, bool bNewSize, sal_uInt16 nNewFormatNo ) : ScBlockUndo( pNewDocShell, rRange, bNewSize ? SC_UNDO_MANUALHEIGHT : SC_UNDO_AUTOHEIGHT ), pUndoDoc ( std::move(pNewUndoDoc) ), - aMarkData ( rMark ), + aMarkData (std::move( aMark )), bSize ( bNewSize ), nFormatNo ( nNewFormatNo ) { @@ -914,14 +915,14 @@ bool ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr; } -ScUndoReplace::ScUndoReplace( ScDocShell* pNewDocShell, const ScMarkData& rMark, +ScUndoReplace::ScUndoReplace( ScDocShell* pNewDocShell, ScMarkData aMark, SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, - const OUString& rNewUndoStr, ScDocumentUniquePtr pNewUndoDoc, + OUString aNewUndoStr, ScDocumentUniquePtr pNewUndoDoc, const SvxSearchItem* pItem ) : ScSimpleUndo( pNewDocShell ), aCursorPos ( nCurX, nCurY, nCurZ ), - aMarkData ( rMark ), - aUndoStr ( rNewUndoStr ), + aMarkData (std::move( aMark )), + aUndoStr (std::move( aNewUndoStr )), pUndoDoc ( std::move(pNewUndoDoc) ) { pSearchItem.reset( new SvxSearchItem( *pItem ) ); @@ -1168,17 +1169,17 @@ bool ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const } ScUndoConversion::ScUndoConversion( - ScDocShell* pNewDocShell, const ScMarkData& rMark, + ScDocShell* pNewDocShell, ScMarkData aMark, SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScDocumentUniquePtr pNewUndoDoc, SCCOL nNewX, SCROW nNewY, SCTAB nNewZ, ScDocumentUniquePtr pNewRedoDoc, - const ScConversionParam& rConvParam ) : + ScConversionParam aConvParam ) : ScSimpleUndo( pNewDocShell ), - aMarkData( rMark ), + aMarkData(std::move( aMark )), aCursorPos( nCurX, nCurY, nCurZ ), pUndoDoc( std::move(pNewUndoDoc) ), aNewCursorPos( nNewX, nNewY, nNewZ ), pRedoDoc( std::move(pNewRedoDoc) ), - maConvParam( rConvParam ) + maConvParam(std::move( aConvParam )) { SetChangeTrack(); } @@ -1279,10 +1280,10 @@ bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const } ScUndoRefConversion::ScUndoRefConversion( ScDocShell* pNewDocShell, - const ScRange& aMarkRange, const ScMarkData& rMark, + const ScRange& aMarkRange, ScMarkData aMark, ScDocumentUniquePtr pNewUndoDoc, ScDocumentUniquePtr pNewRedoDoc, bool bNewMulti) : ScSimpleUndo( pNewDocShell ), -aMarkData ( rMark ), +aMarkData (std::move( aMark )), pUndoDoc ( std::move(pNewUndoDoc) ), pRedoDoc ( std::move(pNewRedoDoc) ), aRange ( aMarkRange ), @@ -1484,15 +1485,15 @@ static ScAreaLink* lcl_FindAreaLink( const sfx2::LinkManager* pLinkManager, std: } ScUndoInsertAreaLink::ScUndoInsertAreaLink( ScDocShell* pShell, - const OUString& rDoc, - const OUString& rFlt, const OUString& rOpt, - const OUString& rArea, const ScRange& rDestRange, + OUString aDoc, + OUString aFlt, OUString aOpt, + OUString aArea, const ScRange& rDestRange, sal_uLong nRefresh ) : ScSimpleUndo ( pShell ), - aDocName ( rDoc ), - aFltName ( rFlt ), - aOptions ( rOpt ), - aAreaName ( rArea ), + aDocName (std::move( aDoc )), + aFltName (std::move( aFlt )), + aOptions (std::move( aOpt )), + aAreaName (std::move( aArea )), aRange ( rDestRange ), nRefreshDelay ( nRefresh ) { @@ -1547,14 +1548,14 @@ bool ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const } ScUndoRemoveAreaLink::ScUndoRemoveAreaLink( ScDocShell* pShell, - const OUString& rDoc, const OUString& rFlt, const OUString& rOpt, - const OUString& rArea, const ScRange& rDestRange, + OUString aDoc, OUString aFlt, OUString aOpt, + OUString aArea, const ScRange& rDestRange, sal_uLong nRefresh ) : ScSimpleUndo ( pShell ), - aDocName ( rDoc ), - aFltName ( rFlt ), - aOptions ( rOpt ), - aAreaName ( rArea ), + aDocName (std::move( aDoc )), + aFltName (std::move( aFlt )), + aOptions (std::move( aOpt )), + aAreaName (std::move( aArea )), aRange ( rDestRange ), nRefreshDelay ( nRefresh ) { @@ -1609,21 +1610,21 @@ bool ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const } ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell, - const OUString& rOldD, const OUString& rOldF, const OUString& rOldO, - const OUString& rOldA, const ScRange& rOldR, sal_uLong nOldRD, - const OUString& rNewD, const OUString& rNewF, const OUString& rNewO, - const OUString& rNewA, const ScRange& rNewR, sal_uLong nNewRD, + OUString aOldD, OUString aOldF, OUString aOldO, + OUString aOldA, const ScRange& rOldR, sal_uLong nOldRD, + OUString aNewD, OUString aNewF, OUString aNewO, + OUString aNewA, const ScRange& rNewR, sal_uLong nNewRD, ScDocumentUniquePtr pUndo, ScDocumentUniquePtr pRedo, bool bDoInsert ) : ScSimpleUndo( pShell ), - aOldDoc ( rOldD ), - aOldFlt ( rOldF ), - aOldOpt ( rOldO ), - aOldArea ( rOldA ), + aOldDoc (std::move( aOldD )), + aOldFlt (std::move( aOldF )), + aOldOpt (std::move( aOldO )), + aOldArea (std::move( aOldA )), aOldRange ( rOldR ), - aNewDoc ( rNewD ), - aNewFlt ( rNewF ), - aNewOpt ( rNewO ), - aNewArea ( rNewA ), + aNewDoc (std::move( aNewD )), + aNewFlt (std::move( aNewF )), + aNewOpt (std::move( aNewO )), + aNewArea (std::move( aNewA )), aNewRange ( rNewR ), xUndoDoc ( std::move(pUndo) ), xRedoDoc ( std::move(pRedo) ), diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 480238023ef5..b306dcd83a07 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -42,6 +42,7 @@ #include <rangenam.hxx> #include <chgtrack.hxx> #include <stringutil.hxx> +#include <utility> namespace HelperNotifyChanges { @@ -159,9 +160,9 @@ ScUndoEnterData::Value::Value() : mnTab(-1), mbHasFormat(false), mnFormat(0) {} ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell, const ScAddress& rPos, ValuesType& rOldValues, - const OUString& rNewStr, std::unique_ptr<EditTextObject> pObj ) : + OUString aNewStr, std::unique_ptr<EditTextObject> pObj ) : ScSimpleUndo( pNewDocShell ), - maNewString(rNewStr), + maNewString(std::move(aNewStr)), mpNewEditData(std::move(pObj)), mnEndChangeAction(0), maPos(rPos) @@ -306,10 +307,10 @@ bool ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoEnterValue::ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos, - const ScCellValue& rUndoCell, double nVal ) : + ScCellValue aUndoCell, double nVal ) : ScSimpleUndo( pNewDocShell ), aPos ( rNewPos ), - maOldCell(rUndoCell), + maOldCell(std::move(aUndoCell)), nValue ( nVal ) { SetChangeTrack(); @@ -380,8 +381,8 @@ bool ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const return false; } -ScUndoSetCell::ScUndoSetCell( ScDocShell* pDocSh, const ScAddress& rPos, const ScCellValue& rOldVal, const ScCellValue& rNewVal ) : - ScSimpleUndo(pDocSh), maPos(rPos), maOldValue(rOldVal), maNewValue(rNewVal), mnEndChangeAction(0) +ScUndoSetCell::ScUndoSetCell( ScDocShell* pDocSh, const ScAddress& rPos, ScCellValue aOldVal, ScCellValue aNewVal ) : + ScSimpleUndo(pDocSh), maPos(rPos), maOldValue(std::move(aOldVal)), maNewValue(std::move(aNewVal)), mnEndChangeAction(0) { SetChangeTrack(); } @@ -640,13 +641,13 @@ bool ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoThesaurus::ScUndoThesaurus( ScDocShell* pNewDocShell, SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab, - const ScCellValue& rOldText, const ScCellValue& rNewText ) : + ScCellValue aOldText, ScCellValue aNewText ) : ScSimpleUndo( pNewDocShell ), nCol( nNewCol ), nRow( nNewRow ), nTab( nNewTab ), - maOldText(rOldText), - maNewText(rNewText) + maOldText(std::move(aOldText)), + maNewText(std::move(aNewText)) { SetChangeTrack(maOldText); } @@ -740,11 +741,11 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP } ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rPos, - const ScNoteData& rOldData, const ScNoteData& rNewData, std::unique_ptr<SdrUndoAction> pDrawUndo ) : + ScNoteData aOldData, ScNoteData aNewData, std::unique_ptr<SdrUndoAction> pDrawUndo ) : ScSimpleUndo( &rDocShell ), maPos( rPos ), - maOldData( rOldData ), - maNewData( rNewData ), + maOldData(std::move( aOldData )), + maNewData(std::move( aNewData )), mpDrawUndo( std::move(pDrawUndo) ) { OSL_ENSURE( maOldData.mxCaption || maNewData.mxCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note captions" ); diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index 1ab89a8b543f..498060839ab1 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -44,6 +44,7 @@ #include <chgtrack.hxx> #include <refundo.hxx> #include <markdata.hxx> +#include <utility> // Show or hide outline groups @@ -897,9 +898,9 @@ bool ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const // Show or hide AutoFilter buttons (doesn't include filter settings) ScUndoAutoFilter::ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange, - const OUString& rName, bool bSet ) : + OUString aName, bool bSet ) : ScDBFuncUndo( pNewDocShell, rRange ), - aDBName( rName ), + aDBName(std::move( aName )), bFilterSet( bSet ) { } @@ -1685,11 +1686,11 @@ void ScUndoChartData::Init() rDoc.GetOldChartParameters( aChartName, *aOldRangeListRef, bOldColHeaders, bOldRowHeaders ); } -ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const OUString& rName, +ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, OUString aName, const ScRange& rNew, bool bColHdr, bool bRowHdr, bool bAdd ) : ScSimpleUndo( pNewDocShell ), - aChartName( rName ), + aChartName(std::move( aName )), bOldColHeaders(false), bOldRowHeaders(false), bNewColHeaders( bColHdr ), @@ -1702,14 +1703,14 @@ ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const OUString& rNam Init(); } -ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const OUString& rName, - const ScRangeListRef& rNew, bool bColHdr, bool bRowHdr, +ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, OUString aName, + ScRangeListRef xNew, bool bColHdr, bool bRowHdr, bool bAdd ) : ScSimpleUndo( pNewDocShell ), - aChartName( rName ), + aChartName(std::move( aName )), bOldColHeaders(false), bOldRowHeaders(false), - aNewRangeListRef( rNew ), + aNewRangeListRef(std::move( xNew )), bNewColHeaders( bColHdr ), bNewRowHeaders( bRowHdr ), bAddRange( bAdd ) diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx index ed65c760e8f4..4a8844720246 100644 --- a/sc/source/ui/undo/undosort.cxx +++ b/sc/source/ui/undo/undosort.cxx @@ -12,11 +12,12 @@ #include <scresid.hxx> #include <global.hxx> #include <undoutil.hxx> +#include <utility> namespace sc { -UndoSort::UndoSort( ScDocShell* pDocSh, const ReorderParam& rParam ) : - ScSimpleUndo(pDocSh), maParam(rParam) {} +UndoSort::UndoSort( ScDocShell* pDocSh, ReorderParam aParam ) : + ScSimpleUndo(pDocSh), maParam(std::move(aParam)) {} OUString UndoSort::GetComment() const { diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx index b0c17277a34d..74fd7590c077 100644 --- a/sc/source/ui/undo/undostyl.cxx +++ b/sc/source/ui/undo/undostyl.cxx @@ -18,6 +18,7 @@ */ #include <svl/itemset.hxx> +#include <utility> #include <vcl/virdev.hxx> #include <osl/diagnose.h> @@ -219,15 +220,15 @@ bool ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const // apply page style -ScUndoApplyPageStyle::ApplyStyleEntry::ApplyStyleEntry( SCTAB nTab, const OUString& rOldStyle ) : +ScUndoApplyPageStyle::ApplyStyleEntry::ApplyStyleEntry( SCTAB nTab, OUString aOldStyle ) : mnTab( nTab ), - maOldStyle( rOldStyle ) + maOldStyle(std::move( aOldStyle )) { } -ScUndoApplyPageStyle::ScUndoApplyPageStyle( ScDocShell* pDocSh, const OUString& rNewStyle ) : +ScUndoApplyPageStyle::ScUndoApplyPageStyle( ScDocShell* pDocSh, OUString aNewStyle ) : ScSimpleUndo( pDocSh ), - maNewStyle( rNewStyle ) + maNewStyle(std::move( aNewStyle )) { } diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index b898faf8075f..628d80cece58 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -38,6 +38,7 @@ #include <printfun.hxx> #include <chgtrack.hxx> #include <tabprotection.hxx> +#include <utility> #include <viewdata.hxx> #include <progress.hxx> #include <markdata.hxx> @@ -65,9 +66,9 @@ using ::std::vector; ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell, SCTAB nTabNum, bool bApp, - const OUString& rNewName) : + OUString aNewName) : ScSimpleUndo( pNewDocShell ), - sNewName( rNewName ), + sNewName(std::move( aNewName )), nTab( nTabNum ), bAppend( bApp ) { @@ -774,15 +775,15 @@ bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell, SCTAB nSrc, SCTAB nDest, - const OUString& rN, const OUString& rC, + OUString aN, OUString aC, const Color& rCol, ScScenarioFlags nF, const ScMarkData& rMark ) : ScSimpleUndo( pNewDocShell ), mpMarkData(new ScMarkData(rMark)), nSrcTab( nSrc ), nDestTab( nDest ), - aName( rN ), - aComment( rC ), + aName(std::move( aN )), + aComment(std::move( aC )), aColor( rCol ), nFlags( nF ) { @@ -1011,9 +1012,9 @@ bool ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const return dynamic_cast<const ScTabViewTarget*>( &rTarget) != nullptr; } -ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const OUString& rDocName ) : +ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, OUString _aDocName ) : ScSimpleUndo( pShell ), - aDocName( rDocName ), + aDocName(std::move( _aDocName )), nRefreshDelay( 0 ), nCount( 0 ) { @@ -1365,14 +1366,14 @@ OUString ScUndoPrintRange::GetComment() const } ScUndoScenarioFlags::ScUndoScenarioFlags(ScDocShell* pNewDocShell, SCTAB nT, - const OUString& rON, const OUString& rNN, const OUString& rOC, const OUString& rNC, + OUString aON, OUString aNN, OUString aOC, OUString aNC, const Color& rOCol, const Color& rNCol, ScScenarioFlags nOF, ScScenarioFlags nNF) : ScSimpleUndo( pNewDocShell ), nTab ( nT ), - aOldName ( rON ), - aNewName ( rNN ), - aOldComment ( rOC ), - aNewComment ( rNC ), + aOldName (std::move( aON )), + aNewName (std::move( aNN )), + aOldComment (std::move( aOC )), + aNewComment (std::move( aNC )), aOldColor ( rOCol ), aNewColor ( rNCol ), nOldFlags (nOF), @@ -1434,12 +1435,12 @@ bool ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const } // (move to different file?) -ScUndoRenameObject::ScUndoRenameObject( ScDocShell* pNewDocShell, const OUString& rPN, - const OUString& rON, const OUString& rNN ) : +ScUndoRenameObject::ScUndoRenameObject( ScDocShell* pNewDocShell, OUString aPN, + OUString aON, OUString aNN ) : ScSimpleUndo( pNewDocShell ), - aPersistName( rPN ), - aOldName ( rON ), - aNewName ( rNN ) + aPersistName(std::move( aPN )), + aOldName (std::move( aON )), + aNewName (std::move( aNN )) { } diff --git a/sc/source/ui/unoobj/PivotTableDataSequence.cxx b/sc/source/ui/unoobj/PivotTableDataSequence.cxx index bf8989e4f35a..4acaf4dec05c 100644 --- a/sc/source/ui/unoobj/PivotTableDataSequence.cxx +++ b/sc/source/ui/unoobj/PivotTableDataSequence.cxx @@ -14,6 +14,7 @@ #include <sal/log.hxx> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> +#include <utility> #include <vcl/svapp.hxx> #include <miscuno.hxx> @@ -38,10 +39,10 @@ static o3tl::span<const SfxItemPropertyMapEntry> lcl_GetDataSequencePropertyMap( return aDataSequencePropertyMap_Impl; } -PivotTableDataSequence::PivotTableDataSequence(ScDocument* pDocument, OUString const & sID, +PivotTableDataSequence::PivotTableDataSequence(ScDocument* pDocument, OUString sID, std::vector<ValueAndFormat>&& rData) : m_pDocument(pDocument) - , m_aID(sID) + , m_aID(std::move(sID)) , m_aData(std::move(rData)) , m_aPropSet(lcl_GetDataSequencePropertyMap()) { diff --git a/sc/source/ui/unoobj/TablePivotChart.cxx b/sc/source/ui/unoobj/TablePivotChart.cxx index ecc158002db7..107d6d5baa8f 100644 --- a/sc/source/ui/unoobj/TablePivotChart.cxx +++ b/sc/source/ui/unoobj/TablePivotChart.cxx @@ -12,6 +12,7 @@ #include <com/sun/star/embed/XEmbeddedObject.hpp> #include <svx/svdoole2.hxx> #include <svtools/embedhlp.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <miscuno.hxx> @@ -27,10 +28,10 @@ namespace sc SC_SIMPLE_SERVICE_INFO(TablePivotChart, "TablePivotChart", "com.sun.star.table.TablePivotChart") -TablePivotChart::TablePivotChart(ScDocShell* pDocShell, SCTAB nTab, const OUString& rName) +TablePivotChart::TablePivotChart(ScDocShell* pDocShell, SCTAB nTab, OUString aName) : m_pDocShell(pDocShell) , m_nTab(nTab) - , m_aChartName(rName) + , m_aChartName(std::move(aName)) { if (m_pDocShell) m_pDocShell->GetDocument().AddUnoObject(*this); diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index e522daee55a7..cbc68848f5b1 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -22,6 +22,7 @@ #include <o3tl/safeint.hxx> #include <svx/svdpool.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svx/algitem.hxx> #include <editeng/borderline.hxx> @@ -1393,10 +1394,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) : } } -ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) : +ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, ScRangeList aR) : pPropSet(lcl_GetCellsPropertySet()), pDocShell( pDocSh ), - aRanges( rR ), + aRanges(std::move( aR )), nObjectId( 0 ), bChartColAsHdr( false ), bChartRowAsHdr( false ), @@ -8594,9 +8595,9 @@ const SfxItemPropertyMap& ScTableRowObj::GetItemPropertyMap() return pRowPropSet->getPropertyMap(); } -ScCellsObj::ScCellsObj(ScDocShell* pDocSh, const ScRangeList& rR) : +ScCellsObj::ScCellsObj(ScDocShell* pDocSh, ScRangeList aR) : pDocShell( pDocSh ), - aRanges( rR ) + aRanges(std::move( aR )) { pDocShell->GetDocument().AddUnoObject(*this); } @@ -8651,9 +8652,9 @@ sal_Bool SAL_CALL ScCellsObj::hasElements() return bHas; } -ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR) : +ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, ScRangeList aR) : pDocShell( pDocSh ), - aRanges( rR ), + aRanges(std::move( aR )), bAtEnd( false ) { ScDocument& rDoc = pDocShell->GetDocument(); diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index a4c9777a27c1..4b74bdf9c6d0 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -37,6 +37,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <tools/globname.hxx> #include <svtools/embedhlp.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <ChartTools.hxx> @@ -404,12 +405,12 @@ sal_Bool SAL_CALL ScChartsObj::hasByName( const OUString& aName ) return aOle2Obj != nullptr; } -ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN) +ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, OUString aN) :ScChartObj_Base( m_aMutex ) ,ScChartObj_PBase( ScChartObj_Base::rBHelper ) ,pDocShell( pDocSh ) ,nTab( nT ) - ,aChartName( rN ) + ,aChartName(std::move( aN )) { pDocShell->GetDocument().AddUnoObject(*this); diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx index 9460f0c0929e..57234b2a47ed 100644 --- a/sc/source/ui/unoobj/condformatuno.cxx +++ b/sc/source/ui/unoobj/condformatuno.cxx @@ -24,6 +24,7 @@ #include <convuno.hxx> #include <o3tl/safeint.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <rtl/ustring.hxx> #include <sal/log.hxx> @@ -434,9 +435,9 @@ uno::Reference<beans::XPropertySet> createConditionEntry(const ScFormatEntry* pE } -ScCondFormatObj::ScCondFormatObj(ScDocShell* pDocShell, rtl::Reference<ScCondFormatsObj> const & xCondFormats, +ScCondFormatObj::ScCondFormatObj(ScDocShell* pDocShell, rtl::Reference<ScCondFormatsObj> xCondFormats, sal_Int32 nKey): - mxCondFormatList(xCondFormats), + mxCondFormatList(std::move(xCondFormats)), mpDocShell(pDocShell), maPropSet(getCondFormatPropset()), mnKey(nKey) @@ -825,9 +826,9 @@ void SAL_CALL ScConditionEntryObj::removeVetoableChangeListener( const OUString& SAL_WARN("sc", "not implemented"); } -ScColorScaleFormatObj::ScColorScaleFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, +ScColorScaleFormatObj::ScColorScaleFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScColorScaleFormat* pFormat): - mxParent(xParent), + mxParent(std::move(xParent)), maPropSet(getColorScalePropSet()), mpFormat(pFormat) { @@ -986,9 +987,9 @@ void SAL_CALL ScColorScaleFormatObj::removeVetoableChangeListener( const OUStrin SAL_WARN("sc", "not implemented"); } -ScColorScaleEntryObj::ScColorScaleEntryObj(rtl::Reference<ScColorScaleFormatObj> const & xParent, +ScColorScaleEntryObj::ScColorScaleEntryObj(rtl::Reference<ScColorScaleFormatObj> xParent, size_t nPos): - mxParent(xParent), + mxParent(std::move(xParent)), mnPos(nPos) { } @@ -1076,9 +1077,9 @@ void ScColorScaleEntryObj::setFormula(const OUString& rFormula) } -ScDataBarFormatObj::ScDataBarFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, +ScDataBarFormatObj::ScDataBarFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScDataBarFormat* pFormat): - mxParent(xParent), + mxParent(std::move(xParent)), maPropSet(getDataBarPropSet()), mpFormat(pFormat) { @@ -1370,9 +1371,9 @@ void SAL_CALL ScDataBarFormatObj::removeVetoableChangeListener( const OUString&, SAL_WARN("sc", "not implemented"); } -ScDataBarEntryObj::ScDataBarEntryObj(rtl::Reference<ScDataBarFormatObj> const & xParent, +ScDataBarEntryObj::ScDataBarEntryObj(rtl::Reference<ScDataBarFormatObj> xParent, size_t nPos): - mxParent(xParent), + mxParent(std::move(xParent)), mnPos(nPos) { } @@ -1452,9 +1453,9 @@ void ScDataBarEntryObj::setFormula(const OUString& rFormula) } -ScIconSetFormatObj::ScIconSetFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, +ScIconSetFormatObj::ScIconSetFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScIconSetFormat* pFormat): - mxParent(xParent), + mxParent(std::move(xParent)), maPropSet(getIconSetPropSet()), mpFormat(pFormat) { @@ -1670,9 +1671,9 @@ void SAL_CALL ScIconSetFormatObj::removeVetoableChangeListener( const OUString&, SAL_WARN("sc", "not implemented"); } -ScIconSetEntryObj::ScIconSetEntryObj(rtl::Reference<ScIconSetFormatObj> const & xParent, +ScIconSetEntryObj::ScIconSetEntryObj(rtl::Reference<ScIconSetFormatObj> xParent, size_t nPos): - mxParent(xParent), + mxParent(std::move(xParent)), mnPos(nPos) { } @@ -1756,9 +1757,9 @@ void ScIconSetEntryObj::setFormula(const OUString& rFormula) } } -ScCondDateFormatObj::ScCondDateFormatObj(rtl::Reference<ScCondFormatObj> const & xParent, +ScCondDateFormatObj::ScCondDateFormatObj(rtl::Reference<ScCondFormatObj> xParent, const ScCondDateFormatEntry* pFormat): - mxParent(xParent), + mxParent(std::move(xParent)), maPropSet(getCondDatePropSet()), mpFormat(pFormat) { diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 52492a208e39..4be1c767fad0 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -22,6 +22,7 @@ #include <o3tl/safeint.hxx> #include <svl/hint.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <sal/log.hxx> @@ -986,10 +987,10 @@ const Sequence<sal_Int8>& ScDataPilotDescriptorBase::getUnoTunnelId() return theScDataPilotDescriptorBaseUnoTunnelId.getSeq(); } -ScDataPilotTableObj::ScDataPilotTableObj(ScDocShell& rDocSh, SCTAB nT, const OUString& rN) : +ScDataPilotTableObj::ScDataPilotTableObj(ScDocShell& rDocSh, SCTAB nT, OUString aN) : ScDataPilotDescriptorBase( rDocSh ), nTab( nT ), - aName( rN ), + aName(std::move( aN )), aModifyListeners( 0 ) { } @@ -1320,9 +1321,9 @@ ScDataPilotChildObjBase::ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rPa { } -ScDataPilotChildObjBase::ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent, const ScFieldIdentifier& rFieldId ) : +ScDataPilotChildObjBase::ScDataPilotChildObjBase( ScDataPilotDescriptorBase& rParent, ScFieldIdentifier aFieldId ) : mxParent( &rParent ), - maFieldId( rFieldId ) + maFieldId(std::move( aFieldId )) { } @@ -1634,10 +1635,10 @@ ScDataPilotFieldObj::ScDataPilotFieldObj( } ScDataPilotFieldObj::ScDataPilotFieldObj( ScDataPilotDescriptorBase& rParent, - const ScFieldIdentifier& rFieldId, const Any& rOrient ) : + const ScFieldIdentifier& rFieldId, Any aOrient ) : ScDataPilotChildObjBase( rParent, rFieldId ), maPropSet( lcl_GetDataPilotFieldMap() ), - maOrient( rOrient ) + maOrient(std::move( aOrient )) { } @@ -2902,9 +2903,9 @@ OUString lclExtractMember( const Any& rElement ) } // namespace -ScDataPilotFieldGroupObj::ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& rParent, const OUString& rGroupName ) : +ScDataPilotFieldGroupObj::ScDataPilotFieldGroupObj( ScDataPilotFieldGroupsObj& rParent, OUString aGroupName ) : mxParent( &rParent ), - maGroupName( rGroupName ) + maGroupName(std::move( aGroupName )) { } @@ -3044,9 +3045,9 @@ void SAL_CALL ScDataPilotFieldGroupObj::setName( const OUString& rName ) maGroupName = rName; } -ScDataPilotFieldGroupItemObj::ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj& rParent, const OUString& rName ) : +ScDataPilotFieldGroupItemObj::ScDataPilotFieldGroupItemObj( ScDataPilotFieldGroupObj& rParent, OUString aName ) : mxParent( &rParent ), - maName( rName ) + maName(std::move( aName )) { } diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index f19386d0a525..ee285d662b7c 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -22,6 +22,7 @@ #include <svl/hint.hxx> #include <svl/numformat.hxx> #include <svl/sharedstringpool.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <unotools/charclass.hxx> #include <osl/diagnose.h> @@ -1562,9 +1563,9 @@ void ScDataPilotFilterDescriptor::PutData( const ScQueryParam& rParam ) } } -ScDatabaseRangeObj::ScDatabaseRangeObj(ScDocShell* pDocSh, const OUString& rNm) : +ScDatabaseRangeObj::ScDatabaseRangeObj(ScDocShell* pDocSh, OUString aNm) : pDocShell( pDocSh ), - aName( rNm ), + aName(std::move( aNm )), aPropSet( lcl_GetDBRangePropertyMap() ), bIsUnnamed(false), aTab( 0 ) diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 63c3863ab04c..4d14e4139652 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -28,6 +28,7 @@ #include <editutil.hxx> #include <svl/hint.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <editeng/eeitem.hxx> @@ -262,9 +263,9 @@ SvxFieldData* ScUnoEditEngine::FindByPos(sal_Int32 nPar, sal_Int32 nPos, sal_Int } ScCellFieldsObj::ScCellFieldsObj( - const uno::Reference<text::XTextRange>& xContent, + uno::Reference<text::XTextRange> xContent, ScDocShell* pDocSh, const ScAddress& rPos) : - mxContent(xContent), + mxContent(std::move(xContent)), pDocShell( pDocSh ), aCellPos( rPos ) { @@ -1029,12 +1030,12 @@ void ScEditFieldObj::setPropertyValueSheet(const OUString& rName, const uno::Any } ScEditFieldObj::ScEditFieldObj( - const uno::Reference<text::XTextRange>& rContent, + uno::Reference<text::XTextRange> xContent, std::unique_ptr<ScEditSource> pEditSrc, sal_Int32 eType, const ESelection& rSel) : pPropSet(nullptr), mpEditSource(std::move(pEditSrc)), aSelection(rSel), - meType(eType), mpContent(rContent), mnNumFormat(0), mbIsDate(false), mbIsFixed(false) + meType(eType), mpContent(std::move(xContent)), mnNumFormat(0), mbIsDate(false), mbIsFixed(false) { switch (meType) { diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index d09cb4e44634..068175181c74 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -22,6 +22,7 @@ #include <o3tl/safeint.hxx> #include <osl/diagnose.h> #include <svl/style.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/sheet/ConditionOperator2.hpp> @@ -448,8 +449,8 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const OUString& aName ) UNO3_GETIMPLEMENTATION_IMPL(ScTableConditionalFormat); -ScTableConditionalEntry::ScTableConditionalEntry(const ScCondFormatEntryItem& aItem) : - aData( aItem ) +ScTableConditionalEntry::ScTableConditionalEntry(ScCondFormatEntryItem aItem) : + aData(std::move( aItem )) { // #i113668# only store the settings, keep no reference to parent object } diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index 9db4989d046d..6d22a06559d8 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -24,6 +24,7 @@ #include <formula/token.hxx> #include <svl/hint.hxx> #include <sfx2/linkmgr.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <svl/sharedstringpool.hxx> @@ -72,10 +73,10 @@ SC_SIMPLE_SERVICE_INFO( ScDDELinksObj, "ScDDELinksObj", "com.sun.star.sheet.DDEL SC_SIMPLE_SERVICE_INFO( ScSheetLinkObj, "ScSheetLinkObj", "com.sun.star.sheet.SheetLink" ) SC_SIMPLE_SERVICE_INFO( ScSheetLinksObj, "ScSheetLinksObj", "com.sun.star.sheet.SheetLinks" ) -ScSheetLinkObj::ScSheetLinkObj(ScDocShell* pDocSh, const OUString& rName) : +ScSheetLinkObj::ScSheetLinkObj(ScDocShell* pDocSh, OUString aName) : aPropSet( lcl_GetSheetLinkMap() ), pDocShell( pDocSh ), - aFileName( rName ) + aFileName(std::move( aName )) { pDocShell->GetDocument().AddUnoObject(*this); } @@ -986,12 +987,12 @@ sal_Bool SAL_CALL ScAreaLinksObj::hasElements() return ( getCount() != 0 ); } -ScDDELinkObj::ScDDELinkObj(ScDocShell* pDocSh, const OUString& rA, - const OUString& rT, const OUString& rI) : +ScDDELinkObj::ScDDELinkObj(ScDocShell* pDocSh, OUString aA, + OUString aT, OUString aI) : pDocShell( pDocSh ), - aAppl( rA ), - aTopic( rT ), - aItem( rI ) + aAppl(std::move( aA )), + aTopic(std::move( aT )), + aItem(std::move( aI )) { pDocShell->GetDocument().AddUnoObject(*this); } @@ -1377,9 +1378,9 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink( return xLink; } -ScExternalSheetCacheObj::ScExternalSheetCacheObj(ScDocShell* pDocShell, ScExternalRefCache::TableTypeRef const & pTable, size_t nIndex) : +ScExternalSheetCacheObj::ScExternalSheetCacheObj(ScDocShell* pDocShell, ScExternalRefCache::TableTypeRef pTable, size_t nIndex) : mpDocShell(pDocShell), - mpTable(pTable), + mpTable(std::move(pTable)), mnIndex(nIndex) { } diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx index d2e098d00268..30104586e3ca 100644 --- a/sc/source/ui/unoobj/miscuno.cxx +++ b/sc/source/ui/unoobj/miscuno.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <cppuhelper/supportsservice.hxx> #include <o3tl/any.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <miscuno.hxx> @@ -186,10 +187,10 @@ void ScUnoHelpFunctions::SetOptionalPropertyValue( } } -ScIndexEnumeration::ScIndexEnumeration(const uno::Reference<container::XIndexAccess>& rInd, - const OUString& rServiceName) : - xIndex( rInd ), - sServiceName(rServiceName), +ScIndexEnumeration::ScIndexEnumeration(uno::Reference<container::XIndexAccess> xInd, + OUString aServiceName) : + xIndex(std::move( xInd )), + sServiceName(std::move(aServiceName)), nPos( 0 ) { } @@ -237,9 +238,9 @@ css::uno::Sequence< OUString > return { sServiceName }; } -ScNameToIndexAccess::ScNameToIndexAccess( const css::uno::Reference< - css::container::XNameAccess>& rNameObj ) : - xNameAccess( rNameObj ) +ScNameToIndexAccess::ScNameToIndexAccess( css::uno::Reference< + css::container::XNameAccess> xNameObj ) : + xNameAccess(std::move( xNameObj )) { //! test for XIndexAccess interface at rNameObj, use that instead! diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 842a4e56de90..6d6a56a6d85b 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -19,6 +19,7 @@ #include <o3tl/safeint.hxx> #include <svl/hint.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/sheet/NamedRangeFlag.hpp> @@ -81,10 +82,10 @@ static bool lcl_UserVisibleName(const ScRangeData& rData) return !rData.HasType(ScRangeData::Type::Database); } -ScNamedRangeObj::ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > const & xParent, ScDocShell* pDocSh, const OUString& rNm, Reference<container::XNamed> const & xSheet): - mxParent(xParent), +ScNamedRangeObj::ScNamedRangeObj( rtl::Reference< ScNamedRangesObj > xParent, ScDocShell* pDocSh, OUString aNm, Reference<container::XNamed> const & xSheet): + mxParent(std::move(xParent)), pDocShell( pDocSh ), - aName( rNm ), + aName(std::move( aNm )), mxSheet( xSheet ) { pDocShell->GetDocument().AddUnoObject(*this); @@ -828,9 +829,9 @@ SCTAB ScGlobalNamedRangesObj::GetTab_Impl() return -1; } -ScLocalNamedRangesObj::ScLocalNamedRangesObj( ScDocShell* pDocSh, uno::Reference<container::XNamed> const & xSheet ) +ScLocalNamedRangesObj::ScLocalNamedRangesObj( ScDocShell* pDocSh, uno::Reference<container::XNamed> xSheet ) : ScNamedRangesObj(pDocSh), - mxSheet(xSheet) + mxSheet(std::move(xSheet)) { } diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 3731a0ca60c8..4e626669ee8e 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -30,6 +30,7 @@ #include <sfx2/bindings.hxx> #include <sfx2/printer.hxx> #include <sfx2/sfxsids.hrc> +#include <utility> #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> #include <svl/itempool.hxx> @@ -930,11 +931,11 @@ void SAL_CALL ScStyleFamilyObj::removeVetoableChangeListener( const OUString&, c // default ctor is needed for reflection -ScStyleObj::ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily eFam, const OUString& rName) +ScStyleObj::ScStyleObj(ScDocShell* pDocSh, SfxStyleFamily eFam, OUString aName) : pPropSet( (eFam == SfxStyleFamily::Para) ? lcl_GetCellStyleSet() : lcl_GetPageStyleSet() ) , pDocShell(pDocSh) , eFamily(eFam) - , aStyleName(rName) + , aStyleName(std::move(aName)) , pStyle_cached(nullptr) { // if create by ServiceProvider then pDocShell is NULL diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index 74dd0584434f..54f517e50bc7 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -22,6 +22,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <svl/itemprop.hxx> #include <svl/hint.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <osl/diagnose.h> #include <com/sun/star/awt/XBitmap.hpp> @@ -246,8 +247,8 @@ uno::Any SAL_CALL ScLinkTargetTypeObj::getPropertyValue(const OUString& Property SC_IMPL_DUMMY_PROPERTY_LISTENER( ScLinkTargetTypeObj ) -ScLinkTargetsObj::ScLinkTargetsObj( const uno::Reference< container::XNameAccess > & rColl ) : - xCollection( rColl ) +ScLinkTargetsObj::ScLinkTargetsObj( uno::Reference< container::XNameAccess > xColl ) : + xCollection(std::move( xColl )) { OSL_ENSURE( xCollection.is(), "ScLinkTargetsObj: NULL" ); } diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index e0098476c04f..ec66ebe1877e 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -31,6 +31,7 @@ #include <editeng/fhgtitem.hxx> #include <editeng/unoprnms.hxx> #include <editeng/unofored.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <editeng/unoipset.hxx> @@ -157,9 +158,9 @@ void ScHeaderFooterContentObj::Init( const EditTextObject* pLeft, } ScHeaderFooterTextData::ScHeaderFooterTextData( - uno::WeakReference<sheet::XHeaderFooterContent> const & xContent, ScHeaderFooterPart nP, const EditTextObject* pTextObj) : + uno::WeakReference<sheet::XHeaderFooterContent> xContent, ScHeaderFooterPart nP, const EditTextObject* pTextObj) : mpTextObj(pTextObj ? pTextObj->Clone() : nullptr), - xContentObj( xContent ), + xContentObj(std::move( xContent )), nPart( nP ), bDataValid(false) { @@ -634,10 +635,10 @@ uno::Reference<text::XTextRange> SAL_CALL ScHeaderFooterTextCursor::getEnd() UNO3_GETIMPLEMENTATION2_IMPL(ScHeaderFooterTextCursor, SvxUnoTextCursor); -ScDrawTextCursor::ScDrawTextCursor( const uno::Reference<text::XText>& xParent, +ScDrawTextCursor::ScDrawTextCursor( uno::Reference<text::XText> xParent, const SvxUnoTextBase& rText ) : SvxUnoTextCursor( rText ), - xParentText( xParent ) + xParentText(std::move( xParent )) { } diff --git a/sc/source/ui/unoobj/unoreflist.cxx b/sc/source/ui/unoobj/unoreflist.cxx index b2c1fb5f0ca7..fff4d0fd9d08 100644 --- a/sc/source/ui/unoobj/unoreflist.cxx +++ b/sc/source/ui/unoobj/unoreflist.cxx @@ -19,6 +19,7 @@ #include <unoreflist.hxx> #include <document.hxx> +#include <utility> ScUnoRefList::ScUnoRefList() { @@ -42,8 +43,8 @@ void ScUnoRefList::Undo( ScDocument* pDoc ) } } -ScUnoRefUndoHint::ScUnoRefUndoHint( const ScUnoRefEntry& rRefEntry ) : - aEntry( rRefEntry ) +ScUnoRefUndoHint::ScUnoRefUndoHint( ScUnoRefEntry aRefEntry ) : + aEntry(std::move( aRefEntry )) { } diff --git a/sc/source/ui/vba/vbaaxes.cxx b/sc/source/ui/vba/vbaaxes.cxx index c295158b7d0a..1976af701967 100644 --- a/sc/source/ui/vba/vbaaxes.cxx +++ b/sc/source/ui/vba/vbaaxes.cxx @@ -27,6 +27,7 @@ #include <ooo/vba/excel/XlAxisType.hpp> #include <ooo/vba/excel/XlAxisGroup.hpp> #include <ooo/vba/excel/XAxis.hpp> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -46,7 +47,7 @@ class EnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); @@ -93,7 +94,7 @@ class AxisIndexWrapper : public ::cppu::WeakImplHelper< container::XIndexAccess std::vector< AxesCoordinate > mCoordinates; uno::Reference< excel::XChart > mxChart; public: - AxisIndexWrapper( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< excel::XChart >& xChart ) : mxContext( xContext ), mxChart( xChart ) + AxisIndexWrapper( uno::Reference< uno::XComponentContext > xContext, uno::Reference< excel::XChart > xChart ) : mxContext(std::move( xContext )), mxChart(std::move( xChart )) { if ( !mxChart.is() ) return; diff --git a/sc/source/ui/vba/vbaaxis.cxx b/sc/source/ui/vba/vbaaxis.cxx index c34649fa57a5..c5eccd697dd1 100644 --- a/sc/source/ui/vba/vbaaxis.cxx +++ b/sc/source/ui/vba/vbaaxis.cxx @@ -21,6 +21,7 @@ #include <ooo/vba/excel/XlAxisCrosses.hpp> #include <ooo/vba/excel/XlAxisType.hpp> #include <ooo/vba/excel/XlScaleType.hpp> +#include <utility> #include "vbaaxistitle.hxx" #include "vbachart.hxx" using namespace ::com::sun::star; @@ -52,7 +53,7 @@ ScVbaAxis::isValueAxis() return true; } -ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet( _xPropertySet ), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( false ) +ScVbaAxis::ScVbaAxis( const uno::Reference< XHelperInterface >& xParent,const uno::Reference< uno::XComponentContext > & xContext, uno::Reference< beans::XPropertySet > _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ) : ScVbaAxis_BASE( xParent, xContext ), mxPropertySet(std::move( _xPropertySet )), mnType( _nType ), mnGroup( _nGroup ), bCrossesAreCustomized( false ) { oShapeHelper.reset( new ShapeHelper( uno::Reference< drawing::XShape >( mxPropertySet, uno::UNO_QUERY ) ) ); moChartParent.set( xParent, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx index 6636fb617c29..cf5958895426 100644 --- a/sc/source/ui/vba/vbaaxis.hxx +++ b/sc/source/ui/vba/vbaaxis.hxx @@ -38,7 +38,7 @@ class ScVbaAxis : public ScVbaAxis_BASE std::unique_ptr<ov::ShapeHelper> oShapeHelper; public: - ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ); + ScVbaAxis( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, sal_Int32 _nType, sal_Int32 _nGroup ); // Methods virtual void SAL_CALL Delete( ) override; virtual css::uno::Reference< ::ooo::vba::excel::XAxisTitle > SAL_CALL getAxisTitle( ) override; diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index 22434f971b5f..7572935816e0 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -28,6 +28,7 @@ #include <com/sun/star/table/TableBorder.hpp> #include <com/sun/star/table/XCellRange.hpp> #include <com/sun/star/table/XColumnRowRange.hpp> +#include <utility> #include "vbapalette.hxx" @@ -324,7 +325,7 @@ private: return getCount(); // error condition } public: - RangeBorders( const uno::Reference< table::XCellRange >& xRange, const uno::Reference< uno::XComponentContext > & xContext, const ScVbaPalette& rPalette ) : m_xRange( xRange ), m_xContext( xContext ), m_Palette( rPalette ) + RangeBorders( uno::Reference< table::XCellRange > xRange, uno::Reference< uno::XComponentContext > xContext, const ScVbaPalette& rPalette ) : m_xRange(std::move( xRange )), m_xContext(std::move( xContext )), m_Palette( rPalette ) { } // XIndexAccess @@ -368,7 +369,7 @@ class RangeBorderEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit RangeBorderEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit RangeBorderEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbacharacters.cxx b/sc/source/ui/vba/vbacharacters.cxx index 3fd00b207be0..087bfbd1aaa7 100644 --- a/sc/source/ui/vba/vbacharacters.cxx +++ b/sc/source/ui/vba/vbacharacters.cxx @@ -21,6 +21,7 @@ #include "vbafont.hxx" #include <com/sun/star/beans/XPropertySet.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -28,12 +29,12 @@ using namespace ::com::sun::star; ScVbaCharacters::ScVbaCharacters( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, - const uno::Reference< text::XSimpleText>& xRange, + uno::Reference< text::XSimpleText> xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool Replace ) : ScVbaCharacters_BASE( xParent, xContext ), - m_xSimpleText(xRange), m_aPalette( dPalette), bReplace( Replace ) + m_xSimpleText(std::move(xRange)), m_aPalette( dPalette), bReplace( Replace ) { sal_Int16 nLength(-1); sal_Int16 nStart(1); diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx index 1d9c3c82fa21..3cb404325736 100644 --- a/sc/source/ui/vba/vbacharacters.hxx +++ b/sc/source/ui/vba/vbacharacters.hxx @@ -37,7 +37,7 @@ private: public: /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException - ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool bReplace = false ); + ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, css::uno::Reference< css::text::XSimpleText > xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool bReplace = false ); // Attributes virtual OUString SAL_CALL getCaption() override; diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx index 5d9cd56a88c5..d6257591f333 100644 --- a/sc/source/ui/vba/vbachart.cxx +++ b/sc/source/ui/vba/vbachart.cxx @@ -40,6 +40,7 @@ #include "vbacharttitle.hxx" #include "vbaaxes.hxx" #include <document.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -66,7 +67,7 @@ constexpr OUStringLiteral DIM3D(u"Dim3D"); constexpr OUStringLiteral HASMAINTITLE(u"HasMainTitle"); constexpr OUStringLiteral HASLEGEND(u"HasLegend"); -ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart( _xTableChart ) +ScVbaChart::ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, css::uno::Reference< css::table::XTableChart > _xTableChart ) : ChartImpl_BASE( _xParent, _xContext ), mxTableChart(std::move( _xTableChart )) { mxChartDocument.set( _xChartComponent, uno::UNO_QUERY_THROW ) ; // #TODO is it possible that the XPropertySet interface is not set diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx index eedf13b9fa61..fa32513b7e54 100644 --- a/sc/source/ui/vba/vbachart.hxx +++ b/sc/source/ui/vba/vbachart.hxx @@ -67,7 +67,7 @@ friend class ScVbaAxis; sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers); void assignDiagramAttributes(); public: - ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, const css::uno::Reference< css::table::XTableChart >& _xTableChart ); + ScVbaChart( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::lang::XComponent >& _xChartComponent, css::uno::Reference< css::table::XTableChart > _xTableChart ); // Non-interface const css::uno::Reference< css::beans::XPropertySet >& xDiagramPropertySet() const { return mxDiagramPropertySet; } diff --git a/sc/source/ui/vba/vbachartobject.cxx b/sc/source/ui/vba/vbachartobject.cxx index 5246a9040eb6..5a45d29a52d7 100644 --- a/sc/source/ui/vba/vbachartobject.cxx +++ b/sc/source/ui/vba/vbachartobject.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/script/BasicErrorException.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <basic/sberrors.hxx> +#include <utility> #include "vbachartobject.hxx" #include "vbachartobjects.hxx" @@ -31,7 +32,7 @@ using namespace ::ooo::vba; constexpr OUStringLiteral PERSIST_NAME(u"PersistName"); -ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart( _xTableChart ), xDrawPageSupplier( _xDrawPageSupplier ) +ScVbaChartObject::ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, css::uno::Reference< css::table::XTableChart > _xTableChart, css::uno::Reference< css::drawing::XDrawPageSupplier > _xDrawPageSupplier ) : ChartObjectImpl_BASE( _xParent, _xContext ), xTableChart(std::move( _xTableChart )), xDrawPageSupplier(std::move( _xDrawPageSupplier )) { xDrawPage = xDrawPageSupplier->getDrawPage(); xEmbeddedObjectSupplier.set( xTableChart, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbachartobject.hxx b/sc/source/ui/vba/vbachartobject.hxx index 85a014052c84..59cc5aea8f20 100644 --- a/sc/source/ui/vba/vbachartobject.hxx +++ b/sc/source/ui/vba/vbachartobject.hxx @@ -46,7 +46,7 @@ class ScVbaChartObject : public ChartObjectImpl_BASE /// @throws css::script::BasicErrorException css::uno::Reference< css::drawing::XShape > setShape(); public: - ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ); + ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, css::uno::Reference< css::table::XTableChart > _xTableChart, css::uno::Reference< css::drawing::XDrawPageSupplier > _xDrawPageSupplier ); virtual OUString SAL_CALL getName() override; virtual void SAL_CALL setName( const OUString& sName ) override; virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() override; diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index 674c925110bb..b8e5dca1ab2b 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -29,6 +29,7 @@ #include <cellsuno.hxx> #include <string_view> +#include <utility> #include <vector> #include <basic/sberrors.hxx> #include <comphelper/sequence.hxx> @@ -45,7 +46,7 @@ class ChartObjectEnumerationImpl : public EnumerationHelperImpl public: /// @throws uno::RuntimeException - ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {} + ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< drawing::XDrawPageSupplier > _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier(std::move( _xDrawPageSupplier )) {} virtual uno::Any SAL_CALL nextElement( ) override { uno::Any ret; @@ -82,7 +83,7 @@ public: } -ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier( _xDrawPageSupplier ) +ScVbaChartObjects::ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, uno::Reference< drawing::XDrawPageSupplier > _xDrawPageSupplier ) : ChartObjects_BASE(_xParent, _xContext, css::uno::Reference< css::container::XIndexAccess >( _xTableCharts, css::uno::UNO_QUERY ) ), xTableCharts( _xTableCharts ) , xDrawPageSupplier(std::move( _xDrawPageSupplier )) { } diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx index ce116e734bff..0efb4134ff86 100644 --- a/sc/source/ui/vba/vbachartobjects.hxx +++ b/sc/source/ui/vba/vbachartobjects.hxx @@ -37,7 +37,7 @@ class ScVbaChartObjects : public ChartObjects_BASE // method associated with populating the hashmap ( I'm not convinced this is necessary ) //css::uno::Reference< ov::excel::XChartObject > putByPersistName( const rtl:::OUString& _sPersistChartName ); public: - ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ); + ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, css::uno::Reference< css::drawing::XDrawPageSupplier > _xDrawPageSupplier ); /// @throws css::script::BasicErrorException css::uno::Sequence< OUString > getChartObjectNames() const; diff --git a/sc/source/ui/vba/vbacondition.cxx b/sc/source/ui/vba/vbacondition.cxx index c5577a7f82c0..c22eff9bf5fa 100644 --- a/sc/source/ui/vba/vbacondition.cxx +++ b/sc/source/ui/vba/vbacondition.cxx @@ -23,6 +23,7 @@ #include <com/sun/star/sheet/XCellRangeAddressable.hpp> #include <com/sun/star/sheet/XSheetCondition.hpp> #include <basic/sberrors.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -30,12 +31,11 @@ using namespace ::com::sun::star; const sal_Int32 ISFORMULA = 98765432; template <typename... Ifc> -ScVbaCondition<Ifc...>::ScVbaCondition( - const uno::Reference<XHelperInterface>& xParent, - const uno::Reference<uno::XComponentContext>& xContext, - const uno::Reference<sheet::XSheetCondition>& _xSheetCondition) +ScVbaCondition<Ifc...>::ScVbaCondition(const uno::Reference<XHelperInterface>& xParent, + const uno::Reference<uno::XComponentContext>& xContext, + uno::Reference<sheet::XSheetCondition> _xSheetCondition) : ScVbaCondition_BASE(xParent, xContext) - , mxSheetCondition(_xSheetCondition) + , mxSheetCondition(std::move(_xSheetCondition)) { mxAddressable.set(xParent, uno::UNO_QUERY_THROW); } diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx index 78faf0d5e60a..4a30036ba8e9 100644 --- a/sc/source/ui/vba/vbacondition.hxx +++ b/sc/source/ui/vba/vbacondition.hxx @@ -32,7 +32,7 @@ protected: css::uno::Reference< css::sheet::XCellRangeAddressable > mxAddressable; css::uno::Reference< css::sheet::XSheetCondition > mxSheetCondition; public: - ScVbaCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition ); + ScVbaCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::sheet::XSheetCondition > _xSheetCondition ); /// @throws css::script::BasicErrorException static css::sheet::ConditionOperator retrieveAPIOperator( const css::uno::Any& _aOperator); diff --git a/sc/source/ui/vba/vbaformat.cxx b/sc/source/ui/vba/vbaformat.cxx index a027279ae594..2de02da98d04 100644 --- a/sc/source/ui/vba/vbaformat.cxx +++ b/sc/source/ui/vba/vbaformat.cxx @@ -49,6 +49,7 @@ #include <cellsuno.hxx> #include <scitems.hxx> #include <attrib.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -59,13 +60,13 @@ constexpr OUStringLiteral LOCALE = u"Locale"; template< typename... Ifc > ScVbaFormat< Ifc... >::ScVbaFormat( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, - const uno::Reference< beans::XPropertySet >& _xPropertySet, - const uno::Reference< frame::XModel >& xModel, + uno::Reference< beans::XPropertySet > _xPropertySet, + uno::Reference< frame::XModel > xModel, bool bCheckAmbiguoity ) : ScVbaFormat_BASE( xParent, xContext ), m_aDefaultLocale( "en", "US", OUString() ), - mxPropertySet( _xPropertySet ), - mxModel( xModel ), + mxPropertySet(std::move( _xPropertySet )), + mxModel(std::move( xModel )), mbCheckAmbiguoity( bCheckAmbiguoity ), mbAddIndent( false ) { diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx index f3c6750ce211..a85818ddd214 100644 --- a/sc/source/ui/vba/vbaformat.hxx +++ b/sc/source/ui/vba/vbaformat.hxx @@ -61,7 +61,7 @@ protected: virtual ScCellRangesBase* getCellRangesBase(); public: /// @throws css::script::BasicErrorException - ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& xModel, bool bCheckAmbiguoity ); + ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, css::uno::Reference< css::beans::XPropertySet > _xPropertySet, css::uno::Reference< css::frame::XModel > xModel, bool bCheckAmbiguoity ); virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0; /// @throws css::uno::RuntimeException void SAL_CALL setAddIndent( const css::uno::Any& BAddIndent) { BAddIndent >>= mbAddIndent; } diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index d9804399cce1..8c2b80238a76 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -21,6 +21,7 @@ #include <unonames.hxx> #include <ooo/vba/excel/XlFormatConditionType.hpp> #include <basic/sberrors.hxx> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -38,12 +39,12 @@ lcl_getScVbaFormatConditionsPtr( const uno::Reference< excel::XFormatConditions ScVbaFormatCondition::ScVbaFormatCondition( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext > & xContext, const uno::Reference< sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, - const uno::Reference< excel::XStyle >& _xStyle, - const uno::Reference< excel::XFormatConditions >& _xFormatConditions, - const uno::Reference< css::beans::XPropertySet >& _xPropertySet ) + uno::Reference< excel::XStyle > _xStyle, + uno::Reference< excel::XFormatConditions > _xFormatConditions, + uno::Reference< css::beans::XPropertySet > _xPropertySet ) : ScVbaFormatCondition_BASE( xParent, xContext, uno::Reference< sheet::XSheetCondition >( _xSheetConditionalEntry, css::uno::UNO_QUERY_THROW ) ), - moFormatConditions( _xFormatConditions ), mxStyle( _xStyle ), mxParentRangePropertySet( _xPropertySet ) + moFormatConditions(std::move( _xFormatConditions )), mxStyle(std::move( _xStyle )), mxParentRangePropertySet(std::move( _xPropertySet )) { mxSheetConditionalEntries = lcl_getScVbaFormatConditionsPtr( moFormatConditions )->getSheetConditionalEntries(); diff --git a/sc/source/ui/vba/vbaformatcondition.hxx b/sc/source/ui/vba/vbaformatcondition.hxx index 7d09a11b9597..dfa02dcb5863 100644 --- a/sc/source/ui/vba/vbaformatcondition.hxx +++ b/sc/source/ui/vba/vbaformatcondition.hxx @@ -41,9 +41,9 @@ public: ScVbaFormatCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, - const css::uno::Reference< ov::excel::XStyle >&, - const css::uno::Reference< ov::excel::XFormatConditions >& _xFormatConditions, - const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ); + css::uno::Reference< ov::excel::XStyle > , + css::uno::Reference< ov::excel::XFormatConditions > _xFormatConditions, + css::uno::Reference< css::beans::XPropertySet > _xPropertySet ); /// @throws css::script::BasicErrorException void notifyRange(); diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx index bbf167b3c3a2..a840a6fb5f78 100644 --- a/sc/source/ui/vba/vbaformatconditions.cxx +++ b/sc/source/ui/vba/vbaformatconditions.cxx @@ -22,6 +22,7 @@ #include <basic/sberrors.hxx> #include <comphelper/sequence.hxx> #include <cppuhelper/exc_hlp.hxx> +#include <utility> #include <vector> #include <unonames.hxx> #include "vbaformatconditions.hxx" @@ -89,7 +90,7 @@ class EnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<excel::XRange >& xRange, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<excel::XStyles >& xStyles, const uno::Reference< excel::XFormatConditions >& xCollection, const uno::Reference<beans::XPropertySet >& xProps ) : m_xIndexAccess( xIndexAccess ), m_xParentRange( xRange ), m_xContext( xContext ), m_xStyles( xStyles ), m_xParentCollection( xCollection ), m_xProps( xProps ), nIndex( 0 ) {} + EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference<excel::XRange > xRange, uno::Reference<uno::XComponentContext > xContext, uno::Reference<excel::XStyles > xStyles, uno::Reference< excel::XFormatConditions > xCollection, uno::Reference<beans::XPropertySet > xProps ) : m_xIndexAccess(std::move( xIndexAccess )), m_xParentRange(std::move( xRange )), m_xContext(std::move( xContext )), m_xStyles(std::move( xStyles )), m_xParentCollection(std::move( xCollection )), m_xProps(std::move( xProps )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx index 2849ed672cc6..7b678d508c90 100644 --- a/sc/source/ui/vba/vbainterior.cxx +++ b/sc/source/ui/vba/vbainterior.cxx @@ -29,6 +29,7 @@ #include "vbainterior.hxx" #include "vbapalette.hxx" #include <document.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -61,7 +62,7 @@ static std::map< sal_Int32, sal_Int32 > aPatternMap { { xlPatternVertical, 6 } }; -ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< beans::XPropertySet >& xProps, ScDocument* pScDoc ) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(xProps), m_pScDoc( pScDoc ) +ScVbaInterior::ScVbaInterior( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< beans::XPropertySet > xProps, ScDocument* pScDoc ) : ScVbaInterior_BASE( xParent, xContext ), m_xProps(std::move(xProps)), m_pScDoc( pScDoc ) { // auto color m_aPattColor = Color(0); diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx index 1ea226e63bd3..eb645fcf505d 100644 --- a/sc/source/ui/vba/vbainterior.hxx +++ b/sc/source/ui/vba/vbainterior.hxx @@ -56,7 +56,7 @@ class ScVbaInterior final : public ScVbaInterior_BASE public: /// @throws css::lang::IllegalArgumentException ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = nullptr); + css::uno::Reference< css::beans::XPropertySet > xProps, ScDocument* pScDoc = nullptr); virtual css::uno::Any SAL_CALL getColor() override ; virtual void SAL_CALL setColor( const css::uno::Any& _color ) override ; diff --git a/sc/source/ui/vba/vbamenu.cxx b/sc/source/ui/vba/vbamenu.cxx index 38b4feb116b7..d2bac36933f4 100644 --- a/sc/source/ui/vba/vbamenu.cxx +++ b/sc/source/ui/vba/vbamenu.cxx @@ -10,11 +10,12 @@ #include "vbamenu.hxx" #include "vbamenuitems.hxx" #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; -ScVbaMenu::ScVbaMenu( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBarControl >& rCommandBarControl ) : Menu_BASE( rParent, rContext ), m_xCommandBarControl( rCommandBarControl ) +ScVbaMenu::ScVbaMenu( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< XCommandBarControl > xCommandBarControl ) : Menu_BASE( rParent, rContext ), m_xCommandBarControl(std::move( xCommandBarControl )) { } diff --git a/sc/source/ui/vba/vbamenu.hxx b/sc/source/ui/vba/vbamenu.hxx index 284e2bc76839..2e4b89742859 100644 --- a/sc/source/ui/vba/vbamenu.hxx +++ b/sc/source/ui/vba/vbamenu.hxx @@ -21,7 +21,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenu( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBarControl >& rCommandBarControl ); + ScVbaMenu( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< ov::XCommandBarControl > xCommandBarControl ); virtual OUString SAL_CALL getCaption() override; virtual void SAL_CALL setCaption( const OUString& _caption ) override; diff --git a/sc/source/ui/vba/vbamenubar.cxx b/sc/source/ui/vba/vbamenubar.cxx index bd25c02a7147..50f69fdbf6b2 100644 --- a/sc/source/ui/vba/vbamenubar.cxx +++ b/sc/source/ui/vba/vbamenubar.cxx @@ -9,11 +9,12 @@ #include "vbamenubar.hxx" #include "vbamenus.hxx" #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; -ScVbaMenuBar::ScVbaMenuBar( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBar >& rCommandBar ) : MenuBar_BASE(rParent, rContext), m_xCommandBar(rCommandBar) +ScVbaMenuBar::ScVbaMenuBar( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< XCommandBar > xCommandBar ) : MenuBar_BASE(rParent, rContext), m_xCommandBar(std::move(xCommandBar)) { } diff --git a/sc/source/ui/vba/vbamenubar.hxx b/sc/source/ui/vba/vbamenubar.hxx index 75c1854c6015..d373f0252d8b 100644 --- a/sc/source/ui/vba/vbamenubar.hxx +++ b/sc/source/ui/vba/vbamenubar.hxx @@ -21,7 +21,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuBar( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBar >& rCommandBar ); + ScVbaMenuBar( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< ov::XCommandBar > xCommandBar ); virtual css::uno::Any SAL_CALL Menus( const css::uno::Any& aIndex ) override; diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index 6bcea2baa146..57f66644fcd6 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -11,6 +11,7 @@ #include <cppuhelper/implbase.hxx> #include <ooo/vba/excel/XlSheetType.hpp> #include <ooo/vba/XCommandBars.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -24,7 +25,7 @@ class MenuBarEnumeration : public ::cppu::WeakImplHelper< container::XEnumeratio uno::Reference< container::XEnumeration > m_xEnumeration; public: /// @throws uno::RuntimeException - MenuBarEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) + MenuBarEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XEnumeration > xEnumeration) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xEnumeration(std::move( xEnumeration )) { } virtual sal_Bool SAL_CALL hasMoreElements() override @@ -45,7 +46,7 @@ public: } -ScVbaMenuBars::ScVbaMenuBars( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBars >& xCommandBars ) : MenuBars_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBars( xCommandBars ) +ScVbaMenuBars::ScVbaMenuBars( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< XCommandBars > xCommandBars ) : MenuBars_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBars(std::move( xCommandBars )) { } diff --git a/sc/source/ui/vba/vbamenubars.hxx b/sc/source/ui/vba/vbamenubars.hxx index 1303a0ff358f..2b6e7e7db7a1 100644 --- a/sc/source/ui/vba/vbamenubars.hxx +++ b/sc/source/ui/vba/vbamenubars.hxx @@ -22,7 +22,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuBars( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBars >& xCommandBars ); + ScVbaMenuBars( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< ov::XCommandBars > xCommandBars ); virtual ~ScVbaMenuBars() override; // XEnumerationAccess diff --git a/sc/source/ui/vba/vbamenuitem.cxx b/sc/source/ui/vba/vbamenuitem.cxx index 2dba780baee4..522db66b097c 100644 --- a/sc/source/ui/vba/vbamenuitem.cxx +++ b/sc/source/ui/vba/vbamenuitem.cxx @@ -6,12 +6,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <utility> + #include "vbamenuitem.hxx" using namespace com::sun::star; using namespace ooo::vba; -ScVbaMenuItem::ScVbaMenuItem( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< XCommandBarControl >& rCommandBarControl ) : MenuItem_BASE( rParent, rContext ), m_xCommandBarControl( rCommandBarControl ) +ScVbaMenuItem::ScVbaMenuItem( const uno::Reference< ov::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, uno::Reference< XCommandBarControl > xCommandBarControl ) : MenuItem_BASE( rParent, rContext ), m_xCommandBarControl(std::move( xCommandBarControl )) { } diff --git a/sc/source/ui/vba/vbamenuitem.hxx b/sc/source/ui/vba/vbamenuitem.hxx index bf8c35b2908b..0c8561421120 100644 --- a/sc/source/ui/vba/vbamenuitem.hxx +++ b/sc/source/ui/vba/vbamenuitem.hxx @@ -21,7 +21,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuItem( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBarControl >& rCommandBarControl ); + ScVbaMenuItem( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, css::uno::Reference< ov::XCommandBarControl > xCommandBarControl ); virtual OUString SAL_CALL getCaption() override; virtual void SAL_CALL setCaption( const OUString& _caption ) override; diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx index 646fd82cb7d4..10d6fc33e046 100644 --- a/sc/source/ui/vba/vbamenuitems.cxx +++ b/sc/source/ui/vba/vbamenuitems.cxx @@ -12,6 +12,7 @@ #include <cppuhelper/implbase.hxx> #include <ooo/vba/office/MsoControlType.hpp> #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -27,7 +28,7 @@ class MenuEnumeration : public MenuEnumeration_BASE uno::Reference< container::XEnumeration > m_xEnumeration; public: /// @throws uno::RuntimeException - MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) + MenuEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XEnumeration > xEnumeration) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xEnumeration(std::move( xEnumeration )) { } virtual sal_Bool SAL_CALL hasMoreElements() override @@ -59,7 +60,7 @@ public: } -ScVbaMenuItems::ScVbaMenuItems( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBarControls >& xCommandBarControls ) : MenuItems_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls( xCommandBarControls ) +ScVbaMenuItems::ScVbaMenuItems( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< XCommandBarControls > xCommandBarControls ) : MenuItems_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls(std::move( xCommandBarControls )) { } diff --git a/sc/source/ui/vba/vbamenuitems.hxx b/sc/source/ui/vba/vbamenuitems.hxx index 71f43e634c29..55e6fe78225e 100644 --- a/sc/source/ui/vba/vbamenuitems.hxx +++ b/sc/source/ui/vba/vbamenuitems.hxx @@ -23,7 +23,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenuItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ); + ScVbaMenuItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< ov::XCommandBarControls > xCommandBarControls ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx index 807f0cf5ade3..b9b2c08fa0f2 100644 --- a/sc/source/ui/vba/vbamenus.cxx +++ b/sc/source/ui/vba/vbamenus.cxx @@ -11,6 +11,7 @@ #include <cppuhelper/implbase.hxx> #include <ooo/vba/office/MsoControlType.hpp> #include <ooo/vba/XCommandBarControls.hpp> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -26,7 +27,7 @@ class MenuEnumeration : public MenuEnumeration_BASE uno::Reference< container::XEnumeration > m_xEnumeration; public: /// @throws uno::RuntimeException - MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) + MenuEnumeration( uno::Reference< XHelperInterface > xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< container::XEnumeration > xEnumeration) : m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xEnumeration(std::move( xEnumeration )) { } virtual sal_Bool SAL_CALL hasMoreElements() override @@ -53,7 +54,7 @@ public: } -ScVbaMenus::ScVbaMenus( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCommandBarControls >& xCommandBarControls ) : Menus_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls( xCommandBarControls ) +ScVbaMenus::ScVbaMenus( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< XCommandBarControls > xCommandBarControls ) : Menus_BASE( xParent, xContext, uno::Reference< container::XIndexAccess>() ), m_xCommandBarControls(std::move( xCommandBarControls )) { } diff --git a/sc/source/ui/vba/vbamenus.hxx b/sc/source/ui/vba/vbamenus.hxx index 2a14cf3cb374..4d8f646254b1 100644 --- a/sc/source/ui/vba/vbamenus.hxx +++ b/sc/source/ui/vba/vbamenus.hxx @@ -23,7 +23,7 @@ private: public: /// @throws css::uno::RuntimeException - ScVbaMenus( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ); + ScVbaMenus( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< ov::XCommandBarControls > xCommandBarControls ); // XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() override; diff --git a/sc/source/ui/vba/vbaname.cxx b/sc/source/ui/vba/vbaname.cxx index 7ef8fe1293f5..eece5396c27c 100644 --- a/sc/source/ui/vba/vbaname.cxx +++ b/sc/source/ui/vba/vbaname.cxx @@ -27,19 +27,20 @@ #include <tokenarray.hxx> #include <memory> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; ScVbaName::ScVbaName(const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XNamedRange >& xName, - const css::uno::Reference< css::sheet::XNamedRanges >& xNames, - const css::uno::Reference< css::frame::XModel >& xModel ): + css::uno::Reference< css::sheet::XNamedRange > xName, + css::uno::Reference< css::sheet::XNamedRanges > xNames, + css::uno::Reference< css::frame::XModel > xModel ): NameImpl_BASE( xParent , xContext ), - mxModel( xModel ), - mxNamedRange( xName ), - mxNames( xNames ) + mxModel(std::move( xModel )), + mxNamedRange(std::move( xName )), + mxNames(std::move( xNames )) { } diff --git a/sc/source/ui/vba/vbaname.hxx b/sc/source/ui/vba/vbaname.hxx index 194b047faeb2..9d12f2ac6bfd 100644 --- a/sc/source/ui/vba/vbaname.hxx +++ b/sc/source/ui/vba/vbaname.hxx @@ -36,7 +36,7 @@ class ScVbaName : public NameImpl_BASE OUString getContent( const formula::FormulaGrammar::Grammar eGrammar ); void setContent( const OUString& sContent, const formula::FormulaGrammar::Grammar eGrammar ); public: - ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRange >& xName , const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel ); + ScVbaName( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XNamedRange > xName , css::uno::Reference< css::sheet::XNamedRanges > xNames , css::uno::Reference< css::frame::XModel > xModel ); virtual ~ScVbaName() override; // Attributes diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 287dbcf3cfff..074cfe60d647 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -27,6 +27,7 @@ #include "vbaname.hxx" #include "vbarange.hxx" #include <tabvwsh.hxx> +#include <utility> #include <viewdata.hxx> #include <compiler.hxx> #include <tokenarray.hxx> @@ -45,7 +46,7 @@ class NamesEnumeration : public EnumerationHelperImpl uno::Reference< sheet::XNamedRanges > m_xNames; public: /// @throws uno::RuntimeException - NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ), m_xNames( xNames ) {} + NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< frame::XModel > xModel , uno::Reference< sheet::XNamedRanges > xNames ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel(std::move( xModel )), m_xNames(std::move( xNames )) {} virtual uno::Any SAL_CALL nextElement( ) override { @@ -60,9 +61,9 @@ public: ScVbaNames::ScVbaNames(const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames, - const css::uno::Reference< css::frame::XModel >& xModel ): + css::uno::Reference< css::frame::XModel > xModel ): ScVbaNames_BASE( xParent , xContext , uno::Reference< container::XIndexAccess >( xNames, uno::UNO_QUERY ) ), - mxModel( xModel ), + mxModel(std::move( xModel )), mxNames( xNames ) { m_xNameAccess.set( xNames, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx index 96f03d435975..db20803a6dd3 100644 --- a/sc/source/ui/vba/vbanames.hxx +++ b/sc/source/ui/vba/vbanames.hxx @@ -35,7 +35,7 @@ class ScVbaNames final : public ScVbaNames_BASE const css::uno::Reference< css::frame::XModel >& getModel() const { return mxModel; } public: - ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , const css::uno::Reference< css::frame::XModel >& xModel ); + ScVbaNames( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XNamedRanges >& xNames , css::uno::Reference< css::frame::XModel > xModel ); ScDocument& getScDocument(); diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 11a8c3934658..06b576f26f61 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -24,6 +24,7 @@ #include "vbaoleobject.hxx" #include "vbaoleobjects.hxx" #include <cppuhelper/implbase.hxx> +#include <utility> using namespace com::sun::star; using namespace ooo::vba; @@ -81,10 +82,10 @@ class EnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - EnumWrapper( const uno::Reference< XHelperInterface >& xParent, - const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< container::XIndexAccess >& xIndexAccess ) - : m_xParent( xParent ), m_xContext( xContext), m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + EnumWrapper( uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, + uno::Reference< container::XIndexAccess > xIndexAccess ) + : m_xParent(std::move( xParent )), m_xContext(std::move( xContext)), m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { diff --git a/sc/source/ui/vba/vbaoutline.hxx b/sc/source/ui/vba/vbaoutline.hxx index 4554083e9dab..7fd46d3685bf 100644 --- a/sc/source/ui/vba/vbaoutline.hxx +++ b/sc/source/ui/vba/vbaoutline.hxx @@ -19,6 +19,7 @@ #pragma once #include <ooo/vba/excel/XOutline.hpp> +#include <utility> #include <vbahelper/vbahelperinterface.hxx> namespace com::sun::star::uno { class XComponentContext; } @@ -31,7 +32,7 @@ class ScVbaOutline : public ScVbaOutline_BASE css::uno::Reference< css::sheet::XSheetOutline > mxOutline; public: ScVbaOutline( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - css::uno::Reference<css::sheet::XSheetOutline> const & outline): ScVbaOutline_BASE( xParent, xContext) , mxOutline(outline) + css::uno::Reference<css::sheet::XSheetOutline> outline): ScVbaOutline_BASE( xParent, xContext) , mxOutline(std::move(outline)) {} virtual void SAL_CALL ShowLevels( const css::uno::Any& RowLevels, const css::uno::Any& ColumnLevels ) override ; diff --git a/sc/source/ui/vba/vbapagebreak.cxx b/sc/source/ui/vba/vbapagebreak.cxx index 3d9269c72fb0..2b7d3ff4a605 100644 --- a/sc/source/ui/vba/vbapagebreak.cxx +++ b/sc/source/ui/vba/vbapagebreak.cxx @@ -22,6 +22,7 @@ #include <ooo/vba/excel/XlPageBreak.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/table/XCellRange.hpp> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -29,10 +30,10 @@ using namespace ::ooo::vba; template< typename... Ifc > ScVbaPageBreak< Ifc... >::ScVbaPageBreak( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< beans::XPropertySet >& xProps, + uno::Reference< beans::XPropertySet > xProps, sheet::TablePageBreakData aTablePageBreakData): ScVbaPageBreak_BASE( xParent, xContext ), - mxRowColPropertySet( xProps ), + mxRowColPropertySet(std::move( xProps )), maTablePageBreakData( aTablePageBreakData ) { } diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx index 537258923e3d..48d6cad0786a 100644 --- a/sc/source/ui/vba/vbapagebreak.hxx +++ b/sc/source/ui/vba/vbapagebreak.hxx @@ -38,7 +38,7 @@ public: /// @throws css::uno::RuntimeException ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::beans::XPropertySet >& xProps, + css::uno::Reference< css::beans::XPropertySet > xProps, css::sheet::TablePageBreakData aTablePageBreakData); virtual sal_Int32 SAL_CALL getType( ) override; diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index 36d9f5c7f0f3..b9a0235c34f3 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -25,6 +25,7 @@ #include <com/sun/star/sheet/XSheetPageBreak.hpp> #include <com/sun/star/table/XColumnRowRange.hpp> #include <com/sun/star/uno/XComponentContext.hpp> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -40,10 +41,10 @@ private: bool m_bColumn; public: - RangePageBreaks( const uno::Reference< XHelperInterface >& xParent, - const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< sheet::XSheetPageBreak >& xSheetPageBreak, - bool bColumn ) : mxParent( xParent ), mxContext( xContext ), mxSheetPageBreak( xSheetPageBreak ), m_bColumn( bColumn ) + RangePageBreaks( uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, + uno::Reference< sheet::XSheetPageBreak > xSheetPageBreak, + bool bColumn ) : mxParent(std::move( xParent )), mxContext(std::move( xContext )), mxSheetPageBreak(std::move( xSheetPageBreak )), m_bColumn( bColumn ) { } @@ -195,7 +196,7 @@ class RangePageBreaksEnumWrapper : public EnumerationHelper_BASE uno::Reference<container::XIndexAccess > m_xIndexAccess; sal_Int32 nIndex; public: - explicit RangePageBreaksEnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess ) : m_xIndexAccess( xIndexAccess ), nIndex( 0 ) {} + explicit RangePageBreaksEnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess ) : m_xIndexAccess(std::move( xIndexAccess )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbapagesetup.cxx b/sc/source/ui/vba/vbapagesetup.cxx index 7b7b23d16e4c..f487b74e0c7b 100644 --- a/sc/source/ui/vba/vbapagesetup.cxx +++ b/sc/source/ui/vba/vbapagesetup.cxx @@ -33,6 +33,7 @@ #include <ooo/vba/excel/XlPaperSize.hpp> #include <basic/sberrors.hxx> #include <filter/msfilter/util.hxx> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -42,9 +43,9 @@ using namespace ::ooo::vba; ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< sheet::XSpreadsheet >& xSheet, + uno::Reference< sheet::XSpreadsheet > xSheet, const uno::Reference< frame::XModel >& xModel): - ScVbaPageSetup_BASE( xParent, xContext ), mxSheet( xSheet ), mbIsLandscape( false ) + ScVbaPageSetup_BASE( xParent, xContext ), mxSheet(std::move( xSheet )), mbIsLandscape( false ) { // query for current page style mxModel.set( xModel, uno::UNO_SET_THROW ); diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx index 75e3ed1d3413..6f2f8b45c51f 100644 --- a/sc/source/ui/vba/vbapagesetup.hxx +++ b/sc/source/ui/vba/vbapagesetup.hxx @@ -35,7 +35,7 @@ public: /// @throws css::uno::RuntimeException ScVbaPageSetup(const css::uno::Reference<ov::XHelperInterface>& xParent, const css::uno::Reference<css::uno::XComponentContext>& xContext, - const css::uno::Reference<css::sheet::XSpreadsheet>& xSheet, + css::uno::Reference<css::sheet::XSpreadsheet> xSheet, const css::uno::Reference<css::frame::XModel>& xModel); // Attribute diff --git a/sc/source/ui/vba/vbapane.cxx b/sc/source/ui/vba/vbapane.cxx index 1f7f0b540565..9e9dd2e33fdd 100644 --- a/sc/source/ui/vba/vbapane.cxx +++ b/sc/source/ui/vba/vbapane.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/sheet/XSpreadsheet.hpp> #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/table/CellRangeAddress.hpp> +#include <utility> #include "vbarange.hxx" using namespace com::sun::star; @@ -29,13 +30,13 @@ using namespace ooo::vba; ScVbaPane::ScVbaPane( const css::uno::Reference< ov::XHelperInterface >& xParent, - const uno::Reference< uno::XComponentContext >& xContext, + uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel >& rModel, const uno::Reference< sheet::XViewPane >& rViewPane ) : m_xModel(rModel, uno::UNO_SET_THROW), m_xViewPane(rViewPane, uno::UNO_SET_THROW), m_xParent(xParent), - m_xContext(xContext) + m_xContext(std::move(xContext)) { } diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx index cf4fd832803e..962e6839108b 100644 --- a/sc/source/ui/vba/vbapane.hxx +++ b/sc/source/ui/vba/vbapane.hxx @@ -30,7 +30,7 @@ public: /// @throws css::uno::RuntimeException ScVbaPane( const css::uno::Reference< ov::XHelperInterface >& rParent, - const css::uno::Reference< css::uno::XComponentContext >& rContext, + css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::frame::XModel >& rModel, const css::uno::Reference< css::sheet::XViewPane >& rViewPane ); diff --git a/sc/source/ui/vba/vbapivotcache.cxx b/sc/source/ui/vba/vbapivotcache.cxx index 54c6a4ad7a88..15f81c0eb3cf 100644 --- a/sc/source/ui/vba/vbapivotcache.cxx +++ b/sc/source/ui/vba/vbapivotcache.cxx @@ -16,12 +16,14 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> + #include "vbapivotcache.hxx" using namespace ::com::sun::star; using namespace ::ooo::vba; -ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable( xTable ) +ScVbaPivotCache::ScVbaPivotCache( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< sheet::XDataPilotTable > xTable ) : PivotCacheImpl_BASE( xParent, xContext ), m_xTable(std::move( xTable )) { } diff --git a/sc/source/ui/vba/vbapivotcache.hxx b/sc/source/ui/vba/vbapivotcache.hxx index c02f309200e8..49770f917b88 100644 --- a/sc/source/ui/vba/vbapivotcache.hxx +++ b/sc/source/ui/vba/vbapivotcache.hxx @@ -29,7 +29,7 @@ class ScVbaPivotCache : public PivotCacheImpl_BASE { css::uno::Reference< css::sheet::XDataPilotTable > m_xTable; public: - ScVbaPivotCache( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XDataPilotTable >& xTable ); + ScVbaPivotCache( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XDataPilotTable > xTable ); virtual void SAL_CALL Refresh() override; // XHelperInterface diff --git a/sc/source/ui/vba/vbapivottable.cxx b/sc/source/ui/vba/vbapivottable.cxx index 775ac390c0c1..263a695f79f5 100644 --- a/sc/source/ui/vba/vbapivottable.cxx +++ b/sc/source/ui/vba/vbapivottable.cxx @@ -16,13 +16,15 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <utility> + #include "vbapivottable.hxx" #include "vbapivotcache.hxx" using namespace ::com::sun::star; using namespace ::ooo::vba; -ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< sheet::XDataPilotTable >& xTable ) : PivotTableImpl_BASE( uno::Reference< XHelperInterface >(), xContext), m_xTable( xTable ) +ScVbaPivotTable::ScVbaPivotTable( const uno::Reference< uno::XComponentContext >& xContext, uno::Reference< sheet::XDataPilotTable > xTable ) : PivotTableImpl_BASE( uno::Reference< XHelperInterface >(), xContext), m_xTable(std::move( xTable )) { } diff --git a/sc/source/ui/vba/vbapivottable.hxx b/sc/source/ui/vba/vbapivottable.hxx index 3d3392168f6b..c584ebecf119 100644 --- a/sc/source/ui/vba/vbapivottable.hxx +++ b/sc/source/ui/vba/vbapivottable.hxx @@ -30,7 +30,7 @@ class ScVbaPivotTable : public PivotTableImpl_BASE public: ScVbaPivotTable(const css::uno::Reference<css::uno::XComponentContext>& xContext, - const css::uno::Reference<css::sheet::XDataPilotTable>& xTable); + css::uno::Reference<css::sheet::XDataPilotTable> xTable); virtual css::uno::Reference<ov::excel::XPivotCache> SAL_CALL PivotCache() override; // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 99bcce81ba00..29359f41d499 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -151,6 +151,7 @@ #include "vbastyle.hxx" #include "vbaname.hxx" +#include <utility> #include <vector> #include <vbahelper/vbacollectionimpl.hxx> @@ -272,7 +273,7 @@ class SingleRangeEnumeration : public EnumerationHelper_BASE bool bHasMore; public: /// @throws uno::RuntimeException - explicit SingleRangeEnumeration( const uno::Reference< table::XCellRange >& xRange ) : m_xRange( xRange ), bHasMore( true ) { } + explicit SingleRangeEnumeration( uno::Reference< table::XCellRange > xRange ) : m_xRange(std::move( xRange )), bHasMore( true ) { } virtual sal_Bool SAL_CALL hasMoreElements( ) override { return bHasMore; } virtual uno::Any SAL_CALL nextElement( ) override { @@ -293,7 +294,7 @@ private: uno::Reference< table::XCellRange > m_xRange; public: - explicit SingleRangeIndexAccess( const uno::Reference< table::XCellRange >& xRange ) : m_xRange( xRange ) {} + explicit SingleRangeIndexAccess( uno::Reference< table::XCellRange > xRange ) : m_xRange(std::move( xRange )) {} // XIndexAccess virtual ::sal_Int32 SAL_CALL getCount() override { return 1; } virtual uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override @@ -596,7 +597,7 @@ class ColumnsRowEnumeration: public CellsEnumeration_BASE sal_Int32 mCurElem; public: - ColumnsRowEnumeration( const uno::Reference< excel::XRange >& xRange, sal_Int32 nElems ) : mxRange( xRange ), mMaxElems( nElems ), mCurElem( 0 ) + ColumnsRowEnumeration( uno::Reference< excel::XRange > xRange, sal_Int32 nElems ) : mxRange(std::move( xRange )), mMaxElems( nElems ), mCurElem( 0 ) { } @@ -642,7 +643,7 @@ class CellsEnumeration : public CellsEnumeration_BASE } } public: - CellsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< XCollection >& xAreas ): mxParent( xParent ), mxContext( xContext ), m_xAreas( xAreas ) + CellsEnumeration( const uno::Reference< XHelperInterface >& xParent, uno::Reference< uno::XComponentContext > xContext, uno::Reference< XCollection > xAreas ): mxParent( xParent ), mxContext(std::move( xContext )), m_xAreas(std::move( xAreas )) { sal_Int32 nItems = m_xAreas->getCount(); for ( sal_Int32 index=1; index <= nItems; ++index ) @@ -685,7 +686,7 @@ class CellValueSetter : public ValueSetter protected: uno::Any maValue; public: - explicit CellValueSetter( const uno::Any& aValue ); + explicit CellValueSetter( uno::Any aValue ); virtual bool processValue( const uno::Any& aValue, const uno::Reference< table::XCell >& xCell ) override; virtual void visitNode( sal_Int32 x, sal_Int32 y, const uno::Reference< table::XCell >& xCell ) override; @@ -693,7 +694,7 @@ public: } -CellValueSetter::CellValueSetter( const uno::Any& aValue ): maValue( aValue ) {} +CellValueSetter::CellValueSetter( uno::Any aValue ): maValue(std::move( aValue )) {} void CellValueSetter::visitNode( sal_Int32 /*i*/, sal_Int32 /*j*/, const uno::Reference< table::XCell >& xCell ) @@ -1076,7 +1077,7 @@ class AreasVisitor private: uno::Reference< XCollection > m_Areas; public: - explicit AreasVisitor( const uno::Reference< XCollection >& rAreas ):m_Areas( rAreas ){} + explicit AreasVisitor( uno::Reference< XCollection > xAreas ):m_Areas(std::move( xAreas )){} void visit( RangeProcessor& processor ) { @@ -1098,7 +1099,7 @@ class RangeHelper public: /// @throws uno::RuntimeException - explicit RangeHelper( const uno::Reference< table::XCellRange >& xCellRange ) : m_xCellRange( xCellRange ) + explicit RangeHelper( uno::Reference< table::XCellRange > xCellRange ) : m_xCellRange(std::move( xCellRange )) { if ( !m_xCellRange.is() ) throw uno::RuntimeException(); diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index a6a9a1233b8e..8ba097f9e70b 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -18,6 +18,7 @@ */ #include "vbasheetobjects.hxx" +#include <utility> #include <vector> #include <o3tl/unit_conversion.hxx> #include <rtl/math.hxx> @@ -79,8 +80,8 @@ class ScVbaObjectContainer : public ::cppu::WeakImplHelper< container::XIndexAcc public: /// @throws uno::RuntimeException explicit ScVbaObjectContainer( - const uno::Reference< XHelperInterface >& rxParent, - const uno::Reference< uno::XComponentContext >& rxContext, + uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType ); @@ -168,13 +169,13 @@ private: }; ScVbaObjectContainer::ScVbaObjectContainer( - const uno::Reference< XHelperInterface >& rxParent, - const uno::Reference< uno::XComponentContext >& rxContext, + uno::Reference< XHelperInterface > xParent, + uno::Reference< uno::XComponentContext > xContext, const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType ) : - mxParent( rxParent ), - mxContext( rxContext ), + mxParent(std::move( xParent )), + mxContext(std::move( xContext )), mxModel( rxModel, uno::UNO_SET_THROW ), mxFactory( rxModel, uno::UNO_QUERY_THROW ), maVbaType( rVbaType ) @@ -381,7 +382,7 @@ public: const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType, - const OUString& rModelServiceName, + OUString aModelServiceName, sal_Int16 /* css::form::FormComponentType */ eType ); protected: @@ -408,10 +409,10 @@ ScVbaControlContainer::ScVbaControlContainer( const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType, - const OUString& rModelServiceName, + OUString aModelServiceName, sal_Int16 /* css::form::FormComponentType */ eType ) : ScVbaObjectContainer( rxParent, rxContext, rxModel, rxSheet, rVbaType ), - maModelServiceName( rModelServiceName ), + maModelServiceName(std::move( aModelServiceName )), meType( eType ) { } diff --git a/sc/source/ui/vba/vbastyles.cxx b/sc/source/ui/vba/vbastyles.cxx index c21adf06487a..6481e8911fdf 100644 --- a/sc/source/ui/vba/vbastyles.cxx +++ b/sc/source/ui/vba/vbastyles.cxx @@ -23,6 +23,7 @@ #include <ooo/vba/excel/XRange.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <utility> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -83,7 +84,7 @@ class EnumWrapper : public EnumerationHelper_BASE sal_Int32 nIndex; public: - EnumWrapper( const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference<XHelperInterface >& xParent, const uno::Reference<uno::XComponentContext >& xContext, const uno::Reference<frame::XModel >& xModel ) : m_xIndexAccess( xIndexAccess ), m_xParent( xParent ), m_xContext( xContext ), m_xModel( xModel ), nIndex( 0 ) {} + EnumWrapper( uno::Reference< container::XIndexAccess > xIndexAccess, uno::Reference<XHelperInterface > xParent, uno::Reference<uno::XComponentContext > xContext, uno::Reference<frame::XModel > xModel ) : m_xIndexAccess(std::move( xIndexAccess )), m_xParent(std::move( xParent )), m_xContext(std::move( xContext )), m_xModel(std::move( xModel )), nIndex( 0 ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( nIndex < m_xIndexAccess->getCount() ); diff --git a/sc/source/ui/vba/vbatitle.hxx b/sc/source/ui/vba/vbatitle.hxx index 550be00607fe..8834ca90c8b2 100644 --- a/sc/source/ui/vba/vbatitle.hxx +++ b/sc/source/ui/vba/vbatitle.hxx @@ -18,6 +18,7 @@ */ #pragma once +#include <utility> #include <vbahelper/vbahelperinterface.hxx> #include "vbainterior.hxx" #include "vbafont.hxx" @@ -40,8 +41,8 @@ typedef InheritedHelperInterfaceImpl< Ifc... > BaseClass; public: TitleImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::drawing::XShape >& _xTitleShape ) - : BaseClass( xParent, xContext ), xTitleShape( _xTitleShape ), m_Palette(nullptr) + css::uno::Reference< css::drawing::XShape > _xTitleShape ) + : BaseClass( xParent, xContext ), xTitleShape(std::move( _xTitleShape )), m_Palette(nullptr) { xShapePropertySet.set( xTitleShape, css::uno::UNO_QUERY_THROW ); oShapeHelper.reset( new ov::ShapeHelper(xTitleShape) ); diff --git a/sc/source/ui/vba/vbavalidation.hxx b/sc/source/ui/vba/vbavalidation.hxx index ab16c053337a..6395d6728ad7 100644 --- a/sc/source/ui/vba/vbavalidation.hxx +++ b/sc/source/ui/vba/vbavalidation.hxx @@ -19,6 +19,7 @@ #pragma once #include <ooo/vba/excel/XValidation.hpp> +#include <utility> #include <vbahelper/vbahelperinterface.hxx> namespace com::sun::star::table { class XCellRange; } @@ -31,7 +32,7 @@ class ScVbaValidation : public ValidationImpl_BASE css::uno::Reference< css::table::XCellRange > m_xRange; public: - ScVbaValidation( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange( xRange) {} + ScVbaValidation( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::table::XCellRange > xRange ) : ValidationImpl_BASE( xParent, xContext ), m_xRange(std::move( xRange)) {} // Attributes virtual sal_Bool SAL_CALL getIgnoreBlank() override; virtual void SAL_CALL setIgnoreBlank( sal_Bool _ignoreblank ) override; diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 3e7cc4f5676f..6885f9b18ca1 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -42,6 +42,7 @@ #include <docuno.hxx> #include <sc.hrc> #include <sfx2/viewfrm.hxx> +#include <utility> #include <vcl/wrkwin.hxx> #include <unonames.hxx> #include <markdata.hxx> @@ -72,8 +73,8 @@ public: Sheets::const_iterator m_it; /// @throws uno::RuntimeException - SelectedSheetsEnum( const uno::Reference< uno::XComponentContext >& xContext, Sheets&& sheets, const uno::Reference< frame::XModel >& xModel ) - : m_xContext( xContext ), m_sheets( std::move(sheets) ), m_xModel( xModel ) + SelectedSheetsEnum( uno::Reference< uno::XComponentContext > xContext, Sheets&& sheets, uno::Reference< frame::XModel > xModel ) + : m_xContext(std::move( xContext )), m_sheets( std::move(sheets) ), m_xModel(std::move( xModel )) { m_it = m_sheets.begin(); } @@ -101,7 +102,7 @@ class SelectedSheetsEnumAccess : public SelectedSheets_BASE Sheets sheets; uno::Reference< frame::XModel > m_xModel; public: - SelectedSheetsEnumAccess( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< frame::XModel >& xModel ):m_xContext( xContext ), m_xModel( xModel ) + SelectedSheetsEnumAccess( uno::Reference< uno::XComponentContext > xContext, uno::Reference< frame::XModel > xModel ):m_xContext(std::move( xContext )), m_xModel(std::move( xModel )) { ScModelObj* pModel = static_cast< ScModelObj* >( m_xModel.get() ); if ( !pModel ) diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index 3a99603782a1..00cacc5f39cc 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -30,6 +30,7 @@ #include "vbaworkbook.hxx" #include <unordered_map> +#include <utility> using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -65,14 +66,14 @@ protected: public: /// @throws uno::RuntimeException - WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, Components&& components ) - : m_xContext( xContext ), m_components( std::move(components) ) + WindowComponentEnumImpl( uno::Reference< uno::XComponentContext > xContext, Components&& components ) + : m_xContext(std::move( xContext )), m_components( std::move(components) ) { m_it = m_components.begin(); } /// @throws uno::RuntimeException - explicit WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) : m_xContext( xContext ) + explicit WindowComponentEnumImpl( uno::Reference< uno::XComponentContext > xContext ) : m_xContext(std::move( xContext )) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xContext); uno::Reference< container::XEnumeration > xComponents = xDesktop->getComponents()->createEnumeration(); @@ -104,7 +105,7 @@ class WindowEnumImpl : public WindowComponentEnumImpl { uno::Any m_aApplication; public: - WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Any& aApplication ): WindowComponentEnumImpl( xContext ), m_aApplication( aApplication ) {} + WindowEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, uno::Any aApplication ): WindowComponentEnumImpl( xContext ), m_aApplication(std::move( aApplication )) {} virtual uno::Any SAL_CALL nextElement( ) override { return ComponentToWindow( WindowComponentEnumImpl::nextElement(), m_xContext, m_aApplication ); @@ -126,7 +127,7 @@ class WindowsAccessImpl : public WindowsAccessImpl_BASE Components m_windows; NameIndexHash namesToIndices; public: - explicit WindowsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext ):m_xContext( xContext ) + explicit WindowsAccessImpl( uno::Reference< uno::XComponentContext > xContext ):m_xContext(std::move( xContext )) { uno::Reference< container::XEnumeration > xEnum = new WindowComponentEnumImpl( m_xContext ); sal_Int32 nIndex=0; diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index c5128442799d..cfc84537da62 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -55,6 +55,7 @@ #include <basic/sberrors.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/servicehelper.hxx> +#include <utility> #include <vbahelper/vbashapes.hxx> //zhangyun showdataform @@ -147,8 +148,8 @@ openNewDoc(const OUString& aSheetName ) } ScVbaWorksheet::ScVbaWorksheet(const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, - const uno::Reference< sheet::XSpreadsheet >& xSheet, - const uno::Reference< frame::XModel >& xModel ) : WorksheetImpl_BASE( xParent, xContext ), mxSheet( xSheet ), mxModel(xModel), mbVeryHidden( false ) + uno::Reference< sheet::XSpreadsheet > xSheet, + uno::Reference< frame::XModel > xModel ) : WorksheetImpl_BASE( xParent, xContext ), mxSheet(std::move( xSheet )), mxModel(std::move(xModel)), mbVeryHidden( false ) { } diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx index 5eee3df4a175..439e5a3139bd 100644 --- a/sc/source/ui/vba/vbaworksheet.hxx +++ b/sc/source/ui/vba/vbaworksheet.hxx @@ -63,8 +63,8 @@ public: /// @throws css::uno::RuntimeException ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, - const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet, - const css::uno::Reference< css::frame::XModel >& xModel ) ; + css::uno::Reference< css::sheet::XSpreadsheet > xSheet, + css::uno::Reference< css::frame::XModel > xModel ) ; /// @throws css::lang::IllegalArgumentException /// @throws css::uno::RuntimeException ScVbaWorksheet( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ); diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index 5df1bc622a24..48795cb9594c 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -36,6 +36,7 @@ #include "vbaworksheet.hxx" #include <markdata.hxx> +#include <utility> #include <vector> #include <prevwsh.hxx> #include <preview.hxx> @@ -136,7 +137,7 @@ class SheetsEnumeration : public EnumerationHelperImpl uno::Reference< frame::XModel > m_xModel; public: /// @throws uno::RuntimeException - SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ) {} + SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, uno::Reference< frame::XModel > xModel ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel(std::move( xModel )) {} virtual uno::Any SAL_CALL nextElement( ) override { @@ -159,11 +160,11 @@ public: } -ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, xSheets ), mxModel( xModel ), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) +ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XIndexAccess >& xSheets, uno::Reference< frame::XModel > xModel ): ScVbaWorksheets_BASE( xParent, xContext, xSheets ), mxModel(std::move( xModel )), m_xSheets( uno::Reference< sheet::XSpreadsheets >( xSheets, uno::UNO_QUERY ) ) { } -ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, const uno::Reference< frame::XModel >& xModel ): ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(xModel) +ScVbaWorksheets::ScVbaWorksheets( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext > & xContext, const uno::Reference< container::XEnumerationAccess >& xEnumAccess, uno::Reference< frame::XModel > xModel ): ScVbaWorksheets_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( xEnumAccess, uno::UNO_QUERY ) ), mxModel(std::move(xModel)) { } diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx index b795fbf5a89a..611365edfcd1 100644 --- a/sc/source/ui/vba/vbaworksheets.hxx +++ b/sc/source/ui/vba/vbaworksheets.hxx @@ -36,8 +36,8 @@ class ScVbaWorksheets : public ScVbaWorksheets_BASE css::uno::Reference< css::frame::XModel > mxModel; css::uno::Reference< css::sheet::XSpreadsheets > m_xSheets; public: - ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, const css::uno::Reference< css::frame::XModel >& xModel ); - ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum, const css::uno::Reference< css::frame::XModel >& xModel ); + ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XIndexAccess >& xSheets, css::uno::Reference< css::frame::XModel > xModel ); + ScVbaWorksheets( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::container::XEnumerationAccess >& xEnum, css::uno::Reference< css::frame::XModel > xModel ); bool isSelectedSheets() const; diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index bc9dc416b1d5..160cdcaa4a75 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -49,6 +49,7 @@ #include <uiitems.hxx> #include <dbdocfun.hxx> #include <reffact.hxx> +#include <utility> #include <validat.hxx> #include <validate.hxx> #include <datamapper.hxx> @@ -210,8 +211,8 @@ namespace { std::shared_ptr<SfxDialogController> m_xDlg; public: - ScValidationRegisteredDlg(weld::Window* pParent, const std::shared_ptr<SfxDialogController>& rDlg) - : m_xDlg(rDlg) + ScValidationRegisteredDlg(weld::Window* pParent, std::shared_ptr<SfxDialogController> xDlg) + : m_xDlg(std::move(xDlg)) { SC_MOD()->RegisterRefController(static_cast<sal_uInt16>(ScValidationDlg::SLOTID), m_xDlg, pParent); } diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx index 6fc34a0013b9..1dc76d139dd0 100644 --- a/sc/source/ui/view/hintwin.cxx +++ b/sc/source/ui/view/hintwin.cxx @@ -28,6 +28,7 @@ #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <tools/lineend.hxx> +#include <utility> #include <vcl/outdev.hxx> #include <vcl/settings.hxx> #include <vcl/metric.hxx> @@ -37,11 +38,11 @@ #define HINT_INDENT 3 #define HINT_MARGIN 4 -ScOverlayHint::ScOverlayHint(const OUString& rTit, const OUString& rMsg, const Color& rColor, const vcl::Font& rFont) +ScOverlayHint::ScOverlayHint(OUString aTit, const OUString& rMsg, const Color& rColor, vcl::Font aFont) : OverlayObject(rColor) - , m_aTitle(rTit) + , m_aTitle(std::move(aTit)) , m_aMessage(convertLineEnd(rMsg, LINEEND_CR)) - , m_aTextFont(rFont) + , m_aTextFont(std::move(aFont)) , m_aMapMode(MapUnit::MapPixel) , m_nLeft(0) , m_nTop(0) diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx index ba0d3c1da18b..0c5774957080 100644 --- a/sc/source/ui/view/notemark.cxx +++ b/sc/source/ui/view/notemark.cxx @@ -22,6 +22,7 @@ #include <svx/svdpage.hxx> #include <svx/svdocapt.hxx> #include <svl/itempool.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/window.hxx> @@ -34,7 +35,7 @@ #define SC_NOTEMARK_SHORT 70 ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* pBottom, vcl::Window* pDiagonal, - ScDocument* pD, const ScAddress& aPos, const OUString& rUser, + ScDocument* pD, const ScAddress& aPos, OUString aUser, const MapMode& rMap, bool bLeftEdge, bool bForce, bool bKeyboard) : m_pWindow( pWin ), m_pRightWin( pRight ), @@ -42,7 +43,7 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window* m_pDiagWin( pDiagonal ), m_pDoc( pD ), m_aDocPos( aPos ), - m_aUserText( rUser ), + m_aUserText(std::move( aUser )), m_aTimer("ScNoteMarker m_aTimer"), m_aMapMode( rMap ), m_bLeft( bLeftEdge ), diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx index b54952cb87d5..fe563ba961df 100644 --- a/sc/source/ui/view/pfuncache.cxx +++ b/sc/source/ui/view/pfuncache.cxx @@ -25,10 +25,11 @@ #include <docsh.hxx> #include <markdata.hxx> #include <prevloc.hxx> +#include <utility> ScPrintFuncCache::ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark, - const ScPrintSelectionStatus& rStatus ) : - aSelection( rStatus ), + ScPrintSelectionStatus aStatus ) : + aSelection(std::move( aStatus )), pDocSh( pD ), nTotalPages( 0 ), bLocInitialized( false ) diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index 1ce5cb65fdd1..752d565b2b1e 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -27,6 +27,7 @@ #include <editeng/editview.hxx> #include <editeng/eeitem.hxx> #include <sfx2/viewfrm.hxx> +#include <utility> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/weld.hxx> @@ -399,12 +400,12 @@ ScConversionParam::ScConversionParam( ScConversionType eConvType, } ScConversionParam::ScConversionParam( ScConversionType eConvType, - LanguageType eSourceLang, LanguageType eTargetLang, const vcl::Font& rTargetFont, + LanguageType eSourceLang, LanguageType eTargetLang, vcl::Font aTargetFont, sal_Int32 nOptions, bool bIsInteractive ) : meConvType( eConvType ), meSourceLang( eSourceLang ), meTargetLang( eTargetLang ), - maTargetFont( rTargetFont ), + maTargetFont(std::move( aTargetFont )), mnOptions( nOptions ), mbUseTargetFont( true ), mbIsInteractive( bIsInteractive ) @@ -415,10 +416,10 @@ ScConversionParam::ScConversionParam( ScConversionType eConvType, ScTextConversionEngine::ScTextConversionEngine( SfxItemPool* pEnginePoolP, ScViewData& rViewData, - const ScConversionParam& rConvParam, + ScConversionParam aConvParam, ScDocument* pUndoDoc, ScDocument* pRedoDoc ) : ScConversionEngineBase( pEnginePoolP, rViewData, pUndoDoc, pRedoDoc ), - maConvParam( rConvParam ) + maConvParam(std::move( aConvParam )) { } |