diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-08 09:23:17 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-08 09:23:40 +0200 |
commit | 579426f798580093214fa8a7cc648318642c7e12 (patch) | |
tree | 1e4b543a9010134e384d43d2bbbd1a97e3f3725b /sw | |
parent | 847e004e65ec3c35acff607588d15cd75a84f121 (diff) |
loplugin:constantparam in sw
Change-Id: Ic49d1c3c7b57fb213964ddc21b0f774c762aad94
Diffstat (limited to 'sw')
86 files changed, 182 insertions, 317 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index 1572e218288e..0a1087ee4884 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -175,7 +175,7 @@ public: const SfxItemSet* pGrfAttrSet, SwFrameFormat*) = 0; virtual SwFlyFrameFormat* InsertOLE(const SwPaM &rRg, const OUString& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrameFormat*) = 0; + const SfxItemSet* pGrfAttrSet) = 0; /** Split a node at rPos (implemented only for TextNode). */ diff --git a/sw/inc/IDocumentFieldsAccess.hxx b/sw/inc/IDocumentFieldsAccess.hxx index f9b116b716c2..f73e51c81d8e 100644 --- a/sw/inc/IDocumentFieldsAccess.hxx +++ b/sw/inc/IDocumentFieldsAccess.hxx @@ -88,7 +88,7 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } } */ virtual bool UpdateField(SwTextField * rDstFormatField, SwField & rSrcField, SwMsgPoolItem * pMsgHint, bool bUpdateTableFields) = 0; - virtual void UpdateRefFields(SfxPoolItem* pHt) = 0; + virtual void UpdateRefFields() = 0; virtual void UpdateTableFields(SfxPoolItem* pHt) = 0; diff --git a/sw/inc/SwAppletImpl.hxx b/sw/inc/SwAppletImpl.hxx index 9fbeb45c8ab2..0d6d7d62fd0f 100644 --- a/sw/inc/SwAppletImpl.hxx +++ b/sw/inc/SwAppletImpl.hxx @@ -50,7 +50,7 @@ class SwApplet_Impl public: static SwHtmlOptType GetOptionType( const OUString& rName, bool bApplet ); - SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ); + SwApplet_Impl( SfxItemPool& rPool ); SwApplet_Impl( SfxItemSet& rSet ): aItemSet ( rSet) {} ~SwApplet_Impl(); void CreateApplet( const OUString& rCode, const OUString& rName, diff --git a/sw/inc/SwUndoField.hxx b/sw/inc/SwUndoField.hxx index 541cb54e70b9..66ad76e992d4 100644 --- a/sw/inc/SwUndoField.hxx +++ b/sw/inc/SwUndoField.hxx @@ -52,8 +52,7 @@ class SwUndoFieldFromDoc : public SwUndoField public: SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & aOldField, const SwField & aNewField, - SwMsgPoolItem * pHint, bool bUpdate, - SwUndoId nId = UNDO_FIELD ); + SwMsgPoolItem * pHint, bool bUpdate); virtual ~SwUndoFieldFromDoc(); diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 20eb7c903e77..550f1aafd0de 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -625,7 +625,6 @@ public: SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet = nullptr, SwFrameFormat* = nullptr ); bool FinishOLEObj(); ///< Shutdown server. diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx index 76bdff5aa1e0..585130cdcd19 100644 --- a/sw/inc/ftninfo.hxx +++ b/sw/inc/ftninfo.hxx @@ -100,7 +100,7 @@ public: bool operator==( const SwFootnoteInfo &rInf ) const; - SwFootnoteInfo(SwTextFormatColl* pTextColl = nullptr); + SwFootnoteInfo(); SwFootnoteInfo(const SwFootnoteInfo&); }; diff --git a/sw/inc/grfatr.hxx b/sw/inc/grfatr.hxx index 90838c359647..f4a4ad137062 100644 --- a/sw/inc/grfatr.hxx +++ b/sw/inc/grfatr.hxx @@ -94,8 +94,8 @@ class SwRotationGrf : public SfxUInt16Item { Size aUnrotatedSize; public: - SwRotationGrf( sal_Int16 nVal = 0 ) - : SfxUInt16Item( RES_GRFATR_ROTATION, nVal ) + SwRotationGrf() + : SfxUInt16Item( RES_GRFATR_ROTATION, 0 ) {} SwRotationGrf( sal_Int16 nVal, const Size& rSz ) : SfxUInt16Item( RES_GRFATR_ROTATION, nVal ), aUnrotatedSize( rSz ) diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index 6394db3a5290..2734d19a1ea2 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -126,7 +126,8 @@ public: void SetGraphic(const Graphic& rGraphic, const OUString& rLink); /// wrappers for non-const calls at GraphicObject - void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData, const GraphicAttr* pAttr = nullptr, GraphicManagerDrawFlags nFlags = GraphicManagerDrawFlags::STANDARD, OutputDevice* pFirstFrameOutDev = nullptr) { maGrfObj.StartAnimation(pOut, rPt, rSz, nExtraData, pAttr, nFlags, pFirstFrameOutDev); } + void StartGraphicAnimation(OutputDevice* pOut, const Point& rPt, const Size& rSz, long nExtraData, OutputDevice* pFirstFrameOutDev = nullptr) + { maGrfObj.StartAnimation(pOut, rPt, rSz, nExtraData, nullptr, GraphicManagerDrawFlags::STANDARD, pFirstFrameOutDev); } void StopGraphicAnimation(OutputDevice* pOut, long nExtraData = 0) { maGrfObj.StopAnimation(pOut, nExtraData); } virtual Size GetTwipSize() const override; diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index e4bf2bf5a3c5..9642a7e0dffa 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -114,7 +114,6 @@ public: virtual const SwFormatField& GetFormatField() const = 0; virtual const SfxBroadcaster* GetBroadCaster() const = 0; virtual VclPtr<sw::sidebarwindows::SwSidebarWin> GetSidebarWindow( SwEditWin& rEditWin, - WinBits nBits, SwPostItMgr& aMgr) = 0; }; @@ -145,7 +144,6 @@ public: } virtual VclPtr<sw::sidebarwindows::SwSidebarWin> GetSidebarWindow( SwEditWin& rEditWin, - WinBits nBits, SwPostItMgr& aMgr ) override; private: diff --git a/sw/inc/redline.hxx b/sw/inc/redline.hxx index d1dbd528c4d8..8a9a1f0433c6 100644 --- a/sw/inc/redline.hxx +++ b/sw/inc/redline.hxx @@ -119,8 +119,7 @@ public: // For sw3io: pNext/pExtraData are taken over. SwRedlineData( RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT, - const OUString& rCmnt, SwRedlineData* pNxt, - SwRedlineExtraData* pExtraData = nullptr ); + const OUString& rCmnt, SwRedlineData* pNxt ); ~SwRedlineData(); @@ -166,7 +165,7 @@ public: } // ExtraData gets copied, the pointer is therefore not taken over by - // the RedlilneObject + // the RedlineObject void SetExtraData( const SwRedlineExtraData* pData ); const SwRedlineExtraData* GetExtraData() const { return pExtraData; } diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index e601d71f5586..85ae6b45c2b1 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -121,13 +121,12 @@ public: sal_Int32 nWordStart; sal_Int32 nWordLen; - SwInterHyphInfo( const Point &rCursorPos, sal_Int32 nStartPos = 0, - sal_Int32 nLength = SAL_MAX_INT32 ) + SwInterHyphInfo( const Point &rCursorPos ) : aCursorPos(rCursorPos) , bNoLang(false) , bCheck(false) - , nStart(nStartPos) - , nEnd(nLength == SAL_MAX_INT32 ? SAL_MAX_INT32 : nStartPos + nLength) + , nStart(0) + , nEnd(SAL_MAX_INT32) , nWordStart(0), nWordLen(0) { } diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index f392f3293a00..a42b520adc76 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -333,14 +333,14 @@ public: virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg() = 0; virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( SwDocShell& rDocSh, SvStream* pStream ) = 0; - virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) = 0; + virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq ) = 0; virtual AbstractSwBreakDlg * CreateSwBreakDlg(vcl::Window *pParent, SwWrtShell &rSh) = 0; virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) = 0; virtual SfxAbstractTabDialog * CreateSwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) = 0; virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) = 0; - virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV,int nResId) = 0; + virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV) = 0; virtual AbstractSwInsertDBColAutoPilot* CreateSwInsertDBColAutoPilot(SwView& rView, css::uno::Reference< css::sdbc::XDataSource> rxSource, @@ -360,7 +360,6 @@ public: virtual SfxAbstractTabDialog* CreateSwParaDlg ( vcl::Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet, - const OUString *pCollName, bool bDraw, const OString& sDefPage = OString() ) = 0; @@ -372,15 +371,15 @@ public: virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell, bool bSetAutoFormat = true, const SwTableAutoFormat* pSelFormat = nullptr ) = 0; - virtual SfxAbstractDialog * CreateSwBorderDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) = 0; - virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, int nResId ) = 0; + virtual SfxAbstractDialog * CreateSwBorderDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) = 0; + virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) = 0; virtual VclAbstractDialog * CreateSwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc) = 0; virtual SfxAbstractTabDialog* CreateSwTableTabDlg(vcl::Window* pParent, SfxItemPool& Pool, const SfxItemSet* pItemSet, SwWrtShell* pSh) = 0; virtual AbstractSwFieldDlg * CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) = 0; - virtual SfxAbstractDialog* CreateSwFieldEditDlg ( SwView& rVw, int nResId ) = 0; + virtual SfxAbstractDialog* CreateSwFieldEditDlg ( SwView& rVw ) = 0; virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg(vcl::Window* pParent, css::uno::Reference< css::container::XNamed > & xNamed, css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0; @@ -391,8 +390,7 @@ public: SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame = true, - const OString& sDefPage = OString(), - const OUString* pFormatStr = nullptr) = 0; + const OString& sDefPage = OString()) = 0; /// @param nSlot /// Identifies optional Slot by which the creation of the Template (Style) dialog is triggered. /// Currently used, if nRegion == SfxStyleFamily::Page in order to activate certain dialog pane @@ -414,7 +412,7 @@ public: virtual AbstractInsTableDlg* CreateInsTableDlg(SwView& rView) = 0; virtual AbstractJavaEditDialog* CreateJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) = 0; - virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId, + virtual AbstractMailMergeDlg* CreateMailMergeDlg( vcl::Window* pParent, SwWrtShell& rSh, const OUString& rSourceName, const OUString& rTableName, @@ -430,7 +428,7 @@ public: virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, - SwTOXBase* pCurTOX, sal_uInt16 nToxType, + SwTOXBase* pCurTOX, bool bGlobal) = 0; virtual AbstractEditRegionDlg* CreateEditRegionDlg(vcl::Window* pParent, SwWrtShell& rWrtSh) = 0; virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 0e9d7d351be8..b8c269a2ddc9 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -271,7 +271,7 @@ protected: virtual bool IsSelOvrCheck(int eFlags) override; public: - SwTableCursor( const SwPosition &rPos, SwPaM* pRing = nullptr ); + SwTableCursor( const SwPosition &rPos ); SwTableCursor( SwTableCursor& ); virtual ~SwTableCursor(); diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index 303b1dc18354..619bd8f08920 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -128,8 +128,7 @@ public: }; - // single argument ctors shall be explicit. - explicit SwTable( SwTableFormat* ); + explicit SwTable(); virtual ~SwTable(); // @@@ public copy ctor, but no copy assignment? diff --git a/sw/inc/txatritr.hxx b/sw/inc/txatritr.hxx index 471c668fe348..665df194f29d 100644 --- a/sw/inc/txatritr.hxx +++ b/sw/inc/txatritr.hxx @@ -74,9 +74,8 @@ public: class SwLanguageIterator : public SwTextAttrIterator { public: - SwLanguageIterator( const SwTextNode& rTextNode, sal_Int32 nStart = 0, - sal_uInt16 nWhich = RES_CHRATR_LANGUAGE ) - : SwTextAttrIterator( rTextNode, nWhich, nStart ) + SwLanguageIterator( const SwTextNode& rTextNode, sal_Int32 nStart = 0 ) + : SwTextAttrIterator( rTextNode, RES_CHRATR_LANGUAGE, nStart ) {} sal_uInt16 GetLanguage() const diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index 9ee9261de581..a06fd71bdf77 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -39,7 +39,7 @@ private: bool m_bSkipOverProtectSections : 1; public: - SwUnoCursor( const SwPosition &rPos, SwPaM* pRing = nullptr ); + SwUnoCursor( const SwPosition &rPos ); virtual ~SwUnoCursor(); protected: diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx index dff4f1f8aee0..ad80037d3797 100644 --- a/sw/inc/unosett.hxx +++ b/sw/inc/unosett.hxx @@ -263,7 +263,7 @@ class SwXTextColumns : public cppu::WeakAggImplHelper4 protected: virtual ~SwXTextColumns(); public: - SwXTextColumns(sal_uInt16 nColCount); + SwXTextColumns(); SwXTextColumns(const SwFormatCol& rFormatCol); static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId(); diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 76d1a341c6ec..636e917ef922 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -621,8 +621,7 @@ public: //public fuer D&D int InsertGraphic( const OUString &rPath, const OUString &rFilter, - bool bLink, GraphicFilter *pFlt, - Graphic* pPreviewGrf = nullptr ); + bool bLink, GraphicFilter *pFlt ); void ExecuteScan( SfxRequest& rReq ); diff --git a/sw/inc/wdocsh.hxx b/sw/inc/wdocsh.hxx index 286c16ddade0..3e0cf53aecea 100644 --- a/sw/inc/wdocsh.hxx +++ b/sw/inc/wdocsh.hxx @@ -35,7 +35,7 @@ private: static void InitInterface_Impl(); public: - SwWebDocShell(SfxObjectCreateMode eMode = SfxObjectCreateMode::EMBEDDED); + SwWebDocShell(); virtual ~SwWebDocShell(); virtual void FillClass( SvGlobalName * pClassName, diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index c3def6d4b867..e7853e3e45c4 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -528,7 +528,7 @@ bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext ) ( IsReadOnlyAvailable() || !pCFrame->IsProtected() )) { SwNodeIndex aNdIndex( *pTextNd ); // UNIX needs this object - SetGetExpField aCmp( aNdIndex, *pTextTOX, nullptr ); + SetGetExpField aCmp( aNdIndex, *pTextTOX ); aCmp.SetBodyPos( *pCFrame ); if( bNext ? ( aCurGEF < aCmp && aCmp < aFndGEF ) diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 3dbb7e223b26..56dc9a0a88df 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -2108,8 +2108,8 @@ void SwCursor::RestoreSavePos() } } -SwTableCursor::SwTableCursor( const SwPosition &rPos, SwPaM* pRing ) - : SwCursor( rPos, pRing ) +SwTableCursor::SwTableCursor( const SwPosition &rPos ) + : SwCursor( rPos, nullptr ) { m_bParked = false; m_bChanged = false; diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index c3fce7c047e4..47d61ba6d5d6 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -2673,11 +2673,9 @@ SwFlyFrameFormat* DocumentContentOperationsManager::Insert(const SwPaM &rRg, con SwFlyFrameFormat* DocumentContentOperationsManager::InsertOLE(const SwPaM &rRg, const OUString& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, - SwFrameFormat* pFrameFormat ) + const SfxItemSet* pGrfAttrSet) { - if( !pFrameFormat ) - pFrameFormat = m_rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_OLE ); + SwFrameFormat* pFrameFormat = m_rDoc.getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_OLE ); return InsNoTextNode( *rRg.GetPoint(), m_rDoc.GetNodes().MakeOLENode( diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 7b7226dab204..c4062314ac00 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -375,7 +375,7 @@ void DocumentFieldsManager::UpdateFields( bool bCloseDB ) UpdateTableFields(nullptr); // References - UpdateRefFields(nullptr); + UpdateRefFields(); if( bCloseDB ) { #if HAVE_FEATURE_DBCONNECTIVITY @@ -561,11 +561,11 @@ bool DocumentFieldsManager::UpdateField(SwTextField * pDstTextField, SwField & r } /// Update reference and table fields -void DocumentFieldsManager::UpdateRefFields( SfxPoolItem* pHt ) +void DocumentFieldsManager::UpdateRefFields() { for( auto pFieldType : *mpFieldTypes ) if( RES_GETREFFLD == pFieldType->Which() ) - pFieldType->ModifyNotification( nullptr, pHt ); + pFieldType->ModifyNotification( nullptr, nullptr ); } void DocumentFieldsManager::UpdateTableFields( SfxPoolItem* pHt ) @@ -835,7 +835,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp if( mpUpdateFields->GetSortLst()->empty() ) { if( bUpdRefFields ) - UpdateRefFields(nullptr); + UpdateRefFields(); mpUpdateFields->SetInUpdateFields( bOldInUpdateFields ); mpUpdateFields->SetFieldsDirty( false ); @@ -1156,7 +1156,7 @@ void DocumentFieldsManager::UpdateExpFields( SwTextField* pUpdateField, bool bUp // update reference fields if( bUpdRefFields ) - UpdateRefFields(nullptr); + UpdateRefFields(); mpUpdateFields->SetInUpdateFields( bOldInUpdateFields ); mpUpdateFields->SetFieldsDirty( false ); diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx index 1a0fa08353e9..0a38024bd440 100644 --- a/sw/source/core/doc/DocumentTimerManager.cxx +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -152,7 +152,7 @@ IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Idle*, pIdle, void ) m_rDoc.getIDocumentFieldsAccess().GetSysFieldType( RES_CHAPTERFLD )->ModifyNotification( nullptr, nullptr ); // ChapterField m_rDoc.getIDocumentFieldsAccess().UpdateExpFields( nullptr, false ); // Updates ExpressionFields m_rDoc.getIDocumentFieldsAccess().UpdateTableFields(nullptr); // Tables - m_rDoc.getIDocumentFieldsAccess().UpdateRefFields(nullptr); // References + m_rDoc.getIDocumentFieldsAccess().UpdateRefFields(); // References pTmpRoot->EndAllAction(); diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 26ba49bcb908..9bd4f5834771 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -84,7 +84,7 @@ class SwAutoCompleteString #endif SwDocPtrVector aSourceDocs; public: - SwAutoCompleteString(const OUString& rStr, sal_Int32 nPos, sal_Int32 nLen); + SwAutoCompleteString(const OUString& rStr, sal_Int32 nLen); virtual ~SwAutoCompleteString(); void AddDocument(const SwDoc& rDoc); @@ -176,8 +176,8 @@ void SwAutoCompleteWord_Impl::RemoveDocument(const SwDoc& rDoc) } SwAutoCompleteString::SwAutoCompleteString( - const OUString& rStr, sal_Int32 const nPos, sal_Int32 const nLen) - : editeng::IAutoCompleteString(rStr.copy(nPos, nLen)) + const OUString& rStr, sal_Int32 const nLen) + : editeng::IAutoCompleteString(rStr.copy(0, nLen)) { #if OSL_DEBUG_LEVEL > 0 ++nSwAutoCompleteStringCount; @@ -255,7 +255,7 @@ bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc ) if( !bLockWordLst && nWrdLen >= nMinWrdLen ) { - SwAutoCompleteString* pNew = new SwAutoCompleteString( aNewWord, 0, nWrdLen ); + SwAutoCompleteString* pNew = new SwAutoCompleteString( aNewWord, nWrdLen ); pNew->AddDocument(rDoc); std::pair<editeng::SortedAutoCompleteStrings::const_iterator, bool> aInsPair = m_WordList.insert(pNew); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 364a539efc6f..6aea833707c9 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -502,8 +502,8 @@ void SwDoc::ChgDBData(const SwDBData& rNewData) struct PostItField_ : public SetGetExpField { - PostItField_( const SwNodeIndex& rNdIdx, const SwTextField* pField, const SwIndex* pIdx = nullptr ) - : SetGetExpField( rNdIdx, pField, pIdx ) {} + PostItField_( const SwNodeIndex& rNdIdx, const SwTextField* pField ) + : SetGetExpField( rNdIdx, pField, nullptr ) {} sal_uInt16 GetPageNo( const StringRangeEnumerator &rRangeEnum, const std::set< sal_Int32 > &rPossiblePages, @@ -1740,7 +1740,7 @@ void SwDoc::ChkCondColls() { SwTextFormatColl *pColl = (*mpTextFormatCollTable)[n]; if (RES_CONDTXTFMTCOLL == pColl->Which()) - pColl->CallSwClientNotify( SwAttrHint(RES_CONDTXTFMTCOLL) ); + pColl->CallSwClientNotify( SwAttrHint() ); } } diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index a598e3431866..eeab46f4b9e6 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1666,7 +1666,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) if( pTmp ) { SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_DELETE, nAuthor, aTimeStamp, - OUString(), nullptr, nullptr ); + OUString(), nullptr ); do { // #i65201#: Expand again, see comment above. if( pTmp->GetPoint()->nContent == 0 ) @@ -1718,7 +1718,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) } } while( pInsRing != ( pTmp = pTmp->GetNext()) ); SwRedlineData aRedlnData( nsRedlineType_t::REDLINE_INSERT, nAuthor, aTimeStamp, - OUString(), nullptr, nullptr ); + OUString(), nullptr ); // combine consecutive if( pTmp->GetNext() != pInsRing ) diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index d450dcd5d647..9282e0100080 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -85,15 +85,12 @@ SetGetExpField::SetGetExpField( } SetGetExpField::SetGetExpField( const SwNodeIndex& rNdIdx, - const SwTextINetFormat& rINet, const SwIndex* pIdx ) + const SwTextINetFormat& rINet ) { eSetGetExpFieldType = TEXTINET; CNTNT.pTextINet = &rINet; nNode = rNdIdx.GetIndex(); - if( pIdx ) - nContent = pIdx->GetIndex(); - else - nContent = rINet.GetStart(); + nContent = rINet.GetStart(); } // Extension for Sections: @@ -117,41 +114,29 @@ SetGetExpField::SetGetExpField( const SwSectionNode& rSectNd, } } -SetGetExpField::SetGetExpField( const SwTableBox& rTBox, const SwPosition* pPos ) +SetGetExpField::SetGetExpField( const SwTableBox& rTBox ) { eSetGetExpFieldType = TABLEBOX; CNTNT.pTBox = &rTBox; - if( pPos ) + nNode = 0; + nContent = 0; + if( rTBox.GetSttNd() ) { - nNode = pPos->nNode.GetIndex(); - nContent = pPos->nContent.GetIndex(); - } - else - { - nNode = 0; - nContent = 0; - if( rTBox.GetSttNd() ) - { - SwNodeIndex aIdx( *rTBox.GetSttNd() ); - const SwContentNode* pNd = aIdx.GetNode().GetNodes().GoNext( &aIdx ); - if( pNd ) - nNode = pNd->GetIndex(); - } + SwNodeIndex aIdx( *rTBox.GetSttNd() ); + const SwContentNode* pNd = aIdx.GetNode().GetNodes().GoNext( &aIdx ); + if( pNd ) + nNode = pNd->GetIndex(); } } SetGetExpField::SetGetExpField( const SwNodeIndex& rNdIdx, - const SwTextTOXMark& rTOX, - const SwIndex* pIdx ) + const SwTextTOXMark& rTOX ) { eSetGetExpFieldType = TEXTTOXMARK; CNTNT.pTextTOX = &rTOX; nNode = rNdIdx.GetIndex(); - if( pIdx ) - nContent = pIdx->GetIndex(); - else - nContent = rTOX.GetStart(); + nContent = rTOX.GetStart(); } SetGetExpField::SetGetExpField( const SwPosition& rPos ) diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 807a972305c7..522a90839c5c 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -239,8 +239,8 @@ SwFootnoteInfo::SwFootnoteInfo(const SwFootnoteInfo& rInfo) : m_bEndNote = false; } -SwFootnoteInfo::SwFootnoteInfo(SwTextFormatColl *pFormat) : - SwEndNoteInfo( pFormat ), +SwFootnoteInfo::SwFootnoteInfo() : + SwEndNoteInfo( nullptr ), ePos( FTNPOS_PAGE ), eNum( FTNNUM_DOC ) { @@ -314,7 +314,7 @@ void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) // #i81002# no update during loading if ( !IsInReading() ) { - getIDocumentFieldsAccess().UpdateRefFields(nullptr); + getIDocumentFieldsAccess().UpdateRefFields(); } getIDocumentState().SetModified(); } @@ -382,7 +382,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) // #i81002# no update during loading if ( !IsInReading() ) { - getIDocumentFieldsAccess().UpdateRefFields(nullptr); + getIDocumentFieldsAccess().UpdateRefFields(); } getIDocumentState().SetModified(); } diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 48bf288ac947..5f258a43e606 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -860,8 +860,8 @@ SwRedlineData::SwRedlineData( // For sw3io: We now own pNext! SwRedlineData::SwRedlineData(RedlineType_t eT, sal_uInt16 nAut, const DateTime& rDT, - const OUString& rCmnt, SwRedlineData *pNxt, SwRedlineExtraData* pData) - : pNext(pNxt), pExtraData(pData), sComment(rCmnt), aStamp(rDT), + const OUString& rCmnt, SwRedlineData *pNxt) + : pNext(pNxt), pExtraData(nullptr), sComment(rCmnt), aStamp(rDT), eType(eT), nAuthor(nAut), nSeqNo(0) { } diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 5ac636757cf3..480695333331 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -691,7 +691,7 @@ static const SwTextNode* lcl_FindChapterNode( const SwNode& rNd, sal_uInt8 nLvl // then find the "Anchor" (Body) position Point aPt; SwNode2Layout aNode2Layout( *pNd, pNd->GetIndex() ); - const SwFrame* pFrame = aNode2Layout.GetFrame( &aPt, nullptr ); + const SwFrame* pFrame = aNode2Layout.GetFrame( &aPt ); if( pFrame ) { diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 08517a1a7694..6eb7bb4398b6 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -944,7 +944,7 @@ void SwNoTextFrame::PaintPicture( vcl::RenderContext* pOut, const SwRect &rGrfAr pGrfNd->StartGraphicAnimation(pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), sal_IntPtr(this), - nullptr, GraphicManagerDrawFlags::STANDARD, pVout ); + pVout ); } else { diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index 1b21c1b626a2..e0f13cc007cc 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -1371,8 +1371,8 @@ struct InsULPara InsULPara( SwTableNode* pTNd, SwTableBox* pLeft, - SwTableLine* pLine=nullptr, SwTableBox* pBox=nullptr ) - : pTableNd( pTNd ), pInsLine( pLine ), pInsBox( pBox ), + SwTableLine* pLine=nullptr ) + : pTableNd( pTNd ), pInsLine( pLine ), pInsBox( nullptr ), pLeftBox( pLeft ) { bUL_LR = true; bUL = true; } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 1c1d2ac53b4d..1c928728ec75 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -2343,7 +2343,7 @@ sal_uInt16 SwDoc::MergeTable( SwPaM& rPam ) SwTableNode::SwTableNode( const SwNodeIndex& rIdx ) : SwStartNode( rIdx, ND_TABLENODE ) { - m_pTable = new SwTable( nullptr ); + m_pTable = new SwTable; } SwTableNode::~SwTableNode() diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx index 18c01ee16ed0..4a829a33a94f 100644 --- a/sw/source/core/docnode/node2lay.cxx +++ b/sw/source/core/docnode/node2lay.cxx @@ -453,10 +453,9 @@ SwNode2Layout::~SwNode2Layout() { } -SwFrame* SwNode2Layout::GetFrame( const Point* pDocPos, - const SwPosition *pPos ) const +SwFrame* SwNode2Layout::GetFrame( const Point* pDocPos ) const { - return pImpl->GetFrame( pDocPos, pPos ); + return pImpl->GetFrame( pDocPos, nullptr ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index b44a2636178a..0e1065d479ed 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -72,8 +72,8 @@ class SwIntrnlSectRefLink : public SwBaseLink { SwSectionFormat& rSectFormat; public: - SwIntrnlSectRefLink( SwSectionFormat& rFormat, SfxLinkUpdateMode nUpdateType, SotClipboardFormatId nFormat ) - : SwBaseLink( nUpdateType, nFormat ), + SwIntrnlSectRefLink( SwSectionFormat& rFormat, SfxLinkUpdateMode nUpdateType ) + : SwBaseLink( nUpdateType, SotClipboardFormatId::RTF ), rSectFormat( rFormat ) {} @@ -1506,7 +1506,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) if (!m_RefLink.Is()) { // create BaseLink - m_RefLink = new SwIntrnlSectRefLink( *pFormat, nUpdateType, SotClipboardFormatId::RTF ); + m_RefLink = new SwIntrnlSectRefLink( *pFormat, nUpdateType ); } else { diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 68f82c3c7f73..42f5757e2e70 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -145,10 +145,9 @@ bool SwAnnotationItem::UseElement() VclPtr<sw::sidebarwindows::SwSidebarWin> SwAnnotationItem::GetSidebarWindow( SwEditWin& rEditWin, - WinBits nBits, SwPostItMgr& aMgr) { - return VclPtr<sw::annotation::SwAnnotationWin>::Create( rEditWin, nBits, + return VclPtr<sw::annotation::SwAnnotationWin>::Create( rEditWin, WB_DIALOGCONTROL, aMgr, 0, *this, &mrFormatField ); diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index d05c562cd5f5..b10233f058f4 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -851,7 +851,6 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrameFormat* pFrameFormat ) { SwFlyFrameFormat* pFormat = nullptr; @@ -860,7 +859,7 @@ SwFlyFrameFormat* SwFEShell::InsertObject( const svt::EmbeddedObjectRef& xObj, for(SwPaM& rPaM : GetCursor()->GetRingContainer()) { pFormat = GetDoc()->getIDocumentContentOperations().Insert(rPaM, xObj, - pFlyAttrSet, pGrfAttrSet, pFrameFormat ); + pFlyAttrSet, nullptr, pFrameFormat ); OSL_ENSURE( pFormat, "Doc->getIDocumentContentOperations().Insert(notxt) failed." ); } diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx index 6fade41664d8..130546f3ada9 100644 --- a/sw/source/core/inc/DocumentContentOperationsManager.hxx +++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx @@ -77,7 +77,7 @@ public: const SfxItemSet* pGrfAttrSet, SwFrameFormat*) override; SwFlyFrameFormat* InsertOLE(const SwPaM &rRg, const OUString& rObjName, sal_Int64 nAspect, const SfxItemSet* pFlyAttrSet, - const SfxItemSet* pGrfAttrSet, SwFrameFormat*) override; + const SfxItemSet* pGrfAttrSet) override; bool SplitNode(const SwPosition &rPos, bool bChkTableStart) override; diff --git a/sw/source/core/inc/DocumentFieldsManager.hxx b/sw/source/core/inc/DocumentFieldsManager.hxx index a5facc69392d..fa8d7979a012 100644 --- a/sw/source/core/inc/DocumentFieldsManager.hxx +++ b/sw/source/core/inc/DocumentFieldsManager.hxx @@ -43,7 +43,7 @@ public: virtual void InsDeletedFieldType(SwFieldType &) override; virtual bool PutValueToField(const SwPosition & rPos, const css::uno::Any& rVal, sal_uInt16 nWhich) override; virtual bool UpdateField(SwTextField * rDstFormatField, SwField & rSrcField, SwMsgPoolItem * pMsgHint, bool bUpdateTableFields) override; - virtual void UpdateRefFields(SfxPoolItem* pHt) override; + virtual void UpdateRefFields() override; virtual void UpdateTableFields(SfxPoolItem* pHt) override; virtual void UpdateExpFields(SwTextField* pField, bool bUpdateRefFields) override; virtual void UpdateUsrFields() override; diff --git a/sw/source/core/inc/attrhint.hxx b/sw/source/core/inc/attrhint.hxx index 34d563179978..8a3e86c5fd13 100644 --- a/sw/source/core/inc/attrhint.hxx +++ b/sw/source/core/inc/attrhint.hxx @@ -24,14 +24,6 @@ class SwAttrHint : public SfxHint { - sal_Int32 nId; - -public: - SwAttrHint( sal_Int32 n ) - : nId(n) - {} - - sal_Int32 GetId() const { return nId; } }; #endif diff --git a/sw/source/core/inc/docfld.hxx b/sw/source/core/inc/docfld.hxx index bed8e0a82e94..231a63aaec2a 100644 --- a/sw/source/core/inc/docfld.hxx +++ b/sw/source/core/inc/docfld.hxx @@ -63,17 +63,14 @@ public: SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextField* pField = nullptr, const SwIndex* pIdx = nullptr ); - SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextINetFormat& rINet, - const SwIndex* pIdx = nullptr ); + SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextINetFormat& rINet ); SetGetExpField( const SwSectionNode& rSectNode, const SwPosition* pPos = nullptr ); - SetGetExpField( const SwTableBox& rTableBox, - const SwPosition* pPos = nullptr ); + SetGetExpField( const SwTableBox& rTableBox ); - SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextTOXMark& rTOX, - const SwIndex* pIdx ); + SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextTOXMark& rTOX ); SetGetExpField( const SwPosition& rPos ); diff --git a/sw/source/core/inc/node2lay.hxx b/sw/source/core/inc/node2lay.hxx index 7fb2fcd3570e..3cec60fd0eca 100644 --- a/sw/source/core/inc/node2lay.hxx +++ b/sw/source/core/inc/node2lay.hxx @@ -67,7 +67,7 @@ public: SwLayoutFrame* UpperFrame( SwFrame* &rpFrame, const SwNode& rNode ); void RestoreUpperFrames( SwNodes& rNds, sal_uLong nStt, sal_uLong nEnd ); - SwFrame *GetFrame( const Point* pDocPos, const SwPosition *pPos ) const; + SwFrame *GetFrame( const Point* pDocPos ) const; }; #endif diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 14708228e867..b8b09630ab43 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -535,7 +535,7 @@ void SwRootFrame::Init( SwFrameFormat* pFormat ) //Remove masters that haven't been replaced yet from the list. RemoveMasterObjs( mpDrawPage ); if( rSettingAccess.get(DocumentSettingId::GLOBAL_DOCUMENT) ) - rFieldsAccess.UpdateRefFields( nullptr ); + rFieldsAccess.UpdateRefFields(); //b6433357: Update page fields after loading if ( !mpCurrShell || !mpCurrShell->Imp()->IsUpdateExpFields() ) { diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 4ae7636876bb..5558fa8bcf09 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -204,8 +204,8 @@ void InsTableBox( SwDoc* pDoc, SwTableNode* pTableNd, } } -SwTable::SwTable( SwTableFormat* pFormat ) - : SwClient( pFormat ), +SwTable::SwTable() + : SwClient( nullptr ), m_pHTMLLayout( nullptr ), m_pTableNode( nullptr ), m_nGraphicsThatResize( 0 ), diff --git a/sw/source/core/text/atrhndl.hxx b/sw/source/core/text/atrhndl.hxx index 76072e73cba0..0b7caf18710f 100644 --- a/sw/source/core/text/atrhndl.hxx +++ b/sw/source/core/text/atrhndl.hxx @@ -107,8 +107,7 @@ public: // set default attributes to values in rAttrSet or from cache void Init( const SwAttrSet& rAttrSet, - const IDocumentSettingAccess& rIDocumentSettingAccess, - const SwViewShell* pShell ); + const IDocumentSettingAccess& rIDocumentSettingAccess ); void Init( const SfxPoolItem** pPoolItem, const SwAttrSet* pAttrSet, const IDocumentSettingAccess& rIDocumentSettingAccess, const SwViewShell* pShell, SwFont& rFnt, diff --git a/sw/source/core/text/atrstck.cxx b/sw/source/core/text/atrstck.cxx index 2766ac578792..418556f309a6 100644 --- a/sw/source/core/text/atrstck.cxx +++ b/sw/source/core/text/atrstck.cxx @@ -357,11 +357,10 @@ SwAttrHandler::~SwAttrHandler() } void SwAttrHandler::Init( const SwAttrSet& rAttrSet, - const IDocumentSettingAccess& rIDocumentSettingAcces, - const SwViewShell* pSh ) + const IDocumentSettingAccess& rIDocumentSettingAcces ) { mpIDocumentSettingAccess = &rIDocumentSettingAcces; - mpShell = pSh; + mpShell = nullptr; for ( sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; i++ ) pDefaultArray[ StackPos[ i ] ] = &rAttrSet.Get( i ); diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index ef8e22fd8f23..7f6efc6822cc 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -490,7 +490,7 @@ bool SwTextFrame::PaintEmpty( const SwRect &rRect, bool bCheck ) const { SwAttrHandler aAttrHandler; aAttrHandler.Init( rTextNode.GetSwAttrSet(), - *rTextNode.getIDocumentSettingAccess(), nullptr ); + *rTextNode.getIDocumentSettingAccess() ); SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler, nRedlPos, true ); } } diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index d98ed5dcfde0..1f0fa028b4dc 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -323,7 +323,7 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextF } SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pText, - const sal_Int32 nIndex, const sal_Int32 nLength ) + const sal_Int32 nIndex ) : SwTextInfo( rNew ), m_pKanaComp(rNew.GetpKanaComp()), m_pVsh(const_cast<SwTextSizeInfo&>(rNew).GetVsh()), @@ -335,7 +335,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pTex m_pOpt(&rNew.GetOpt()), m_pText(pText), m_nIdx(nIndex), - m_nLen(nLength), + m_nLen(COMPLETE_STRING), m_nKanaIdx( rNew.GetKanaIdx() ), m_bOnWin( rNew.OnWin() ), m_bNotEOL( rNew.NotEOL() ), @@ -358,12 +358,10 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew, const OUString* pTex SetLen( GetMinLen( *this ) ); } -SwTextSizeInfo::SwTextSizeInfo( SwTextFrame *pTextFrame, SwFont *pTextFnt, - const sal_Int32 nIndex, - const sal_Int32 nLength ) +SwTextSizeInfo::SwTextSizeInfo( SwTextFrame *pTextFrame, const sal_Int32 nIndex ) : m_bOnWin(false) { - CtorInitTextSizeInfo( pTextFrame->getRootFrame()->GetCurrShell()->GetOut(), pTextFrame, pTextFnt, nIndex, nLength ); + CtorInitTextSizeInfo( pTextFrame->getRootFrame()->GetCurrShell()->GetOut(), pTextFrame, nullptr, nIndex ); } void SwTextSizeInfo::SelectFont() diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index f94d73201543..729f65ff2944 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -194,12 +194,8 @@ protected: public: SwTextSizeInfo( const SwTextSizeInfo &rInf ); SwTextSizeInfo( const SwTextSizeInfo &rInf, const OUString* pText, - const sal_Int32 nIdx = 0, - const sal_Int32 nLen = COMPLETE_STRING ); - - SwTextSizeInfo( SwTextFrame *pTextFrame, SwFont *pTextFnt = nullptr, - const sal_Int32 nIndex = 0, - const sal_Int32 nLength = COMPLETE_STRING ); + const sal_Int32 nIdx = 0 ); + SwTextSizeInfo( SwTextFrame *pTextFrame, const sal_Int32 nIndex = 0 ); // GetMultiAttr returns the text attribute of the multiportion, // if rPos is inside any multi-line part. diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index d5261ea83a04..33c3e8e31c0d 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -558,7 +558,7 @@ SwMarginPortion *SwTextAdjuster::CalcRightMargin( SwLineLayout *pCurrent, delete pFly; } - SwMarginPortion *pRight = new SwMarginPortion( 0 ); + SwMarginPortion *pRight = new SwMarginPortion; pLast->Append( pRight ); if( long( nPrtWidth )< nRealWidth ) diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx index 8dec1512c0b5..d63540d16dae 100644 --- a/sw/source/core/text/porglue.cxx +++ b/sw/source/core/text/porglue.cxx @@ -145,8 +145,8 @@ SwFixPortion::SwFixPortion() SetWhichPor( POR_FIX ); } -SwMarginPortion::SwMarginPortion( const sal_uInt16 nFixedWidth ) - :SwGluePortion( nFixedWidth ) +SwMarginPortion::SwMarginPortion() + :SwGluePortion( 0 ) { SetWhichPor( POR_MARGIN ); } diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx index f2ceabf336df..a76b02d80c03 100644 --- a/sw/source/core/text/porglue.hxx +++ b/sw/source/core/text/porglue.hxx @@ -62,7 +62,7 @@ public: class SwMarginPortion : public SwGluePortion { public: - explicit SwMarginPortion( const sal_uInt16 nFixWidth ); + explicit SwMarginPortion(); void AdjustRight( const SwLineLayout* pCurr ); OUTPUT_OPERATOR_OVERRIDE }; diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index f4df6844bd3f..9dd9c952dd1c 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -187,7 +187,7 @@ SwMarginPortion *SwLineLayout::CalcLeftMargin() SetPortion(SwTextPortion::CopyLinePortion(*this)); if( !pLeft ) { - pLeft = new SwMarginPortion( 0 ); + pLeft = new SwMarginPortion; pLeft->SetPortion( GetPortion() ); SetPortion( pLeft ); } diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 6725508b28eb..5618e2517662 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -683,14 +683,14 @@ void SwRubyPortion::Adjust_( SwTextFormatInfo &rInf ) pCurr->SetPortion(SwTextPortion::CopyLinePortion(*pCurr)); if( nLeft ) { - SwMarginPortion *pMarg = new SwMarginPortion( 0 ); + SwMarginPortion *pMarg = new SwMarginPortion; pMarg->AddPrtWidth( nLeft ); pMarg->SetPortion( pCurr->GetPortion() ); pCurr->SetPortion( pMarg ); } if( nRight ) { - SwMarginPortion *pMarg = new SwMarginPortion( 0 ); + SwMarginPortion *pMarg = new SwMarginPortion; pMarg->AddPrtWidth( nRight ); pCurr->FindLastPortion()->Append( pMarg ); } diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx index aad0fc60b2e4..bbc2d2583b5b 100644 --- a/sw/source/core/text/porrst.cxx +++ b/sw/source/core/text/porrst.cxx @@ -257,7 +257,7 @@ SwTwips SwTextFrame::EmptyHeight() const { SwAttrHandler aAttrHandler; aAttrHandler.Init( GetTextNode()->GetSwAttrSet(), - *GetTextNode()->getIDocumentSettingAccess(), nullptr ); + *GetTextNode()->getIDocumentSettingAccess() ); SwRedlineItr aRedln( rTextNode, *pFnt, aAttrHandler, nRedlPos, true ); } diff --git a/sw/source/core/text/txtpaint.cxx b/sw/source/core/text/txtpaint.cxx index 1d84ca5ebd10..8f1106f71f68 100644 --- a/sw/source/core/text/txtpaint.cxx +++ b/sw/source/core/text/txtpaint.cxx @@ -98,7 +98,7 @@ void SwSaveClip::ChgClip_( const SwRect &rRect, const SwTextFrame* pFrame, static bool bDbg = false; if( bDbg ) { - DbgBackColor aDbg( pOut, bDbg, COL_RED ); + DbgBackColor aDbg( pOut, bDbg ); pOut->DrawRect( aRect ); } #endif diff --git a/sw/source/core/text/txtpaint.hxx b/sw/source/core/text/txtpaint.hxx index 8ef9a58ec83c..29435b1cacb7 100644 --- a/sw/source/core/text/txtpaint.hxx +++ b/sw/source/core/text/txtpaint.hxx @@ -68,8 +68,7 @@ class DbgBackColor : public SwDbgOut { Color aOldFillColor; public: - DbgBackColor( OutputDevice* pOut, const bool bOn = true, - ColorData nColor = COL_YELLOW ); + DbgBackColor( OutputDevice* pOut, const bool bOn = true ); ~DbgBackColor(); }; @@ -85,14 +84,13 @@ inline SwDbgOut::SwDbgOut( OutputDevice* pOutDev, const bool bOn ) :pOut( bOn ? pOutDev : nullptr ) { } -inline DbgBackColor::DbgBackColor( OutputDevice* pOutDev, const bool bOn, - ColorData eColor ) +inline DbgBackColor::DbgBackColor( OutputDevice* pOutDev, const bool bOn ) :SwDbgOut( pOutDev, bOn ) { if( pOut ) { aOldFillColor = pOut->GetFillColor(); - pOut->SetFillColor( Color(eColor) ); + pOut->SetFillColor( Color(COL_RED) ); } } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 8b0c40a8922e..d01a00668357 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4919,7 +4919,7 @@ void SwTextNode::SwClientNotify( const SwModify& rModify, const SfxHint& rHint ) { SwClient::SwClientNotify(rModify, rHint); const SwAttrHint* pHint = dynamic_cast<const SwAttrHint*>(&rHint); - if ( pHint && pHint->GetId() == RES_CONDTXTFMTCOLL && &rModify == GetRegisteredIn() ) + if ( pHint && &rModify == GetRegisteredIn() ) ChkCondColl(); } diff --git a/sw/source/core/undo/SwUndoField.cxx b/sw/source/core/undo/SwUndoField.cxx index fc370c8fc486..88ae5ac0d7da 100644 --- a/sw/source/core/undo/SwUndoField.cxx +++ b/sw/source/core/undo/SwUndoField.cxx @@ -57,8 +57,8 @@ SwPosition SwUndoField::GetPosition() SwUndoFieldFromDoc::SwUndoFieldFromDoc(const SwPosition & rPos, const SwField & rOldField, const SwField & rNewField, - SwMsgPoolItem * _pHint, bool _bUpdate, SwUndoId _nId) - : SwUndoField(rPos,_nId) + SwMsgPoolItem * _pHint, bool _bUpdate) + : SwUndoField(rPos,UNDO_FIELD) , pOldField(rOldField.CopyField()) , pNewField(rNewField.CopyField()) , pHint(_pHint) diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 055e931db635..bc81e788bc32 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -798,7 +798,7 @@ SwXServiceProvider::MakeInstance(SwServiceType nObjectType, SwDoc & rDoc) xRet = static_cast<cppu::OWeakObject*>(new SwXNumberingRules(rDoc)); break; case SwServiceType::TextColumns : - xRet = static_cast<cppu::OWeakObject*>(new SwXTextColumns(0)); + xRet = static_cast<cppu::OWeakObject*>(new SwXTextColumns); break; case SwServiceType::Defaults: xRet = static_cast<cppu::OWeakObject*>(new SwXTextDefaults(&rDoc)); diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx index 53d728452311..515459024f4d 100644 --- a/sw/source/core/unocore/unocrsr.cxx +++ b/sw/source/core/unocore/unocrsr.cxx @@ -29,8 +29,8 @@ sw::DocDisposingHint::~DocDisposingHint() {} IMPL_FIXEDMEMPOOL_NEWDEL( SwUnoCursor ) -SwUnoCursor::SwUnoCursor( const SwPosition &rPos, SwPaM* pRing ) - : SwCursor( rPos, pRing ) +SwUnoCursor::SwUnoCursor( const SwPosition &rPos ) + : SwCursor( rPos, nullptr ) , SwModify(nullptr) , m_bRemainInSection(true) , m_bSkipOverHiddenSections(false) diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 855d7521bac1..c3f27a96a6ef 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2995,7 +2995,7 @@ void SwXFrame::attachToRange(const uno::Reference< text::XTextRange > & xTextRan pDoc->GetIDocumentUndoRedo().StartUndo(UNDO_INSERT, nullptr); SwFlyFrameFormat* pFrameFormat = nullptr; - pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrameSet, nullptr, nullptr ); + pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( aPam, sStreamName, embed::Aspects::MSOLE_CONTENT, &aFrameSet, nullptr ); pDoc->GetIDocumentUndoRedo().EndUndo(UNDO_INSERT, nullptr); pFrameFormat->Add(this); if(!m_sName.isEmpty()) diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index 40c7e3991e83..b5a3b54e09bd 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -2318,7 +2318,7 @@ Sequence< OUString > SwXTextColumns::getSupportedServiceNames() throw( RuntimeEx return aRet; } -SwXTextColumns::SwXTextColumns(sal_uInt16 nColCount) : +SwXTextColumns::SwXTextColumns() : nReference(0), bIsAutomaticWidth(true), nAutoDistance(0), @@ -2330,8 +2330,6 @@ SwXTextColumns::SwXTextColumns(sal_uInt16 nColCount) : bSepLineIsOn(false), nSepLineStyle(API_COL_LINE_NONE) // None { - if(nColCount) - setColumnCount(nColCount); } SwXTextColumns::SwXTextColumns(const SwFormatCol& rFormatCol) : diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx index 7d6d9c8f6499..bfeb6e888a01 100644 --- a/sw/source/filter/html/SwAppletImpl.cxx +++ b/sw/source/filter/html/SwAppletImpl.cxx @@ -27,6 +27,7 @@ #include <comphelper/classids.hxx> #include <com/sun/star/uno/Any.hxx> #include <svtools/embedhlp.hxx> +#include <hintids.hxx> using namespace com::sun::star; @@ -105,8 +106,8 @@ SwHtmlOptType SwApplet_Impl::GetOptionType( const OUString& rName, bool bApplet return nType; } -SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) : - aItemSet( rPool, nWhich1, nWhich2 ) +SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool ) : + aItemSet( rPool, RES_FRMATR_BEGIN, RES_FRMATR_END-1 ) { } diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index f5bde4e01325..d00f20c457af 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -500,8 +500,7 @@ void SwHTMLParser::NewObject() bDeclare = false; // Eine neue Command-List anlegen delete m_pAppletImpl; - m_pAppletImpl = new SwApplet_Impl( m_pDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + m_pAppletImpl = new SwApplet_Impl( m_pDoc->GetAttrPool() ); const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) @@ -671,7 +670,7 @@ void SwHTMLParser::InsertApplet() // Eine neue Command-List anlegen delete m_pAppletImpl; - m_pAppletImpl = new SwApplet_Impl( m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 ); + m_pAppletImpl = new SwApplet_Impl( m_pDoc->GetAttrPool() ); const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx index 4b68065876c6..cbecacd75432 100644 --- a/sw/source/filter/ww8/ww8par4.cxx +++ b/sw/source/filter/ww8/ww8par4.cxx @@ -235,7 +235,7 @@ SwFlyFrameFormat* SwWW8ImplReader::InsertOle(SdrOle2Obj &rObject, if (bSuccess) { const SfxItemSet *pFlySet = pMathFlySet ? pMathFlySet : &rFlySet; - pRet = m_rDoc.getIDocumentContentOperations().InsertOLE(*m_pPaM, sNewName, rObject.GetAspect(), pFlySet, rGrfSet, nullptr); + pRet = m_rDoc.getIDocumentContentOperations().InsertOLE(*m_pPaM, sNewName, rObject.GetAspect(), pFlySet, rGrfSet); } delete pMathFlySet; return pRet; diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index e24fe060632a..1e35bf7d9b27 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -715,8 +715,7 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline( SwRedlineData* pData = new SwRedlineData(pRedlineInfo->eType, nAuthorId, aDT, pRedlineInfo->sComment, - pNext, // next data (if available) - nullptr); // no extra data + pNext); // next data (if available) return pData; } diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 1fc18b2b599e..b83ef45d8da7 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -347,7 +347,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( // TODO/LATER: Actually it should be set here if( pTextCursor ) { - pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCursor->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, nullptr, nullptr ); + pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCursor->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, nullptr ); pOLENd = lcl_GetOLENode( pFrameFormat ); } aObjName = aName; diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index f3f71dd0dfa4..ddc6e0edd2ec 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -674,23 +674,10 @@ AbstractSwAsciiFilterDlg* SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg( VclAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, - SfxRequest& rReq, - int nResId ) + SfxRequest& rReq ) { - Dialog* pDlg=nullptr; - switch ( nResId ) - { - case DLG_INSERT_BOOKMARK : - pDlg = VclPtr<SwInsertBookmarkDlg>::Create( pParent, rSh, rReq ); - break; - - default: - break; - } - - if ( pDlg ) - return new VclAbstractDialog_Impl( pDlg ); - return nullptr; + VclPtr<SwInsertBookmarkDlg> pDlg = VclPtr<SwInsertBookmarkDlg>::Create( pParent, rSh, rReq ); + return new VclAbstractDialog_Impl( pDlg ); } AbstractSwBreakDlg * SwAbstractDialogFactory_Impl::CreateSwBreakDlg(vcl::Window *pParent, @@ -719,22 +706,10 @@ AbstractSwConvertTableDlg* SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg return new AbstractSwConvertTableDlg_Impl(pDlg); } -VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV,int nResId) +VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV) { - VclPtr<Dialog> pDlg; - switch ( nResId ) - { - case DLG_CAPTION : - pDlg = VclPtr<SwCaptionDialog>::Create( pParent, rV ); - break; - - default: - break; - } - - if ( pDlg.get() ) - return new VclAbstractDialog_Impl( pDlg ); - return nullptr; + VclPtr<Dialog> pDlg = VclPtr<SwCaptionDialog>::Create( pParent, rV ); + return new VclAbstractDialog_Impl( pDlg ); } AbstractSwInsertDBColAutoPilot* SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView, @@ -781,11 +756,10 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod () SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( vcl::Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet , - const OUString *pCollName, bool bDraw , const OString& sDefPage) { - VclPtr<SfxTabDialog> pDlg = VclPtr<SwParaDlg>::Create( pParent, rVw, rCoreSet, DLG_STD, pCollName, bDraw, sDefPage ); + VclPtr<SfxTabDialog> pDlg = VclPtr<SwParaDlg>::Create( pParent, rVw, rCoreSet, DLG_STD, nullptr, bDraw, sDefPage ); return new AbstractTabDialog_Impl( pDlg ); } @@ -833,38 +807,16 @@ AbstractSwAutoFormatDlg * SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(vc return new AbstractSwAutoFormatDlg_Impl(pDlg); } -SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) +SfxAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwBorderDlg(vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) { - VclPtr<SfxModalDialog> pDlg; - switch ( nResId ) - { - case RC_DLG_SWBORDERDLG : - pDlg = VclPtr<SwBorderDlg>::Create( pParent, rSet, nType ); - break; - default: - break; - } - - if ( pDlg.get() ) - return new SwAbstractSfxDialog_Impl( pDlg ); - return nullptr; + VclPtr<SfxModalDialog> pDlg = VclPtr<SwBorderDlg>::Create( pParent, rSet, nType ); + return new SwAbstractSfxDialog_Impl( pDlg ); } -SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, int nResId ) +SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) { - VclPtr<SfxModalDialog> pDlg; - switch ( nResId ) - { - case RC_DLG_SWWRAPDLG : - pDlg = VclPtr<SwWrapDlg>::Create( pParent, rSet, pSh, true/*bDrawMode*/ ); - break; - default: - break; - } - - if ( pDlg.get() ) - return new SwAbstractSfxDialog_Impl( pDlg ); - return nullptr; + VclPtr<SfxModalDialog> pDlg = VclPtr<SwWrapDlg>::Create( pParent, rSet, pSh, true/*bDrawMode*/ ); + return new SwAbstractSfxDialog_Impl( pDlg ); } VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc) @@ -886,21 +838,10 @@ AbstractSwFieldDlg * SwAbstractDialogFactory_Impl::CreateSwFieldDlg(SfxBindings* return new AbstractSwFieldDlg_Impl(pDlg); } -SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg ( SwView& rVw, int nResId ) +SfxAbstractDialog* SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg ( SwView& rVw ) { - VclPtr<SfxModalDialog> pDlg; - switch ( nResId ) - { - case RC_DLG_SWFLDEDITDLG : - pDlg = VclPtr<SwFieldEditDlg>::Create( rVw ); - break; - default: - break; - } - - if ( pDlg.get() ) - return new SwAbstractSfxDialog_Impl( pDlg ); - return nullptr; + VclPtr<SfxModalDialog> pDlg = VclPtr<SwFieldEditDlg>::Create( rVw ); + return new SwAbstractSfxDialog_Impl( pDlg ); } AbstractSwRenameXNamedDlg * SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(vcl::Window* pParent, @@ -927,10 +868,9 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const O SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame, - const OString& sDefPage, - const OUString* pFormatStr ) + const OString& sDefPage ) { - VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrameDlg>::Create(pFrame, pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, pFormatStr); + VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrameDlg>::Create(pFrame, pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, nullptr); return new AbstractTabDialog_Impl(pDlg); } @@ -993,25 +933,15 @@ AbstractJavaEditDialog * SwAbstractDialogFactory_Impl::CreateJavaEditDialog( return new AbstractJavaEditDialog_Impl( pDlg ); } -AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( int nResId, +AbstractMailMergeDlg * SwAbstractDialogFactory_Impl::CreateMailMergeDlg( vcl::Window* pParent, SwWrtShell& rSh, const OUString& rSourceName, const OUString& rTableName, sal_Int32 nCommandType, const uno::Reference< sdbc::XConnection>& xConnection ) { - VclPtr<SwMailMergeDlg> pDlg; - switch ( nResId ) - { - case DLG_MAILMERGE : - pDlg = VclPtr<SwMailMergeDlg>::Create( pParent, rSh, rSourceName, rTableName, nCommandType, xConnection, nullptr ); - break; - default: - break; - } - if ( pDlg.get() ) - return new AbstractMailMergeDlg_Impl( pDlg ); - return nullptr; + VclPtr<SwMailMergeDlg> pDlg = VclPtr<SwMailMergeDlg>::Create( pParent, rSh, rSourceName, rTableName, nCommandType, xConnection, nullptr ); + return new AbstractMailMergeDlg_Impl( pDlg ); } AbstractMailMergeCreateFromDlg * SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg(vcl::Window* pParent) @@ -1058,10 +988,10 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwTabDialog( int nResI AbstractMultiTOXTabDialog * SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog( vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, - SwTOXBase* pCurTOX, sal_uInt16 nToxType, + SwTOXBase* pCurTOX, bool bGlobal) { - VclPtr<SwMultiTOXTabDialog> pDlg = VclPtr<SwMultiTOXTabDialog>::Create( pParent, rSet, rShell, pCurTOX, nToxType, bGlobal ); + VclPtr<SwMultiTOXTabDialog> pDlg = VclPtr<SwMultiTOXTabDialog>::Create( pParent, rSet, rShell, pCurTOX, USHRT_MAX, bGlobal ); return new AbstractMultiTOXTabDialog_Impl( pDlg ); } diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 49baf298764a..6110e98d536c 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -378,13 +378,13 @@ public: virtual AbstractSwInsertAbstractDlg * CreateSwInsertAbstractDlg() override; virtual AbstractSwAsciiFilterDlg* CreateSwAsciiFilterDlg ( SwDocShell& rDocSh, SvStream* pStream ) override; - virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, int nResId ) override; + virtual VclAbstractDialog * CreateSwInsertBookmarkDlg( vcl::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq ) override; virtual AbstractSwBreakDlg * CreateSwBreakDlg(vcl::Window *pParent, SwWrtShell &rSh) override; virtual VclAbstractDialog * CreateSwChangeDBDlg(SwView& rVw) override; virtual SfxAbstractTabDialog * CreateSwCharDlg(vcl::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet, SwCharDlgMode nDialogMode, const OUString* pFormatStr = nullptr) override; virtual AbstractSwConvertTableDlg* CreateSwConvertTableDlg(SwView& rView, bool bToTable) override; - virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV,int nResId) override; + virtual VclAbstractDialog * CreateSwCaptionDialog ( vcl::Window *pParent, SwView &rV) override; virtual AbstractSwInsertDBColAutoPilot* CreateSwInsertDBColAutoPilot(SwView& rView, css::uno::Reference< css::sdbc::XDataSource> rxSource, @@ -402,7 +402,6 @@ public: virtual SfxAbstractTabDialog* CreateSwParaDlg ( vcl::Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet, - const OUString *pCollName, bool bDraw, const OString& sDefPage = OString() ) override; @@ -413,14 +412,14 @@ public: virtual AbstractSwAutoFormatDlg * CreateSwAutoFormatDlg( vcl::Window* pParent, SwWrtShell* pShell, bool bSetAutoFormat = true, const SwTableAutoFormat* pSelFormat = nullptr ) override; - virtual SfxAbstractDialog * CreateSwBorderDlg (vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType, int nResId ) override; + virtual SfxAbstractDialog * CreateSwBorderDlg (vcl::Window* pParent, SfxItemSet& rSet, SwBorderModes nType ) override; - virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, int nResId ) override; + virtual SfxAbstractDialog * CreateSwWrapDlg ( vcl::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh ) override; virtual VclAbstractDialog * CreateSwTableWidthDlg(vcl::Window *pParent, SwTableFUNC &rFnc) override; virtual SfxAbstractTabDialog* CreateSwTableTabDlg(vcl::Window* pParent, SfxItemPool& Pool, const SfxItemSet* pItemSet, SwWrtShell* pSh) override; virtual AbstractSwFieldDlg * CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, vcl::Window *pParent) override; - virtual SfxAbstractDialog* CreateSwFieldEditDlg ( SwView& rVw, int nResId ) override; + virtual SfxAbstractDialog* CreateSwFieldEditDlg ( SwView& rVw ) override; virtual AbstractSwRenameXNamedDlg * CreateSwRenameXNamedDlg(vcl::Window* pParent, css::uno::Reference< css::container::XNamed > & xNamed, css::uno::Reference< css::container::XNameAccess > & xNameAccess) override; @@ -431,8 +430,7 @@ public: SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame = true, - const OString& sDefPage = OString(), - const OUString* pFormatStr = nullptr) override; + const OString& sDefPage = OString()) override; virtual SfxAbstractApplyTabDialog* CreateTemplateDialog( vcl::Window *pParent, SfxStyleSheetBase& rBase, @@ -452,7 +450,7 @@ public: virtual AbstractInsTableDlg* CreateInsTableDlg(SwView& rView) override; virtual AbstractJavaEditDialog* CreateJavaEditDialog(vcl::Window* pParent, SwWrtShell* pWrtSh) override; - virtual AbstractMailMergeDlg* CreateMailMergeDlg( int nResId, + virtual AbstractMailMergeDlg* CreateMailMergeDlg( vcl::Window* pParent, SwWrtShell& rSh, const OUString& rSourceName, const OUString& rTableName, @@ -468,7 +466,7 @@ public: virtual AbstractMultiTOXTabDialog* CreateMultiTOXTabDialog( vcl::Window* pParent, const SfxItemSet& rSet, SwWrtShell &rShell, - SwTOXBase* pCurTOX, sal_uInt16 nToxType, + SwTOXBase* pCurTOX, bool bGlobal) override; virtual AbstractEditRegionDlg* CreateEditRegionDlg(vcl::Window* pParent, SwWrtShell& rWrtSh) override; virtual AbstractInsertSectionTabDialog* CreateInsertSectionTabDialog( diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index f906c5535a40..14437bf5245f 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2825,12 +2825,11 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh, } SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert( pFact && "Factory creation failed!" ); - pImpl->pMergeDialog = pFact->CreateMailMergeDlg( DLG_MAILMERGE, - &rSh.GetView().GetViewFrame()->GetWindow(), rSh, - sDataSource, - sDataTableOrQuery, - nCmdType, - xConnection); + pImpl->pMergeDialog = pFact->CreateMailMergeDlg( &rSh.GetView().GetViewFrame()->GetWindow(), rSh, + sDataSource, + sDataTableOrQuery, + nCmdType, + xConnection); assert( pImpl->pMergeDialog && "Dialog creation failed!" ); if(pImpl->pMergeDialog->Execute() == RET_OK) { diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index ee5a8ba9ed9f..1eed1df55e31 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -649,7 +649,6 @@ void SwPostItMgr::LayoutPostIts() if (!pPostIt) { pPostIt = (*i)->GetSidebarWindow( mpView->GetEditWin(), - WB_DIALOGCONTROL, *this ); pPostIt->InitControls(); pPostIt->SetReadonly(mbReadOnly); diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 9b05cb57550b..6446f611caf7 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -167,7 +167,7 @@ bool SwGlosDocShell::Save() } SwWebGlosDocShell::SwWebGlosDocShell() - : SwWebDocShell( SfxObjectCreateMode::STANDARD ) + : SwWebDocShell() { SetHelpId(SW_WEBGLOSDOCSHELL); } diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 09883893c315..18d60f2d04c1 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -544,7 +544,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr, nullptr, true )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr, true )); OSL_ENSURE(pDlg, "Dialog creation failed!"); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 3293dae098a5..3bb4368b666c 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2445,7 +2445,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.reset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::TABLE, RC_DLG_SWBORDERDLG )); + pDlg.reset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::TABLE )); OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { @@ -2462,7 +2462,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.reset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::FRAME, RC_DLG_SWBORDERDLG )); + pDlg.reset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::FRAME )); OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { @@ -2480,7 +2480,7 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.reset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::PARA, RC_DLG_SWBORDERDLG )); + pDlg.reset(pFact->CreateSwBorderDlg( pMDI, aSet, SwBorderModes::PARA )); OSL_ENSURE(pDlg, "Dialog creation failed!"); if ( pDlg->Execute() == RET_OK ) { diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 141a75700eee..ab0c55bc7bed 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -148,7 +148,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh, RC_DLG_SWWRAPDLG )); + std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSwWrapDlg( GetView().GetWindow(), aSet, pSh )); OSL_ENSURE(pDlg, "Dialog creation failed!"); if (pDlg->Execute() == RET_OK) diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 08a2ea217712..8ff6feabf82a 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -422,7 +422,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "SwAbstractDialogFactory fail!"); - std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr, nullptr, true )); + std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr, true )); assert(pDlg && "Dialog creation failed!"); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 1ac6ad56b9ee..c6d580c5450e 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -152,7 +152,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "SwAbstractDialogFactory fail!"); - std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSwFieldEditDlg( GetView(),RC_DLG_SWFLDEDITDLG )); + std::unique_ptr<SfxAbstractDialog> pDlg(pFact->CreateSwFieldEditDlg( GetView() )); assert(pDlg && "Dialog creation failed!"); pDlg->Execute(); } diff --git a/sw/source/uibase/shells/textidx.cxx b/sw/source/uibase/shells/textidx.cxx index 851227bc3c88..5b7d55a4ce89 100644 --- a/sw/source/uibase/shells/textidx.cxx +++ b/sw/source/uibase/shells/textidx.cxx @@ -140,7 +140,7 @@ void SwTextShell::ExecIdx(SfxRequest &rReq) OSL_ENSURE(pFact, "Dialog creation failed!"); std::unique_ptr<AbstractMultiTOXTabDialog> pDlg(pFact->CreateMultiTOXTabDialog( pMDI, aSet, rSh, const_cast<SwTOXBase*>(pCurTOX), - USHRT_MAX, bGlobal)); + bGlobal)); OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->Execute(); } diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index ac19555db35b..e48facda7802 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -626,7 +626,7 @@ void SwTextShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq, DLG_INSERT_BOOKMARK )); + std::unique_ptr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg( GetView().GetWindow(), rWrtSh, rReq )); OSL_ENSURE(pDlg, "Dialog creation failed!"); pDlg->Execute(); } @@ -1004,7 +1004,7 @@ void SwTextShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, nullptr, false, sDefPage )); + pDlg.reset(pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, false, sDefPage )); OSL_ENSURE(pDlg, "Dialog creation failed!"); } SfxItemSet* pSet = nullptr; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 413ec54122f4..366641a76066 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -216,23 +216,17 @@ OUString SwView::GetPageStr(sal_uInt16 nPhyNum, sal_uInt16 nVirtNum, const OUStr } int SwView::InsertGraphic( const OUString &rPath, const OUString &rFilter, - bool bLink, GraphicFilter *pFilter, - Graphic* pPreviewGrf ) + bool bLink, GraphicFilter *pFilter ) { SwWait aWait( *GetDocShell(), true ); Graphic aGraphic; int aResult = GRFILTER_OK; - if ( pPreviewGrf ) - aGraphic = *pPreviewGrf; - else + if( !pFilter ) { - if( !pFilter ) - { - pFilter = &GraphicFilter::GetGraphicFilter(); - } - aResult = GraphicFilter::LoadGraphic( rPath, rFilter, aGraphic, pFilter ); + pFilter = &GraphicFilter::GetGraphicFilter(); } + aResult = GraphicFilter::LoadGraphic( rPath, rFilter, aGraphic, pFilter ); if( GRFILTER_OK == aResult ) { diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index e1797bb7e832..545303262c4f 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -54,7 +54,7 @@ void SwView::ExecDlgExt(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert(pFact && "SwAbstractDialogFactory fail!"); - std::unique_ptr<VclAbstractDialog> pDialog(pFact->CreateSwCaptionDialog( pMDI, *this, DLG_CAPTION )); + std::unique_ptr<VclAbstractDialog> pDialog(pFact->CreateSwCaptionDialog( pMDI, *this )); assert(pDialog && "Dialog creation failed!"); if ( pDialog ) { diff --git a/sw/source/uibase/uno/unodoc.cxx b/sw/source/uibase/uno/unodoc.cxx index aded8e90c06c..929ebcc94944 100644 --- a/sw/source/uibase/uno/unodoc.cxx +++ b/sw/source/uibase/uno/unodoc.cxx @@ -60,7 +60,7 @@ com_sun_star_comp_Writer_WebDocument_get_implementation(css::uno::XComponentCont { SolarMutexGuard aGuard; SwGlobals::ensure(); - SfxObjectShell* pShell = new SwWebDocShell( SfxObjectCreateMode::STANDARD ); + SfxObjectShell* pShell = new SwWebDocShell; uno::Reference< uno::XInterface > model( pShell->GetModel() ); model->acquire(); return model.get(); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 71a8dd5eeed9..1a0a5a2810a4 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -894,7 +894,6 @@ void SwGlobalTree::ExecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ) this, aSet, *pActiveShell, nullptr, - USHRT_MAX, true)); assert(pDlg && "Dialog creation failed!"); if(RET_OK == pDlg->Execute()) diff --git a/sw/source/uibase/web/wdocsh.cxx b/sw/source/uibase/web/wdocsh.cxx index 8cca32f3b570..dfccc65eef63 100644 --- a/sw/source/uibase/web/wdocsh.cxx +++ b/sw/source/uibase/web/wdocsh.cxx @@ -50,8 +50,8 @@ void SwWebDocShell::InitInterface_Impl() SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), SfxObjectShellFlags::STD_NORMAL|SfxObjectShellFlags::HASMENU, "swriter/web" ) -SwWebDocShell::SwWebDocShell(SfxObjectCreateMode const eMode) - : SwDocShell(eMode) +SwWebDocShell::SwWebDocShell() + : SwDocShell(SfxObjectCreateMode::STANDARD) , m_nSourcePara(0) { } |