chart2/source/controller/dialogs/DialogModel.cxx | 8 +- chart2/source/controller/dialogs/DialogModel.hxx | 3 - chart2/source/controller/dialogs/dlg_CreationWizard.cxx | 26 +-------- chart2/source/controller/inc/dlg_CreationWizard.hxx | 6 -- chart2/source/inc/LifeTime.hxx | 3 - chart2/source/model/inc/BaseCoordinateSystem.hxx | 3 - chart2/source/model/main/BaseCoordinateSystem.cxx | 5 - chart2/source/model/main/CartesianCoordinateSystem.cxx | 2 chart2/source/model/main/PolarCoordinateSystem.cxx | 2 chart2/source/model/template/PieChartType.cxx | 5 - chart2/source/model/template/PieChartType.hxx | 3 - chart2/source/tools/LifeTime.cxx | 8 -- include/sfx2/docfile.hxx | 2 include/sfx2/docinf.hxx | 4 - include/sfx2/fcontnr.hxx | 2 include/sfx2/filedlghelper.hxx | 2 include/sfx2/mailmodelapi.hxx | 4 - include/sfx2/objsh.hxx | 4 - include/sfx2/request.hxx | 2 include/sfx2/sidebar/ResourceManager.hxx | 2 include/sfx2/sidebar/SidebarController.hxx | 8 +- include/sfx2/viewsh.hxx | 4 - include/svtools/ivctrl.hxx | 2 include/svtools/treelistbox.hxx | 2 include/svx/svdopath.hxx | 2 include/tools/urlobj.hxx | 10 +-- sc/inc/column.hxx | 4 - sc/inc/document.hxx | 2 sc/inc/formulacell.hxx | 2 sc/inc/table.hxx | 2 sc/source/core/data/column.cxx | 8 +- sc/source/core/data/column4.cxx | 4 - sc/source/core/data/document.cxx | 6 +- sc/source/core/data/formulacell.cxx | 4 - sc/source/core/data/table2.cxx | 4 - sc/source/core/data/table4.cxx | 2 sfx2/inc/guisaveas.hxx | 2 sfx2/source/appl/childwinimpl.cxx | 4 - sfx2/source/appl/helpinterceptor.cxx | 2 sfx2/source/appl/helpinterceptor.hxx | 2 sfx2/source/appl/module.cxx | 2 sfx2/source/appl/newhelp.cxx | 4 - sfx2/source/appl/newhelp.hxx | 2 sfx2/source/appl/shellimpl.cxx | 6 +- sfx2/source/bastyp/fltfnc.cxx | 2 sfx2/source/control/bindings.cxx | 2 sfx2/source/control/request.cxx | 2 sfx2/source/dialog/filedlghelper.cxx | 6 +- sfx2/source/dialog/filedlgimpl.hxx | 6 +- sfx2/source/dialog/mailmodel.cxx | 4 - sfx2/source/dialog/tabdlg.cxx | 43 ++-------------- sfx2/source/doc/SfxDocumentMetaData.cxx | 6 +- sfx2/source/doc/docfile.cxx | 2 sfx2/source/doc/docinf.cxx | 4 - sfx2/source/doc/doctemplateslocal.cxx | 6 +- sfx2/source/doc/doctemplateslocal.hxx | 6 +- sfx2/source/doc/guisaveas.cxx | 2 sfx2/source/doc/objxtor.cxx | 4 - sfx2/source/doc/oleprops.cxx | 2 sfx2/source/doc/oleprops.hxx | 2 sfx2/source/inc/childwinimpl.hxx | 4 - sfx2/source/inc/shellimpl.hxx | 6 +- sfx2/source/sidebar/ResourceManager.cxx | 4 - sfx2/source/sidebar/SidebarController.cxx | 8 +- sfx2/source/view/viewfrm.cxx | 2 sfx2/source/view/viewsh.cxx | 6 +- store/source/storbase.hxx | 4 - store/source/stortree.hxx | 5 - svtools/source/contnr/ivctrl.cxx | 7 +- svtools/source/contnr/treelistbox.cxx | 41 +-------------- svx/source/svdraw/svddrgv.cxx | 2 svx/source/svdraw/svdopath.cxx | 6 +- tools/source/fsys/urlobj.cxx | 4 - tools/source/inet/inetmime.cxx | 8 +- vcl/source/app/session.cxx | 8 +- xmloff/source/draw/ximp3dobject.cxx | 11 +--- xmloff/source/draw/ximp3dobject.hxx | 3 - 77 files changed, 155 insertions(+), 259 deletions(-)
New commits: commit e5dd156a44625865684b5dfa90a95108259deb50 Author: Noel Grandin <n...@peralex.com> Date: Wed Apr 6 12:19:57 2016 +0200 loplugin:constantparam Change-Id: Ie690088d7a7d568703afd22f544628fc8012a7e1 diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index a6d8dcf..4cb14c4 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -737,8 +737,7 @@ void DialogModel::setData( xInterpreter->interpretDataSource( xDataSource, rArguments, comphelper::containerToSequence( aSeriesToReUse )), - aSeriesToReUse, - true /* bSetStyles */); + aSeriesToReUse); ThreeDHelper::setScheme( xDiagram, e3DScheme ); } @@ -784,8 +783,7 @@ sal_Int32 DialogModel::GetRoleIndexForSorting( const OUString & rInternalRoleStr void DialogModel::applyInterpretedData( const InterpretedData & rNewData, - const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse, - bool bSetStyles ) + const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse ) { if( ! m_xChartDocument.is()) return; @@ -795,7 +793,7 @@ void DialogModel::applyInterpretedData( if( xDiagram.is()) { // styles - if( bSetStyles && m_xTemplate.is() ) + if( m_xTemplate.is() ) { sal_Int32 nGroup = 0; sal_Int32 nSeriesCounter = 0; diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx index 45980a1..a863b61 100644 --- a/chart2/source/controller/dialogs/DialogModel.hxx +++ b/chart2/source/controller/dialogs/DialogModel.hxx @@ -164,8 +164,7 @@ private: private: void applyInterpretedData( const css::chart2::InterpretedData & rNewData, - const ::std::vector< css::uno::Reference< css::chart2::XDataSeries > > & rSeriesToReUse, - bool bSetStyles ); + const ::std::vector< css::uno::Reference< css::chart2::XDataSeries > > & rSeriesToReUse ); sal_Int32 countSeries() const; diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index 6915191..63e9a71 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -45,23 +45,14 @@ using namespace ::com::sun::star; #define STATE_OBJECTS 3 #define STATE_LAST STATE_OBJECTS -namespace -{ - const sal_Int32 nPageCount = 4; -} - CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< frame::XModel >& xChartModel - , const uno::Reference< uno::XComponentContext >& xContext - , sal_Int32 nOnePageOnlyIndex ) + , const uno::Reference< uno::XComponentContext >& xContext ) : svt::RoadmapWizard( pParent, - (nOnePageOnlyIndex >= 0 && nOnePageOnlyIndex < nPageCount) - ? WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::FINISH - : WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::PREVIOUS | WizardButtonFlags::NEXT | WizardButtonFlags::FINISH + WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::PREVIOUS | WizardButtonFlags::NEXT | WizardButtonFlags::FINISH ) , m_xChartModel(xChartModel,uno::UNO_QUERY) , m_xCC( xContext ) , m_bIsClosable(true) - , m_nOnePageOnlyIndex(nOnePageOnlyIndex) , m_pTemplateProvider(nullptr) , m_nFirstState(STATE_FIRST) , m_nLastState(STATE_LAST) @@ -71,13 +62,7 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram m_pDialogModel.reset( new DialogModel( m_xChartModel, m_xCC )); defaultButton( WizardButtonFlags::FINISH ); - if( m_nOnePageOnlyIndex < 0 || m_nOnePageOnlyIndex >= nPageCount ) - { - m_nOnePageOnlyIndex = -1; - this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD)); - } - else - this->setTitleBase(OUString()); + this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD)); declarePath( PATH_FULL , STATE_CHARTTYPE @@ -109,15 +94,12 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram VclPtr<TabPage> CreationWizard::createPage(WizardState nState) { VclPtr<svt::OWizardPage> pRet; - if(m_nOnePageOnlyIndex!=-1 && m_nOnePageOnlyIndex!=nState) - return pRet; - bool bDoLiveUpdate = m_nOnePageOnlyIndex == -1; switch( nState ) { case STATE_CHARTTYPE: { m_aTimerTriggeredControllerLock.startTimer(); - VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,bDoLiveUpdate); + VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,true/*bDoLiveUpdate*/); pRet = pChartTypeTabPage; m_pTemplateProvider = pChartTypeTabPage; if (m_pDialogModel) diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx index 18b2904..eb2ed73 100644 --- a/chart2/source/controller/inc/dlg_CreationWizard.hxx +++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx @@ -42,10 +42,7 @@ class CreationWizard : public svt::RoadmapWizard, public TabPageNotifiable public: CreationWizard( vcl::Window* pParent, const css::uno::Reference< css::frame::XModel >& xChartModel - , const css::uno::Reference< css::uno::XComponentContext >& xContext - // if nOnePageOnlyIndex is an index of an exsisting page starting with 0 - // then only this page is displayed without next/previous and roadmap - , sal_Int32 nOnePageOnlyIndex=-1 ); + , const css::uno::Reference< css::uno::XComponentContext >& xContext ); CreationWizard() = delete; @@ -68,7 +65,6 @@ private: css::uno::Reference< css::chart2::XChartDocument > m_xChartModel; css::uno::Reference< css::uno::XComponentContext> m_xCC; bool m_bIsClosable; - sal_Int32 m_nOnePageOnlyIndex;//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap ChartTypeTemplateProvider* m_pTemplateProvider; std::unique_ptr<DialogModel> m_pDialogModel; diff --git a/chart2/source/inc/LifeTime.hxx b/chart2/source/inc/LifeTime.hxx index 3bb12a8..6552d2a 100644 --- a/chart2/source/inc/LifeTime.hxx +++ b/chart2/source/inc/LifeTime.hxx @@ -39,7 +39,7 @@ friend class LifeTimeGuard; protected: mutable ::osl::Mutex m_aAccessMutex; public: - LifeTimeManager( css::lang::XComponent* pComponent, bool bLongLastingCallsCancelable = false ); + LifeTimeManager( css::lang::XComponent* pComponent ); virtual ~LifeTimeManager(); bool impl_isDisposed( bool bAssert=true ); @@ -66,7 +66,6 @@ protected: bool volatile m_bDisposed; bool volatile m_bInDispose; - bool m_bLongLastingCallsCancelable; ::osl::Condition m_aNoLongLastingCallCountCondition; sal_Int32 volatile m_nLongLastingCallCount; }; diff --git a/chart2/source/model/inc/BaseCoordinateSystem.hxx b/chart2/source/model/inc/BaseCoordinateSystem.hxx index f71c4e4..da9a04c 100644 --- a/chart2/source/model/inc/BaseCoordinateSystem.hxx +++ b/chart2/source/model/inc/BaseCoordinateSystem.hxx @@ -56,8 +56,7 @@ class BaseCoordinateSystem : public: BaseCoordinateSystem( const css::uno::Reference< css::uno::XComponentContext > & xContext, - sal_Int32 nDimensionCount = 2, - bool bSwapXAndYAxis = false ); + sal_Int32 nDimensionCount = 2 ); explicit BaseCoordinateSystem( const BaseCoordinateSystem & rSource ); virtual ~BaseCoordinateSystem(); diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx index 07c42d7..cbd9f7d 100644 --- a/chart2/source/model/main/BaseCoordinateSystem.cxx +++ b/chart2/source/model/main/BaseCoordinateSystem.cxx @@ -124,8 +124,7 @@ namespace chart BaseCoordinateSystem::BaseCoordinateSystem( const Reference< uno::XComponentContext > & xContext, - sal_Int32 nDimensionCount /* = 2 */, - bool bSwapXAndYAxis /* = sal_False */ ) : + sal_Int32 nDimensionCount /* = 2 */ ) : ::property::OPropertySet( m_aMutex ), m_xContext( xContext ), m_xModifyEventForwarder( ModifyListenerHelper::createModifyEventForwarder()), @@ -159,7 +158,7 @@ BaseCoordinateSystem::BaseCoordinateSystem( for( sal_Int32 i = 0; i < m_nDimensionCount; ++i ) m_aOrigin[ i ] = uno::makeAny( double( 0.0 ) ); - setFastPropertyValue_NoBroadcast( PROP_COORDINATESYSTEM_SWAPXANDYAXIS, uno::makeAny( bSwapXAndYAxis )); + setFastPropertyValue_NoBroadcast( PROP_COORDINATESYSTEM_SWAPXANDYAXIS, uno::makeAny( false )); } // explicit diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index 3e49456..44dd8f4 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -48,7 +48,7 @@ namespace chart CartesianCoordinateSystem::CartesianCoordinateSystem( const uno::Reference< uno::XComponentContext > & xContext, sal_Int32 nDimensionCount /* = 2 */ ) : - BaseCoordinateSystem( xContext, nDimensionCount, false/*bSwapXAndYAxis*/ ) + BaseCoordinateSystem( xContext, nDimensionCount ) {} CartesianCoordinateSystem::CartesianCoordinateSystem( diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index 525f3fe..c702dfa 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -48,7 +48,7 @@ namespace chart PolarCoordinateSystem::PolarCoordinateSystem( const uno::Reference< uno::XComponentContext > & xContext, sal_Int32 nDimensionCount /* = 2 */ ) : - BaseCoordinateSystem( xContext, nDimensionCount, false/*bSwapXAndYAxis*/ ) + BaseCoordinateSystem( xContext, nDimensionCount ) {} PolarCoordinateSystem::PolarCoordinateSystem( diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx index f6c2975..643aded 100644 --- a/chart2/source/model/template/PieChartType.cxx +++ b/chart2/source/model/template/PieChartType.cxx @@ -128,12 +128,9 @@ namespace chart { PieChartType::PieChartType( - const uno::Reference< uno::XComponentContext > & xContext, - bool bUseRings /* = sal_False */) : + const uno::Reference< uno::XComponentContext > & xContext) : ChartType( xContext ) { - if( bUseRings ) - setFastPropertyValue_NoBroadcast( PROP_PIECHARTTYPE_USE_RINGS, uno::makeAny( bUseRings )); } PieChartType::PieChartType( const PieChartType & rOther ) : diff --git a/chart2/source/model/template/PieChartType.hxx b/chart2/source/model/template/PieChartType.hxx index c068546..7d200ec 100644 --- a/chart2/source/model/template/PieChartType.hxx +++ b/chart2/source/model/template/PieChartType.hxx @@ -28,8 +28,7 @@ class PieChartType : public ChartType { public: PieChartType( - css::uno::Reference< css::uno::XComponentContext > const & xContext, - bool bUseRings = false ); + css::uno::Reference< css::uno::XComponentContext > const & xContext ); virtual ~PieChartType(); virtual OUString SAL_CALL diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index a802287..219b71c 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -29,10 +29,9 @@ using namespace ::com::sun::star; namespace apphelper { -LifeTimeManager::LifeTimeManager( lang::XComponent* pComponent, bool bLongLastingCallsCancelable ) +LifeTimeManager::LifeTimeManager( lang::XComponent* pComponent ) : m_aListenerContainer( m_aAccessMutex ) , m_pComponent(pComponent) - , m_bLongLastingCallsCancelable(bLongLastingCallsCancelable) { impl_init(); } @@ -163,7 +162,7 @@ bool LifeTimeManager::dispose() CloseableLifeTimeManager::CloseableLifeTimeManager( css::util::XCloseable* pCloseable , css::lang::XComponent* pComponent ) - : LifeTimeManager( pComponent, false/*bLongLastingCallsCancelable*/ ) + : LifeTimeManager( pComponent ) , m_pCloseable(pCloseable) { impl_init(); @@ -276,9 +275,6 @@ bool CloseableLifeTimeManager::g_close_isNeedToCancelLongLastingCalls( bool bDel if( !m_nLongLastingCallCount ) return false; - if(m_bLongLastingCallsCancelable) - return true; - impl_setOwnership( bDeliverOwnership, true ); m_bInTryClose = false; diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index 2f37b12..ec6e0e9 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -118,7 +118,7 @@ class SvxIconChoiceCtrlEntry } public: - SvxIconChoiceCtrlEntry( const OUString& rText, const Image& rImage, SvxIconViewFlags nFlags = SvxIconViewFlags::NONE ); + SvxIconChoiceCtrlEntry( const OUString& rText, const Image& rImage ); ~SvxIconChoiceCtrlEntry () {} Image GetImage () const { return aImage; } diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 75f27ba..77dbc23 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -819,7 +819,7 @@ class SvInplaceEdit2 public: SvInplaceEdit2( vcl::Window* pParent, const Point& rPos, const Size& rSize, const OUString& rData, const Link<SvInplaceEdit2&,void>& rNotifyEditEnd, - const Selection&, bool bMultiLine = false ); + const Selection& ); ~SvInplaceEdit2(); bool KeyInput( const KeyEvent& rKEvt ); void LoseFocus(); diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx index 2d0340b..ccdb218 100644 --- a/include/svx/svdopath.hxx +++ b/include/svx/svdopath.hxx @@ -125,7 +125,7 @@ public: // insert point sal_uInt32 NbcInsPointOld(const Point& rPos, bool bNewObj); - sal_uInt32 NbcInsPoint(sal_uInt32 i, const Point& rPos, bool bNewObj, bool bHideHim); + sal_uInt32 NbcInsPoint(sal_uInt32 i, const Point& rPos, bool bNewObj); // rip at given point SdrObject* RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index); diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx index 7b48084..f5ee051 100644 --- a/include/tools/urlobj.hxx +++ b/include/tools/urlobj.hxx @@ -1005,7 +1005,7 @@ private: TOOLS_DLLPRIVATE void setInvalid(); bool setAbsURIRef( - OUString const & rTheAbsURIRef, bool bOctets, + OUString const & rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bSmart, FSysStyle eStyle); @@ -1186,7 +1186,7 @@ inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef, rtl_TextEncoding eCharset): m_eScheme(INetProtocol::NotValid), m_eSmartScheme(INetProtocol::Http) { - setAbsURIRef(rTheAbsURIRef, false, eMechanism, eCharset, false, + setAbsURIRef(rTheAbsURIRef, eMechanism, eCharset, false, FSysStyle(0)); } @@ -1194,7 +1194,7 @@ inline bool INetURLObject::SetURL(OUString const & rTheAbsURIRef, EncodeMechanism eMechanism, rtl_TextEncoding eCharset) { - return setAbsURIRef(rTheAbsURIRef, false, eMechanism, eCharset, false, + return setAbsURIRef(rTheAbsURIRef, eMechanism, eCharset, false, FSysStyle(0)); } @@ -1205,7 +1205,7 @@ inline INetURLObject::INetURLObject(OUString const & rTheAbsURIRef, FSysStyle eStyle): m_eScheme(INetProtocol::NotValid), m_eSmartScheme(eTheSmartScheme) { - setAbsURIRef(rTheAbsURIRef, false, eMechanism, eCharset, true, eStyle); + setAbsURIRef(rTheAbsURIRef, eMechanism, eCharset, true, eStyle); } inline bool INetURLObject::SetSmartURL(OUString const & rTheAbsURIRef, @@ -1213,7 +1213,7 @@ inline bool INetURLObject::SetSmartURL(OUString const & rTheAbsURIRef, rtl_TextEncoding eCharset, FSysStyle eStyle) { - return setAbsURIRef(rTheAbsURIRef, false, eMechanism, eCharset, true, + return setAbsURIRef(rTheAbsURIRef, eMechanism, eCharset, true, eStyle); } diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index ba618d6..5e895d5 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -449,7 +449,7 @@ public: void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr ); void ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr, ScEditDataArray* pDataArray = nullptr ); - void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutToPool = false ); + void SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr ); void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr ); void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, @@ -468,7 +468,7 @@ public: const ScStyleSheet* GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRow2 ) const; void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset ); - bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const; + bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const; /// May return -1 if not found SCsROW SearchStyle( diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 4502a26..bbb525b 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -2228,7 +2228,7 @@ private: void UpdateRefAreaLinks( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); - void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs); + void CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks); bool HasPartOfMerged( const ScRange& rRange ); diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 10a96ce..749d914 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -323,7 +323,7 @@ public: void SetCompile( bool bVal ); ScDocument* GetDocument() const { return pDocument;} - void SetMatColsRows( SCCOL nCols, SCROW nRows, bool bDirtyFlag=true ); + void SetMatColsRows( SCCOL nCols, SCROW nRows ); void GetMatColsRows( SCCOL& nCols, SCROW& nRows ) const; // cell belongs to ChangeTrack and not to the real document diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index a8b3063..fb85896 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -620,7 +620,7 @@ public: void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr ) { if (ValidColRow(rPos.Col(),rPos.Row())) - aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr, true/*bPutToPool*/ ); + aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr ); } void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr ); void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index f7fa19f..df0afc5 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -663,9 +663,9 @@ void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolR pAttrArray->FindStyleSheet( pStyleSheet, rUsedRows, bReset ); } -bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const +bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const { - return pAttrArray->IsStyleSheetUsed( rStyle, bGatherAllStyles ); + return pAttrArray->IsStyleSheetUsed( rStyle, true/*bGatherAllStyles*/ ); } bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags ) @@ -683,9 +683,9 @@ void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWh pAttrArray->ClearItems( nStartRow, nEndRow, pWhich ); } -void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr, bool bPutToPool ) +void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr ) { - pAttrArray->SetPattern( nRow, &rPatAttr, bPutToPool ); + pAttrArray->SetPattern( nRow, &rPatAttr, true/*bPutToPool*/ ); } void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow, diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 6b81fe6..e145e75 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -996,8 +996,8 @@ void ScColumn::Swap( ScColumn& rOther, SCROW nRow1, SCROW nRow2, bool bPattern ) const ScPatternAttr* pPat2 = rOther.GetPattern(nRow); if (pPat1 != pPat2) { - SetPattern(nRow, *pPat2, true); - rOther.SetPattern(nRow, *pPat1, true); + SetPattern(nRow, *pPat2); + rOther.SetPattern(nRow, *pPat1); } } } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 605cf2e..bf608c3 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2132,7 +2132,7 @@ void ScDocument::CopyToClip(const ScClipParam& rClipParam, pClipDoc->ResetClip(this, pMarks); sc::CopyToClipContext aCxt(*pClipDoc, bKeepScenarioFlags, true/*bCloneNoteCaptions*/); - CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks, false/*bAllTabs*/); + CopyRangeNamesToClip(pClipDoc, aClipRange, pMarks); for (SCTAB i = 0; i < nEndTab; ++i) { @@ -2333,7 +2333,7 @@ void copyUsedNamesToClip(ScRangeName* pClipRangeName, ScRangeName* pRangeName, } -void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks, bool bAllTabs) +void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClipRange, const ScMarkData* pMarks) { if (!pRangeName || pRangeName->empty()) return; @@ -2342,7 +2342,7 @@ void ScDocument::CopyRangeNamesToClip(ScDocument* pClipDoc, const ScRange& rClip SCTAB nMinSizeBothTabs = static_cast<SCTAB>(std::min(maTabs.size(), pClipDoc->maTabs.size())); for (SCTAB i = 0; i < nMinSizeBothTabs; ++i) if (maTabs[i] && pClipDoc->maTabs[i]) - if ( bAllTabs || !pMarks || pMarks->GetTableSelect(i) ) + if ( !pMarks || pMarks->GetTableSelect(i) ) maTabs[i]->FindRangeNamesInUse( rClipRange.aStart.Col(), rClipRange.aStart.Row(), rClipRange.aEnd.Col(), rClipRange.aEnd.Row(), aUsedNames); diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 725ad88..51d653a 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2439,7 +2439,7 @@ void ScFormulaCell::SetCompile( bool bVal ) bCompile = bVal; } -void ScFormulaCell::SetMatColsRows( SCCOL nCols, SCROW nRows, bool bDirtyFlag ) +void ScFormulaCell::SetMatColsRows( SCCOL nCols, SCROW nRows ) { ScMatrixFormulaCellToken* pMat = aResult.GetMatrixFormulaCellTokenNonConst(); if (pMat) @@ -2449,7 +2449,7 @@ void ScFormulaCell::SetMatColsRows( SCCOL nCols, SCROW nRows, bool bDirtyFlag ) aResult.SetToken( new ScMatrixFormulaCellToken( nCols, nRows)); // Setting the new token actually forces an empty result at this top // left cell, so have that recalculated. - SetDirty( bDirtyFlag ); + SetDirty(); } } diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 3d36d4d..f11c6f0 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -2563,7 +2563,7 @@ bool ScTable::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const for ( SCCOL i=0; i<=MAXCOL; i++ ) { - if ( aCol[i].IsStyleSheetUsed( rStyle, true/*bGatherAllStyles*/ ) ) + if ( aCol[i].IsStyleSheetUsed( rStyle ) ) { bIsUsed = true; } @@ -2621,7 +2621,7 @@ bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr ) { if (ValidColRow(nCol,nRow)) - aCol[nCol].SetPattern( nRow, rAttr, true/*bPutToPool*/ ); + aCol[nCol].SetPattern( nRow, rAttr ); } void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr ) diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index b2a1925..929c240 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -1609,7 +1609,7 @@ void ScTable::FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, for (SCCOL nAtCol = static_cast<SCCOL>(nIMin); nAtCol <= sal::static_int_cast<SCCOL>(nIMax); nAtCol++) if(!ColHidden(nAtCol)) { - aCol[nAtCol].SetPattern(static_cast<SCROW>(nRow), *pSrcPattern, true); + aCol[nAtCol].SetPattern(static_cast<SCROW>(nRow), *pSrcPattern); for(std::vector<sal_uInt32>::const_iterator itr = rCondFormatIndex.begin(), itrEnd = rCondFormatIndex.end(); itr != itrEnd; ++itr) { diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index d57d371..6e51edb 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -60,18 +60,16 @@ struct Data_Impl CreateTabPage fnCreatePage; // Pointer to Factory GetTabPageRanges fnGetRanges; // Pointer to Ranges-Function VclPtr<SfxTabPage> pTabPage; // The TabPage itself - bool bOnDemand; // Flag: ItemSet onDemand bool bRefresh; // Flag: Page must be re-initialized // Constructor Data_Impl( sal_uInt16 Id, CreateTabPage fnPage, - GetTabPageRanges fnRanges, bool bDemand ) : + GetTabPageRanges fnRanges ) : nId ( Id ), fnCreatePage( fnPage ), fnGetRanges ( fnRanges ), pTabPage ( nullptr ), - bOnDemand ( bDemand ), bRefresh ( false ) { if ( !fnCreatePage ) @@ -366,8 +364,6 @@ void SfxTabDialog::dispose() aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) ); } - if ( pDataObject->bOnDemand ) - delete &pDataObject->pTabPage->GetItemSet(); pDataObject->pTabPage.disposeAndClear(); } delete pDataObject; @@ -593,7 +589,7 @@ sal_uInt16 SfxTabDialog::AddTabPage { sal_uInt16 nId = m_pTabCtrl->GetPageId(rName); m_pImpl->aData.push_back( - new Data_Impl( nId, pCreateFunc, pRangesFunc, false/*bItemsOnDemand*/ ) ); + new Data_Impl( nId, pCreateFunc, pRangesFunc ) ); return nId; } @@ -613,7 +609,7 @@ sal_uInt16 SfxTabDialog::AddTabPage assert(pCreateFunc); GetTabPageRanges pRangesFunc = pFact->GetTabPageRangesFunc(nPageCreateId); sal_uInt16 nPageId = m_pTabCtrl->GetPageId(rName); - m_pImpl->aData.push_back(new Data_Impl(nPageId, pCreateFunc, pRangesFunc, false)); + m_pImpl->aData.push_back(new Data_Impl(nPageId, pCreateFunc, pRangesFunc)); return nPageId; } @@ -637,8 +633,7 @@ void SfxTabDialog::AddTabPage DBG_ASSERT( TAB_PAGE_NOTFOUND == m_pTabCtrl->GetPagePos( nId ), "Double Page-Ids in the Tabpage" ); m_pTabCtrl->InsertPage( nId, rRiderText, nPos ); - m_pImpl->aData.push_back( - new Data_Impl( nId, pCreateFunc, pRangesFunc, false/*bItemsOnDemand*/ ) ); + m_pImpl->aData.push_back( new Data_Impl( nId, pCreateFunc, pRangesFunc ) ); } void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) @@ -674,8 +669,6 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) aPageOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aPageData ) ) ); } - if ( pDataObject->bOnDemand ) - delete &pDataObject->pTabPage->GetItemSet(); pDataObject->pTabPage.disposeAndClear(); } @@ -787,13 +780,7 @@ short SfxTabDialog::Ok() if ( pTabPage ) { - if ( pDataObject->bOnDemand ) - { - SfxItemSet& rSet = (SfxItemSet&)pTabPage->GetItemSet(); - rSet.ClearItem(); - bModified |= pTabPage->FillItemSet( &rSet ); - } - else if ( m_pSet && !pTabPage->HasExchangeSupport() ) + if ( m_pSet && !pTabPage->HasExchangeSupport() ) { SfxItemSet aTmp( *m_pSet->GetPool(), m_pSet->GetRanges() ); @@ -965,14 +952,7 @@ IMPL_LINK_NOARG_TYPED(SfxTabDialog, ResetHdl, Button*, void) Data_Impl* pDataObject = Find( m_pImpl->aData, nId ); DBG_ASSERT( pDataObject, "Id not known" ); - if ( pDataObject->bOnDemand ) - { - // CSet on AIS has problems here, thus separated - const SfxItemSet* pItemSet = &pDataObject->pTabPage->GetItemSet(); - pDataObject->pTabPage->Reset( pItemSet ); - } - else - pDataObject->pTabPage->Reset( m_pSet ); + pDataObject->pTabPage->Reset( m_pSet ); } @@ -1101,7 +1081,7 @@ IMPL_LINK_TYPED( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl, void ) pTmpSet = m_pSet; } - if ( pTmpSet && !pDataObject->bOnDemand ) + if ( pTmpSet ) pTabPage = (pDataObject->fnCreatePage)( pTabCtrl, pTmpSet ); else pTabPage = (pDataObject->fnCreatePage) @@ -1134,10 +1114,7 @@ IMPL_LINK_TYPED( SfxTabDialog, ActivatePageHdl, TabControl *, pTabCtrl, void ) PageCreated( nId, *pTabPage ); - if ( pDataObject->bOnDemand ) - pTabPage->Reset( &pTabPage->GetItemSet() ); - else - pTabPage->Reset( m_pSet ); + pTabPage->Reset( m_pSet ); pTabCtrl->SetTabPage( nId, pTabPage ); } @@ -1176,10 +1153,6 @@ IMPL_LINK_TYPED( SfxTabDialog, DeactivatePageHdl, TabControl *, pTabCtrl, bool ) #ifdef DBG_UTIL Data_Impl* pDataObject = Find( m_pImpl->aData, pTabCtrl->GetCurPageId() ); DBG_ASSERT( pDataObject, "no Data structure for current page" ); - if ( pPage->HasExchangeSupport() && pDataObject->bOnDemand ) - { - SAL_INFO( "sfx.config", "Data exchange in ItemsOnDemand is not desired!" ); - } #endif int nRet = SfxTabPage::LEAVE_PAGE; diff --git a/store/source/storbase.hxx b/store/source/storbase.hxx index db98c3e..3cc2bc5 100644 --- a/store/source/storbase.hxx +++ b/store/source/storbase.hxx @@ -174,9 +174,9 @@ struct OStorePageGuard /** Construction. */ - explicit OStorePageGuard (sal_uInt32 nMagic = 0, sal_uInt32 nCRC32 = 0) + explicit OStorePageGuard (sal_uInt32 nMagic = 0) : m_nMagic (store::htonl(nMagic)), - m_nCRC32 (store::htonl(nCRC32)) + m_nCRC32 (store::htonl(0)) {} void swap (OStorePageGuard & rhs) diff --git a/store/source/stortree.hxx b/store/source/stortree.hxx index 94e61a1..1146859 100644 --- a/store/source/stortree.hxx +++ b/store/source/stortree.hxx @@ -53,11 +53,10 @@ struct OStoreBTreeEntry */ explicit OStoreBTreeEntry ( K const & rKey = K(), - L const & rLink = L(), - sal_uInt32 nAttrib = 0) + L const & rLink = L()) : m_aKey (rKey), m_aLink (rLink), - m_nAttrib (store::htonl(nAttrib)) + m_nAttrib (store::htonl(0)) {} OStoreBTreeEntry (const OStoreBTreeEntry & rhs) diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 43041ec..1e872e3 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -34,8 +34,7 @@ using namespace ::com::sun::star::accessibility; \*****************************************************************************/ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const OUString& rText, - const Image& rImage, - SvxIconViewFlags _nFlags ) + const Image& rImage ) : aImage(rImage) , aText(rText) , pUserData(nullptr) @@ -45,7 +44,7 @@ SvxIconChoiceCtrlEntry::SvxIconChoiceCtrlEntry( const OUString& rText, , eTextMode(IcnShowTextShort) , nX(0) , nY(0) - , nFlags(_nFlags) + , nFlags(SvxIconViewFlags::NONE) { } @@ -102,7 +101,7 @@ void SvtIconChoiceCtrl::dispose() SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage ) { - SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, SvxIconViewFlags::NONE); + SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage); _pImp->InsertEntry( pEntry, CONTAINER_APPEND ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 025fabf..7a7e5a2 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -67,17 +67,6 @@ public: virtual void LoseFocus() override; }; -class MyMultiEdit_Impl : public MultiLineEdit -{ - SvInplaceEdit2* pOwner; -public: - MyMultiEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* pOwner ); - virtual ~MyMultiEdit_Impl() { disposeOnce(); } - virtual void dispose() override { pOwner = nullptr; MultiLineEdit::dispose(); } - virtual void KeyInput( const KeyEvent& rKEvt ) override; - virtual void LoseFocus() override; -}; - MyEdit_Impl::MyEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* _pOwner ) : Edit( pParent, WB_LEFT ), @@ -99,34 +88,13 @@ void MyEdit_Impl::LoseFocus() pOwner->LoseFocus(); } -MyMultiEdit_Impl::MyMultiEdit_Impl( vcl::Window* pParent, SvInplaceEdit2* _pOwner ) - : MultiLineEdit( pParent, - WB_CENTER - ), pOwner(_pOwner) -{ -} - -void MyMultiEdit_Impl::KeyInput( const KeyEvent& rKEvt ) -{ - if( !pOwner->KeyInput( rKEvt )) - MultiLineEdit::KeyInput( rKEvt ); -} - -void MyMultiEdit_Impl::LoseFocus() -{ - if (pOwner) - pOwner->LoseFocus(); -} - - SvInplaceEdit2::SvInplaceEdit2 ( vcl::Window* pParent, const Point& rPos, const Size& rSize, const OUString& rData, const Link<SvInplaceEdit2&,void>& rNotifyEditEnd, - const Selection& rSelection, - bool bMulti + const Selection& rSelection ) : aCallBackHdl ( rNotifyEditEnd ), @@ -135,10 +103,7 @@ SvInplaceEdit2::SvInplaceEdit2 { - if( bMulti ) - pEdit = VclPtr<MyMultiEdit_Impl>::Create( pParent, this ); - else - pEdit = VclPtr<MyEdit_Impl>::Create( pParent, this ); + pEdit = VclPtr<MyEdit_Impl>::Create( pParent, this ); vcl::Font aFont( pParent->GetFont() ); aFont.SetTransparent( false ); @@ -974,7 +939,7 @@ void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect, pEdCtrl = new SvInplaceEdit2( this, rRect.TopLeft(), rRect.GetSize(), rStr, LINK( this, SvTreeListBox, TextEditEndedHdl_Impl ), - rSel, false/*bMulti*/ ); + rSel ); } IMPL_LINK_NOARG_TYPED(SvTreeListBox, TextEditEndedHdl_Impl, SvInplaceEdit2&, void) diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 950b0cc..c9dbcfa 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -657,7 +657,7 @@ bool SdrDragView::ImpBegInsObjPoint(bool bIdxZwang, sal_uInt32 nIdx, const Point if(bIdxZwang) { - mnInsPointNum = pMarkedPath->NbcInsPoint(nIdx, aPt, bNewObj, true); + mnInsPointNum = pMarkedPath->NbcInsPoint(nIdx, aPt, bNewObj); } else { diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 789c51f..93cc4db 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -2540,7 +2540,7 @@ sal_uInt32 SdrPathObj::NbcInsPointOld(const Point& rPos, bool bNewObj) if(bNewObj) { - nNewHdl = NbcInsPoint(0L, rPos, true, true/*bHideHim*/); + nNewHdl = NbcInsPoint(0L, rPos, true); } else { @@ -2559,14 +2559,14 @@ sal_uInt32 SdrPathObj::NbcInsPointOld(const Point& rPos, bool bNewObj) nPolyIndex += GetPathPoly().getB2DPolygon(a).count(); } - nNewHdl = NbcInsPoint(nPolyIndex, rPos, false, true/*bHideHim*/); + nNewHdl = NbcInsPoint(nPolyIndex, rPos, false); } ImpForceKind(); return nNewHdl; } -sal_uInt32 SdrPathObj::NbcInsPoint(sal_uInt32 /*nHdlNum*/, const Point& rPos, bool bNewObj, bool /*bHideHim*/) +sal_uInt32 SdrPathObj::NbcInsPoint(sal_uInt32 /*nHdlNum*/, const Point& rPos, bool bNewObj) { sal_uInt32 nNewHdl; diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index eb0b025..8f869d8 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -674,12 +674,12 @@ OUString parseScheme( } bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef, - bool bOctets, EncodeMechanism eMechanism, rtl_TextEncoding eCharset, bool bSmart, FSysStyle eStyle) { + const bool bOctets = false; sal_Unicode const * pPos = rTheAbsURIRef.getStr(); sal_Unicode const * pEnd = pPos + rTheAbsURIRef.getLength(); @@ -1541,7 +1541,7 @@ bool INetURLObject::convertRelToAbs(OUString const & rTheRelURIRef, if (bFSys) { INetURLObject aNewURI; - aNewURI.setAbsURIRef(rTheRelURIRef, false/*bOctets*/, eMechanism, + aNewURI.setAbsURIRef(rTheRelURIRef, eMechanism, eCharset, true, eStyle); if (!aNewURI.HasError()) { diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index 3491964..d530500 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -431,8 +431,7 @@ class INetMIMECharsetList_Impl bool m_bDisabled; Node * m_pNext; - inline Node(const Charset & rTheCharset, bool bTheDisabled, - Node * pTheNext); + inline Node(const Charset & rTheCharset, Node * pTheNext); }; Node * m_pFirst; @@ -443,7 +442,7 @@ public: ~INetMIMECharsetList_Impl(); void prepend(const Charset & rCharset) - { m_pFirst = new Node(rCharset, false, m_pFirst); } + { m_pFirst = new Node(rCharset, m_pFirst); } void includes(sal_uInt32 nChar); @@ -455,10 +454,9 @@ public: }; inline INetMIMECharsetList_Impl::Node::Node(const Charset & rTheCharset, - bool bTheDisabled, Node * pTheNext): m_aCharset(rTheCharset), - m_bDisabled(bTheDisabled), + m_bDisabled(false), m_pNext(pTheNext) {} diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx index 32917ca..f3f7fa3a 100644 --- a/vcl/source/app/session.cxx +++ b/vcl/source/app/session.cxx @@ -84,7 +84,7 @@ class VCLSession: void SAL_CALL disposing() override; - void callSaveRequested( bool bShutdown, bool bCancelable ); + void callSaveRequested( bool bShutdown ); void callShutdownCancelled(); void callInteractionGranted( bool bGranted ); void callQuit(); @@ -105,7 +105,7 @@ VCLSession::VCLSession() m_xSession->SetCallback( SalSessionEventProc, this ); } -void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable ) +void VCLSession::callSaveRequested( bool bShutdown ) { std::list< Listener > aListeners; { @@ -138,7 +138,7 @@ void VCLSession::callSaveRequested( bool bShutdown, bool bCancelable ) SolarMutexReleaser aReleaser; for( std::list< Listener >::const_iterator it = aListeners.begin(); it != aListeners.end(); ++it ) - it->m_xListener->doSave( bShutdown, bCancelable ); + it->m_xListener->doSave( bShutdown, false/*bCancelable*/ ); } void VCLSession::callInteractionGranted( bool bInteractionGranted ) @@ -218,7 +218,7 @@ void VCLSession::SalSessionEventProc( void* pData, SalSessionEvent* pEvent ) case SaveRequest: { SalSessionSaveRequestEvent* pSEv = static_cast<SalSessionSaveRequestEvent*>(pEvent); - pThis->callSaveRequested( pSEv->m_bShutdown, false ); + pThis->callSaveRequested( pSEv->m_bShutdown ); } break; case ShutdownCancel: diff --git a/xmloff/source/draw/ximp3dobject.cxx b/xmloff/source/draw/ximp3dobject.cxx index d3dd4a2..e41fffc 100644 --- a/xmloff/source/draw/ximp3dobject.cxx +++ b/xmloff/source/draw/ximp3dobject.cxx @@ -44,9 +44,8 @@ SdXML3DObjectContext::SdXML3DObjectContext( sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, - uno::Reference< drawing::XShapes >& rShapes, - bool bTemporaryShape) -: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, bTemporaryShape ), + uno::Reference< drawing::XShapes >& rShapes) +: SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, false/*bTemporaryShape*/ ), mbSetTransform( false ) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -111,7 +110,7 @@ SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext( const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, uno::Reference< drawing::XShapes >& rShapes) -: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, false/*bTemporaryShape*/ ), +: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ), maMinEdge(-2500.0, -2500.0, -2500.0), maMaxEdge(2500.0, 2500.0, 2500.0), mbMinEdgeUsed(false), @@ -211,7 +210,7 @@ SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext( const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, uno::Reference< drawing::XShapes >& rShapes) -: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, false/*bTemporaryShape*/ ), +: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ), maCenter(0.0, 0.0, 0.0), maSize(5000.0, 5000.0, 5000.0), mbCenterUsed(false), @@ -308,7 +307,7 @@ SdXML3DPolygonBasedShapeContext::SdXML3DPolygonBasedShapeContext( const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, uno::Reference< drawing::XShapes >& rShapes) -: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, false/*bTemporaryShape*/ ) +: SdXML3DObjectContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 i=0; i < nAttrCount; i++) diff --git a/xmloff/source/draw/ximp3dobject.hxx b/xmloff/source/draw/ximp3dobject.hxx index ab9fef2..b66dbae 100644 --- a/xmloff/source/draw/ximp3dobject.hxx +++ b/xmloff/source/draw/ximp3dobject.hxx @@ -45,8 +45,7 @@ public: sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, - css::uno::Reference< css::drawing::XShapes >& rShapes, - bool bTemporaryShape); + css::uno::Reference< css::drawing::XShapes >& rShapes); virtual ~SdXML3DObjectContext(); virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList) override; commit 4cbcec9ed4c51277b00c155a5fa097880c0dee4b Author: Noel Grandin <n...@peralex.com> Date: Fri Apr 8 16:33:17 2016 +0200 clang-tidy performance-unnecessary-value-param in sfx2 Change-Id: I035eec1f3701c48b9a85c60400c68f9365299b48 diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index bbf9c4e..150b037 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -116,7 +116,7 @@ public: /** * Does not take ownership of pFlt but pFlt needs to be around as long as the SfxMedium instance. */ - void SetFilter(std::shared_ptr<const SfxFilter> pFilter); + void SetFilter(const std::shared_ptr<const SfxFilter>& pFilter); std::shared_ptr<const SfxFilter> GetFilter() const; std::shared_ptr<const SfxFilter> GetOrigFilter() const; const OUString& GetOrigURL() const; diff --git a/include/sfx2/docinf.hxx b/include/sfx2/docinf.hxx index 0c1b66f..1c75d1d 100644 --- a/include/sfx2/docinf.hxx +++ b/include/sfx2/docinf.hxx @@ -43,7 +43,7 @@ namespace sfx2 { @param i_pStorage OLE Storage */ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( - css::uno::Reference< css::document::XDocumentProperties> i_xDocProps, + const css::uno::Reference< css::document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage ); /** save document meta-data to OLE stream @@ -55,7 +55,7 @@ sal_uInt32 SFX2_DLLPUBLIC LoadOlePropertySet( @param i_pHyperlinks Blob: Hyperlink blob ("_PID_HLINKS") */ bool SFX2_DLLPUBLIC SaveOlePropertySet( - css::uno::Reference< css::document::XDocumentProperties> i_xDocProps, + const css::uno::Reference< css::document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage, const css::uno::Sequence<sal_uInt8> * i_pThumb = nullptr, const css::uno::Sequence<sal_uInt8> * i_pGuid = nullptr, diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index 94a3e2e..d7a7834 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -92,7 +92,7 @@ public: SfxFilterMatcher(const SfxFilterMatcher&) = delete; SfxFilterMatcher& operator=( const SfxFilterMatcher& ) = delete; - SAL_DLLPRIVATE static bool IsFilterInstalled_Impl( std::shared_ptr<const SfxFilter> pFilter ); + SAL_DLLPRIVATE static bool IsFilterInstalled_Impl( const std::shared_ptr<const SfxFilter>& pFilter ); DECL_DLLPRIVATE_LINK_TYPED( MaybeFileHdl_Impl, OUString*, bool ); sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, std::shared_ptr<const SfxFilter>& ) const; diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx index 9e49d1d..7bae388 100644 --- a/include/sfx2/filedlghelper.hxx +++ b/include/sfx2/filedlghelper.hxx @@ -250,7 +250,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType, const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >()); -ErrCode RequestPassword(std::shared_ptr<const SfxFilter> pCurrentFilter, OUString& aURL, SfxItemSet* pSet); +ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString& aURL, SfxItemSet* pSet); } #endif diff --git a/include/sfx2/mailmodelapi.hxx b/include/sfx2/mailmodelapi.hxx index 911ce8f..ba8285e 100644 --- a/include/sfx2/mailmodelapi.hxx +++ b/include/sfx2/mailmodelapi.hxx @@ -77,8 +77,8 @@ private: OUString maFromAddress; OUString maSubject; - static SaveResult ShowFilterOptionsDialog( const css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR, - const css::uno::Reference< css::frame::XModel > xModel, + static SaveResult ShowFilterOptionsDialog( const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR, + const css::uno::Reference< css::frame::XModel >& xModel, const OUString& rFilterName, const OUString& rType, bool bModified, diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index ccc7213..86e891c 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -257,10 +257,10 @@ public: static OUString CreateShellID( const SfxObjectShell* pShell ); // Document-Shell Iterator - static SfxObjectShell* GetFirst( std::function<bool ( const SfxObjectShell* )> isObjectShell = nullptr, + static SfxObjectShell* GetFirst( const std::function<bool ( const SfxObjectShell* )>& isObjectShell = nullptr, bool bOnlyVisible = true ); static SfxObjectShell* GetNext( const SfxObjectShell& rPrev, - std::function<bool ( const SfxObjectShell* )> isObjectShell = nullptr, + const std::function<bool ( const SfxObjectShell* )>& isObjectShell = nullptr, bool bOnlyVisible = true ); static SfxObjectShell* Current(); static css::uno::Reference< css::uno::XInterface > diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx index 1f7d902..1e07c76 100644 --- a/include/sfx2/request.hxx +++ b/include/sfx2/request.hxx @@ -50,7 +50,7 @@ friend struct SfxRequest_Impl; public: SAL_DLLPRIVATE void Record_Impl( SfxShell &rSh, const SfxSlot &rSlot, - css::uno::Reference< css::frame::XDispatchRecorder > xRecorder, + const css::uno::Reference< css::frame::XDispatchRecorder >& xRecorder, SfxViewFrame* ); private: SAL_DLLPRIVATE void Done_Impl( const SfxItemSet *pSet ); diff --git a/include/sfx2/sidebar/ResourceManager.hxx b/include/sfx2/sidebar/ResourceManager.hxx index 01695ec..3cf0df9 100644 --- a/include/sfx2/sidebar/ResourceManager.hxx +++ b/include/sfx2/sidebar/ResourceManager.hxx @@ -49,7 +49,7 @@ public: const PanelDescriptor* GetPanelDescriptor(const OUString& rsPanelId) const; PanelDescriptor* GetPanelDescriptor(const OUString& rsPanelId); - void UpdateModel(css::uno::Reference<css::frame::XModel> xModel); + void UpdateModel(const css::uno::Reference<css::frame::XModel>& xModel); void InitDeckContext(const Context& rContex); void SaveDecksSettings(const Context& rContext); diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index 00f0bab35..c968fec 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -85,9 +85,9 @@ public: static SidebarController* GetSidebarControllerForFrame ( const css::uno::Reference<css::frame::XFrame>& rxFrame); - static void registerSidebarForFrame(SidebarController* pController, css::uno::Reference<css::frame::XController> xFrame); + static void registerSidebarForFrame(SidebarController* pController, const css::uno::Reference<css::frame::XController>& xFrame); - static void unregisterSidebarForFrame(SidebarController* pController, css::uno::Reference<css::frame::XController> xFrame); + static void unregisterSidebarForFrame(SidebarController* pController, const css::uno::Reference<css::frame::XController>& xFrame); // ui::XContextChangeEventListener virtual void SAL_CALL notifyContextChangeEvent (const css::ui::ContextChangeEventObject& rEvent) @@ -159,7 +159,7 @@ public: void notifyDeckTitle(const OUString& targetDeckId); - void updateModel(css::uno::Reference<css::frame::XModel> xModel); + void updateModel(const css::uno::Reference<css::frame::XModel>& xModel); void disposeDecks(); @@ -228,7 +228,7 @@ private: vcl::Window* pParentWindow, const bool bIsInitiallyExpanded, const Context& rContext, - VclPtr<Deck> pDeck); + const VclPtr<Deck>& pDeck); void SwitchToDeck ( const DeckDescriptor& rDeckDescriptor, diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 1709b86..53dcd84 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -169,10 +169,10 @@ protected: public: // Iteration - static SfxViewShell* GetFirst( bool bOnlyVisible = true, std::function<bool ( const SfxViewShell* )> isViewShell = nullptr ); + static SfxViewShell* GetFirst( bool bOnlyVisible = true, const std::function<bool ( const SfxViewShell* )>& isViewShell = nullptr ); static SfxViewShell* GetNext( const SfxViewShell& rPrev, bool bOnlyVisible = true, - std::function<bool ( const SfxViewShell* )> isViewShell = nullptr ); + const std::function<bool ( const SfxViewShell* )>& isViewShell = nullptr ); static SfxViewShell* Current(); static SfxViewShell* Get( const css::uno::Reference< css::frame::XController>& i_rController ); diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx index 729f067..1e516c4 100644 --- a/sfx2/inc/guisaveas.hxx +++ b/sfx2/inc/guisaveas.hxx @@ -58,7 +58,7 @@ public: SfxStoringHelper(); bool GUIStoreModel( - css::uno::Reference< css::frame::XModel > xModel, + const css::uno::Reference< css::frame::XModel >& xModel, const OUString& aSlotName, css::uno::Sequence< css::beans::PropertyValue >& aArgsSequence, bool bPreselectPassword, diff --git a/sfx2/source/appl/childwinimpl.cxx b/sfx2/source/appl/childwinimpl.cxx index 7e8b0b7..e1e20ab 100644 --- a/sfx2/source/appl/childwinimpl.cxx +++ b/sfx2/source/appl/childwinimpl.cxx @@ -59,7 +59,7 @@ void SfxChildWinFactArr_Impl::push_back( SfxChildWinFactory* p ) maData.push_back(std::unique_ptr<SfxChildWinFactory>(p)); } -void SfxChildWinFactArr_Impl::erase( iterator it ) +void SfxChildWinFactArr_Impl::erase( const iterator& it ) { maData.erase(it); } @@ -84,7 +84,7 @@ SfxFrame* SfxFrameArr_Impl::front() return maData.front(); } -void SfxFrameArr_Impl::erase( iterator it ) +void SfxFrameArr_Impl::erase( const iterator& it ) { maData.erase(it); } diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx index b8f63d6..100f4c2 100644 --- a/sfx2/source/appl/helpinterceptor.cxx +++ b/sfx2/source/appl/helpinterceptor.cxx @@ -101,7 +101,7 @@ void HelpInterceptor_Impl::addURL( const OUString& rURL ) } -void HelpInterceptor_Impl::setInterception( Reference< XFrame > xFrame ) +void HelpInterceptor_Impl::setInterception( const Reference< XFrame >& xFrame ) { m_xIntercepted.set( xFrame, UNO_QUERY ); diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx index 86af5a6..8356c30 100644 --- a/sfx2/source/appl/helpinterceptor.hxx +++ b/sfx2/source/appl/helpinterceptor.hxx @@ -73,7 +73,7 @@ public: HelpInterceptor_Impl(); virtual ~HelpInterceptor_Impl(); - void setInterception( css::uno::Reference< css::frame::XFrame > xFrame ); + void setInterception( const css::uno::Reference< css::frame::XFrame >& xFrame ); OUString GetCurrentURL() const { return m_aCurrentURL; } diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index 9bc8aaf..2cedda8 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -55,7 +55,7 @@ public: return maData.begin(); } - void erase( iterator it ) + void erase( const iterator& it ) { maData.erase(it); } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 1fee0de..40b1bf0 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -200,7 +200,7 @@ namespace sfx2 "text menu" | "text* menu*" | "text|menu" */ OUString PrepareSearchString( const OUString& rSearchString, - Reference< XBreakIterator > xBreak, bool bForSearch ) + const Reference< XBreakIterator >& xBreak, bool bForSearch ) { OUString sSearchStr; sal_Int32 nStartPos = 0; @@ -3017,7 +3017,7 @@ bool SfxHelpWindow_Impl::PreNotify( NotifyEvent& rNEvt ) return bHandled || Window::PreNotify( rNEvt ); } -void SfxHelpWindow_Impl::setContainerWindow( Reference < css::awt::XWindow > xWin ) +void SfxHelpWindow_Impl::setContainerWindow( const Reference < css::awt::XWindow >& xWin ) { xWindow = xWin; MakeLayout(); diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index 9b9d434..93140f5 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -534,7 +534,7 @@ public: virtual bool PreNotify( NotifyEvent& rNEvt ) override; - void setContainerWindow( css::uno::Reference < css::awt::XWindow > xWin ); + void setContainerWindow( const css::uno::Reference < css::awt::XWindow >& xWin ); inline css::uno::Reference < css::frame::XFrame2 > getTextFrame() const { return pTextWin->getFrame(); } diff --git a/sfx2/source/appl/shellimpl.cxx b/sfx2/source/appl/shellimpl.cxx index 84ed3de..2ef1a7f 100644 --- a/sfx2/source/appl/shellimpl.cxx +++ b/sfx2/source/appl/shellimpl.cxx @@ -39,7 +39,7 @@ SfxObjectShell* SfxObjectShellArr_Impl::operator[] ( size_t i ) return maData[i]; } -void SfxObjectShellArr_Impl::erase( iterator it ) +void SfxObjectShellArr_Impl::erase( const iterator& it ) { maData.erase(it); } @@ -74,7 +74,7 @@ SfxViewFrame* SfxViewFrameArr_Impl::operator[] ( size_t i ) return maData[i]; } -void SfxViewFrameArr_Impl::erase( iterator it ) +void SfxViewFrameArr_Impl::erase( const iterator& it ) { maData.erase(it); } @@ -109,7 +109,7 @@ SfxViewShell* SfxViewShellArr_Impl::operator[] ( size_t i ) return maData[i]; } -void SfxViewShellArr_Impl::erase( iterator it ) +void SfxViewShellArr_Impl::erase( const iterator& it ) { maData.erase(it); } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 04bfdb1..7afdf47 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -499,7 +499,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterControlDefaultUI( SfxMedium& rMedium, s } -bool SfxFilterMatcher::IsFilterInstalled_Impl( std::shared_ptr<const SfxFilter> pFilter ) +bool SfxFilterMatcher::IsFilterInstalled_Impl( const std::shared_ptr<const SfxFilter>& pFilter ) { if ( pFilter->GetFilterFlags() & SfxFilterFlags::MUSTINSTALL ) { diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index aa2b004..1833992 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -136,7 +136,7 @@ public: return maData.end(); } - void erase( iterator it ) + void erase( const iterator& it ) { maData.erase(it); } diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 3dcfe2e..6d6b248 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -361,7 +361,7 @@ void SfxRequest::Record_Impl ( SfxShell& rSh, // the <SfxShell>, which has executed the Request const SfxSlot& rSlot, // the <SfxSlot>, which has executed the Request - css::uno::Reference< css::frame::XDispatchRecorder > xRecorder, + const css::uno::Reference< css::frame::XDispatchRecorder >& xRecorder, SfxViewFrame* pViewFrame ) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index e33fd46..9882d06 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -392,7 +392,7 @@ bool FileDialogHelper_Impl::updateExtendedControl( sal_Int16 _nExtendedControlId return bIsEnabled; } -bool FileDialogHelper_Impl::CheckFilterOptionsCapability( std::shared_ptr<const SfxFilter> _pFilter ) +bool FileDialogHelper_Impl::CheckFilterOptionsCapability( const std::shared_ptr<const SfxFilter>& _pFilter ) { bool bResult = false; @@ -1304,7 +1304,7 @@ void lcl_saveLastURLs(std::vector<OUString>& rpURLList, lLastURLs.push_back(*i); } -void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterface >& xPicker, std::vector<OUString>& rpURLList, std::shared_ptr<const SfxFilter> pFilter) +void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterface >& xPicker, std::vector<OUString>& rpURLList, const std::shared_ptr<const SfxFilter>& pFilter) { rpURLList.clear(); @@ -2599,7 +2599,7 @@ ErrCode FileOpenDialog_Impl( sal_Int16 nDialogType, return nRet; } -ErrCode RequestPassword(std::shared_ptr<const SfxFilter> pCurrentFilter, OUString& aURL, SfxItemSet* pSet) +ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString& aURL, SfxItemSet* pSet) { uno::Reference < task::XInteractionHandler2 > xInteractionHandler = task::InteractionHandler::createWithParent( ::comphelper::getProcessComponentContext(), nullptr ); // TODO: need a save way to distinguish MS filters from other filters diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 1ea880b..01b7c6e 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -128,7 +128,7 @@ namespace sfx2 void setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId ); - bool CheckFilterOptionsCapability( std::shared_ptr<const SfxFilter> _pFilter ); + bool CheckFilterOptionsCapability( const std::shared_ptr<const SfxFilter>& _pFilter ); bool isInOpenMode() const; OUString getCurrentFilterUIName() const; @@ -142,8 +142,8 @@ namespace sfx2 void verifyPath( ); void implGetAndCacheFiles( const css::uno::Reference< XInterface >& xPicker , - std::vector<OUString>& rpURLList, - std::shared_ptr<const SfxFilter> pFilter ); + std::vector<OUString>& rpURLList, + const std::shared_ptr<const SfxFilter>& pFilter ); DECL_LINK_TYPED( TimeOutHdl_Impl, Idle *, void); DECL_LINK_TYPED( InitControls, void*, void ); diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index 7c68553..e12c05f 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -129,8 +129,8 @@ void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) t static const char PDF_DOCUMENT_TYPE[] = "pdf_Portable_Document_Format"; SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog( - uno::Reference< lang::XMultiServiceFactory > xSMGR, - uno::Reference< frame::XModel > xModel, + const uno::Reference< lang::XMultiServiceFactory >& xSMGR, + const uno::Reference< frame::XModel >& xModel, const OUString& rFilterName, const OUString& rType, bool bModified, diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 686c57d..22f0f27 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -321,7 +321,7 @@ protected: /// check if we are initialized properly void SAL_CALL checkInit() const; /// initialize state from given DOM tree - void SAL_CALL init(css::uno::Reference<css::xml::dom::XDocument> i_xDom); + void SAL_CALL init(const css::uno::Reference<css::xml::dom::XDocument>& i_xDom); /// update element in DOM tree void SAL_CALL updateElement(const char *i_name, std::vector<std::pair<const char *, OUString> >* i_pAttrs = nullptr); @@ -653,7 +653,7 @@ SfxDocumentMetaData::getURLProperties( // return the text of the (hopefully unique, i.e., normalize first!) text // node _below_ the given node OUString SAL_CALL -getNodeText(css::uno::Reference<css::xml::dom::XNode> i_xNode) +getNodeText(const css::uno::Reference<css::xml::dom::XNode>& i_xNode) throw (css::uno::RuntimeException) { if (!i_xNode.is()) throw css::uno::RuntimeException( @@ -1119,7 +1119,7 @@ SfxDocumentMetaData::checkInit() const // throw (css::uno::RuntimeException) // initialize state from DOM tree void SAL_CALL SfxDocumentMetaData::init( - css::uno::Reference<css::xml::dom::XDocument> i_xDoc) + const css::uno::Reference<css::xml::dom::XDocument>& i_xDoc) { if (!i_xDoc.is()) throw css::uno::RuntimeException( OUString("SfxDocumentMetaData::init: no DOM tree given"), *this); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index bd2fca7..c9ecec7 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2672,7 +2672,7 @@ SfxMedium::GetInteractionHandler( bool bGetAlways ) } -void SfxMedium::SetFilter( std::shared_ptr<const SfxFilter> pFilter ) +void SfxMedium::SetFilter( const std::shared_ptr<const SfxFilter>& pFilter ) { pImp->m_pFilter = pFilter; } diff --git a/sfx2/source/doc/docinf.cxx b/sfx2/source/doc/docinf.cxx index 75a4dc6..e27d276 100644 --- a/sfx2/source/doc/docinf.cxx +++ b/sfx2/source/doc/docinf.cxx @@ -45,7 +45,7 @@ using namespace ::com::sun::star; namespace sfx2 { sal_uInt32 LoadOlePropertySet( - uno::Reference< document::XDocumentProperties> i_xDocProps, + const uno::Reference< document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage ) { // *** global properties from stream "005SummaryInformation" *** @@ -195,7 +195,7 @@ sal_uInt32 LoadOlePropertySet( } bool SaveOlePropertySet( - uno::Reference< document::XDocumentProperties> i_xDocProps, + const uno::Reference< document::XDocumentProperties>& i_xDocProps, SotStorage* i_pStorage, const uno::Sequence<sal_uInt8> * i_pThumb, const uno::Sequence<sal_uInt8> * i_pGuid, diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx index 63017bb..f50d3fe 100644 --- a/sfx2/source/doc/doctemplateslocal.cxx +++ b/sfx2/source/doc/doctemplateslocal.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star; -std::vector< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext > xContext ) +std::vector< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext >& xContext ) throw( uno::Exception ) { OUString aStringID = "groupuinames.xml"; @@ -41,7 +41,7 @@ std::vector< beans::StringPair > DocTemplLocaleHelper::ReadGroupLocalizationSequ } -void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::Reference< io::XOutputStream >& xOutStream, const std::vector< beans::StringPair >& aSequence, const uno::Reference< uno::XComponentContext > xContext ) +void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::Reference< io::XOutputStream >& xOutStream, const std::vector< beans::StringPair >& aSequence, const uno::Reference< uno::XComponentContext >& xContext ) throw( uno::Exception ) { if ( !xOutStream.is() ) @@ -88,7 +88,7 @@ void SAL_CALL DocTemplLocaleHelper::WriteGroupLocalizationSequence( const uno::R } -std::vector< beans::StringPair > SAL_CALL DocTemplLocaleHelper::ReadLocalizationSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, const uno::Reference< uno::XComponentContext > xContext ) +std::vector< beans::StringPair > SAL_CALL DocTemplLocaleHelper::ReadLocalizationSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, const uno::Reference< uno::XComponentContext >& xContext ) throw( uno::Exception ) { if ( !xContext.is() || !xInStream.is() ) diff --git a/sfx2/source/doc/doctemplateslocal.hxx b/sfx2/source/doc/doctemplateslocal.hxx index 53a9814..a98ae03 100644 --- a/sfx2/source/doc/doctemplateslocal.hxx +++ b/sfx2/source/doc/doctemplateslocal.hxx @@ -42,7 +42,7 @@ class DocTemplLocaleHelper : public cppu::WeakImplHelper < css::xml::sax::XDocum DocTemplLocaleHelper(); std::vector< css::beans::StringPair > GetParsingResult(); - static std::vector< css::beans::StringPair > SAL_CALL ReadLocalizationSequence_Impl( const css::uno::Reference< css::io::XInputStream >& xInStream, const OUString& aStringID, const css::uno::Reference< css::uno::XComponentContext > xContext ) + static std::vector< css::beans::StringPair > SAL_CALL ReadLocalizationSequence_Impl( const css::uno::Reference< css::io::XInputStream >& xInStream, const OUString& aStringID, const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw( css::uno::Exception ); public: @@ -53,7 +53,7 @@ public: std::vector< css::beans::StringPair > ReadGroupLocalizationSequence( const css::uno::Reference< css::io::XInputStream >& xInStream, - const css::uno::Reference< css::uno::XComponentContext > xContext ) + const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw( css::uno::Exception ); // writes sequence of elements ( GroupName, GroupUIName ) @@ -61,7 +61,7 @@ public: void SAL_CALL WriteGroupLocalizationSequence( const css::uno::Reference< css::io::XOutputStream >& xOutStream, const std::vector< css::beans::StringPair >& aSequence, - const css::uno::Reference< css::uno::XComponentContext > xContext ) + const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw( css::uno::Exception ); // XDocumentHandler diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index c00ed82..fc63a1b 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1300,7 +1300,7 @@ uno::Reference< css::frame::XModuleManager2 > SfxStoringHelper::GetModuleManager } -bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel, +bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& xModel, const OUString& aSlotName, uno::Sequence< beans::PropertyValue >& aArgsSequence, bool bPreselectPassword, diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 5f2ff89..eddcb68 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -464,7 +464,7 @@ OUString SfxObjectShell::CreateShellID( const SfxObjectShell* pShell ) SfxObjectShell* SfxObjectShell::GetFirst ( - std::function<bool ( const SfxObjectShell* )> isObjectShell, + const std::function<bool ( const SfxObjectShell* )>& isObjectShell, bool bOnlyVisible ) { @@ -491,7 +491,7 @@ SfxObjectShell* SfxObjectShell::GetFirst SfxObjectShell* SfxObjectShell::GetNext ( const SfxObjectShell& rPrev, - std::function<bool ( const SfxObjectShell* )> isObjectShell, + const std::function<bool ( const SfxObjectShell* )>& isObjectShell, bool bOnlyVisible ) { diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index f25c14f0..c29de45 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -796,7 +796,7 @@ bool SfxOleSection::GetDateValue( util::Date& rValue, sal_Int32 nPropId ) const return pProp != nullptr; } -void SfxOleSection::SetProperty( SfxOlePropertyRef xProp ) +void SfxOleSection::SetProperty( const SfxOlePropertyRef& xProp ) { if( xProp.get() ) maPropMap[ xProp->GetPropId() ] = xProp; diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx index ffe70d3..bba7342 100644 --- a/sfx2/source/doc/oleprops.hxx +++ b/sfx2/source/doc/oleprops.hxx @@ -292,7 +292,7 @@ public: bool GetDateValue( css::util::Date& rValue, sal_Int32 nPropId ) const; /** Adds the passed property to the property set. Drops an existing old property. */ - void SetProperty( SfxOlePropertyRef xProp ); + void SetProperty( const SfxOlePropertyRef& xProp ); /** Inserts a signed int32 property with the passed value. */ void SetInt32Value( sal_Int32 nPropId, sal_Int32 nValue ); /** Inserts a floating-point property with the passed value. */ diff --git a/sfx2/source/inc/childwinimpl.hxx b/sfx2/source/inc/childwinimpl.hxx index 1132686..135cd3e 100644 --- a/sfx2/source/inc/childwinimpl.hxx +++ b/sfx2/source/inc/childwinimpl.hxx @@ -52,7 +52,7 @@ public: const SfxChildWinFactory& operator []( size_t i ) const; SfxChildWinFactory& operator []( size_t i ); void push_back( SfxChildWinFactory* p ); - void erase( iterator it ); + void erase( const iterator& it ); iterator begin(); }; @@ -70,7 +70,7 @@ public: SfxFrame* front(); - void erase( iterator it ); + void erase( const iterator& it ); SfxFrame* operator[] ( size_t i ); diff --git a/sfx2/source/inc/shellimpl.hxx b/sfx2/source/inc/shellimpl.hxx index 622dafa..5e11bf1e 100644 --- a/sfx2/source/inc/shellimpl.hxx +++ b/sfx2/source/inc/shellimpl.hxx @@ -41,7 +41,7 @@ public: const SfxObjectShell* operator[] ( size_t i ) const; SfxObjectShell* operator[] ( size_t i ); - void erase( iterator it ); + void erase( const iterator& it ); void push_back( SfxObjectShell* p ); @@ -62,7 +62,7 @@ public: const SfxViewFrame* operator[] ( size_t i ) const; SfxViewFrame* operator[] ( size_t i ); - void erase( iterator it ); + void erase( const iterator& it ); void push_back( SfxViewFrame* p ); @@ -84,7 +84,7 @@ public: const SfxViewShell* operator[] ( size_t i ) const; SfxViewShell* operator[] ( size_t i ); - void erase( iterator it ); + void erase( const iterator& it ); void push_back( SfxViewShell* p ); diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index b2f9d17..6951f7c 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -54,7 +54,7 @@ bool getBool(utl::OConfigurationNode const & aNode, const char* pNodeName) return comphelper::getBOOL(aNode.getNodeValue(pNodeName)); } -css::uno::Sequence<OUString> BuildContextList (ContextList rContextList) +css::uno::Sequence<OUString> BuildContextList (const ContextList& rContextList) { const ::std::vector<ContextList::Entry>& entries = rContextList.GetEntries(); @@ -722,7 +722,7 @@ bool ResourceManager::IsDeckEnabled ( return false; } -void ResourceManager::UpdateModel(css::uno::Reference<css::frame::XModel> xModel) +void ResourceManager::UpdateModel(const css::uno::Reference<css::frame::XModel>& xModel) { for (DeckContainer::iterator itr = maDecks.begin(); itr != maDecks.end(); ++itr) { diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index d28a597..c1801d2 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -160,7 +160,7 @@ SidebarController* SidebarController::GetSidebarControllerForFrame ( return dynamic_cast<SidebarController*>(xListener.get()); } -void SidebarController::registerSidebarForFrame(SidebarController* pController, css::uno::Reference<css::frame::XController> xController) +void SidebarController::registerSidebarForFrame(SidebarController* pController, const css::uno::Reference<css::frame::XController>& xController) { // Listen for context change events. css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer ( @@ -172,7 +172,7 @@ void SidebarController::registerSidebarForFrame(SidebarController* pController, xController); } -void SidebarController::unregisterSidebarForFrame(SidebarController* pController, css::uno::Reference<css::frame::XController> xController) +void SidebarController::unregisterSidebarForFrame(SidebarController* pController, const css::uno::Reference<css::frame::XController>& xController) { pController->disposeDecks(); css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer ( @@ -765,7 +765,7 @@ VclPtr<Panel> SidebarController::CreatePanel ( vcl::Window* pParentWindow, const bool bIsInitiallyExpanded, const Context& rContext, - VclPtr<Deck> pDeck) + const VclPtr<Deck>& pDeck) { const PanelDescriptor* pPanelDescriptor = mpResourceManager->GetPanelDescriptor(rsPanelId); @@ -1291,7 +1291,7 @@ ResourceManager::PanelContextDescriptorContainer SidebarController::GetMatchingP return aPanels; } -void SidebarController::updateModel(css::uno::Reference<css::frame::XModel> xModel) +void SidebarController::updateModel(const css::uno::Reference<css::frame::XModel>& xModel) { mpResourceManager->UpdateModel(xModel); } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 6d1672c..c4ac752 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -154,7 +154,7 @@ void SfxViewFrame::InitInterface_Impl() #endif } -static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHandler >& xHandler, const OUString& aPath, std::shared_ptr<const SfxFilter> pFilter, sal_uInt32 nPasswordHash, const uno::Sequence< beans::PropertyValue >& aInfo ) +static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHandler >& xHandler, const OUString& aPath, const std::shared_ptr<const SfxFilter>& pFilter, sal_uInt32 nPasswordHash, const uno::Sequence< beans::PropertyValue >& aInfo ) { // TODO/LATER: In future the info should replace the direct hash completely bool bResult = ( !nPasswordHash && !aInfo.getLength() ); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index d1aa754..ca3d51a 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -232,7 +232,7 @@ public: iterator end() { return maData.end(); } void push_back( SfxInPlaceClient* p ) { maData.push_back(p); } - void erase( iterator it ) { maData.erase(it); } + void erase( const iterator& it ) { maData.erase(it); } size_t size() const { return maData.size(); } }; @@ -1412,7 +1412,7 @@ void SfxViewShell::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue SfxViewShell* SfxViewShell::GetFirst ( bool bOnlyVisible, - std::function< bool ( const SfxViewShell* ) > isViewShell + const std::function< bool ( const SfxViewShell* ) >& isViewShell ) { // search for a SfxViewShell of the specified type @@ -1450,7 +1450,7 @@ SfxViewShell* SfxViewShell::GetNext ( const SfxViewShell& rPrev, bool bOnlyVisible, - std::function<bool ( const SfxViewShell* )> isViewShell + const std::function<bool ( const SfxViewShell* )>& isViewShell ) { SfxViewShellArr_Impl &rShells = SfxGetpApp()->GetViewShells_Impl(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits