diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-04 10:29:18 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-05 09:30:41 +0200 |
commit | 259820af718fe15ea5080711f77918dad8f14fbb (patch) | |
tree | a80039fad41dfbfaeaa8fe0b7403c29336f37861 /sw | |
parent | 03e6cc9130864adcea5a1ae5440f24a9c128e8d6 (diff) |
loplugin:staticmethods
Change-Id: I90dd921077bbfc57200e398e7959306f26c65cfe
Diffstat (limited to 'sw')
234 files changed, 898 insertions, 1028 deletions
diff --git a/sw/inc/PostItMgr.hxx b/sw/inc/PostItMgr.hxx index 81251741bea4..859e07434a00 100644 --- a/sw/inc/PostItMgr.hxx +++ b/sw/inc/PostItMgr.hxx @@ -121,7 +121,7 @@ class SwNoteProps: public utl::ConfigItem { return bIsShowAnchor; } - ::com::sun::star::uno::Sequence< OUString >& GetPropertyNames() + static ::com::sun::star::uno::Sequence< OUString >& GetPropertyNames() { static ::com::sun::star::uno::Sequence< OUString > aNames; if(!aNames.getLength()) diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index d831d95d505c..2cb5a567319b 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -166,7 +166,7 @@ public: { return mpVSh; } - bool IsInSameLevel(const SdrObject* pObj, const SwFEShell* pFESh); + static bool IsInSameLevel(const SdrObject* pObj, const SwFEShell* pFESh); void AddShapeContext(const SdrObject *pObj, ::com::sun::star::uno::Reference < ::com::sun::star::accessibility::XAccessible > xAccShape); diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx index d103f3e49340..55cc98f0a54f 100644 --- a/sw/inc/calc.hxx +++ b/sw/inc/calc.hxx @@ -177,7 +177,7 @@ class SwCalc bool ParseTime( sal_uInt16*, sal_uInt16*, sal_uInt16* ); - OUString GetColumnName( const OUString& rName ); + static OUString GetColumnName( const OUString& rName ); OUString GetDBName( const OUString& rName ); SwCalc( const SwCalc& ) SAL_DELETED_FUNCTION; diff --git a/sw/inc/cellfml.hxx b/sw/inc/cellfml.hxx index 9f06a1afbb3a..880e2918b329 100644 --- a/sw/inc/cellfml.hxx +++ b/sw/inc/cellfml.hxx @@ -75,12 +75,12 @@ typedef void (SwTableFormula:: *FnScanFormula)( const SwTable&, OUString&, void _SplitMergeBoxNm( const SwTable&, OUString&, OUString&, OUString* = 0, void* pPara = 0 ) const; - void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd, - SwSelBoxes& rBoxes ) const; + static void GetBoxes( const SwTableBox& rStt, const SwTableBox& rEnd, + SwSelBoxes& rBoxes ); OUString ScanString( FnScanFormula fnFormula, const SwTable& rTbl, void* = 0 ) const; - const SwTable* FindTable( SwDoc& rDoc, const OUString& rNm ) const; + static const SwTable* FindTable( SwDoc& rDoc, const OUString& rNm ); protected: enum NameType { EXTRNL_NAME, INTRNL_NAME, REL_NAME }; diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index b84fc43f21aa..31fdbe224916 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -703,18 +703,18 @@ public: bool GotoFld( const SwFmtFld& rFld ); - SwTxtFld* GetTxtFldAtPos( + static SwTxtFld* GetTxtFldAtPos( const SwPosition* pPos, - const bool bIncludeInputFldAtStart ) const; - SwField* GetFieldAtCrsr( + const bool bIncludeInputFldAtStart ); + static SwField* GetFieldAtCrsr( const SwPaM* pCrsr, - const bool bIncludeInputFldAtStart ) const; + const bool bIncludeInputFldAtStart ); SwField* GetCurFld( const bool bIncludeInputFldAtStart = false ) const; bool CrsrInsideInputFld() const; - bool PosInsideInputFld( const SwPosition& rPos ) const; + static bool PosInsideInputFld( const SwPosition& rPos ); bool DocPtInsideInputFld( const Point& rDocPt ) const; - sal_Int32 StartOfInputFldAtPos( const SwPosition& rPos ) const; - sal_Int32 EndOfInputFldAtPos( const SwPosition& rPos ) const; + static sal_Int32 StartOfInputFldAtPos( const SwPosition& rPos ); + static sal_Int32 EndOfInputFldAtPos( const SwPosition& rPos ); // Return number of cursors in ring (The flag indicates whether // only cursors containing selections are requested). @@ -822,10 +822,10 @@ public: // is cursor or the point in/over a right to left formatted text? bool IsInRightToLeftText( const Point* pPt = 0 ) const; - void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage); + static void FirePageChangeEvent(sal_uInt16 nOldPage, sal_uInt16 nNewPage); bool bColumnChange(); - void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection); - void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn); + static void FireSectionChangeEvent(sal_uInt16 nOldSection, sal_uInt16 nNewSection); + static void FireColumnChangeEvent(sal_uInt16 nOldColumn, sal_uInt16 nNewColumn); // If the current cursor position is inside a hidden range, the hidden range // is selected and true is returned: bool SelectHiddenRange(); diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 3cfafbb591bd..d420a8a4d4bf 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -238,7 +238,7 @@ public: /// Merging of data records into fields. bool MergeNew( const SwMergeDescriptor& rMergeDesc, vcl::Window* pParent = NULL ); - bool Merge(SwWrtShell* pSh); + static bool Merge(SwWrtShell* pSh); void MergeCancel(); /// Initialize data fields that lack name of database. @@ -260,11 +260,11 @@ public: /// Fill listbox with all column names of a database table. void GetColumnNames(ListBox* pListBox, const OUString& rDBName, const OUString& rTableName, bool bAppend = false); - void GetColumnNames(ListBox* pListBox, + static void GetColumnNames(ListBox* pListBox, css::uno::Reference< css::sdbc::XConnection> xConnection, const OUString& rTableName, bool bAppend = false); - sal_uLong GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource, + static sal_uLong GetColumnFmt( ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource> xSource, ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> xConnection, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> xColumn, SvNumberFormatter* pNFmtr, @@ -285,7 +285,7 @@ public: const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, bool bWithDataSourceBrowser = false); - void InsertText(SwWrtShell& rSh, + static void InsertText(SwWrtShell& rSh, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties); /// check if a data source is open @@ -322,7 +322,7 @@ public: sal_uInt32 GetSelectedRecordId(); bool ToRecordId(sal_Int32 nSet); - const SwDBData& GetAddressDBName(); + static const SwDBData& GetAddressDBName(); static OUString GetDBField( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumnProp, diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx index f49c491cb52e..01298ee7689a 100644 --- a/sw/inc/dcontact.hxx +++ b/sw/inc/dcontact.hxx @@ -375,7 +375,7 @@ class SwDrawContact : public SwContact /// method for adding/removing 'virtual' drawing object. SwDrawVirtObj* CreateVirtObj(); - void DestroyVirtObj( SwDrawVirtObj* pVirtObj ); + static void DestroyVirtObj( SwDrawVirtObj* pVirtObj ); void RemoveAllVirtObjs(); void _InvalidateObjs( const bool _bUpdateSortedObjsList = false ); diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 2dab95b69ce9..0bb1c879789d 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -412,7 +412,7 @@ private: FNCopyFmt fnCopyFmt, SwFmt& rDfltFmt ); void CopyPageDescHeaderFooterImpl( bool bCpyHeader, const SwFrmFmt& rSrcFmt, SwFrmFmt& rDestFmt ); - SwFmt* FindFmtByName( const SwFmtsBase& rFmtArr, const OUString& rName ) const; + static SwFmt* FindFmtByName( const SwFmtsBase& rFmtArr, const OUString& rName ); SwDoc( const SwDoc &) SAL_DELETED_FUNCTION; @@ -420,11 +420,11 @@ private: void AddUsedDBToList( std::vector<OUString>& rDBNameList, const std::vector<OUString>& rUsedDBNames ); void AddUsedDBToList( std::vector<OUString>& rDBNameList, const OUString& rDBName ); - bool IsNameInArray( const std::vector<OUString>& rOldNames, const OUString& rName ); + static bool IsNameInArray( const std::vector<OUString>& rOldNames, const OUString& rName ); void GetAllDBNames( std::vector<OUString>& rAllDBNames ); - OUString ReplaceUsedDBs( const std::vector<OUString>& rUsedDBNames, + static OUString ReplaceUsedDBs( const std::vector<OUString>& rUsedDBNames, const OUString& rNewName, const OUString& rFormula ); - std::vector<OUString>& FindUsedDBs( const std::vector<OUString>& rAllDBNames, + static std::vector<OUString>& FindUsedDBs( const std::vector<OUString>& rAllDBNames, const OUString& rFormula, std::vector<OUString>& rUsedDBNames ); @@ -440,7 +440,7 @@ private: // Update charts of given table. void _UpdateCharts( const SwTable& rTbl, SwViewShell const & rVSh ) const; - bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry, + static bool _SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rRubyEntry, sal_uInt16 nMode ); // CharTimer calls this method. @@ -710,7 +710,7 @@ public: sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); // count words in pam - void CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const; + static void CountWords( const SwPaM& rPaM, SwDocStat& rStat ); // Glossary Document void SetGlossDoc( bool bGlssDc = true ) { mbGlossDoc = bGlssDc; } @@ -752,7 +752,7 @@ public: void SetFlyName( SwFlyFrmFmt& rFmt, const OUString& rName ); const SwFlyFrmFmt* FindFlyByName( const OUString& rName, sal_Int8 nNdTyp = 0 ) const; - void GetGrfNms( const SwFlyFrmFmt& rFmt, OUString* pGrfName, OUString* pFltName ) const; + static void GetGrfNms( const SwFlyFrmFmt& rFmt, OUString* pGrfName, OUString* pFltName ); // Set a valid name for all Flys that have none (Called by Readers after reading). void SetAllUniqueFlyNames(); @@ -912,7 +912,7 @@ public: // Query if style (paragraph- / character- / frame- / page-) is used. bool IsUsed( const SwModify& ) const; - bool IsUsed( const SwNumRule& ) const; + static bool IsUsed( const SwNumRule& ); // Set name of newly loaded document template. sal_uInt16 SetDocPattern( const OUString& rPatternName ); @@ -936,11 +936,11 @@ public: /** get the set of printable pages for the XRenderable API by evaluating the respective settings (see implementation) */ - void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, + static void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, sal_Int32 nDocPageCount ); - void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, + static void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport, sal_Int32 nDocPageCount ); - void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, + static void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, sal_Int32 nDocPageCount ); // PageDescriptor interface. @@ -985,7 +985,7 @@ public: void CheckDefaultPageFmt(); // Methods for tables/indices - sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ) const; + static sal_uInt16 GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& ); void DeleteTOXMark( const SwTOXMark* pTOXMark ); const SwTOXMark& GotoTOXMark( const SwTOXMark& rCurTOXMark, SwTOXSearch eDir, bool bInReadOnly ); @@ -998,8 +998,8 @@ public: const SwTOXBaseSection* InsertTableOf( sal_uLong nSttNd, sal_uLong nEndNd, const SwTOXBase& rTOX, const SfxItemSet* pSet = 0 ); - SwTOXBase* GetCurTOX( const SwPosition& rPos ); - const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX) const; + static SwTOXBase* GetCurTOX( const SwPosition& rPos ); + static const SwAttrSet& GetTOXBaseAttrSet(const SwTOXBase& rTOX); bool DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes = false ); OUString GetUniqueTOXBaseName( const SwTOXType& rType, @@ -1061,14 +1061,14 @@ public: bool bMoveCrsr = false ); // Set everything in the range of [rStartNode, rEndNode] to rNewPos. - void CorrAbs( + static void CorrAbs( const SwNodeIndex& rStartNode, const SwNodeIndex& rEndNode, const SwPosition& rNewPos, bool bMoveCrsr = false ); // Set everything in this range from rRange to rNewPos. - void CorrAbs( + static void CorrAbs( const SwPaM& rRange, const SwPosition& rNewPos, bool bMoveCrsr = false ); @@ -1121,7 +1121,7 @@ public: void SetNumRuleStart( const SwPosition& rPos, bool bFlag = true ); void SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt ); - SwNumRule* GetNumRuleAtPos( const SwPosition& rPos ) const; + static SwNumRule* GetNumRuleAtPos( const SwPosition& rPos ); const SwNumRuleTbl& GetNumRuleTbl() const { return *mpNumRuleTbl; } @@ -1153,9 +1153,9 @@ public: const OUString& rNewRule ); // Goto next/previous on same level. - bool GotoNextNum( SwPosition&, bool bOverUpper = true, + static bool GotoNextNum( SwPosition&, bool bOverUpper = true, sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 ); - bool GotoPrevNum( SwPosition&, bool bOverUpper = true, + static bool GotoPrevNum( SwPosition&, bool bOverUpper = true, sal_uInt8* pUpper = 0, sal_uInt8* pLower = 0 ); /** Searches for a text node with a numbering rule. @@ -1268,12 +1268,12 @@ public: bool IsInsTblAlignNum() const; // From FEShell (for Undo and BModified). - void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = 0 ) const; + static void GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, + const SwCellFrm* pBoxFrm = 0 ); void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly, const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 ); - void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm = 0 ) const; + static void GetTabRows( SwTabCols &rFill, const SwCursor* pCrsr, + const SwCellFrm* pBoxFrm = 0 ); void SetTabRows( const SwTabCols &rNew, bool bCurColOnly, const SwCursor* pCrsr, const SwCellFrm* pBoxFrm = 0 ); @@ -1368,9 +1368,9 @@ public: SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &, SwTOXBase const*const pTOXBase = 0, SfxItemSet const*const pAttr = 0, bool const bUpdate = true); - sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange, - const SwNode** ppSttNd = 0 ) const; - SwSection* GetCurrSection( const SwPosition& rPos ) const; + static sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange, + const SwNode** ppSttNd = 0 ); + static SwSection* GetCurrSection( const SwPosition& rPos ); SwSectionFmts& GetSections() { return *mpSectionFmtTbl; } const SwSectionFmts& GetSections() const { return *mpSectionFmtTbl; } SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom ); @@ -1509,17 +1509,17 @@ public: const bool _bPosCorr ); void SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew ); - void GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const; + static void GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ); void SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew ); - void GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const; + static void GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ); bool BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly = true ); void SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew ); - bool GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const; + static bool GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ); void SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ); void SetTabLineStyle( const SwCursor& rCursor, const Color* pColor, bool bSetLine, const editeng::SvxBorderLine* pBorderLine ); - void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const; + static void GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ); void SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ); /** Retrieves a box attribute from the given cursor. @@ -1531,9 +1531,9 @@ public: the values of the same property over any other boxes in the selection; if any value is different from that of the first box, the property is unset (and false is returned). */ - bool GetBoxAttr( const SwCursor& rCursor, SfxPoolItem &rToFill ) const; + static bool GetBoxAttr( const SwCursor& rCursor, SfxPoolItem &rToFill ); void SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign ); - sal_uInt16 GetBoxAlign( const SwCursor& rCursor ) const; + static sal_uInt16 GetBoxAlign( const SwCursor& rCursor ); void AdjustCellWidth( const SwCursor& rCursor, bool bBalance = false ); SwChainRet Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest ); @@ -1560,7 +1560,7 @@ public: void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; } // Interface for the list of Ruby - texts/attributes - sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList, + static sal_uInt16 FillRubyList( const SwPaM& rPam, SwRubyList& rList, sal_uInt16 nMode ); sal_uInt16 SetRubyList( const SwPaM& rPam, const SwRubyList& rList, sal_uInt16 nMode ); @@ -1599,7 +1599,7 @@ public: @param bValue - true mark the level - false unmark the level */ - void MarkListLevel( SwList& rList, + static void MarkListLevel( SwList& rList, const int nListLevel, const bool bValue ); @@ -1629,9 +1629,9 @@ public: @return the textual description of rPaM */ - OUString GetPaMDescr(const SwPaM & rPaM) const; + static OUString GetPaMDescr(const SwPaM & rPaM); - bool IsFirstOfNumRuleAtPos( const SwPosition & rPos ); + static bool IsFirstOfNumRuleAtPos( const SwPosition & rPos ); // access methods for XForms model(s) diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index 386bf5135442..c671a695b921 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -108,7 +108,7 @@ public: bool Contains(Value const& p) const { return std::find(begin(), end(), p) != end(); } - void dumpAsXml(struct _xmlTextWriter* /*pWriter*/) const {}; + static void dumpAsXml(struct _xmlTextWriter* /*pWriter*/) {}; }; template<typename Value> diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 4129d33b47b6..5bb92646b171 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -182,7 +182,7 @@ class SwAuthorFieldType : public SwFieldType public: SwAuthorFieldType(); - OUString Expand(sal_uLong) const; + static OUString Expand(sal_uLong); virtual SwFieldType* Copy() const SAL_OVERRIDE; }; @@ -331,8 +331,8 @@ public: void Evaluate(SwDoc*); inline void SetValue(bool bHidden) { bIsHidden = bHidden; } - OUString GetColumnName(const OUString& rName); - OUString GetDBName(const OUString& rName, SwDoc *pDoc); + static OUString GetColumnName(const OUString& rName); + static OUString GetDBName(const OUString& rName, SwDoc *pDoc); /// Condition virtual void SetPar1(const OUString& rStr) SAL_OVERRIDE; @@ -531,7 +531,7 @@ public: inline void SetData(const OUString& rStr) { aData = rStr; } - OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat) const; + static OUString Expand(sal_uInt16 nSubType, sal_uInt32 nFormat); virtual SwFieldType* Copy() const SAL_OVERRIDE; }; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index cca79a15030b..c95e682dd85f 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -423,7 +423,7 @@ public: const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, bool bCreate = false ); void SetDefaultTOXBase(const SwTOXBase& rBase); - bool IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const; + static bool IsTOXBaseReadonly(const SwTOXBase& rTOXBase); void SetTOXBaseReadonly(const SwTOXBase& rTOXBase, bool bReadonly); sal_uInt16 GetTOXCount() const; @@ -673,7 +673,7 @@ public: void HyphIgnore(); /// For Inserting SoftHyphen. Position is offset within the syllabificated word. - void InsertSoftHyph( const sal_Int32 nHyphPos ); + static void InsertSoftHyph( const sal_Int32 nHyphPos ); const SwTable& InsertTable( const SwInsertTableOptions& rInsTblOpts, ///< ALL_TBL_INS_ATTR sal_uInt16 nRows, sal_uInt16 nCols, @@ -735,22 +735,22 @@ public: bool SpellSentence(svx::SpellPortions& rToFill, bool bIsGrammarCheck ); /// Make SpellIter start with the current sentence when called next time. - void PutSpellingToSentenceStart(); + static void PutSpellingToSentenceStart(); /// Moves the continuation position to the end of the currently checked sentence. - void MoveContinuationPosToEndOfCheckedSentence(); + static void MoveContinuationPosToEndOfCheckedSentence(); /// Applies a changed sentence. void ApplyChangedSentence(const svx::SpellPortions& rNewPortions, bool bRecheck); /// Check SwSpellIter data to see if the last sentence got grammar checked. - bool HasLastSentenceGotGrammarChecked() const; + static bool HasLastSentenceGotGrammarChecked(); /// Is text conversion active somewhere else? - bool HasConvIter() const; + static bool HasConvIter(); /// Is hyphenation active somewhere else? - bool HasHyphIter() const; + static bool HasHyphIter(); ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSpellAlternatives > @@ -762,7 +762,7 @@ public: ::com::sun::star::uno::Sequence< OUString > /*out*/ &rSuggestions, const Point* pPt, SwRect& rSelectRect ); - void IgnoreGrammarErrorAt( SwPaM& rErrorPosition ); + static void IgnoreGrammarErrorAt( SwPaM& rErrorPosition ); void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd ); /// @return reference set in document according to given name. diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 0a54a79e3500..69a2b6529094 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -772,8 +772,8 @@ public: SwTxtNode * GetNumRuleNodeAtPos(const Point &rPot); bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 ); - bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode, - const Point& _rDocPos ) const; + static bool IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode, + const Point& _rDocPos ); void ToggleHeaderFooterEdit( ); }; diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx index a0a41959984c..bf4089a959a4 100644 --- a/sw/inc/list.hxx +++ b/sw/inc/list.hxx @@ -42,7 +42,7 @@ class SwList void InsertListItem( SwNodeNum& rNodeNum, const int nLevel ); - void RemoveListItem( SwNodeNum& rNodeNum ); + static void RemoveListItem( SwNodeNum& rNodeNum ); void InvalidateListTree(); void ValidateListTree(); diff --git a/sw/inc/modcfg.hxx b/sw/inc/modcfg.hxx index e79c23689211..7088f2784fe9 100644 --- a/sw/inc/modcfg.hxx +++ b/sw/inc/modcfg.hxx @@ -73,7 +73,7 @@ class SwRevisionConfig : public utl::ConfigItem sal_uInt16 nMarkAlign; //Revision/LinesChanged/Mark Color aMarkColor; //Revision/LinesChanged/Color - const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + static const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; @@ -97,7 +97,7 @@ class SwCompareConfig : public utl::ConfigItem bool bIgnorePieces; //Compare/Settings/Ignore pieces of length sal_uInt16 nPieceLen; //Compare/Settings/Ignore pieces of length - const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + static const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; @@ -152,7 +152,7 @@ class SwTableConfig : public utl::ConfigItem bool bInsTblChangeNumFormat; // Table/Input/NumberFormatRecognition // Automatic recognition of number formats. bool bInsTblAlignNum; // Table/Input/Alignment // Align numbers. - const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + static const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; @@ -182,7 +182,7 @@ class SwMiscConfig : public utl::ConfigItem OUString sMailingPath; // FormLetter/FileOutput/Path OUString sMailName; // FormLetter/FileOutput/FileName/FromManualSetting (string!) - const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); + static const com::sun::star::uno::Sequence<OUString>& GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx index 4384bcfa4665..158b8dc2d0a8 100644 --- a/sw/inc/ndarr.hxx +++ b/sw/inc/ndarr.hxx @@ -117,7 +117,7 @@ class SW_DLLPUBLIC SwNodes bool bInDelUpdNum : 1; ///< Flag for updating of Outline. // Actions on the nodes. - void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd ); + static void SectionUpDown( const SwNodeIndex & aStart, const SwNodeIndex & aEnd ); void DelNodes( const SwNodeIndex& rStart, sal_uLong nCnt = 1 ); void ChgNode( SwNodeIndex& rDelPos, sal_uLong nSize, @@ -167,7 +167,7 @@ public: Implementation in doc.hxx (because one needs to know Doc for it) ! */ bool IsDocNodes() const; - sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex) const; + static sal_uInt16 GetSectionLevel(const SwNodeIndex &rIndex); void Delete(const SwNodeIndex &rPos, sal_uLong nNodes = 1); bool _MoveNodes( const SwNodeRange&, SwNodes& rNodes, const SwNodeIndex&, @@ -183,11 +183,11 @@ public: bool CheckNodesRange( const SwNodeIndex& rStt, const SwNodeIndex& rEnd ) const; - void GoStartOfSection(SwNodeIndex *) const; - void GoEndOfSection(SwNodeIndex *) const; + static void GoStartOfSection(SwNodeIndex *); + static void GoEndOfSection(SwNodeIndex *); SwCntntNode* GoNext(SwNodeIndex *) const; - SwCntntNode* GoPrevious(SwNodeIndex *) const; + static SwCntntNode* GoPrevious(SwNodeIndex *); /** Go to next/previous Cntnt/Table-node for which LayoutFrames exist. While doing this do not leave Header/Footer/Frame etc. */ @@ -198,13 +198,13 @@ public: (Both set FALSE ==> GoNext/GoPrevious!!!). */ SwCntntNode* GoNextSection( SwNodeIndex *, bool bSkipHidden = true, bool bSkipProtect = true ) const; - SwCntntNode* GoPrevSection( SwNodeIndex *, bool bSkipHidden = true, - bool bSkipProtect = true ) const; + static SwCntntNode* GoPrevSection( SwNodeIndex *, bool bSkipHidden = true, + bool bSkipProtect = true ); /** Create an empty section of Start- and EndNote. It may be called only if a new section with content is to be created, e.g. at filters/Undo/... */ - SwStartNode* MakeEmptySection( const SwNodeIndex& rIdx, + static SwStartNode* MakeEmptySection( const SwNodeIndex& rIdx, SwStartNodeType = SwNormalStartNode ); /// Implementations of "Make...Node" are in the given .cxx-files. @@ -216,7 +216,7 @@ public: SwTxtFmtColl *pColl, SwAttrSet* pAutoAttr = 0 ); - SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere, + static SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic, @@ -224,7 +224,7 @@ public: SwAttrSet* pAutoAttr = 0, bool bDelayed = false ); ///< in ndgrf.cxx - SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere, + static SwGrfNode *MakeGrfNode( const SwNodeIndex & rWhere, const GraphicObject& rGrfObj, SwGrfFmtColl *pColl, SwAttrSet* pAutoAttr = 0 ); ///< in ndgrf.cxx @@ -253,7 +253,7 @@ public: adjust in pCntntTxtColl or pHeadlineTxtColl this adjust item overrides the item in pAttrSet. */ - SwTableNode* InsertTable( const SwNodeIndex& rNdIdx, + static SwTableNode* InsertTable( const SwNodeIndex& rNdIdx, sal_uInt16 nBoxes, SwTxtFmtColl* pCntntTxtColl, sal_uInt16 nLines = 0, sal_uInt16 nRepeat = 0, SwTxtFmtColl* pHeadlineTxtColl = 0, @@ -267,7 +267,7 @@ public: SwTxtFmtColl* pTxtColl, SwUndoTxtToTbl* pUndo = 0 ); - SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange); + static SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange); /// create a table from a vector of NodeRanges - API support SwTableNode* TextToTable( const TableRanges_t& rTableNodes, diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx index 740a561f6ba0..058d57d815ca 100644 --- a/sw/inc/reffld.hxx +++ b/sw/inc/reffld.hxx @@ -91,9 +91,9 @@ private: virtual SwField* Copy() const SAL_OVERRIDE; // #i81002# - OUString MakeRefNumStr( const SwTxtNode& rTxtNodeOfField, + static OUString MakeRefNumStr( const SwTxtNode& rTxtNodeOfField, const SwTxtNode& rTxtNodeOfReferencedItem, - const sal_uInt32 nRefNumFormat ) const; + const sal_uInt32 nRefNumFormat ); public: SwGetRefField( SwGetRefFieldType*, const OUString& rSetRef, diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index a3080ab19ec9..6dc7d17a4d88 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -236,7 +236,7 @@ public: void CreateLink( LinkCreateType eType ); - void MakeChildLinksVisible( const SwSectionNode& rSectNd ); + static void MakeChildLinksVisible( const SwSectionNode& rSectNd ); bool IsLinkType() const { return m_Data.IsLinkType(); } diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index f62df9ad2f7a..83aff3c1d44b 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -447,8 +447,8 @@ public: // Stream-specific routines. Do not use in storage-writer! // Optimizing output on stream. - SvStream& OutLong( SvStream& rStrm, long nVal ); - SvStream& OutULong( SvStream& rStrm, sal_uLong nVal ); + static SvStream& OutLong( SvStream& rStrm, long nVal ); + static SvStream& OutULong( SvStream& rStrm, sal_uLong nVal ); inline SvStream& OutLong( long nVal ) { return OutLong( Strm(), nVal ); } inline SvStream& OutULong( sal_uLong nVal ) { return OutULong( Strm(), nVal ); } diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index f016ac3cdfca..0b5504a57c3a 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -181,7 +181,7 @@ public: bool IsEmbeddedLoadSave() const { return bEmbeddedLoadSave; } void SetEmbeddedLoadSave( bool bFlag ) { bEmbeddedLoadSave = bFlag; } - void ShowDBObj( SwView& rView, const SwDBData& rData, bool bOnlyIfAvailable = false); + static void ShowDBObj( SwView& rView, const SwDBData& rData, bool bOnlyIfAvailable = false); // Table modi. bool IsInsTblFormatNum(bool bHTML) const; @@ -227,7 +227,7 @@ public: void RemoveAttrPool(); // Invalidates online spell-wrong-lists if necessary. - void CheckSpellChanges( bool bOnlineSpelling, + static void CheckSpellChanges( bool bOnlineSpelling, bool bIsSpellWrongAgain, bool bIsSpellAllAgain, bool bSmartTags ); inline ::com::sun::star::uno::Reference< diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index eb303d619e60..ac000d87757b 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -296,8 +296,8 @@ public: // rBoxes as a return value for immediate use. // steht. rBoxes auch als Return-Wert, um es gleich weiter zu benutzen // bToTop = true -> up to base line, false-> else only line of box. - SwSelBoxes& SelLineFromBox( const SwTableBox* pBox, - SwSelBoxes& rBoxes, bool bToTop = true ) const; + static SwSelBoxes& SelLineFromBox( const SwTableBox* pBox, + SwSelBoxes& rBoxes, bool bToTop = true ); // Get information from client. virtual bool GetInfo( SfxPoolItem& ) const SAL_OVERRIDE; @@ -392,7 +392,7 @@ class SW_DLLPUBLIC SwTableBox: public SwClient //Client of FrmFmt. // In case Format contains formulas/values already, // a new one must be created for the new box. - SwTableBoxFmt* CheckBoxFmt( SwTableBoxFmt* ); + static SwTableBoxFmt* CheckBoxFmt( SwTableBoxFmt* ); public: TYPEINFO_OVERRIDE(); diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index a27ce713d389..9ec5e4dc7d88 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -56,9 +56,9 @@ protected: bool bCacheComment; mutable OUString * pComment; - void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = 0 ); - void RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext ); - void RemoveIdxRel( sal_uLong, const SwPosition& ); + static void RemoveIdxFromSection( SwDoc&, sal_uLong nSttIdx, sal_uLong* pEndIdx = 0 ); + static void RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext ); + static void RemoveIdxRel( sal_uLong, const SwPosition& ); static bool CanRedlineGroup( SwRedlineSaveDatas& rCurr, const SwRedlineSaveDatas& rCheck, @@ -150,10 +150,10 @@ protected: // content. So the attributes do not get expanded. // MoveTo: moves from the NodesArray into the UndoNodesArray. // MoveFrom: moves from the UndoNodesArray into the NodesArray. - void MoveToUndoNds( SwPaM& rPam, + static void MoveToUndoNds( SwPaM& rPam, SwNodeIndex* pNodeIdx = 0, sal_uLong* pEndNdIdx = 0, sal_Int32 * pEndCntIdx = 0 ); - void MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, + static void MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx, SwPosition& rInsPos, sal_uLong* pEndNdIdx = 0, sal_Int32 * pEndCntIdx = 0 ); @@ -161,8 +161,8 @@ protected: // a range can be spanned for Undo/Redo. (In this case the SPoint // is before the manipulated range!!) // The flag indicates if there is content before the SPoint. - bool MovePtBackward( SwPaM& rPam ); - void MovePtForward( SwPaM& rPam, bool bMvBkwrd ); + static bool MovePtBackward( SwPaM& rPam ); + static void MovePtForward( SwPaM& rPam, bool bMvBkwrd ); // Before moving stuff into UndoNodes-Array care has to be taken that // the content-bearing attributes are removed from the nodes-array. @@ -190,8 +190,8 @@ public: SwUndoSaveSection(); ~SwUndoSaveSection(); - void SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx ); - void SaveSection( SwDoc* pDoc, const SwNodeRange& rRange ); + void SaveSection( const SwNodeIndex& rSttIdx ); + void SaveSection( const SwNodeRange& rRange ); void RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, sal_uInt16 nSectType ); void RestoreSection( SwDoc* pDoc, const SwNodeIndex& rInsPos ); diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index 7c85f9b24b5a..60282bf0ce52 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -150,7 +150,7 @@ class SwChartDataProvider : ::com::sun::star::uno::RuntimeException, std::exception); - OUString GetBrokenCellRangeForExport( const OUString &rCellRangeRepresentation ); + static OUString GetBrokenCellRangeForExport( const OUString &rCellRangeRepresentation ); protected: //SwClient diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 33c7bd9209a2..68e4d40e2910 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -60,7 +60,7 @@ public: SdrView* GetDrawView() {return mpView;} SdrPageView* GetPageView(); void RemovePageView(); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetInterface( SdrObject* pObj ); + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetInterface( SdrObject* pObj ); // The following method is called when a SvxShape-object is to be created. // Derived classes may obtain at this point a derivation or an object diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 20c94039808a..ffe6985b43ec 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -428,7 +428,7 @@ public: sal_uInt16 getRowCount(); sal_uInt16 getColumnCount(); - ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable, + static ::com::sun::star::uno::Reference< ::com::sun::star::table::XCellRange > GetRangeByName(SwFrmFmt* pFmt, SwTable* pTable, const OUString& sTLName, const OUString& sBRName, SwRangeDescriptor& rDesc); diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx index 87dc830856c8..8f10c195d0e6 100644 --- a/sw/inc/viewopt.hxx +++ b/sw/inc/viewopt.hxx @@ -178,9 +178,9 @@ public: SwViewOption(const SwViewOption&); ~SwViewOption(); - void Init( vcl::Window *pWin ); // Initializing of static data. + static void Init( vcl::Window *pWin ); // Initializing of static data. - sal_uInt16 GetPixelTwips() const { return nPixelTwips; } + static sal_uInt16 GetPixelTwips() { return nPixelTwips; } inline sal_uInt32 GetCoreOptions() const {return nCoreOptions;} inline void SetUIOptions( const SwViewOption& ); @@ -244,9 +244,9 @@ public: { return (nCoreOptions & VIEWOPT_1_POSTITS) != 0; } inline void SetPostIts( bool b ) { b ? (nCoreOptions |= VIEWOPT_1_POSTITS ) : ( nCoreOptions &= ~VIEWOPT_1_POSTITS); } - void PaintPostIts( OutputDevice *pOut, const SwRect &rRect, - bool bIsScript ) const; - sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 ) const; + static void PaintPostIts( OutputDevice *pOut, const SwRect &rRect, + bool bIsScript ); + static sal_uInt16 GetPostItsWidth( const OutputDevice *pOut = 0 ); inline bool IsShowHiddenChar(bool bHard = false) const { return !bReadonly && (nCoreOptions & VIEWOPT_1_CHAR_HIDDEN) && @@ -388,7 +388,7 @@ public: inline bool IsPagePrevBookview() const { return mbBookView; } inline void SetPagePrevBookview(bool bSet) { mbBookView = bSet; } - bool IsAutoCompleteWords() const; + static bool IsAutoCompleteWords(); bool IsViewLayoutBookMode() const { return mbViewLayoutBookMode; } void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; } @@ -422,8 +422,8 @@ public: inline sal_uInt16 GetZoom() const { return nZoom; } inline void SetZoom( sal_uInt16 n ){ nZoom = n; } - void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ) const; - void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ) const; + static void DrawRect( OutputDevice* pOut, const SwRect &rRect, long nCol ); + static void DrawRectPrinter( OutputDevice* pOut, const SwRect& rRect ); SwViewOption& operator=( const SwViewOption &rOpt ); @@ -584,7 +584,7 @@ public: static void SetAppearanceFlag(sal_Int32 nFlag, bool bSet, bool bSaveInConfig = false); - void SetDocBoundaries(bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);} + static void SetDocBoundaries(bool bSet) {SetAppearanceFlag(VIEWOPT_DOC_BOUNDARIES, bSet);} static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig); }; diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 71c4a1e7e63b..b4c0782d42b8 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -673,7 +673,7 @@ class SwAccPreviewData input parameter - constant reference to the preview window size in TWIP; needed to determine the visible part of the logic page rectangle */ - void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect, + static void AdjustLogicPgRectToVisibleArea( SwRect& _iorLogicPgSwRect, const SwRect& _rPreviewPgSwRect, const Size& _rPreviewWinSize ); diff --git a/sw/source/core/access/accpara.hxx b/sw/source/core/access/accpara.hxx index 52f3a2e4706d..d0e53dccda8f 100644 --- a/sw/source/core/access/accpara.hxx +++ b/sw/source/core/access/accpara.hxx @@ -96,7 +96,7 @@ class SwAccessibleParagraph : /// get the (accessible) text string (requires frame; check before) OUString GetString(); - OUString GetDescription(); + static OUString GetDescription(); // get the current care position sal_Int32 GetCaretPos(); @@ -121,16 +121,16 @@ class SwAccessibleParagraph : // methods for checking the parameter range: // does nPos point to a char? - bool IsValidChar(sal_Int32 nPos, sal_Int32 nLength); + static bool IsValidChar(sal_Int32 nPos, sal_Int32 nLength); // does nPos point to a position? (may be behind the last character) - bool IsValidPosition(sal_Int32 nPos, sal_Int32 nLength); + static bool IsValidPosition(sal_Int32 nPos, sal_Int32 nLength); // is nBegin...nEnd a valid range? (nEnd points past the last character) - bool IsValidRange(sal_Int32 nBegin, sal_Int32 nEnd, sal_Int32 nLength); + static bool IsValidRange(sal_Int32 nBegin, sal_Int32 nEnd, sal_Int32 nLength); // Ensure ordered range (i.e. nBegin is smaller then nEnd) - void OrderRange(sal_Int32& nBegin, sal_Int32& nEnd) + static void OrderRange(sal_Int32& nBegin, sal_Int32& nEnd) { if( nBegin > nEnd ) { @@ -214,7 +214,7 @@ protected: bool GetLineBoundary( com::sun::star::i18n::Boundary& rBound, const OUString& rText, sal_Int32 nPos ); - bool GetParagraphBoundary( com::sun::star::i18n::Boundary& rBound, + static bool GetParagraphBoundary( com::sun::star::i18n::Boundary& rBound, const OUString& rText, sal_Int32 nPos ); bool GetAttributeBoundary( com::sun::star::i18n::Boundary& rBound, diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 8eadf58e11dd..f9359fe76666 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -397,7 +397,7 @@ sal_Int32 SwAccessiblePortionData::GetModelPosition( sal_Int32 nPos ) const void SwAccessiblePortionData::FillBoundary( Boundary& rBound, const Positions_t& rPositions, - size_t nPos ) const + size_t nPos ) { rBound.startPos = rPositions[nPos]; rBound.endPos = rPositions[nPos+1]; @@ -405,7 +405,7 @@ void SwAccessiblePortionData::FillBoundary( size_t SwAccessiblePortionData::FindBreak( const Positions_t& rPositions, - sal_Int32 nValue ) const + sal_Int32 nValue ) { OSL_ENSURE( rPositions.size() >= 2, "need min + max value" ); OSL_ENSURE( rPositions[0] <= nValue, "need min value" ); @@ -462,7 +462,7 @@ size_t SwAccessiblePortionData::FindBreak( size_t SwAccessiblePortionData::FindLastBreak( const Positions_t& rPositions, - sal_Int32 nValue ) const + sal_Int32 nValue ) { size_t nResult = FindBreak( rPositions, nValue ); diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx index 3db82a68c540..d3f879862b05 100644 --- a/sw/source/core/access/accportions.hxx +++ b/sw/source/core/access/accportions.hxx @@ -71,15 +71,15 @@ class SwAccessiblePortionData : public SwPortionHandler /// returns the index of the first position whose value is smaller /// or equal, and whose following value is equal or larger - size_t FindBreak( const Positions_t& rPositions, sal_Int32 nValue ) const; + static size_t FindBreak( const Positions_t& rPositions, sal_Int32 nValue ); /// like FindBreak, but finds the last equal or larger position - size_t FindLastBreak( const Positions_t& rPositions, sal_Int32 nValue ) const; + static size_t FindLastBreak( const Positions_t& rPositions, sal_Int32 nValue ); /// fill the boundary with the values from rPositions[nPos] - void FillBoundary(com::sun::star::i18n::Boundary& rBound, + static void FillBoundary(com::sun::star::i18n::Boundary& rBound, const Positions_t& rPositions, - size_t nPos ) const; + size_t nPos ); /// Access to portion attributes bool IsPortionAttrSet( size_t nPortionNo, sal_uInt8 nAttr ) const; diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx index 7781c8085dea..468bd72ce3b0 100644 --- a/sw/source/core/bastyp/SwSmartTagMgr.cxx +++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx @@ -53,7 +53,7 @@ void SwSmartTagMgr::modified( const lang::EventObject& rEO ) throw( RuntimeExcep SolarMutexGuard aGuard; // Installed recognizers have changed. We remove all existing smart tags: - SW_MOD()->CheckSpellChanges( false, true, true, true ); + SwModule::CheckSpellChanges( false, true, true, true ); SmartTagMgr::modified( rEO ); } @@ -63,7 +63,7 @@ void SwSmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) throw( R SolarMutexGuard aGuard; // Configuration has changed. We remove all existing smart tags: - SW_MOD()->CheckSpellChanges( false, true, true, true ); + SwModule::CheckSpellChanges( false, true, true, true ); SmartTagMgr::changesOccurred( rEvent ); } diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 2085aaad4bac..98e3360c8515 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -605,7 +605,7 @@ void SwCrsrShell::ExtendedSelectAll(bool bFootnotes) pPos->nContent.Assign( rNodes.GoNext( &pPos->nNode ), 0 ); pPos = m_pCurCrsr->GetMark(); pPos->nNode = rNodes.GetEndOfContent(); - SwCntntNode* pCNd = rNodes.GoPrevious( &pPos->nNode ); + SwCntntNode* pCNd = SwNodes::GoPrevious( &pPos->nNode ); pPos->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 ); } @@ -616,7 +616,7 @@ bool SwCrsrShell::ExtendedSelectedAll(bool bFootnotes) SwCntntNode* pStart = rNodes.GoNext(&nNode); nNode = rNodes.GetEndOfContent(); - SwCntntNode* pEnd = rNodes.GoPrevious(&nNode); + SwCntntNode* pEnd = SwNodes::GoPrevious(&nNode); if (!pStart || !pEnd) return false; @@ -2435,7 +2435,7 @@ bool SwCrsrShell::IsEndOfDoc() const SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfContent(), -1 ); SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode(); if( !pCNd ) - pCNd = GetDoc()->GetNodes().GoPrevious( &aIdx ); + pCNd = SwNodes::GoPrevious( &aIdx ); return aIdx == m_pCurCrsr->GetPoint()->nNode && pCNd->Len() == m_pCurCrsr->GetPoint()->nContent.GetIndex(); @@ -2883,19 +2883,22 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText ) ( !IsReadOnlyAvailable() && pSectNd->GetSection().IsProtectFlag() )) ) { - typedef SwCntntNode* (SwNodes:: *FNGoSection)( SwNodeIndex *, bool, bool ) const; - FNGoSection funcGoSection = &SwNodes::GoNextSection; - bOk = false; - + bool bGoNextSection = true; for( int nLoopCnt = 0; !bOk && nLoopCnt < 2; ++nLoopCnt ) { bool bContinue; do { bContinue = false; - while( 0 != ( pCNd = (rNds.*funcGoSection)( &rNdIdx, - true, !IsReadOnlyAvailable() )) ) + for (;;) { + if (bGoNextSection) + pCNd = rNds.GoNextSection( &rNdIdx, + true, !IsReadOnlyAvailable() ); + else + pCNd = SwNodes::GoPrevSection( &rNdIdx, + true, !IsReadOnlyAvailable() ); + if ( pCNd == 0) break; // moved inside a table -> check if it is protected if( pCNd->FindTableNode() ) { @@ -2939,7 +2942,7 @@ bool SwCrsrShell::FindValidCntntNode( bool bOnlyText ) if( !bOk ) { if( !nLoopCnt ) - funcGoSection = &SwNodes::GoPrevSection; + bGoNextSection = false; rNdIdx = nNdIdx; } } @@ -3272,7 +3275,7 @@ void SwCrsrShell::ClearUpCrsrs() SwNodes & aNodes = GetDoc()->GetNodes(); const SwNode* pStart = lcl_NodeContext( pStartCrsr->GetPoint()->nNode.GetNode() ); SwNodeIndex aIdx( pStartCrsr->GetPoint()->nNode ); - SwNode * pNode = aNodes.GoPrevious(&aIdx); + SwNode * pNode = SwNodes::GoPrevious(&aIdx); if( pNode == NULL || lcl_NodeContext( *pNode ) != pStart ) aNodes.GoNext( &aIdx ); if( pNode == NULL || lcl_NodeContext( *pNode ) != pStart ) @@ -3309,7 +3312,7 @@ OUString SwCrsrShell::GetCrsrDescr() const if (IsMultiSelection()) aResult += SW_RES(STR_MULTISEL); else - aResult = GetDoc()->GetPaMDescr(*GetCrsr()); + aResult = SwDoc::GetPaMDescr(*GetCrsr()); return aResult; } diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index b0caa5609db3..32ceba63ebbd 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -107,7 +107,7 @@ void SwCrsrShell::MoveCrsrToNum() /// go to next/previous point on the same level bool SwCrsrShell::GotoNextNum() { - if (!GetDoc()->GotoNextNum( *m_pCurCrsr->GetPoint() )) + if (!SwDoc::GotoNextNum( *m_pCurCrsr->GetPoint() )) return false; MoveCrsrToNum(); return true; @@ -115,7 +115,7 @@ bool SwCrsrShell::GotoNextNum() bool SwCrsrShell::GotoPrevNum() { - if (!GetDoc()->GotoPrevNum( *m_pCurCrsr->GetPoint() )) + if (!SwDoc::GotoPrevNum( *m_pCurCrsr->GetPoint() )) return false; MoveCrsrToNum(); return true; @@ -364,7 +364,7 @@ bool SwCrsrShell::GotoTOXMarkBase() bool bRet = false; SwTOXMarks aMarks; - sal_uInt16 nCnt = GetDoc()->GetCurTOXMark( *m_pCurCrsr->GetPoint(), aMarks ); + sal_uInt16 nCnt = SwDoc::GetCurTOXMark( *m_pCurCrsr->GetPoint(), aMarks ); if( nCnt ) { // Take the 1. and get the index type. Search in its dependency list @@ -802,7 +802,7 @@ bool SwCrsrShell::GotoFld( const SwFmtFld& rFld ) SwTxtFld * SwCrsrShell::GetTxtFldAtPos( const SwPosition* pPos, - const bool bIncludeInputFldAtStart ) const + const bool bIncludeInputFldAtStart ) { SwTxtFld* pTxtFld = NULL; @@ -817,7 +817,7 @@ SwTxtFld * SwCrsrShell::GetTxtFldAtPos( SwField* SwCrsrShell::GetFieldAtCrsr( const SwPaM* pCrsr, - const bool bIncludeInputFldAtStart ) const + const bool bIncludeInputFldAtStart ) { SwField* pFieldAtCrsr = NULL; @@ -869,7 +869,7 @@ bool SwCrsrShell::CrsrInsideInputFld() const return false; } -bool SwCrsrShell::PosInsideInputFld( const SwPosition& rPos ) const +bool SwCrsrShell::PosInsideInputFld( const SwPosition& rPos ) { return dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, false )) != NULL; } @@ -885,7 +885,7 @@ bool SwCrsrShell::DocPtInsideInputFld( const Point& rDocPt ) const return false; } -sal_Int32 SwCrsrShell::StartOfInputFldAtPos( const SwPosition& rPos ) const +sal_Int32 SwCrsrShell::StartOfInputFldAtPos( const SwPosition& rPos ) { const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, true )); if ( pTxtInputFld == NULL ) @@ -896,7 +896,7 @@ sal_Int32 SwCrsrShell::StartOfInputFldAtPos( const SwPosition& rPos ) const return pTxtInputFld->GetStart(); } -sal_Int32 SwCrsrShell::EndOfInputFldAtPos( const SwPosition& rPos ) const +sal_Int32 SwCrsrShell::EndOfInputFldAtPos( const SwPosition& rPos ) { const SwTxtInputFld* pTxtInputFld = dynamic_cast<const SwTxtInputFld*>(GetTxtFldAtPos( &rPos, true )); if ( pTxtInputFld == NULL ) @@ -2034,7 +2034,7 @@ const SwRangeRedline* SwCrsrShell::_GotoRedline( sal_uInt16 nArrPos, bool bSelec pIdx = &m_pCurCrsr->GetPoint()->nNode; if( !pIdx->GetNode().IsCntntNode() && - 0 != ( pCNd = GetDoc()->GetNodes().GoPrevSection( pIdx, + 0 != ( pCNd = SwNodes::GoPrevSection( pIdx, true, IsReadOnlyAvailable() )) ) { if( *pIdx >= m_pCurCrsr->GetMark()->nNode ) diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index be811b4c03d3..d09e1f3a90ad 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -309,7 +309,7 @@ SwCntntNode* GoNextNds( SwNodeIndex* pIdx, bool bChk ) SwCntntNode* GoPreviousNds( SwNodeIndex * pIdx, bool bChk ) { SwNodeIndex aIdx( *pIdx ); - SwCntntNode* pNd = aIdx.GetNodes().GoPrevious( &aIdx ); + SwCntntNode* pNd = SwNodes::GoPrevious( &aIdx ); if( pNd ) { if( bChk && 1 != pIdx->GetIndex() - aIdx.GetIndex() && @@ -790,7 +790,7 @@ SwCntntNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFn fnMove, { pNd = bSrchForward ? rNodes.GoNextSection( &aPos.nNode, true, !bInReadOnly ) - : rNodes.GoPrevSection( &aPos.nNode, true, !bInReadOnly ); + : SwNodes::GoPrevSection( &aPos.nNode, true, !bInReadOnly ); if( pNd ) { aPos.nContent.Assign( pNd, ::GetSttOrEnd( bSrchForward,*pNd )); @@ -842,10 +842,10 @@ void GoStartSection( SwPosition * pPos ) { // jump to section's beginning SwNodes& rNodes = pPos->nNode.GetNodes(); - sal_uInt16 nLevel = rNodes.GetSectionLevel( pPos->nNode ); + sal_uInt16 nLevel = SwNodes::GetSectionLevel( pPos->nNode ); if( pPos->nNode < rNodes.GetEndOfContent().StartOfSectionIndex() ) nLevel--; - do { rNodes.GoStartOfSection( &pPos->nNode ); } while( nLevel-- ); + do { SwNodes::GoStartOfSection( &pPos->nNode ); } while( nLevel-- ); // already on a CntntNode pPos->nNode.GetNode().GetCntntNode()->MakeStartIndex( &pPos->nContent ); @@ -856,10 +856,10 @@ void GoEndSection( SwPosition * pPos ) { // jump to section's beginning/end SwNodes& rNodes = pPos->nNode.GetNodes(); - sal_uInt16 nLevel = rNodes.GetSectionLevel( pPos->nNode ); + sal_uInt16 nLevel = SwNodes::GetSectionLevel( pPos->nNode ); if( pPos->nNode < rNodes.GetEndOfContent().StartOfSectionIndex() ) nLevel--; - do { rNodes.GoEndOfSection( &pPos->nNode ); } while( nLevel-- ); + do { SwNodes::GoEndOfSection( &pPos->nNode ); } while( nLevel-- ); // now on a EndNode, thus to the previous CntntNode if( GoPreviousNds( &pPos->nNode, true ) ) @@ -979,8 +979,7 @@ bool GoCurrSection( SwPaM & rPam, SwMoveFn fnMove ) { SwPosition& rPos = *rPam.GetPoint(); SwPosition aSavePos( rPos ); // position for comparison - SwNodes& rNds = aSavePos.nNode.GetNodes(); - (rNds.*fnMove->fnSection)( &rPos.nNode ); + (fnMove->fnSection)( &rPos.nNode ); SwCntntNode *pNd; if( 0 == ( pNd = rPos.nNode.GetNode().GetCntntNode()) && 0 == ( pNd = (*fnMove->fnNds)( &rPos.nNode, true )) ) @@ -998,8 +997,7 @@ bool GoNextSection( SwPaM & rPam, SwMoveFn fnMove ) { SwPosition& rPos = *rPam.GetPoint(); SwPosition aSavePos( rPos ); // position for comparison - SwNodes& rNds = aSavePos.nNode.GetNodes(); - rNds.GoEndOfSection( &rPos.nNode ); + SwNodes::GoEndOfSection( &rPos.nNode ); // no other CntntNode existent? if( !GoInCntnt( rPam, fnMoveForward ) ) @@ -1007,7 +1005,7 @@ bool GoNextSection( SwPaM & rPam, SwMoveFn fnMove ) rPos = aSavePos; // do not change cursor return false; } - (rNds.*fnMove->fnSection)( &rPos.nNode ); + (fnMove->fnSection)( &rPos.nNode ); SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode(); rPos.nContent.Assign( pNd, ::GetSttOrEnd( fnMove == fnMoveForward, *pNd ) ); @@ -1018,8 +1016,7 @@ bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove ) { SwPosition& rPos = *rPam.GetPoint(); SwPosition aSavePos( rPos ); // position for comparison - SwNodes& rNds = aSavePos.nNode.GetNodes(); - rNds.GoStartOfSection( &rPos.nNode ); + SwNodes::GoStartOfSection( &rPos.nNode ); // no further CntntNode existent? if( !GoInCntnt( rPam, fnMoveBackward )) @@ -1027,7 +1024,7 @@ bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove ) rPos = aSavePos; // do not change cursor return false; } - (rNds.*fnMove->fnSection)( &rPos.nNode ); + (fnMove->fnSection)( &rPos.nNode ); SwCntntNode *pNd = rPos.nNode.GetNode().GetCntntNode(); rPos.nContent.Assign( pNd, ::GetSttOrEnd( fnMove == fnMoveForward, *pNd )); diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index dcca20dbf38c..0000eb965aa5 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -265,12 +265,12 @@ bool SwCursor::IsSelOvr( int eFlags ) bool bGoNxt = m_pSavePos->nNode < rPtIdx.GetIndex(); SwCntntNode* pCNd = bGoNxt ? rNds.GoNextSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections) - : rNds.GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections); + : SwNodes::GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections); if( !pCNd && ( nsSwCursorSelOverFlags::SELOVER_ENABLEREVDIREKTION & eFlags )) { bGoNxt = !bGoNxt; pCNd = bGoNxt ? rNds.GoNextSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections) - : rNds.GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections); + : SwNodes::GoPrevSection( &rPtIdx, bSkipOverHiddenSections, bSkipOverProtectSections); } bool bIsValidPos = 0 != pCNd; @@ -504,7 +504,7 @@ bool SwCursor::IsSelOvr( int eFlags ) pMyNd->StartOfSectionNode()->IsSectionNode() ) ) { pMyNd = bSelTop - ? rNds.GoPrevSection( &GetPoint()->nNode,true,false ) + ? SwNodes::GoPrevSection( &GetPoint()->nNode,true,false ) : rNds.GoNextSection( &GetPoint()->nNode,true,false ); /* #i12312# Handle failure of Go{Prev|Next}Section */ @@ -883,7 +883,7 @@ static bool lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd, rPam.SetMark(); rPam.GetPoint()->nNode = rEndNd; - pCNd = rNds.GoPrevious( &rPam.GetPoint()->nNode ); + pCNd = SwNodes::GoPrevious( &rPam.GetPoint()->nNode ); if( !pCNd ) return false; pCNd->MakeEndIndex( &rPam.GetPoint()->nContent ); @@ -903,7 +903,7 @@ static bool lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd, if( !bFirst ) { rPam.GetPoint()->nNode = rSttNd; - pCNd = rNds.GoPrevious( &rPam.GetPoint()->nNode ); + pCNd = SwNodes::GoPrevious( &rPam.GetPoint()->nNode ); if( !pCNd ) return false; pCNd->MakeEndIndex( &rPam.GetPoint()->nContent ); @@ -1092,7 +1092,7 @@ void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const break; case DOCPOS_END: rPos.nNode = rNds.GetEndOfContent(); - pCNd = rNds.GoPrevious( &rPos.nNode ); + pCNd = SwNodes::GoPrevious( &rPos.nNode ); bIsStart = false; break; case DOCPOS_OTHERSTART: @@ -1101,7 +1101,7 @@ void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const break; case DOCPOS_OTHEREND: rPos.nNode = *rNds.GetEndOfContent().StartOfSectionNode(); - pCNd = rNds.GoPrevious( &rPos.nNode ); + pCNd = SwNodes::GoPrevious( &rPos.nNode ); bIsStart = false; break; default: @@ -2195,7 +2195,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) aIdx.Assign( *pSttNd->EndOfSectionNode(), - 1 ); if( !( pNd = &aIdx.GetNode())->IsCntntNode() ) - pNd = rNds.GoPrevSection( &aIdx, true, false ); + pNd = SwNodes::GoPrevSection( &aIdx, true, false ); pPos = pCur->GetPoint(); if (pNd && pNd != &pPos->nNode.GetNode()) @@ -2240,7 +2240,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr ) SwPosition* pPos = pNew->GetPoint(); pPos->nNode.Assign( *pSttNd->EndOfSectionNode(), - 1 ); if( !( pNd = &pPos->nNode.GetNode())->IsCntntNode() ) - pNd = rNds.GoPrevSection( &pPos->nNode, true, false ); + pNd = SwNodes::GoPrevSection( &pPos->nNode, true, false ); pPos->nContent.Assign(static_cast<SwCntntNode*>(pNd), pNd ? static_cast<SwCntntNode*>(pNd)->Len() : 0); } diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 09bf2b519710..92d40ed3e3a5 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -65,7 +65,7 @@ bool GotoPrevRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, else { aIdx = *pNd->EndOfSectionNode(); - SwCntntNode* pCNd = pNd->GetNodes().GoPrevSection( &aIdx, + SwCntntNode* pCNd = SwNodes::GoPrevSection( &aIdx, true, !bInReadOnly ); if( !pCNd ) { @@ -119,7 +119,7 @@ bool GotoNextRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, else { aIdx = *pNd->EndOfSectionNode(); - SwCntntNode* pCNd = pNd->GetNodes().GoPrevSection( &aIdx, + SwCntntNode* pCNd = SwNodes::GoPrevSection( &aIdx, true, !bInReadOnly ); if( !pCNd ) { @@ -149,7 +149,7 @@ bool GotoCurrRegion( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, if( bMoveBackward ) { SwNodeIndex aIdx( *pNd->EndOfSectionNode() ); - pCNd = pNd->GetNodes().GoPrevSection( &aIdx, true, !bInReadOnly ); + pCNd = SwNodes::GoPrevSection( &aIdx, true, !bInReadOnly ); } else { @@ -182,7 +182,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurCrsr, SwPosRegion fnPosRegion, if( bMoveBackward ) // to the end of the section { SwNodeIndex aIdx( *pNd->EndOfSectionNode() ); - pCNd = pNd->GetNodes().GoPrevSection( &aIdx, true, !bInReadOnly ); + pCNd = SwNodes::GoPrevSection( &aIdx, true, !bInReadOnly ); if( !pCNd ) return false; pPos->nNode = aIdx; diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index d545fd846dd1..33d29140a431 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -92,8 +92,7 @@ bool SwCrsrShell::GoNextCell( bool bAppendLine ) // the document might change; w/o Action views would not be notified static_cast<SwEditShell*>(this)->StartAllAction(); - bRet = mpDoc->InsertRow( pTblNd->GetTable(). - SelLineFromBox( pTableBox, aBoxes, false )); + bRet = mpDoc->InsertRow( SwTable::SelLineFromBox( pTableBox, aBoxes, false )); static_cast<SwEditShell*>(this)->EndAllAction(); } } @@ -434,11 +433,10 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly ) return false; } - SwNodes& rNds = aTmp.GetNode().GetNodes(); SwCntntNode* pCNd = aTmp.GetNode().GetCntntNode(); if( !pCNd ) - pCNd = rNds.GoPrevious( &aTmp ); + pCNd = SwNodes::GoPrevious( &aTmp ); if ( !pCNd ) return false; @@ -459,7 +457,7 @@ static bool lcl_FindPrevCell( SwNodeIndex& rIdx, bool bInReadOnly ) pCNd = aTmp.GetNode().GetCntntNode(); if( 0 == pCNd ) - pCNd = rNds.GoPrevious( &aTmp ); + pCNd = SwNodes::GoPrevious( &aTmp ); if ( !pCNd ) return false; diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index a67aa8815e42..b30639d237df 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -391,7 +391,7 @@ void SwSelPaintRects::HighlightInputFld() if (m_bShowTxtInputFldOverlay) { SwTxtInputFld* pCurTxtInputFldAtCrsr = - dynamic_cast<SwTxtInputFld*>(GetShell()->GetTxtFldAtPos( GetShell()->GetCrsr()->Start(), false )); + dynamic_cast<SwTxtInputFld*>(SwCrsrShell::GetTxtFldAtPos( GetShell()->GetCrsr()->Start(), false )); if ( pCurTxtInputFldAtCrsr != NULL ) { SwTxtNode* pTxtNode = pCurTxtInputFldAtCrsr->GetpTxtNode(); diff --git a/sw/source/core/doc/CntntIdxStore.cxx b/sw/source/core/doc/CntntIdxStore.cxx index 25d4ca3ec8f1..79bf10cd1897 100644 --- a/sw/source/core/doc/CntntIdxStore.cxx +++ b/sw/source/core/doc/CntntIdxStore.cxx @@ -183,9 +183,9 @@ namespace inline void RestoreUnoCrsrs(updater_t& rUpdater); inline void SaveShellCrsrs(SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt); inline void RestoreShellCrsrs(updater_t& rUpdater); - inline const SwPosition& GetRightMarkPos(::sw::mark::IMark* pMark, bool bOther) + static inline const SwPosition& GetRightMarkPos(::sw::mark::IMark* pMark, bool bOther) { return bOther ? pMark->GetOtherMarkPos() : pMark->GetMarkPos(); }; - inline void SetRightMarkPos(MarkBase* pMark, bool bOther, const SwPosition* const pPos) + static inline void SetRightMarkPos(MarkBase* pMark, bool bOther, const SwPosition* const pPos) { bOther ? pMark->SetOtherMarkPos(*pPos) : pMark->SetMarkPos(*pPos); }; }; static inline void lcl_ChkPaM( std::vector<PaMEntry>& rPaMEntries, const sal_uLong nNode, const sal_Int32 nCntnt, SwPaM& rPaM, const bool bPoint) diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index e940caf60a96..562b54ebb628 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1653,7 +1653,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons { ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo()); - SwStartNode* pSttNd = pDoc->GetNodes().MakeEmptySection( + SwStartNode* pSttNd = SwNodes::MakeEmptySection( SwNodeIndex( m_rDoc.GetNodes().GetEndOfAutotext() )); aPam.GetPoint()->nNode = *pSttNd->EndOfSectionNode(); // copy without Frames @@ -1661,8 +1661,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons aPam.GetPoint()->nNode = pDoc->GetNodes().GetEndOfAutotext(); aPam.SetMark(); - SwCntntNode* pNode = - pDoc->GetNodes().GoPrevious( &aPam.GetMark()->nNode ); + SwCntntNode* pNode = SwNodes::GoPrevious( &aPam.GetMark()->nNode ); pNode->MakeEndIndex( &aPam.GetMark()->nContent ); aPam.GetPoint()->nNode = *aPam.GetNode().StartOfSectionNode(); @@ -1727,7 +1726,7 @@ void DocumentContentOperationsManager::DeleteSection( SwNode *pNode ) { // move all Crsr/StkCrsr/UnoCrsr out of the to-be-deleted area SwNodeIndex aMvStt( aSttIdx, 1 ); - m_rDoc.CorrAbs( aMvStt, aEndIdx, SwPosition( aSttIdx ), true ); + SwDoc::CorrAbs( aMvStt, aEndIdx, SwPosition( aSttIdx ), true ); } m_rDoc.GetNodes().DelNodes( aSttIdx, aEndIdx.GetIndex() - aSttIdx.GetIndex() + 1 ); @@ -1841,7 +1840,7 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) } else { - m_rDoc.CorrAbs( aRg.aStart, aRg.aEnd, *rPam.GetPoint(), true ); + SwDoc::CorrAbs( aRg.aStart, aRg.aEnd, *rPam.GetPoint(), true ); } // What's with Flys? @@ -2571,7 +2570,7 @@ SwFlyFrmFmt* DocumentContentOperationsManager::Insert( const SwPaM &rRg, { if( !pFrmFmt ) pFrmFmt = m_rDoc.getIDocumentStylePoolAccess().GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC ); - SwGrfNode* pSwGrfNode = m_rDoc.GetNodes().MakeGrfNode( + SwGrfNode* pSwGrfNode = SwNodes::MakeGrfNode( SwNodeIndex( m_rDoc.GetNodes().GetEndOfAutotext() ), rGrfName, rFltName, pGraphic, m_rDoc.GetDfltGrfFmtColl() ); @@ -2587,7 +2586,7 @@ SwFlyFrmFmt* DocumentContentOperationsManager::Insert( const SwPaM &rRg, const G { if( !pFrmFmt ) pFrmFmt = m_rDoc.getIDocumentStylePoolAccess().GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC ); - SwGrfNode* pSwGrfNode = m_rDoc.GetNodes().MakeGrfNode( + SwGrfNode* pSwGrfNode = SwNodes::MakeGrfNode( SwNodeIndex( m_rDoc.GetNodes().GetEndOfAutotext() ), rGrfObj, m_rDoc.GetDfltGrfFmtColl() ); SwFlyFrmFmt* pSwFlyFrmFmt = _InsNoTxtNode( *rRg.GetPoint(), pSwGrfNode, diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 847a96b1d0b5..a3fe65064e19 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -1330,9 +1330,7 @@ void DocumentFieldsManager::SetFixFields( bool bOnlyTimeDate, const DateTime* pN { bChgd = true; SwAuthorField* pAuthorFld = static_cast<SwAuthorField*>(pFmtFld->GetField()); - pAuthorFld->SetExpansion( static_cast<SwAuthorFieldType*>( - pAuthorFld->GetTyp())->Expand( - pAuthorFld->GetFormat() ) ); + pAuthorFld->SetExpansion( SwAuthorFieldType::Expand( pAuthorFld->GetFormat() ) ); } break; @@ -1341,8 +1339,7 @@ void DocumentFieldsManager::SetFixFields( bool bOnlyTimeDate, const DateTime* pN { bChgd = true; SwExtUserField* pExtUserFld = static_cast<SwExtUserField*>(pFmtFld->GetField()); - pExtUserFld->SetExpansion( static_cast<SwExtUserFieldType*>( - pExtUserFld->GetTyp())->Expand( + pExtUserFld->SetExpansion( SwExtUserFieldType::Expand( pExtUserFld->GetSubType(), pExtUserFld->GetFormat())); } diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index fbb264665d4a..ad23762a0c85 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -399,7 +399,7 @@ SwFrmFmt *DocumentLayoutManager::CopyLayoutFmt( SwNodeRange aRg( rCSttNd, 1, *rCSttNd.EndOfSectionNode() ); SwNodeIndex aIdx( m_rDoc.GetNodes().GetEndOfAutotext() ); - SwStartNode* pSttNd = m_rDoc.GetNodes().MakeEmptySection( aIdx, SwFlyStartNode ); + SwStartNode* pSttNd = SwNodes::MakeEmptySection( aIdx, SwFlyStartNode ); // Set the Anchor/CntntIndex first. // Within the copying part, we can access the values (DrawFmt in Headers and Footers) diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 38918b0320c0..eda520584d73 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -2347,7 +2347,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons if( !pEnd->nNode.GetNode().IsCntntNode() ) { SwNodeIndex aTmp( pEnd->nNode ); - SwCntntNode* pCNd = m_rDoc.GetNodes().GoPrevSection( &aTmp ); + SwCntntNode* pCNd = SwNodes::GoPrevSection( &aTmp ); if( !pCNd || ( aTmp == rSttPos.nNode && pCNd->Len() == rSttPos.nContent.GetIndex() )) pFnd = 0; @@ -2416,7 +2416,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons { pIdx = &rPam.GetPoint()->nNode; if( !pIdx->GetNode().IsCntntNode() && - 0 != ( pCNd = m_rDoc.GetNodes().GoPrevSection( pIdx )) ) + 0 != ( pCNd = SwNodes::GoPrevSection( pIdx )) ) { if( *pIdx >= rPam.GetMark()->nNode ) rPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); @@ -2525,7 +2525,7 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons SwCntntNode* pCNd; SwNodeIndex* pIdx = &rPam.GetMark()->nNode; if( !pIdx->GetNode().IsCntntNode() && - 0 != ( pCNd = m_rDoc.GetNodes().GoPrevSection( pIdx )) ) + 0 != ( pCNd = SwNodes::GoPrevSection( pIdx )) ) { if( *pIdx >= rPam.GetPoint()->nNode ) rPam.GetMark()->nContent.Assign( pCNd, pCNd->Len() ); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index eaf04103ca09..80de11eebe8d 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1406,7 +1406,7 @@ bool SwDoc::RemoveInvisibleContent() aPam.GetPoint()->nContent.Assign( pCNd, 0 ); aPam.SetMark(); aPam.GetPoint()->nNode = *pSectNd->EndOfSectionNode(); - pCNd = GetNodes().GoPrevious( + pCNd = SwNodes::GoPrevious( &aPam.GetPoint()->nNode ); aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); @@ -1539,7 +1539,7 @@ bool SwDoc::ConvertFieldsToText() if (pTxtField && pTxtField->Which() == RES_TXTATR_INPUTFIELD) { SwPosition &rEndPos = *aInsertPam.GetPoint(); - rEndPos.nContent = GetDocShell()->GetWrtShell()->EndOfInputFldAtPos( *aInsertPam.End() ); + rEndPos.nContent = SwCrsrShell::EndOfInputFldAtPos( *aInsertPam.End() ); } else { @@ -1637,7 +1637,7 @@ void SwDoc::ChgTOX(SwTOXBase & rTOX, const SwTOXBase & rNew) } } -OUString SwDoc::GetPaMDescr(const SwPaM & rPam) const +OUString SwDoc::GetPaMDescr(const SwPaM & rPam) { if (&rPam.GetNode(true) == &rPam.GetNode(false)) { diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index a7ed67a63426..ea6621ca0cae 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -131,7 +131,7 @@ namespace if ( pNode == NULL ) { SwNodeIndex aStt = SwNodeIndex(rStt); - pNode = rStt.GetNodes().GoPrevious(&aStt); + pNode = SwNodes::GoPrevious(&aStt); bPosAtEndOfNode = true; } if ( pNode != NULL ) @@ -1344,7 +1344,7 @@ void _DelBookmarks( { bStt = false; pRStt->nNode = rStt; - if( 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &pRStt->nNode )) ) + if( 0 == ( pCNd = SwNodes::GoPrevious( &pRStt->nNode )) ) { pRStt->nNode = pREnd->nNode; pCNd = pRStt->nNode.GetNode().GetCntntNode(); @@ -1362,7 +1362,7 @@ void _DelBookmarks( { bool bStt = false; SwCntntNode* pCNd = pREnd->nNode.GetNode().GetCntntNode(); - if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &pREnd->nNode )) ) + if( !pCNd && 0 == ( pCNd = SwNodes::GoPrevious( &pREnd->nNode )) ) { bStt = true; pREnd->nNode = rEnd; diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index c9d59c971447..e53e37c09409 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -74,8 +74,8 @@ private: SwPaM *pInsRing, *pDelRing; - sal_uLong PrevIdx( const SwNode* pNd ); - sal_uLong NextIdx( const SwNode* pNd ); + static sal_uLong PrevIdx( const SwNode* pNd ); + static sal_uLong NextIdx( const SwNode* pNd ); vector< CompareLine* > aLines; bool m_bRecordDiff; @@ -265,7 +265,7 @@ private: int *pPos1, *pPos2; int nCnt1, nCnt2; // number of words - void CalcPositions( int *pPos, const SwTxtNode *pTxtNd, int &nCnt ); + static void CalcPositions( int *pPos, const SwTxtNode *pTxtNd, int &nCnt ); public: WordArrayComparator( const SwTxtNode *pNode1, const SwTxtNode *pNode2 ); @@ -326,7 +326,7 @@ protected: int nEnd1 = 0, int nStt2 = 0, int nEnd2 = 0 ); public: - int IgnoreIsolatedPieces( int *pLcs1, int *pLcs2, int nLen1, int nLen2, + static int IgnoreIsolatedPieces( int *pLcs1, int *pLcs2, int nLen1, int nLen2, int nLcsLen, int nPieceLen ); }; @@ -1319,7 +1319,7 @@ bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine, if( CmpOptions.nIgnoreLen ) { - nLcsLen = aSeq.IgnoreIsolatedPieces( &aTmpLcsDst[0], &aTmpLcsSrc[0], + nLcsLen = CommonSubseq::IgnoreIsolatedPieces( &aTmpLcsDst[0], &aTmpLcsSrc[0], aCmp.GetLen1(), aCmp.GetLen2(), nLcsLen, CmpOptions.nIgnoreLen ); } @@ -1336,7 +1336,7 @@ bool SwCompareLine::ChangesInLine( const SwCompareLine& rLine, if( CmpOptions.nIgnoreLen ) { - nLcsLen = aSeq.IgnoreIsolatedPieces( &aLcsDst[0], &aLcsSrc[0], nDstLen, + nLcsLen = CommonSubseq::IgnoreIsolatedPieces( &aLcsDst[0], &aLcsSrc[0], nDstLen, nSrcLen, nLcsLen, CmpOptions.nIgnoreLen ); } diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 17f27487831f..a92b2d242e11 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -286,7 +286,7 @@ void SwDoc::CopyMasterHeader(const SwPageDesc &rChged, const SwFmtHeader &rHead, // is copied, and the Index to the StartNode is set to // the left or first header attribute. SwNodeIndex aTmp( GetNodes().GetEndOfAutotext() ); - SwStartNode* pSttNd = GetNodes().MakeEmptySection( aTmp, SwHeaderStartNode ); + SwStartNode* pSttNd = SwNodes::MakeEmptySection( aTmp, SwHeaderStartNode ); SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0, *aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() ); aTmp = *pSttNd->EndOfSectionNode(); @@ -358,7 +358,7 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot, // is copied, and the Index to the StartNode is set to // the left footer attribute. SwNodeIndex aTmp( GetNodes().GetEndOfAutotext() ); - SwStartNode* pSttNd = GetNodes().MakeEmptySection( aTmp, SwFooterStartNode ); + SwStartNode* pSttNd = SwNodes::MakeEmptySection( aTmp, SwFooterStartNode ); SwNodeRange aRange( aRCnt.GetCntntIdx()->GetNode(), 0, *aRCnt.GetCntntIdx()->GetNode().EndOfSectionNode() ); aTmp = *pSttNd->EndOfSectionNode(); diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 9095f525699e..287c8d1ea1c4 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -795,7 +795,7 @@ void SwDoc::DeleteAutoCorrExceptWord() mpACEWord = 0; } -void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const +void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) { // This is a modified version of SwDoc::TransliterateText const SwPosition* pStt = rPaM.Start(); diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 0bfeee404a6d..f3b6fe66679c 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -396,7 +396,7 @@ const SwDBData& SwDoc::GetDBDesc() } } if(maDBData.sDataSource.isEmpty()) - maDBData = GetDBManager()->GetAddressDBName(); + maDBData = SwDBManager::GetAddressDBName(); #endif return maDBData; } diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index a7a4adf534ff..53edd19eed14 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -671,7 +671,7 @@ bool SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt, } void SwDoc::GetGrfNms( const SwFlyFrmFmt& rFmt, OUString* pGrfName, - OUString* pFltName ) const + OUString* pFltName ) { SwNodeIndex aIdx( *rFmt.GetCntnt().GetCntntIdx(), 1 ); const SwGrfNode* pGrfNd = aIdx.GetNode().GetGrfNode(); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 1dbcb1358144..227b0530ac97 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1371,7 +1371,7 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader, { SwNodeIndex aTmpIdx( GetNodes().GetEndOfAutotext() ); const SwNodes& rSrcNds = rSrcFmt.GetDoc()->GetNodes(); - SwStartNode* pSttNd = GetNodes().MakeEmptySection( aTmpIdx, + SwStartNode* pSttNd = SwNodes::MakeEmptySection( aTmpIdx, bCpyHeader ? SwHeaderStartNode : SwFooterStartNode ); @@ -1598,7 +1598,7 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles ) } SwFmt* SwDoc::FindFmtByName( const SwFmtsBase& rFmtArr, - const OUString& rName ) const + const OUString& rName ) { SwFmt* pFnd = 0; for( size_t n = 0; n < rFmtArr.GetFmtCount(); ++n ) diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index aeff01cd1e25..9b4e5efedcd8 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -1919,7 +1919,7 @@ bool SwDoc::MoveParagraph( const SwPaM& rPam, long nOffset, bool bIsOutlMv ) { // We need to remove the last empty Node again aIdx = aInsPos.nNode; - SwCntntNode* pCNd = GetNodes().GoPrevious( &aInsPos.nNode ); + SwCntntNode* pCNd = SwNodes::GoPrevious( &aInsPos.nNode ); aInsPos.nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 ); // All, that are in the to-be-deleted Node, need to be @@ -2074,7 +2074,7 @@ bool SwDoc::NumOrNoNum( const SwNodeIndex& rIdx, bool bDel ) return bResult; } -SwNumRule* SwDoc::GetNumRuleAtPos( const SwPosition& rPos ) const +SwNumRule* SwDoc::GetNumRuleAtPos( const SwPosition& rPos ) { SwNumRule* pRet = NULL; SwTxtNode* pTNd = rPos.nNode.GetNode().GetTxtNode(); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 20db6623ddd9..421333156160 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1170,7 +1170,7 @@ void SwRangeRedline::MoveToSection() } else { - pSttNd = rNds.MakeEmptySection( SwNodeIndex( rNds.GetEndOfRedlines() ), + pSttNd = SwNodes::MakeEmptySection( SwNodeIndex( rNds.GetEndOfRedlines() ), SwNormalStartNode ); SwPosition aPos( *pSttNd->EndOfSectionNode() ); @@ -1243,7 +1243,7 @@ void SwRangeRedline::CopyToSection() } else { - pSttNd = rNds.MakeEmptySection( SwNodeIndex( rNds.GetEndOfRedlines() ), + pSttNd = SwNodes::MakeEmptySection( SwNodeIndex( rNds.GetEndOfRedlines() ), SwNormalStartNode ); if( pCEndNd ) diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 799981638ff6..3637d34ddc61 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -103,7 +103,7 @@ SwSortElement::~SwSortElement() { } -double SwSortElement::StrToDouble( const OUString& rStr ) const +double SwSortElement::StrToDouble( const OUString& rStr ) { if( !pLclData ) pLclData = new LocaleDataWrapper( LanguageTag( *pLocale )); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 8b6ff3100105..e26b20ff59f6 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -111,7 +111,7 @@ sal_uInt16 SwDoc::GetTOIKeys( SwTOIKeyType eTyp, std::vector<OUString>& rArr ) c /// Get current table of contents Mark. sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos, - SwTOXMarks& rArr ) const + SwTOXMarks& rArr ) { // search on Position rPos for all SwTOXMarks SwTxtNode *const pTxtNd = rPos.nNode.GetNode().GetTxtNode(); @@ -434,7 +434,7 @@ SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) return 0; } -const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) const +const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) { OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" ); const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase); @@ -740,7 +740,7 @@ bool SwTOXBaseSection::SetPosAtStartEnd( SwPosition& rPos, bool bAtStart ) const else { rPos.nNode = *pSectNd->EndOfSectionNode(); - pCNd = pSectNd->GetDoc()->GetNodes().GoPrevious( &rPos.nNode ); + pCNd = SwNodes::GoPrevious( &rPos.nNode ); if( pCNd ) nC = pCNd->Len(); } rPos.nContent.Assign( pCNd, nC ); @@ -818,7 +818,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, // determine page description of content before table-of-content SwNodeIndex aIdx( *pSectNd ); pDefaultPageDesc = - pSectNd->GetNodes().GoPrevious( &aIdx )->FindPageDesc( false ); + SwNodes::GoPrevious( &aIdx )->FindPageDesc( false ); } if ( !pDefaultPageDesc ) @@ -875,7 +875,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, } --aEndIdx; SwPosition aPos( aEndIdx, SwIndex( pFirstEmptyNd, 0 )); - pDoc->CorrAbs( aSttIdx, aEndIdx, aPos, true ); + SwDoc::CorrAbs( aSttIdx, aEndIdx, aPos, true ); // delete flys in whole range including start node which requires // giving the node before start node as Mark parameter, hence -1. @@ -1005,7 +1005,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, if( !aCorPam.Move( fnMoveForward ) ) aCorPam.Move( fnMoveBackward ); SwNodeIndex aEndIdx( aInsPos, 1 ); - pDoc->CorrAbs( aInsPos, aEndIdx, *aCorPam.GetPoint(), true ); + SwDoc::CorrAbs( aInsPos, aEndIdx, *aCorPam.GetPoint(), true ); // Task 70995 - save and restore PageDesc and Break Attributes if( pFirstEmptyNd->HasSwAttrSet() ) @@ -1886,10 +1886,10 @@ void SwTOXBaseSection::InsertSorted(SwTOXSortTabBase* pNew) { // Own entry for double entries or keywords if( pOld->GetType() == TOX_SORT_CUSTOM && - pNew->GetOptions() & nsSwTOIOptions::TOI_KEY_AS_ENTRY) + SwTOXSortTabBase::GetOptions() & nsSwTOIOptions::TOI_KEY_AS_ENTRY) continue; - if(!(pNew->GetOptions() & nsSwTOIOptions::TOI_SAME_ENTRY)) + if(!(SwTOXSortTabBase::GetOptions() & nsSwTOIOptions::TOI_SAME_ENTRY)) { // Own entry aSortArr.insert(aSortArr.begin() + i, pNew); return; diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx index 276def0ba06d..a35d90e55478 100644 --- a/sw/source/core/doc/list.cxx +++ b/sw/source/core/doc/list.cxx @@ -41,7 +41,7 @@ class SwListImpl void InsertListItem( SwNodeNum& rNodeNum, const int nLevel ); - void RemoveListItem( SwNodeNum& rNodeNum ); + static void RemoveListItem( SwNodeNum& rNodeNum ); void InvalidateListTree(); void ValidateListTree(); @@ -241,7 +241,7 @@ void SwList::InsertListItem( SwNodeNum& rNodeNum, void SwList::RemoveListItem( SwNodeNum& rNodeNum ) { - mpListImpl->RemoveListItem( rNodeNum ); + SwListImpl::RemoveListItem( rNodeNum ); } void SwList::InvalidateListTree() diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 667d165eb3df..8a01ce7cd0e6 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1104,7 +1104,7 @@ namespace numfunc void SetToDefault(); /** returns sequence of default bullet configuration property names */ - uno::Sequence<OUString> GetPropNames() const; + static uno::Sequence<OUString> GetPropNames(); /** loads default bullet configuration properties and applies values to internal data */ @@ -1180,7 +1180,7 @@ namespace numfunc mnLevelChars[9] = 0x2022; } - uno::Sequence<OUString> SwDefBulletConfig::GetPropNames() const + uno::Sequence<OUString> SwDefBulletConfig::GetPropNames() { uno::Sequence<OUString> aPropNames(13); OUString* pNames = aPropNames.getArray(); @@ -1323,7 +1323,7 @@ namespace numfunc void SetToDefault(); /** returns sequence of configuration property names */ - com::sun::star::uno::Sequence<OUString> GetPropNames() const; + static com::sun::star::uno::Sequence<OUString> GetPropNames(); /** loads configuration properties and applies values to internal data */ void LoadConfig(); @@ -1362,7 +1362,7 @@ namespace numfunc mbChangeIndentOnTabAtFirstPosOfFirstListItem = true; } - com::sun::star::uno::Sequence<OUString> SwNumberingUIBehaviorConfig::GetPropNames() const + com::sun::star::uno::Sequence<OUString> SwNumberingUIBehaviorConfig::GetPropNames() { com::sun::star::uno::Sequence<OUString> aPropNames(1); OUString* pNames = aPropNames.getArray(); diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index 2af05755144e..8165c82807fb 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -123,7 +123,7 @@ bool SwDoc::IsUsed( const SwModify& rModify ) const } // See if the NumRule is used -bool SwDoc::IsUsed( const SwNumRule& rRule ) const +bool SwDoc::IsUsed( const SwNumRule& rRule ) { bool bUsed = rRule.GetTxtNodeListSize() > 0 || rRule.GetParagraphStyleListSize() > 0; diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index f3a732c4a2c8..a260ddfae52b 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -878,7 +878,7 @@ void SwTableAutoFmt::StoreTableProperties(const SwTable &table) SwEditShell *pShell = pDoc->GetEditShell(); SwFmtRowSplit *pRowSplit = 0; - pDoc->GetRowSplit(*pShell->getShellCrsr(false), pRowSplit); + SwDoc::GetRowSplit(*pShell->getShellCrsr(false), pRowSplit); m_bRowSplit = pRowSplit && pRowSplit->GetValue(); delete pRowSplit; pRowSplit = 0; diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 8dbd5725b8d7..8d0d7d70cbd8 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -551,9 +551,9 @@ static void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox, // Move Bookmarks { SwPosition aMvPos( aInsIdx ); - SwCntntNode* pCNd = pDoc->GetNodes().GoPrevious( &aMvPos.nNode ); + SwCntntNode* pCNd = SwNodes::GoPrevious( &aMvPos.nNode ); aMvPos.nContent.Assign( pCNd, pCNd->Len() ); - pDoc->CorrAbs( aInsIdx, aEndNdIdx, aMvPos, false ); + SwDoc::CorrAbs( aInsIdx, aEndNdIdx, aMvPos, false ); } // If we still have FlyFrames hanging around, delete them too @@ -1041,7 +1041,7 @@ static void _FndCntntLine( const SwTableLine* pLine, SwSelBoxes* pPara ) // Find all Boxes with content in this Box SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox, - SwSelBoxes& rBoxes, bool bToTop ) const + SwSelBoxes& rBoxes, bool bToTop ) { SwTableLine* pLine = const_cast<SwTableLine*>(pBox->GetUpper()); if( bToTop ) diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 9bb5888dad8d..5f7b6df7aba1 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -84,7 +84,7 @@ static bool lcl_IsInSameTblBox( SwNodes& _rNds, do { if ( _bPrev - ? !_rNds.GoPrevSection( &aChkIdx, false, false ) + ? !SwNodes::GoPrevSection( &aChkIdx, false, false ) : !_rNds.GoNextSection( &aChkIdx, false, false ) ) { OSL_FAIL( "<lcl_IsInSameTblBox(..)> - no previous/next!" ); @@ -134,7 +134,7 @@ static void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData, const SwNode& rStt, const SwNode& rEnd ) { SwNodeIndex aIdx( rStt ); - if( !rNds.GoPrevSection( &aIdx, true, false ) || + if( !SwNodes::GoPrevSection( &aIdx, true, false ) || !CheckNodesRange( rStt, aIdx, true ) || // #i21457# !lcl_IsInSameTblBox( rNds, rStt, true )) @@ -386,7 +386,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, } sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange, - const SwNode** ppSttNd ) const + const SwNode** ppSttNd ) { sal_uInt16 nRet = 1; if( rRange.HasMark() ) @@ -498,7 +498,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange, return nRet; } -SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) const +SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) { const SwSectionNode* pSectNd = rPos.nNode.GetNode().FindSectionNode(); if( pSectNd ) @@ -1067,7 +1067,7 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx ) if( !pCNd ) { aIdx = *this; - pCNd = rNds.GoPrevSection(&aIdx, true, false); + pCNd = SwNodes::GoPrevSection(&aIdx, true, false); if (!pCNd) return; } @@ -1203,7 +1203,7 @@ void SwSectionNode::DelFrms() // Or else the Fly/TblBox Frame does not have a Lower! { SwNodeIndex aIdx( *this ); - if( !rNds.GoPrevSection( &aIdx, true, false ) || + if( !SwNodes::GoPrevSection( &aIdx, true, false ) || !CheckNodesRange( *this, aIdx, true ) || // #i21457# !lcl_IsInSameTblBox( rNds, *this, true )) diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 78afb54d14d2..208aefcbdb25 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -381,7 +381,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, pCntntNd (aka the node the table is inserted at) thus causing SwNodes::InsertTable to propagate an adjust item if necessary. */ - SwTableNode *pTblNd = GetNodes().InsertTable( + SwTableNode *pTblNd = SwNodes::InsertTable( rPos.nNode, nCols, pBodyColl, @@ -2457,7 +2457,7 @@ void SwTableNode::RemoveRedlines() } void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr, - const SwCellFrm* pBoxFrm ) const + const SwCellFrm* pBoxFrm ) { const SwTableBox* pBox = 0; SwTabFrm *pTab = 0; @@ -2535,7 +2535,7 @@ static bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes ) } void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* , - const SwCellFrm* pBoxFrm ) const + const SwCellFrm* pBoxFrm ) { OSL_ENSURE( pBoxFrm, "GetTabRows called without pBoxFrm" ); diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 25705e22922b..fe857d4f538a 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -316,7 +316,7 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew ) } } -void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const +void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) { rpSz = 0; @@ -388,7 +388,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew ) } } -void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const +void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) { rpSz = 0; @@ -493,7 +493,7 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew } } -bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const +bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) { bool bRet = false; SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); @@ -905,7 +905,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, } } -void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const +void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) { SwCntntNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetCntntNode(); SwTableNode* pTblNd = pCntNd ? pCntNd->FindTableNode() : 0; @@ -1170,7 +1170,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ) } } -bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const +bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) { bool bRet = false; SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); @@ -1228,7 +1228,7 @@ void SwDoc::SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign ) SetBoxAttr( rCursor, aVertOri ); } -sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) const +sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) { sal_uInt16 nAlign = USHRT_MAX; SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 5810b1e1145d..7ad39abd8184 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -370,7 +370,7 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const else if( ND_ENDNODE & nNodeType ) { SwNodeIndex aIdx( *EndOfSectionNode() ); - pNd = GetNodes().GoPrevious( &aIdx ); + pNd = SwNodes::GoPrevious( &aIdx ); } else pNd = GetCntntNode(); @@ -472,7 +472,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay, else if( ND_ENDNODE & nNodeType ) { SwNodeIndex aIdx( *EndOfSectionNode() ); - pNode = GetNodes().GoPrevious( &aIdx ); + pNode = SwNodes::GoPrevious( &aIdx ); } else { diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 08068945af12..25f94bf74fc6 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -364,7 +364,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz, { OSL_ENSURE( false, "here, something wrong happened" ); aFrmNdIdx = rNds.GetEndOfContent(); - pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, true, false ); + pFrmNd = SwNodes::GoPrevSection( &aFrmNdIdx, true, false ); if( pFrmNd && !static_cast<SwCntntNode*>(pFrmNd)->HasWriterListeners() ) pFrmNd = 0; OSL_ENSURE( pFrmNd, "ChgNode() - no FrameNode found" ); @@ -1248,14 +1248,15 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes) * @param rIdx position of the node * @return section level at the given position */ -sal_uInt16 SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) const { +sal_uInt16 SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) +{ // special treatment for 1st Node if(rIdx == 0) return 1; // no recursion! This calles a SwNode::GetSectionLevel (missing "s") return rIdx.GetNode().GetSectionLevel(); } -void SwNodes::GoStartOfSection(SwNodeIndex *pIdx) const +void SwNodes::GoStartOfSection(SwNodeIndex *pIdx) { // after the next start node SwNodeIndex aTmp( *pIdx->GetNode().StartOfSectionNode(), +1 ); @@ -1273,7 +1274,7 @@ void SwNodes::GoStartOfSection(SwNodeIndex *pIdx) const (*pIdx) = aTmp; // is on a ContentNode } -void SwNodes::GoEndOfSection(SwNodeIndex *pIdx) const +void SwNodes::GoEndOfSection(SwNodeIndex *pIdx) { if( !pIdx->GetNode().IsEndNode() ) (*pIdx) = *pIdx->GetNode().EndOfSectionNode(); @@ -1296,7 +1297,7 @@ SwCntntNode* SwNodes::GoNext(SwNodeIndex *pIdx) const return static_cast<SwCntntNode*>(pNd); } -SwCntntNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) const +SwCntntNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) { if( !pIdx->GetIndex() ) return 0; @@ -1434,7 +1435,7 @@ static bool lcl_HighestLevel( const SwNodePtr& rpNode, void * pPara ) */ sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange ) { - HighLevel aPara( rNodes.GetSectionLevel( rRange.aStart )); + HighLevel aPara( SwNodes::GetSectionLevel( rRange.aStart )); rNodes.ForEach( rRange.aStart, rRange.aEnd, lcl_HighestLevel, &aPara ); return aPara.nTop; @@ -1981,7 +1982,7 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx, ///@see SwNodes::GoNextSection (TODO: seems to be C&P programming here) SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx, - bool bSkipHidden, bool bSkipProtect ) const + bool bSkipHidden, bool bSkipProtect ) { bool bFirst = true; SwNodeIndex aTmp( *pIdx ); diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index a5707dc74a97..e993c42204a3 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -651,7 +651,7 @@ SwSectionFmt::~SwSectionFmt() // If it was a linked Section, we need to make all Child Links // visible again if( rSect.IsConnected() ) - rSect.MakeChildLinksVisible( *pSectNd ); + SwSection::MakeChildLinksVisible( *pSectNd ); // Check whether we need to be visible, before deleting the Nodes if( rSect.IsHiddenFlag() ) @@ -1228,7 +1228,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) SwPosition aPos( aIdx, SwIndex( pNewNd, 0 )); --aPos.nNode; - pDoc->CorrAbs( aIdx, aEndIdx, aPos, true ); + SwDoc::CorrAbs( aIdx, aEndIdx, aPos, true ); pPam = new SwPaM( aPos ); @@ -1485,7 +1485,7 @@ void SwIntrnlSectRefLink::Closed() // Make all Links within the Section visible again SwSectionNode* pSectNd = rSectFmt.GetSectionNode( false ); if( pSectNd ) - pSectNd->GetSection().MakeChildLinksVisible( *pSectNd ); + SwSection::MakeChildLinksVisible( *pSectNd ); if( pESh ) pESh->EndAllAction(); diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 58a14d8696df..4361ade375a0 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -308,7 +308,7 @@ SdrObject* SwDrawView::GetMaxToBtmObj(SdrObject* pObj) const /// determine maximal order number for a 'child' object of given 'parent' object sal_uInt32 SwDrawView::_GetMaxChildOrdNum( const SwFlyFrm& _rParentObj, - const SdrObject* _pExclChildObj ) const + const SdrObject* _pExclChildObj ) { sal_uInt32 nMaxChildOrdNum = _rParentObj.GetDrawObj()->GetOrdNum(); diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index cb05ac3ab61f..eb877fb67121 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -44,7 +44,7 @@ class _PaMIntoCrsrShellRing SwPaM* pPrevDelPam; SwPaM* pPrevCrsr; - void RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ); + static void RemoveFromRing( SwPaM& rPam, SwPaM* pPrev ); public: _PaMIntoCrsrShellRing( SwCrsrShell& rSh, SwPaM& rCrsr, SwPaM& rPam ); ~_PaMIntoCrsrShellRing(); diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 6a1de5b508f8..729a37529eca 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -147,7 +147,7 @@ class SwAutoFormat return *m_pCharClass; } - bool IsSpace( const sal_Unicode c ) const + static bool IsSpace( const sal_Unicode c ) { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */); } void SetColl( sal_uInt16 nId, bool bHdLineOrText = false ); @@ -156,7 +156,7 @@ class SwAutoFormat // TxtNode methods const SwTxtNode* GetNextNode() const; - bool IsEmptyLine( const SwTxtNode& rNd ) const + static bool IsEmptyLine( const SwTxtNode& rNd ) { return rNd.GetTxt().isEmpty() || rNd.GetTxt().getLength() == GetLeadingBlanks( rNd.GetTxt() ); } @@ -164,14 +164,14 @@ class SwAutoFormat bool IsFastFullLine( const SwTxtNode& ) const; bool IsNoAlphaLine( const SwTxtNode&) const; bool IsEnumericChar( const SwTxtNode&) const; - bool IsBlanksInString( const SwTxtNode&) const; + static bool IsBlanksInString( const SwTxtNode&); sal_uInt16 CalcLevel( const SwTxtNode&, sal_uInt16 *pDigitLvl = 0 ) const; sal_Int32 GetBigIndent( sal_Int32& rAktSpacePos ) const; - OUString DelLeadingBlanks(const OUString& rStr) const; - OUString DelTrailingBlanks( const OUString& rStr ) const; - sal_Int32 GetLeadingBlanks( const OUString& rStr ) const; - sal_Int32 GetTrailingBlanks( const OUString& rStr ) const; + static OUString DelLeadingBlanks(const OUString& rStr); + static OUString DelTrailingBlanks( const OUString& rStr ); + static sal_Int32 GetLeadingBlanks( const OUString& rStr ); + static sal_Int32 GetTrailingBlanks( const OUString& rStr ); bool IsFirstCharCapital( const SwTxtNode& rNd ) const; sal_uInt16 GetDigitLevel( const SwTxtNode& rTxtNd, sal_Int32& rPos, @@ -187,8 +187,8 @@ class SwAutoFormat void BuildNegIndent( SwTwips nSpaces ); void BuildHeadLine( sal_uInt16 nLvl ); - bool HasSelBlanks( SwPaM& rPam ) const; - bool HasBreakAttr( const SwTxtNode& ) const; + static bool HasSelBlanks( SwPaM& rPam ); + static bool HasBreakAttr( const SwTxtNode& ); void DeleteSel( SwPaM& rPam ); bool DeleteCurNxtPara( const OUString& rNxtPara ); /// delete in the node start and/or end @@ -214,7 +214,7 @@ class SwAutoFormat } /// is a dot at the end ?? - bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const; + static bool IsSentenceAtEnd( const SwTxtNode& rTxtNd ); bool DoUnderline(); bool DoTable(); @@ -404,7 +404,7 @@ bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const return USHRT_MAX != GetDigitLevel( rNd, nBlnks ); } -bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const +bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) { // Search more than 5 consecutive blanks/tabs in the string. OUString sTmp( DelLeadingBlanks(rNd.GetTxt()) ); @@ -661,7 +661,7 @@ bool SwAutoFormat::DoTable() return 1 < aPosArr.size(); } -OUString SwAutoFormat::DelLeadingBlanks( const OUString& rStr ) const +OUString SwAutoFormat::DelLeadingBlanks( const OUString& rStr ) { sal_Int32 nL, n; for( nL = rStr.getLength(), n = 0; n < nL && IsSpace( rStr[n] ); ++n ) @@ -671,7 +671,7 @@ OUString SwAutoFormat::DelLeadingBlanks( const OUString& rStr ) const return rStr; } -OUString SwAutoFormat::DelTrailingBlanks( const OUString& rStr ) const +OUString SwAutoFormat::DelTrailingBlanks( const OUString& rStr ) { sal_Int32 nL = rStr.getLength(), n = nL; if( !nL ) @@ -684,7 +684,7 @@ OUString SwAutoFormat::DelTrailingBlanks( const OUString& rStr ) const return rStr; } -sal_Int32 SwAutoFormat::GetLeadingBlanks( const OUString& rStr ) const +sal_Int32 SwAutoFormat::GetLeadingBlanks( const OUString& rStr ) { sal_Int32 nL; sal_Int32 n; @@ -694,7 +694,7 @@ sal_Int32 SwAutoFormat::GetLeadingBlanks( const OUString& rStr ) const return n; } -sal_Int32 SwAutoFormat::GetTrailingBlanks( const OUString& rStr ) const +sal_Int32 SwAutoFormat::GetTrailingBlanks( const OUString& rStr ) { sal_Int32 nL = rStr.getLength(), n = nL; if( !nL ) @@ -991,7 +991,7 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText ) m_pDoc->SetTxtFmtCollByAutoFmt( *m_aDelPam.GetPoint(), nId, &aSet ); } -bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const +bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) { // Is there a Blank at the beginning or end? // Do not delete it, it will be inserted again. @@ -1015,7 +1015,7 @@ bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const return true; } -bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const +bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) { const SfxItemSet* pSet = rTxtNd.GetpSwAttrSet(); if( !pSet ) @@ -1034,7 +1034,7 @@ bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const } /// Is there a dot at the end? -bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const +bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) { const OUString& rStr = rTxtNd.GetTxt(); sal_Int32 n = rStr.getLength(); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 08fb7de31e44..74a7be25ed56 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -299,7 +299,7 @@ void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName, { OSL_ENSURE( pGrfName || pFltName, "No parameters" ); if( pFmt ) - GetDoc()->GetGrfNms( *pFmt, pGrfName, pFltName ); + SwDoc::GetGrfNms( *pFmt, pGrfName, pFltName ); else { SwGrfNode *pGrfNode = _GetGrfNode(); @@ -1044,7 +1044,7 @@ void SwEditShell::CountWords( SwDocStat& rStat ) const for(SwPaM& rPaM : GetCrsr()->GetRingContainer()) { if( rPaM.HasMark() ) - GetDoc()->CountWords( rPaM, rStat ); + SwDoc::CountWords( rPaM, rStat ); } } diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index edd5d3217845..5b1c2d993700 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -155,7 +155,7 @@ public: class SwHyphIter : public SwLinguIter { bool bOldIdle; - void DelSoftHyph( SwPaM &rPam ); + static void DelSoftHyph( SwPaM &rPam ); public: SwHyphIter() : bOldIdle(false) {} @@ -167,7 +167,7 @@ public: uno::Any Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); - bool IsAuto(); + static bool IsAuto(); void InsertSoftHyph( const sal_Int32 nHyphPos ); void ShowSelection(); }; @@ -490,7 +490,7 @@ uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) if( bAuto && xHyphWord.is() ) { - pMySh->InsertSoftHyph( xHyphWord->getHyphenationPos() + 1); + SwEditShell::InsertSoftHyph( xHyphWord->getHyphenationPos() + 1); } } while( bAuto && xHyphWord.is() ); //end of do-while bGoOn = !xHyphWord.is() && GetCrsrCnt() > 1; @@ -571,7 +571,7 @@ void SwHyphIter::InsertSoftHyph( const sal_Int32 nHyphPos ) pCrsr->SetMark(); } -bool SwEditShell::HasLastSentenceGotGrammarChecked() const +bool SwEditShell::HasLastSentenceGotGrammarChecked() { bool bTextWasGrammarChecked = false; if (pSpellIter) @@ -589,12 +589,12 @@ bool SwEditShell::HasLastSentenceGotGrammarChecked() const return bTextWasGrammarChecked; } -bool SwEditShell::HasConvIter() const +bool SwEditShell::HasConvIter() { return 0 != pConvIter; } -bool SwEditShell::HasHyphIter() const +bool SwEditShell::HasHyphIter() { return 0 != pHyphIter; } diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 0617ef2d3698..2cb0d45c9c66 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -332,7 +332,7 @@ bool SwEditShell::NumUpDown( bool bDown ) bool SwEditShell::IsFirstOfNumRuleAtCrsrPos() const { - return GetDoc()->IsFirstOfNumRuleAtPos( *GetCrsr()->GetPoint() ); + return SwDoc::IsFirstOfNumRuleAtPos( *GetCrsr()->GetPoint() ); } // -> #i23725#, #i90078# @@ -362,7 +362,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) { StartAllAction(); - SwNumRule *pCurNumRule = GetDoc()->GetNumRuleAtPos(rPos); + SwNumRule *pCurNumRule = SwDoc::GetNumRuleAtPos(rPos); if (pCurNumRule) { @@ -426,7 +426,7 @@ void SwEditShell::GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower aCrsr.SetMark(); if( pCrsr->HasMark() ) *aCrsr.GetPoint() = *pCrsr->End(); - GetDoc()->GotoNextNum( *aCrsr.GetPoint(), false, &rUpper, &rLower ); + SwDoc::GotoNextNum( *aCrsr.GetPoint(), false, &rUpper, &rLower ); } bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) @@ -443,7 +443,7 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) bool bRet = false; sal_uInt8 nUpperLevel, nLowerLevel; - if( GetDoc()->GotoNextNum( *aCrsr.GetPoint(), false, + if( SwDoc::GotoNextNum( *aCrsr.GetPoint(), false, &nUpperLevel, &nLowerLevel )) { if( bUpperLower ) @@ -455,7 +455,7 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) if( bUpperLeft ) // move up { SwPosition aPos( *aCrsr.GetMark() ); - if( GetDoc()->GotoPrevNum( aPos, false ) ) + if( SwDoc::GotoPrevNum( aPos, false ) ) nOffset = aPos.nNode.GetIndex() - aCrsr.GetMark()->nNode.GetIndex(); else @@ -690,7 +690,7 @@ sal_uInt8 SwEditShell::GetNumLevel() const const SwNumRule* SwEditShell::GetNumRuleAtCurrCrsrPos() const { - return GetDoc()->GetNumRuleAtPos( *GetCrsr()->GetPoint() ); + return SwDoc::GetNumRuleAtPos( *GetCrsr()->GetPoint() ); } const SwNumRule* SwEditShell::GetNumRuleAtCurrentSelection() const @@ -704,7 +704,7 @@ const SwNumRule* SwEditShell::GetNumRuleAtCurrentSelection() const for ( SwNodeIndex aNode = rCurrentCrsr.Start()->nNode; aNode <= aEndNode; ++aNode ) { - const SwNumRule* pNumRule = GetDoc()->GetNumRuleAtPos( SwPosition( aNode ) ); + const SwNumRule* pNumRule = SwDoc::GetNumRuleAtPos( SwPosition( aNode ) ); if ( pNumRule == NULL ) { continue; diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 028a6f2e4a0f..6dadbaa05a83 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -63,7 +63,7 @@ bool SwEditShell::IsInsRegionAvailable() const if( pCrsr->GetNext() != pCrsr ) return false; if( pCrsr->HasMark() ) - return 0 != GetDoc()->IsInsRegionAvailable( *pCrsr ); + return 0 != SwDoc::IsInsRegionAvailable( *pCrsr ); return true; } @@ -73,7 +73,7 @@ const SwSection* SwEditShell::GetCurrSection() const if( IsTableMode() ) return 0; - return GetDoc()->GetCurrSection( *GetCrsr()->GetPoint() ); + return SwDoc::GetCurrSection( *GetCrsr()->GetPoint() ); } /** Deliver the responsible area of the columns. diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index fdc6253b9b83..879285db36ff 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -92,10 +92,10 @@ void SwEditShell::DeleteTOXMark( SwTOXMark* pMark ) /// Collect all listing markers sal_uInt16 SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const { - return GetDoc()->GetCurTOXMark( *GetCrsr()->Start(), rMarks ); + return SwDoc::GetCurTOXMark( *GetCrsr()->Start(), rMarks ); } -bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) const +bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) { OSL_ENSURE( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" ); const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase); @@ -199,7 +199,7 @@ bool SwEditShell::UpdateTableOf( const SwTOXBase& rTOX, const SfxItemSet* pSet ) /// Get current listing before or at the Cursor const SwTOXBase* SwEditShell::GetCurTOX() const { - return GetDoc()->GetCurTOX( *GetCrsr()->GetPoint() ); + return SwDoc::GetCurTOX( *GetCrsr()->GetPoint() ); } bool SwEditShell::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes ) diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index 78e71c63987c..51858645b8fa 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -697,7 +697,7 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTb return aStr; } -const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm ) const +const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm ) { const SwFrmFmts& rTblFmts = *rDoc.GetTblFrmFmts(); const SwTable* pTmpTbl = 0, *pRet = 0; @@ -916,7 +916,7 @@ void SwTableFormula::_GetFmlBoxes( const SwTable& rTbl, OUString& , void SwTableFormula::GetBoxes( const SwTableBox& rSttBox, const SwTableBox& rEndBox, - SwSelBoxes& rBoxes ) const + SwSelBoxes& rBoxes ) { // get all selected boxes via layout const SwLayoutFrm *pStt, *pEnd; diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 0fb8f398194d..b95df32bbe63 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -321,7 +321,7 @@ SwAuthorFieldType::SwAuthorFieldType() { } -OUString SwAuthorFieldType::Expand(sal_uLong nFmt) const +OUString SwAuthorFieldType::Expand(sal_uLong nFmt) { SvtUserOptions& rOpt = SW_MOD()->GetUserOptions(); if((nFmt & 0xff) == AF_NAME) @@ -338,14 +338,14 @@ SwFieldType* SwAuthorFieldType::Copy() const SwAuthorField::SwAuthorField(SwAuthorFieldType* pTyp, sal_uInt32 nFmt) : SwField(pTyp, nFmt) { - aContent = static_cast<SwAuthorFieldType*>(GetTyp())->Expand(GetFormat()); + aContent = SwAuthorFieldType::Expand(GetFormat()); } OUString SwAuthorField::Expand() const { if (!IsFixed()) const_cast<SwAuthorField*>(this)->aContent = - static_cast<SwAuthorFieldType*>(GetTyp())->Expand(GetFormat()); + SwAuthorFieldType::Expand(GetFormat()); return aContent; } @@ -1846,7 +1846,7 @@ SwFieldType* SwExtUserFieldType::Copy() const return pTyp; } -OUString SwExtUserFieldType::Expand(sal_uInt16 nSub, sal_uInt32 ) const +OUString SwExtUserFieldType::Expand(sal_uInt16 nSub, sal_uInt32 ) { sal_uInt16 nRet = USHRT_MAX; switch(nSub) @@ -1884,13 +1884,13 @@ OUString SwExtUserFieldType::Expand(sal_uInt16 nSub, sal_uInt32 ) const SwExtUserField::SwExtUserField(SwExtUserFieldType* pTyp, sal_uInt16 nSubTyp, sal_uInt32 nFmt) : SwField(pTyp, nFmt), nType(nSubTyp) { - aContent = static_cast<SwExtUserFieldType*>(GetTyp())->Expand(nType, GetFormat()); + aContent = SwExtUserFieldType::Expand(nType, GetFormat()); } OUString SwExtUserField::Expand() const { if (!IsFixed()) - const_cast<SwExtUserField*>(this)->aContent = static_cast<SwExtUserFieldType*>(GetTyp())->Expand(nType, GetFormat()); + const_cast<SwExtUserField*>(this)->aContent = SwExtUserFieldType::Expand(nType, GetFormat()); return aContent; } diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 94d5521576a1..4b99ae860dd8 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -497,7 +497,7 @@ void SwGetRefField::UpdateField( const SwTxtFld* pFldTxtAttr ) // #i81002# OUString SwGetRefField::MakeRefNumStr( const SwTxtNode& rTxtNodeOfField, const SwTxtNode& rTxtNodeOfReferencedItem, - const sal_uInt32 nRefNumFormat ) const + const sal_uInt32 nRefNumFormat ) { if ( rTxtNodeOfReferencedItem.HasNumber() && rTxtNodeOfReferencedItem.IsCountedInList() ) @@ -928,10 +928,10 @@ private: bool bInit; void Init(SwDoc& rDoc, SwDoc& rDestDoc, bool bField ); - void GetNoteIdsFromDoc( SwDoc& rDoc, std::set<sal_uInt16> &rIds ); + static void GetNoteIdsFromDoc( SwDoc& rDoc, std::set<sal_uInt16> &rIds ); void GetFieldIdsFromDoc( SwDoc& rDoc, std::set<sal_uInt16> &rIds ); void AddId( sal_uInt16 id, sal_uInt16 seqNum ); - sal_uInt16 GetFirstUnusedId( std::set<sal_uInt16> &rIds ); + static sal_uInt16 GetFirstUnusedId( std::set<sal_uInt16> &rIds ); public: _RefIdsMap( const OUString& rName ) : aName( rName ), bInit( false ) {} diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 72aa28d41cc1..0636002c3eb3 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -99,7 +99,6 @@ static bool lcl_SetNewFlyPos( const SwNode& rNode, SwFmtAnchor& rAnchor, } static bool lcl_FindAnchorPos( - SwEditShell& rEditShell, SwDoc& rDoc, const Point& rPt, const SwFrm& rFrm, @@ -146,9 +145,9 @@ static bool lcl_FindAnchorPos( } else { - if ( rEditShell.PosInsideInputFld( aPos ) ) + if ( SwCrsrShell::PosInsideInputFld( aPos ) ) { - aPos.nContent = rEditShell.StartOfInputFldAtPos( aPos ); + aPos.nContent = SwCrsrShell::StartOfInputFldAtPos( aPos ); } } } @@ -196,7 +195,6 @@ static bool lcl_FindAnchorPos( //! also used in unoframe.cxx bool sw_ChkAndSetNewAnchor( - SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet ) { @@ -218,7 +216,7 @@ bool sw_ChkAndSetNewAnchor( "forbidden anchor change in Head/Foot." ); #endif - return ::lcl_FindAnchorPos( rEditShell, *pDoc, rFly.Frm().Pos(), rFly, rSet ); + return ::lcl_FindAnchorPos( *pDoc, rFly.Frm().Pos(), rFly, rSet ); } void SwFEShell::SelectFlyFrm( SwFlyFrm& rFrm, bool bNew ) @@ -879,7 +877,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, const Point aRelPos( rInsertPosition.X() - pFrm->Frm().Left(), rInsertPosition.Y() - pFrm->Frm().Top() ); rDrawObj.SetRelativePos( aRelPos ); - ::lcl_FindAnchorPos( *this, *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet ); + ::lcl_FindAnchorPos( *GetDoc(), rInsertPosition, *pFrm, rFlyAttrSet ); } // insert drawing object into the document creating a new <SwDrawFrmFmt> instance SwDrawFrmFmt* pFmt = GetDoc()->getIDocumentContentOperations().InsertDrawObj( aPam, rDrawObj, rFlyAttrSet ); @@ -1041,7 +1039,7 @@ bool SwFEShell::SetFlyFrmAttr( SfxItemSet& rSet ) const Point aPt( pFly->Frm().Pos() ); if( SfxItemState::SET == rSet.GetItemState( RES_ANCHOR, false )) - sw_ChkAndSetNewAnchor( *this, *pFly, rSet ); + sw_ChkAndSetNewAnchor( *pFly, rSet ); SwFlyFrmFmt* pFlyFmt = (SwFlyFrmFmt*)pFly->GetFmt(); if( GetDoc()->SetFlyFrmAttr( *pFlyFmt, rSet )) @@ -1182,7 +1180,7 @@ void SwFEShell::SetFrmFmt( SwFrmFmt *pNewFmt, bool bKeepOrient, Point* pDocPos ) { pSet = new SfxItemSet( GetDoc()->GetAttrPool(), aFrmFmtSetRange ); pSet->Put( *pItem ); - if( !sw_ChkAndSetNewAnchor( *this, *pFly, *pSet )) + if( !sw_ChkAndSetNewAnchor( *pFly, *pSet )) delete pSet, pSet = 0; } diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 24062749c174..d78f1b7d28f5 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -86,7 +86,7 @@ class TblWait const ::std::unique_ptr<SwWait> m_pWait; // this seems really fishy: do some locking, if an arbitrary number of lines is exceeded static const size_t our_kLineLimit = 20; - bool ShouldWait(size_t nCnt, SwFrm *pFrm, size_t nCnt2) + static bool ShouldWait(size_t nCnt, SwFrm *pFrm, size_t nCnt2) { return our_kLineLimit < nCnt || our_kLineLimit < nCnt2 || (pFrm && our_kLineLimit < pFrm->ImplFindTabFrm()->GetTable()->GetTabLines().size()); } public: TblWait(size_t nCnt, SwFrm *pFrm, SwDocShell &rDocShell, size_t nCnt2 = 0) @@ -571,7 +571,7 @@ void SwFEShell::_GetTabCols( SwTabCols &rToFill, const SwFrm *pBox ) const } if ( !pLastCols ) { - GetDoc()->GetTabCols( rToFill, 0, static_cast<const SwCellFrm*>(pBox) ); + SwDoc::GetTabCols( rToFill, 0, static_cast<const SwCellFrm*>(pBox) ); pLastCols = new SwTabCols( rToFill ); pColumnCacheLastTable = pTab->GetTable(); @@ -627,7 +627,7 @@ void SwFEShell::_GetTabRows( SwTabCols &rToFill, const SwFrm *pBox ) const } if ( !pLastRows ) { - GetDoc()->GetTabRows( rToFill, 0, static_cast<const SwCellFrm*>(pBox) ); + SwDoc::GetTabRows( rToFill, 0, static_cast<const SwCellFrm*>(pBox) ); pLastRows = new SwTabCols( rToFill ); pRowCacheLastTable = pTab->GetTable(); @@ -723,7 +723,7 @@ void SwFEShell::SetRowSplit( const SwFmtRowSplit& rNew ) void SwFEShell::GetRowSplit( SwFmtRowSplit*& rpSz ) const { - GetDoc()->GetRowSplit( *getShellCrsr( false ), rpSz ); + SwDoc::GetRowSplit( *getShellCrsr( false ), rpSz ); } void SwFEShell::SetRowHeight( const SwFmtFrmSize &rNew ) @@ -736,7 +736,7 @@ void SwFEShell::SetRowHeight( const SwFmtFrmSize &rNew ) void SwFEShell::GetRowHeight( SwFmtFrmSize *& rpSz ) const { - GetDoc()->GetRowHeight( *getShellCrsr( false ), rpSz ); + SwDoc::GetRowHeight( *getShellCrsr( false ), rpSz ); } bool SwFEShell::BalanceRowHeight( bool bTstOnly ) @@ -760,7 +760,7 @@ void SwFEShell::SetRowBackground( const SvxBrushItem &rNew ) bool SwFEShell::GetRowBackground( SvxBrushItem &rToFill ) const { - return GetDoc()->GetRowBackground( *getShellCrsr( false ), rToFill ); + return SwDoc::GetRowBackground( *getShellCrsr( false ), rToFill ); } void SwFEShell::SetTabBorders( const SfxItemSet& rSet ) @@ -783,7 +783,7 @@ void SwFEShell::SetTabLineStyle( const Color* pColor, bool bSetLine, void SwFEShell::GetTabBorders( SfxItemSet& rSet ) const { - GetDoc()->GetTabBorders( *getShellCrsr( false ), rSet ); + SwDoc::GetTabBorders( *getShellCrsr( false ), rSet ); } void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew ) @@ -796,7 +796,7 @@ void SwFEShell::SetBoxBackground( const SvxBrushItem &rNew ) bool SwFEShell::GetBoxBackground( SvxBrushItem &rToFill ) const { - return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill ); + return SwDoc::GetBoxAttr( *getShellCrsr( false ), rToFill ); } void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew ) @@ -809,7 +809,7 @@ void SwFEShell::SetBoxDirection( const SvxFrameDirectionItem& rNew ) bool SwFEShell::GetBoxDirection( SvxFrameDirectionItem& rToFill ) const { - return GetDoc()->GetBoxAttr( *getShellCrsr( false ), rToFill ); + return SwDoc::GetBoxAttr( *getShellCrsr( false ), rToFill ); } void SwFEShell::SetBoxAlign( sal_uInt16 nAlign ) @@ -822,7 +822,7 @@ void SwFEShell::SetBoxAlign( sal_uInt16 nAlign ) sal_uInt16 SwFEShell::GetBoxAlign() const { - return GetDoc()->GetBoxAlign( *getShellCrsr( false ) ); + return SwDoc::GetBoxAlign( *getShellCrsr( false ) ); } void SwFEShell::SetTabBackground( const SvxBrushItem &rNew ) @@ -889,7 +889,7 @@ bool SwFEShell::HasBoxSelection() const SwCntntNode* pCNd = aIdx.GetNode().GetCntntNode(); if( !pCNd ) { - pCNd = GetDoc()->GetNodes().GoPrevious( &aIdx ); + pCNd = SwNodes::GoPrevious( &aIdx ); OSL_ENSURE( pCNd, "no ContentNode in box ??" ); } if( pPam->GetMark()->nContent == pCNd->Len() ) @@ -1957,7 +1957,7 @@ bool SwFEShell::IsNumLabel( const Point &rPt, int nMaxOffset ) // #i42921# bool SwFEShell::IsVerticalModeAtNdAndPos( const SwTxtNode& _rTxtNode, - const Point& _rDocPos ) const + const Point& _rDocPos ) { bool bRet( false ); diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 28629cce65bb..8a5833c7e058 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -944,7 +944,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const sFilter = "DDE"; } - SwGrfNode* pGrfNd = pDoc->GetNodes().MakeGrfNode( rIdx, sFile, sFilter, + SwGrfNode* pGrfNd = SwNodes::MakeGrfNode( rIdx, sFile, sFilter, &aTmpGrf, pColl, const_cast<SwAttrSet*>(GetpSwAttrSet()) ); pGrfNd->SetTitle( GetTitle() ); diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index 5845ecc0466d..d2c8abc5d0bb 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -54,7 +54,7 @@ public: SwXMLTextBlocks( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const OUString& rFile ); void AddName( const OUString&, const OUString&, const OUString&, bool bOnlyTxt = false ); virtual void AddName( const OUString&, const OUString&, bool bOnlyTxt = false ) SAL_OVERRIDE; - OUString GeneratePackageName ( const OUString& rShort ); + static OUString GeneratePackageName ( const OUString& rShort ); virtual ~SwXMLTextBlocks(); virtual sal_uLong Delete( sal_uInt16 ) SAL_OVERRIDE; virtual sal_uLong Rename( sal_uInt16, const OUString&, const OUString& ) SAL_OVERRIDE; diff --git a/sw/source/core/inc/UndoBookmark.hxx b/sw/source/core/inc/UndoBookmark.hxx index c4215e2e6a8c..82524568d3d6 100644 --- a/sw/source/core/inc/UndoBookmark.hxx +++ b/sw/source/core/inc/UndoBookmark.hxx @@ -87,7 +87,7 @@ public: private: virtual SwRewriter GetRewriter() const SAL_OVERRIDE; - void Rename( ::sw::UndoRedoContext &, const OUString& sFrom, const OUString& sTo ); + static void Rename( ::sw::UndoRedoContext &, const OUString& sFrom, const OUString& sTo ); virtual void UndoImpl( ::sw::UndoRedoContext & ) SAL_OVERRIDE; virtual void RedoImpl( ::sw::UndoRedoContext & ) SAL_OVERRIDE; }; diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index b4263bcdf4dd..31a3502457a3 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -278,7 +278,7 @@ class SwUndoTblCpyTbl : public SwUndo //b6341295: When redlining is active, PrepareRedline has to create the //redlining attributes for the new and the old table cell content - SwUndo* PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, + static SwUndo* PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox, const SwPosition& rPos, bool& rJoin, bool bRedo ); public: diff --git a/sw/source/core/inc/anchoredobjectposition.hxx b/sw/source/core/inc/anchoredobjectposition.hxx index 7b8b34b9d038..d10b3bca9125 100644 --- a/sw/source/core/inc/anchoredobjectposition.hxx +++ b/sw/source/core/inc/anchoredobjectposition.hxx @@ -126,9 +126,9 @@ namespace objectpositioning #i11860# */ - SwTwips _GetTopForObjPos( const SwFrm& _rFrm, + static SwTwips _GetTopForObjPos( const SwFrm& _rFrm, const SwRectFn& _fnRect, - const bool _bVert ) const; + const bool _bVert ); void _GetVertAlignmentValues( const SwFrm& _rVertOrientFrm, const SwFrm& _rPageAlignLayFrm, @@ -287,10 +287,10 @@ namespace objectpositioning optional input/output parameter (default value NULL) - if set, relative alignment, that is toggled, if needed. */ - void _ToggleHoriOrientAndAlign( const bool _bToggleLeftRight, + static void _ToggleHoriOrientAndAlign( const bool _bToggleLeftRight, sal_Int16& _ioeHoriOrient, sal_Int16& _iopeRelOrient - ) const; + ); /** determine alignment values for horizontal position of object @@ -438,9 +438,9 @@ namespace objectpositioning <_eRelOrient1> has to be drawn aside an object with an alignment <_eRelOrient2> */ - bool _Minor( sal_Int16 _eRelOrient1, + static bool _Minor( sal_Int16 _eRelOrient1, sal_Int16 _eRelOrient2, - bool _bLeft ) const; + bool _bLeft ); public: virtual void CalcPosition() = 0; diff --git a/sw/source/core/inc/docsort.hxx b/sw/source/core/inc/docsort.hxx index 27c79a15aa7e..b4e4ef338735 100644 --- a/sw/source/core/inc/docsort.hxx +++ b/sw/source/core/inc/docsort.hxx @@ -85,7 +85,7 @@ struct SwSortElement bool operator==(const SwSortElement& ) const; bool operator<(const SwSortElement& ) const; - double StrToDouble(const OUString& rStr) const; + static double StrToDouble(const OUString& rStr); private: int keycompare(const SwSortElement& rCmp, sal_uInt16 nKey) const; }; diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx index e9a8569a6f58..bce6d1867dcf 100644 --- a/sw/source/core/inc/dview.hxx +++ b/sw/source/core/inc/dview.hxx @@ -50,8 +50,8 @@ class SwDrawView : public FmFormView optional input parameter - 'child' object, which will not be considered on the calculation of the maximal order number */ - sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj, - const SdrObject* _pExclChildObj = 0L ) const; + static sal_uInt32 _GetMaxChildOrdNum( const SwFlyFrm& _rParentObj, + const SdrObject* _pExclChildObj = 0L ); /** method to move 'repeated' objects of the given moved object to the according level diff --git a/sw/source/core/inc/fefly.hxx b/sw/source/core/inc/fefly.hxx index 0c51868d6773..6ab335a436d7 100644 --- a/sw/source/core/inc/fefly.hxx +++ b/sw/source/core/inc/fefly.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_FEFLY_HXX #define INCLUDED_SW_SOURCE_CORE_INC_FEFLY_HXX -bool sw_ChkAndSetNewAnchor( SwEditShell& rEditShell, const SwFlyFrm& rFly, SfxItemSet& rSet ); +bool sw_ChkAndSetNewAnchor( const SwFlyFrm& rFly, SfxItemSet& rSet ); #endif diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index 6755965d0f91..8e2109411599 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -45,7 +45,7 @@ public: ) {} inline SwFntObj *First( ); - inline SwFntObj *Next( SwFntObj *pFntObj); + static inline SwFntObj *Next( SwFntObj *pFntObj); void Flush(); }; diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index fe3ec9190905..bc729ca77ab0 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -844,7 +844,7 @@ public: // #i65250# inline sal_uInt32 GetFrmId() const { return mnFrmId; } - inline sal_uInt32 GetLastFrmId() const { return mnLastFrmId; } + static inline sal_uInt32 GetLastFrmId() { return mnLastFrmId; } // NEW TABELS // Some functions for covered/covering table cells. This way unnessessary diff --git a/sw/source/core/inc/frminf.hxx b/sw/source/core/inc/frminf.hxx index c62932be149d..15aa7e908d93 100644 --- a/sw/source/core/inc/frminf.hxx +++ b/sw/source/core/inc/frminf.hxx @@ -31,7 +31,7 @@ class SwTxtFrmInfo const SwTxtFrm *pFrm; // Where does the text (w/o whitespaces) start (document is global!)? - SwTwips GetLineStart( const SwTxtCursor &rLine ) const; + static SwTwips GetLineStart( const SwTxtCursor &rLine ); public: inline SwTxtFrmInfo( const SwTxtFrm *pTxtFrm ) : pFrm(pTxtFrm) { } diff --git a/sw/source/core/inc/ftnboss.hxx b/sw/source/core/inc/ftnboss.hxx index bd0efb9c02b9..c8edcc2424b9 100644 --- a/sw/source/core/inc/ftnboss.hxx +++ b/sw/source/core/inc/ftnboss.hxx @@ -83,7 +83,7 @@ public: const SwFtnFrm *FindFirstFtn( SwCntntFrm* ) const; SwFtnContFrm *FindNearestFtnCont( bool bDontLeave = false ); - void ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *, + static void ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *, SwCntntFrm *pNew ); void RearrangeFtns( const SwTwips nDeadLine, const bool bLock = false, const SwTxtFtn *pAttr = 0 ); diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx index 96bf9a10bbe6..a08fec3dbdd4 100644 --- a/sw/source/core/inc/layact.hxx +++ b/sw/source/core/inc/layact.hxx @@ -111,7 +111,7 @@ class SwLayAction bool _TurboAction( const SwCntntFrm * ); void InternalAction(); - SwPageFrm *CheckFirstVisPage( SwPageFrm *pPage ); + static SwPageFrm *CheckFirstVisPage( SwPageFrm *pPage ); bool RemoveEmptyBrowserPages(); diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx index 32a47199341c..68f0ddf9be3f 100644 --- a/sw/source/core/inc/pamtyp.hxx +++ b/sw/source/core/inc/pamtyp.hxx @@ -66,7 +66,7 @@ typedef bool (SwPosition:: *CmpOp)( const SwPosition& ) const; typedef const SwTxtAttr* (*GetHint)( const SwpHints&, sal_uInt16&, sal_Int32 ); typedef bool (utl::TextSearch:: *SearchTxt)( const OUString&, sal_Int32*, sal_Int32*, ::com::sun::star::util::SearchResult* ); -typedef void (SwNodes:: *MvSection)( SwNodeIndex * ) const; +typedef void (*MvSection)( SwNodeIndex * ); struct SwMoveFnCollection { diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx index 63f8faafdb03..cbb5c1f8896e 100644 --- a/sw/source/core/inc/rootfrm.hxx +++ b/sw/source/core/inc/rootfrm.hxx @@ -251,7 +251,7 @@ public: * Makes sure that, starting from the passed Page, all page-bound Frames * are on the right Page (pagenumber). */ - void AssertPageFlys( SwPageFrm * ); + static void AssertPageFlys( SwPageFrm * ); /// Invalidate all Cntnt, Size or PrtArea void InvalidateAllCntnt( sal_uInt8 nInvalidate = INV_SIZE ); diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index 6657b1ca85f7..20f06eb8244c 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -113,7 +113,7 @@ public: sal_uInt16 GetCurMax() const { return nCurMax; } inline SwCacheObj *First() { return pRealFirst; } inline SwCacheObj *Last() { return pLast; } - inline SwCacheObj *Next( SwCacheObj *pCacheObj); + static inline SwCacheObj *Next( SwCacheObj *pCacheObj); inline SwCacheObj* operator[](sal_uInt16 nIndex) { return m_aCacheObjects[nIndex]; } inline sal_uInt16 size() { return m_aCacheObjects.size(); } }; diff --git a/sw/source/core/inc/txmsrt.hxx b/sw/source/core/inc/txmsrt.hxx index f1e62ad165df..aa25f2e77d7b 100644 --- a/sw/source/core/inc/txmsrt.hxx +++ b/sw/source/core/inc/txmsrt.hxx @@ -138,7 +138,7 @@ struct SwTOXSortTabBase virtual ~SwTOXSortTabBase() {} sal_uInt16 GetType() const { return nType; } - sal_uInt16 GetOptions() const { return nOpt; } + static sal_uInt16 GetOptions() { return nOpt; } virtual void FillText( SwTxtNode& rNd, const SwIndex& rInsPos, sal_uInt16 nAuthField = 0) const; virtual sal_uInt16 GetLevel() const = 0; diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 75884362bbb5..7fe60f1be2a6 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -151,8 +151,8 @@ class SwTxtFrm: public SwCntntFrm bool CalcFollow( const sal_Int32 nTxtOfst ); // Corrects the position from which we need to format - sal_Int32 FindBrk(const OUString &rTxt, const sal_Int32 nStart, - const sal_Int32 nEnd) const; + static sal_Int32 FindBrk(const OUString &rTxt, const sal_Int32 nStart, + const sal_Int32 nEnd); // inline branch SwTwips _GetFtnFrmHeight() const; @@ -222,7 +222,7 @@ public: void Init(); /// Is called by FormatSpelling() - SwRect _AutoSpell( const SwCntntNode*, const SwViewOption&, sal_Int32 ); + SwRect _AutoSpell( const SwCntntNode*, sal_Int32 ); /// Is called by FormatSpelling() SwRect SmartTagScan( SwCntntNode* , sal_Int32 ); diff --git a/sw/source/core/inc/wrong.hxx b/sw/source/core/inc/wrong.hxx index 03b28a9559b4..10a030982f32 100644 --- a/sw/source/core/inc/wrong.hxx +++ b/sw/source/core/inc/wrong.hxx @@ -77,7 +77,7 @@ private: SwWrongArea() : mnPos(0), mnLen(0), mpSubList(NULL), mColor(0,0,0), mLineType(WRONGAREA_WAVE) {} - Color getSmartColor ( com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag) + static Color getSmartColor ( com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag) { try { @@ -103,7 +103,7 @@ private: return SwViewOption::GetSmarttagColor( ); } - WrongAreaLineType getSmartLineType( com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag ) + static WrongAreaLineType getSmartLineType( com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag ) { try { @@ -137,7 +137,7 @@ private: return WRONGAREA_DASHED; } - Color getWrongAreaColor(WrongListType listType, + static Color getWrongAreaColor(WrongListType listType, com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag ) { if (WRONGLIST_SPELL == listType) @@ -156,7 +156,7 @@ private: return SwViewOption::GetSpellColor(); } - WrongAreaLineType getWrongAreaLineType(WrongListType listType, + static WrongAreaLineType getWrongAreaLineType(WrongListType listType, com::sun::star::uno::Reference< com::sun::star::container::XStringKeyMap > xPropertyBag ) { if (WRONGLIST_SPELL == listType) @@ -185,7 +185,7 @@ class SwWrongList sal_Int32 nBeginInvalid; // Start of the invalid range sal_Int32 nEndInvalid; // End of the invalid range - void ShiftLeft( sal_Int32 &rPos, sal_Int32 nStart, sal_Int32 nEnd ) + static void ShiftLeft( sal_Int32 &rPos, sal_Int32 nStart, sal_Int32 nEnd ) { if( rPos > nStart ) rPos = rPos > nEnd ? rPos - nEnd + nStart : nStart; } void _Invalidate( sal_Int32 nBegin, sal_Int32 nEnd ); diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index c24d63771381..6421cda7ea56 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -133,7 +133,7 @@ class SwImplProtocol void _Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ); bool NewStream(); void CheckLine( OString& rLine ); - void SectFunc( OStringBuffer& rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam ); + static void SectFunc( OStringBuffer& rOut, const SwFrm* pFrm, sal_uLong nAct, void* pParam ); public: SwImplProtocol(); ~SwImplProtocol(); diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 9cb3dae26eb3..234f2b97838f 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -2706,7 +2706,7 @@ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, pRet->Paste( pUpper, pSibling ); pRet->PreparePage( bFtn ); if ( pRet->GetNext() ) - static_cast<SwRootFrm*>(pRet->GetUpper())->AssertPageFlys( pRet ); + SwRootFrm::AssertPageFlys( pRet ); return pRet; } diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index af7fee2e3a3a..88e5fe02f028 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -1934,7 +1934,7 @@ bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob ) { case ONLINE_SPELLING : { - SwRect aRepaint( const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pCnt))->_AutoSpell( pCntntNode, *pSh->GetViewOptions(), nTxtPos ) ); + SwRect aRepaint( const_cast<SwTxtFrm*>(static_cast<const SwTxtFrm*>(pCnt))->_AutoSpell( pCntntNode, nTxtPos ) ); bPageValid = bPageValid && !pTxtNode->IsWrongDirty(); if( !bPageValid ) bAllValid = false; @@ -2022,7 +2022,7 @@ bool SwLayIdle::DoIdleJob( IdleJobType eJob, bool bVisAreaOnly ) return false; break; case AUTOCOMPLETE_WORDS : - if( !pViewOptions->IsAutoCompleteWords() || + if( !SwViewOption::IsAutoCompleteWords() || SwDoc::GetAutoCompleteWords().IsLockWordLstLocked()) return false; break; @@ -2273,7 +2273,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewShellImp *pI ) : const SwViewShell* pViewShell = pImp->GetShell(); // See conditions in DoIdleJob() const bool bSpell = rVOpt.IsOnlineSpell(); - const bool bACmplWrd = rVOpt.IsAutoCompleteWords(); + const bool bACmplWrd = SwViewOption::IsAutoCompleteWords(); const bool bWordCount = pViewShell->getIDocumentStatistics()->GetDocStat().bModified; const bool bSmartTags = !pViewShell->GetDoc()->GetDocShell()->IsHelpDocument() && !pViewShell->GetDoc()->isXForms() && diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index a81602962ce8..85bbbf2eb700 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1117,7 +1117,7 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, bool bNotifyFields, SwPageFrm** p } pRoot->SetAssertFlyPages(); - pRoot->AssertPageFlys( pStart ); + SwRootFrm::AssertPageFlys( pStart ); if ( bNotifyFields && (!pImp || !pImp->IsUpdateExpFlds()) ) { @@ -1242,7 +1242,7 @@ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, bool bFtn ) } } else - pRoot->AssertPageFlys( pSibling ); + SwRootFrm::AssertPageFlys( pSibling ); } // For the update of page numbering fields, nDocPos provides diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index be5fb3f9c861..d7c8d214c232 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4400,7 +4400,7 @@ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const aTabRect.Pos() += Frm().Pos(); SwRect aTabOutRect( rRect ); aTabOutRect.Intersection( aTabRect ); - pViewOption->DrawRect( gProp.pSGlobalShell->GetOut(), aTabOutRect, COL_LIGHTGRAY ); + SwViewOption::DrawRect( gProp.pSGlobalShell->GetOut(), aTabOutRect, COL_LIGHTGRAY ); } const_cast<SwTabFrm*>(this)->ResetComplete(); } diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index d777c3d7f807..bc127de45b4b 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2584,7 +2584,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) else { SwNodeIndex idx( nodes.GetEndOfContent()); - if( SwCntntNode* last = nodes.GoPrevious( &idx )) + if( SwCntntNode* last = SwNodes::GoPrevious( &idx )) inSelection = *pEndPos == SwPosition( *last, last->Len()); } } diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index 3ac1d9686c80..c7b916abace4 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -154,7 +154,7 @@ SwTwips SwAnchoredObjectPosition::ToCharTopOfLine() const */ SwTwips SwAnchoredObjectPosition::_GetTopForObjPos( const SwFrm& _rFrm, const SwRectFn& _fnRect, - const bool _bVert ) const + const bool _bVert ) { SwTwips nTopOfFrmForObjPos = (_rFrm.Frm().*_fnRect->fnGetTop)(); @@ -684,7 +684,7 @@ void SwAnchoredObjectPosition::_ToggleHoriOrientAndAlign( const bool _bToggleLeftRight, sal_Int16& _ioeHoriOrient, sal_Int16& _iopeRelOrient - ) const + ) { if( _bToggleLeftRight ) { @@ -1036,7 +1036,7 @@ bool SwAnchoredObjectPosition::_DrawAsideFly( const SwFlyFrm* _pFly, */ bool SwAnchoredObjectPosition::_Minor( sal_Int16 _eRelOrient1, sal_Int16 _eRelOrient2, - bool _bLeft ) const + bool _bLeft ) { bool bRetVal; diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index 2952981039d4..6ab016466875 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -69,7 +69,7 @@ private: typedef std::deque<SwOLEObj *> OleObjects_t; OleObjects_t m_OleObjects; sal_Int32 m_nLRU_InitSize; - uno::Sequence< OUString > GetPropertyNames(); + static uno::Sequence< OUString > GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 7b49f5d3318c..685fcfa1be6e 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -86,7 +86,7 @@ class SwTableBox_Impl long mnRowSpan; bool mbDummyFlag; - void SetNewCol( Color** ppCol, const Color* pNewCol ); + static void SetNewCol( Color** ppCol, const Color* pNewCol ); public: SwTableBox_Impl() : mpUserColor(0), mpNumFmtColor(0), mnRowSpan(1), mbDummyFlag( false ) {} diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index aa18669f4e4c..0e2b9e79a4e9 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -62,7 +62,7 @@ class FormatLevel public: inline FormatLevel() { ++nLevel; } inline ~FormatLevel() { --nLevel; } - inline sal_uInt16 GetLevel() const { return nLevel; } + static inline sal_uInt16 GetLevel() { return nLevel; } static bool LastLevel() { return 10 < nLevel; } }; sal_uInt16 FormatLevel::nLevel = 0; @@ -624,13 +624,13 @@ SwCntntFrm *SwTxtFrm::JoinFrm() { if( !pEndBoss ) pEndBoss = pFoll->FindFtnBossFrm(); - pEndBoss->ChangeFtnRef( pFoll, static_cast<const SwTxtFtn*>(pHt), this ); + SwFtnBossFrm::ChangeFtnRef( pFoll, static_cast<const SwTxtFtn*>(pHt), this ); } else { if( !pFtnBoss ) pFtnBoss = pFoll->FindFtnBossFrm( true ); - pFtnBoss->ChangeFtnRef( pFoll, static_cast<const SwTxtFtn*>(pHt), this ); + SwFtnBossFrm::ChangeFtnRef( pFoll, static_cast<const SwTxtFtn*>(pHt), this ); } SetFtn( true ); } @@ -717,13 +717,13 @@ SwCntntFrm *SwTxtFrm::SplitFrm( const sal_Int32 nTxtPos ) { if( !pEndBoss ) pEndBoss = FindFtnBossFrm(); - pEndBoss->ChangeFtnRef( this, static_cast<const SwTxtFtn*>(pHt), pNew ); + SwFtnBossFrm::ChangeFtnRef( this, static_cast<const SwTxtFtn*>(pHt), pNew ); } else { if( !pFtnBoss ) pFtnBoss = FindFtnBossFrm( true ); - pFtnBoss->ChangeFtnRef( this, static_cast<const SwTxtFtn*>(pHt), pNew ); + SwFtnBossFrm::ChangeFtnRef( this, static_cast<const SwTxtFtn*>(pHt), pNew ); } pNew->SetFtn( true ); } @@ -1739,7 +1739,7 @@ void SwTxtFrm::Format( const SwBorderAttrs * ) SetEmpty( false ); // In order to not get confused by nested Formats FormatLevel aLevel; - if( 12 == aLevel.GetLevel() ) + if( 12 == FormatLevel::GetLevel() ) return; // We could be possibly not allowed to alter the format information diff --git a/sw/source/core/text/frminf.cxx b/sw/source/core/text/frminf.cxx index 61b5560b4501..2c813eafe51b 100644 --- a/sw/source/core/text/frminf.cxx +++ b/sw/source/core/text/frminf.cxx @@ -83,7 +83,7 @@ bool SwTxtFrmInfo::IsFilled( const sal_uInt8 nPercent ) const } // Where does the text start (without whitespace)? (document global) -SwTwips SwTxtFrmInfo::GetLineStart( const SwTxtCursor &rLine ) const +SwTwips SwTxtFrmInfo::GetLineStart( const SwTxtCursor &rLine ) { const sal_Int32 nTxtStart = rLine.GetTxtStart(); if( rLine.GetStart() == nTxtStart ) diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 768ad633658c..75ea6b0a916c 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -1005,7 +1005,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const Size aSize; Point aTmp; - const sal_uInt16 nPostItsWidth = m_pOpt->GetPostItsWidth( GetOut() ); + const sal_uInt16 nPostItsWidth = SwViewOption::GetPostItsWidth( GetOut() ); const sal_uInt16 nFontHeight = m_pFnt->GetHeight( m_pVsh, *GetOut() ); const sal_uInt16 nFontAscent = m_pFnt->GetAscent( m_pVsh, *GetOut() ); @@ -1041,7 +1041,7 @@ void SwTxtPaintInfo::DrawPostIts( const SwLinePortion&, bool bScript ) const GetTxtFrm()->SwitchHorizontalToVertical( aTmpRect ); const Rectangle aRect( aTmpRect.SVRect() ); - m_pOpt->PaintPostIts( const_cast<OutputDevice*>(GetOut()), aRect, bScript ); + SwViewOption::PaintPostIts( const_cast<OutputDevice*>(GetOut()), aRect, bScript ); } } diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx index 7a6053fb2655..ad2b7f54cfbf 100644 --- a/sw/source/core/text/itrform2.hxx +++ b/sw/source/core/text/itrform2.hxx @@ -231,7 +231,7 @@ public: * the portions' part. Removing left or right border. * @param rPortion drop portion for merge **/ - void MergeCharacterBorder( SwDropPortion& rPortion ); + static void MergeCharacterBorder( SwDropPortion& rPortion ); /** * Merge border of the line portion with setting the portion's diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx index 5e9e10a41a12..31d6da800f01 100644 --- a/sw/source/core/text/porexp.cxx +++ b/sw/source/core/text/porexp.cxx @@ -102,7 +102,7 @@ SwLinePortion *SwBlankPortion::Compress() { return this; } * Causes problems with Fly */ sal_uInt16 SwBlankPortion::MayUnderflow( const SwTxtFormatInfo &rInf, - sal_Int32 nIdx, bool bUnderflow ) const + sal_Int32 nIdx, bool bUnderflow ) { if( rInf.StopUnderflow() ) return 0; @@ -220,7 +220,7 @@ void SwPostItsPortion::Paint( const SwTxtPaintInfo &rInf ) const sal_uInt16 SwPostItsPortion::GetViewWidth( const SwTxtSizeInfo &rInf ) const { // Unbelievable: PostIts are always visible - return rInf.OnWin() ? rInf.GetOpt().GetPostItsWidth( rInf.GetOut() ) : 0; + return rInf.OnWin() ? SwViewOption::GetPostItsWidth( rInf.GetOut() ) : 0; } bool SwPostItsPortion::Format( SwTxtFormatInfo &rInf ) diff --git a/sw/source/core/text/porexp.hxx b/sw/source/core/text/porexp.hxx index 4e637ed9a0db..8ecf8c5ea9b7 100644 --- a/sw/source/core/text/porexp.hxx +++ b/sw/source/core/text/porexp.hxx @@ -55,8 +55,8 @@ public: virtual void FormatEOL( SwTxtFormatInfo &rInf ) SAL_OVERRIDE; virtual bool Format( SwTxtFormatInfo &rInf ) SAL_OVERRIDE; virtual void Paint( const SwTxtPaintInfo &rInf ) const SAL_OVERRIDE; - sal_uInt16 MayUnderflow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx, - bool bUnderflow ) const; + static sal_uInt16 MayUnderflow( const SwTxtFormatInfo &rInf, sal_Int32 nIdx, + bool bUnderflow ); // Accessibility: pass information about this portion to the PortionHandler virtual void HandlePortion( SwPortionHandler& rPH ) const SAL_OVERRIDE; diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 3573b0f51483..691a7161fafc 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -420,8 +420,7 @@ bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) aGuess.BreakPos() != rInf.GetLineStart() && ( !bFirstPor || rInf.GetFly() || rInf.GetLast()->IsFlyPortion() || rInf.IsFirstMulti() ) && - ( !rInf.GetLast()->IsBlankPortion() || static_cast<SwBlankPortion*>( - rInf.GetLast())->MayUnderflow( rInf, rInf.GetIdx()-1, true ))) + ( !rInf.GetLast()->IsBlankPortion() || SwBlankPortion::MayUnderflow( rInf, rInf.GetIdx()-1, true ))) { // case C1 (former BreakUnderflow()) BreakUnderflow( rInf ); } diff --git a/sw/source/core/text/redlnitr.hxx b/sw/source/core/text/redlnitr.hxx index 48fe9d8a1101..90e3bc5f5881 100644 --- a/sw/source/core/text/redlnitr.hxx +++ b/sw/source/core/text/redlnitr.hxx @@ -40,7 +40,7 @@ class SwExtend sal_Int32 nEnd; bool _Leave( SwFont& rFnt, sal_Int32 nNew ); bool Inside() const { return ( nPos >= nStart && nPos < nEnd ); } - void ActualizeFont( SwFont &rFnt, sal_uInt16 nAttr ); + static void ActualizeFont( SwFont &rFnt, sal_uInt16 nAttr ); public: SwExtend( const std::vector<sal_uInt16> &rA, sal_Int32 nSt ) : pFnt(0), rArr( rA ), nStart( nSt ), nPos( COMPLETE_STRING ), nEnd( nStart + rA.size() ) {} diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 608b579f6f45..aa5e3c77f429 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -657,7 +657,7 @@ void SwTxtFrm::HideAndShowObjects() */ sal_Int32 SwTxtFrm::FindBrk( const OUString &rTxt, const sal_Int32 nStart, - const sal_Int32 nEnd ) const + const sal_Int32 nEnd ) { sal_Int32 nFound = nStart; const sal_Int32 nEndLine = std::min( nEnd, rTxt.getLength() - 1 ); diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 8e7c23cdf197..9505b649538b 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -647,7 +647,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine ) GetNode()->getIDocumentLayoutAccess()->GetLayouter()->CollectEndnote( pNew ); } else if( pSrcFrm != this ) - pBoss->ChangeFtnRef( pSrcFrm, pFtn, this ); + SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this ); bInFtnConnect = false; return; } @@ -668,7 +668,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine ) if( !pSrcFrm ) pBoss->AppendFtn( this, pFtn ); else if( pSrcFrm != this ) - pBoss->ChangeFtnRef( pSrcFrm, pFtn, this ); + SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this ); bInFtnConnect = false; return; } @@ -697,7 +697,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine ) // If the Footnote has been registered to a Follow, we need to // rewire it now too if ( pSrcFrm != this ) - pBoss->ChangeFtnRef( pSrcFrm, pFtn, this ); + SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this ); // We have some room left, so the Footnote can grow if ( pFtnFrm->GetFollow() && nDiff > 0 ) @@ -739,7 +739,7 @@ void SwTxtFrm::ConnectFtn( SwTxtFtn *pFtn, const SwTwips nDeadLine ) pSrcBoss->MoveFtns( pSrcFrm, this, pFtn ); } else - pBoss->ChangeFtnRef( pSrcFrm, pFtn, this ); + SwFtnBossFrm::ChangeFtnRef( pSrcFrm, pFtn, this ); } } diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index d32219987adc..aab4a3badde7 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -29,7 +29,7 @@ class XmlPortionDumper:public SwPortionHandler xmlTextWriterPtr writer; sal_Int32 ofs; - const char* getTypeName( sal_uInt16 nType ) + static const char* getTypeName( sal_uInt16 nType ) { switch ( nType ) { diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index e4726abcb48d..452e43a7ce72 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -2245,7 +2245,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic, pFntObj->GetPropWidth() == static_cast<SwSubFont const *>(pOwn)->GetPropWidth() && ( !pFntObj->pPrinter || pFntObj->pPrinter == pOut ) ) ) - pFntObj = pFntCache->Next( pFntObj ); + pFntObj = SwFntCache::Next( pFntObj ); if( pFntObj && pFntObj->pPrinter.get() != pOut ) { @@ -2256,7 +2256,7 @@ SwFntAccess::SwFntAccess( const void* &rMagic, pTmpObj->GetZoom()==nZoom && pTmpObj->pPrinter==pOut && pTmpObj->GetPropWidth() == static_cast<SwSubFont const *>(pOwn)->GetPropWidth() ) ) - pTmpObj = pFntCache->Next( pTmpObj ); + pTmpObj = SwFntCache::Next( pTmpObj ); if( pTmpObj ) pFntObj = pTmpObj; } diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index a454edf1328f..2d70627a6bfc 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4076,7 +4076,7 @@ void SwTxtNode::RemoveFromList() { if ( IsInList() ) { - mpList->RemoveListItem( *mpNodeNum ); + SwList::RemoveListItem( *mpNodeNum ); mpList = 0; delete mpNodeNum; mpNodeNum = 0L; diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index ef0f681114e3..90c8fcdb763e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1220,7 +1220,7 @@ bool SwTxtNode::Convert( SwConversionArgs &rArgs ) // Die Aehnlichkeiten zu SwTxtNode::Spell sind beabsichtigt ... // ACHTUNG: Ev. Bugs in beiden Routinen fixen! -SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rViewOpt, sal_Int32 nActPos ) +SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, sal_Int32 nActPos ) { SwRect aRect; #if OSL_DEBUG_LEVEL > 1 @@ -1258,7 +1258,7 @@ SwRect SwTxtFrm::_AutoSpell( const SwCntntNode* pActNode, const SwViewOption& rV sal_Int32 nInvEnd = 0; const bool bAddAutoCmpl = pNode->IsAutoCompleteWordDirty() && - rViewOpt.IsAutoCompleteWords(); + SwViewOption::IsAutoCompleteWords(); if( pNode->GetWrong() ) { diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx index 60e5111d6093..dc726a5cfe67 100644 --- a/sw/source/core/undo/rolbck.cxx +++ b/sw/source/core/undo/rolbck.cxx @@ -432,7 +432,7 @@ SwHistorySetFootnote::SwHistorySetFootnote( SwTxtFtn* pTxtFtn, sal_uLong nNodePo SwNodeIndex aSttIdx( *pTxtFtn->GetStartNode() ); pTxtFtn->SetStartNode( 0, false ); - m_pUndo->SaveSection( pDoc, aSttIdx ); + m_pUndo->SaveSection( aSttIdx ); m_nNodeIndex = pSaveNd->GetIndex(); } diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index eac70f8dd101..86f44f280dd2 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -67,46 +67,32 @@ SwUndoFmtAttrHelper::SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSvDrwPt ) void SwUndoFmtAttrHelper::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { - if( pOld ) - { - if ( pOld->Which() == RES_OBJECTDYING ) - { + if( pOld ) { + if ( pOld->Which() == RES_OBJECTDYING ) { CheckRegistration( pOld, pNew ); - } - else if ( pNew ) - { - if( POOLATTR_END >= pOld->Which() ) - { - if ( GetUndo() ) - { + } else if ( pNew ) { + if( POOLATTR_END >= pOld->Which() ) { + if ( GetUndo() ) { m_pUndo->PutAttr( *pOld ); - } - else - { + } else { m_pUndo.reset( new SwUndoFmtAttr( *pOld, - *static_cast<SwFmt*>(GetRegisteredInNonConst()), m_bSaveDrawPt ) ); + *static_cast<SwFmt*>(GetRegisteredInNonConst()), m_bSaveDrawPt ) ); } - } - else if ( RES_ATTRSET_CHG == pOld->Which() ) - { - if ( GetUndo() ) - { + } else if ( RES_ATTRSET_CHG == pOld->Which() ) { + if ( GetUndo() ) { SfxItemIter aIter( - *(static_cast<const SwAttrSetChg*>(pOld))->GetChgSet() ); + *(static_cast<const SwAttrSetChg*>(pOld))->GetChgSet() ); const SfxPoolItem* pItem = aIter.GetCurItem(); - while ( pItem ) - { + while ( pItem ) { m_pUndo->PutAttr( *pItem ); if( aIter.IsAtEnd() ) break; pItem = aIter.NextItem(); } - } - else - { + } else { m_pUndo.reset( new SwUndoFmtAttr( - *static_cast<const SwAttrSetChg*>(pOld)->GetChgSet(), - *static_cast<SwFmt*>(GetRegisteredInNonConst()), m_bSaveDrawPt ) ); + *static_cast<const SwAttrSetChg*>(pOld)->GetChgSet(), + *static_cast<SwFmt*>(GetRegisteredInNonConst()), m_bSaveDrawPt ) ); } } } @@ -118,7 +104,7 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxItemSet& rOldSet, bool bSaveDrawPt ) : SwUndo( UNDO_INSFMTATTR ) , m_pFmt( &rChgFmt ) - // #i56253# + // #i56253# , m_pOldSet( new SfxItemSet( rOldSet ) ) , m_nNodeIndex( 0 ) , m_nFmtWhich( rChgFmt.Which() ) @@ -143,32 +129,22 @@ SwUndoFmtAttr::SwUndoFmtAttr( const SfxPoolItem& rItem, SwFmt& rChgFmt, void SwUndoFmtAttr::Init() { // treat change of anchor specially - if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) - { + if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) { SaveFlyAnchor( m_bSaveDrawPt ); - } - else if ( RES_FRMFMT == m_nFmtWhich ) - { + } else if ( RES_FRMFMT == m_nFmtWhich ) { SwDoc* pDoc = m_pFmt->GetDoc(); - if ( pDoc->GetTblFrmFmts()->Contains( m_pFmt )) - { + if ( pDoc->GetTblFrmFmts()->Contains( m_pFmt )) { // Table Format: save table position, table formats are volatile! SwTable * pTbl = SwIterator<SwTable,SwFmt>( *m_pFmt ).First(); - if ( pTbl ) - { + if ( pTbl ) { m_nNodeIndex = pTbl->GetTabSortBoxes()[ 0 ]->GetSttNd() - ->FindTableNode()->GetIndex(); + ->FindTableNode()->GetIndex(); } - } - else if ( pDoc->GetSections().Contains( m_pFmt )) - { + } else if ( pDoc->GetSections().Contains( m_pFmt )) { m_nNodeIndex = m_pFmt->GetCntnt().GetCntntIdx()->GetIndex(); - } - else if ( 0 != dynamic_cast< SwTableBoxFmt* >( m_pFmt ) ) - { + } else if ( 0 != dynamic_cast< SwTableBoxFmt* >( m_pFmt ) ) { SwTableBox * pTblBox = SwIterator<SwTableBox,SwFmt>( *m_pFmt ).First(); - if ( pTblBox ) - { + if ( pTblBox ) { m_nNodeIndex = pTblBox->GetSttIdx(); } } @@ -191,39 +167,30 @@ void SwUndoFmtAttr::UndoImpl(::sw::UndoRedoContext & rContext) // restored, all other attributes are also restored. // Thus, keep track of its restoration bool bAnchorAttrRestored( false ); - if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) - { + if ( SfxItemState::SET == m_pOldSet->GetItemState( RES_ANCHOR, false )) { bAnchorAttrRestored = RestoreFlyAnchor(rContext); - if ( bAnchorAttrRestored ) - { + if ( bAnchorAttrRestored ) { // Anchor attribute successful restored. // Thus, keep anchor position for redo SaveFlyAnchor(); - } - else - { + } else { // Anchor attribute not restored due to invalid anchor position. // Thus, delete anchor attribute. m_pOldSet->ClearItem( RES_ANCHOR ); } } - if ( !bAnchorAttrRestored ) - { + if ( !bAnchorAttrRestored ) { SwUndoFmtAttrHelper aTmp( *m_pFmt, m_bSaveDrawPt ); m_pFmt->SetFmtAttr( *m_pOldSet ); - if ( aTmp.GetUndo() ) - { + if ( aTmp.GetUndo() ) { // transfer ownership of helper object's old set m_pOldSet = std::move(aTmp.GetUndo()->m_pOldSet); - } - else - { + } else { m_pOldSet->ClearItem(); } - if ( RES_FLYFRMFMT == m_nFmtWhich || RES_DRAWFRMFMT == m_nFmtWhich ) - { + if ( RES_FLYFRMFMT == m_nFmtWhich || RES_DRAWFRMFMT == m_nFmtWhich ) { rContext.SetSelections(static_cast<SwFrmFmt*>(m_pFmt), 0); } } @@ -324,57 +291,46 @@ void SwUndoFmtAttr::RepeatImpl(::sw::RepeatContext & rContext) SwDoc & rDoc(rContext.GetDoc()); - switch ( m_nFmtWhich ) - { - case RES_GRFFMTCOLL: - { - SwNoTxtNode *const pNd = - rContext.GetRepeatPaM().GetNode().GetNoTxtNode(); - if( pNd ) - { - rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() ); - } + switch ( m_nFmtWhich ) { + case RES_GRFFMTCOLL: { + SwNoTxtNode *const pNd = + rContext.GetRepeatPaM().GetNode().GetNoTxtNode(); + if( pNd ) { + rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() ); } - break; + } + break; - case RES_TXTFMTCOLL: - { - SwTxtNode *const pNd = - rContext.GetRepeatPaM().GetNode().GetTxtNode(); - if( pNd ) - { - rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() ); - } + case RES_TXTFMTCOLL: { + SwTxtNode *const pNd = + rContext.GetRepeatPaM().GetNode().GetTxtNode(); + if( pNd ) { + rDoc.SetAttr( m_pFmt->GetAttrSet(), *pNd->GetFmtColl() ); } - break; - - case RES_FLYFRMFMT: - { - // Check if the cursor is in a flying frame - // Steps: search in all FlyFrmFormats for the FlyCntnt attribute - // and validate if the cursor is in the respective section - SwFrmFmt *const pFly = - rContext.GetRepeatPaM().GetNode().GetFlyFmt(); - if( pFly ) - { - // Bug 43672: do not set all attributes! - if (SfxItemState::SET == - m_pFmt->GetAttrSet().GetItemState( RES_CNTNT )) - { - SfxItemSet aTmpSet( m_pFmt->GetAttrSet() ); - aTmpSet.ClearItem( RES_CNTNT ); - if( aTmpSet.Count() ) - { - rDoc.SetAttr( aTmpSet, *pFly ); - } - } - else - { - rDoc.SetAttr( m_pFmt->GetAttrSet(), *pFly ); + } + break; + + case RES_FLYFRMFMT: { + // Check if the cursor is in a flying frame + // Steps: search in all FlyFrmFormats for the FlyCntnt attribute + // and validate if the cursor is in the respective section + SwFrmFmt *const pFly = + rContext.GetRepeatPaM().GetNode().GetFlyFmt(); + if( pFly ) { + // Bug 43672: do not set all attributes! + if (SfxItemState::SET == + m_pFmt->GetAttrSet().GetItemState( RES_CNTNT )) { + SfxItemSet aTmpSet( m_pFmt->GetAttrSet() ); + aTmpSet.ClearItem( RES_CNTNT ); + if( aTmpSet.Count() ) { + rDoc.SetAttr( aTmpSet, *pFly ); } + } else { + rDoc.SetAttr( m_pFmt->GetAttrSet(), *pFly ); } - break; } + break; + } } } @@ -382,8 +338,7 @@ SwRewriter SwUndoFmtAttr::GetRewriter() const { SwRewriter aRewriter; - if (m_pFmt) - { + if (m_pFmt) { aRewriter.AddRule(UndoArg1, m_pFmt->GetName()); } @@ -393,8 +348,7 @@ SwRewriter SwUndoFmtAttr::GetRewriter() const void SwUndoFmtAttr::PutAttr( const SfxPoolItem& rItem ) { m_pOldSet->Put( rItem ); - if ( RES_ANCHOR == rItem.Which() ) - { + if ( RES_ANCHOR == rItem.Which() ) { SaveFlyAnchor( m_bSaveDrawPt ); } } @@ -402,12 +356,10 @@ void SwUndoFmtAttr::PutAttr( const SfxPoolItem& rItem ) void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt ) { // Format is valid, otherwise you would not reach this point here - if( bSvDrwPt ) - { - if ( RES_DRAWFRMFMT == m_pFmt->Which() ) - { + if( bSvDrwPt ) { + if ( RES_DRAWFRMFMT == m_pFmt->Which() ) { Point aPt( static_cast<SwFrmFmt*>(m_pFmt)->FindSdrObject() - ->GetRelativePos() ); + ->GetRelativePos() ); // store old value as attribute, to keep SwUndoFmtAttr small m_pOldSet->Put( SwFmtFrmSize( ATT_VAR_SIZE, aPt.X(), aPt.Y() ) ); } @@ -419,8 +371,7 @@ void SwUndoFmtAttr::SaveFlyAnchor( bool bSvDrwPt ) return; sal_Int32 nCntnt = 0; - switch( rAnchor.GetAnchorId() ) - { + switch( rAnchor.GetAnchorId() ) { case FLY_AS_CHAR: case FLY_AT_CHAR: nCntnt = rAnchor.GetCntntAnchor()->nContent.GetIndex(); @@ -449,15 +400,13 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) static_cast<const SwFmtAnchor&>( m_pOldSet->Get( RES_ANCHOR, false ) ); SwFmtAnchor aNewAnchor( rAnchor.GetAnchorId() ); - if (FLY_AT_PAGE != rAnchor.GetAnchorId()) - { + if (FLY_AT_PAGE != rAnchor.GetAnchorId()) { SwNode* pNd = pDoc->GetNodes()[ m_nNodeIndex ]; if ( (FLY_AT_FLY == rAnchor.GetAnchorId()) - ? ( !pNd->IsStartNode() || (SwFlyStartNode != - static_cast<SwStartNode*>(pNd)->GetStartNodeType()) ) - : !pNd->IsTxtNode() ) - { + ? ( !pNd->IsStartNode() || (SwFlyStartNode != + static_cast<SwStartNode*>(pNd)->GetStartNodeType()) ) + : !pNd->IsTxtNode() ) { // #i35443# - invalid position. // Thus, anchor attribute not restored return false; @@ -465,38 +414,31 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) SwPosition aPos( *pNd ); if ((FLY_AS_CHAR == rAnchor.GetAnchorId()) || - (FLY_AT_CHAR == rAnchor.GetAnchorId())) - { + (FLY_AT_CHAR == rAnchor.GetAnchorId())) { aPos.nContent.Assign( static_cast<SwTxtNode*>(pNd), rAnchor.GetPageNum() ); - if ( aPos.nContent.GetIndex() > pNd->GetTxtNode()->GetTxt().getLength()) - { + if ( aPos.nContent.GetIndex() > pNd->GetTxtNode()->GetTxt().getLength()) { // #i35443# - invalid position. // Thus, anchor attribute not restored return false; } } aNewAnchor.SetAnchor( &aPos ); - } - else + } else aNewAnchor.SetPageNum( rAnchor.GetPageNum() ); Point aDrawSavePt, aDrawOldPt; - if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() ) - { - if( RES_DRAWFRMFMT == pFrmFmt->Which() ) - { + if( pDoc->getIDocumentLayoutAccess().GetCurrentViewShell() ) { + if( RES_DRAWFRMFMT == pFrmFmt->Which() ) { // get the old cached value const SwFmtFrmSize& rOldSize = static_cast<const SwFmtFrmSize&>( - m_pOldSet->Get( RES_FRM_SIZE ) ); + m_pOldSet->Get( RES_FRM_SIZE ) ); aDrawSavePt.X() = rOldSize.GetWidth(); aDrawSavePt.Y() = rOldSize.GetHeight(); m_pOldSet->ClearItem( RES_FRM_SIZE ); // write the current value into cache aDrawOldPt = pFrmFmt->FindSdrObject()->GetRelativePos(); - } - else - { + } else { pFrmFmt->DelFrms(); // delete Frms } } @@ -504,8 +446,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) const SwFmtAnchor &rOldAnch = pFrmFmt->GetAnchor(); // #i54336# // Consider case, that as-character anchored object has moved its anchor position. - if (FLY_AS_CHAR == rOldAnch.GetAnchorId()) - { + if (FLY_AS_CHAR == rOldAnch.GetAnchorId()) { // With InCntnts it's tricky: the text attribute needs to be deleted. // Unfortunately, this not only destroys the Frms but also the format. // To prevent that, first detach the connection between attribute and @@ -530,20 +471,16 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) m_pOldSet->Put( aNewAnchor ); SwUndoFmtAttrHelper aTmp( *m_pFmt, m_bSaveDrawPt ); m_pFmt->SetFmtAttr( *m_pOldSet ); - if ( aTmp.GetUndo() ) - { + if ( aTmp.GetUndo() ) { m_nNodeIndex = aTmp.GetUndo()->m_nNodeIndex; // transfer ownership of helper object's old set m_pOldSet = std::move(aTmp.GetUndo()->m_pOldSet); - } - else - { + } else { m_pOldSet->ClearItem(); } } - if ( RES_DRAWFRMFMT == pFrmFmt->Which() ) - { + if ( RES_DRAWFRMFMT == pFrmFmt->Which() ) { SwDrawContact *pCont = static_cast<SwDrawContact*>(pFrmFmt->FindContactObj()); // The Draw model also prepared an Undo object for its right positioning @@ -551,10 +488,9 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) // change of the Contact object by setting the anchor. SdrObject* pObj = pCont->GetMaster(); - if( pCont->GetAnchorFrm() && !pObj->IsInserted() ) - { + if( pCont->GetAnchorFrm() && !pObj->IsInserted() ) { OSL_ENSURE( pDoc->getIDocumentDrawModelAccess().GetDrawModel(), - "RestoreFlyAnchor without DrawModel" ); + "RestoreFlyAnchor without DrawModel" ); pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 )->InsertObject( pObj ); } pObj->SetRelativePos( aDrawSavePt ); @@ -564,8 +500,7 @@ bool SwUndoFmtAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) SwFmtFrmSize( ATT_VAR_SIZE, aDrawOldPt.X(), aDrawOldPt.Y() ) ); } - if (FLY_AS_CHAR == aNewAnchor.GetAnchorId()) - { + if (FLY_AS_CHAR == aNewAnchor.GetAnchorId()) { const SwPosition* pPos = aNewAnchor.GetCntntAnchor(); SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode(); OSL_ENSURE( pTxtNd, "no Text Node at position." ); @@ -589,8 +524,7 @@ SwUndoFmtResetAttr::SwUndoFmtResetAttr( SwFmt& rChangedFormat, , m_nWhichId( nWhichId ) { const SfxPoolItem* pItem = 0; - if (rChangedFormat.GetItemState(nWhichId, false, &pItem ) == SfxItemState::SET && pItem) - { + if (rChangedFormat.GetItemState(nWhichId, false, &pItem ) == SfxItemState::SET && pItem) { m_pOldItem.reset( pItem->Clone() ); } } @@ -601,16 +535,14 @@ SwUndoFmtResetAttr::~SwUndoFmtResetAttr() void SwUndoFmtResetAttr::UndoImpl(::sw::UndoRedoContext &) { - if ( m_pOldItem.get() ) - { + if ( m_pOldItem.get() ) { m_pChangedFormat->SetFmtAttr( *m_pOldItem ); } } void SwUndoFmtResetAttr::RedoImpl(::sw::UndoRedoContext &) { - if ( m_pOldItem.get() ) - { + if ( m_pOldItem.get() ) { m_pChangedFormat->ResetFmtAttr( m_nWhichId ); } } @@ -643,11 +575,9 @@ void SwUndoResetAttr::UndoImpl(::sw::UndoRedoContext & rContext) m_pHistory->SetTmpEnd( m_pHistory->Count() ); if ((RES_CONDTXTFMTCOLL == m_nFormatId) && - (nSttNode == nEndNode) && (nSttCntnt == nEndCntnt)) - { + (nSttNode == nEndNode) && (nSttCntnt == nEndCntnt)) { SwTxtNode* pTNd = rDoc.GetNodes()[ nSttNode ]->GetTxtNode(); - if( pTNd ) - { + if( pTNd ) { SwIndex aIdx( pTNd, nSttCntnt ); pTNd->DontExpandFmt( aIdx, false ); } @@ -661,8 +591,7 @@ void SwUndoResetAttr::RedoImpl(::sw::UndoRedoContext & rContext) SwDoc & rDoc = rContext.GetDoc(); SwPaM & rPam = AddUndoRedoPaM(rContext); - switch ( m_nFormatId ) - { + switch ( m_nFormatId ) { case RES_CHRFMT: rDoc.RstTxtAttrs(rPam); break; @@ -675,54 +604,45 @@ void SwUndoResetAttr::RedoImpl(::sw::UndoRedoContext & rContext) break; case RES_TXTATR_TOXMARK: // special treatment for TOXMarks - { - SwTOXMarks aArr; - SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode ); - SwPosition aPos( aIdx, SwIndex( aIdx.GetNode().GetCntntNode(), - nSttCntnt )); - - sal_uInt16 nCnt = rDoc.GetCurTOXMark( aPos, aArr ); - if( nCnt ) - { - if( 1 < nCnt ) - { - // search for the right one - SwHistoryHint* pHHint = (GetHistory())[ 0 ]; - if( pHHint && HSTRY_SETTOXMARKHNT == pHHint->Which() ) - { - while( nCnt ) - { - if ( static_cast<SwHistorySetTOXMark*>(pHHint) - ->IsEqual( *aArr[ --nCnt ] ) ) - { - ++nCnt; - break; - } + { + SwTOXMarks aArr; + SwNodeIndex aIdx( rDoc.GetNodes(), nSttNode ); + SwPosition aPos( aIdx, SwIndex( aIdx.GetNode().GetCntntNode(), + nSttCntnt )); + + sal_uInt16 nCnt = SwDoc::GetCurTOXMark( aPos, aArr ); + if( nCnt ) { + if( 1 < nCnt ) { + // search for the right one + SwHistoryHint* pHHint = (GetHistory())[ 0 ]; + if( pHHint && HSTRY_SETTOXMARKHNT == pHHint->Which() ) { + while( nCnt ) { + if ( static_cast<SwHistorySetTOXMark*>(pHHint) + ->IsEqual( *aArr[ --nCnt ] ) ) { + ++nCnt; + break; } } - else - nCnt = 0; - } - // found one, thus delete it - if( nCnt-- ) - { - rDoc.DeleteTOXMark( aArr[ nCnt ] ); - } + } else + nCnt = 0; + } + // found one, thus delete it + if( nCnt-- ) { + rDoc.DeleteTOXMark( aArr[ nCnt ] ); } } - break; + } + break; } } void SwUndoResetAttr::RepeatImpl(::sw::RepeatContext & rContext) { - if (m_nFormatId < RES_FMT_BEGIN) - { + if (m_nFormatId < RES_FMT_BEGIN) { return; } - switch ( m_nFormatId ) - { + switch ( m_nFormatId ) { case RES_CHRFMT: rContext.GetDoc().RstTxtAttrs(rContext.GetRepeatPaM()); break; @@ -769,23 +689,20 @@ SwUndoAttr::~SwUndoAttr() void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, bool bIsCntnt ) { SwDoc* pDoc = rPam.GetDoc(); - if ( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) - { + if ( pDoc->getIDocumentRedlineAccess().IsRedlineOn() ) { m_pRedlineData.reset( new SwRedlineData( bIsCntnt - ? nsRedlineType_t::REDLINE_INSERT - : nsRedlineType_t::REDLINE_FORMAT, - pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) ); + ? nsRedlineType_t::REDLINE_INSERT + : nsRedlineType_t::REDLINE_FORMAT, + pDoc->getIDocumentRedlineAccess().GetRedlineAuthor() ) ); } m_pRedlineSaveData.reset( new SwRedlineSaveDatas ); - if ( !FillSaveDataForFmt( rPam, *m_pRedlineSaveData )) - { + if ( !FillSaveDataForFmt( rPam, *m_pRedlineSaveData )) { m_pRedlineSaveData.reset(0); } SetRedlineMode( pDoc->getIDocumentRedlineAccess().GetRedlineMode() ); - if ( bIsCntnt ) - { + if ( bIsCntnt ) { m_nNodeIndex = rPam.GetPoint()->nNode.GetIndex(); } } @@ -796,33 +713,28 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext) RemoveIdx( *pDoc ); - if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ) - { + if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ) { SwPaM aPam(pDoc->GetNodes().GetEndOfContent()); - if ( ULONG_MAX != m_nNodeIndex ) - { + if ( ULONG_MAX != m_nNodeIndex ) { aPam.DeleteMark(); aPam.GetPoint()->nNode = m_nNodeIndex; aPam.GetPoint()->nContent.Assign( aPam.GetCntntNode(), nSttCntnt ); aPam.SetMark(); ++aPam.GetPoint()->nContent; pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, USHRT_MAX); - } - else - { + } else { // remove all format redlines, will be recreated if needed SetPaM(aPam); pDoc->getIDocumentRedlineAccess().DeleteRedline(aPam, false, nsRedlineType_t::REDLINE_FORMAT); - if ( m_pRedlineSaveData.get() ) - { + if ( m_pRedlineSaveData.get() ) { SetSaveData( *pDoc, *m_pRedlineSaveData ); } } } const bool bToLast = (1 == m_AttrSet.Count()) - && (RES_TXTATR_FIELD <= *m_AttrSet.GetRanges()) - && (*m_AttrSet.GetRanges() <= RES_TXTATR_ANNOTATION); + && (RES_TXTATR_FIELD <= *m_AttrSet.GetRanges()) + && (*m_AttrSet.GetRanges() <= RES_TXTATR_ANNOTATION); // restore old values m_pHistory->TmpRollback( pDoc, 0, !bToLast ); @@ -835,17 +747,14 @@ void SwUndoAttr::UndoImpl(::sw::UndoRedoContext & rContext) void SwUndoAttr::RepeatImpl(::sw::RepeatContext & rContext) { // RefMarks are not repeat capable - if ( SfxItemState::SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, false ) ) - { + if ( SfxItemState::SET != m_AttrSet.GetItemState( RES_TXTATR_REFMARK, false ) ) { rContext.GetDoc().getIDocumentContentOperations().InsertItemSet( rContext.GetRepeatPaM(), - m_AttrSet, m_nInsertFlags ); - } - else if ( 1 < m_AttrSet.Count() ) - { + m_AttrSet, m_nInsertFlags ); + } else if ( 1 < m_AttrSet.Count() ) { SfxItemSet aTmpSet( m_AttrSet ); aTmpSet.ClearItem( RES_TXTATR_REFMARK ); rContext.GetDoc().getIDocumentContentOperations().InsertItemSet( rContext.GetRepeatPaM(), - aTmpSet, m_nInsertFlags ); + aTmpSet, m_nInsertFlags ); } } @@ -855,32 +764,25 @@ void SwUndoAttr::RedoImpl(::sw::UndoRedoContext & rContext) SwPaM & rPam = AddUndoRedoPaM(rContext); if ( m_pRedlineData.get() && - IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ) - { + IDocumentRedlineAccess::IsRedlineOn( GetRedlineMode() ) ) { RedlineMode_t eOld = rDoc.getIDocumentRedlineAccess().GetRedlineMode(); rDoc.getIDocumentRedlineAccess().SetRedlineMode_intern(static_cast<RedlineMode_t>( eOld & ~nsRedlineMode_t::REDLINE_IGNORE)); rDoc.getIDocumentContentOperations().InsertItemSet( rPam, m_AttrSet, m_nInsertFlags ); - if ( ULONG_MAX != m_nNodeIndex ) - { + if ( ULONG_MAX != m_nNodeIndex ) { rPam.SetMark(); - if ( rPam.Move( fnMoveBackward ) ) - { + if ( rPam.Move( fnMoveBackward ) ) { rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *m_pRedlineData, rPam ), true); } rPam.DeleteMark(); - } - else - { + } else { rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( *m_pRedlineData, rPam ), true); } rDoc.getIDocumentRedlineAccess().SetRedlineMode_intern( eOld ); - } - else - { + } else { rDoc.getIDocumentContentOperations().InsertItemSet( rPam, m_AttrSet, m_nInsertFlags ); } } @@ -891,58 +793,47 @@ void SwUndoAttr::RemoveIdx( SwDoc& rDoc ) return ; SwNodes& rNds = rDoc.GetNodes(); - for ( sal_uInt16 n = 0; n < m_pHistory->Count(); ++n ) - { + for ( sal_uInt16 n = 0; n < m_pHistory->Count(); ++n ) { sal_Int32 nCntnt = 0; sal_uLong nNode = 0; SwHistoryHint* pHstHnt = (*m_pHistory)[ n ]; - switch ( pHstHnt->Which() ) - { - case HSTRY_RESETTXTHNT: - { - SwHistoryResetTxt * pHistoryHint - = static_cast<SwHistoryResetTxt*>(pHstHnt); - if ( RES_TXTATR_FTN == pHistoryHint->GetWhich() ) - { - nNode = pHistoryHint->GetNode(); - nCntnt = pHistoryHint->GetCntnt(); - } - } - break; + switch ( pHstHnt->Which() ) { + case HSTRY_RESETTXTHNT: { + SwHistoryResetTxt * pHistoryHint + = static_cast<SwHistoryResetTxt*>(pHstHnt); + if ( RES_TXTATR_FTN == pHistoryHint->GetWhich() ) { + nNode = pHistoryHint->GetNode(); + nCntnt = pHistoryHint->GetCntnt(); + } + } + break; - case HSTRY_RESETATTRSET: - { - SwHistoryResetAttrSet * pHistoryHint - = static_cast<SwHistoryResetAttrSet*>(pHstHnt); - nCntnt = pHistoryHint->GetCntnt(); - if ( COMPLETE_STRING != nCntnt ) - { - const std::vector<sal_uInt16>& rArr = pHistoryHint->GetArr(); - for ( size_t i = rArr.size(); i; ) - { - if ( RES_TXTATR_FTN == rArr[ --i ] ) - { - nNode = pHistoryHint->GetNode(); - break; - } - } + case HSTRY_RESETATTRSET: { + SwHistoryResetAttrSet * pHistoryHint + = static_cast<SwHistoryResetAttrSet*>(pHstHnt); + nCntnt = pHistoryHint->GetCntnt(); + if ( COMPLETE_STRING != nCntnt ) { + const std::vector<sal_uInt16>& rArr = pHistoryHint->GetArr(); + for ( size_t i = rArr.size(); i; ) { + if ( RES_TXTATR_FTN == rArr[ --i ] ) { + nNode = pHistoryHint->GetNode(); + break; } } - break; + } + } + break; - default: - break; + default: + break; } - if( nNode ) - { + if( nNode ) { SwTxtNode* pTxtNd = rNds[ nNode ]->GetTxtNode(); - if( pTxtNd ) - { + if( pTxtNd ) { SwTxtAttr *const pTxtHt = pTxtNd->GetTxtAttrForCharAt(nCntnt, RES_TXTATR_FTN); - if( pTxtHt ) - { + if( pTxtHt ) { // ok, so get values SwTxtFtn* pFtn = static_cast<SwTxtFtn*>(pTxtHt); RemoveIdxFromSection( rDoc, pFtn->GetStartNode()->GetIndex() ); @@ -957,17 +848,13 @@ SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet ) : SwUndo( UNDO_SETDEFTATTR ) { const SfxPoolItem* pItem; - if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) ) - { + if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) ) { // store separately, because it may change! m_pTabStop.reset( static_cast<SvxTabStopItem*>(pItem->Clone()) ); - if ( 1 != rSet.Count() ) // are there more attributes? - { + if ( 1 != rSet.Count() ) { // are there more attributes? m_pOldSet.reset( new SfxItemSet( rSet ) ); } - } - else - { + } else { m_pOldSet.reset( new SfxItemSet( rSet ) ); } } @@ -979,22 +866,19 @@ SwUndoDefaultAttr::~SwUndoDefaultAttr() void SwUndoDefaultAttr::UndoImpl(::sw::UndoRedoContext & rContext) { SwDoc & rDoc = rContext.GetDoc(); - if ( m_pOldSet.get() ) - { + if ( m_pOldSet.get() ) { SwUndoFmtAttrHelper aTmp( - *const_cast<SwTxtFmtColl*>(rDoc.GetDfltTxtFmtColl()) ); + *const_cast<SwTxtFmtColl*>(rDoc.GetDfltTxtFmtColl()) ); rDoc.SetDefault( *m_pOldSet ); m_pOldSet.reset( 0 ); - if ( aTmp.GetUndo() ) - { + if ( aTmp.GetUndo() ) { // transfer ownership of helper object's old set m_pOldSet = std::move(aTmp.GetUndo()->m_pOldSet); } } - if ( m_pTabStop.get() ) - { + if ( m_pTabStop.get() ) { SvxTabStopItem* pOld = static_cast<SvxTabStopItem*>( - rDoc.GetDefault( RES_PARATR_TABSTOP ).Clone() ); + rDoc.GetDefault( RES_PARATR_TABSTOP ).Clone() ); rDoc.SetDefault( *m_pTabStop ); m_pTabStop.reset( pOld ); } @@ -1006,7 +890,7 @@ void SwUndoDefaultAttr::RedoImpl(::sw::UndoRedoContext & rContext) } SwUndoMoveLeftMargin::SwUndoMoveLeftMargin( - const SwPaM& rPam, bool bFlag, bool bMod ) + const SwPaM& rPam, bool bFlag, bool bMod ) : SwUndo( bFlag ? UNDO_INC_LEFTMARGIN : UNDO_DEC_LEFTMARGIN ) , SwUndRng( rPam ) , m_pHistory( new SwHistory ) @@ -1035,19 +919,19 @@ void SwUndoMoveLeftMargin::RedoImpl(::sw::UndoRedoContext & rContext) SwPaM & rPam = AddUndoRedoPaM(rContext); rDoc.MoveLeftMargin( rPam, - GetId() == UNDO_INC_LEFTMARGIN, m_bModulus ); + GetId() == UNDO_INC_LEFTMARGIN, m_bModulus ); } void SwUndoMoveLeftMargin::RepeatImpl(::sw::RepeatContext & rContext) { SwDoc & rDoc = rContext.GetDoc(); rDoc.MoveLeftMargin(rContext.GetRepeatPaM(), GetId() == UNDO_INC_LEFTMARGIN, - m_bModulus ); + m_bModulus ); } SwUndoChangeFootNote::SwUndoChangeFootNote( - const SwPaM& rRange, const OUString& rTxt, - sal_uInt16 nNum, bool bIsEndNote ) + const SwPaM& rRange, const OUString& rTxt, + sal_uInt16 nNum, bool bIsEndNote ) : SwUndo( UNDO_CHGFTN ), SwUndRng( rRange ) , m_pHistory( new SwHistory() ) , m_Text( rTxt ) diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 92fd62153f9b..36d70c64f1d9 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -114,7 +114,7 @@ void SwUndo::RemoveIdxFromSection( SwDoc& rDoc, sal_uLong nSttIdx, SwNodeIndex aEndIdx( rDoc.GetNodes(), pEndIdx ? *pEndIdx : aIdx.GetNode().EndOfSectionIndex() ); SwPosition aPos( rDoc.GetNodes().GetEndOfPostIts() ); - rDoc.CorrAbs( aIdx, aEndIdx, aPos, true ); + SwDoc::CorrAbs( aIdx, aEndIdx, aPos, true ); } void SwUndo::RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext ) @@ -138,10 +138,10 @@ void SwUndo::RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext ) } } - rPam.GetDoc()->CorrAbs( aStt, aEnd, *rPam.GetPoint(), true ); + SwDoc::CorrAbs( aStt, aEnd, *rPam.GetPoint(), true ); } else - rPam.GetDoc()->CorrAbs( rPam, *pEnd, true ); + SwDoc::CorrAbs( rPam, *pEnd, true ); } void SwUndo::RemoveIdxRel( sal_uLong nIdx, const SwPosition& rPos ) @@ -801,14 +801,13 @@ SwUndoSaveSection::~SwUndoSaveSection() delete pRedlSaveData; } -void SwUndoSaveSection::SaveSection( SwDoc* pDoc, const SwNodeIndex& rSttIdx ) +void SwUndoSaveSection::SaveSection( const SwNodeIndex& rSttIdx ) { SwNodeRange aRg( rSttIdx.GetNode(), *rSttIdx.GetNode().EndOfSectionNode() ); - SaveSection( pDoc, aRg ); + SaveSection( aRg ); } void SwUndoSaveSection::SaveSection( - SwDoc* pDoc, const SwNodeRange& rRange ) { SwPaM aPam( rRange.aStart, rRange.aEnd ); @@ -820,7 +819,7 @@ void SwUndoSaveSection::SaveSection( SwNodeIndex aSttIdx( aPam.Start()->nNode.GetNode() ); SwNodeIndex aEndIdx( aPam.End()->nNode.GetNode() ); SwNodeIndex aMvStt( aEndIdx, 1 ); - pDoc->CorrAbs( aSttIdx, aEndIdx, SwPosition( aMvStt ), true ); + SwDoc::CorrAbs( aSttIdx, aEndIdx, SwPosition( aMvStt ), true ); } pRedlSaveData = new SwRedlineSaveDatas; @@ -854,7 +853,7 @@ void SwUndoSaveSection::RestoreSection( SwDoc* pDoc, SwNodeIndex* pIdx, SwNodeIndex aSttIdx( pDoc->GetNodes(), nStartPos ); // move the content from UndoNodes array into Fly - SwStartNode* pSttNd = pDoc->GetNodes().MakeEmptySection( aSttIdx, + SwStartNode* pSttNd = SwNodes::MakeEmptySection( aSttIdx, (SwStartNodeType)nSectType ); RestoreSection( pDoc, SwNodeIndex( *pSttNd->EndOfSectionNode() )); @@ -920,7 +919,7 @@ SwRedlineSaveData::SwRedlineSaveData( if ( rRedl.GetContentIdx() ) { // than move section into UndoArray and memorize it - SaveSection( rRedl.GetDoc(), *rRedl.GetContentIdx() ); + SaveSection( *rRedl.GetContentIdx() ); rRedl.SetContentIdx( 0 ); } break; @@ -1132,7 +1131,7 @@ bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, else { SwNodeIndex idx( nodes.GetEndOfContent()); - if( SwCntntNode* last = nodes.GoPrevious( &idx )) + if( SwCntntNode* last = SwNodes::GoPrevious( &idx )) inSelection = rEnd == SwPosition( *last, last->Len()); } } diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index 9977593e02a7..8f22cc711af2 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -167,7 +167,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt(); OSL_ENSURE( rCntnt.GetCntntIdx(), "Fly ohne Inhalt" ); - SaveSection( pDoc, *rCntnt.GetCntntIdx() ); + SaveSection( *rCntnt.GetCntntIdx() ); const_cast<SwFmtCntnt&>(rCntnt).SetNewCntntIdx( (const SwNodeIndex*)0 ); } // OD 02.07.2003 #108784# - remove 'master' drawing object from drawing page @@ -276,7 +276,7 @@ void SwUndoInsLayFmt::UndoImpl(::sw::UndoRedoContext & rContext) aIdx.GetNode().EndOfSectionIndex() ); SwIndex aIndex( pNode, mnCrsrSaveIndexPos ); SwPosition aPos( *pNode, aIndex ); - rDoc.CorrAbs( aIdx, aEndIdx, aPos, true ); + SwDoc::CorrAbs( aIdx, aEndIdx, aPos, true ); bRemoveIdx = false; } } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index fe957e5ba0fc..160b169107b8 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -642,7 +642,7 @@ void SwUndoTblToTxt::RedoImpl(::sw::UndoRedoContext & rContext) ++aSaveIdx; SwCntntNode* pCNd = aSaveIdx.GetNode().GetCntntNode(); if( !pCNd && 0 == ( pCNd = rDoc.GetNodes().GoNext( &aSaveIdx ) ) && - 0 == ( pCNd = rDoc.GetNodes().GoPrevious( &aSaveIdx )) ) + 0 == ( pCNd = SwNodes::GoPrevious( &aSaveIdx )) ) { OSL_FAIL( "Where is the TextNode now?" ); } @@ -1663,7 +1663,7 @@ void SwUndoTblNdsChg::SaveSection( SwStartNode* pSttNd ) SwTableNode* pTblNd = pSttNd->FindTableNode(); SwUndoSaveSection* pSave = new SwUndoSaveSection; - pSave->SaveSection( pSttNd->GetDoc(), SwNodeIndex( *pSttNd )); + pSave->SaveSection( SwNodeIndex( *pSttNd )); pDelSects->push_back( pSave ); nSttNode = pTblNd->GetIndex(); @@ -2050,7 +2050,7 @@ CHECKTABLE(pTblNd->GetTable()) // delete indices from section { SwNodeIndex aTmpIdx( *pBox->GetSttNd() ); - rDoc.CorrAbs( SwNodeIndex( aTmpIdx, 1 ), + SwDoc::CorrAbs( SwNodeIndex( aTmpIdx, 1 ), SwNodeIndex( *aTmpIdx.GetNode().EndOfSectionNode() ), SwPosition( aTmpIdx, SwIndex( 0, 0 )), true ); } @@ -2923,7 +2923,7 @@ void SwUndoSplitTbl::UndoImpl(::sw::UndoRedoContext & rContext) { SwSelBoxes aSelBoxes; SwTableBox* pBox = rTbl.GetTblBox( nTblNode + nOffset + 1 ); - rTbl.SelLineFromBox( pBox, aSelBoxes, true ); + SwTable::SelLineFromBox( pBox, aSelBoxes, true ); _FndBox aTmpBox( 0, 0 ); aTmpBox.SetTableLines( aSelBoxes, rTbl ); aTmpBox.DelFrms( rTbl ); diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx index 3d755db9a874..36764284c518 100644 --- a/sw/source/core/unocore/unocrsr.cxx +++ b/sw/source/core/unocore/unocrsr.cxx @@ -157,7 +157,7 @@ bool SwUnoCrsr::IsSelOvr( int eFlags ) rPtIdx.Assign( *pInvalidNode, -1 ); if( !rPtIdx.GetNode().IsCntntNode() && - ( !pDoc->GetNodes().GoPrevSection( &rPtIdx ) || + ( !SwNodes::GoPrevSection( &rPtIdx ) || rPtIdx < *pOldSttNd ) ) break; } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index b33e0f141ba3..5cb72e3549cd 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -459,7 +459,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry getNumberingProperty(rPam, eNewState, pAny); else { - if( !rPam.GetDoc()->GetNumRuleAtPos( *rPam.GetPoint() ) ) + if( !SwDoc::GetNumRuleAtPos( *rPam.GetPoint() ) ) eNewState = PropertyState_DEFAULT_VALUE; } break; @@ -490,7 +490,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry break; case FN_UNO_DOCUMENT_INDEX: { - SwTOXBase* pBase = rPam.GetDoc()->GetCurTOX( + SwTOXBase* pBase = SwDoc::GetCurTOX( *rPam.Start() ); if( pBase ) { @@ -578,7 +578,7 @@ bool getCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry break; case FN_UNO_TEXT_SECTION: { - SwSection* pSect = rPam.GetDoc()->GetCurrSection(*rPam.GetPoint()); + SwSection* pSect = SwDoc::GetCurrSection(*rPam.GetPoint()); if(pSect) { if( pAny ) @@ -880,7 +880,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny ) { - const SwNumRule* pNumRule = rPam.GetDoc()->GetNumRuleAtPos( *rPam.GetPoint() ); + const SwNumRule* pNumRule = SwDoc::GetNumRuleAtPos( *rPam.GetPoint() ); if(pNumRule) { uno::Reference< XIndexReplace > xNum = new SwXNumberingRules(*pNumRule); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 31d7266b119e..28e9d968b95e 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -806,7 +806,7 @@ uno::Reference< drawing::XShapeGroup > SwXDrawPage::group(const uno::Reference< pPage->GetDrawView()->UnmarkAll(); if(pContact) { - uno::Reference< uno::XInterface > xInt = pPage->GetInterface( pContact->GetMaster() ); + uno::Reference< uno::XInterface > xInt = SwFmDrawPage::GetInterface( pContact->GetMaster() ); xRet = uno::Reference< drawing::XShapeGroup >(xInt, uno::UNO_QUERY); } pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL ); diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index a77085a0e8f9..f4056a03af99 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -2536,7 +2536,7 @@ void SAL_CALL SwXTextField::update() throw (uno::RuntimeException, std::exceptio case RES_EXTUSERFLD: { SwExtUserField* pExtUserFld = static_cast<SwExtUserField*>(pFld); - pExtUserFld->SetExpansion( static_cast<SwExtUserFieldType*>(pFld->GetTyp())->Expand( + pExtUserFld->SetExpansion( SwExtUserFieldType::Expand( pExtUserFld->GetSubType(), pExtUserFld->GetFormat() ) ); } @@ -2545,7 +2545,7 @@ void SAL_CALL SwXTextField::update() throw (uno::RuntimeException, std::exceptio case RES_AUTHORFLD: { SwAuthorField* pAuthorFld = static_cast<SwAuthorField*>(pFld); - pAuthorFld->SetExpansion( static_cast<SwAuthorFieldType*>(pFld->GetTyp())->Expand( + pAuthorFld->SetExpansion( SwAuthorFieldType::Expand( pAuthorFld->GetFormat() ) ); } break; diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index cbb6b94659ff..db5f34caf150 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1544,7 +1544,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: pSet = new SfxItemSet( pDoc->GetAttrPool(), aFrmFmtSetRange ); pSet->Put( *pItem ); if ( pFmt->GetDoc()->GetEditShell() != NULL - && !sw_ChkAndSetNewAnchor( *(pFmt->GetDoc()->GetEditShell()), *pFly, *pSet ) ) + && !sw_ChkAndSetNewAnchor( *pFly, *pSet ) ) delete pSet, pSet = 0; } } @@ -1562,7 +1562,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: OUString sGrfName; OUString sFltName; GraphicObject *pGrfObj = 0; - pFmt->GetDoc()->GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), &sGrfName, &sFltName ); + SwDoc::GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), &sGrfName, &sFltName ); OUString sTmp; aValue >>= sTmp; UnoActionContext aAction(pFmt->GetDoc()); @@ -1930,7 +1930,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: aSet.Put( *pItem ); if ( pFmt->GetDoc()->GetEditShell() != NULL ) { - sw_ChkAndSetNewAnchor( *(pFmt->GetDoc()->GetEditShell()), *pFly, aSet ); + sw_ChkAndSetNewAnchor( *pFly, aSet ); } } } @@ -2061,7 +2061,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) throw uno::RuntimeException(); if( pGrfNode->IsGrfLink() ) { - pFmt->GetDoc()->GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), &sGrfName, 0 ); + SwDoc::GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), &sGrfName, 0 ); } else { @@ -2099,7 +2099,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) else if( FN_UNO_GRAPHIC_FILTER == pEntry->nWID ) { OUString sFltName; - pFmt->GetDoc()->GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), 0, &sFltName ); + SwDoc::GetGrfNms( *static_cast<SwFlyFrmFmt*>(pFmt), 0, &sFltName ); aAny <<= sFltName; } else if( FN_UNO_GRAPHIC == pEntry->nWID ) diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx index bd498a3606c2..d5c96944789e 100644 --- a/sw/source/core/unocore/unoidx.cxx +++ b/sw/source/core/unocore/unoidx.cxx @@ -853,7 +853,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (WID_PRIMARY_KEY > pEntry->nWID) { const SwAttrSet& rSet = - m_pImpl->m_pDoc->GetTOXBaseAttrSet(rTOXBase); + SwDoc::GetTOXBaseAttrSet(rTOXBase); SfxItemSet aAttrSet(rSet); m_pImpl->m_rPropSet.setPropertyValue( rPropertyName, rValue, aAttrSet); @@ -1207,7 +1207,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException, if(WID_PRIMARY_KEY > pEntry->nWID) { const SwAttrSet& rSet = - m_pImpl->m_pDoc->GetTOXBaseAttrSet(*pTOXBase); + SwDoc::GetTOXBaseAttrSet(*pTOXBase); aRet = m_pImpl->m_rPropSet.getPropertyValue( rPropertyName, rSet); } @@ -1355,7 +1355,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) // this now needs to return TRUE ::sw::XTextRangeToSwPaM(aPam, xTextRange); - const SwTOXBase* pOld = pDoc->GetCurTOX( *aPam.Start() ); + const SwTOXBase* pOld = SwDoc::GetCurTOX( *aPam.Start() ); if (pOld) { throw lang::IllegalArgumentException(); diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 9e292197fd35..7d899fd81d7d 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -701,7 +701,7 @@ typedef boost::shared_ptr < SwXRedlinePortion_Impl > struct RedlineCompareStruct { - const SwPosition& getPosition ( const SwXRedlinePortion_ImplSharedPtr &r ) + static const SwPosition& getPosition ( const SwXRedlinePortion_ImplSharedPtr &r ) { return *(r->m_bStart ? r->m_pRedline->Start() : r->m_pRedline->End()); } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 2a4de5c79413..6942fa1f3a31 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -312,7 +312,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) // caller wants an index header section, but will only // give him one if a) we are inside an index, and b) said // index doesn't yet have a header section. - const SwTOXBase* pBase = aPam.GetDoc()->GetCurTOX(*aPam.Start()); + const SwTOXBase* pBase = SwDoc::GetCurTOX(*aPam.Start()); // are we inside an index? if (pBase) diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index e9f8a89996c9..49119026c467 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1039,7 +1039,7 @@ public: bool GetProperty(const OUString& rName, uno::Any*& rpAny); bool ClearProperty( const OUString& rPropertyName ); void ClearAllProperties( ); - void GetProperty(const OUString &rPropertyName, const uno::Reference < beans::XPropertySet > &rxPropertySet, uno::Any& rAny ); + static void GetProperty(const OUString &rPropertyName, const uno::Reference < beans::XPropertySet > &rxPropertySet, uno::Any& rAny ); const PropertyEntryVector_t& GetPropertyVector() const {return aPropertyEntries; } @@ -2680,7 +2680,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXStyle::GetPropertyValues_Impl( break; case SFX_STYLE_FAMILY_PARA: case SFX_STYLE_FAMILY_PAGE: - pPropImpl->GetProperty ( pNames[nProp], mxStyleData, pRet[ nProp ] ); + SwStyleProperties_Impl::GetProperty ( pNames[nProp], mxStyleData, pRet[ nProp ] ); break; case SFX_STYLE_FAMILY_CHAR: case SFX_STYLE_FAMILY_FRAME : @@ -3917,7 +3917,7 @@ uno::Sequence< uno::Any > SAL_CALL SwXPageStyle::GetPropertyValues_Impl( if ( !pAny ) { - GetPropImpl()->GetProperty(rPropName, mxStyleData, pRet[nProp]); + SwStyleProperties_Impl::GetProperty(rPropName, mxStyleData, pRet[nProp]); } else { diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 1a50542c6042..93c9072f9eac 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1645,7 +1645,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush(RES_BACKGROUND); - pDoc->GetBoxAttr(*pUnoCrsr, aBrush); + SwDoc::GetBoxAttr(*pUnoCrsr, aBrush); aBrush.PutValue(aValue, pEntry->nMemberId); pDoc->SetBoxAttr(*pUnoCrsr, aBrush); @@ -1704,7 +1704,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName) case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush(RES_BACKGROUND); - if (rTblCrsr.GetDoc()->GetBoxAttr(*pUnoCrsr, aBrush)) + if (SwDoc::GetBoxAttr(*pUnoCrsr, aBrush)) aBrush.QueryValue(aResult, pEntry->nMemberId); } break; @@ -1759,7 +1759,7 @@ public: Impl() : m_Listeners(m_Mutex) { } // note: lock mutex before calling this to avoid concurrent update - std::pair<sal_uInt16, sal_uInt16> ThrowIfComplex(SwXTextTable &rThis) + static std::pair<sal_uInt16, sal_uInt16> ThrowIfComplex(SwXTextTable &rThis) { sal_uInt16 const nRowCount(rThis.getRowCount()); sal_uInt16 const nColCount(rThis.getColumnCount()); @@ -2274,7 +2274,7 @@ uno::Sequence< uno::Sequence< uno::Any > > SAL_CALL SwXTextTable::getDataArray() throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<sheet::XCellRangeData> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2285,7 +2285,7 @@ void SAL_CALL SwXTextTable::setDataArray(const uno::Sequence< uno::Sequence< uno throw (uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<sheet::XCellRangeData> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2296,7 +2296,7 @@ uno::Sequence< uno::Sequence< double > > SwXTextTable::getData() throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<chart::XChartDataArray> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2308,7 +2308,7 @@ void SwXTextTable::setData(const uno::Sequence< uno::Sequence< double > >& rData throw( uno::RuntimeException, std::exception ) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<chart::XChartDataArray> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2322,7 +2322,7 @@ uno::Sequence<OUString> SwXTextTable::getRowDescriptions() throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<chart::XChartDataArray> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2334,7 +2334,7 @@ void SwXTextTable::setRowDescriptions(const uno::Sequence<OUString>& rRowDesc) throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<chart::XChartDataArray> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2346,7 +2346,7 @@ uno::Sequence<OUString> SwXTextTable::getColumnDescriptions() throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<chart::XChartDataArray> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2358,7 +2358,7 @@ void SwXTextTable::setColumnDescriptions(const uno::Sequence<OUString>& rColumnD throw(uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(m_pImpl->ThrowIfComplex(*this)); + std::pair<sal_uInt16, sal_uInt16> const RowsAndColumns(SwXTextTable::Impl::ThrowIfComplex(*this)); uno::Reference<chart::XChartDataArray> const xAllRange( getCellRangeByPosition(0, 0, RowsAndColumns.second-1, RowsAndColumns.first-1), uno::UNO_QUERY); @@ -2788,7 +2788,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0); aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER )); - pDoc->GetTabBorders(rCrsr, aSet); + SwDoc::GetTabBorders(rCrsr, aSet); const SvxBoxInfoItem& rBoxInfoItem = static_cast<const SvxBoxInfoItem&>(aSet.Get(SID_ATTR_BORDER_INNER)); const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX)); @@ -3308,7 +3308,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush( RES_BACKGROUND ); - pDoc->GetBoxAttr( *pTblCrsr, aBrush ); + SwDoc::GetBoxAttr( *pTblCrsr, aBrush ); ((SfxPoolItem&)aBrush).PutValue(aValue, pEntry->nMemberId); pDoc->SetBoxAttr( *pTblCrsr, aBrush ); @@ -3339,7 +3339,7 @@ void SwXCellRange::setPropertyValue(const OUString& rPropertyName, const uno::An aBoxInfo.SetValid(nValid, true); aSet.Put(aBoxInfo); - pDoc->GetTabBorders(rCrsr, aSet); + SwDoc::GetTabBorders(rCrsr, aSet); aSet.Put(aBoxInfo); SvxBoxItem aBoxItem(static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX))); @@ -3416,7 +3416,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) case FN_UNO_TABLE_CELL_BACKGROUND: { SvxBrushItem aBrush( RES_BACKGROUND ); - if(pTblCrsr->GetDoc()->GetBoxAttr( *pTblCrsr, aBrush )) + if(SwDoc::GetBoxAttr( *pTblCrsr, aBrush )) aBrush.QueryValue(aRet, pEntry->nMemberId); } @@ -3429,7 +3429,7 @@ uno::Any SwXCellRange::getPropertyValue(const OUString& rPropertyName) SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER, 0); aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER )); - pDoc->GetTabBorders(*pTblCrsr, aSet); + SwDoc::GetTabBorders(*pTblCrsr, aSet); const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX)); rBoxItem.QueryValue(aRet, pEntry->nMemberId); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 3374de07a4e5..04bc9a2f9cbe 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1848,7 +1848,7 @@ void SwXText::Impl::ConvertCell( SwNodeRange aTmpRange(aStartCellPam.Start()->nNode, aEndCellPam.End()->nNode); SwNodeRange * pCorrectedRange = - m_pDoc->GetNodes().ExpandRangeForTableBox(aTmpRange); + SwNodes::ExpandRangeForTableBox(aTmpRange); if (pCorrectedRange != NULL) { diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index 096265b5f3ef..03bd9c6405b1 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -107,7 +107,7 @@ void SwViewShell::Init( const SwViewOption *pNewOpt ) SAL_INFO( "sw.core", "View::Init - after InitPrt" ); if( GetWin() ) { - mpOpt->Init( GetWin() ); + SwViewOption::Init( GetWin() ); GetWin()->SetFillColor(); GetWin()->SetBackground(); GetWin()->SetLineColor(); diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 401abb01b531..c98211ef32c3 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -71,9 +71,9 @@ static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, bool bNext) { SwCntntNode * pCNd = rIdx.GetNode().GetCntntNode(); if(!pCNd && 0 == (pCNd = bNext ? pDoc->GetNodes().GoNext(&rIdx) - : pDoc->GetNodes().GoPrevious(&rIdx))) + : SwNodes::GoPrevious(&rIdx))) { - pCNd = bNext ? pDoc->GetNodes().GoPrevious(&rIdx) + pCNd = bNext ? SwNodes::GoPrevious(&rIdx) : pDoc->GetNodes().GoNext(&rIdx); OSL_ENSURE(pCNd, "no ContentNode found"); } diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index a1c9376513e5..0d3796b551bc 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -183,7 +183,7 @@ sal_uLong SwReader::Read( const Reader& rOptions ) { --aEndPos; pCNd = aEndPos.GetNode().GetCntntNode(); - if( !pCNd && 0 == ( pCNd = pDoc->GetNodes().GoPrevious( &aEndPos ) )) + if( !pCNd && 0 == ( pCNd = SwNodes::GoPrevious( &aEndPos ) )) pCNd = pDoc->GetNodes().GoNext( &aEndPos ); pPam->GetPoint()->nNode = aEndPos; diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 5897f904b38b..f85ae7fa776f 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2127,7 +2127,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) nPageWidth = pBox->GetFrmFmt()->GetFrmSize().GetWidth(); } - OString sWidth = OString::number(rHTMLWrt.ToPixel(nPageWidth - nLeft - nRight, false)); + OString sWidth = OString::number(SwHTMLWriter::ToPixel(nPageWidth - nLeft - nRight, false)); aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_width, sWidth); if( !nLeft ) @@ -2146,7 +2146,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) if( pBorderLine ) { sal_uInt16 nWidth = pBorderLine->GetScaledWidth(); - OString sWidth = OString::number(rHTMLWrt.ToPixel(nWidth, false)); + OString sWidth = OString::number(SwHTMLWriter::ToPixel(nWidth, false)); aHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_size, sWidth); const Color& rBorderColor = pBorderLine->GetColor(); @@ -2667,7 +2667,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode ) return rHTMLWrt; } -sal_uInt32 SwHTMLWriter::ToPixel( sal_uInt32 nVal, const bool bVert ) const +sal_uInt32 SwHTMLWriter::ToPixel( sal_uInt32 nVal, const bool bVert ) { if( Application::GetDefaultDevice() && nVal ) { diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index a0ddb955bcfa..4d14e70bd61c 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -1882,7 +1882,7 @@ bool SwHTMLParser::ParseStyleOptions( const OUString &rStyle, const SvxCSS1MapEntry *pClass = pCSS1Parser->GetClass( aClass ); if( pClass ) { - pCSS1Parser->MergeStyles( pClass->GetItemSet(), + SvxCSS1Parser::MergeStyles( pClass->GetItemSet(), pClass->GetPropertyInfo(), rItemSet, rPropInfo, false ); bRet = true; @@ -1893,7 +1893,7 @@ bool SwHTMLParser::ParseStyleOptions( const OUString &rStyle, { const SvxCSS1MapEntry *pId = pCSS1Parser->GetId( rId ); if( pId ) - pCSS1Parser->MergeStyles( pId->GetItemSet(), + SvxCSS1Parser::MergeStyles( pId->GetItemSet(), pId->GetPropertyInfo(), rItemSet, rPropInfo, !rClass.isEmpty() ); rPropInfo.aId = rId; diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 5a3349588675..28117fdd5e33 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1396,7 +1396,7 @@ void SwHTMLParser::StripTrailingPara() if(nBookNdIdx==nNodeIdx) { SwNodeIndex nNewNdIdx(pPam->GetPoint()->nNode); - SwCntntNode* pNd = pDoc->GetNodes().GoPrevious(&nNewNdIdx); + SwCntntNode* pNd = SwNodes::GoPrevious(&nNewNdIdx); if(!pNd) { OSL_ENSURE(false, "Hoppla, wo ist mein Vorgaenger-Node"); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 39bcbf198ee3..050fd7f7a720 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -328,8 +328,8 @@ class HTMLTableColumn SwFrmFmt *aFrmFmts[6]; - inline sal_uInt16 GetFrmFmtIdx( bool bBorderLine, - sal_Int16 eVertOri ) const; + static inline sal_uInt16 GetFrmFmtIdx( bool bBorderLine, + sal_Int16 eVertOri ); public: @@ -894,7 +894,7 @@ inline SwHTMLTableLayoutColumn *HTMLTableColumn::CreateLayoutInfo() } inline sal_uInt16 HTMLTableColumn::GetFrmFmtIdx( bool bBorderLine, - sal_Int16 eVertOrient ) const + sal_Int16 eVertOrient ) { OSL_ENSURE( text::VertOrientation::TOP != eVertOrient, "Top ist nicht erlaubt" ); sal_uInt16 n = bBorderLine ? 3 : 0; @@ -1013,7 +1013,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions ) nCellPadding = MIN_BORDER_DIST; // default else { - nCellPadding = pParser->ToTwips( nCellPadding ); + nCellPadding = SwHTMLParser::ToTwips( nCellPadding ); if( nCellPadding<MIN_BORDER_DIST ) nCellPadding = MIN_BORDER_DIST; } @@ -1022,7 +1022,7 @@ void HTMLTable::InitCtor( const HTMLTableOptions *pOptions ) { if( nCellSpacing==USHRT_MAX ) nCellSpacing = NETSCAPE_DFLT_CELLSPACING; - nCellSpacing = pParser->ToTwips( nCellSpacing ); + nCellSpacing = SwHTMLParser::ToTwips( nCellSpacing ); } nPWidth = pOptions->nHSpace; @@ -1098,7 +1098,7 @@ HTMLTable::~HTMLTable() SwHTMLTableLayout *HTMLTable::CreateLayoutInfo() { - sal_uInt16 nW = bPrcWidth ? nWidth : pParser->ToTwips( nWidth ); + sal_uInt16 nW = bPrcWidth ? nWidth : SwHTMLParser::ToTwips( nWidth ); sal_uInt16 nBorderWidth = GetBorderWidth( aBorderLine, true ); sal_uInt16 nLeftBorderWidth = @@ -2623,7 +2623,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, // Zeile setzen. (War mal fixe Hoehe, aber das gibt manchmal // Probleme (fix #34972#) und ist auch nicht Netscape 4.0 // konform - nHeight = pParser->ToTwips( nHeight ); + nHeight = SwHTMLParser::ToTwips( nHeight ); if( nHeight < MINLAY ) nHeight = MINLAY; @@ -2710,7 +2710,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, nWidth2 = nWidth2 - pLayoutInfo->GetRightCellSpace( nCol, nColSpan ); nWidth2 = static_cast< sal_uInt16 >(((long)nWidth * nPrcWidth) / 100); - pParser->ResizeDrawObject( pObj, nWidth2 ); + SwHTMLParser::ResizeDrawObject( pObj, nWidth2 ); } } } @@ -3241,7 +3241,7 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, rParser.InsertAttr( &rParser.aAttrTab.pAdjust, SvxAdjustItem(eAdjust, RES_PARATR_ADJUST), pCntxt ); - if( rParser.HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) ) + if( SwHTMLParser::HasStyleOptions( aStyle, aId, aClass, &aLang, &aDir ) ) { SfxItemSet aItemSet( rParser.pDoc->GetAttrPool(), rParser.pCSS1Parser->GetWhichMap() ); diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index ba2b9166d592..8e5bda56276c 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -64,7 +64,7 @@ using namespace ::com::sun::star; class SwHTMLWrtTable : public SwWriteTable { - void Pixelize( sal_uInt16& rValue ); + static void Pixelize( sal_uInt16& rValue ); void PixelizeBorders(); void OutTableCell( SwHTMLWriter& rWrt, const SwWriteTableCell *pCell, @@ -702,11 +702,11 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, // CELLPADDING ausgeben: Stammt aus Layout oder ist berechnet sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellpadding). - append("=\"").append(static_cast<sal_Int32>(rWrt.ToPixel(nCellPadding,false))).append("\""); + append("=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(nCellPadding,false))).append("\""); // CELLSPACING ausgeben: Stammt aus Layout oder ist berechnet sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellspacing). - append("=\"").append(static_cast<sal_Int32>(rWrt.ToPixel(nCellSpacing,false))).append("\""); + append("=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(nCellSpacing,false))).append("\""); rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() ); @@ -779,7 +779,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, if( bRel ) sOutStr.append(static_cast<sal_Int32>(nWidth)).append('*'); else - sOutStr.append(static_cast<sal_Int32>(rWrt.ToPixel(nWidth,false))); + sOutStr.append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(nWidth,false))); sOutStr.append("\">"); rWrt.Strm().WriteCharPtr( sOutStr.makeStringAndClear().getStr() ); diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx index 5496b608e599..8b4099003cf8 100644 --- a/sw/source/filter/html/svxcss1.hxx +++ b/sw/source/filter/html/svxcss1.hxx @@ -292,7 +292,7 @@ public: const sal_uInt16 *GetWhichMap() const { return &aWhichMap[0]; } - void InsertMapEntry( const OUString& rKey, const SfxItemSet& rItemSet, + static void InsertMapEntry( const OUString& rKey, const SfxItemSet& rItemSet, const SvxCSS1PropertyInfo& rProp, CSS1Map& rMap ); void InsertId( const OUString& rId, const SfxItemSet& rItemSet, @@ -316,7 +316,7 @@ public: SvxCSS1MapEntry* GetTag( const OUString& rTag ); - void MergeStyles( const SfxItemSet& rSrcSet, + static void MergeStyles( const SfxItemSet& rSrcSet, const SvxCSS1PropertyInfo& rSrcInfo, SfxItemSet& rTargetSet, SvxCSS1PropertyInfo& rTargetInfo, diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 607691ca655f..9c43b5f3b884 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -2758,7 +2758,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable, pCNd = pAttr->nEndPara.GetNode().GetCntntNode(); if( !pCNd ) { - pCNd = pDoc->GetNodes().GoPrevious( &(pAttr->nEndPara) ); + pCNd = SwNodes::GoPrevious( &(pAttr->nEndPara) ); if( pCNd ) pAttr->nEndCntnt = pCNd->Len(); else @@ -3278,7 +3278,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab, { nTmpIdx = pDoc->GetNodes().GetEndOfInserts().GetIndex(); } - SwCntntNode* pCNd = pDoc->GetNodes().GoPrevious(&nEndIdx); + SwCntntNode* pCNd = SwNodes::GoPrevious(&nEndIdx); // keine Attribute setzen, wenn der PaM aus dem Content-Bereich // herausgeschoben wurde. @@ -4997,7 +4997,7 @@ void SwHTMLParser::InsertSpacer() } } -sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel ) const +sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel ) { if( nPixel && Application::GetDefaultDevice() ) { diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index a21b28cf99d4..7ac4f65700fd 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -680,7 +680,7 @@ private: const SvxCSS1PropertyInfo &rPropInfo, SfxItemSet &rFrmItemSet ); - void SetFrmFmtAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, + static void SetFrmFmtAttrs( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, sal_uInt16 nFlags, SfxItemSet &rFrmItemSet ); // Frames anlegen und Auto-gebundene Rahmen registrieren @@ -688,14 +688,14 @@ private: // Die Groesse des Fly-Frames an die Vorgaben und Gegebenheiten anpassen // (nicht fuer Grafiken, deshalb htmlplug.cxx) - void SetFixSize( const Size& rPixSize, const Size& rTwipDfltSize, + static void SetFixSize( const Size& rPixSize, const Size& rTwipDfltSize, bool bPrcWidth, bool bPrcHeight, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, SfxItemSet& rFlyItemSet ); - void SetVarSize( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, + static void SetVarSize( SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, SfxItemSet& rFlyItemSet, SwTwips nDfltWidth=MINLAY, sal_uInt8 nDltPrcWidth=0 ); - void SetSpace( const Size& rPixSpace, SfxItemSet &rItemSet, + static void SetSpace( const Size& rPixSpace, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, SfxItemSet& rFlyItemSet ); sal_uInt16 IncGrfsThatResizeTable(); @@ -760,7 +760,7 @@ private: void NewStyle(); void EndStyle(); - inline bool HasStyleOptions( const OUString &rStyle, const OUString &rId, + static inline bool HasStyleOptions( const OUString &rStyle, const OUString &rId, const OUString &rClass, const OUString *pLang=0, const OUString *pDir=0 ); bool ParseStyleOptions( const OUString &rStyle, const OUString &rId, @@ -793,9 +793,9 @@ private: bool bMinWidth, bool bMinHeight ); public: - void ResizeDrawObject( SdrObject* pObj, SwTwips nWidth ); + static void ResizeDrawObject( SdrObject* pObj, SwTwips nWidth ); private: - void RegisterDrawObjectToTable( HTMLTable *pCurTable, SdrObject* pObj, + static void RegisterDrawObjectToTable( HTMLTable *pCurTable, SdrObject* pObj, sal_uInt8 nWidth ); void NewForm( bool bAppend=true ); @@ -899,7 +899,7 @@ public: virtual SvParserState CallParser() SAL_OVERRIDE; - sal_uInt16 ToTwips( sal_uInt16 nPixel ) const; + static sal_uInt16 ToTwips( sal_uInt16 nPixel ); // for reading asynchronously from SvStream virtual void Continue( int nToken ) SAL_OVERRIDE; diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index b0e92e35df9d..b60d32e28c74 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -471,7 +471,7 @@ public: sal_uInt16 GetHTMLDirection( sal_uInt16 nDir ) const; sal_uInt16 GetHTMLDirection( const SfxItemSet& rItemSet ) const; void OutDirection( sal_uInt16 nDir ); - OString convertDirection(sal_uInt16 nDirection); + static OString convertDirection(sal_uInt16 nDirection); // ALT/ALIGN/WIDTH/HEIGHT/HSPACE/VSPACE-Optionen des aktuellen // Frame-Formats ausgeben und ggf. ein <BR CLEAR=...> vorne an @@ -511,11 +511,11 @@ public: SwPaM* GetEndPaM() { return pOrigPam; } void SetEndPaM( SwPaM* pPam ) { pOrigPam = pPam; } - sal_uInt32 ToPixel( sal_uInt32 nVal, const bool bVert ) const; + static sal_uInt32 ToPixel( sal_uInt32 nVal, const bool bVert ); sal_uInt16 GuessFrmType( const SwFrmFmt& rFrmFmt, const SdrObject*& rpStrObj ); - sal_uInt16 GuessOLENodeFrmType( const SwNode& rNd ); + static sal_uInt16 GuessOLENodeFrmType( const SwNode& rNd ); void CollectFlyFrms(); diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx index ad3c9f5d3e80..fa50d3c03eb5 100644 --- a/sw/source/filter/inc/wrtswtbl.hxx +++ b/sw/source/filter/inc/wrtswtbl.hxx @@ -295,8 +295,8 @@ public: protected: long GetLineHeight( const SwTableLine *pLine ); - long GetLineHeight( const SwTableBox *pBox ) const; - const SvxBrushItem *GetLineBrush( const SwTableBox *pBox, + static long GetLineHeight( const SwTableBox *pBox ); + static const SvxBrushItem *GetLineBrush( const SwTableBox *pBox, SwWriteTableRow *pRow ); sal_uInt16 GetLeftSpace( sal_uInt16 nCol ) const; diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index d71d7c3bba7e..3937d95af300 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -209,7 +209,7 @@ Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndId aStt = nEndIdx; pCNode = aStt.GetNode().GetCntntNode(); if (!pCNode) - pCNode = pNds->GoPrevious(&aStt); + pCNode = SwNodes::GoPrevious(&aStt); assert(pCNode && "No more ContentNode at StartPos"); pCNode->MakeEndIndex( &pNew->GetPoint()->nContent ); pNew->GetPoint()->nNode = aStt; @@ -314,7 +314,7 @@ void Writer::PutNumFmtFontsInAttrPool() bool bCheck = false; for( size_t nGet = rListTbl.size(); nGet; ) - if( pDoc->IsUsed( *(pRule = rListTbl[ --nGet ] ))) + if( SwDoc::IsUsed( *(pRule = rListTbl[ --nGet ] ))) for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl ) if( SVX_NUM_CHAR_SPECIAL == (pFmt = &pRule->Get( nLvl ))->GetNumberingType() || SVX_NUM_BITMAP == pFmt->GetNumberingType() ) diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx index 1e5ca18cdec8..ec8b945888f7 100644 --- a/sw/source/filter/writer/wrtswtbl.cxx +++ b/sw/source/filter/writer/wrtswtbl.cxx @@ -141,7 +141,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine ) return nHeight; } -long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) const +long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) { const SwTableLine *pLine = pBox->GetUpper(); diff --git a/sw/source/filter/ww8/WW8FFData.hxx b/sw/source/filter/ww8/WW8FFData.hxx index 0f6dd3f51d7d..81e3e672da40 100644 --- a/sw/source/filter/ww8/WW8FFData.hxx +++ b/sw/source/filter/ww8/WW8FFData.hxx @@ -63,7 +63,7 @@ private: ::std::vector< OUString > msListEntries; protected: - void WriteOUString(SvStream * pStream, const OUString & rStr, bool bAddZero); + static void WriteOUString(SvStream * pStream, const OUString & rStr, bool bAddZero); public: WW8FFData(); diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx index 58a226a7202c..a4aabc6a9af1 100644 --- a/sw/source/filter/ww8/attributeoutputbase.hxx +++ b/sw/source/filter/ww8/attributeoutputbase.hxx @@ -363,7 +363,7 @@ public: protected: - void GetNumberPara( OUString& rStr, const SwField& rFld ); + static void GetNumberPara( OUString& rStr, const SwField& rFld ); /// Output frames - the implementation. virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 6b91f3663d7b..92a1b64eee51 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6718,7 +6718,7 @@ void DocxAttributeOutput::FootnotesEndnotes( bool bFootnotes ) sal_Int32 nBody = bFootnotes? XML_footnotes: XML_endnotes; sal_Int32 nItem = bFootnotes? XML_footnote: XML_endnote; - m_pSerializer->startElementNS( XML_w, nBody, m_rExport.MainXmlNamespaces() ); + m_pSerializer->startElementNS( XML_w, nBody, DocxExport::MainXmlNamespaces() ); sal_Int32 nIndex = 0; diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index 7ec178477215..8763530a6aff 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -416,7 +416,7 @@ private: void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* rFlyFrmFmt ); /// checks whether the current component is a diagram - bool IsDiagram (const SdrObject* sdrObject); + static bool IsDiagram (const SdrObject* sdrObject); void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ); @@ -428,7 +428,7 @@ private: void EndTable(); void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t pInner, sal_Int32 nCell, sal_uInt32 nRow); void PopulateFrameProperties(const SwFrmFmt* pFrmFmt, const Size& rSize); - bool TextBoxIsFramePr(const SwFrmFmt& rFrmFmt); + static bool TextBoxIsFramePr(const SwFrmFmt& rFrmFmt); /// End cell, row, and even the entire table if necessary. void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false ); @@ -716,8 +716,8 @@ private: void CmdField_Impl( FieldInfos& rInfos ); void EndField_Impl( FieldInfos& rInfos ); - void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue ); - void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... ); + static void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue ); + static void AddToAttrList( std::unique_ptr<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... ); std::unique_ptr<sax_fastparser::FastAttributeList> m_pFontsAttrList; std::unique_ptr<sax_fastparser::FastAttributeList> m_pEastAsianLayoutAttrList; @@ -953,7 +953,7 @@ public: void FootnotesEndnotes( bool bFootnotes ); /// writes the footnotePr/endnotePr (depending on tag) section - void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info, int listtag ); + static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info, int listtag ); bool HasPostitFields() const; void WritePostitFields(); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index f22cb911ed29..320eddd68214 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -858,11 +858,11 @@ void DocxExport::WriteSettings() // Has Footnotes if( m_pAttrOutput->HasFootnotes()) - m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_footnotePr, m_pDoc->GetFtnInfo(), XML_footnote ); + DocxAttributeOutput::WriteFootnoteEndnotePr( pFS, XML_footnotePr, m_pDoc->GetFtnInfo(), XML_footnote ); // Has Endnotes if( m_pAttrOutput->HasEndnotes()) - m_pAttrOutput->WriteFootnoteEndnotePr( pFS, XML_endnotePr, m_pDoc->GetEndNoteInfo(), XML_endnote ); + DocxAttributeOutput::WriteFootnoteEndnotePr( pFS, XML_endnotePr, m_pDoc->GetEndNoteInfo(), XML_endnote ); // Has themeFontLang information uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW ); diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index ac1bbb3b2963..f3fe41399841 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -174,7 +174,7 @@ public: /// Returns the relationd id OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount, ::sax_fastparser::FSHelperPtr m_pSerializer ); OString WriteOLEObject( SwOLEObj& rObject, const OUString& sMediaType, const OUString& sRelationType, const OUString& sFileExtension ); - bool lcl_CopyStream( css::uno::Reference< css::io::XInputStream> xIn, css::uno::Reference< css::io::XOutputStream > xOut ); + static bool lcl_CopyStream( css::uno::Reference< css::io::XInputStream> xIn, css::uno::Reference< css::io::XOutputStream > xOut ); /// Writes the shape using drawingML syntax. void OutputDML( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape ); @@ -253,7 +253,7 @@ private: public: /// All xml namespaces to be used at the top of any text .xml file (main doc, headers, footers,...) - sax_fastparser::XFastAttributeListRef MainXmlNamespaces(); + static sax_fastparser::XFastAttributeListRef MainXmlNamespaces(); /// FIXME this is temporary, remotely reminding the method of the same /// name in WW8Export. diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx index 6427f01b48dc..f7f88831fa66 100644 --- a/sw/source/filter/ww8/docxsdrexport.cxx +++ b/sw/source/filter/ww8/docxsdrexport.cxx @@ -182,7 +182,7 @@ struct DocxSdrExport::Impl /// Writes wp wrapper code around an SdrObject, which itself is written using drawingML syntax. void textFrameShadow(const SwFrmFmt& rFrmFmt); - bool isSupportedDMLShape(uno::Reference<drawing::XShape> xShape); + static bool isSupportedDMLShape(uno::Reference<drawing::XShape> xShape); /// Undo the text direction mangling done by the frame btLr handler in writerfilter::dmapper::DomainMapper::lcl_startCharacterGroup() bool checkFrameBtlr(SwNode* pStartNode, bool bDML); }; @@ -798,7 +798,7 @@ bool lcl_isLockedCanvas(uno::Reference<drawing::XShape> xShape) void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrmFmt* pFrmFmt, int nAnchorId) { uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(pSdrObject)->getUnoShape(), uno::UNO_QUERY_THROW); - if (!m_pImpl->isSupportedDMLShape(xShape)) + if (!Impl::isSupportedDMLShape(xShape)) return; m_pImpl->m_rExport.DocxAttrOutput().GetSdtEndBefore(pSdrObject); @@ -935,7 +935,7 @@ void DocxSdrExport::writeDMLAndVMLDrawing(const SdrObject* sdrObj, const SwFrmFm // In case we are already inside a DML block, then write the shape only as VML, turn out that's allowed to do. // A common service created in util to check for VML shapes which are allowed to have textbox in content - if ((msfilter::util::HasTextBoxContent(eShapeType)) && m_pImpl->isSupportedDMLShape(xShape) && !bDMLAndVMLDrawingOpen) + if ((msfilter::util::HasTextBoxContent(eShapeType)) && Impl::isSupportedDMLShape(xShape) && !bDMLAndVMLDrawingOpen) { m_pImpl->m_pSerializer->startElementNS(XML_mc, XML_AlternateContent, FSEND); diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx index bb291fa062a4..e2899709dbdb 100644 --- a/sw/source/filter/ww8/escher.hxx +++ b/sw/source/filter/ww8/escher.hxx @@ -103,12 +103,12 @@ protected: void WriteOLEPicture(EscherPropertyContainer &rPropOpt, sal_uInt32 nShapeFlags, const Graphic &rGraphic, const SdrObject &rObj, sal_uInt32 nShapeId, const com::sun::star::awt::Rectangle* pVisArea ); - void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt); + static void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt); sal_Int32 DrawModelToEmu(sal_Int32 nVal) const { return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); } - sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const; + static sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax); virtual void SetPicId(const SdrObject &, sal_uInt32, EscherPropertyContainer &); SdrLayerID GetInvisibleHellId() const; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 81272a5700a4..e49d52e9b1be 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -213,7 +213,7 @@ void RtfExport::BuildNumbering() else { pRule = rListTbl[ n ]; - if (!m_pDoc->IsUsed(*pRule)) + if (!SwDoc::IsUsed(*pRule)) continue; } @@ -863,12 +863,12 @@ void RtfExport::resetStream() SvStream& RtfExport::OutULong(sal_uLong nVal) { - return m_pWriter->OutULong(Strm(), nVal); + return Writer::OutULong(Strm(), nVal); } SvStream& RtfExport::OutLong(long nVal) { - return m_pWriter->OutLong(Strm(), nVal); + return Writer::OutLong(Strm(), nVal); } void RtfExport::OutUnicode(const sal_Char* pToken, const OUString& rContent, bool bUpr) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 682eb68b0c97..3a9d1b405235 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2190,7 +2190,7 @@ void SwBasicEscherEx::Init() SetHellLayerId(rWrt.m_pDoc->getIDocumentDrawModelAccess().GetHellId()); } -sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const +sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) { if (nMax) { diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index e0a216cd2e9f..2cc8ea741b6b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1099,7 +1099,7 @@ OUString BookmarkToWriter(const OUString &rBookmark) void SwWW8AttrIter::OutSwFmtRefMark(const SwFmtRefMark& rAttr, bool) { if ( m_rExport.HasRefToObject( REF_SETREFATTR, &rAttr.GetRefName(), 0 ) ) - m_rExport.AppendBookmark( m_rExport.GetBookmarkName( REF_SETREFATTR, + m_rExport.AppendBookmark( MSWordExportBase::GetBookmarkName( REF_SETREFATTR, &rAttr.GetRefName(), 0 )); } diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx index c9185fde1e74..106df4478dad 100644 --- a/sw/source/filter/ww8/wrtw8num.cxx +++ b/sw/source/filter/ww8/wrtw8num.cxx @@ -82,7 +82,7 @@ sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule ) for ( sal_uInt16 n = m_pUsedNumTbl->size(); n; ) { const SwNumRule& rRule = *(*m_pUsedNumTbl)[ --n ]; - if ( !m_pDoc->IsUsed( rRule ) ) + if ( !SwDoc::IsUsed( rRule ) ) { m_pUsedNumTbl->erase( m_pUsedNumTbl->begin() + n ); } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index f24fbd70d5ad..f2de75169340 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -203,7 +203,7 @@ sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt ) } -sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) const +sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) { sal_uInt16 nRet = ww::stiUser; // User-Style als default sal_uInt16 nPoolId = rFmt.GetPoolFmtId(); @@ -1123,7 +1123,7 @@ sal_uInt16 MSWordSections::CurrentNumberOfColumns( const SwDoc &rDoc ) const return NumberOfColumns( rDoc, aSects.back() ); } -sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ) const +sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ) { const SwPageDesc* pPd = rInfo.pPageDesc; if ( !pPd ) diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 9b5a410682d0..c5cc65416083 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -217,7 +217,7 @@ public: sal_uInt16 CurrentNumberOfColumns( const SwDoc &rDoc ) const; /// Number of columns of the provided WW8_SepInfo. - sal_uInt16 NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ) const; + static sal_uInt16 NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo ); bool DocumentIsProtected() const { return mbDocumentIsProtected; } @@ -612,7 +612,7 @@ public: bool HasRefToObject( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo ); /// Find the bookmark name. - OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo ); + static OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo ); /// Add a bookmark converted to a Word name. void AppendWordBookmark( const OUString& rName ); @@ -710,10 +710,10 @@ public: void WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader); /// Format of the section. - const SwSectionFmt* GetSectionFormat( const SwNode& rNd ) const; + static const SwSectionFmt* GetSectionFormat( const SwNode& rNd ); /// Line number of the section start. - sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const; + static sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ); /// Start new section. void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen = false, bool isTextNodeEmpty = false); @@ -1567,7 +1567,7 @@ class MSWordStyles /// Outputs attributes of one style. void WriteProperties( const SwFmt* pFmt, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz ); - sal_uInt16 GetWWId( const SwFmt& rFmt ) const; + static sal_uInt16 GetWWId( const SwFmt& rFmt ); void SetStyleDefaults( const SwFmt& rFmt, bool bPap ); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index f2f2d2fd6ef9..a5f249e65da3 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -585,7 +585,7 @@ bool MSWordExportBase::OutputFollowPageDesc( const SfxItemSet* pSet, const SwTxt return bRet; } -const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) const +const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) { const SwSectionFmt* pFmt = NULL; const SwSectionNode* pSect = rNd.FindSectionNode(); @@ -598,7 +598,7 @@ const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) cons return pFmt; } -sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const +sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) { const SwFmtLineNumber* pNItem = 0; if ( pSet ) @@ -2950,7 +2950,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) { const OUString aRefName(rRFld.GetSetRefName()); sStr = FieldString(eFld) - + GetExport().GetBookmarkName(nSubType, &aRefName, 0); + + MSWordExportBase::GetBookmarkName(nSubType, &aRefName, 0); } switch (pFld->GetFormat()) { @@ -2982,7 +2982,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) break; } sStr = FieldString(eFld) - + GetExport().GetBookmarkName(nSubType, 0, rRFld.GetSeqNo()); + + MSWordExportBase::GetBookmarkName(nSubType, 0, rRFld.GetSeqNo()); break; } @@ -3346,7 +3346,7 @@ void AttributeOutputBase::TextFootnote( const SwFmtFtn& rFtn ) OUString sBkmkNm; if ( GetExport().HasRefToObject( nTyp, 0, rFtn.GetTxtFtn()->GetSeqRefNo() )) { - sBkmkNm = GetExport().GetBookmarkName( nTyp, 0, + sBkmkNm = MSWordExportBase::GetBookmarkName( nTyp, 0, rFtn.GetTxtFtn()->GetSeqRefNo() ); GetExport().AppendBookmark( sBkmkNm ); } diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx index a112803cf227..38557d567ac3 100644 --- a/sw/source/filter/ww8/ww8glsy.hxx +++ b/sw/source/filter/ww8/ww8glsy.hxx @@ -40,7 +40,7 @@ public: // fGlsy will indicate whether this has AutoText or not bool IsGlossaryFib() { return fGlsy; } private: - sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm, + static sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm, const WW8Fib &rFib); }; @@ -70,10 +70,10 @@ private: SvStorageRef xStg; sal_uInt16 nStrings; - bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile, + static bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile, const ::std::vector<OUString>& rStrings, const ::std::vector<ww::bytes>& rExtra); - bool HasBareGraphicEnd(SwDoc *pD,SwNodeIndex &rIdx); + static bool HasBareGraphicEnd(SwDoc *pD,SwNodeIndex &rIdx); WW8Glossary(const WW8Glossary&) SAL_DELETED_FUNCTION; WW8Glossary& operator=(const WW8Glossary&) SAL_DELETED_FUNCTION; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 5f61b6a441e4..5fb5ee5d957f 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1495,7 +1495,7 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, // If we have just one single inline graphic then // don't insert a field for the single frame, set // the frames hyperlink field attribute directly. - if (0 != (pFrm = rReader.ContainsSingleInlineGraphic(aRegion))) + if (0 != (pFrm = SwWW8ImplReader::ContainsSingleInlineGraphic(aRegion))) { const SwFmtINetFmt *pAttr = static_cast<const SwFmtINetFmt *>( rEntry.pAttr); @@ -4298,9 +4298,9 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection, SetPage(rPage, rFmt, rSection, bIgnoreCols); if (!(rSection.maSep.pgbApplyTo & 1)) - mrReader.SetPageBorder(rFmt, rSection); + SwWW8ImplReader::SetPageBorder(rFmt, rSection); if (!(rSection.maSep.pgbApplyTo & 2)) - mrReader.SetPageBorder(rPage.GetFirstMaster(), rSection); + SwWW8ImplReader::SetPageBorder(rPage.GetFirstMaster(), rSection); mrReader.SetDocumentGrid(rFmt, rSection); } diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 67cc51245ddb..bc3da9dc7387 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -859,21 +859,20 @@ private: void GetPageULData(const wwSection &rNewSection, wwULSpaceData& rData) const; - void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData, - const wwSection &rSection) const; + static void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData, + const wwSection &rSection); - void SetPage(SwPageDesc &rPageDesc, SwFrmFmt &rFmt, - const wwSection &rSection, bool bIgnoreCols) const; + static void SetPage(SwPageDesc &rPageDesc, SwFrmFmt &rFmt, + const wwSection &rSection, bool bIgnoreCols); - void SetNumberingType(const wwSection &rNewSection, SwPageDesc &rPageDesc) - const; + static void SetNumberingType(const wwSection &rNewSection, SwPageDesc &rPageDesc); void SetUseOn(wwSection &rSection); void SetHdFt(wwSection &rSection, int nSect, const wwSection *pPrevious); SwSectionFmt *InsertSection(SwPaM& rMyPaM, wwSection &rSection); - bool SetCols(SwFrmFmt &rFmt, const wwSection &rSection, - sal_uInt32 nNetWidth) const; + static bool SetCols(SwFrmFmt &rFmt, const wwSection &rSection, + sal_uInt32 nNetWidth); bool SectionIsProtected(const wwSection &rSection) const; void SetLeftRight(wwSection &rSection); bool IsNewDoc() const; @@ -1414,8 +1413,8 @@ private: bool ReadChar(long nPosCp, long nCpOfs); bool ReadPlainChars(WW8_CP& rPos, sal_Int32 nEnd, sal_Int32 nCpOfs); bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs); - bool LangUsesHindiNumbers(sal_uInt16 nLang); - sal_Unicode TranslateToHindiNumbers(sal_Unicode); + static bool LangUsesHindiNumbers(sal_uInt16 nLang); + static sal_Unicode TranslateToHindiNumbers(sal_Unicode); void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection); @@ -1450,7 +1449,7 @@ private: const SfxPoolItem* GetFmtAttr( sal_uInt16 nWhich ); bool JoinNode(SwPaM &rPam, bool bStealAttr = false); - bool IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn = false) const; + static bool IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn = false); //Set closest writer border equivalent into rBox from pbrc, optionally //recording true winword dimensions in pSizeArray. nSetBorders to mark a @@ -1460,27 +1459,27 @@ private: // Note #i20672# we can't properly support between lines so best to ignore // them for now - bool SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, - short *pSizeArray=0, sal_uInt8 nSetBorders=0xFF) const; - void GetBorderDistance(const WW8_BRCVer9* pbrc, Rectangle& rInnerDist) const; - sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing); - bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, - const WW8_BRCVer9& aRightBrc) const; + static bool SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, + short *pSizeArray=0, sal_uInt8 nSetBorders=0xFF); + static void GetBorderDistance(const WW8_BRCVer9* pbrc, Rectangle& rInnerDist); + static sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing); + static bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, + const WW8_BRCVer9& aRightBrc); //returns true is a shadow was set - bool SetFlyBordersShadow(SfxItemSet& rFlySet, const WW8_BRCVer9 *pbrc, - short *SizeArray=0) const; - void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const; + static bool SetFlyBordersShadow(SfxItemSet& rFlySet, const WW8_BRCVer9 *pbrc, + short *SizeArray=0); + static void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection); - sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor, + static sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth, SvxBoxItem& rBox ); void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist ); - void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord, + static void AdjustLRWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR); - void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, + static void AdjustULWrapForWordMargins(const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL); - void MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, SwFrmFmt* pFlyFmt); + static void MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord, SwFrmFmt* pFlyFmt); void SetAttributesAtGrfNode(SvxMSDffImportRec const* pRecord, SwFrmFmt *pFlyFmt, WW8_FSPA *pF); @@ -1496,7 +1495,7 @@ private: bool TestSameApo(const ApoTestResults &rApo, const WW8_TablePos *pTabPos); ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, const WW8_TablePos *pTabPos); - void StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const; + static void StripNegativeAfterIndent(SwFrmFmt *pFlyFmt); void EndSpecial(); bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp); @@ -1505,7 +1504,7 @@ private: bool ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic, const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pDelIt); - void ReplaceObj(const SdrObject &rReplaceTextObj, + static void ReplaceObj(const SdrObject &rReplaceTextObj, SdrObject &rSubObj); SwFlyFrmFmt* MakeGrafNotInCntnt(const WW8PicDesc& rPD, @@ -1726,7 +1725,7 @@ public: // eigentlich private, geht aber leider nur public void Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8*, short nLen); void Read_SubSuper( sal_uInt16, const sal_uInt8*, short nLen ); bool ConvertSubToGraphicPlacement(); - SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion); + static SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion); void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen ); void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen ); void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen ); @@ -1871,7 +1870,7 @@ public: // eigentlich private, geht aber leider nur public eF_ResT Read_F_OCX(WW8FieldDesc*, OUString&); eF_ResT Read_F_Hyperlink(WW8FieldDesc*, OUString& rStr); - eF_ResT Read_F_Shape(WW8FieldDesc* pF, OUString& rStr); + eF_ResT Read_F_Shape(WW8FieldDesc* pF, OUString& rStr); eF_ResT Read_F_HTMLControl( WW8FieldDesc* pF, OUString& rStr); void DeleteFormImpl(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index ed54f3bcac38..216721a824fd 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2939,8 +2939,8 @@ void WW8TabDesc::SetTabBorders(SwTableBox* pBox, short nWwIdx) if (pActBand->pTCs) // neither Cell Border nor Default Border defined ? { WW8_TCell* pT = &pActBand->pTCs[nWwIdx]; - if (pIo->IsBorder(pT->rgbrc)) - pIo->SetBorder(aFmtBox, pT->rgbrc); + if (SwWW8ImplReader::IsBorder(pT->rgbrc)) + SwWW8ImplReader::SetBorder(aFmtBox, pT->rgbrc); } if (pActBand->nOverrideSpacing[nWwIdx] & (1 << WW8TabBandDesc::wwTOP)) @@ -3225,7 +3225,7 @@ void WW8TabDesc::TableCellEnd() { SwTableBox* pBox = (*pTabBoxes)[0]; SwSelBoxes aBoxes; - pIo->m_rDoc.InsertRow( pTable->SelLineFromBox( pBox, aBoxes ) ); + pIo->m_rDoc.InsertRow( SwTable::SelLineFromBox( pBox, aBoxes ) ); } } } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 70f39f67d7b0..4ff82eb834e2 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -3322,8 +3322,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) (*m_pPaM).Move(fnMoveBackward); SwPaM aRegion(*m_pPaM, m_pPaM); - OSL_ENSURE(m_rDoc.GetCurTOX(*aRegion.GetPoint()), "Misunderstood how toc works"); - if (SwTOXBase* pBase2 = (SwTOXBase*)m_rDoc.GetCurTOX(*aRegion.GetPoint())) + OSL_ENSURE(SwDoc::GetCurTOX(*aRegion.GetPoint()), "Misunderstood how toc works"); + if (SwTOXBase* pBase2 = (SwTOXBase*)SwDoc::GetCurTOX(*aRegion.GetPoint())) { pBase2->SetMSTOCExpression(rStr); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 3bbfafdc9743..8863e0a4cf51 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -322,7 +322,7 @@ void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nL } bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection, - sal_uInt32 nNetWidth) const + sal_uInt32 nNetWidth) { //sprmSCcolumns - number of columns - 1 const sal_Int16 nCols = rSection.NoCols(); @@ -412,7 +412,7 @@ void wwSectionManager::SetLeftRight(wwSection &rSection) } void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt, - const wwSection &rSection, bool bIgnoreCols) const + const wwSection &rSection, bool bIgnoreCols) { // 1. Orientierung rInPageDesc.SetLandscape(rSection.IsLandScape()); @@ -437,7 +437,7 @@ static sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn) return nIn; } -void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const +void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) { if (!IsBorder(rSection.brc)) return; @@ -579,7 +579,7 @@ void wwSectionManager::GetPageULData(const wwSection &rSection, } void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt, - wwSectionManager::wwULSpaceData& rData, const wwSection &rSection) const + wwSectionManager::wwULSpaceData& rData, const wwSection &rSection) { if (rData.bHasHeader) // ... und Header-Lower setzen { @@ -762,7 +762,7 @@ wwSection::wwSection(const SwPosition &rPos) : maStart(rPos.nNode), } void wwSectionManager::SetNumberingType(const wwSection &rNewSection, - SwPageDesc &rPageDesc) const + SwPageDesc &rPageDesc) { // Seitennummernformat speichern static const SvxExtNumType aNumTyp[5] = @@ -1372,13 +1372,13 @@ static bool lcl_IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn = false) (bChkBtwn && pbrc[WW8_BETW ].brcType()); } -bool SwWW8ImplReader::IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn) const +bool SwWW8ImplReader::IsBorder(const WW8_BRCVer9* pbrc, bool bChkBtwn) { return lcl_IsBorder(pbrc, bChkBtwn); } bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, - short *pSizeArray, sal_uInt8 nSetBorders) const + short *pSizeArray, sal_uInt8 nSetBorders) { bool bChange = false; static const std::pair<sal_uInt16, SvxBoxItemLine> aIdArr[] = @@ -1419,7 +1419,7 @@ bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRCVer9* pbrc, } bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, - const WW8_BRCVer9& aRightBrc) const + const WW8_BRCVer9& aRightBrc) { bool bRet = aRightBrc.fShadow() && pSizeArray && pSizeArray[WW8_RIGHT]; if (bRet) @@ -1438,7 +1438,7 @@ bool SwWW8ImplReader::SetShadow(SvxShadowItem& rShadow, const short *pSizeArray, } void SwWW8ImplReader::GetBorderDistance(const WW8_BRCVer9* pbrc, - Rectangle& rInnerDist) const + Rectangle& rInnerDist) { rInnerDist = Rectangle( pbrc[ 1 ].dptSpace() * 20, pbrc[ 0 ].dptSpace() * 20, @@ -1447,7 +1447,7 @@ void SwWW8ImplReader::GetBorderDistance(const WW8_BRCVer9* pbrc, } bool SwWW8ImplReader::SetFlyBordersShadow(SfxItemSet& rFlySet, - const WW8_BRCVer9 *pbrc, short *pSizeArray) const + const WW8_BRCVer9 *pbrc, short *pSizeArray) { bool bShadowed = false; if (IsBorder(pbrc)) @@ -2037,7 +2037,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW, Put( aSurround ); short aSizeArray[5]={0}; - rReader.SetFlyBordersShadow(*this,pFW->brc,&aSizeArray[0]); + SwWW8ImplReader::SetFlyBordersShadow(*this,pFW->brc,&aSizeArray[0]); // der 5. Parameter ist immer 0, daher geht beim Cast nix verloren @@ -2084,7 +2084,7 @@ WW8FlySet::WW8FlySet( SwWW8ImplReader& rReader, const SwPaM* pPaM, WW8_BRCVer9 brcVer9[4]; for (int i = 0; i < 4; i++) brcVer9[i] = rPic.rgbrc[i]; - if (rReader.SetFlyBordersShadow( *this, brcVer9, &aSizeArray[0])) + if (SwWW8ImplReader::SetFlyBordersShadow( *this, brcVer9, &aSizeArray[0])) { Put(SvxLRSpaceItem( aSizeArray[WW8_LEFT], 0, 0, 0, RES_LR_SPACE ) ); Put(SvxULSpaceItem( aSizeArray[WW8_TOP], 0, RES_UL_SPACE )); @@ -2431,7 +2431,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) } //In auto-width word frames negative after-indent values are ignored -void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) const +void SwWW8ImplReader::StripNegativeAfterIndent(SwFrmFmt *pFlyFmt) { const SwNodeIndex* pSttNd = pFlyFmt->GetCntnt().GetCntntIdx(); if (!pSttNd) diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index e409085e493b..5064172a981b 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -3365,7 +3365,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p) pPieceIter->SetIdx( nOldPos ); } else - pPcd->AktPieceFc2Cp( p->nStartPos, p->nEndPos,&rSBase ); + WW8PLCFx_PCD::AktPieceFc2Cp( p->nStartPos, p->nEndPos,&rSBase ); } else { @@ -3399,7 +3399,7 @@ void WW8PLCFx_Cp_FKP::advance() // get Fkp entry WW8PLCFx_Fc_FKP::GetSprmsAndPos(nAttrStart, nAttrEnd, nFkpLen); - pPcd->AktPieceFc2Cp( nAttrStart, nAttrEnd, &rSBase ); + WW8PLCFx_PCD::AktPieceFc2Cp( nAttrStart, nAttrEnd, &rSBase ); bLineEnd = (ePLCF == PAP); } diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx index 613649e7800d..02ebf3bc19cf 100644 --- a/sw/source/filter/ww8/ww8scan.hxx +++ b/sw/source/filter/ww8/ww8scan.hxx @@ -456,7 +456,7 @@ public: virtual void advance() SAL_OVERRIDE; WW8_CP AktPieceStartFc2Cp( WW8_FC nStartPos ); WW8_FC AktPieceStartCp2Fc( WW8_CP nCp ); - void AktPieceFc2Cp(WW8_CP& rStartPos, WW8_CP& rEndPos, + static void AktPieceFc2Cp(WW8_CP& rStartPos, WW8_CP& rEndPos, const WW8ScannerBase *pSBase); WW8PLCFpcd_Iter* GetPLCFIter() { return pPcdI; } void SetClipStart(WW8_CP nIn) { nClipStart = nIn; } @@ -902,7 +902,7 @@ private: sal_uInt16 WhereIdx(bool* pbStart=0, long* pPos=0) const; void AdjustEnds(WW8PLCFxDesc& rDesc); void GetNewSprms(WW8PLCFxDesc& rDesc); - void GetNewNoSprms(WW8PLCFxDesc& rDesc); + static void GetNewNoSprms(WW8PLCFxDesc& rDesc); void GetSprmStart(short nIdx, WW8PLCFManResult* pRes) const; void GetSprmEnd(short nIdx, WW8PLCFManResult* pRes) const; void GetNoSprmStart(short nIdx, WW8PLCFManResult* pRes) const; diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx index 973148a4095d..72517d141a4c 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx @@ -133,7 +133,7 @@ public: private: - inline bool IsReady(RedlineInfo* pRedline); + static inline bool IsReady(RedlineInfo* pRedline); void InsertIntoDocument(RedlineInfo* pRedline); diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx index 2ec718bb533f..c24f8d3471e5 100644 --- a/sw/source/filter/xml/wrtxml.hxx +++ b/sw/source/filter/xml/wrtxml.hxx @@ -76,7 +76,7 @@ private: // write a single output stream // (to be called either directly or by WriteThroughComponent(...)) - bool WriteThroughComponent( + static bool WriteThroughComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream> & xOutputStream, const ::com::sun::star::uno::Reference< diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 2e58b38ebb98..f842d5a75992 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -332,7 +332,7 @@ void SvXMLExportItemMapper::handleNoItem( SvXMLAttributeList& /*rAttrList*/, const SvXMLItemMapEntry& /*rEntry*/, const SvXMLUnitConverter& /*rUnitConverter*/, const SvXMLNamespaceMap& /*rNamespaceMap*/, - const SfxItemSet& /*rSet*/ ) const + const SfxItemSet& /*rSet*/ ) { OSL_FAIL( "no item not handled in xml export" ); } diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx index 93492c6f7dcb..16205d5c2dd3 100644 --- a/sw/source/filter/xml/xmlexpit.hxx +++ b/sw/source/filter/xml/xmlexpit.hxx @@ -86,11 +86,11 @@ public: /** this method is called for every item that has the MID_SW_FLAG_NO_ITEM_EXPORT flag set */ - void handleNoItem( SvXMLAttributeList& rAttrList, + static void handleNoItem( SvXMLAttributeList& rAttrList, const SvXMLItemMapEntry& rEntry, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, - const SfxItemSet& rSet ) const; + const SfxItemSet& rSet ); /** this method is called for every item that has the MID_SW_FLAG_ELEMENT_EXPORT flag set */ diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx index eb3307f086b1..614ba83ea162 100644 --- a/sw/source/filter/xml/xmliteme.cxx +++ b/sw/source/filter/xml/xmliteme.cxx @@ -57,10 +57,10 @@ protected: sal_uInt32 nAbsWidth; - void AddAttribute( sal_uInt16 nPrefix, enum XMLTokenEnum eLName, + static void AddAttribute( sal_uInt16 nPrefix, enum XMLTokenEnum eLName, const OUString& rValue, const SvXMLNamespaceMap& rNamespaceMap, - SvXMLAttributeList& rAttrList ) const; + SvXMLAttributeList& rAttrList ); public: @@ -105,7 +105,7 @@ void SwXMLTableItemMapper_Impl::AddAttribute( sal_uInt16 nPrefix, enum XMLTokenEnum eLName, const OUString& rValue, const SvXMLNamespaceMap& rNamespaceMap, - SvXMLAttributeList& rAttrList ) const + SvXMLAttributeList& rAttrList ) { OUString sName( rNamespaceMap.GetQNameByKey( nPrefix, GetXMLToken(eLName) ) ); diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 4b7d506a5af2..0fb0538b8520 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -66,7 +66,7 @@ enum SvEmbeddedObjectTypes }; SwNoTxtNode *SwXMLTextParagraphExport::GetNoTxtNode( - const Reference < XPropertySet >& rPropSet ) const + const Reference < XPropertySet >& rPropSet ) { Reference<XUnoTunnel> xCrsrTunnel( rPropSet, UNO_QUERY ); assert(xCrsrTunnel.is() && "missing XUnoTunnel for embedded"); diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx index 17f45d966113..98fe1fbf47cb 100644 --- a/sw/source/filter/xml/xmltexte.hxx +++ b/sw/source/filter/xml/xmltexte.hxx @@ -41,9 +41,9 @@ class SwXMLTextParagraphExport : public XMLTextParagraphExport const SvGlobalName aIFrameClassId; const SvGlobalName aOutplaceClassId; - SwNoTxtNode *GetNoTxtNode( + static SwNoTxtNode *GetNoTxtNode( const ::com::sun::star::uno::Reference < - ::com::sun::star::beans::XPropertySet >& rPropSet ) const; + ::com::sun::star::beans::XPropertySet >& rPropSet ); protected: virtual void exportStyleContent( diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 7a053dadc51b..774fcada0506 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -96,7 +96,7 @@ class SwDropCapsPict : public Control Size CalcTextSize(); inline void InitPrinter(); void _InitPrinter(); - void GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _rFont, sal_uInt16 _nWhich ); + static void GetFontSettings( const SwDropCapsPage& _rPage, vcl::Font& _rFont, sal_uInt16 _nWhich ); void GetFirstScriptSegment(sal_Int32 &start, sal_Int32 &end, sal_uInt16 &scriptType); bool GetNextScriptSegment(size_t &nIdx, sal_Int32 &start, sal_Int32 &end, sal_uInt16 &scriptType); diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index ff483c39a3c4..636ba4babb56 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -299,7 +299,7 @@ SwMailMergeDlg::SwMailMergeDlg(vcl::Window* pParent, SwWrtShell& rShell, SwDBManager* pDBManager = rSh.GetDBManager(); if(_xConnection.is()) - pDBManager->GetColumnNames(m_pAddressFldLB, _xConnection, rTblName); + SwDBManager::GetColumnNames(m_pAddressFldLB, _xConnection, rTblName); else pDBManager->GetColumnNames(m_pAddressFldLB, rSourceName, rTblName); for(sal_Int32 nEntry = 0; nEntry < m_pAddressFldLB->GetEntryCount(); ++nEntry) diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index edde37524594..be5e04189987 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -108,7 +108,7 @@ void SwFldDBPage::Reset(const SfxItemSet*) if (!IsFldEdit()) { // initialise TypeListBox - const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i) { diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index c7d3761069c2..4a54d14bc10c 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -109,7 +109,7 @@ void SwFldDokPage::Reset(const SfxItemSet* ) Init(); // general initialisation // initialise TypeListBox - const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); m_pTypeLB->SetUpdateMode(false); m_pTypeLB->Clear(); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index dc0be5131705..17e805442d54 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -107,7 +107,7 @@ SwFldEditDlg::SwFldEditDlg(SwView& rVw) EnsureSelection(pCurFld, aMgr); - sal_uInt16 nGroup = aMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); + sal_uInt16 nGroup = SwFldMgr::GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); CreatePage(nGroup); @@ -284,7 +284,7 @@ IMPL_LINK( SwFldEditDlg, NextPrevHdl, Button *, pButton ) EnsureSelection(pCurFld, rMgr); - sal_uInt16 nGroup = rMgr.GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); + sal_uInt16 nGroup = SwFldMgr::GetGroup(false, pCurFld->GetTypeId(), pCurFld->GetSubType()); if (nGroup != pTabPage->GetGroup()) pTabPage = static_cast<SwFldPage*>(CreatePage(nGroup).get()); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 967ce6d8a7b5..1be9660cbb3c 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -137,7 +137,7 @@ void SwFldFuncPage::Reset(const SfxItemSet* ) if (!IsFldEdit()) { // initialise TypeListBox - const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); // fill Typ-Listbox for(sal_uInt16 i = rRg.nStart; i < rRg.nEnd; ++i) diff --git a/sw/source/ui/fldui/fldfunc.hxx b/sw/source/ui/fldui/fldfunc.hxx index fefc9db21ac4..01963e2ed2be 100644 --- a/sw/source/ui/fldui/fldfunc.hxx +++ b/sw/source/ui/fldui/fldfunc.hxx @@ -77,7 +77,7 @@ class SwFldFuncPage : public SwFldPage DECL_LINK( MacroHdl, Button * ); void UpdateSubType(); - OUString TurnMacroString(const OUString &rMacro); + static OUString TurnMacroString(const OUString &rMacro); protected: virtual sal_uInt16 GetGroup() SAL_OVERRIDE; diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index f704afcf1bd3..e03f5db0d3b3 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -176,7 +176,7 @@ void SwFldRefPage::Reset(const SfxItemSet* ) sal_Int32 nPos; // set/insert reference - const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); for (short i = rRg.nStart; i < rRg.nEnd; ++i) { diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 27c60f81e1f9..f4b783cc2ae6 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -126,7 +126,7 @@ void SwFldVarPage::Reset(const SfxItemSet* ) if (!IsFldEdit()) { // initialise TypeListBox - const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); + const SwFldGroupRgn& rRg = SwFldMgr::GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); for (short i = rRg.nStart; i < rRg.nEnd; ++i) { diff --git a/sw/source/ui/vba/vbaparagraphformat.hxx b/sw/source/ui/vba/vbaparagraphformat.hxx index 3911e05ad967..eb799f7810f8 100644 --- a/sw/source/ui/vba/vbaparagraphformat.hxx +++ b/sw/source/ui/vba/vbaparagraphformat.hxx @@ -34,13 +34,13 @@ private: css::uno::Reference< css::beans::XPropertySet > mxParaProps; private: - css::style::LineSpacing getOOoLineSpacing( float _lineSpace, sal_Int16 mode ); + static css::style::LineSpacing getOOoLineSpacing( float _lineSpace, sal_Int16 mode ); css::style::LineSpacing getOOoLineSpacingFromRule( sal_Int32 _linespacingrule ); - float getMSWordLineSpacing( css::style::LineSpacing& rLineSpacing ); - sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing& rLineSpacing ); + static float getMSWordLineSpacing( css::style::LineSpacing& rLineSpacing ); + static sal_Int32 getMSWordLineSpacingRule( css::style::LineSpacing& rLineSpacing ); sal_Int16 getCharHeight() throw (css::uno::RuntimeException); - sal_Int32 getOOoAlignment( sal_Int32 _alignment ); - sal_Int32 getMSWordAlignment( sal_Int32 _alignment ); + static sal_Int32 getOOoAlignment( sal_Int32 _alignment ); + static sal_Int32 getMSWordAlignment( sal_Int32 _alignment ); public: SwVbaParagraphFormat( const css::uno::Reference< ooo::vba::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< css::text::XTextDocument >& rTextDocument, const css::uno::Reference< css::beans::XPropertySet >& rParaProps ); diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 04d49b20c7a8..bb174d1ede0b 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -166,7 +166,7 @@ void SwVbaTableHelper::InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, pTable->GetTabCols( rCols, pStart, false, false ); } -sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols& rCols ) const +sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols& rCols ) { sal_Int32 nCount = 0; for( size_t i = 0; i < rCols.Count(); ++i ) @@ -175,7 +175,7 @@ sal_Int32 SwVbaTableHelper::GetColCount( SwTabCols& rCols ) const return rCols.Count() - nCount; } -sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const +sal_Int32 SwVbaTableHelper::GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) { OSL_ENSURE( nNum < GetColCount( rCols ) ,"Index out of range"); sal_Int32 i = 0; diff --git a/sw/source/ui/vba/vbatablehelper.hxx b/sw/source/ui/vba/vbatablehelper.hxx index e5b31fb9e4f2..ecc02382e664 100644 --- a/sw/source/ui/vba/vbatablehelper.hxx +++ b/sw/source/ui/vba/vbatablehelper.hxx @@ -33,9 +33,9 @@ private: private: SwTableBox* GetTabBox( sal_Int32 nCol, sal_Int32 nRow ) throw (css::uno::RuntimeException); void InitTabCols( SwTabCols& rCols, const SwTableBox *pStart, bool bCurRowOnly = false ); - sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum) const; - sal_Int32 GetColCount( SwTabCols& rCols ) const; - sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException); + static sal_Int32 GetRightSeparator( SwTabCols& rCols, sal_Int32 nNum); + static sal_Int32 GetColCount( SwTabCols& rCols ); + static sal_Int32 GetColWidth( SwTabCols& rCols, sal_Int32 nNum ) throw (css::uno::RuntimeException); public: SwVbaTableHelper( const css::uno::Reference< css::text::XTextTable >& xTextTable ) throw (css::uno::RuntimeException); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 880ed86cf4c4..cddd9ae40565 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -831,7 +831,7 @@ void SwDocShell::Execute(SfxRequest& rReq) break; case SID_SPELLCHECKER_CHANGED: //! false, true, true is on the save side but a probably overdone - SW_MOD()->CheckSpellChanges(false, true, true, false ); + SwModule::CheckSpellChanges(false, true, true, false ); break; case SID_MAIL_PREPAREEXPORT: diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 549cd54cbf73..2f5802cb1dc4 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -2049,7 +2049,7 @@ bool SwDocStyleSheet::IsUsed() const case SFX_STYLE_FAMILY_PAGE : pMod = pDesc; break; case SFX_STYLE_FAMILY_PSEUDO: - return pNumRule && rDoc.IsUsed( *pNumRule ); + return pNumRule && SwDoc::IsUsed( *pNumRule ); default: OSL_ENSURE(false, "unknown style family"); @@ -2896,7 +2896,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !rRule.IsHidden( ) ) continue; - bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) ); + bool bUsed = bIsSearchUsed && ( bOrganizer || SwDoc::IsUsed(rRule) ); if( !bUsed ) { if( ( !bSearchHidden && rRule.IsHidden() ) || @@ -3006,7 +3006,7 @@ void SwStyleSheetIterator::AppendStyleList(const ::std::vector<OUString>& rList, case nsSwGetPoolIdFromName::GET_POOLID_NUMRULE: { SwNumRule* pRule = rDoc.FindNumRulePtr( rList[i] ); - bUsed = pRule && rDoc.IsUsed( *pRule ); + bUsed = pRule && SwDoc::IsUsed( *pRule ); bHidden = pRule && pRule->IsHidden( ); } break; diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx index 852751667581..1418abee8cb2 100644 --- a/sw/source/uibase/config/viewopt.cxx +++ b/sw/source/uibase/config/viewopt.cxx @@ -99,7 +99,7 @@ bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const } void SwViewOption::DrawRect( OutputDevice *pOut, - const SwRect &rRect, long nCol ) const + const SwRect &rRect, long nCol ) { if ( pOut->GetOutDevType() != OUTDEV_PRINTER ) { @@ -114,7 +114,7 @@ void SwViewOption::DrawRect( OutputDevice *pOut, } void SwViewOption::DrawRectPrinter( OutputDevice *pOut, - const SwRect &rRect ) const + const SwRect &rRect ) { Color aOldColor(pOut->GetLineColor()); Color aOldFillColor( pOut->GetFillColor() ); @@ -125,13 +125,13 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut, pOut->SetLineColor( aOldColor ); } -sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const +sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) { assert(pOut && "no Outdev"); return sal_uInt16(pOut->GetTextWidth( OUString(aPostItStr ))); } -void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool bIsScript ) const +void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, bool bIsScript ) { if( pOut && bIsScript ) { @@ -303,7 +303,7 @@ void SwViewOption::Init( vcl::Window *pWin ) } } -bool SwViewOption::IsAutoCompleteWords() const +bool SwViewOption::IsAutoCompleteWords() { const SvxSwAutoFmtFlags& rFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); return rFlags.bAutoCmpltCollectWords; diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 461c68cf6d28..c8218c52981b 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -149,7 +149,7 @@ class SwMailMergeConfigItem_Impl : public utl::ConfigItem bool bIsGreetingLineInMail_LastUserSetting; bool bIsGreetingLine_LastUserSetting; - const Sequence< OUString>& GetPropertyNames(); + static const Sequence< OUString>& GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index b467db4483c1..c829ad5107cf 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -187,7 +187,7 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck) { // first set continuation point for spell/grammar check to the // end of the current sentence - pWrtShell->MoveContinuationPosToEndOfCheckedSentence(); + SwEditShell::MoveContinuationPosToEndOfCheckedSentence(); } ShellModes eSelMode = pWrtShell->GetView().GetShellMode(); @@ -452,7 +452,7 @@ void SwSpellDialogChildWindow::ApplyChangedSentence(const svx::SpellPortions& rC // evaluate if the same sentence should be rechecked or not. // Sentences that got grammar checked should always be rechecked in order // to detect possible errors that get introduced with the changes - bRecheck |= pWrtShell->HasLastSentenceGotGrammarChecked(); + bRecheck |= SwEditShell::HasLastSentenceGotGrammarChecked(); if(bNormalText) pWrtShell->ApplyChangedSentence(rChanged, bRecheck); @@ -507,7 +507,7 @@ void SwSpellDialogChildWindow::SetGrammarChecking(bool bOn) SHELL_MODE_TABLE_LIST_TEXT == eSelMode || SHELL_MODE_TEXT == eSelMode; if( bNormalText ) - pWrtShell->PutSpellingToSentenceStart(); + SwEditShell::PutSpellingToSentenceStart(); else if( bDrawText ) { SdrView* pSdrView = pWrtShell->GetDrawView(); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index fbb6e061f209..4a8d91b7e401 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -715,7 +715,7 @@ void SwEditWin::StopInsFrm() m_nInsFrmColCount = 1; } -bool SwEditWin::IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ) const +bool SwEditWin::IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ) { const SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); if ( !rCTLOptions.IsCTLFontEnabled() || @@ -2967,7 +2967,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) rBind.Update(); if ( RulerMarginDrag( rMEvt, - rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPos ) ) ) + SwFEShell::IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPos ) ) ) { m_rView.SetNumRuleNodeFromDoc( NULL ); m_rView.InvalidateRulerPos(); @@ -3847,7 +3847,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // i#42921 - consider vertical mode SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt ); const sal_uInt16 nPointer = - rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt ) + SwFEShell::IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt ) ? POINTER_VSIZEBAR : POINTER_HSIZEBAR; SetPointer( nPointer ); diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index 7d4420a0d025..1be211b95fa4 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -318,7 +318,7 @@ SwField* SwFldMgr::GetCurFld() } // provide group range -const SwFldGroupRgn& SwFldMgr::GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId) const +const SwFldGroupRgn& SwFldMgr::GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId) { static SwFldGroupRgn const aRanges[] = { @@ -346,7 +346,7 @@ static SwFldGroupRgn const aWebRanges[] = } // determine GroupId -sal_uInt16 SwFldMgr::GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType) const +sal_uInt16 SwFldMgr::GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType) { if (nTypeId == TYP_SETINPFLD) nTypeId = TYP_SETFLD; @@ -1044,7 +1044,7 @@ bool SwFldMgr::InsertFld( rData.aDBColumn >>= xColumn; if(xColumn.is()) { - nFormatId = pCurShell->GetDBManager()->GetColumnFmt(xSource, xConnection, xColumn, + nFormatId = SwDBManager::GetColumnFmt(xSource, xConnection, xColumn, pCurShell->GetNumberFormatter(), GetCurrLanguage() ); } else diff --git a/sw/source/uibase/inc/annotsh.hxx b/sw/source/uibase/inc/annotsh.hxx index 8b3bea7cbb98..e66a632fc09b 100644 --- a/sw/source/uibase/inc/annotsh.hxx +++ b/sw/source/uibase/inc/annotsh.hxx @@ -42,7 +42,7 @@ public: SwAnnotationShell(SwView&); virtual ~SwAnnotationShell(); - void StateDisableItems(SfxItemSet &); + static void StateDisableItems(SfxItemSet &); void Exec(SfxRequest &); void GetState(SfxItemSet &); @@ -58,17 +58,17 @@ public: void StateClpbrd(SfxItemSet &rSet); void ExecTransliteration(SfxRequest &); - void ExecRotateTransliteration(SfxRequest &); + void ExecRotateTransliteration(SfxRequest &); void ExecUndo(SfxRequest &rReq); void StateUndo(SfxItemSet &rSet); - void StateStatusLine(SfxItemSet &rSet); + static void StateStatusLine(SfxItemSet &rSet); void InsertSymbol(SfxRequest& rReq); void ExecSearch(SfxRequest&, bool bNoMessage = false); - void StateSearch(SfxItemSet &); + void StateSearch(SfxItemSet &); virtual ::svl::IUndoManager* GetUndoManager() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/barcfg.hxx b/sw/source/uibase/inc/barcfg.hxx index cdb0897959c6..50b561f9576e 100644 --- a/sw/source/uibase/inc/barcfg.hxx +++ b/sw/source/uibase/inc/barcfg.hxx @@ -24,7 +24,7 @@ class SwToolbarConfigItem : public utl::ConfigItem { sal_Int32 aTbxIdArray[5]; - com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + static com::sun::star::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/basesh.hxx b/sw/source/uibase/inc/basesh.hxx index 68b4db11f84d..5636e0796f58 100644 --- a/sw/source/uibase/inc/basesh.hxx +++ b/sw/source/uibase/inc/basesh.hxx @@ -103,7 +103,7 @@ public: void ExecBckCol(SfxRequest& rReq); void SetWrapMode( sal_uInt16 nSlot ); - void StateDisableItems(SfxItemSet &); + static void StateDisableItems(SfxItemSet &); void EditRegionDialog(SfxRequest& rReq); void InsertRegionDialog(SfxRequest& rReq); diff --git a/sw/source/uibase/inc/content.hxx b/sw/source/uibase/inc/content.hxx index 73ebf0167287..402999701dfd 100644 --- a/sw/source/uibase/inc/content.hxx +++ b/sw/source/uibase/inc/content.hxx @@ -162,7 +162,7 @@ class SwContentType : public SwTypeNumber bool bEdit: 1; // can this type be edited? bool bDelete: 1; // can this type be deleted? protected: - OUString RemoveNewline(const OUString&); + static OUString RemoveNewline(const OUString&); public: SwContentType(SwWrtShell* pParent, sal_uInt16 nType, sal_uInt8 nLevel ); virtual ~SwContentType(); diff --git a/sw/source/uibase/inc/drwtxtsh.hxx b/sw/source/uibase/inc/drwtxtsh.hxx index 1431992ba258..b8656bdec8c4 100644 --- a/sw/source/uibase/inc/drwtxtsh.hxx +++ b/sw/source/uibase/inc/drwtxtsh.hxx @@ -56,7 +56,7 @@ public: virtual ::svl::IUndoManager* GetUndoManager() SAL_OVERRIDE; - void StateDisableItems(SfxItemSet &); + static void StateDisableItems(SfxItemSet &); void Execute(SfxRequest &); void ExecDraw(SfxRequest &); diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 3bdf785cf1b3..aa9e84873dfd 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -76,7 +76,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, /* * timer and handler for scrolling on when the mousepointer - * stopps outside of EditWin during a drag-operation. + * stops outside of EditWin during a drag-operation. * The selection is increased towards the mouse position * regularly. */ @@ -243,7 +243,7 @@ public: bool IsChainMode() const { return m_bChainMode; } void FlushInBuffer(); - bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ) const; + static bool IsInputSequenceCheckingRequired( const OUString &rText, const SwPaM& rCrsr ); void SetApplyTemplate(const SwApplyTemplate &); SwApplyTemplate* GetApplyTemplate() const { return m_pApplyTempl; } @@ -253,13 +253,13 @@ public: sal_uInt16 GetDropAction() const { return m_nDropAction; } SotClipboardFormatId GetDropFormat() const { return m_nDropFormat; } - Color GetTextColor() { return m_aTextColor; } + static Color GetTextColor() { return m_aTextColor; } - void SetTextColor(const Color& rCol ) { m_aTextColor = rCol; } + static void SetTextColor(const Color& rCol ) { m_aTextColor = rCol; } - Color GetTextBackColor() + static Color GetTextBackColor() { return m_aTextBackColor; } - void SetTextBackColor(const Color& rCol ) + static void SetTextBackColor(const Color& rCol ) { m_aTextBackColor = rCol; } void LockKeyInput(bool bSet){m_bLockInput = bSet;} diff --git a/sw/source/uibase/inc/envimg.hxx b/sw/source/uibase/inc/envimg.hxx index fd9a04f76d53..fc836b635871 100644 --- a/sw/source/uibase/inc/envimg.hxx +++ b/sw/source/uibase/inc/envimg.hxx @@ -72,7 +72,7 @@ class SwEnvCfgItem : public utl::ConfigItem private: SwEnvItem aEnvItem; - com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + static com::sun::star::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index 57cfeda448c8..24b1d1606799 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -173,8 +173,8 @@ public: // access via TypeId from the dialog // Ids for a range of fields - const SwFldGroupRgn& GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId) const; - sal_uInt16 GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0) const; + static const SwFldGroupRgn& GetGroupRange(bool bHtmlMode, sal_uInt16 nGrpId); + static sal_uInt16 GetGroup(bool bHtmlMode, sal_uInt16 nTypeId, sal_uInt16 nSubType = 0); // the current field's TypeId sal_uInt16 GetCurTypeId() const; diff --git a/sw/source/uibase/inc/formatclipboard.hxx b/sw/source/uibase/inc/formatclipboard.hxx index 87713da2e5e9..9e1d6b589e6a 100644 --- a/sw/source/uibase/inc/formatclipboard.hxx +++ b/sw/source/uibase/inc/formatclipboard.hxx @@ -38,7 +38,7 @@ public: */ bool HasContent() const; bool HasContentForThisType( int nSelectionType ) const; - bool CanCopyThisType( int nSelectionType ) const; + static bool CanCopyThisType( int nSelectionType ); /** * Store/Backup the text and paragraph attribute of the current selection. diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 88498685c99e..095966548883 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -165,8 +165,8 @@ class SwFrmPage: public SfxTabPage ListBox& _rLB, FixedText& _rFT ); sal_Int32 GetMapPos( const FrmMap *pMap, ListBox &rAlignLB ); - sal_Int16 GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); - sal_Int16 GetRelation(FrmMap *pMap, ListBox &rRelationLB); + static sal_Int16 GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, ListBox &rAlignLB, ListBox &rRelationLB); + static sal_Int16 GetRelation(FrmMap *pMap, ListBox &rRelationLB); RndStdIds GetAnchor(); void setOptimalFrmWidth(); diff --git a/sw/source/uibase/inc/gloslst.hxx b/sw/source/uibase/inc/gloslst.hxx index ed9e2a6a56d8..729b917f4c70 100644 --- a/sw/source/uibase/inc/gloslst.hxx +++ b/sw/source/uibase/inc/gloslst.hxx @@ -52,7 +52,7 @@ class SwGlossaryList : public AutoTimer bool bFilled; AutoTextGroup* FindGroup(const OUString& rGroupName); - void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss); + static void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss); public: SwGlossaryList(); diff --git a/sw/source/uibase/inc/navicfg.hxx b/sw/source/uibase/inc/navicfg.hxx index 06a3c4e45c54..33576e803ffe 100644 --- a/sw/source/uibase/inc/navicfg.hxx +++ b/sw/source/uibase/inc/navicfg.hxx @@ -31,7 +31,7 @@ class SwNavigationConfig : public utl::ConfigItem bool bIsSmall; //ShowListBox bool bIsGlobalActive; //GlobalDocMode// global view for GlobalDoc valid? - com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + static com::sun::star::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx index a5fe54a69458..033d12db3236 100644 --- a/sw/source/uibase/inc/numpara.hxx +++ b/sw/source/uibase/inc/numpara.hxx @@ -63,7 +63,7 @@ class SwParagraphNumTabPage : public SfxTabPage protected: void aCountParaFL(); - bool ExecuteEditNumStyle_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr, + static bool ExecuteEditNumStyle_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr, sal_uInt16 nFamily, sal_uInt16 nMask = 0, const sal_uInt16* pModifier = NULL ); diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index cec3199f3beb..d68e22140b1d 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -60,7 +60,7 @@ class SW_DLLPUBLIC SwSpellPopup : public PopupMenu Image m_aInfo16; - void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart, + static void fillLangPopupMenu( PopupMenu *pPopupMenu, sal_uInt16 nLangStart, const ::com::sun::star::uno::Sequence< OUString >& aSeq, SwWrtShell* pWrtSh, std::map< sal_Int16, OUString > &rLangTable ); diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx index fa8901d40d0e..2cb229a1c5de 100644 --- a/sw/source/uibase/inc/optpage.hxx +++ b/sw/source/uibase/inc/optpage.hxx @@ -355,7 +355,7 @@ class SwRedlineOptionsTabPage : public SfxTabPage DECL_LINK(ChangedMaskPrevHdl, void * = 0); DECL_LINK( ColorHdl, ColorListBox *pColorLB ); - void InitFontStyle(SvxFontPrevWindow& rExampleWin); + static void InitFontStyle(SvxFontPrevWindow& rExampleWin); public: SwRedlineOptionsTabPage( vcl::Window* pParent, const SfxItemSet& rSet ); diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx index 8823b1d4099f..86aae8d5637c 100644 --- a/sw/source/uibase/inc/pggrid.hxx +++ b/sw/source/uibase/inc/pggrid.hxx @@ -69,7 +69,7 @@ class SwTextGridPage: public SfxTabPage void UpdatePageSize(const SfxItemSet& rSet); void PutGridItem(SfxItemSet& rSet); - void SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue ); + static void SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue ); DECL_LINK(GridTypeHdl, RadioButton*); DECL_LINK(CharorLineChangedHdl, SpinField*); diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index ae856e8e607a..e11c6970ed2d 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -261,7 +261,7 @@ public: // Handler void Execute(SfxRequest&); void GetState(SfxItemSet&); - void StateUndo(SfxItemSet&); + static void StateUndo(SfxItemSet&); SwDocShell* GetDocShell(); diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx index 1ae841dd097d..e3baf4647561 100644 --- a/sw/source/uibase/inc/usrpref.hxx +++ b/sw/source/uibase/inc/usrpref.hxx @@ -71,7 +71,7 @@ class SwGridConfig : public utl::ConfigItem private: SwMasterUsrPref& rParent; - com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + static com::sun::star::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; @@ -89,7 +89,7 @@ class SwCursorConfig : public utl::ConfigItem private: SwMasterUsrPref& rParent; - com::sun::star::uno::Sequence<OUString> GetPropertyNames(); + static com::sun::star::uno::Sequence<OUString> GetPropertyNames(); virtual void ImplCommit() SAL_OVERRIDE; diff --git a/sw/source/uibase/lingu/hyp.cxx b/sw/source/uibase/lingu/hyp.cxx index 1f1e2ffaf298..cdf801558f4a 100644 --- a/sw/source/uibase/lingu/hyp.cxx +++ b/sw/source/uibase/lingu/hyp.cxx @@ -111,7 +111,7 @@ bool SwHyphWrapper::SpellMore() void SwHyphWrapper::InsertHyphen( const sal_uInt16 nPos ) { if( nPos) - PSH->InsertSoftHyph( nPos + 1); // does nPos == 1 really mean + SwEditShell::InsertSoftHyph( nPos + 1); // does nPos == 1 really mean // insert hyphen after first char? // (instead of nPos == 0) else diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 5dd31fb7b31f..879b1b685cf4 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -725,7 +725,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) { SwPaM *pPaM = m_pSh->GetCrsr(); if (pPaM) - m_pSh->IgnoreGrammarErrorAt( *pPaM ); + SwEditShell::IgnoreGrammarErrorAt( *pPaM ); } else if (nId == MN_IGNORE_WORD) { @@ -739,7 +739,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) // refresh the layout of the actual paragraph (faster) SwPaM *pPaM = m_pSh->GetCrsr(); if (pPaM) - m_pSh->IgnoreGrammarErrorAt( *pPaM ); + SwEditShell::IgnoreGrammarErrorAt( *pPaM ); // refresh the layout of all paragraphs (workaround to launch a dictionary event) xDictionary->setActive(sal_False); xDictionary->setActive(sal_True); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 31bbd379c5e4..150325fa4eb2 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -195,8 +195,8 @@ void SwTextShell::ExecField(SfxRequest &rReq) { rSh.SttSelect(); rSh.SelectTxt( - rSh.StartOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) + 1, - rSh.EndOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 ); + SwCrsrShell::StartOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) + 1, + SwCrsrShell::EndOfInputFldAtPos( *(rSh.GetCrsr()->Start()) ) - 1 ); } else { diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index ac1e4537ba48..d6eebc62813f 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1148,7 +1148,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { Color aSet = static_cast<const SvxColorItem*>(pItem)->GetValue(); SwEditWin& rEditWin = GetView().GetEditWin(); - rEditWin.SetTextColor(aSet); + SwEditWin::SetTextColor(aSet); SwApplyTemplate* pApply = rEditWin.GetApplyTemplate(); // If there is a selection, then set the color on it @@ -1171,7 +1171,7 @@ void SwTextShell::Execute(SfxRequest &rReq) aSet = COL_TRANSPARENT; SwEditWin& rEdtWin = GetView().GetEditWin(); - rEdtWin.SetTextBackColor(aSet); + SwEditWin::SetTextBackColor(aSet); SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); if(!pApply && (rWrtSh.HasSelection() || rReq.IsAPI())) @@ -1220,9 +1220,9 @@ void SwTextShell::Execute(SfxRequest &rReq) // and reopened, its color resets, while SwEditWin still holds the old one. Color aSet = static_cast<const SvxColorItem*>(pItem)->GetValue(); if( nSlot == SID_ATTR_CHAR_COLOR_BACKGROUND_EXT ) - rEdtWin.SetTextBackColor(aSet); + SwEditWin::SetTextBackColor(aSet); else - rEdtWin.SetTextColor(aSet); + SwEditWin::SetTextColor(aSet); } SwApplyTemplate* pApply = rEdtWin.GetApplyTemplate(); @@ -1233,7 +1233,7 @@ void SwTextShell::Execute(SfxRequest &rReq) { rWrtSh.StartUndo( UNDO_INSATTR ); rWrtSh.SetAttrItem( - SvxBrushItem( rEdtWin.GetTextBackColor(), RES_CHRATR_BACKGROUND) ); + SvxBrushItem( SwEditWin::GetTextBackColor(), RES_CHRATR_BACKGROUND) ); // Remove MS specific highlight when background is set rWrtSh.SetAttrItem( SvxBrushItem(RES_CHRATR_HIGHLIGHT) ); @@ -1258,7 +1258,7 @@ void SwTextShell::Execute(SfxRequest &rReq) } else rWrtSh.SetAttrItem( - SvxColorItem( rEdtWin.GetTextColor(), RES_CHRATR_COLOR) ); + SvxColorItem( SwEditWin::GetTextColor(), RES_CHRATR_COLOR) ); } else { diff --git a/sw/source/uibase/uiview/formatclipboard.cxx b/sw/source/uibase/uiview/formatclipboard.cxx index 801e757030a9..2aaa3346dc1c 100644 --- a/sw/source/uibase/uiview/formatclipboard.cxx +++ b/sw/source/uibase/uiview/formatclipboard.cxx @@ -260,7 +260,7 @@ bool SwFormatClipboard::HasContentForThisType( int nSelectionType ) const return false; } -bool SwFormatClipboard::CanCopyThisType( int nSelectionType ) const +bool SwFormatClipboard::CanCopyThisType( int nSelectionType ) { if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF | nsSelectionType::SEL_TXT | nsSelectionType::SEL_DRW | nsSelectionType::SEL_TBL | nsSelectionType::SEL_TBL_CELLS ) ) diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index ab632ebf3d1d..085157fdf961 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -996,7 +996,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) if(xBeamerFrame.is()) { SwDBData aData = m_pWrtShell->GetDBData(); - SW_MOD()->ShowDBObj( *this, aData ); + SwModule::ShowDBObj( *this, aData ); } // has anybody calls the attrchanged handler in the constructor? diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 7379cf3dd6d2..46f4e5aa6d1c 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -570,7 +570,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) // The UsrPref must be marked as modified. // call for initialization pModule->GetUsrPref(bWebView); - pModule->CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false ); + SwModule::CheckSpellChanges( pOpt->IsOnlineSpell(), false, false, false ); } //OS: Set back modified again, because view/fields sets the Doc modified. if( !bModified ) diff --git a/sw/source/uibase/uiview/view1.cxx b/sw/source/uibase/uiview/view1.cxx index 9695e3690815..4081d58d0df4 100644 --- a/sw/source/uibase/uiview/view1.cxx +++ b/sw/source/uibase/uiview/view1.cxx @@ -176,7 +176,7 @@ void SwView::StateFormatPaintbrush(SfxItemSet &rSet) rSet.Put(SfxBoolItem(SID_FORMATPAINTBRUSH, bHasContent)); if(!bHasContent) { - if( !m_pFormatClipboard->CanCopyThisType( GetWrtShell().GetSelectionType() ) ) + if( !SwFormatClipboard::CanCopyThisType( GetWrtShell().GetSelectionType() ) ) rSet.DisableItem( SID_FORMATPAINTBRUSH ); } } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index ac264eca208d..efebf89a8534 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -1104,7 +1104,7 @@ void SwView::Execute(SfxRequest &rReq) if(pVFrame->HasChildWindow(SID_BROWSER)) { const SwDBData& rData = GetWrtShell().GetDBDesc(); - SW_MOD()->ShowDBObj(*this, rData, false); + SwModule::ShowDBObj(*this, rData, false); } } break; @@ -1322,19 +1322,19 @@ void SwView::StateStatusLine(SfxItemSet &rSet) OUString sCurrentSectionName = CurrSect->GetSectionName(); if(sCurrentSectionName != m_sOldSectionName) { - rShell.FireSectionChangeEvent(2, 1); + SwCrsrShell::FireSectionChangeEvent(2, 1); } m_sOldSectionName = sCurrentSectionName; } else if (!m_sOldSectionName.isEmpty()) { - rShell.FireSectionChangeEvent(2, 1); + SwCrsrShell::FireSectionChangeEvent(2, 1); m_sOldSectionName= OUString(); } //get column change event if(rShell.bColumnChange()) { - rShell.FireColumnChangeEvent(2, 1); + SwCrsrShell::FireColumnChangeEvent(2, 1); } while( nWhich ) @@ -1352,7 +1352,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) if (m_nOldPageNum != nLogPage ) { if (m_nOldPageNum != 0) - rShell.FirePageChangeEvent(m_nOldPageNum, nLogPage); + SwCrsrShell::FirePageChangeEvent(m_nOldPageNum, nLogPage); m_nOldPageNum = nLogPage; } const sal_uInt16 nCnt = GetWrtShell().GetPageCnt(); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index a39bdd5b2128..7193b042f2f1 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -228,7 +228,7 @@ void SwView::StartTextConversion( bool bIsInteractive ) { // do not do text conversion if it is active elsewhere - if (GetWrtShell().HasConvIter()) + if (SwEditShell::HasConvIter()) { return; } @@ -417,7 +417,7 @@ void SwView::HyphStart( SvxSpellArea eWhich ) void SwView::HyphenateDocument() { // do not hyphenate if interactive hyphenation is active elsewhere - if (GetWrtShell().HasHyphIter()) + if (SwEditShell::HasHyphIter()) { MessBox( 0, WB_OK, OUString( SW_RES( STR_HYPH_TITLE ) ), OUString( SW_RES( STR_MULT_INTERACT_HYPH_WARN ) ) ).Execute(); diff --git a/sw/source/uibase/uno/dlelstnr.cxx b/sw/source/uibase/uno/dlelstnr.cxx index 195ebae5edc6..be28c315f3e8 100644 --- a/sw/source/uibase/uno/dlelstnr.cxx +++ b/sw/source/uibase/uno/dlelstnr.cxx @@ -84,7 +84,7 @@ void SAL_CALL SwLinguServiceEventListener::processLinguServiceEvent( bIsSpellWrong = bIsSpellAll = true; // have all spelling and grammar checked... if (bIsSpellWrong || bIsSpellAll) { - SW_MOD()->CheckSpellChanges( false, bIsSpellWrong, bIsSpellAll, false ); + SwModule::CheckSpellChanges( false, bIsSpellWrong, bIsSpellAll, false ); } if (rLngSvcEvent.nEvent & HYPHENATE_AGAIN) { diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx index e97edd17881c..07f783ae3bbf 100644 --- a/sw/source/uibase/uno/unodispatch.cxx +++ b/sw/source/uibase/uno/unodispatch.cxx @@ -223,7 +223,7 @@ void SwXDispatch::dispatch(const util::URL& aURL, } else if(aURL.Complete.equalsAscii(cURLInsertColumns)) { - pDBManager->InsertText(rSh, aArgs); + SwDBManager::InsertText(rSh, aArgs); } else if(aURL.Complete.equalsAscii(cURLFormLetter)) { diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index da1a01efe78a..5812d728102e 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -620,7 +620,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(bVal); break; case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(bVal); break; case HANDLE_VIEWSET_TABLE_BOUNDARIES : SwViewOption::SetAppearanceFlag(VIEWOPT_TABLE_BOUNDARIES, bVal, true); break; - case HANDLE_VIEWSET_TEXT_BOUNDARIES : mpViewOption->SetDocBoundaries(bVal); break; + case HANDLE_VIEWSET_TEXT_BOUNDARIES : SwViewOption::SetDocBoundaries(bVal); break; case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(bVal); break; case HANDLE_VIEWSET_SHOW_CONTENT_TIPS : mpViewOption->SetShowContentTips(bVal); break; case HANDLE_VIEWSET_IS_RASTER_VISIBLE : mpViewOption->SetGridVisible(bVal); break; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 5c12fc645d8a..a83bbfca4ce0 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -2626,7 +2626,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false ); if (bPrintProspect) { - pDoc->CalculatePagePairsForProspectPrinting( *pViewShell->GetLayout(), *m_pRenderData, *m_pPrintUIOptions, nPageCount ); + SwDoc::CalculatePagePairsForProspectPrinting( *pViewShell->GetLayout(), *m_pRenderData, *m_pPrintUIOptions, nPageCount ); nRet = m_pRenderData->GetPagePairsForProspectPrinting().size(); } else @@ -2640,11 +2640,11 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // get set of valid document pages (according to the current settings) // and their start frames - pDoc->CalculatePagesForPrinting( *pViewShell->GetLayout(), *m_pRenderData, *m_pPrintUIOptions, bIsPDFExport, nPageCount ); + SwDoc::CalculatePagesForPrinting( *pViewShell->GetLayout(), *m_pRenderData, *m_pPrintUIOptions, bIsPDFExport, nPageCount ); if (nPostItMode != POSTITS_NONE) { - pDoc->UpdatePagesForPrintingWithPostItData( *m_pRenderData, + SwDoc::UpdatePagesForPrintingWithPostItData( *m_pRenderData, *m_pPrintUIOptions, bIsPDFExport, nPageCount ); } diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 8e817a0ab495..3a2820f18d1c 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -395,10 +395,7 @@ uno::Any SwXTextView::getSelection() uno::Reference< drawing::XDrawPageSupplier > xPageSupp; uno::Reference< frame::XModel > xModel = m_pView->GetDocShell()->GetBaseModel(); uno::Reference< lang::XUnoTunnel > xModelTunnel(xModel, uno::UNO_QUERY); - SwXTextDocument* pTextDoc = reinterpret_cast<SwXTextDocument*>(xModelTunnel-> - getSomething(SwXTextDocument::getUnoTunnelId())); - SwFmDrawPage* pSvxDrawPage = pTextDoc->GetDrawPage()->GetSvxPage(); uno::Reference< drawing::XShapes > xShCol = drawing::ShapeCollection::create( comphelper::getProcessComponentContext()); @@ -406,7 +403,7 @@ uno::Any SwXTextView::getSelection() for(size_t i = 0; i < rMarkList.GetMarkCount(); ++i) { SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); - uno::Reference< uno::XInterface > xInt = pSvxDrawPage->GetInterface( pObj ); + uno::Reference< uno::XInterface > xInt = SwFmDrawPage::GetInterface( pObj ); uno::Reference< drawing::XShape > xShape(xInt, uno::UNO_QUERY); xShCol->add(xShape); } @@ -542,10 +539,9 @@ Sequence< Sequence< PropertyValue > > SwXTextView::getRubyList( sal_Bool /*bAuto eSelMode != SHELL_MODE_TEXT ) return Sequence< Sequence< PropertyValue > > (); - SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); SwRubyList aList; - const sal_uInt16 nCount = pDoc->FillRubyList( *rSh.GetCrsr(), aList, 0 ); + const sal_uInt16 nCount = SwDoc::FillRubyList( *rSh.GetCrsr(), aList, 0 ); Sequence< Sequence< PropertyValue > > aRet(nCount); Sequence< PropertyValue >* pRet = aRet.getArray(); OUString aString; diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index d80c5097f7dd..f5a63c3dcab1 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1207,7 +1207,7 @@ PopupMenu* SwContentTree::CreateContextMenu() pSubPop4->InsertItem(403, aContextStrings[ST_EDIT_ENTRY - ST_CONTEXT_FIRST]); pSubPop4->InsertItem(405, sReadonlyIdx); - pSubPop4->CheckItem( 405, pActiveShell->IsTOXBaseReadonly(*pBase)); + pSubPop4->CheckItem( 405, SwEditShell::IsTOXBaseReadonly(*pBase)); pSubPop4->InsertItem(501, aContextStrings[ST_DELETE_ENTRY - ST_CONTEXT_FIRST]); } else if(CONTENT_TYPE_TABLE == nContentType && !bReadonly) @@ -2944,7 +2944,7 @@ void SwContentTree::ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry { const SwTOXBase* pBase = static_cast<SwTOXBaseContent*>(pFirst->GetUserData()) ->GetTOXBase(); - pActiveShell->SetTOXBaseReadonly(*pBase, !pActiveShell->IsTOXBaseReadonly(*pBase)); + pActiveShell->SetTOXBaseReadonly(*pBase, !SwEditShell::IsTOXBaseReadonly(*pBase)); } break; case 4: |