diff options
58 files changed, 138 insertions, 223 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index baef86748e7c..2e29be257905 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -370,10 +370,9 @@ void AbstractPasteDialog_Impl::SetObjName( const SvGlobalName & rClass, const OU } SotClipboardFormatId AbstractPasteDialog_Impl::GetFormat( const TransferableDataHelper& aHelper, - const DataFlavorExVector* pFormats, - const TransferableObjectDescriptor* pDesc ) + const DataFlavorExVector* pFormats ) { - return pDlg->GetFormat( aHelper, pFormats, pDesc ); + return pDlg->GetFormat( aHelper, pFormats ); } void AbstractFmShowColsDialog_Impl::SetColumns(const ::Reference< css::container::XIndexContainer>& xCols) @@ -880,8 +879,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nR vcl::Window* pParent, const SfxItemSet* pAttrSet, SfxViewFrame* , - bool /*bEditFmt*/, - const OUString * ) + bool /*bEditFmt*/ ) { SfxTabDialog* pDlg=nullptr; switch ( nResId ) @@ -905,8 +903,7 @@ SfxAbstractTabDialog* AbstractDialogFactory_Impl::CreateTabDialog( sal_uInt32 nR vcl::Window* pParent, const SfxItemSet* pAttrSet, const Reference< frame::XFrame >& xViewFrame, - bool /*bEditFmt*/, - const OUString * ) + bool /*bEditFmt*/ ) { VclPtr<SfxTabDialog> pDlg; switch ( nResId ) diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 418b507c0590..9b45704d8f92 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -433,8 +433,7 @@ public: virtual void Insert( SotClipboardFormatId nFormat, const OUString & rFormatName ) override; virtual void SetObjName( const SvGlobalName & rClass, const OUString & rObjName ) override; virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper, - const DataFlavorExVector* pFormats=nullptr, - const TransferableObjectDescriptor* pDesc=nullptr ) override; + const DataFlavorExVector* pFormats=nullptr ) override; }; class AbstractLinksDialog_Impl : public SfxAbstractLinksDialog @@ -497,14 +496,12 @@ public: vcl::Window* pParent, const SfxItemSet* pAttrSet, SfxViewFrame* pViewFrame, - bool bEditFmt=false, - const OUString *pUserButtonText=nullptr ) override; + bool bEditFmt=false ) override; virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId, vcl::Window* pParent, const SfxItemSet* pAttrSet, const css::uno::Reference< css::frame::XFrame >& xViewFrame, - bool bEditFmt=false, - const OUString *pUserButtonText=nullptr ) override; + bool bEditFmt=false ) override; virtual SfxAbstractTabDialog* CreateTextTabDialog( vcl::Window* pParent, const SfxItemSet* pAttrSet, SdrView* pView ) override; diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 6703157b7c6b..10205d32bbf0 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -162,8 +162,8 @@ public: static OUString ChooseScript(); static void MacroOrganizer( sal_Int16 nTabId ); static ErrCode CallBasic( const OUString&, BasicManager*, SbxArray *pArgs, SbxValue *pRet ); - static ErrCode CallAppBasic( const OUString& i_macroName, SbxArray* i_args = nullptr, SbxValue* i_ret = nullptr ) - { return CallBasic( i_macroName, SfxApplication::GetBasicManager(), i_args, i_ret ); } + static ErrCode CallAppBasic( const OUString& i_macroName, SbxArray* i_args = nullptr ) + { return CallBasic( i_macroName, SfxApplication::GetBasicManager(), i_args, nullptr ); } static BasicManager* GetBasicManager(); css::script::XLibraryContainer * GetDialogContainer(); css::script::XLibraryContainer * GetBasicContainer(); diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx index 186e6b6c5668..3667a5a16e5d 100644 --- a/include/sfx2/bindings.hxx +++ b/include/sfx2/bindings.hxx @@ -159,7 +159,7 @@ public: bool IsInUpdate() const; void SetVisibleState( sal_uInt16 nId, bool bShow ); - bool IsBound( sal_uInt16 nMsgId, sal_uInt16 nStartSearchAt = 0 ); + bool IsBound( sal_uInt16 nMsgId ); SfxStateCache* GetStateCache( sal_uInt16 nId); SAL_DLLPRIVATE SfxStateCache* GetAnyStateCache_Impl( sal_uInt16 nId ); @@ -200,7 +200,7 @@ public: SAL_DLLPRIVATE void Register_Impl( SfxControllerItem& rBinding, bool ); SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl() const; SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* ); - SAL_DLLPRIVATE SfxBindings* GetSubBindings_Impl( bool bTop = false ) const; + SAL_DLLPRIVATE SfxBindings* GetSubBindings_Impl() const; SAL_DLLPRIVATE void InvalidateUnoControllers_Impl(); SAL_DLLPRIVATE void RegisterUnoController_Impl( SfxUnoControllerItem* ); SAL_DLLPRIVATE void ReleaseUnoController_Impl( SfxUnoControllerItem* ); diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 4701bb44a377..973e23fd96e1 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -79,8 +79,7 @@ struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo bool GetExtraData_Impl( SfxChildAlignment *pAlign, SfxChildAlignment *pLastAlign = nullptr, Size *pSize = nullptr, - sal_uInt16 *pLine = nullptr, - sal_uInt16 *pPos = nullptr ) const; + sal_uInt16 *pLine = nullptr ) const; }; // ChildWindow factory methods diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx index 3d279923d87f..0e98186bc29a 100644 --- a/include/sfx2/docfac.hxx +++ b/include/sfx2/docfac.hxx @@ -57,7 +57,7 @@ public: OUString GetFactoryURL() const; // shortcut for "private:factory/GetShortName()" OUString GetFactoryName() const { return OUString::createFromAscii(pShortName); } OUString GetModuleName() const; - SfxFilterContainer *GetFilterContainer( bool bForceLoad = true) const; + SfxFilterContainer *GetFilterContainer() const; // Views void RegisterViewFactory(SfxViewFactory &rFactory); diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index 2dc8014c8fa4..aabf312759e5 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -113,10 +113,10 @@ public: void SetLoadTargetFrame(SfxFrame* pFrame ); SfxFrame* GetLoadTargetFrame() const; - void SetFilter(const SfxFilter *pFlt, bool bResetOrig = false); - const SfxFilter* GetFilter() const; - const SfxFilter * GetOrigFilter( bool bNotCurrent = false ) const; - const OUString& GetOrigURL() const; + void SetFilter(const SfxFilter *pFlt); + const SfxFilter* GetFilter() const; + const SfxFilter* GetOrigFilter() const; + const OUString& GetOrigURL() const; SfxItemSet * GetItemSet() const; void Close(); diff --git a/include/sfx2/docfilt.hxx b/include/sfx2/docfilt.hxx index 6f45c9780b16..f67a69f2f410 100644 --- a/include/sfx2/docfilt.hxx +++ b/include/sfx2/docfilt.hxx @@ -111,7 +111,7 @@ public: static OUString GetTypeFromStorage( const SotStorage& rStg ); static OUString GetTypeFromStorage( const css::uno::Reference<css::embed::XStorage>& xStorage, - bool bTemplate = false, OUString* pName = nullptr ) + bool bTemplate = false ) throw ( css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index e9ecf60cd5af..40a7f8081293 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -111,7 +111,7 @@ public: SAL_DLLPRIVATE void Disappear_Impl(); SAL_DLLPRIVATE void Reappear_Impl(); SAL_DLLPRIVATE bool IsAutoHide_Impl() const; - SAL_DLLPRIVATE void AutoShow_Impl( bool bShow = true ); + SAL_DLLPRIVATE void AutoShow_Impl(); SAL_DLLPRIVATE void ReleaseChildWindow_Impl(); }; diff --git a/include/sfx2/doctempl.hxx b/include/sfx2/doctempl.hxx index 82fdc1136adc..66b1dcee6bb6 100644 --- a/include/sfx2/doctempl.hxx +++ b/include/sfx2/doctempl.hxx @@ -108,16 +108,8 @@ public: configuration. This means that just by copying files into OOo's template directories, this change is not reflected in the SfxDocumentTemplates - 'cause the configuration is not synchronous with the file system. This can be enforced with this method.</p> - - @param _bSmart - The update of the configuration is rather expensive - nothing you want to do regulary if you don't really - need it. So you have the possibility to do a smart update - it first checks if the update if necessary. - In case the update is needed, the additional check made it somewhat more expensive. In case it's not - necessary (which should be the usual case), the check alone is (much) less expensive than the real update. - <br/> - So set <arg>_bSmart</arg> to <TRUE/> to do a check for necessity first. */ - void Update( bool _bSmart = true ); + void Update(); }; #endif // INCLUDED_SFX2_DOCTEMPL_HXX diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index 3bfa5e07a614..a15c9b0d7133 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -95,10 +95,10 @@ public: SAL_DLLPRIVATE static bool IsFilterInstalled_Impl( const SfxFilter* pFilter ); DECL_DLLPRIVATE_LINK_TYPED( MaybeFileHdl_Impl, OUString*, bool ); - sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; + sal_uInt32 GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT ) const; sal_uInt32 GuessFilter( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; sal_uInt32 GuessFilterControlDefaultUI( SfxMedium& rMedium, const SfxFilter **, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED, bool bDefUI = true ) const; - sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter **, bool bPlugIn, bool bAPI = false ) const; + sal_uInt32 DetectFilter( SfxMedium& rMedium, const SfxFilter ** ) const; const SfxFilter* GetFilter4Mime( const OUString& rMime, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED) const; const SfxFilter* GetFilter4ClipBoardId( SotClipboardFormatId nId, SfxFilterFlags nMust = SfxFilterFlags::IMPORT, SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED ) const; diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx index 0111f5e92577..2a7aa0615d03 100644 --- a/include/sfx2/frame.hxx +++ b/include/sfx2/frame.hxx @@ -117,8 +117,8 @@ public: CreateBlankFrame(); static SfxFrame* Create( SfxObjectShell& rDoc, vcl::Window& rWindow, sal_uInt16 nViewId, bool bHidden ); - vcl::Window& GetWindow() const { return *pWindow;} - void CancelTransfers( bool bCancelLoadEnv = true ); + vcl::Window& GetWindow() const { return *pWindow;} + void CancelTransfers(); bool DoClose(); sal_uInt16 GetChildFrameCount() const; SfxFrame* GetChildFrame( sal_uInt16 nPos ) const; diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx index eafbf4e9123e..df96ceeab04d 100644 --- a/include/sfx2/frmdescr.hxx +++ b/include/sfx2/frmdescr.hxx @@ -132,7 +132,7 @@ public: { bHasBorder = false; bHasBorderSet = false; } // Copy for example for Views - SfxFrameDescriptor* Clone( bool bWithIds = true ) const; + SfxFrameDescriptor* Clone() const; }; // No block to implement a =operator diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx index 4c87a068b750..7e00047c769b 100644 --- a/include/sfx2/linksrc.hxx +++ b/include/sfx2/linksrc.hxx @@ -60,7 +60,7 @@ public: SvLinkSource(); virtual ~SvLinkSource(); - bool HasDataLinks( const SvBaseLink* = nullptr ) const; + bool HasDataLinks() const; void Closed(); diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx index 504e7ee526e7..67d0b4ebeb6b 100644 --- a/include/sfx2/mgetempl.hxx +++ b/include/sfx2/mgetempl.hxx @@ -89,8 +89,7 @@ protected: virtual void Reset(const SfxItemSet *) override; static bool Execute_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr, - sal_uInt16 nFamily, sal_uInt16 nMask = 0, - const sal_uInt16* pModifier = nullptr ); + sal_uInt16 nFamily, sal_uInt16 nMask = 0 ); using TabPage::ActivatePage; virtual void ActivatePage(const SfxItemSet &) override; using TabPage::DeactivatePage; diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 7cfd3584fbf5..ffca96b2c639 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -408,7 +408,7 @@ public: @return whether macros from this document should be executed */ - bool AdjustMacroMode( const OUString& rScriptType, bool _bSuppressUI = false ); + bool AdjustMacroMode(); SvKeyValueIterator* GetHeaderAttributes(); void ClearHeaderAttributesForSourceViewHack(); @@ -541,7 +541,7 @@ public: static SfxObjectShell* CreateObject( const OUString& rServiceName, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD ); static SfxObjectShell* CreateObjectByFactoryName( const OUString& rURL, SfxObjectCreateMode = SfxObjectCreateMode::STANDARD ); static css::uno::Reference< css::lang::XComponent > - CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame = nullptr ); + CreateAndLoadComponent( const SfxItemSet& rSet ); static SfxObjectShell* GetShellFromComponent( const css::uno::Reference< css::lang::XComponent >& xComp ); static OUString GetServiceNameFromFactory( const OUString& rFact ); bool IsInPlaceActive(); diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx index 9b972c83d313..60d45aaea06c 100644 --- a/include/sfx2/passwd.hxx +++ b/include/sfx2/passwd.hxx @@ -120,9 +120,9 @@ public: { mnExtras = nExtras; } - void AllowAsciiOnly(bool i_bAsciiOnly = true) + void AllowAsciiOnly() { - mbAsciiOnly = i_bAsciiOnly; + mbAsciiOnly = true; } void ShowMinLengthText(bool bShow); diff --git a/include/sfx2/request.hxx b/include/sfx2/request.hxx index 99f42dcab468..1f7d9023c99e 100644 --- a/include/sfx2/request.hxx +++ b/include/sfx2/request.hxx @@ -108,7 +108,7 @@ public: void Ignore(); void Cancel(); bool IsCancelled() const; - void Done(const SfxItemSet &, bool bKeep = true ); + void Done(const SfxItemSet &); void ForgetAllArgs(); diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx index dfb0e967c246..ccd59d33d51c 100644 --- a/include/sfx2/sfxdlg.hxx +++ b/include/sfx2/sfxdlg.hxx @@ -96,8 +96,7 @@ public: virtual void Insert( SotClipboardFormatId nFormat, const rtl::OUString & rFormatName ) = 0; virtual void SetObjName( const SvGlobalName & rClass, const rtl::OUString & rObjName ) = 0; virtual SotClipboardFormatId GetFormat( const TransferableDataHelper& aHelper, - const DataFlavorExVector* pFormats=nullptr, - const TransferableObjectDescriptor* pDesc=nullptr ) = 0; + const DataFlavorExVector* pFormats=nullptr ) = 0; }; class SfxAbstractLinksDialog : virtual public VclAbstractDialog @@ -123,14 +122,12 @@ public: vcl::Window* pParent, const SfxItemSet* pAttrSet, SfxViewFrame* pViewFrame, - bool bEditFmt=false, - const rtl::OUString *pUserButtonText=nullptr ) = 0; + bool bEditFmt=false ) = 0; virtual SfxAbstractTabDialog* CreateTabDialog( sal_uInt32 nResId, vcl::Window* pParent, const SfxItemSet* pAttrSet, const css::uno::Reference< css::frame::XFrame >& xViewFrame, - bool bEditFmt=false, - const rtl::OUString *pUserButtonText=nullptr ) = 0; + bool bEditFmt=false ) = 0; virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0; virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0; virtual SfxAbstractInsertObjectDialog* CreateInsertObjectDialog( vcl::Window* pParent, const OUString& rCommand, diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 795714e4beb9..16b74a97bd60 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -127,8 +127,7 @@ public: sal_uInt16 AddTabPage( const OString& rName, // Name of the label for the page in the notebook .ui CreateTabPage pCreateFunc, // != 0 - GetTabPageRanges pRangesFunc, // can be 0 - bool bItemsOnDemand = false); + GetTabPageRanges pRangesFunc); // can be 0 sal_uInt16 AddTabPage ( const OString &rName, // Name of the label for the page in the notebook .ui sal_uInt16 nPageCreateId ); // Identifier of the Factory Method to create the page @@ -142,8 +141,7 @@ public: void AddTabPage( sal_uInt16 nId, const OUString &rRiderText, - bool bItemsOnDemand = false, - sal_uInt16 nPos = TAB_APPEND); + bool bItemsOnDemand = false); void RemoveTabPage( const OString& rName ); // Name of the label for the page in the notebook .ui void RemoveTabPage( sal_uInt16 nId ); @@ -236,8 +234,8 @@ public: bool HasExchangeSupport() const { return bHasExchangeSupport; } - void SetExchangeSupport( bool bNew = true ) - { bHasExchangeSupport = bNew; } + void SetExchangeSupport() + { bHasExchangeSupport = true; } enum sfxpg { KEEP_PAGE = 0x0000, // Error handling; page does not change diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index 23a461053b45..b960289245b3 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -98,8 +98,8 @@ public: static SfxViewFrame* LoadHiddenDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId ); static SfxViewFrame* LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt16 i_nViewId ); static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId = 0 ); - static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const css::uno::Reference< css::frame::XFrame >& i_rFrameItem, const sal_uInt16 i_nViewId = 0 ); - static SfxViewFrame* DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId = 0 ); + static SfxViewFrame* LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const css::uno::Reference< css::frame::XFrame >& i_rFrameItem ); + static SfxViewFrame* DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest ); static SfxViewFrame* Current(); static SfxViewFrame* GetFirst( const SfxObjectShell* pDoc = nullptr, bool bOnlyVisible = true ); @@ -107,7 +107,7 @@ public: static SfxViewFrame* Get( const css::uno::Reference< css::frame::XController>& i_rController, const SfxObjectShell* i_pDoc = nullptr ); - void DoActivate(bool bMDI, SfxViewFrame *pOld=nullptr); + void DoActivate(bool bMDI); void DoDeactivate(bool bMDI, SfxViewFrame *pOld=nullptr); SfxViewFrame* GetParentViewFrame() const; @@ -201,7 +201,7 @@ public: SAL_DLLPRIVATE bool IsResizeInToOut_Impl() const; SAL_DLLPRIVATE void UpdateDocument_Impl(); - SAL_DLLPRIVATE void LockObjectShell_Impl(bool bLock=true); + SAL_DLLPRIVATE void LockObjectShell_Impl(); SAL_DLLPRIVATE void MakeActive_Impl( bool bActivate ); SAL_DLLPRIVATE void SetQuietMode_Impl( bool ); diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 466ced7776dd..920de992eaed 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -247,7 +247,7 @@ public: // Working set virtual void WriteUserData( OUString&, bool bBrowse = false ); virtual void ReadUserData( const OUString&, bool bBrowse = false ); - virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ); + virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& ); virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ); virtual void QueryObjAreaPixel( Rectangle& rRect ) const; diff --git a/sc/source/ui/inc/prevwsh.hxx b/sc/source/ui/inc/prevwsh.hxx index 841b2565ef8a..cabd8a90881a 100644 --- a/sc/source/ui/inc/prevwsh.hxx +++ b/sc/source/ui/inc/prevwsh.hxx @@ -71,7 +71,7 @@ protected: virtual void WriteUserData(OUString &, bool bBrowse = false) override; virtual void ReadUserData(const OUString &, bool bBrowse = false) override; - virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ) override; + virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >& ) override; virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ) override; public: diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 41d7e181dc3b..c1e7f718da78 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -204,7 +204,7 @@ protected: virtual void WriteUserData(OUString &, bool bBrowse = false) override; virtual void ReadUserData(const OUString &, bool bBrowse = false) override; - virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ) override; + virtual void WriteUserDataSequence (css::uno::Sequence < css::beans::PropertyValue >& ) override; virtual void ReadUserDataSequence (const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse = false ) override; virtual void UIDeactivated( SfxInPlaceClient* pClient ) override; diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx index 641fca377d3e..31e6c2da56ed 100644 --- a/sc/source/ui/view/prevwsh.cxx +++ b/sc/source/ui/view/prevwsh.cxx @@ -934,7 +934,7 @@ void ScPreviewShell::ReadUserData(const OUString& rData, bool /* bBrowse */) } } -void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue >& rSeq, bool /* bBrowse */) +void ScPreviewShell::WriteUserDataSequence(uno::Sequence < beans::PropertyValue >& rSeq) { rSeq.realloc(3); beans::PropertyValue* pSeq = rSeq.getArray(); diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 5a6413e90313..78e8eaeaa4d5 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -472,9 +472,9 @@ void ScTabViewShell::WriteUserData(OUString& rData, bool /* bBrowse */) GetViewData().WriteUserData(rData); } -void ScTabViewShell::WriteUserDataSequence (uno::Sequence < beans::PropertyValue >& rSettings, bool /* bBrowse */ ) +void ScTabViewShell::WriteUserDataSequence (uno::Sequence < beans::PropertyValue >& rSettings ) { - GetViewData().WriteUserDataSequence (rSettings); + GetViewData().WriteUserDataSequence(rSettings); } void ScTabViewShell::ReadUserData(const OUString& rData, bool /* bBrowse */) diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 5e4aec31e6a9..d02a1573b4e9 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -140,8 +140,7 @@ public: /// Forward methods to main sub shell. virtual void WriteUserDataSequence ( - css::uno::Sequence< css::beans::PropertyValue >&, - bool bBrowse = false) override; + css::uno::Sequence< css::beans::PropertyValue >&) override; /** Pass the given properties to the main view shell. After that we ensure that the right view shell type is displayed in the center diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 5cb79efdfdeb..79026733d1ef 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -687,13 +687,12 @@ void ViewShellBase::GetState (SfxItemSet& rSet) } void ViewShellBase::WriteUserDataSequence ( - css::uno::Sequence< css::beans::PropertyValue >& rSequence, - bool bBrowse) + css::uno::Sequence< css::beans::PropertyValue >& rSequence) { // Forward call to main sub shell. ViewShell* pShell = GetMainViewShell().get(); if (pShell != nullptr) - pShell->WriteUserDataSequence (rSequence, bBrowse); + pShell->WriteUserDataSequence (rSequence); } void ViewShellBase::ReadUserDataSequence ( diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index cd18dbc29eb7..f29288ed0408 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -840,7 +840,7 @@ extern "C" rtl_uString* basicide_choose_macro(void*, sal_Bool, rtl_uString*); #endif -OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, bool bChooseOnly, const OUString& rMacroDesc = OUString() ) +OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, bool bChooseOnly ) { #ifndef DISABLE_DYNLOADING osl::Module aMod; @@ -859,6 +859,7 @@ OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, bool bChoose #endif // call basicide_choose_macro in basctl + OUString rMacroDesc; rtl_uString* pScriptURL = pSymbol( rxLimitToDocument.get(), bChooseOnly, rMacroDesc.pData ); OUString aScriptURL( pScriptURL ); rtl_uString_release( pScriptURL ); diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx index 650057fda829..1e1780e6ecf4 100644 --- a/sfx2/source/appl/childwin.cxx +++ b/sfx2/source/appl/childwin.cxx @@ -580,8 +580,7 @@ bool SfxChildWinInfo::GetExtraData_Impl SfxChildAlignment *pAlign, SfxChildAlignment *pLastAlign, Size *pSize, - sal_uInt16 *pLine, - sal_uInt16 *pPos + sal_uInt16 *pLine ) const { // invalid? @@ -634,8 +633,6 @@ bool SfxChildWinInfo::GetExtraData_Impl *pSize = aChildSize; if ( pLine ) *pLine = (sal_uInt16) aChildPos.X(); - if ( pPos ) - *pPos = (sal_uInt16) aChildPos.Y(); return true; } return false; diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx index eaea196c80f4..7e90802a5ffc 100644 --- a/sfx2/source/appl/linksrc.cxx +++ b/sfx2/source/appl/linksrc.cxx @@ -397,13 +397,11 @@ void SvLinkSource::RemoveConnectAdvise( SvBaseLink * pLink ) } } -bool SvLinkSource::HasDataLinks( const SvBaseLink* pLink ) const +bool SvLinkSource::HasDataLinks() const { bool bRet = false; - const SvLinkSource_Entry_Impl* p; for( sal_uInt16 n = 0, nEnd = pImpl->aArr.size(); n < nEnd; ++n ) - if( ( p = pImpl->aArr[ n ] )->bIsDataSink && - ( !pLink || &p->xSink == pLink ) ) + if( pImpl->aArr[ n ]->bIsDataSink ) { bRet = true; break; diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index ba2de7477d84..afddd82160ce 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -247,7 +247,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval, if ( pDoc ) { // security check for macros from document basic if an SFX doc is given - if ( !pDoc->AdjustMacroMode( OUString() ) ) + if ( !pDoc->AdjustMacroMode() ) // check forbids execution return ERRCODE_IO_ACCESSDENIED; } diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index a2893a524223..b908d7ebd6c9 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -375,8 +375,7 @@ const SfxFilter* SfxFilterMatcher::GetAnyFilter( SfxFilterFlags nMust, SfxFilter sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent( SfxMedium& rMedium, const SfxFilter**ppFilter, - SfxFilterFlags nMust, - SfxFilterFlags nDont ) const + SfxFilterFlags nMust ) const { uno::Reference<document::XTypeDetection> xDetection( comphelper::getProcessServiceFactory()->createInstance("com.sun.star.document.TypeDetection"), uno::UNO_QUERY); @@ -395,7 +394,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent( { // make sure filter list is initialized m_rImpl.InitForIterating(); - *ppFilter = GetFilter4EA( sTypeName, nMust, nDont ); + *ppFilter = GetFilter4EA( sTypeName, nMust ); } return *ppFilter ? ERRCODE_NONE : ERRCODE_ABORT; @@ -535,7 +534,7 @@ bool SfxFilterMatcher::IsFilterInstalled_Impl( const SfxFilter* pFilter ) } -sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**ppFilter, bool /*bPlugIn*/, bool bAPI ) const +sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter**ppFilter ) const /* [Description] Here the Filter selection box is pulled up. Otherwise GuessFilter @@ -606,7 +605,7 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter** } *ppFilter = pFilter; - if ( bHidden || (bAPI && nErr == ERRCODE_SFX_CONSULTUSER) ) + if ( bHidden ) nErr = pFilter ? ERRCODE_NONE : ERRCODE_ABORT; return nErr; } diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 07c2d437e7b4..e9eba41d1b04 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -874,9 +874,10 @@ void SfxBindings::Invalidate } -bool SfxBindings::IsBound( sal_uInt16 nSlotId, sal_uInt16 nStartSearchAt ) +bool SfxBindings::IsBound( sal_uInt16 nSlotId ) { DBG_ASSERT( pImp->pCaches != nullptr, "SfxBindings not initialized" ); + sal_uInt16 nStartSearchAt = 0; return GetStateCache(nSlotId, &nStartSearchAt ) != nullptr; } @@ -1963,16 +1964,9 @@ void SfxBindings::SetSubBindings_Impl( SfxBindings *pSub ) } } -SfxBindings* SfxBindings::GetSubBindings_Impl( bool bTop ) const +SfxBindings* SfxBindings::GetSubBindings_Impl() const { - SfxBindings *pRet = pImp->pSubBindings; - if ( bTop ) - { - while ( pRet->pImp->pSubBindings ) - pRet = pRet->pImp->pSubBindings; - } - - return pRet; + return pImp->pSubBindings; } void SfxBindings::SetWorkWindow_Impl( SfxWorkWindow* pWork ) diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 119880e37356..3dcfe2ef5152 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -424,16 +424,10 @@ const SfxPoolItem* SfxRequest::GetReturnValue() const void SfxRequest::Done ( - const SfxItemSet& rSet, /* parameters passed on by the application, + const SfxItemSet& rSet /* parameters passed on by the application, that for example were asked for by the user in a dialogue, 0 if no parameters have been set */ - - bool bKeep /* true (default) - 'rSet' is saved and GetArgs() queryable. - - false - 'rSet' is not copied (faster) */ ) /* [Description] @@ -460,23 +454,20 @@ void SfxRequest::Done Done_Impl( &rSet ); // Keep items if possible, so they can be queried by StarDraw. - if ( bKeep ) + if ( !pArgs ) { - if ( !pArgs ) - { - pArgs = new SfxAllItemSet( rSet ); - pImp->SetPool( pArgs->GetPool() ); - } - else + pArgs = new SfxAllItemSet( rSet ); + pImp->SetPool( pArgs->GetPool() ); + } + else + { + SfxItemIter aIter(rSet); + const SfxPoolItem* pItem = aIter.FirstItem(); + while(pItem) { - SfxItemIter aIter(rSet); - const SfxPoolItem* pItem = aIter.FirstItem(); - while(pItem) - { - if(!IsInvalidItem(pItem)) - pArgs->Put(*pItem,pItem->Which()); - pItem = aIter.NextItem(); - } + if(!IsInvalidItem(pItem)) + pArgs->Put(*pItem,pItem->Which()); + pItem = aIter.NextItem(); } } } diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index d82ffa2ed304..28011c99ab32 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1807,14 +1807,11 @@ bool SfxDockingWindow::IsAutoHide_Impl() const return false; } -void SfxDockingWindow::AutoShow_Impl( bool bShow ) +void SfxDockingWindow::AutoShow_Impl() { if ( pImp->pSplitWin ) { - if ( bShow ) - pImp->pSplitWin->FadeIn(); - else - pImp->pSplitWin->FadeOut(); + pImp->pSplitWin->FadeIn(); } } diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index a5fbf5cdd09d..6765452cb15b 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -376,7 +376,7 @@ IMPL_LINK_NOARG_TYPED( SfxManageStyleSheetPage, EditLinkStyleHdl_Impl, Button*, // Internal: Perform functions through the Dispatcher bool SfxManageStyleSheetPage::Execute_Impl( sal_uInt16 nId, const OUString &rStr, const OUString& rRefStr, sal_uInt16 nFamily, - sal_uInt16 nMask, const sal_uInt16* pModifier) + sal_uInt16 nMask) { SfxDispatcher &rDispatcher = *SfxGetpApp()->GetDispatcher_Impl(); @@ -397,10 +397,9 @@ bool SfxManageStyleSheetPage::Execute_Impl( pItems[ nCount++ ] = nullptr; - sal_uInt16 nModi = pModifier ? *pModifier : 0; const SfxPoolItem* mpItem = rDispatcher.Execute( nId, SfxCallMode::SYNCHRON | SfxCallMode::RECORD | SfxCallMode::MODAL, - pItems, nModi ); + pItems ); if ( !mpItem ) return false; diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 2184b06067cf..ad6c3d261af9 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -1011,7 +1011,7 @@ IMPL_LINK_TYPED( SfxSplitWindow, TimerHdl, Timer*, pTimer, void) } -bool SfxSplitWindow::CursorIsOverRect( bool bForceAdding ) const +bool SfxSplitWindow::CursorIsOverRect() const { bool bVisible = IsVisible(); @@ -1019,15 +1019,6 @@ bool SfxSplitWindow::CursorIsOverRect( bool bForceAdding ) const Point aPos = pEmptyWin->GetParent()->OutputToScreenPixel( pEmptyWin->GetPosPixel() ); Size aSize = pEmptyWin->GetSizePixel(); - if ( bForceAdding ) - { - // Extend with +/- a few pixels, otherwise it is too nervous - aPos.X() -= nPixel; - aPos.Y() -= nPixel; - aSize.Width() += 2 * nPixel; - aSize.Height() += 2 * nPixel; - } - Rectangle aRect( aPos, aSize ); if ( bVisible ) diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index cdec405a15df..106b93d04c65 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -575,9 +575,9 @@ void SfxTabDialog::Start_Impl() ActivatePageHdl( m_pTabCtrl ); } -void SfxTabDialog::AddTabPage( sal_uInt16 nId, const OUString &rRiderText, bool bItemsOnDemand, sal_uInt16 nPos ) +void SfxTabDialog::AddTabPage( sal_uInt16 nId, const OUString &rRiderText, bool bItemsOnDemand ) { - AddTabPage( nId, rRiderText, nullptr, nullptr, bItemsOnDemand, nPos ); + AddTabPage( nId, rRiderText, nullptr, nullptr, bItemsOnDemand ); } /* @@ -588,15 +588,13 @@ sal_uInt16 SfxTabDialog::AddTabPage ( const OString &rName, // Page ID CreateTabPage pCreateFunc, // Pointer to the Factory Method - GetTabPageRanges pRangesFunc, // Pointer to the Method for quering + GetTabPageRanges pRangesFunc // Pointer to the Method for quering // Ranges onDemand - bool bItemsOnDemand // indicates whether the set of this page is - // requested when created ) { sal_uInt16 nId = m_pTabCtrl->GetPageId(rName); pImpl->aData.push_back( - new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) ); + new Data_Impl( nId, pCreateFunc, pRangesFunc, false/*bItemsOnDemand*/ ) ); return nId; } diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index e5a98ed994b9..a244622f1185 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -74,7 +74,7 @@ struct SfxObjectFactory_Impl }; -SfxFilterContainer* SfxObjectFactory::GetFilterContainer( bool /*bForceLoad*/ ) const +SfxFilterContainer* SfxObjectFactory::GetFilterContainer() const { return pImpl->pFilterContainer; } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 705d44244f83..a10bf5bc7cbd 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2666,7 +2666,7 @@ SfxMedium::GetInteractionHandler( bool bGetAlways ) } -void SfxMedium::SetFilter( const SfxFilter* pFilterP, bool /*bResetOrig*/ ) +void SfxMedium::SetFilter( const SfxFilter* pFilterP ) { pImp->m_pFilter = pFilterP; } @@ -2677,9 +2677,9 @@ const SfxFilter* SfxMedium::GetFilter() const } -const SfxFilter* SfxMedium::GetOrigFilter( bool bNotCurrent ) const +const SfxFilter* SfxMedium::GetOrigFilter() const { - return ( pImp->pOrigFilter || bNotCurrent ) ? pImp->pOrigFilter : pImp->m_pFilter; + return pImp->pOrigFilter ? pImp->pOrigFilter : pImp->m_pFilter; } diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index bcafad22c3ab..ac457c07381b 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -179,17 +179,11 @@ OUString SfxFilter::GetTypeFromStorage( const SotStorage& rStg ) } OUString SfxFilter::GetTypeFromStorage( - const uno::Reference<embed::XStorage>& xStorage, bool bTemplate, OUString* pFilterName ) + const uno::Reference<embed::XStorage>& xStorage, bool bTemplate ) throw ( beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception ) { SfxFilterMatcher aMatcher; - OUString aName; - if ( pFilterName ) - { - aName = *pFilterName; - pFilterName->clear(); - } css::uno::Reference< css::beans::XPropertySet > xProps( xStorage, css::uno::UNO_QUERY ); if ( xProps.is() ) @@ -211,25 +205,15 @@ OUString SfxFilter::GetTypeFromStorage( // template filters shouldn't be detected if not explicitly asked for nDont |= SfxFilterFlags::TEMPLATEPATH; - const SfxFilter* pFilter = nullptr; - if (!aName.isEmpty()) - // get preselected Filter if it matches the desired filter flags - pFilter = aMatcher.GetFilter4FilterName( aName, nMust, nDont ); - - if ( !pFilter || pFilter->GetFormat() != nClipId ) - { - // get filter from storage MediaType - pFilter = aMatcher.GetFilter4ClipBoardId( nClipId, nMust, nDont ); - if ( !pFilter ) - // template filter is asked for , but there isn't one; so at least the "normal" format should be detected - // or storage *is* a template, but bTemplate is not set - pFilter = aMatcher.GetFilter4ClipBoardId( nClipId ); - } + // get filter from storage MediaType + const SfxFilter* pFilter = aMatcher.GetFilter4ClipBoardId( nClipId, nMust, nDont ); + if ( !pFilter ) + // template filter is asked for , but there isn't one; so at least the "normal" format should be detected + // or storage *is* a template, but bTemplate is not set + pFilter = aMatcher.GetFilter4ClipBoardId( nClipId ); if ( pFilter ) { - if ( pFilterName ) - *pFilterName = pFilter->GetName(); return pFilter->GetTypeName(); } } diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index ca097d5136af..84f1ce5b1611 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -96,7 +96,7 @@ SfxMedium* DocumentInserter::CreateMedium() pMatcher = new SfxFilterMatcher(); const SfxFilter* pFilter = nullptr; - sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter, false ); + sal_uInt32 nError = pMatcher->DetectFilter( *pMedium, &pFilter ); if ( nError == ERRCODE_NONE && pFilter ) pMedium->SetFilter( pFilter ); else @@ -126,7 +126,7 @@ SfxMediumList* DocumentInserter::CreateMediumList() SfxFilterMatcher aMatcher( m_sDocFactory ); const SfxFilter* pFilter = nullptr; - sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter, false ); + sal_uInt32 nError = aMatcher.DetectFilter( *pMedium, &pFilter ); if ( nError == ERRCODE_NONE && pFilter ) pMedium->SetFilter( pFilter ); else diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 69a99d030bed..0592e28bd62b 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1218,11 +1218,9 @@ SfxDocumentTemplates::~SfxDocumentTemplates() pImp = nullptr; } -void SfxDocumentTemplates::Update( bool _bSmart ) +void SfxDocumentTemplates::Update( ) { - if ( !_bSmart // don't be smart - || ::svt::TemplateFolderCache( true ).needsUpdate() // update is really necessary - ) + if ( ::svt::TemplateFolderCache( true ).needsUpdate() ) // update is really necessary { if ( pImp->Construct() ) pImp->Rescan(); diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx index c0746480f33a..4ed074e08283 100644 --- a/sfx2/source/doc/frmdescr.cxx +++ b/sfx2/source/doc/frmdescr.cxx @@ -95,7 +95,7 @@ bool SfxFrameDescriptor::IsEditable() const return pImp->bEditable; } -SfxFrameDescriptor* SfxFrameDescriptor::Clone( bool bWithIds ) const +SfxFrameDescriptor* SfxFrameDescriptor::Clone() const { SfxFrameDescriptor *pFrame = new SfxFrameDescriptor; @@ -122,10 +122,7 @@ SfxFrameDescriptor* SfxFrameDescriptor::Clone( bool bWithIds ) const pFrame->pImp->pArgs->Put(*pImp->pArgs); } - if ( bWithIds ) - pFrame->nItemId = nItemId; - else - pFrame->nItemId = 0; + pFrame->nItemId = nItemId; return pFrame; } diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index b8fe4074acf1..6a291cbf2fa3 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -1439,7 +1439,7 @@ ErrCode SfxObjectShell::CallBasic( const OUString& rMacro, SfxApplication* pApp = SfxGetpApp(); if( pApp->GetName() != rBasic ) { - if ( !AdjustMacroMode( OUString() ) ) + if ( !AdjustMacroMode() ) return ERRCODE_IO_ACCESSDENIED; } @@ -1694,10 +1694,10 @@ void SfxObjectShell::Invalidate( sal_uInt16 nId ) Invalidate_Impl( pFrame->GetBindings(), nId ); } -bool SfxObjectShell::AdjustMacroMode( const OUString& /*rScriptType*/, bool bSuppressUI ) +bool SfxObjectShell::AdjustMacroMode() { uno::Reference< task::XInteractionHandler > xInteraction; - if ( pMedium && !bSuppressUI ) + if ( pMedium ) xInteraction = pMedium->GetInteractionHandler(); CheckForBrokenDocSignatures_Impl( xInteraction ); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 09172c26bba8..a3c1049e122c 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -1060,7 +1060,7 @@ SfxObjectShell* SfxObjectShell::CreateObject( const OUString& rServiceName, SfxO return nullptr; } -Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxItemSet& rSet, SfxFrame* pFrame ) +Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxItemSet& rSet ) { uno::Sequence < beans::PropertyValue > aProps; TransformItems( SID_OPENDOC, rSet, aProps ); @@ -1074,12 +1074,7 @@ Reference<lang::XComponent> SfxObjectShell::CreateAndLoadComponent( const SfxIte aTarget = pTargetItem->GetValue(); uno::Reference < frame::XComponentLoader > xLoader; - if ( pFrame ) - { - xLoader.set( pFrame->GetFrameInterface(), uno::UNO_QUERY ); - } - else - xLoader.set( frame::Desktop::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY ); + xLoader.set( frame::Desktop::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY ); Reference <lang::XComponent> xComp; try diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index 8e8cc0808d56..f25c14f081c4 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -817,9 +817,9 @@ void SfxOleSection::SetBoolValue( sal_Int32 nPropId, bool bValue ) SetProperty( SfxOlePropertyRef( new SfxOleBoolProperty( nPropId, bValue ) ) ); } -bool SfxOleSection::SetStringValue( sal_Int32 nPropId, const OUString& rValue, bool bSkipEmpty ) +bool SfxOleSection::SetStringValue( sal_Int32 nPropId, const OUString& rValue ) { - bool bInserted = !bSkipEmpty || !rValue.isEmpty(); + bool bInserted = !rValue.isEmpty(); if( bInserted ) SetProperty( SfxOlePropertyRef( new SfxOleString8Property( nPropId, maCodePageProp, rValue ) ) ); return bInserted; diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx index d0174b901df6..ffe70d30b4d4 100644 --- a/sfx2/source/doc/oleprops.hxx +++ b/sfx2/source/doc/oleprops.hxx @@ -301,7 +301,7 @@ public: void SetBoolValue( sal_Int32 nPropId, bool bValue ); /** Inserts a string property with the passed value. @return true = Property inserted; false = String was empty, property not inserted. */ - bool SetStringValue( sal_Int32 nPropId, const OUString& rValue, bool bSkipEmpty = false ); + bool SetStringValue( sal_Int32 nPropId, const OUString& rValue ); /** Inserts a time stamp property with the passed value. */ void SetFileTimeValue( sal_Int32 nPropId, const css::util::DateTime& rValue ); /** Inserts a date property with the passed value. */ diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index e510588ab1b5..e4d949dc7aea 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2350,7 +2350,7 @@ sal_Bool SAL_CALL SfxBaseModel::getAllowMacroExecution() throw (RuntimeException SfxModelGuard aGuard( *this ); if ( m_pData->m_pObjectShell ) - return m_pData->m_pObjectShell->AdjustMacroMode( OUString() ); + return m_pData->m_pObjectShell->AdjustMacroMode(); return sal_False; } diff --git a/sfx2/source/inc/splitwin.hxx b/sfx2/source/inc/splitwin.hxx index 2f3b8d65c984..4ef48c1f88b9 100644 --- a/sfx2/source/inc/splitwin.hxx +++ b/sfx2/source/inc/splitwin.hxx @@ -60,7 +60,7 @@ private: bool bNewLine=false ); DECL_LINK_TYPED( TimerHdl, Timer*, void ); - bool CursorIsOverRect( bool bForceAdding = false ) const; + bool CursorIsOverRect() const; void SetPinned_Impl( bool ); void SetFadeIn_Impl( bool ); void SaveConfig_Impl(); diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index fd8d4fafcdcc..007f3ec3a5e9 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -278,7 +278,7 @@ sal_uInt16 SfxFrame::GetChildFrameCount() const return pChildArr ? pChildArr->size() : 0; } -void SfxFrame::CancelTransfers( bool /*bCancelLoadEnv*/ ) +void SfxFrame::CancelTransfers() { if( !pImp->bInCancelTransfers ) { diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 5b1e61315799..b19470bf1583 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1114,11 +1114,11 @@ bool SfxViewFrame::Close() return true; } -void SfxViewFrame::DoActivate( bool bUI, SfxViewFrame* pOldFrame ) +void SfxViewFrame::DoActivate( bool bUI ) { SfxGetpApp(); - pDispatcher->DoActivate_Impl( bUI, pOldFrame ); + pDispatcher->DoActivate_Impl( bUI, nullptr ); // If this ViewFrame has got a parent and this is not a parent of the // old ViewFrames, it gets a ParentActivate. @@ -1127,8 +1127,7 @@ void SfxViewFrame::DoActivate( bool bUI, SfxViewFrame* pOldFrame ) SfxViewFrame *pFrame = GetParentViewFrame(); while ( pFrame ) { - if ( !pOldFrame || !pOldFrame->GetFrame().IsParent( &pFrame->GetFrame() ) ) - pFrame->pDispatcher->DoParentActivate_Impl(); + pFrame->pDispatcher->DoParentActivate_Impl(); pFrame = pFrame->GetParentViewFrame(); } } @@ -1707,13 +1706,13 @@ bool SfxViewFrame::IsVisible() const } -void SfxViewFrame::LockObjectShell_Impl( bool bLock ) +void SfxViewFrame::LockObjectShell_Impl() { - DBG_ASSERT( pImp->bObjLocked != bLock, "Wrong Locked status!" ); + DBG_ASSERT( !pImp->bObjLocked, "Wrong Locked status!" ); DBG_ASSERT( GetObjectShell(), "No Document!" ); - GetObjectShell()->OwnerLock(bLock); - pImp->bObjLocked = bLock; + GetObjectShell()->OwnerLock(true); + pImp->bObjLocked = true; } @@ -1914,9 +1913,9 @@ SfxViewFrame* SfxViewFrame::LoadDocument( SfxObjectShell& i_rDoc, const sal_uInt return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, Reference< XFrame >(), i_nViewId, false ); } -SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame, const sal_uInt16 i_nViewId ) +SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const Reference< XFrame >& i_rTargetFrame ) { - return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, i_nViewId, false ); + return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_rTargetFrame, 0, false ); } SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const SfxFrameItem* i_pFrameItem, const sal_uInt16 i_nViewId ) @@ -1924,7 +1923,7 @@ SfxViewFrame* SfxViewFrame::LoadDocumentIntoFrame( SfxObjectShell& i_rDoc, const return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, i_pFrameItem && i_pFrameItem->GetFrame() ? i_pFrameItem->GetFrame()->GetFrameInterface() : nullptr, i_nViewId, false ); } -SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest, const sal_uInt16 i_nViewId ) +SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const SfxRequest& i_rCreateDocRequest ) { const SfxUnoFrameItem* pFrameItem = i_rCreateDocRequest.GetArg<SfxUnoFrameItem>(SID_FILLFRAME); const SfxBoolItem* pHiddenItem = i_rCreateDocRequest.GetArg<SfxBoolItem>(SID_HIDDEN); @@ -1932,7 +1931,7 @@ SfxViewFrame* SfxViewFrame::DisplayNewDocument( SfxObjectShell& i_rDoc, const Sf return LoadViewIntoFrame_Impl_NoThrow( i_rDoc, pFrameItem ? pFrameItem->GetFrame() : nullptr, - i_nViewId, + 0, pHiddenItem && pHiddenItem->GetValue() ); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index db2f60f7d263..ea6518e6bf6c 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1403,7 +1403,7 @@ void SfxViewShell::ReadUserDataSequence ( const uno::Sequence < beans::PropertyV { } -void SfxViewShell::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >&, bool ) +void SfxViewShell::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& ) { } diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 7358b62270bb..7d5d1ea2f592 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -576,7 +576,7 @@ public: virtual void WriteUserData(OUString &, bool bBrowse = false) override; virtual void ReadUserData(const OUString &, bool bBrowse = false) override; virtual void ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; - virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >&, bool bBrowse ) override; + virtual void WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& ) override; void SetCursorAtTop( bool bFlag, bool bCenter = false ) { m_bTopCursor = bFlag; m_bCenterCursor = bCenter; } diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 20f09574fc73..78878741cc13 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1702,7 +1702,7 @@ void SwUiWriterTest::testTdf78742() SfxMedium aMedium(path, StreamMode::READ | StreamMode::SHARE_DENYWRITE); SfxFilterMatcher aMatcher(OUString("com.sun.star.text.TextDocument")); const SfxFilter* pFilter = nullptr; - sal_uInt32 filter = aMatcher.DetectFilter(aMedium, &pFilter, true); + sal_uInt32 filter = aMatcher.DetectFilter(aMedium, &pFilter); CPPUNIT_ASSERT_EQUAL(ERRCODE_IO_ABORT, filter); //it should not return any Filter CPPUNIT_ASSERT(!pFilter); @@ -1710,7 +1710,7 @@ void SwUiWriterTest::testTdf78742() SfxMedium aMedium2(path, StreamMode::READ | StreamMode::SHARE_DENYWRITE); SfxFilterMatcher aMatcher2; const SfxFilter* pFilter2 = nullptr; - sal_uInt32 filter2 = aMatcher2.DetectFilter(aMedium2, &pFilter2, true); + sal_uInt32 filter2 = aMatcher2.DetectFilter(aMedium2, &pFilter2); CPPUNIT_ASSERT_EQUAL(ERRCODE_CLASS_NONE, filter2); //Filter should be returned with proper Name CPPUNIT_ASSERT_EQUAL(OUString("calc8"), pFilter2->GetFilterName()); @@ -1719,7 +1719,7 @@ void SwUiWriterTest::testTdf78742() SfxMedium aMedium3(path2, StreamMode::READ | StreamMode::SHARE_DENYWRITE); SfxFilterMatcher aMatcher3(OUString("com.sun.star.text.TextDocument")); const SfxFilter* pFilter3 = nullptr; - sal_uInt32 filter3 = aMatcher3.DetectFilter(aMedium3, &pFilter3, true); + sal_uInt32 filter3 = aMatcher3.DetectFilter(aMedium3, &pFilter3); CPPUNIT_ASSERT_EQUAL(ERRCODE_CLASS_NONE, filter3); //Filter should be returned with proper Name CPPUNIT_ASSERT_EQUAL(OUString("writer8"), pFilter3->GetFilterName()); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 0138718db64e..aa57f45b1da6 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1395,12 +1395,12 @@ sal_uLong SwDocShell::LoadStylesFromFile( const OUString& rURL, // search for filter in WebDocShell, too SfxMedium aMed( rURL, STREAM_STD_READ ); const SfxFilter* pFlt = nullptr; - aMatcher.DetectFilter( aMed, &pFlt, false ); + aMatcher.DetectFilter( aMed, &pFlt ); if(!pFlt) { OUString sWebFactory(OUString::createFromAscii(SwWebDocShell::Factory().GetShortName())); SfxFilterMatcher aWebMatcher( sWebFactory ); - aWebMatcher.DetectFilter( aMed, &pFlt, false ); + aWebMatcher.DetectFilter( aMed, &pFlt ); } // --> OD #i117339# - trigger import only for own formats bool bImport( false ); @@ -1569,7 +1569,7 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh, xMed->GetItemSet()->Put( SfxStringItem( SID_PASSWORD, rPasswd )); if( !pSfxFlt ) - aMatcher.DetectFilter( *xMed, &pSfxFlt, false ); + aMatcher.DetectFilter( *xMed, &pSfxFlt ); if( pSfxFlt ) { diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index 81ce9822eb14..a4addf97ba21 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -1452,7 +1452,7 @@ void SwView::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue > } } -void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSequence, bool bBrowse ) +void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSequence ) { const SwRect& rRect = m_pWrtShell->GetCharRect(); const Rectangle& rVis = GetVisArea(); @@ -1472,9 +1472,9 @@ void SwView::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >& rSe aVector.push_back(comphelper::makePropertyValue("VisibleTop", convertTwipToMm100 ( rVis.Top() ))); - aVector.push_back(comphelper::makePropertyValue("VisibleRight", convertTwipToMm100 ( bBrowse ? LONG_MIN : rVis.Right() ))); + aVector.push_back(comphelper::makePropertyValue("VisibleRight", convertTwipToMm100 ( rVis.Right() ))); - aVector.push_back(comphelper::makePropertyValue("VisibleBottom", convertTwipToMm100 ( bBrowse ? LONG_MIN : rVis.Bottom() ))); + aVector.push_back(comphelper::makePropertyValue("VisibleBottom", convertTwipToMm100 ( rVis.Bottom() ))); const sal_Int16 nZoomType = static_cast< sal_Int16 >(m_pWrtShell->GetViewOptions()->GetZoomType()); aVector.push_back(comphelper::makePropertyValue("ZoomType", nZoomType)); |