From 2c9f9832fc6ab78e12c67da3687b4482a46e4bcc Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 18 Feb 2013 07:54:37 +0100 Subject: [PATCH] SwDoc: rename member variables missing their prefix Change-Id: Id4683649aa9115f9075717768aa6cef4110c2ad2 --- sw/inc/doc.hxx | 286 ++++++++--------- sw/source/core/bastyp/init.cxx | 6 +- sw/source/core/doc/doc.cxx | 252 +++++++-------- sw/source/core/doc/docbasic.cxx | 10 +- sw/source/core/doc/docbm.cxx | 4 +- sw/source/core/doc/docchart.cxx | 12 +- sw/source/core/doc/doccorr.cxx | 8 +- sw/source/core/doc/docdde.cxx | 26 +- sw/source/core/doc/docdesc.cxx | 64 ++-- sw/source/core/doc/docdraw.cxx | 80 ++--- sw/source/core/doc/docedt.cxx | 20 +- sw/source/core/doc/docfld.cxx | 228 +++++++------- sw/source/core/doc/docfmt.cxx | 118 +++---- sw/source/core/doc/docftn.cxx | 8 +- sw/source/core/doc/docglbl.cxx | 10 +- sw/source/core/doc/doclay.cxx | 36 +-- sw/source/core/doc/docnew.cxx | 468 ++++++++++++++-------------- sw/source/core/doc/docnum.cxx | 74 ++--- sw/source/core/doc/docredln.cxx | 348 ++++++++++----------- sw/source/core/doc/docsort.cxx | 2 +- sw/source/core/doc/doctxm.cxx | 50 +-- sw/source/core/doc/docxforms.cxx | 14 +- sw/source/core/doc/extinput.cxx | 24 +- sw/source/core/doc/lineinfo.cxx | 8 +- sw/source/core/doc/poolfmt.cxx | 56 ++-- sw/source/core/doc/visiturl.cxx | 8 +- sw/source/core/docnode/ndsect.cxx | 26 +- sw/source/core/docnode/ndtbl.cxx | 18 +- sw/source/core/docnode/nodedump.cxx | 4 +- 29 files changed, 1134 insertions(+), 1134 deletions(-) diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index ccebf5c7985a..7f959455e798 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -275,81 +275,81 @@ class SW_DLLPUBLIC SwDoc : // ------------------------------------------------------------------- ::boost::scoped_ptr m_pNodes; ///< document content (Nodes Array) SwAttrPool* mpAttrPool; ///< the attribute pool - SwPageDescs aPageDescs; ///< PageDescriptors - Link aOle2Link; ///< OLE 2.0-notification + SwPageDescs maPageDescs; ///< PageDescriptors + Link maOle2Link; ///< OLE 2.0-notification /* @@@MAINTAINABILITY-HORROR@@@ Timer should not be members of the model */ - Timer aIdleTimer; ///< Own IdleTimer - Timer aOLEModifiedTimer; ///< Timer for update modified OLE-Objecs - Timer aStatsUpdateTimer; ///< Timer for asynchronous stats calculation - SwDBData aDBData; ///< database descriptor - ::com::sun::star::uno::Sequence aRedlinePasswd; - String sTOIAutoMarkURL; ///< ::com::sun::star::util::URL of table of index AutoMark file - boost::ptr_vector< boost::nullable > aPatternNms; // Array for names of document-templates + Timer maIdleTimer; ///< Own IdleTimer + Timer maOLEModifiedTimer; ///< Timer for update modified OLE-Objecs + Timer maStatsUpdateTimer; ///< Timer for asynchronous stats calculation + SwDBData maDBData; ///< database descriptor + ::com::sun::star::uno::Sequence maRedlinePasswd; + String msTOIAutoMarkURL; ///< ::com::sun::star::util::URL of table of index AutoMark file + boost::ptr_vector< boost::nullable > maPatternNms; // Array for names of document-templates com::sun::star::uno::Reference - xXForms; ///< container with XForms models + mxXForms; ///< container with XForms models mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator; - const ::boost::scoped_ptr< ::sw::mark::MarkManager> pMarkManager; + const ::boost::scoped_ptr< ::sw::mark::MarkManager> mpMarkManager; const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager; const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager; // ------------------------------------------------------------------- // Pointer - SwFrmFmt *pDfltFrmFmt; ///< Default formats. - SwFrmFmt *pEmptyPageFmt; ///< Format for the default empty page - SwFrmFmt *pColumnContFmt; ///< Format for column container - SwCharFmt *pDfltCharFmt; - SwTxtFmtColl *pDfltTxtFmtColl; ///< Defaultformatcollections - SwGrfFmtColl *pDfltGrfFmtColl; + SwFrmFmt *mpDfltFrmFmt; ///< Default formats. + SwFrmFmt *mpEmptyPageFmt; ///< Format for the default empty page + SwFrmFmt *mpColumnContFmt; ///< Format for column container + SwCharFmt *mpDfltCharFmt; + SwTxtFmtColl *mpDfltTxtFmtColl; ///< Defaultformatcollections + SwGrfFmtColl *mpDfltGrfFmtColl; - SwFrmFmts *pFrmFmtTbl; ///< Format table - SwCharFmts *pCharFmtTbl; - SwFrmFmts *pSpzFrmFmtTbl; - SwSectionFmts *pSectionFmtTbl; - SwFrmFmts *pTblFrmFmtTbl; ///< For tables - SwTxtFmtColls *pTxtFmtCollTbl; ///< FormatCollections - SwGrfFmtColls *pGrfFmtCollTbl; + SwFrmFmts *mpFrmFmtTbl; ///< Format table + SwCharFmts *mpCharFmtTbl; + SwFrmFmts *mpSpzFrmFmtTbl; + SwSectionFmts *mpSectionFmtTbl; + SwFrmFmts *mpTblFrmFmtTbl; ///< For tables + SwTxtFmtColls *mpTxtFmtCollTbl; ///< FormatCollections + SwGrfFmtColls *mpGrfFmtCollTbl; - SwTOXTypes *pTOXTypes; ///< Tables/indices - SwDefTOXBase_Impl * pDefTOXBases; ///< defaults of SwTOXBase's + SwTOXTypes *mpTOXTypes; ///< Tables/indices + SwDefTOXBase_Impl * mpDefTOXBases; ///< defaults of SwTOXBase's - ViewShell *pCurrentView; ///< SwDoc should get a new member pCurrentView//swmod 071225 - boost::shared_ptr pLayoutPtr; - SdrModel *pDrawModel; ///< StarView Drawing + ViewShell *mpCurrentView; ///< SwDoc should get a new member mpCurrentView//swmod 071225 + boost::shared_ptr mpLayoutPtr; + SdrModel *mpDrawModel; ///< StarView Drawing - SwDocUpdtFld *pUpdtFlds; ///< Struct for updating fields - SwFldTypes *pFldTypes; - SwNewDBMgr *pNewDBMgr; /**< Pointer to the new DBMgr for + SwDocUpdtFld *mpUpdtFlds; ///< Struct for updating fields + SwFldTypes *mpFldTypes; + SwNewDBMgr *mpNewDBMgr; /**< Pointer to the new DBMgr for evaluation of DB-fields. */ - VirtualDevice *pVirDev; ///< can be used for formatting - SfxPrinter *pPrt; ///< can be used for formatting - SwPrintData *pPrtData; ///< Print configuration + VirtualDevice *mpVirDev; ///< can be used for formatting + SfxPrinter *mpPrt; ///< can be used for formatting + SwPrintData *mpPrtData; ///< Print configuration - SwDoc *pGlossaryDoc; ///< Pointer to glossary-document. + SwDoc *mpGlossaryDoc; ///< Pointer to glossary-document. - SwNumRule *pOutlineRule; - SwFtnInfo *pFtnInfo; - SwEndNoteInfo *pEndNoteInfo; - SwLineNumberInfo*pLineNumberInfo; - SwFtnIdxs *pFtnIdxs; - SwDocStat *pDocStat; ///< Statistics information. + SwNumRule *mpOutlineRule; + SwFtnInfo *mpFtnInfo; + SwEndNoteInfo *mpEndNoteInfo; + SwLineNumberInfo*mpLineNumberInfo; + SwFtnIdxs *mpFtnIdxs; + SwDocStat *mpDocStat; ///< Statistics information. - SwDocShell *pDocShell; ///< Ptr to SfxDocShell of Doc. - SfxObjectShellLock xTmpDocShell; ///< A temporary shell that is used to copy OLE-Nodes + SwDocShell *mpDocShell; ///< Ptr to SfxDocShell of Doc. + SfxObjectShellLock mxTmpDocShell; ///< A temporary shell that is used to copy OLE-Nodes - sfx2::LinkManager *pLinkMgr; ///< List of linked stuff (graphics/DDE/OLE). + sfx2::LinkManager *mpLinkMgr; ///< List of linked stuff (graphics/DDE/OLE). - SwAutoCorrExceptWord *pACEWord; /**< For the automated takeover of + SwAutoCorrExceptWord *mpACEWord; /**< For the automated takeover of auto-corrected words that are "re-corrected". */ - SwURLStateChanged *pURLStateChgd; ///< SfxClient for changes in INetHistory - SvNumberFormatter *pNumberFormatter;///< NumFormatter for tables / fields + SwURLStateChanged *mpURLStateChgd; ///< SfxClient for changes in INetHistory + SvNumberFormatter *mpNumberFormatter;///< NumFormatter for tables / fields - mutable SwNumRuleTbl *pNumRuleTbl; ///< List of all named NumRules. + mutable SwNumRuleTbl *mpNumRuleTbl; ///< List of all named NumRules. /// Hash map to find numrules by name mutable boost::unordered_map maNumRuleMap; @@ -360,30 +360,30 @@ class SW_DLLPUBLIC SwDoc : /// relation between list style and its default list tHashMapForLists maListStyleLists; - SwRedlineTbl *pRedlineTbl; ///< List of all Redlines. - String *pAutoFmtRedlnComment; ///< Comment for Redlines inserted via AutoFormat. + SwRedlineTbl *mpRedlineTbl; ///< List of all Redlines. + String *mpAutoFmtRedlnComment; ///< Comment for Redlines inserted via AutoFormat. - SwUnoCrsrTbl *pUnoCrsrTbl; + SwUnoCrsrTbl *mpUnoCrsrTbl; - SwPagePreViewPrtData *pPgPViewPrtData; ///< Indenting / spacing for printing of page view. - SwPaM *pExtInputRing; + SwPagePreViewPrtData *mpPgPViewPrtData; ///< Indenting / spacing for printing of page view. + SwPaM *mpExtInputRing; - SwLayouter *pLayouter; /**< ::com::sun::star::frame::Controller for complex layout formatting + SwLayouter *mpLayouter; /**< ::com::sun::star::frame::Controller for complex layout formatting like footnote/endnote in sections */ - IStyleAccess *pStyleAccess; ///< handling of automatic styles - SwLayoutCache *pLayoutCache; /**< Layout cache to read and save with the + IStyleAccess *mpStyleAccess; ///< handling of automatic styles + SwLayoutCache *mpLayoutCache; /**< Layout cache to read and save with the document for a faster formatting */ - SwModify *pUnoCallBack; + SwModify *mpUnoCallBack; IGrammarContact *mpGrammarContact; ///< for grammar checking in paragraphs during editing mutable comphelper::ImplementationReference< SwChartDataProvider , ::com::sun::star::chart2::data::XDataProvider > - aChartDataProviderImplRef; - SwChartLockController_Helper *pChartControllerHelper; + maChartDataProviderImplRef; + SwChartLockController_Helper *mpChartControllerHelper; /// table of forbidden characters of this document - rtl::Reference xForbiddenCharsTable; + rtl::Reference mxForbiddenCharsTable; com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > mxVbaEvents; com::sun::star::uno::Reference m_xTemplateToProjectCache; public: @@ -402,35 +402,35 @@ private: // ------------------------------------------------------------------- // other - sal_uInt16 nUndoCnt; ///< Count of Undo Actions. - sal_uInt16 nUndoSttEnd; ///< != 0 -> within parentheses. + sal_uInt16 mnUndoCnt; ///< Count of Undo Actions. + sal_uInt16 mnUndoSttEnd; ///< != 0 -> within parentheses. - sal_uInt16 nAutoFmtRedlnCommentNo; /**< SeqNo for conjoining of AutoFmt-Redlines. + sal_uInt16 mnAutoFmtRedlnCommentNo; /**< SeqNo for conjoining of AutoFmt-Redlines. by the UI. Managed by SwAutoFmt! */ - sal_uInt16 nLinkUpdMode; ///< UpdateMode for links. - SwFldUpdateFlags eFldUpdMode;///< Automatically Update Mode for fields/charts. - RedlineMode_t eRedlineMode; ///< Current Redline Mode. - SwCharCompressType eChrCmprType;///< for ASIAN: compress punctuation/kana + sal_uInt16 mnLinkUpdMode; ///< UpdateMode for links. + SwFldUpdateFlags meFldUpdMode;///< Automatically Update Mode for fields/charts. + RedlineMode_t meRedlineMode; ///< Current Redline Mode. + SwCharCompressType meChrCmprType;///< for ASIAN: compress punctuation/kana - sal_uInt32 nRsid; ///< current session ID of the document - sal_uInt32 nRsidRoot; ///< session ID when the document was created + sal_uInt32 mnRsid; ///< current session ID of the document + sal_uInt32 mnRsidRoot; ///< session ID when the document was created sal_Int32 mReferenceCount; sal_Int32 mIdleBlockCount; - sal_Int8 nLockExpFld; ///< If != 0 UpdateExpFlds() has no effect! + sal_Int8 mnLockExpFld; ///< If != 0 UpdateExpFlds() has no effect! /** Draw Model Layer IDs * LayerIds, Heaven == above document * Hell == below document * Controls == at the very top */ - SdrLayerID nHeaven; - SdrLayerID nHell; - SdrLayerID nControls; - SdrLayerID nInvisibleHeaven; - SdrLayerID nInvisibleHell; - SdrLayerID nInvisibleControls; + SdrLayerID mnHeaven; + SdrLayerID mnHell; + SdrLayerID mnControls; + SdrLayerID mnInvisibleHeaven; + SdrLayerID mnInvisibleHell; + SdrLayerID mnInvisibleControls; bool mbGlossDoc : 1; ///< TRUE: glossary document. bool mbModified : 1; ///< TRUE: document has changed. @@ -583,8 +583,8 @@ private: bool mbLastBrowseMode : 1; - sal_uInt32 n32DummyCompatabilityOptions1; - sal_uInt32 n32DummyCompatabilityOptions2; + sal_uInt32 mn32DummyCompatabilityOptions1; + sal_uInt32 mn32DummyCompatabilityOptions2; // // COMPATIBILITY FLAGS END // @@ -593,7 +593,7 @@ private: bool mbSetDrawDefaults; ///< set draw pool defaults for freshly created documents - static SwAutoCompleteWord *pACmpltWords; ///< List of all words for AutoComplete + static SwAutoCompleteWord *mpACmpltWords; ///< List of all words for AutoComplete //---------------- private methods ------------------------------ void checkRedlining(RedlineMode_t& _rReadlineMode); @@ -1083,12 +1083,12 @@ public: /** Footnotes */ // Footnote information - const SwFtnInfo& GetFtnInfo() const { return *pFtnInfo; } + const SwFtnInfo& GetFtnInfo() const { return *mpFtnInfo; } void SetFtnInfo(const SwFtnInfo& rInfo); - const SwEndNoteInfo& GetEndNoteInfo() const { return *pEndNoteInfo; } + const SwEndNoteInfo& GetEndNoteInfo() const { return *mpEndNoteInfo; } void SetEndNoteInfo(const SwEndNoteInfo& rInfo); - SwFtnIdxs& GetFtnIdxs() { return *pFtnIdxs; } - const SwFtnIdxs& GetFtnIdxs() const { return *pFtnIdxs; } + SwFtnIdxs& GetFtnIdxs() { return *mpFtnIdxs; } + const SwFtnIdxs& GetFtnIdxs() const { return *mpFtnIdxs; } /// change footnotes in area bool SetCurFtn( const SwPaM& rPam, const String& rNumStr, sal_uInt16 nNumber, bool bIsEndNote ); @@ -1127,8 +1127,8 @@ public: /** Database and DB-Manager */ - void SetNewDBMgr( SwNewDBMgr* pNewMgr ) { pNewDBMgr = pNewMgr; } - SwNewDBMgr* GetNewDBMgr() const { return pNewDBMgr; } + void SetNewDBMgr( SwNewDBMgr* pNewMgr ) { mpNewDBMgr = pNewMgr; } + SwNewDBMgr* GetNewDBMgr() const { return mpNewDBMgr; } void ChangeDBFields( const std::vector& rOldNames, const String& rNewName ); void SetInitDBFields(sal_Bool b); @@ -1140,7 +1140,7 @@ public: void ChgDBData( const SwDBData& rNewData ); SwDBData GetDBData(); const SwDBData& GetDBDesc(); - const SwDBData& _GetDBDesc() const { return aDBData; } + const SwDBData& _GetDBDesc() const { return maDBData; } /** Some helper functions */ @@ -1190,25 +1190,25 @@ public: bool DontExpandFmt( const SwPosition& rPos, bool bFlag = true ); /* Formats */ - const SwFrmFmts* GetFrmFmts() const { return pFrmFmtTbl; } - SwFrmFmts* GetFrmFmts() { return pFrmFmtTbl; } - const SwCharFmts* GetCharFmts() const { return pCharFmtTbl;} + const SwFrmFmts* GetFrmFmts() const { return mpFrmFmtTbl; } + SwFrmFmts* GetFrmFmts() { return mpFrmFmtTbl; } + const SwCharFmts* GetCharFmts() const { return mpCharFmtTbl;} /** LayoutFormats (frames, DrawObjects), sometimes const sometimes not */ - const SwFrmFmts* GetSpzFrmFmts() const { return pSpzFrmFmtTbl; } - SwFrmFmts* GetSpzFrmFmts() { return pSpzFrmFmtTbl; } + const SwFrmFmts* GetSpzFrmFmts() const { return mpSpzFrmFmtTbl; } + SwFrmFmts* GetSpzFrmFmts() { return mpSpzFrmFmtTbl; } - const SwFrmFmt *GetDfltFrmFmt() const { return pDfltFrmFmt; } - SwFrmFmt *GetDfltFrmFmt() { return pDfltFrmFmt; } - const SwFrmFmt *GetEmptyPageFmt() const { return pEmptyPageFmt; } - SwFrmFmt *GetEmptyPageFmt() { return pEmptyPageFmt; } - const SwFrmFmt *GetColumnContFmt() const{ return pColumnContFmt; } - SwFrmFmt *GetColumnContFmt() { return pColumnContFmt; } - const SwCharFmt *GetDfltCharFmt() const { return pDfltCharFmt;} - SwCharFmt *GetDfltCharFmt() { return pDfltCharFmt;} + const SwFrmFmt *GetDfltFrmFmt() const { return mpDfltFrmFmt; } + SwFrmFmt *GetDfltFrmFmt() { return mpDfltFrmFmt; } + const SwFrmFmt *GetEmptyPageFmt() const { return mpEmptyPageFmt; } + SwFrmFmt *GetEmptyPageFmt() { return mpEmptyPageFmt; } + const SwFrmFmt *GetColumnContFmt() const{ return mpColumnContFmt; } + SwFrmFmt *GetColumnContFmt() { return mpColumnContFmt; } + const SwCharFmt *GetDfltCharFmt() const { return mpDfltCharFmt;} + SwCharFmt *GetDfltCharFmt() { return mpDfltCharFmt;} /// @return the interface of the management of (auto)styles - IStyleAccess& GetIStyleAccess() { return *pStyleAccess; } + IStyleAccess& GetIStyleAccess() { return *mpStyleAccess; } /// Remove all language dependencies from all existing formats void RemoveAllFmtLanguageDependencies(); @@ -1217,7 +1217,7 @@ public: bool bBroadcast = false, bool bAuto = true); void DelFrmFmt( SwFrmFmt *pFmt, bool bBroadcast = false ); SwFrmFmt* FindFrmFmtByName( const String& rName ) const - { return (SwFrmFmt*)FindFmtByName( (SwFmtsBase&)*pFrmFmtTbl, rName ); } + { return (SwFrmFmt*)FindFmtByName( (SwFmtsBase&)*mpFrmFmtTbl, rName ); } SwCharFmt *MakeCharFmt(const String &rFmtName, SwCharFmt *pDerivedFrom, bool bBroadcast = false, @@ -1225,12 +1225,12 @@ public: void DelCharFmt(sal_uInt16 nFmt, bool bBroadcast = false); void DelCharFmt(SwCharFmt* pFmt, bool bBroadcast = false); SwCharFmt* FindCharFmtByName( const String& rName ) const - { return (SwCharFmt*)FindFmtByName( (SwFmtsBase&)*pCharFmtTbl, rName ); } + { return (SwCharFmt*)FindFmtByName( (SwFmtsBase&)*mpCharFmtTbl, rName ); } /* Formatcollections (styles) */ // TXT - const SwTxtFmtColl* GetDfltTxtFmtColl() const { return pDfltTxtFmtColl; } - const SwTxtFmtColls *GetTxtFmtColls() const { return pTxtFmtCollTbl; } + const SwTxtFmtColl* GetDfltTxtFmtColl() const { return mpDfltTxtFmtColl; } + const SwTxtFmtColls *GetTxtFmtColls() const { return mpTxtFmtCollTbl; } SwTxtFmtColl *MakeTxtFmtColl( const String &rFmtName, SwTxtFmtColl *pDerivedFrom, bool bBroadcast = false, @@ -1251,20 +1251,20 @@ public: bool bReset = true, bool bResetListAttrs = false ); SwTxtFmtColl* FindTxtFmtCollByName( const String& rName ) const - { return (SwTxtFmtColl*)FindFmtByName( (SwFmtsBase&)*pTxtFmtCollTbl, rName ); } + { return (SwTxtFmtColl*)FindFmtByName( (SwFmtsBase&)*mpTxtFmtCollTbl, rName ); } void ChkCondColls(); - const SwGrfFmtColl* GetDfltGrfFmtColl() const { return pDfltGrfFmtColl; } - const SwGrfFmtColls *GetGrfFmtColls() const { return pGrfFmtCollTbl; } + const SwGrfFmtColl* GetDfltGrfFmtColl() const { return mpDfltGrfFmtColl; } + const SwGrfFmtColls *GetGrfFmtColls() const { return mpGrfFmtCollTbl; } SwGrfFmtColl *MakeGrfFmtColl(const String &rFmtName, SwGrfFmtColl *pDerivedFrom); SwGrfFmtColl* FindGrfFmtCollByName( const String& rName ) const - { return (SwGrfFmtColl*)FindFmtByName( (SwFmtsBase&)*pGrfFmtCollTbl, rName ); } + { return (SwGrfFmtColl*)FindFmtByName( (SwFmtsBase&)*mpGrfFmtCollTbl, rName ); } /// Table formating - const SwFrmFmts* GetTblFrmFmts() const { return pTblFrmFmtTbl; } - SwFrmFmts* GetTblFrmFmts() { return pTblFrmFmtTbl; } + const SwFrmFmts* GetTblFrmFmts() const { return mpTblFrmFmtTbl; } + SwFrmFmts* GetTblFrmFmts() { return mpTblFrmFmtTbl; } sal_uInt16 GetTblFrmFmtCount( bool bUsed ) const; SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, bool bUsed ) const; SwTableFmt* MakeTblFrmFmt(const String &rFmtName, SwFrmFmt *pDerivedFrom); @@ -1301,18 +1301,18 @@ public: /// @return name of document template. Can be 0! const String* GetDocPattern( sal_uInt16 nPos ) const { - if(nPos >= aPatternNms.size()) + if(nPos >= maPatternNms.size()) return NULL; - if(boost::is_null(aPatternNms.begin() + nPos)) + if(boost::is_null(maPatternNms.begin() + nPos)) return NULL; - return &(aPatternNms[nPos]); + return &(maPatternNms[nPos]); } /// Delete all unreferenced field types. void GCFieldTypes(); ///< impl. in docfld.cxx /// Query / connect current document with glossary document. - void SetGlossaryDoc( SwDoc* pDoc ) { pGlossaryDoc = pDoc; } + void SetGlossaryDoc( SwDoc* pDoc ) { mpGlossaryDoc = pDoc; } /// travel over PaM Ring bool InsertGlossary( SwTextBlocks& rBlock, const String& rEntry, @@ -1328,9 +1328,9 @@ public: sal_Int32 nDocPageCount ); /// PageDescriptor interface. - sal_uInt16 GetPageDescCnt() const { return aPageDescs.size(); } - const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; } - SwPageDesc& GetPageDesc( sal_uInt16 i ) { return *aPageDescs[i]; } + sal_uInt16 GetPageDescCnt() const { return maPageDescs.size(); } + const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *maPageDescs[i]; } + SwPageDesc& GetPageDesc( sal_uInt16 i ) { return *maPageDescs[i]; } SwPageDesc* FindPageDescByName( const String& rName, sal_uInt16* pPos = 0 ) const; @@ -1398,8 +1398,8 @@ public: void SetUpdateTOX( bool bFlag = true ) { mbUpdateTOX = bFlag; } bool IsUpdateTOX() const { return mbUpdateTOX; } - const String& GetTOIAutoMarkURL() const {return sTOIAutoMarkURL;} - void SetTOIAutoMarkURL(const String& rSet) {sTOIAutoMarkURL = rSet;} + const String& GetTOIAutoMarkURL() const {return msTOIAutoMarkURL;} + void SetTOIAutoMarkURL(const String& rSet) {msTOIAutoMarkURL = rSet;} void ApplyAutoMark(); bool IsInReading() const { return mbInReading; } @@ -1420,7 +1420,7 @@ public: const SwTOXType* GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const; sal_Bool DeleteTOXType( TOXTypes eTyp, sal_uInt16 nId ); const SwTOXType* InsertTOXType( const SwTOXType& rTyp ); - const SwTOXTypes& GetTOXTypes() const { return *pTOXTypes; } + const SwTOXTypes& GetTOXTypes() const { return *mpTOXTypes; } const SwTOXBase* GetDefaultTOXBase( TOXTypes eTyp, bool bCreate = false ); void SetDefaultTOXBase(const SwTOXBase& rBase); @@ -1455,7 +1455,7 @@ public: /// Query / set rules for Outline. inline SwNumRule* GetOutlineNumRule() const { - return pOutlineRule; + return mpOutlineRule; } void SetOutlineNumRule( const SwNumRule& rRule ); void PropagateOutlineRule(); @@ -1492,7 +1492,7 @@ public: SwNumRule* GetCurrNumRule( const SwPosition& rPos ) const; - const SwNumRuleTbl& GetNumRuleTbl() const { return *pNumRuleTbl; } + const SwNumRuleTbl& GetNumRuleTbl() const { return *mpNumRuleTbl; } /** Add numbering rule to document. @@ -1729,8 +1729,8 @@ public: ::sw::IShellCursorSupplier * GetIShellCursorSupplier(); /// OLE 2.0-notification. - inline void SetOle2Link(const Link& rLink) {aOle2Link = rLink;} - inline const Link& GetOle2Link() const {return aOle2Link;} + inline void SetOle2Link(const Link& rLink) {maOle2Link = rLink;} + inline const Link& GetOle2Link() const {return maOle2Link;} /// insert section (the ODF kind of section, not the nodesarray kind) SwSection * InsertSwSection(SwPaM const& rRange, SwSectionData &, @@ -1739,8 +1739,8 @@ public: sal_uInt16 IsInsRegionAvailable( const SwPaM& rRange, const SwNode** ppSttNd = 0 ) const; SwSection* GetCurrSection( const SwPosition& rPos ) const; - SwSectionFmts& GetSections() { return *pSectionFmtTbl; } - const SwSectionFmts& GetSections() const { return *pSectionFmtTbl; } + SwSectionFmts& GetSections() { return *mpSectionFmtTbl; } + const SwSectionFmts& GetSections() const { return *mpSectionFmtTbl; } SwSectionFmt *MakeSectionFmt( SwSectionFmt *pDerivedFrom ); void DelSectionFmt( SwSectionFmt *pFmt, bool bDelNodes = false ); void UpdateSection(sal_uInt16 const nSect, SwSectionData &, @@ -1753,16 +1753,16 @@ public: */ // Pointer to SfxDocShell from Doc. Can be 0!! - SwDocShell* GetDocShell() { return pDocShell; } - const SwDocShell* GetDocShell() const { return pDocShell; } + SwDocShell* GetDocShell() { return mpDocShell; } + const SwDocShell* GetDocShell() const { return mpDocShell; } void SetDocShell( SwDocShell* pDSh ); void ShareLayout( boost::shared_ptr& rPtr); /** in case during copying of embedded object a new shell is created, it should be set here and cleaned later */ - void SetTmpDocShell( SfxObjectShellLock rLock ) { xTmpDocShell = rLock; } - SfxObjectShellLock GetTmpDocShell() { return xTmpDocShell; } + void SetTmpDocShell( SfxObjectShellLock rLock ) { mxTmpDocShell = rLock; } + SfxObjectShellLock GetTmpDocShell() { return mxTmpDocShell; } /// For Autotexts? (text modules) They have only one SVPersist at their disposal. SfxObjectShell* GetPersist() const; @@ -1798,7 +1798,7 @@ public: /// Save current values for automatic registration of exceptions in Autocorrection. void SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew ); - SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return pACEWord; } + SwAutoCorrExceptWord* GetAutoCorrExceptWord() { return mpACEWord; } const SwFmtINetFmt* FindINetAttr( const String& rName ) const; @@ -1860,7 +1860,7 @@ public: void ClearDoc(); // Deletes all content! /// Query /set data for PagePreView. - const SwPagePreViewPrtData* GetPreViewPrtData() const { return pPgPViewPrtData; } + const SwPagePreViewPrtData* GetPreViewPrtData() const { return mpPgPViewPrtData; } // If pointer == 0 destroy pointer in document. // Else copy object. @@ -1870,10 +1870,10 @@ public: /** update all modified OLE-Objects. The modification is called over the StarOne - Interface */ void SetOLEObjModified() - { if( GetCurrentViewShell() ) aOLEModifiedTimer.Start(); } //swmod 071107//swmod 071225 + { if( GetCurrentViewShell() ) maOLEModifiedTimer.Start(); } //swmod 071107//swmod 071225 // -------------------- Uno - Interfaces --------------------------- - const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; } + const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *mpUnoCrsrTbl; } SwUnoCrsr* CreateUnoCrsr( const SwPosition& rPos, bool bTblCrsr = false ); // -------------------- FeShell - Interfaces ----------------------- @@ -1930,7 +1930,7 @@ public: SwExtTextInput* GetExtTextInput() const; /// Interface for access to AutoComplete-List. - static SwAutoCompleteWord& GetAutoCompleteWords() { return *pACmpltWords; } + static SwAutoCompleteWord& GetAutoCompleteWords() { return *mpACmpltWords; } bool ContainsMSVBasic() const { return mbContains_MSVBasic; } void SetContainsMSVBasic( bool bFlag ) { mbContains_MSVBasic = bFlag; } @@ -1943,7 +1943,7 @@ public: void ReadLayoutCache( SvStream& rStream ); void WriteLayoutCache( SvStream& rStream ); - SwLayoutCache* GetLayoutCache() const { return pLayoutCache; } + SwLayoutCache* GetLayoutCache() const { return mpLayoutCache; } /** Checks if any of the text node contains hidden characters. Used for optimization. Changing the view option 'view hidden text' @@ -2033,19 +2033,19 @@ public: void Setn32DummyCompatabilityOptions1( sal_uInt32 CompatabilityOptions1 ) { - n32DummyCompatabilityOptions1 = CompatabilityOptions1; + mn32DummyCompatabilityOptions1 = CompatabilityOptions1; } sal_uInt32 Getn32DummyCompatabilityOptions1( ) { - return n32DummyCompatabilityOptions1; + return mn32DummyCompatabilityOptions1; } void Setn32DummyCompatabilityOptions2( sal_uInt32 CompatabilityOptions2 ) { - n32DummyCompatabilityOptions2 = CompatabilityOptions2; + mn32DummyCompatabilityOptions2 = CompatabilityOptions2; } sal_uInt32 Getn32DummyCompatabilityOptions2( ) { - return n32DummyCompatabilityOptions2; + return mn32DummyCompatabilityOptions2; } com::sun::star::uno::Reference< com::sun::star::script::vba::XVBAEventProcessor > GetVbaEventProcessor(); void SetVBATemplateToProjectCache( com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xCache ) { m_xTemplateToProjectCache = xCache; }; @@ -2095,9 +2095,9 @@ inline const SwTableNode* SwDoc::IsIdxInTbl( const SwNodeIndex& rIdx ) const inline SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) { - if( bCreate && !pNumberFormatter ) + if( bCreate && !mpNumberFormatter ) _CreateNumberFormatter(); - return pNumberFormatter; + return mpNumberFormatter; } inline const SvNumberFormatter* SwDoc::GetNumberFormatter( sal_Bool bCreate ) const diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index fc0114be0d07..c8ab4d8a043d 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -428,7 +428,7 @@ const sal_Char* pMarkToOLE = "ole"; std::vector *pGlobalOLEExcludeList = 0; -SwAutoCompleteWord* SwDoc::pACmpltWords = 0; +SwAutoCompleteWord* SwDoc::mpACmpltWords = 0; SwCheckIt* pCheckIt = 0; CharClass* pAppCharClass = 0; @@ -710,7 +710,7 @@ void _InitCore() pGlobalOLEExcludeList = new std::vector; const SvxSwAutoFmtFlags& rAFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); - SwDoc::pACmpltWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen, + SwDoc::mpACmpltWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen, rAFlags.nAutoCmpltWordLen ); } @@ -738,7 +738,7 @@ void _FinitCore() if ( aAttrTab[0]->GetRefCount() ) SfxItemPool::ReleaseDefaults( aAttrTab, POOLATTR_END-POOLATTR_BEGIN, sal_False); #endif - delete SwDoc::pACmpltWords; + delete SwDoc::mpACmpltWords; delete SwStyleNameMapper::pTextUINameArray; delete SwStyleNameMapper::pListsUINameArray; diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index c5879f4d470a..7c6379a2bbd9 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -252,11 +252,11 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value) UpdateNumRule(); - if (pOutlineRule) + if (mpOutlineRule) { - pOutlineRule->Validate(); + mpOutlineRule->Validate(); // counting of phantoms depends on - pOutlineRule->SetCountPhantoms( !mbOldNumbering ); + mpOutlineRule->SetCountPhantoms( !mbOldNumbering ); } } break; @@ -411,8 +411,8 @@ const i18n::ForbiddenCharacters* SwDoc::getForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ bool bLocaleData ) const { const i18n::ForbiddenCharacters* pRet = 0; - if( xForbiddenCharsTable.is() ) - pRet = xForbiddenCharsTable->GetForbiddenCharacters( nLang, sal_False ); + if( mxForbiddenCharsTable.is() ) + pRet = mxForbiddenCharsTable->GetForbiddenCharacters( nLang, sal_False ); if( bLocaleData && !pRet && pBreakIt ) pRet = &pBreakIt->GetForbidden( (LanguageType)nLang ); return pRet; @@ -421,16 +421,16 @@ const i18n::ForbiddenCharacters* void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, /*[in]*/ const com::sun::star::i18n::ForbiddenCharacters& rFChars ) { - if( !xForbiddenCharsTable.is() ) + if( !mxForbiddenCharsTable.is() ) { - xForbiddenCharsTable = new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() ); + mxForbiddenCharsTable = new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() ); } - xForbiddenCharsTable->SetForbiddenCharacters( nLang, rFChars ); - if( pDrawModel ) + mxForbiddenCharsTable->SetForbiddenCharacters( nLang, rFChars ); + if( mpDrawModel ) { - pDrawModel->SetForbiddenCharsTable( xForbiddenCharsTable ); + mpDrawModel->SetForbiddenCharsTable( mxForbiddenCharsTable ); if( !mbInReading ) - pDrawModel->ReformatAllTextObjects(); + mpDrawModel->ReformatAllTextObjects(); } SwRootFrm* pTmpRoot = GetCurrentLayout(); @@ -446,21 +446,21 @@ void SwDoc::setForbiddenCharacters(/*[in]*/ sal_uInt16 nLang, rtl::Reference& SwDoc::getForbiddenCharacterTable() { - if( !xForbiddenCharsTable.is() ) + if( !mxForbiddenCharsTable.is() ) { - xForbiddenCharsTable = new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() ); + mxForbiddenCharsTable = new SvxForbiddenCharactersTable( ::comphelper::getProcessComponentContext() ); } - return xForbiddenCharsTable; + return mxForbiddenCharsTable; } const rtl::Reference& SwDoc::getForbiddenCharacterTable() const { - return xForbiddenCharsTable; + return mxForbiddenCharsTable; } sal_uInt16 SwDoc::getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const { - sal_uInt16 nRet = nLinkUpdMode; + sal_uInt16 nRet = mnLinkUpdMode; if( bGlobalSettings && GLOBALSETTING == nRet ) nRet = SW_MOD()->GetLinkUpdMode(get(IDocumentSettingAccess::HTML_MODE)); return nRet; @@ -468,12 +468,12 @@ sal_uInt16 SwDoc::getLinkUpdateMode( /*[in]*/bool bGlobalSettings ) const void SwDoc::setLinkUpdateMode( /*[in]*/sal_uInt16 eMode ) { - nLinkUpdMode = eMode; + mnLinkUpdMode = eMode; } sal_uInt32 SwDoc::getRsid() const { - return nRsid; + return mnRsid; } void SwDoc::setRsid( sal_uInt32 nVal ) @@ -485,22 +485,22 @@ void SwDoc::setRsid( sal_uInt32 nVal ) rtl_random_getBytes( aPool, &nIncrease, sizeof ( nIncrease ) ); nIncrease &= ( 1<<17 ) - 1; nIncrease++; // make sure the new rsid is not the same - nRsid = nVal + nIncrease; + mnRsid = nVal + nIncrease; } sal_uInt32 SwDoc::getRsidRoot() const { - return nRsidRoot; + return mnRsidRoot; } void SwDoc::setRsidRoot( sal_uInt32 nVal ) { - nRsidRoot = nVal; + mnRsidRoot = nVal; } SwFldUpdateFlags SwDoc::getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) const { - SwFldUpdateFlags eRet = eFldUpdMode; + SwFldUpdateFlags eRet = meFldUpdMode; if( bGlobalSettings && AUTOUPD_GLOBALSETTING == eRet ) eRet = SW_MOD()->GetFldUpdateFlags(get(IDocumentSettingAccess::HTML_MODE)); return eRet; @@ -508,24 +508,24 @@ SwFldUpdateFlags SwDoc::getFieldUpdateFlags( /*[in]*/bool bGlobalSettings ) cons void SwDoc::setFieldUpdateFlags(/*[in]*/SwFldUpdateFlags eMode ) { - eFldUpdMode = eMode; + meFldUpdMode = eMode; } SwCharCompressType SwDoc::getCharacterCompressionType() const { - return eChrCmprType; + return meChrCmprType; } void SwDoc::setCharacterCompressionType( /*[in]*/SwCharCompressType n ) { - if( eChrCmprType != n ) + if( meChrCmprType != n ) { - eChrCmprType = n; - if( pDrawModel ) + meChrCmprType = n; + if( mpDrawModel ) { - pDrawModel->SetCharCompressType( static_cast(n) ); + mpDrawModel->SetCharCompressType( static_cast(n) ); if( !mbInReading ) - pDrawModel->ReformatAllTextObjects(); + mpDrawModel->ReformatAllTextObjects(); } SwRootFrm* pTmpRoot = GetCurrentLayout(); @@ -544,8 +544,8 @@ void SwDoc::setCharacterCompressionType( /*[in]*/SwCharCompressType n ) SfxPrinter* SwDoc::getPrinter(/*[in]*/ bool bCreate ) const { SfxPrinter* pRet = 0; - if ( !bCreate || pPrt ) - pRet = pPrt; + if ( !bCreate || mpPrt ) + pRet = mpPrt; else pRet = &CreatePrinter_(); @@ -554,24 +554,24 @@ SfxPrinter* SwDoc::getPrinter(/*[in]*/ bool bCreate ) const void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ) { - if ( pP != pPrt ) + if ( pP != mpPrt ) { if ( bDeleteOld ) - delete pPrt; - pPrt = pP; + delete mpPrt; + mpPrt = pP; // our printer should always use TWIP. Don't rely on this being set in ViewShell::InitPrt, there // are situations where this isn't called. // #i108712# / 2010-02-26 / frank.schoenheit@sun.com - if ( pPrt ) + if ( mpPrt ) { - MapMode aMapMode( pPrt->GetMapMode() ); + MapMode aMapMode( mpPrt->GetMapMode() ); aMapMode.SetMapUnit( MAP_TWIP ); - pPrt->SetMapMode( aMapMode ); + mpPrt->SetMapMode( aMapMode ); } - if ( pDrawModel && !get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) ) - pDrawModel->SetRefDevice( pPrt ); + if ( mpDrawModel && !get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) ) + mpDrawModel->SetRefDevice( mpPrt ); } if ( bCallPrtDataChanged && @@ -584,8 +584,8 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ VirtualDevice* SwDoc::getVirtualDevice(/*[in]*/ bool bCreate ) const { VirtualDevice* pRet = 0; - if ( !bCreate || pVirDev ) - pRet = pVirDev; + if ( !bCreate || mpVirDev ) + pRet = mpVirDev; else pRet = &CreateVirtualDevice_(); @@ -594,14 +594,14 @@ VirtualDevice* SwDoc::getVirtualDevice(/*[in]*/ bool bCreate ) const void SwDoc::setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool ) { - if ( pVirDev != pVd ) + if ( mpVirDev != pVd ) { if ( bDeleteOld ) - delete pVirDev; - pVirDev = pVd; + delete mpVirDev; + mpVirDev = pVd; - if ( pDrawModel && get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) ) - pDrawModel->SetRefDevice( pVirDev ); + if ( mpDrawModel && get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) ) + mpDrawModel->SetRefDevice( mpVirDev ); } } @@ -612,7 +612,7 @@ OutputDevice* SwDoc::getReferenceDevice(/*[in]*/ bool bCreate ) const { pRet = getPrinter( bCreate ); - if ( bCreate && !pPrt->IsValid() ) + if ( bCreate && !mpPrt->IsValid() ) { pRet = getVirtualDevice( sal_True ); } @@ -638,8 +638,8 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH else pMyVirDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 ); - if( pDrawModel ) - pDrawModel->SetRefDevice( pMyVirDev ); + if( mpDrawModel ) + mpDrawModel->SetRefDevice( pMyVirDev ); } else { @@ -650,8 +650,8 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH // getReferenceDevice()->getPrinter()->CreatePrinter_() // ->setPrinter()-> PrtDataChanged() SfxPrinter* pPrinter = getPrinter( true ); - if( pDrawModel ) - pDrawModel->SetRefDevice( pPrinter ); + if( mpDrawModel ) + mpDrawModel->SetRefDevice( pPrinter ); } set(IDocumentSettingAccess::USE_VIRTUAL_DEVICE, bNewVirtual ); @@ -663,29 +663,29 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH const JobSetup* SwDoc::getJobsetup() const { - return pPrt ? &pPrt->GetJobSetup() : 0; + return mpPrt ? &mpPrt->GetJobSetup() : 0; } void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) { - bool bCheckPageDescs = 0 == pPrt; + bool bCheckPageDescs = 0 == mpPrt; bool bDataChanged = false; - if ( pPrt ) + if ( mpPrt ) { - if ( pPrt->GetName() == rJobSetup.GetPrinterName() ) + if ( mpPrt->GetName() == rJobSetup.GetPrinterName() ) { - if ( pPrt->GetJobSetup() != rJobSetup ) + if ( mpPrt->GetJobSetup() != rJobSetup ) { - pPrt->SetJobSetup( rJobSetup ); + mpPrt->SetJobSetup( rJobSetup ); bDataChanged = true; } } else - delete pPrt, pPrt = 0; + delete mpPrt, mpPrt = 0; } - if( !pPrt ) + if( !mpPrt ) { //The ItemSet is deleted by Sfx! SfxItemSet *pSet = new SfxItemSet( GetAttrPool(), @@ -699,7 +699,7 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) setPrinter( p, true, true ); else { - pPrt = p; + mpPrt = p; bDataChanged = true; } } @@ -709,10 +709,10 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) const SwPrintData & SwDoc::getPrintData() const { - if(!pPrtData) + if(!mpPrtData) { SwDoc * pThis = const_cast< SwDoc * >(this); - pThis->pPrtData = new SwPrintData; + pThis->mpPrtData = new SwPrintData; // SwPrintData should be initialized from the configuration, // the respective config item is implememted by SwPrintOptions which @@ -721,16 +721,16 @@ const SwPrintData & SwDoc::getPrintData() const OSL_ENSURE( pDocSh, "pDocSh is 0, can't determine if this is a WebDoc or not" ); bool bWeb = 0 != dynamic_cast< const SwWebDocShell * >(pDocSh); SwPrintOptions aPrintOptions( bWeb ); - *pThis->pPrtData = aPrintOptions; + *pThis->mpPrtData = aPrintOptions; } - return *pPrtData; + return *mpPrtData; } void SwDoc::setPrintData(/*[in]*/ const SwPrintData& rPrtData ) { - if(!pPrtData) - pPrtData = new SwPrintData; - *pPrtData = rPrtData; + if(!mpPrtData) + mpPrtData = new SwPrintData; + *mpPrtData = rPrtData; } /* Implementations the next Interface here */ @@ -741,9 +741,9 @@ void SwDoc::setPrintData(/*[in]*/ const SwPrintData& rPrtData ) */ void SwDoc::ChgDBData(const SwDBData& rNewData) { - if( rNewData != aDBData ) + if( rNewData != maDBData ) { - aDBData = rNewData; + maDBData = rNewData; SetModified(); } GetSysFldType(RES_DBNAMEFLD)->UpdateFlds(); @@ -865,7 +865,7 @@ bool SwDoc::SplitNode( const SwPosition &rPos, bool bChkTableStart ) if( !aBkmkArr.empty() ) _RestoreCntntIdx( this, aBkmkArr, rPos.nNode.GetIndex()-1, 0, true ); - if( IsRedlineOn() || (!IsIgnoreRedline() && !pRedlineTbl->empty() )) + if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) { SwPaM aPam( rPos ); aPam.SetMark(); @@ -903,7 +903,7 @@ bool SwDoc::AppendTxtNode( SwPosition& rPos ) GetIDocumentUndoRedo().AppendUndo( new SwUndoInsert( rPos.nNode ) ); } - if( IsRedlineOn() || (!IsIgnoreRedline() && !pRedlineTbl->empty() )) + if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) { SwPaM aPam( rPos ); aPam.SetMark(); @@ -928,13 +928,13 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr, const SwPosition& rPos = *rRg.GetPoint(); - if( pACEWord ) // add to auto correction + if( mpACEWord ) // add to auto correction { - if( 1 == rStr.Len() && pACEWord->IsDeleted() ) + if( 1 == rStr.Len() && mpACEWord->IsDeleted() ) { - pACEWord->CheckChar( rPos, rStr.GetChar( 0 ) ); + mpACEWord->CheckChar( rPos, rStr.GetChar( 0 ) ); } - delete pACEWord, pACEWord = 0; + delete mpACEWord, mpACEWord = 0; } SwTxtNode *const pNode = rPos.nNode.GetNode().GetTxtNode(); @@ -994,7 +994,7 @@ bool SwDoc::InsertString( const SwPaM &rRg, const String &rStr, } } - if( IsRedlineOn() || (!IsIgnoreRedline() && !pRedlineTbl->empty() )) + if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) { SwPaM aPam( rPos.nNode, aTmp.GetCntnt(), rPos.nNode, rPos.nContent.GetIndex()); @@ -1042,7 +1042,7 @@ SwFlyFrmFmt* SwDoc::Insert( const SwPaM &rRg, return _InsNoTxtNode( *rRg.GetPoint(), GetNodes().MakeGrfNode( SwNodeIndex( GetNodes().GetEndOfAutotext() ), rGrfName, rFltName, pGraphic, - pDfltGrfFmtColl ), + mpDfltGrfFmtColl ), pFlyAttrSet, pGrfAttrSet, pFrmFmt ); } @@ -1055,7 +1055,7 @@ SwFlyFrmFmt* SwDoc::Insert( const SwPaM &rRg, const GraphicObject& rGrfObj, pFrmFmt = GetFrmFmtFromPool( RES_POOLFRM_GRAPHIC ); return _InsNoTxtNode( *rRg.GetPoint(), GetNodes().MakeGrfNode( SwNodeIndex( GetNodes().GetEndOfAutotext() ), - rGrfObj, pDfltGrfFmtColl ), + rGrfObj, mpDfltGrfFmtColl ), pFlyAttrSet, pGrfAttrSet, pFrmFmt ); } @@ -1076,7 +1076,7 @@ SwFlyFrmFmt* SwDoc::Insert(const SwPaM &rRg, const svt::EmbeddedObjectRef& xObj, return _InsNoTxtNode( *rRg.GetPoint(), GetNodes().MakeOLENode( SwNodeIndex( GetNodes().GetEndOfAutotext() ), xObj, - pDfltGrfFmtColl ), + mpDfltGrfFmtColl ), pFlyAttrSet, pGrfAttrSet, pFrmFmt ); } @@ -1095,7 +1095,7 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName, SwNodeIndex( GetNodes().GetEndOfAutotext() ), rObjName, nAspect, - pDfltGrfFmtColl, + mpDfltGrfFmtColl, 0 ), pFlyAttrSet, pGrfAttrSet, pFrmFmt ); @@ -1108,8 +1108,8 @@ SwFlyFrmFmt* SwDoc::InsertOLE(const SwPaM &rRg, const String& rObjName, SwFieldType *SwDoc::GetSysFldType( const sal_uInt16 eWhich ) const { for( sal_uInt16 i = 0; i < INIT_FLDTYPES; ++i ) - if( eWhich == (*pFldTypes)[i]->Which() ) - return (*pFldTypes)[i]; + if( eWhich == (*mpFldTypes)[i]->Which() ) + return (*mpFldTypes)[i]; return 0; } @@ -1121,7 +1121,7 @@ bool SwDoc::UpdateRsid( SwTxtNode *pTxtNode, xub_StrLen nStt, xub_StrLen nEnd ) return false; } - SvxRsidItem aRsid( nRsid, RES_CHRATR_RSID ); + SvxRsidItem aRsid( mnRsid, RES_CHRATR_RSID ); SwTxtAttr* pAttr = MakeTxtAttr( *this, aRsid, nStt, nEnd ); return pTxtNode->InsertHint( pAttr, INS_DEFAULT ); } @@ -1143,27 +1143,27 @@ bool SwDoc::UpdateParRsid( SwTxtNode *pTxtNode, sal_uInt32 nVal ) return false; } - SvxRsidItem aRsid( nVal ? nVal : nRsid, RES_PARATR_RSID ); + SvxRsidItem aRsid( nVal ? nVal : mnRsid, RES_PARATR_RSID ); return pTxtNode->SetAttr( aRsid ); } void SwDoc::SetDocStat( const SwDocStat& rStat ) { - *pDocStat = rStat; + *mpDocStat = rStat; } const SwDocStat& SwDoc::GetDocStat() const { - return *pDocStat; + return *mpDocStat; } const SwDocStat& SwDoc::GetUpdatedDocStat( bool bCompleteAsync ) { - if( pDocStat->bModified ) + if( mpDocStat->bModified ) { UpdateDocStat( bCompleteAsync ); } - return *pDocStat; + return *mpDocStat; } struct _PostItFld : public _SetGetExpFld @@ -1686,8 +1686,8 @@ void SwDoc::CalculatePagePairsForProspectPrinting( // returns true while there is more to do bool SwDoc::IncrementalDocStatCalculate( long nTextNodes ) { - pDocStat->Reset(); - pDocStat->nPara = 0; // default is 1! + mpDocStat->Reset(); + mpDocStat->nPara = 0; // default is 1! SwNode* pNd; // This is the inner loop - at least while the paras are dirty. @@ -1698,13 +1698,13 @@ bool SwDoc::IncrementalDocStatCalculate( long nTextNodes ) case ND_TEXTNODE: { SwTxtNode *pTxt = static_cast< SwTxtNode * >( pNd ); - if( pTxt->CountWords( *pDocStat, 0, pTxt->GetTxt().Len() ) ) + if( pTxt->CountWords( *mpDocStat, 0, pTxt->GetTxt().Len() ) ) nTextNodes--; break; } - case ND_TABLENODE: ++pDocStat->nTbl; break; - case ND_GRFNODE: ++pDocStat->nGrf; break; - case ND_OLENODE: ++pDocStat->nOLE; break; + case ND_TABLENODE: ++mpDocStat->nTbl; break; + case ND_GRFNODE: ++mpDocStat->nGrf; break; + case ND_OLENODE: ++mpDocStat->nOLE; break; case ND_SECTIONNODE: break; } } @@ -1719,35 +1719,35 @@ bool SwDoc::IncrementalDocStatCalculate( long nTextNodes ) { SwPostItField const * const pField( static_cast(pFmtFld->GetFld())); - pDocStat->nAllPara += pField->GetNumberOfParagraphs(); + mpDocStat->nAllPara += pField->GetNumberOfParagraphs(); } } } - pDocStat->nPage = GetCurrentLayout() ? GetCurrentLayout()->GetPageNum() : 0; - pDocStat->bModified = sal_False; + mpDocStat->nPage = GetCurrentLayout() ? GetCurrentLayout()->GetPageNum() : 0; + mpDocStat->bModified = sal_False; - com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( pDocStat->nPage ? 8 : 7); + com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( mpDocStat->nPage ? 8 : 7); sal_Int32 n=0; aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nTbl; + aStat[n++].Value <<= (sal_Int32)mpDocStat->nTbl; aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImageCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nGrf; + aStat[n++].Value <<= (sal_Int32)mpDocStat->nGrf; aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ObjectCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nOLE; - if ( pDocStat->nPage ) + aStat[n++].Value <<= (sal_Int32)mpDocStat->nOLE; + if ( mpDocStat->nPage ) { aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PageCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nPage; + aStat[n++].Value <<= (sal_Int32)mpDocStat->nPage; } aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParagraphCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nPara; + aStat[n++].Value <<= (sal_Int32)mpDocStat->nPara; aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nWord; + aStat[n++].Value <<= (sal_Int32)mpDocStat->nWord; aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nChar; + aStat[n++].Value <<= (sal_Int32)mpDocStat->nChar; aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NonWhitespaceCharacterCount")); - aStat[n++].Value <<= (sal_Int32)pDocStat->nCharExcludingSpaces; + aStat[n++].Value <<= (sal_Int32)mpDocStat->nCharExcludingSpaces; // For e.g. autotext documents there is no pSwgInfo (#i79945) SfxObjectShell * const pObjShell( GetDocShell() ); @@ -1778,7 +1778,7 @@ IMPL_LINK( SwDoc, DoIdleStatsUpdate, Timer *, pTimer ) { (void)pTimer; if( IncrementalDocStatCalculate( 1000 ) ) - aStatsUpdateTimer.Start(); + maStatsUpdateTimer.Start(); SwView* pView = GetDocShell() ? GetDocShell()->GetView() : NULL; if( pView ) @@ -1788,15 +1788,15 @@ IMPL_LINK( SwDoc, DoIdleStatsUpdate, Timer *, pTimer ) void SwDoc::UpdateDocStat( bool bCompleteAsync ) { - if( pDocStat->bModified ) + if( mpDocStat->bModified ) { if (!bCompleteAsync) { while (IncrementalDocStatCalculate()) {} - aStatsUpdateTimer.Stop(); + maStatsUpdateTimer.Stop(); } else if (IncrementalDocStatCalculate()) - aStatsUpdateTimer.Start(); + maStatsUpdateTimer.Start(); } } @@ -1942,16 +1942,16 @@ void SwDoc::SetModified() // Bit 1: -> new state long nCall = mbModified ? 3 : 2; mbModified = sal_True; - pDocStat->bModified = sal_True; - if( aOle2Link.IsSet() ) + mpDocStat->bModified = sal_True; + if( maOle2Link.IsSet() ) { mbInCallModified = sal_True; - aOle2Link.Call( (void*)nCall ); + maOle2Link.Call( (void*)nCall ); mbInCallModified = sal_False; } - if( pACEWord && !pACEWord->IsDeleted() ) - delete pACEWord, pACEWord = 0; + if( mpACEWord && !mpACEWord->IsDeleted() ) + delete mpACEWord, mpACEWord = 0; } void SwDoc::ResetModified() @@ -1962,10 +1962,10 @@ void SwDoc::ResetModified() long nCall = mbModified ? 1 : 0; mbModified = sal_False; GetIDocumentUndoRedo().SetUndoNoModifiedPosition(); - if( nCall && aOle2Link.IsSet() ) + if( nCall && maOle2Link.IsSet() ) { mbInCallModified = sal_True; - aOle2Link.Call( (void*)nCall ); + maOle2Link.Call( (void*)nCall ); mbInCallModified = sal_False; } } @@ -2493,12 +2493,12 @@ void SwDoc::SetVisibleLinks(bool bFlag) sfx2::LinkManager& SwDoc::GetLinkManager() { - return *pLinkMgr; + return *mpLinkMgr; } const sfx2::LinkManager& SwDoc::GetLinkManager() const { - return *pLinkMgr; + return *mpLinkMgr; } void SwDoc::SetLinksUpdated(const bool bNewLinksUpdated) @@ -2696,15 +2696,15 @@ SwUnoCrsr* SwDoc::CreateUnoCrsr( const SwPosition& rPos, bool bTblCrsr ) else pNew = new SwUnoCrsr( rPos ); - pUnoCrsrTbl->insert( pNew ); + mpUnoCrsrTbl->insert( pNew ); return pNew; } void SwDoc::ChkCondColls() { - for (sal_uInt16 n = 0; n < pTxtFmtCollTbl->size(); n++) + for (sal_uInt16 n = 0; n < mpTxtFmtCollTbl->size(); n++) { - SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n]; + SwTxtFmtColl *pColl = (*mpTxtFmtCollTbl)[n]; if (RES_CONDTXTFMTCOLL == pColl->Which()) pColl->CallSwClientNotify( SwAttrHint(RES_CONDTXTFMTCOLL) ); } @@ -2714,14 +2714,14 @@ uno::Reference< script::vba::XVBAEventProcessor > SwDoc::GetVbaEventProcessor() { #ifndef DISABLE_SCRIPTING - if( !mxVbaEvents.is() && pDocShell && ooo::vba::isAlienWordDoc( *pDocShell ) ) + if( !mxVbaEvents.is() && mpDocShell && ooo::vba::isAlienWordDoc( *mpDocShell ) ) { try { - uno::Reference< frame::XModel > xModel( pDocShell->GetModel(), uno::UNO_SET_THROW ); + uno::Reference< frame::XModel > xModel( mpDocShell->GetModel(), uno::UNO_SET_THROW ); uno::Sequence< uno::Any > aArgs(1); aArgs[0] <<= xModel; - mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( pDocShell, "com.sun.star.script.vba.VBATextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW ); + mxVbaEvents.set( ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "com.sun.star.script.vba.VBATextEventProcessor" , aArgs ), uno::UNO_QUERY_THROW ); } catch( uno::Exception& ) { diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx index 99da17e55bcb..8b3e48ba4821 100644 --- a/sw/source/core/doc/docbasic.cxx +++ b/sw/source/core/doc/docbasic.cxx @@ -82,7 +82,7 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs ) SbxBaseRef aRef; SbxValue* pRetValue = new SbxValue; aRef = pRetValue; - eErr = pDocShell->CallBasic( rMacro.GetMacName(), + eErr = mpDocShell->CallBasic( rMacro.GetMacName(), rMacro.GetLibName(), pArgs, pRet ? pRetValue : 0 ); @@ -120,7 +120,7 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs ) OSL_TRACE( "SwDoc::ExecMacro URL is %s", rtl::OUStringToOString( rMacro.GetMacName(), RTL_TEXTENCODING_UTF8).getStr() ); - eErr = pDocShell->CallXScript( + eErr = mpDocShell->CallXScript( rMacro.GetMacName(), *pUnoArgs, aRet, aOutArgsIndex, aOutArgs); delete pUnoArgs; @@ -136,7 +136,7 @@ bool SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs ) sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEvent, bool bCheckPtr, SbxArray* pArgs, const Link* ) { - if( !pDocShell ) // we can't do that without a DocShell! + if( !mpDocShell ) // we can't do that without a DocShell! return 0; sal_uInt16 nRet = 0; @@ -208,7 +208,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve const SvxMacro& rMacro = *pTbl->Get( nEvent ); if( STARBASIC == rMacro.GetScriptType() ) { - nRet += 0 == pDocShell->CallBasic( rMacro.GetMacName(), + nRet += 0 == mpDocShell->CallBasic( rMacro.GetMacName(), rMacro.GetLibName(), pArgs ) ? 1 : 0; } else if( EXTENDED_STYPE == rMacro.GetScriptType() ) @@ -232,7 +232,7 @@ sal_uInt16 SwDoc::CallEvent( sal_uInt16 nEvent, const SwCallMouseEvent& rCallEve OSL_TRACE( "SwDoc::CallEvent URL is %s", rtl::OUStringToOString( rMacro.GetMacName(), RTL_TEXTENCODING_UTF8).getStr() ); - nRet += 0 == pDocShell->CallXScript( + nRet += 0 == mpDocShell->CallXScript( rMacro.GetMacName(), *pUnoArgs,aRet, aOutArgsIndex, aOutArgs) ? 1 : 0; delete pUnoArgs; diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 4f43b7dddc0f..e809b7c1874c 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1009,10 +1009,10 @@ namespace // IDocumentMarkAccess for SwDoc IDocumentMarkAccess* SwDoc::getIDocumentMarkAccess() - { return static_cast< IDocumentMarkAccess* >(pMarkManager.get()); } + { return static_cast< IDocumentMarkAccess* >(mpMarkManager.get()); } const IDocumentMarkAccess* SwDoc::getIDocumentMarkAccess() const - { return static_cast< IDocumentMarkAccess* >(pMarkManager.get()); } + { return static_cast< IDocumentMarkAccess* >(mpMarkManager.get()); } // SaveBookmark diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx index 901b8f088d4b..226d6bb8352f 100644 --- a/sw/source/core/doc/docchart.cxx +++ b/sw/source/core/doc/docchart.cxx @@ -206,12 +206,12 @@ SwChartDataProvider * SwDoc::GetChartDataProvider( bool bCreate ) const // we need a mutex here SolarMutexGuard aGuard; - if (bCreate && !aChartDataProviderImplRef.get()) + if (bCreate && !maChartDataProviderImplRef.get()) { - aChartDataProviderImplRef = comphelper::ImplementationReference< SwChartDataProvider + maChartDataProviderImplRef = comphelper::ImplementationReference< SwChartDataProvider , chart2::data::XDataProvider >( new SwChartDataProvider( this ) ); } - return aChartDataProviderImplRef.get(); + return maChartDataProviderImplRef.get(); } @@ -248,11 +248,11 @@ void SwDoc::CreateChartInternalDataProviders( const SwTable *pTable ) SwChartLockController_Helper & SwDoc::GetChartControllerHelper() { - if (!pChartControllerHelper) + if (!mpChartControllerHelper) { - pChartControllerHelper = new SwChartLockController_Helper( this ); + mpChartControllerHelper = new SwChartLockController_Helper( this ); } - return *pChartControllerHelper; + return *mpChartControllerHelper; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 50868ead3d50..d7537fee7d14 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -197,7 +197,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rOldNode, getIDocumentMarkAccess()->correctMarksAbsolute(rOldNode, rNewPos, nOffset); { // fix redlines - SwRedlineTbl& rTbl = *pRedlineTbl; + SwRedlineTbl& rTbl = *mpRedlineTbl; for (sal_uInt16 n = 0; n < rTbl.size(); ) { // is on position ?? @@ -315,7 +315,7 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode, getIDocumentMarkAccess()->correctMarksRelative(rOldNode, rNewPos, nOffset); { // fix the Redlines - SwRedlineTbl& rTbl = *pRedlineTbl; + SwRedlineTbl& rTbl = *mpRedlineTbl; SwPosition aNewPos(rNewPos); for( sal_uInt16 n = 0; n < rTbl.size(); ++n ) { @@ -332,9 +332,9 @@ void SwDoc::CorrRel(const SwNodeIndex& rOldNode, SwEditShell* SwDoc::GetEditShell( ViewShell** ppSh ) const { // Layout and OLE shells should be available - if( pCurrentView ) + if( mpCurrentView ) { - ViewShell *pSh = pCurrentView, *pVSh = pSh; + ViewShell *pSh = mpCurrentView, *pVSh = pSh; if( ppSh ) *ppSh = pSh; diff --git a/sw/source/core/doc/docdde.cxx b/sw/source/core/doc/docdde.cxx index c7bbe797e57c..20677cf0d9f8 100644 --- a/sw/source/core/doc/docdde.cxx +++ b/sw/source/core/doc/docdde.cxx @@ -140,14 +140,14 @@ bool SwDoc::GetData( const rtl::OUString& rItem, const String& rMimeType, bool bCaseSensitive = true; while( true ) { - ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*pMarkManager, rItem, bCaseSensitive); + ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*mpMarkManager, rItem, bCaseSensitive); if(pBkmk) return SwServerObject(*pBkmk).GetData(rValue, rMimeType); // Do we already have the Item? String sItem( bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem)); _FindItem aPara( sItem ); - BOOST_FOREACH( const SwSectionFmt* pFmt, *pSectionFmtTbl ) + BOOST_FOREACH( const SwSectionFmt* pFmt, *mpSectionFmtTbl ) { if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive))) break; @@ -163,7 +163,7 @@ bool SwDoc::GetData( const rtl::OUString& rItem, const String& rMimeType, } _FindItem aPara( GetAppCharClass().lowercase( rItem )); - BOOST_FOREACH( const SwFrmFmt* pFmt, *pTblFrmFmtTbl ) + BOOST_FOREACH( const SwFrmFmt* pFmt, *mpTblFrmFmtTbl ) { if (!(lcl_FindTable(pFmt, &aPara))) break; @@ -185,14 +185,14 @@ bool SwDoc::SetData( const rtl::OUString& rItem, const String& rMimeType, bool bCaseSensitive = true; while( true ) { - ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*pMarkManager, rItem, bCaseSensitive); + ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*mpMarkManager, rItem, bCaseSensitive); if(pBkmk) return SwServerObject(*pBkmk).SetData(rMimeType, rValue); // Do we already have the Item? String sItem( bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem)); _FindItem aPara( sItem ); - BOOST_FOREACH( const SwSectionFmt* pFmt, *pSectionFmtTbl ) + BOOST_FOREACH( const SwSectionFmt* pFmt, *mpSectionFmtTbl ) { if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive))) break; @@ -209,7 +209,7 @@ bool SwDoc::SetData( const rtl::OUString& rItem, const String& rMimeType, String sItem(GetAppCharClass().lowercase(rItem)); _FindItem aPara( sItem ); - BOOST_FOREACH( const SwFrmFmt* pFmt, *pTblFrmFmtTbl ) + BOOST_FOREACH( const SwFrmFmt* pFmt, *mpTblFrmFmtTbl ) { if (!(lcl_FindTable(pFmt, &aPara))) break; @@ -233,7 +233,7 @@ bool SwDoc::SetData( const rtl::OUString& rItem, const String& rMimeType, while( true ) { // bookmarks - ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*pMarkManager, rItem, bCaseSensitive); + ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*mpMarkManager, rItem, bCaseSensitive); if(pBkmk && pBkmk->IsExpanded() && (0 == (pObj = pBkmk->GetRefObject()))) { @@ -247,7 +247,7 @@ bool SwDoc::SetData( const rtl::OUString& rItem, const String& rMimeType, _FindItem aPara(bCaseSensitive ? rItem : GetAppCharClass().lowercase(rItem)); // sections - BOOST_FOREACH( const SwSectionFmt* pFmt, *pSectionFmtTbl ) + BOOST_FOREACH( const SwSectionFmt* pFmt, *mpSectionFmtTbl ) { if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive))) break; @@ -270,7 +270,7 @@ bool SwDoc::SetData( const rtl::OUString& rItem, const String& rMimeType, _FindItem aPara( GetAppCharClass().lowercase(rItem) ); // tables - BOOST_FOREACH( const SwFrmFmt* pFmt, *pTblFrmFmtTbl ) + BOOST_FOREACH( const SwFrmFmt* pFmt, *mpTblFrmFmtTbl ) { if (!(lcl_FindTable(pFmt, &aPara))) break; @@ -315,7 +315,7 @@ bool SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam, if( sCmp.EqualsAscii( pMarkToTable ) ) { sName = rCC.lowercase( sName ); - BOOST_FOREACH( const SwFrmFmt* pFmt, *pTblFrmFmtTbl ) + BOOST_FOREACH( const SwFrmFmt* pFmt, *mpTblFrmFmtTbl ) { if (!(lcl_FindTable(pFmt, &aPara))) break; @@ -384,7 +384,7 @@ bool SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam, bool bCaseSensitive = true; while( true ) { - ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*pMarkManager, sItem, bCaseSensitive); + ::sw::mark::DdeBookmark* const pBkmk = lcl_FindDdeBookmark(*mpMarkManager, sItem, bCaseSensitive); if(pBkmk) { if(pBkmk->IsExpanded()) @@ -397,9 +397,9 @@ bool SwDoc::SelectServerObj( const String& rStr, SwPaM*& rpPam, // _FindItem aPara( bCaseSensitive ? sItem : String(rCC.lowercase( sItem )) ); - if( !pSectionFmtTbl->empty() ) + if( !mpSectionFmtTbl->empty() ) { - BOOST_FOREACH( const SwSectionFmt* pFmt, *pSectionFmtTbl ) + BOOST_FOREACH( const SwSectionFmt* pFmt, *mpSectionFmtTbl ) { if (!(lcl_FindSection(pFmt, &aPara, bCaseSensitive))) break; diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 1852b4c16fd4..f27acb91c57e 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -279,9 +279,9 @@ void SwDoc::CopyMasterFooter(const SwPageDesc &rChged, const SwFmtFooter &rFoot, void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged ) { - OSL_ENSURE( i < aPageDescs.size(), "PageDescs is out of range." ); + OSL_ENSURE( i < maPageDescs.size(), "PageDescs is out of range." ); - SwPageDesc *pDesc = aPageDescs[i]; + SwPageDesc *pDesc = maPageDescs[i]; SwRootFrm* pTmpRoot = GetCurrentLayout(); if (GetIDocumentUndoRedo().DoesUndo()) @@ -441,22 +441,22 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel) return; // mba: test iteration as clients are removed while iteration - SwPageDescHint aHint( aPageDescs[0] ); + SwPageDescHint aHint( maPageDescs[0] ); pDel->CallSwClientNotify( aHint ); bool bHasLayout = HasLayout(); - if ( pFtnInfo->DependsOn( pDel ) ) + if ( mpFtnInfo->DependsOn( pDel ) ) { - pFtnInfo->ChgPageDesc( aPageDescs[0] ); + mpFtnInfo->ChgPageDesc( maPageDescs[0] ); if ( bHasLayout ) { std::set aAllLayouts = GetAllLayouts(); std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::CheckFtnPageDescs), false)); } } - else if ( pEndNoteInfo->DependsOn( pDel ) ) + else if ( mpEndNoteInfo->DependsOn( pDel ) ) { - pEndNoteInfo->ChgPageDesc( aPageDescs[0] ); + mpEndNoteInfo->ChgPageDesc( maPageDescs[0] ); if ( bHasLayout ) { std::set aAllLayouts = GetAllLayouts(); @@ -464,11 +464,11 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel) } } - for ( sal_uInt16 j = 0; j < aPageDescs.size(); ++j ) + for ( sal_uInt16 j = 0; j < maPageDescs.size(); ++j ) { - if ( aPageDescs[j]->GetFollow() == pDel ) + if ( maPageDescs[j]->GetFollow() == pDel ) { - aPageDescs[j]->SetFollow( 0 ); + maPageDescs[j]->SetFollow( 0 ); if( bHasLayout ) { std::set aAllLayouts = GetAllLayouts(); @@ -481,9 +481,9 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel) void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily, sal_uInt16 nOp) { - if (pDocShell) + if (mpDocShell) { - SfxStyleSheetBasePool * pPool = pDocShell->GetStyleSheetPool(); + SfxStyleSheetBasePool * pPool = mpDocShell->GetStyleSheetPool(); if (pPool) { @@ -498,12 +498,12 @@ void SwDoc::BroadcastStyleOperation(String rName, SfxStyleFamily eFamily, void SwDoc::DelPageDesc( sal_uInt16 i, bool bBroadcast ) { - OSL_ENSURE( i < aPageDescs.size(), "PageDescs is out of range." ); + OSL_ENSURE( i < maPageDescs.size(), "PageDescs is out of range." ); OSL_ENSURE( i != 0, "You cannot delete the default Pagedesc."); if ( i == 0 ) return; - SwPageDesc *pDel = aPageDescs[i]; + SwPageDesc *pDel = maPageDescs[i]; if (bBroadcast) BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_PAGE, @@ -517,7 +517,7 @@ void SwDoc::DelPageDesc( sal_uInt16 i, bool bBroadcast ) PreDelPageDesc(pDel); // #i7983# - aPageDescs.erase( aPageDescs.begin() + i ); + maPageDescs.erase( maPageDescs.begin() + i ); delete pDel; SetModified(); } @@ -559,7 +559,7 @@ sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy, pNew->GetLeft().SetFmtAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) ); pNew->GetFirst().SetFmtAttr( SvxFrameDirectionItem(aFrameDirection, RES_FRAMEDIR) ); } - aPageDescs.push_back( pNew ); + maPageDescs.push_back( pNew ); if (bBroadcast) BroadcastStyleOperation(rName, SFX_STYLE_FAMILY_PAGE, @@ -571,7 +571,7 @@ sal_uInt16 SwDoc::MakePageDesc( const String &rName, const SwPageDesc *pCpy, } SetModified(); - return (aPageDescs.size()-1); + return (maPageDescs.size()-1); } SwPageDesc* SwDoc::FindPageDescByName( const String& rName, sal_uInt16* pPos ) const @@ -579,10 +579,10 @@ SwPageDesc* SwDoc::FindPageDescByName( const String& rName, sal_uInt16* pPos ) c SwPageDesc* pRet = 0; if( pPos ) *pPos = USHRT_MAX; - for( sal_uInt16 n = 0, nEnd = aPageDescs.size(); n < nEnd; ++n ) - if( aPageDescs[ n ]->GetName() == rName ) + for( sal_uInt16 n = 0, nEnd = maPageDescs.size(); n < nEnd; ++n ) + if( maPageDescs[ n ]->GetName() == rName ) { - pRet = aPageDescs[ n ]; + pRet = maPageDescs[ n ]; if( pPos ) *pPos = n; break; @@ -624,10 +624,10 @@ void SwDoc::PrtDataChanged() bEndAction = true; bDraw = false; - if( pDrawModel ) + if( mpDrawModel ) { - pDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) ); - pDrawModel->SetRefDevice( getReferenceDevice( false ) ); + mpDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) ); + mpDrawModel->SetRefDevice( getReferenceDevice( false ) ); } pFntCache->Flush(); @@ -637,21 +637,21 @@ void SwDoc::PrtDataChanged() do { - pSh->InitPrt( pPrt ); + pSh->InitPrt( mpPrt ); pSh = (ViewShell*)pSh->GetNext(); } while ( pSh != GetCurrentViewShell() ); } } - if ( bDraw && pDrawModel ) + if ( bDraw && mpDrawModel ) { const sal_Bool bTmpAddExtLeading = get(IDocumentSettingAccess::ADD_EXT_LEADING); - if ( bTmpAddExtLeading != pDrawModel->IsAddExtLeading() ) - pDrawModel->SetAddExtLeading( bTmpAddExtLeading ); + if ( bTmpAddExtLeading != mpDrawModel->IsAddExtLeading() ) + mpDrawModel->SetAddExtLeading( bTmpAddExtLeading ); OutputDevice* pOutDev = getReferenceDevice( false ); - if ( pOutDev != pDrawModel->GetRefDevice() ) - pDrawModel->SetRefDevice( pOutDev ); + if ( pOutDev != mpDrawModel->GetRefDevice() ) + mpDrawModel->SetRefDevice( pOutDev ); } PrtOLENotify( sal_True ); @@ -791,9 +791,9 @@ bool SwDoc::FindPageDesc( const String & rName, sal_uInt16 * pFound) { bool bResult = false; sal_uInt16 nI; - for (nI = 0; nI < aPageDescs.size(); nI++) + for (nI = 0; nI < maPageDescs.size(); nI++) { - if (aPageDescs[nI]->GetName() == rName) + if (maPageDescs[nI]->GetName() == rName) { *pFound = nI; bResult = true; @@ -811,7 +811,7 @@ SwPageDesc * SwDoc::GetPageDesc( const String & rName ) sal_uInt16 nI; if (FindPageDesc(rName, &nI)) - aResult = aPageDescs[nI]; + aResult = maPageDescs[nI]; return aResult; } diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index c8d9ed3d8ff9..6ff4c1a155bb 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -540,7 +540,7 @@ void SwDoc::InitDrawModel() // !! Attention: there is similar code in the Sw3 Reader (sw3imp.cxx) that // also has to be maintained!! - if ( pDrawModel ) + if ( mpDrawModel ) ReleaseDrawModel(); // Setup DrawPool and EditEnginePool. Ownership is ours and only gets passed @@ -574,38 +574,38 @@ void SwDoc::InitDrawModel() RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create DrawDocument" ); // The document owns the SdrModel. We always have two layers and one page. - pDrawModel = new SwDrawDocument( this ); + mpDrawModel = new SwDrawDocument( this ); - pDrawModel->EnableUndo( GetIDocumentUndoRedo().DoesUndo() ); + mpDrawModel->EnableUndo( GetIDocumentUndoRedo().DoesUndo() ); String sLayerNm; sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Hell" )); - nHell = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); + mnHell = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Heaven" )); - nHeaven = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); + mnHeaven = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Controls" )); - nControls = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); + mnControls = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); // add invisible layers corresponding to the visible ones. { sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleHell" )); - nInvisibleHell = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); + mnInvisibleHell = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleHeaven" )); - nInvisibleHeaven = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); + mnInvisibleHeaven = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); sLayerNm.AssignAscii(RTL_CONSTASCII_STRINGPARAM("InvisibleControls" )); - nInvisibleControls = pDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); + mnInvisibleControls = mpDrawModel->GetLayerAdmin().NewLayer( sLayerNm )->GetID(); } - SdrPage* pMasterPage = pDrawModel->AllocPage( sal_False ); - pDrawModel->InsertPage( pMasterPage ); + SdrPage* pMasterPage = mpDrawModel->AllocPage( sal_False ); + mpDrawModel->InsertPage( pMasterPage ); RTL_LOGFILE_CONTEXT_TRACE( aLog, "after create DrawDocument" ); RTL_LOGFILE_CONTEXT_TRACE( aLog, "before create Spellchecker/Hyphenator" ); - SdrOutliner& rOutliner = pDrawModel->GetDrawOutliner(); + SdrOutliner& rOutliner = mpDrawModel->GetDrawOutliner(); uno::Reference< XSpellChecker1 > xSpell = ::GetSpellChecker(); rOutliner.SetSpeller( xSpell ); uno::Reference xHyphenator( ::GetHyphenator() ); @@ -613,21 +613,21 @@ void SwDoc::InitDrawModel() RTL_LOGFILE_CONTEXT_TRACE( aLog, "after create Spellchecker/Hyphenator" ); SetCalcFieldValueHdl(&rOutliner); - SetCalcFieldValueHdl(&pDrawModel->GetHitTestOutliner()); + SetCalcFieldValueHdl(&mpDrawModel->GetHitTestOutliner()); // Set the LinkManager in the model so that linked graphics can be inserted. // The WinWord import needs it too. - pDrawModel->SetLinkManager( &GetLinkManager() ); - pDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) ); + mpDrawModel->SetLinkManager( &GetLinkManager() ); + mpDrawModel->SetAddExtLeading( get(IDocumentSettingAccess::ADD_EXT_LEADING) ); OutputDevice* pRefDev = getReferenceDevice( false ); if ( pRefDev ) - pDrawModel->SetRefDevice( pRefDev ); + mpDrawModel->SetRefDevice( pRefDev ); - pDrawModel->SetNotifyUndoActionHdl( LINK( this, SwDoc, AddDrawUndo )); - if ( pCurrentView ) + mpDrawModel->SetNotifyUndoActionHdl( LINK( this, SwDoc, AddDrawUndo )); + if ( mpCurrentView ) { - ViewShell* pViewSh = pCurrentView; + ViewShell* pViewSh = mpCurrentView; do { SwRootFrm* pRoot = pViewSh->GetLayout(); @@ -635,14 +635,14 @@ void SwDoc::InitDrawModel() { // Disable "multiple layout" for the moment: // use pMasterPage instead of a new created SdrPage - // pDrawModel->AllocPage( FALSE ); - // pDrawModel->InsertPage( pDrawPage ); + // mpDrawModel->AllocPage( FALSE ); + // mpDrawModel->InsertPage( pDrawPage ); SdrPage* pDrawPage = pMasterPage; pRoot->SetDrawPage( pDrawPage ); pDrawPage->SetSize( pRoot->Frm().SSize() ); } pViewSh = (ViewShell*)pViewSh->GetNext(); - }while( pViewSh != pCurrentView ); + }while( pViewSh != mpCurrentView ); } UpdateDrawDefaults(); @@ -770,11 +770,11 @@ SdrLayerID SwDoc::GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLa void SwDoc::ReleaseDrawModel() { - if ( pDrawModel ) + if ( mpDrawModel ) { // !! Also maintain the code in the sw3io for inserting documents!! - delete pDrawModel; pDrawModel = 0; + delete mpDrawModel; mpDrawModel = 0; SfxItemPool *pSdrPool = GetAttrPool().GetSecondaryPool(); OSL_ENSURE( pSdrPool, "missing pool" ); @@ -794,16 +794,16 @@ void SwDoc::ReleaseDrawModel() SdrModel* SwDoc::_MakeDrawModel() { - OSL_ENSURE( !pDrawModel, "_MakeDrawModel: Why?" ); + OSL_ENSURE( !mpDrawModel, "_MakeDrawModel: Why?" ); InitDrawModel(); - if ( pCurrentView ) + if ( mpCurrentView ) { - ViewShell* pTmp = pCurrentView; + ViewShell* pTmp = mpCurrentView; do { pTmp->MakeDrawView(); pTmp = (ViewShell*) pTmp->GetNext(); - } while ( pTmp != pCurrentView ); + } while ( pTmp != mpCurrentView ); // Broadcast, so that the FormShell can be connected to the DrawView if( GetDocShell() ) @@ -812,14 +812,14 @@ SdrModel* SwDoc::_MakeDrawModel() GetDocShell()->Broadcast( aHnt ); } } //swmod 071029//swmod 071225 - return pDrawModel; + return mpDrawModel; } /*************************************************************************/ void SwDoc::DrawNotifyUndoHdl() { - pDrawModel->SetNotifyUndoActionHdl( Link() ); + mpDrawModel->SetNotifyUndoActionHdl( Link() ); } /************************************************************************* @@ -922,14 +922,14 @@ IMPL_LINK(SwDoc, CalcFieldValueHdl, EditFieldInfo*, pInfo) /* TFFDI: The functions formerly declared 'inline' */ -const SdrModel* SwDoc::GetDrawModel() const { return pDrawModel; } -SdrModel* SwDoc::GetDrawModel() { return pDrawModel; } -SdrLayerID SwDoc::GetHeavenId() const { return nHeaven; } -SdrLayerID SwDoc::GetHellId() const { return nHell; } -SdrLayerID SwDoc::GetControlsId() const { return nControls; } -SdrLayerID SwDoc::GetInvisibleHeavenId() const { return nInvisibleHeaven; } -SdrLayerID SwDoc::GetInvisibleHellId() const { return nInvisibleHell; } -SdrLayerID SwDoc::GetInvisibleControlsId() const { return nInvisibleControls; } +const SdrModel* SwDoc::GetDrawModel() const { return mpDrawModel; } +SdrModel* SwDoc::GetDrawModel() { return mpDrawModel; } +SdrLayerID SwDoc::GetHeavenId() const { return mnHeaven; } +SdrLayerID SwDoc::GetHellId() const { return mnHell; } +SdrLayerID SwDoc::GetControlsId() const { return mnControls; } +SdrLayerID SwDoc::GetInvisibleHeavenId() const { return mnInvisibleHeaven; } +SdrLayerID SwDoc::GetInvisibleHellId() const { return mnInvisibleHell; } +SdrLayerID SwDoc::GetInvisibleControlsId() const { return mnInvisibleControls; } SdrModel* SwDoc::GetOrCreateDrawModel() { return GetDrawModel() ? GetDrawModel() : _MakeDrawModel(); } // #i62875# @@ -1031,8 +1031,8 @@ void SwDoc::SetDrawDefaults() void SwDoc::UpdateDrawDefaults() { // drawing layer defaults that are set for new documents (if InitNew was called) - if ( pDrawModel && mbSetDrawDefaults ) - pDrawModel->SetDrawingLayerPoolDefaults(); + if ( mpDrawModel && mbSetDrawDefaults ) + mpDrawModel->SetDrawingLayerPoolDefaults(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 539ebf4a978c..1da5be979d95 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -708,11 +708,11 @@ void SwDoc::SetModified(SwPaM &rPaM) bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr ) { SwPosition& rPt = *(SwPosition*)rRg.GetPoint(); - if( pACEWord ) // Add to AutoCorrect + if( mpACEWord ) // Add to AutoCorrect { if( 1 == rStr.Len() ) - pACEWord->CheckChar( rPt, rStr.GetChar( 0 ) ); - delete pACEWord, pACEWord = 0; + mpACEWord->CheckChar( rPt, rStr.GetChar( 0 ) ); + delete mpACEWord, mpACEWord = 0; } SwTxtNode *pNode = rPt.nNode.GetNode().GetTxtNode(); @@ -1581,13 +1581,13 @@ bool SwDoc::DeleteRangeImplImpl(SwPaM & rPam) if( !rPam.HasMark() || *pStt >= *pEnd ) return false; - if( pACEWord ) + if( mpACEWord ) { // if necessary the saved Word for the exception - if( pACEWord->IsDeleted() || pStt->nNode != pEnd->nNode || + if( mpACEWord->IsDeleted() || pStt->nNode != pEnd->nNode || pStt->nContent.GetIndex() + 1 != pEnd->nContent.GetIndex() || - !pACEWord->CheckDelChar( *pStt )) - delete pACEWord, pACEWord = 0; + !mpACEWord->CheckDelChar( *pStt )) + delete mpACEWord, mpACEWord = 0; } { @@ -2470,9 +2470,9 @@ SetRedlineMode( eOld ); // Save the current values to add them as automatic entries to to AutoCorrect. void SwDoc::SetAutoCorrExceptWord( SwAutoCorrExceptWord* pNew ) { - if( pNew != pACEWord ) - delete pACEWord; - pACEWord = pNew; + if( pNew != mpACEWord ) + delete mpACEWord; + mpACEWord = pNew; } bool SwDoc::DelFullPara( SwPaM& rPam ) diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 3fe8a0b6fc33..039843db96c8 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -73,7 +73,7 @@ extern bool IsFrameBehind( const SwTxtNode& rMyNd, sal_uInt16 nMySttPos, */ SwFieldType* SwDoc::InsertFldType(const SwFieldType &rFldTyp) { - sal_uInt16 nSize = pFldTypes->size(), + sal_uInt16 nSize = mpFldTypes->size(), nFldWhich = rFldTyp.Which(); sal_uInt16 i = INIT_FLDTYPES; @@ -95,22 +95,22 @@ SwFieldType* SwDoc::InsertFldType(const SwFieldType &rFldTyp) const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); String sFldNm( rFldTyp.GetName() ); for( ; i < nSize; ++i ) - if( nFldWhich == (*pFldTypes)[i]->Which() && - rSCmp.isEqual( sFldNm, (*pFldTypes)[i]->GetName() )) - return (*pFldTypes)[i]; + if( nFldWhich == (*mpFldTypes)[i]->Which() && + rSCmp.isEqual( sFldNm, (*mpFldTypes)[i]->GetName() )) + return (*mpFldTypes)[i]; } break; case RES_AUTHORITY: for( ; i < nSize; ++i ) - if( nFldWhich == (*pFldTypes)[i]->Which() ) - return (*pFldTypes)[i]; + if( nFldWhich == (*mpFldTypes)[i]->Which() ) + return (*mpFldTypes)[i]; break; default: for( i = 0; i < nSize; ++i ) - if( nFldWhich == (*pFldTypes)[i]->Which() ) - return (*pFldTypes)[i]; + if( nFldWhich == (*mpFldTypes)[i]->Which() ) + return (*mpFldTypes)[i]; } SwFieldType* pNew = rFldTyp.Copy(); @@ -131,17 +131,17 @@ SwFieldType* SwDoc::InsertFldType(const SwFieldType &rFldTyp) case RES_SETEXPFLD: ((SwValueFieldType*)pNew)->SetDoc( this ); // JP 29.07.96: Optionally prepare FieldList for Calculator: - pUpdtFlds->InsertFldType( *pNew ); + mpUpdtFlds->InsertFldType( *pNew ); break; case RES_AUTHORITY : ((SwAuthorityFieldType*)pNew)->SetDoc( this ); break; } - pFldTypes->insert( pFldTypes->begin() + nSize, pNew ); + mpFldTypes->insert( mpFldTypes->begin() + nSize, pNew ); SetModified(); - return (*pFldTypes)[ nSize ]; + return (*mpFldTypes)[ nSize ]; } void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp ) @@ -151,7 +151,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp ) // - If it's not present, it can be re-inserted. // - If the same type is found, the deleted one has to be renamed. - sal_uInt16 nSize = pFldTypes->size(), nFldWhich = rFldTyp.Which(); + sal_uInt16 nSize = mpFldTypes->size(), nFldWhich = rFldTyp.Which(); sal_uInt16 i = INIT_FLDTYPES; OSL_ENSURE( RES_SETEXPFLD == nFldWhich || @@ -163,7 +163,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp ) SwFieldType* pFnd; for( ; i < nSize; ++i ) - if( nFldWhich == (pFnd = (*pFldTypes)[i])->Which() && + if( nFldWhich == (pFnd = (*mpFldTypes)[i])->Which() && rSCmp.isEqual( rFldNm, pFnd->GetName() ) ) { // find new name @@ -172,7 +172,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp ) String sSrch( rFldNm ); sSrch.Append( String::CreateFromInt32( nNum )); for( i = INIT_FLDTYPES; i < nSize; ++i ) - if( nFldWhich == (pFnd = (*pFldTypes)[i])->Which() && + if( nFldWhich == (pFnd = (*mpFldTypes)[i])->Which() && rSCmp.isEqual( sSrch, pFnd->GetName() ) ) break; @@ -187,7 +187,7 @@ void SwDoc::InsDeletedFldType( SwFieldType& rFldTyp ) } // not found, so insert and delete flag - pFldTypes->insert( pFldTypes->begin() + nSize, &rFldTyp ); + mpFldTypes->insert( mpFldTypes->begin() + nSize, &rFldTyp ); switch( nFldWhich ) { case RES_SETEXPFLD: @@ -211,10 +211,10 @@ void SwDoc::RemoveFldType(sal_uInt16 nFld) /* * Dependent fields present -> ErrRaise */ - sal_uInt16 nSize = pFldTypes->size(); + sal_uInt16 nSize = mpFldTypes->size(); if(nFld < nSize) { - SwFieldType* pTmp = (*pFldTypes)[nFld]; + SwFieldType* pTmp = (*mpFldTypes)[nFld]; // JP 29.07.96: Optionally prepare FldLst for Calculator sal_uInt16 nWhich = pTmp->Which(); @@ -222,7 +222,7 @@ void SwDoc::RemoveFldType(sal_uInt16 nFld) { case RES_SETEXPFLD: case RES_USERFLD: - pUpdtFlds->RemoveFldType( *pTmp ); + mpUpdtFlds->RemoveFldType( *pTmp ); // no break; case RES_DDEFLD: if( pTmp->GetDepends() && !IsUsed( *pTmp ) ) @@ -244,14 +244,14 @@ void SwDoc::RemoveFldType(sal_uInt16 nFld) // delete field type delete pTmp; } - pFldTypes->erase( pFldTypes->begin() + nFld ); + mpFldTypes->erase( mpFldTypes->begin() + nFld ); SetModified(); } } const SwFldTypes* SwDoc::GetFldTypes() const { - return pFldTypes; + return mpFldTypes; } /*-------------------------------------------------------------------- @@ -263,7 +263,7 @@ SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName, // #i51815# ) const { - sal_uInt16 nSize = pFldTypes->size(), i = 0; + sal_uInt16 nSize = mpFldTypes->size(), i = 0; const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore(); switch( nResId ) @@ -287,7 +287,7 @@ SwFieldType* SwDoc::GetFldType( sal_uInt16 nResId, const String& rName, SwFieldType* pRet = 0; for( ; i < nSize; ++i ) { - SwFieldType* pFldType = (*pFldTypes)[i]; + SwFieldType* pFldType = (*mpFldTypes)[i]; String aFldName( pFldType->GetName() ); if (bDbFieldMatching && nResId == RES_DBFLD) // #i51815# @@ -315,9 +315,9 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB ) // Call Modify() for every field type, // dependent SwTxtFld get notified ... - for( sal_uInt16 i=0; i < pFldTypes->size(); ++i) + for( sal_uInt16 i=0; i < mpFldTypes->size(); ++i) { - switch( (*pFldTypes)[i]->Which() ) + switch( (*mpFldTypes)[i]->Which() ) { // Update table fields second to last // Update references last @@ -333,10 +333,10 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB ) if( !pNewHt ) { SwMsgPoolItem aUpdateDDE( RES_UPDATEDDETBL ); - (*pFldTypes)[i]->ModifyNotification( 0, &aUpdateDDE ); + (*mpFldTypes)[i]->ModifyNotification( 0, &aUpdateDDE ); } else - (*pFldTypes)[i]->ModifyNotification( 0, pNewHt ); + (*mpFldTypes)[i]->ModifyNotification( 0, pNewHt ); break; } case RES_GETEXPFLD: @@ -347,7 +347,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB ) if( !pNewHt ) break; default: - (*pFldTypes)[i]->ModifyNotification ( 0, pNewHt ); + (*mpFldTypes)[i]->ModifyNotification ( 0, pNewHt ); } } @@ -374,8 +374,8 @@ void SwDoc::UpdateUsrFlds() { SwCalc* pCalc = 0; const SwFieldType* pFldType; - for( sal_uInt16 i = INIT_FLDTYPES; i < pFldTypes->size(); ++i ) - if( RES_USERFLD == ( pFldType = (*pFldTypes)[i] )->Which() ) + for( sal_uInt16 i = INIT_FLDTYPES; i < mpFldTypes->size(); ++i ) + if( RES_USERFLD == ( pFldType = (*mpFldTypes)[i] )->Which() ) { if( !pCalc ) pCalc = new SwCalc( *this ); @@ -395,8 +395,8 @@ void SwDoc::UpdateUsrFlds() void SwDoc::UpdateRefFlds( SfxPoolItem* pHt ) { SwFieldType* pFldType; - for( sal_uInt16 i = 0; i < pFldTypes->size(); ++i ) - if( RES_GETREFFLD == ( pFldType = (*pFldTypes)[i] )->Which() ) + for( sal_uInt16 i = 0; i < mpFldTypes->size(); ++i ) + if( RES_GETREFFLD == ( pFldType = (*mpFldTypes)[i] )->Which() ) pFldType->ModifyNotification( 0, pHt ); } @@ -404,9 +404,9 @@ void SwDoc::UpdateRefFlds( SfxPoolItem* pHt ) //optimization currently only available when no fields exist. bool SwDoc::containsUpdatableFields() { - for (sal_uInt16 i = 0; i < pFldTypes->size(); ++i) + for (sal_uInt16 i = 0; i < mpFldTypes->size(); ++i) { - SwFieldType* pFldType = (*pFldTypes)[i]; + SwFieldType* pFldType = (*mpFldTypes)[i]; SwIterator aIter(*pFldType); if (aIter.First()) return true; @@ -421,9 +421,9 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt ) SwFieldType* pFldType(0); - for (sal_uInt16 i = 0; i < pFldTypes->size(); ++i) + for (sal_uInt16 i = 0; i < mpFldTypes->size(); ++i) { - if( RES_TABLEFLD == ( pFldType = (*pFldTypes)[i] )->Which() ) + if( RES_TABLEFLD == ( pFldType = (*mpFldTypes)[i] )->Which() ) { SwTableFmlUpdate* pUpdtFld = 0; if( pHt && RES_TABLEFML_UPDATE == pHt->Which() ) @@ -673,7 +673,7 @@ void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt ) { SwFieldType* pFldType; for( sal_uInt16 i = 0; i < INIT_FLDTYPES; ++i ) - switch( ( pFldType = (*pFldTypes)[ i ] )->Which() ) + switch( ( pFldType = (*mpFldTypes)[ i ] )->Which() ) { case RES_PAGENUMBERFLD: case RES_CHAPTERFLD: @@ -691,30 +691,30 @@ void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt ) // ---- Remove all unreferenced field types of a document -- void SwDoc::GCFieldTypes() { - for( sal_uInt16 n = pFldTypes->size(); n > INIT_FLDTYPES; ) - if( !(*pFldTypes)[ --n ]->GetDepends() ) + for( sal_uInt16 n = mpFldTypes->size(); n > INIT_FLDTYPES; ) + if( !(*mpFldTypes)[ --n ]->GetDepends() ) RemoveFldType( n ); } void SwDoc::LockExpFlds() { - ++nLockExpFld; + ++mnLockExpFld; } void SwDoc::UnlockExpFlds() { - if( nLockExpFld ) - --nLockExpFld; + if( mnLockExpFld ) + --mnLockExpFld; } bool SwDoc::IsExpFldsLocked() const { - return 0 != nLockExpFld; + return 0 != mnLockExpFld; } SwDocUpdtFld& SwDoc::GetUpdtFlds() const { - return *pUpdtFlds; + return *mpUpdtFlds; } bool SwDoc::IsNewFldLst() const @@ -1089,19 +1089,19 @@ static void lcl_CalcFld( SwDoc& rDoc, SwCalc& rCalc, const _SetGetExpFld& rSGEFl void SwDoc::FldsToCalc( SwCalc& rCalc, const _SetGetExpFld& rToThisFld ) { // create the sorted list of all SetFields - pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC ); + mpUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC ); mbNewFldLst = sal_False; SwNewDBMgr* pMgr = GetNewDBMgr(); pMgr->CloseAll(sal_False); - if( !pUpdtFlds->GetSortLst()->empty() ) + if( !mpUpdtFlds->GetSortLst()->empty() ) { _SetGetExpFlds::const_iterator const itLast = std::upper_bound( - pUpdtFlds->GetSortLst()->begin(), - pUpdtFlds->GetSortLst()->end(), + mpUpdtFlds->GetSortLst()->begin(), + mpUpdtFlds->GetSortLst()->end(), const_cast<_SetGetExpFld*>(&rToThisFld)); - for( _SetGetExpFlds::const_iterator it = pUpdtFlds->GetSortLst()->begin(); it != itLast; ++it ) + for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != itLast; ++it ) lcl_CalcFld( *this, rCalc, **it, pMgr ); } @@ -1111,14 +1111,14 @@ void SwDoc::FldsToCalc( SwCalc& rCalc, const _SetGetExpFld& rToThisFld ) void SwDoc::FldsToCalc( SwCalc& rCalc, sal_uLong nLastNd, sal_uInt16 nLastCnt ) { // create the sorted list of all SetFields - pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC ); + mpUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_CALC ); mbNewFldLst = sal_False; SwNewDBMgr* pMgr = GetNewDBMgr(); pMgr->CloseAll(sal_False); - for( _SetGetExpFlds::const_iterator it = pUpdtFlds->GetSortLst()->begin(); - it != pUpdtFlds->GetSortLst()->end() && + for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); + it != mpUpdtFlds->GetSortLst()->end() && ( (*it)->GetNode() < nLastNd || ( (*it)->GetNode() == nLastNd && (*it)->GetCntnt() <= nLastCnt ) ); @@ -1134,21 +1134,21 @@ void SwDoc::FldsToExpand( SwHash**& ppHashTbl, sal_uInt16& rTblSize, const _SetGetExpFld& rToThisFld ) { // create the sorted list of all SetFields - pUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_EXPAND ); + mpUpdtFlds->MakeFldList( *this, mbNewFldLst, GETFLD_EXPAND ); mbNewFldLst = sal_False; // Hash table for all string replacements is filled on-the-fly. // Try to fabricate an uneven number. - rTblSize = (( pUpdtFlds->GetSortLst()->size() / 7 ) + 1 ) * 7; + rTblSize = (( mpUpdtFlds->GetSortLst()->size() / 7 ) + 1 ) * 7; ppHashTbl = new SwHash*[ rTblSize ]; memset( ppHashTbl, 0, sizeof( _HashStr* ) * rTblSize ); _SetGetExpFlds::const_iterator const itLast = std::upper_bound( - pUpdtFlds->GetSortLst()->begin(), - pUpdtFlds->GetSortLst()->end(), + mpUpdtFlds->GetSortLst()->begin(), + mpUpdtFlds->GetSortLst()->end(), const_cast<_SetGetExpFld*>(&rToThisFld)); - for( _SetGetExpFlds::const_iterator it = pUpdtFlds->GetSortLst()->begin(); it != itLast; ++it ) + for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != itLast; ++it ) { const SwTxtFld* pTxtFld = (*it)->GetFld(); if( !pTxtFld ) @@ -1218,19 +1218,19 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) if( IsExpFldsLocked() || IsInReading() ) return; - bool bOldInUpdateFlds = pUpdtFlds->IsInUpdateFlds(); - pUpdtFlds->SetInUpdateFlds( true ); + bool bOldInUpdateFlds = mpUpdtFlds->IsInUpdateFlds(); + mpUpdtFlds->SetInUpdateFlds( true ); - pUpdtFlds->MakeFldList( *this, sal_True, GETFLD_ALL ); + mpUpdtFlds->MakeFldList( *this, sal_True, GETFLD_ALL ); mbNewFldLst = sal_False; - if( pUpdtFlds->GetSortLst()->empty() ) + if( mpUpdtFlds->GetSortLst()->empty() ) { if( bUpdRefFlds ) UpdateRefFlds(NULL); - pUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds ); - pUpdtFlds->SetFieldsDirty( false ); + mpUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds ); + mpUpdtFlds->SetFieldsDirty( false ); return ; } @@ -1238,15 +1238,15 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) // Hash table for all string replacements is filled on-the-fly. // Try to fabricate an uneven number. - sal_uInt16 nStrFmtCnt = (( pFldTypes->size() / 7 ) + 1 ) * 7; + sal_uInt16 nStrFmtCnt = (( mpFldTypes->size() / 7 ) + 1 ) * 7; SwHash** pHashStrTbl = new SwHash*[ nStrFmtCnt ]; memset( pHashStrTbl, 0, sizeof( _HashStr* ) * nStrFmtCnt ); { const SwFieldType* pFldType; // process seperately: - for( n = pFldTypes->size(); n; ) - switch( ( pFldType = (*pFldTypes)[ --n ] )->Which() ) + for( n = mpFldTypes->size(); n; ) + switch( ( pFldType = (*mpFldTypes)[ --n ] )->Which() ) { case RES_USERFLD: { @@ -1281,7 +1281,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) // Make sure we don't hide all sections, which would lead to a crash. First, count how many of them do we have. int nShownSections = 0; - for( _SetGetExpFlds::const_iterator it = pUpdtFlds->GetSortLst()->begin(); it != pUpdtFlds->GetSortLst()->end(); ++it ) + for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != mpUpdtFlds->GetSortLst()->end(); ++it ) { SwSection* pSect = (SwSection*)(*it)->GetSection(); if ( pSect && !pSect->IsCondHidden()) @@ -1289,7 +1289,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) } String aNew; - for( _SetGetExpFlds::const_iterator it = pUpdtFlds->GetSortLst()->begin(); it != pUpdtFlds->GetSortLst()->end(); ++it ) + for( _SetGetExpFlds::const_iterator it = mpUpdtFlds->GetSortLst()->begin(); it != mpUpdtFlds->GetSortLst()->end(); ++it ) { SwSection* pSect = (SwSection*)(*it)->GetSection(); if( pSect ) @@ -1528,8 +1528,8 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) if( bUpdRefFlds ) UpdateRefFlds(NULL); - pUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds ); - pUpdtFlds->SetFieldsDirty( false ); + mpUpdtFlds->SetInUpdateFlds( bOldInUpdateFlds ); + mpUpdtFlds->SetFieldsDirty( false ); } void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc ) @@ -1568,55 +1568,55 @@ void SwDoc::UpdateDBNumFlds( SwDBNameInfField& rDBFld, SwCalc& rCalc ) void SwDoc::_InitFieldTypes() // is being called by the CTOR { // Field types - pFldTypes->push_back( new SwDateTimeFieldType(this) ); - pFldTypes->push_back( new SwChapterFieldType ); - pFldTypes->push_back( new SwPageNumberFieldType ); - pFldTypes->push_back( new SwAuthorFieldType ); - pFldTypes->push_back( new SwFileNameFieldType(this) ); - pFldTypes->push_back( new SwDBNameFieldType(this) ); - pFldTypes->push_back( new SwGetExpFieldType(this) ); - pFldTypes->push_back( new SwGetRefFieldType( this ) ); - pFldTypes->push_back( new SwHiddenTxtFieldType ); - pFldTypes->push_back( new SwPostItFieldType(this) ); - pFldTypes->push_back( new SwDocStatFieldType(this) ); - pFldTypes->push_back( new SwDocInfoFieldType(this) ); - pFldTypes->push_back( new SwInputFieldType( this ) ); - pFldTypes->push_back( new SwTblFieldType( this ) ); - pFldTypes->push_back( new SwMacroFieldType(this) ); - pFldTypes->push_back( new SwHiddenParaFieldType ); - pFldTypes->push_back( new SwDBNextSetFieldType ); - pFldTypes->push_back( new SwDBNumSetFieldType ); - pFldTypes->push_back( new SwDBSetNumberFieldType ); - pFldTypes->push_back( new SwTemplNameFieldType(this) ); - pFldTypes->push_back( new SwTemplNameFieldType(this) ); - pFldTypes->push_back( new SwExtUserFieldType ); - pFldTypes->push_back( new SwRefPageSetFieldType ); - pFldTypes->push_back( new SwRefPageGetFieldType( this ) ); - pFldTypes->push_back( new SwJumpEditFieldType( this ) ); - pFldTypes->push_back( new SwScriptFieldType( this ) ); - pFldTypes->push_back( new SwCombinedCharFieldType ); - pFldTypes->push_back( new SwDropDownFieldType ); + mpFldTypes->push_back( new SwDateTimeFieldType(this) ); + mpFldTypes->push_back( new SwChapterFieldType ); + mpFldTypes->push_back( new SwPageNumberFieldType ); + mpFldTypes->push_back( new SwAuthorFieldType ); + mpFldTypes->push_back( new SwFileNameFieldType(this) ); + mpFldTypes->push_back( new SwDBNameFieldType(this) ); + mpFldTypes->push_back( new SwGetExpFieldType(this) ); + mpFldTypes->push_back( new SwGetRefFieldType( this ) ); + mpFldTypes->push_back( new SwHiddenTxtFieldType ); + mpFldTypes->push_back( new SwPostItFieldType(this) ); + mpFldTypes->push_back( new SwDocStatFieldType(this) ); + mpFldTypes->push_back( new SwDocInfoFieldType(this) ); + mpFldTypes->push_back( new SwInputFieldType( this ) ); + mpFldTypes->push_back( new SwTblFieldType( this ) ); + mpFldTypes->push_back( new SwMacroFieldType(this) ); + mpFldTypes->push_back( new SwHiddenParaFieldType ); + mpFldTypes->push_back( new SwDBNextSetFieldType ); + mpFldTypes->push_back( new SwDBNumSetFieldType ); + mpFldTypes->push_back( new SwDBSetNumberFieldType ); + mpFldTypes->push_back( new SwTemplNameFieldType(this) ); + mpFldTypes->push_back( new SwTemplNameFieldType(this) ); + mpFldTypes->push_back( new SwExtUserFieldType ); + mpFldTypes->push_back( new SwRefPageSetFieldType ); + mpFldTypes->push_back( new SwRefPageGetFieldType( this ) ); + mpFldTypes->push_back( new SwJumpEditFieldType( this ) ); + mpFldTypes->push_back( new SwScriptFieldType( this ) ); + mpFldTypes->push_back( new SwCombinedCharFieldType ); + mpFldTypes->push_back( new SwDropDownFieldType ); // Types have to be at the end! // We expect this in the InsertFldType! // MIB 14.04.95: In Sw3StringPool::Setup (sw3imp.cxx) and // lcl_sw3io_InSetExpField (sw3field.cxx) now also - pFldTypes->push_back( new SwSetExpFieldType(this, + mpFldTypes->push_back( new SwSetExpFieldType(this, SW_RESSTR(STR_POOLCOLL_LABEL_ABB), nsSwGetSetExpType::GSE_SEQ) ); - pFldTypes->push_back( new SwSetExpFieldType(this, + mpFldTypes->push_back( new SwSetExpFieldType(this, SW_RESSTR(STR_POOLCOLL_LABEL_TABLE), nsSwGetSetExpType::GSE_SEQ) ); - pFldTypes->push_back( new SwSetExpFieldType(this, + mpFldTypes->push_back( new SwSetExpFieldType(this, SW_RESSTR(STR_POOLCOLL_LABEL_FRAME), nsSwGetSetExpType::GSE_SEQ) ); - pFldTypes->push_back( new SwSetExpFieldType(this, + mpFldTypes->push_back( new SwSetExpFieldType(this, SW_RESSTR(STR_POOLCOLL_LABEL_DRAWING), nsSwGetSetExpType::GSE_SEQ) ); - OSL_ENSURE( pFldTypes->size() == INIT_FLDTYPES, "Bad initsize: SwFldTypes" ); + OSL_ENSURE( mpFldTypes->size() == INIT_FLDTYPES, "Bad initsize: SwFldTypes" ); } void SwDoc::InsDelFldInFldLst( bool bIns, const SwTxtFld& rFld ) { if( !mbNewFldLst || !IsInDtor() ) - pUpdtFlds->InsDelFldInFldLst( bIns, rFld ); + mpUpdtFlds->InsDelFldInFldLst( bIns, rFld ); } SwDBData SwDoc::GetDBData() @@ -1626,12 +1626,12 @@ SwDBData SwDoc::GetDBData() const SwDBData& SwDoc::GetDBDesc() { - if(aDBData.sDataSource.isEmpty()) + if(maDBData.sDataSource.isEmpty()) { - const sal_uInt16 nSize = pFldTypes->size(); - for(sal_uInt16 i = 0; i < nSize && aDBData.sDataSource.isEmpty(); ++i) + const sal_uInt16 nSize = mpFldTypes->size(); + for(sal_uInt16 i = 0; i < nSize && maDBData.sDataSource.isEmpty(); ++i) { - SwFieldType& rFldType = *((*pFldTypes)[i]); + SwFieldType& rFldType = *((*mpFldTypes)[i]); sal_uInt16 nWhich = rFldType.Which(); if(IsUsed(rFldType)) { @@ -1648,11 +1648,11 @@ const SwDBData& SwDoc::GetDBDesc() if(pFld->IsFldInDoc()) { if(RES_DBFLD == nWhich) - aDBData = + maDBData = (static_cast < SwDBFieldType * > (pFld->GetFld()->GetTyp())) ->GetDBData(); else - aDBData = (static_cast < SwDBNameInfField* > (pFld->GetFld()))->GetRealDBData(); + maDBData = (static_cast < SwDBNameInfField* > (pFld->GetFld()))->GetRealDBData(); break; } } @@ -1662,9 +1662,9 @@ const SwDBData& SwDoc::GetDBDesc() } } } - if(aDBData.sDataSource.isEmpty()) - aDBData = GetNewDBMgr()->GetAddressDBName(); - return aDBData; + if(maDBData.sDataSource.isEmpty()) + maDBData = GetNewDBMgr()->GetAddressDBName(); + return maDBData; } void SwDoc::SetInitDBFields( sal_Bool b ) @@ -2149,11 +2149,11 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, sal_uLong nLen ) void SwDoc::ChangeAuthorityData( const SwAuthEntry* pNewData ) { - const sal_uInt16 nSize = pFldTypes->size(); + const sal_uInt16 nSize = mpFldTypes->size(); for( sal_uInt16 i = INIT_FLDTYPES; i < nSize; ++i ) { - SwFieldType* pFldType = (*pFldTypes)[i]; + SwFieldType* pFldType = (*mpFldTypes)[i]; if( RES_AUTHORITY == pFldType->Which() ) { SwAuthorityFieldType* pAuthType = (SwAuthorityFieldType*)pFldType; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index f63231b447af..21f1bc752963 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -1166,29 +1166,29 @@ void SwDoc::SetDefault( const SfxItemSet& rSet ) if (isCHRATR(nWhich) || isTXTATR(nWhich)) { - aCallMod.Add( pDfltTxtFmtColl ); - aCallMod.Add( pDfltCharFmt ); + aCallMod.Add( mpDfltTxtFmtColl ); + aCallMod.Add( mpDfltCharFmt ); bCheckSdrDflt = 0 != pSdrPool; } else if ( isPARATR(nWhich) || isPARATR_LIST(nWhich) ) { - aCallMod.Add( pDfltTxtFmtColl ); + aCallMod.Add( mpDfltTxtFmtColl ); bCheckSdrDflt = 0 != pSdrPool; } else if (isGRFATR(nWhich)) { - aCallMod.Add( pDfltGrfFmtColl ); + aCallMod.Add( mpDfltGrfFmtColl ); } else if (isFRMATR(nWhich)) { - aCallMod.Add( pDfltGrfFmtColl ); - aCallMod.Add( pDfltTxtFmtColl ); - aCallMod.Add( pDfltFrmFmt ); + aCallMod.Add( mpDfltGrfFmtColl ); + aCallMod.Add( mpDfltTxtFmtColl ); + aCallMod.Add( mpDfltFrmFmt ); } else if (isBOXATR(nWhich)) { - aCallMod.Add( pDfltFrmFmt ); + aCallMod.Add( mpDfltFrmFmt ); } // also copy the defaults @@ -1242,7 +1242,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet ) aOld.ClearItem( RES_PARATR_TABSTOP ); if( bChg ) { - SwFmtChg aChgFmt( pDfltCharFmt ); + SwFmtChg aChgFmt( mpDfltCharFmt ); // notify the frames aCallMod.ModifyNotification( &aChgFmt, &aChgFmt ); } @@ -1275,7 +1275,7 @@ const SfxPoolItem& SwDoc::GetDefault( sal_uInt16 nFmtHint ) const */ void SwDoc::DelCharFmt(sal_uInt16 nFmt, bool bBroadcast) { - SwCharFmt * pDel = (*pCharFmtTbl)[nFmt]; + SwCharFmt * pDel = (*mpCharFmtTbl)[nFmt]; if (bBroadcast) BroadcastStyleOperation(pDel->GetName(), SFX_STYLE_FAMILY_CHAR, @@ -1289,15 +1289,15 @@ void SwDoc::DelCharFmt(sal_uInt16 nFmt, bool bBroadcast) GetIDocumentUndoRedo().AppendUndo(pUndo); } - delete (*pCharFmtTbl)[nFmt]; - pCharFmtTbl->erase(pCharFmtTbl->begin() + nFmt); + delete (*mpCharFmtTbl)[nFmt]; + mpCharFmtTbl->erase(mpCharFmtTbl->begin() + nFmt); SetModified(); } void SwDoc::DelCharFmt( SwCharFmt *pFmt, bool bBroadcast ) { - sal_uInt16 nFmt = pCharFmtTbl->GetPos( pFmt ); + sal_uInt16 nFmt = mpCharFmtTbl->GetPos( pFmt ); OSL_ENSURE( USHRT_MAX != nFmt, "Fmt not found," ); DelCharFmt( nFmt, bBroadcast ); } @@ -1314,8 +1314,8 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, bool bBroadcast ) { // The format has to be in the one or the other, we'll see in which one. - SwFrmFmts::iterator it = std::find( pFrmFmtTbl->begin(), pFrmFmtTbl->end(), pFmt ); - if ( it != pFrmFmtTbl->end() ) + SwFrmFmts::iterator it = std::find( mpFrmFmtTbl->begin(), mpFrmFmtTbl->end(), pFmt ); + if ( it != mpFrmFmtTbl->end() ) { if (bBroadcast) BroadcastStyleOperation(pFmt->GetName(), @@ -1330,7 +1330,7 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, bool bBroadcast ) } delete *it; - pFrmFmtTbl->erase(it); + mpFrmFmtTbl->erase(it); } else { @@ -1347,10 +1347,10 @@ void SwDoc::DelFrmFmt( SwFrmFmt *pFmt, bool bBroadcast ) void SwDoc::DelTblFrmFmt( SwTableFmt *pFmt ) { - SwFrmFmts::iterator it = std::find( pTblFrmFmtTbl->begin(), pTblFrmFmtTbl->end(), pFmt ); - OSL_ENSURE( it != pTblFrmFmtTbl->end(), "Fmt not found," ); + SwFrmFmts::iterator it = std::find( mpTblFrmFmtTbl->begin(), mpTblFrmFmtTbl->end(), pFmt ); + OSL_ENSURE( it != mpTblFrmFmtTbl->end(), "Fmt not found," ); delete *it; - pTblFrmFmtTbl->erase(it); + mpTblFrmFmtTbl->erase(it); } /* @@ -1377,13 +1377,13 @@ SwDrawFrmFmt *SwDoc::MakeDrawFrmFmt( const String &rFmtName, sal_uInt16 SwDoc::GetTblFrmFmtCount(bool bUsed) const { - sal_uInt16 nCount = pTblFrmFmtTbl->size(); + sal_uInt16 nCount = mpTblFrmFmtTbl->size(); if(bUsed) { SwAutoFmtGetDocNode aGetHt( &GetNodes() ); for ( sal_uInt16 i = nCount; i; ) { - if((*pTblFrmFmtTbl)[--i]->GetInfo( aGetHt )) + if((*mpTblFrmFmtTbl)[--i]->GetInfo( aGetHt )) --nCount; } } @@ -1400,20 +1400,20 @@ SwFrmFmt& SwDoc::GetTblFrmFmt(sal_uInt16 nFmt, bool bUsed ) const SwAutoFmtGetDocNode aGetHt( &GetNodes() ); for ( sal_uInt16 i = 0; i <= nFmt; i++ ) { - while ( (*pTblFrmFmtTbl)[ i + nRemoved]->GetInfo( aGetHt )) + while ( (*mpTblFrmFmtTbl)[ i + nRemoved]->GetInfo( aGetHt )) { nRemoved++; } } } - return *((*pTblFrmFmtTbl)[nRemoved + nFmt]); + return *((*mpTblFrmFmtTbl)[nRemoved + nFmt]); } SwTableFmt* SwDoc::MakeTblFrmFmt( const String &rFmtName, SwFrmFmt *pDerivedFrom ) { SwTableFmt* pFmt = new SwTableFmt( GetAttrPool(), rFmtName, pDerivedFrom ); - pTblFrmFmtTbl->push_back( pFmt ); + mpTblFrmFmtTbl->push_back( pFmt ); SetModified(); return pFmt; @@ -1427,7 +1427,7 @@ SwFrmFmt *SwDoc::MakeFrmFmt(const String &rFmtName, SwFrmFmt *pFmt = new SwFrmFmt( GetAttrPool(), rFmtName, pDerivedFrom ); pFmt->SetAuto(bAuto); - pFrmFmtTbl->push_back( pFmt ); + mpFrmFmtTbl->push_back( pFmt ); SetModified(); if (bBroadcast) @@ -1463,7 +1463,7 @@ SwCharFmt *SwDoc::MakeCharFmt( const String &rFmtName, bool ) { SwCharFmt *pFmt = new SwCharFmt( GetAttrPool(), rFmtName, pDerivedFrom ); - pCharFmtTbl->push_back( pFmt ); + mpCharFmtTbl->push_back( pFmt ); pFmt->SetAuto( false ); SetModified(); @@ -1505,7 +1505,7 @@ SwTxtFmtColl* SwDoc::MakeTxtFmtColl( const String &rFmtName, { SwTxtFmtColl *pFmtColl = new SwTxtFmtColl( GetAttrPool(), rFmtName, pDerivedFrom ); - pTxtFmtCollTbl->push_back(pFmtColl); + mpTxtFmtCollTbl->push_back(pFmtColl); pFmtColl->SetAuto( false ); SetModified(); @@ -1540,7 +1540,7 @@ SwConditionTxtFmtColl* SwDoc::MakeCondTxtFmtColl( const String &rFmtName, { SwConditionTxtFmtColl*pFmtColl = new SwConditionTxtFmtColl( GetAttrPool(), rFmtName, pDerivedFrom ); - pTxtFmtCollTbl->push_back(pFmtColl); + mpTxtFmtCollTbl->push_back(pFmtColl); pFmtColl->SetAuto( false ); SetModified(); @@ -1559,7 +1559,7 @@ SwGrfFmtColl* SwDoc::MakeGrfFmtColl( const String &rFmtName, { SwGrfFmtColl *pFmtColl = new SwGrfFmtColl( GetAttrPool(), rFmtName, pDerivedFrom ); - pGrfFmtCollTbl->push_back( pFmtColl ); + mpGrfFmtCollTbl->push_back( pFmtColl ); pFmtColl->SetAuto( false ); SetModified(); return pFmtColl; @@ -1570,8 +1570,8 @@ void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, bool bBroadcast) OSL_ENSURE( nFmtColl, "Remove fuer Coll 0." ); // Who has the to-be-deleted as their Next? - SwTxtFmtColl *pDel = (*pTxtFmtCollTbl)[nFmtColl]; - if( pDfltTxtFmtColl == pDel ) + SwTxtFmtColl *pDel = (*mpTxtFmtCollTbl)[nFmtColl]; + if( mpDfltTxtFmtColl == pDel ) return; // never delete default! if (bBroadcast) @@ -1587,9 +1587,9 @@ void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, bool bBroadcast) } // Remove the FmtColl - pTxtFmtCollTbl->erase(pTxtFmtCollTbl->begin() + nFmtColl); + mpTxtFmtCollTbl->erase(mpTxtFmtCollTbl->begin() + nFmtColl); // Correct next - for( SwTxtFmtColls::const_iterator it = pTxtFmtCollTbl->begin() + 1; it != pTxtFmtCollTbl->end(); ++it ) + for( SwTxtFmtColls::const_iterator it = mpTxtFmtCollTbl->begin() + 1; it != mpTxtFmtCollTbl->end(); ++it ) SetTxtFmtCollNext( *it, pDel ); delete pDel; SetModified(); @@ -1597,7 +1597,7 @@ void SwDoc::DelTxtFmtColl(sal_uInt16 nFmtColl, bool bBroadcast) void SwDoc::DelTxtFmtColl( SwTxtFmtColl *pColl, bool bBroadcast ) { - sal_uInt16 nFmt = pTxtFmtCollTbl->GetPos( pColl ); + sal_uInt16 nFmt = mpTxtFmtCollTbl->GetPos( pColl ); OSL_ENSURE( USHRT_MAX != nFmt, "Collection not found," ); DelTxtFmtColl( nFmt, bBroadcast ); } @@ -1775,7 +1775,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl ) return pNewColl; // search for the "parent" first - SwTxtFmtColl* pParent = pDfltTxtFmtColl; + SwTxtFmtColl* pParent = mpDfltTxtFmtColl; if( pParent != rColl.DerivedFrom() ) pParent = CopyTxtColl( *(SwTxtFmtColl*)rColl.DerivedFrom() ); @@ -1785,7 +1785,7 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl ) { pNewColl = new SwConditionTxtFmtColl( GetAttrPool(), rColl.GetName(), pParent); - pTxtFmtCollTbl->push_back( pNewColl ); + mpTxtFmtCollTbl->push_back( pNewColl ); pNewColl->SetAuto( false ); SetModified(); @@ -1845,7 +1845,7 @@ SwGrfFmtColl* SwDoc::CopyGrfColl( const SwGrfFmtColl& rColl ) return pNewColl; // Search for the "parent" first - SwGrfFmtColl* pParent = pDfltGrfFmtColl; + SwGrfFmtColl* pParent = mpDfltGrfFmtColl; if( pParent != rColl.DerivedFrom() ) pParent = CopyGrfColl( *(SwGrfFmtColl*)rColl.DerivedFrom() ); @@ -1920,10 +1920,10 @@ void SwDoc::CopyFmtArr( const SwFmtsBase& rSourceArr, { SwFmtPageDesc aPageDesc( *(SwFmtPageDesc*)pItem ); const String& rNm = aPageDesc.GetPageDesc()->GetName(); - SwPageDesc* pPageDesc = ::lcl_FindPageDesc( aPageDescs, rNm ); + SwPageDesc* pPageDesc = ::lcl_FindPageDesc( maPageDescs, rNm ); if( !pPageDesc ) { - pPageDesc = aPageDescs[ MakePageDesc( rNm ) ]; + pPageDesc = maPageDescs[ MakePageDesc( rNm ) ]; } aPageDesc.RegisterToPageDesc( *pPageDesc ); SwAttrSet aTmpAttrSet( pSrc->GetAttrSet() ); @@ -2048,13 +2048,13 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc, if( rSrcDesc.GetFollow() != &rSrcDesc ) { - SwPageDesc* pFollow = ::lcl_FindPageDesc( aPageDescs, + SwPageDesc* pFollow = ::lcl_FindPageDesc( maPageDescs, rSrcDesc.GetFollow()->GetName() ); if( !pFollow ) { // copy sal_uInt16 nPos = MakePageDesc( rSrcDesc.GetFollow()->GetName() ); - pFollow = aPageDescs[ nPos ]; + pFollow = maPageDescs[ nPos ]; CopyPageDesc( *rSrcDesc.GetFollow(), *pFollow ); } rDstDesc.SetFollow( pFollow ); @@ -2124,12 +2124,12 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles ) { ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); - CopyFmtArr( *rSource.pCharFmtTbl, *pCharFmtTbl, - &SwDoc::_MakeCharFmt, *pDfltCharFmt ); - CopyFmtArr( *rSource.pFrmFmtTbl, *pFrmFmtTbl, - &SwDoc::_MakeFrmFmt, *pDfltFrmFmt ); - CopyFmtArr( *rSource.pTxtFmtCollTbl, *pTxtFmtCollTbl, - &SwDoc::_MakeTxtFmtColl, *pDfltTxtFmtColl ); + CopyFmtArr( *rSource.mpCharFmtTbl, *mpCharFmtTbl, + &SwDoc::_MakeCharFmt, *mpDfltCharFmt ); + CopyFmtArr( *rSource.mpFrmFmtTbl, *mpFrmFmtTbl, + &SwDoc::_MakeFrmFmt, *mpDfltFrmFmt ); + CopyFmtArr( *rSource.mpTxtFmtCollTbl, *mpTxtFmtCollTbl, + &SwDoc::_MakeTxtFmtColl, *mpDfltTxtFmtColl ); sal_uInt16 nCnt; @@ -2143,7 +2143,7 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles ) if (bIncludePageStyles) { // and now the page templates - nCnt = rSource.aPageDescs.size(); + nCnt = rSource.maPageDescs.size(); if( nCnt ) { // a different Doc -> Number formatter needs to be merged @@ -2152,16 +2152,16 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles ) // 1st step: Create all formats (skip the 0th - it's the default!) while( nCnt ) { - SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; - if( 0 == ::lcl_FindPageDesc( aPageDescs, pSrc->GetName() ) ) + SwPageDesc *pSrc = rSource.maPageDescs[ --nCnt ]; + if( 0 == ::lcl_FindPageDesc( maPageDescs, pSrc->GetName() ) ) MakePageDesc( pSrc->GetName() ); } // 2nd step: Copy all attributes, set the right parents - for( nCnt = rSource.aPageDescs.size(); nCnt; ) + for( nCnt = rSource.maPageDescs.size(); nCnt; ) { - SwPageDesc *pSrc = rSource.aPageDescs[ --nCnt ]; - CopyPageDesc( *pSrc, *::lcl_FindPageDesc( aPageDescs, pSrc->GetName() )); + SwPageDesc *pSrc = rSource.maPageDescs[ --nCnt ]; + CopyPageDesc( *pSrc, *::lcl_FindPageDesc( maPageDescs, pSrc->GetName() )); } } } @@ -2289,7 +2289,7 @@ bool SwDoc::DontExpandFmt( const SwPosition& rPos, bool bFlag ) SwTableBoxFmt* SwDoc::MakeTableBoxFmt() { SwTableBoxFmt* pFmt = new SwTableBoxFmt( GetAttrPool(), aEmptyStr, - pDfltFrmFmt ); + mpDfltFrmFmt ); SetModified(); return pFmt; } @@ -2297,7 +2297,7 @@ SwTableBoxFmt* SwDoc::MakeTableBoxFmt() SwTableLineFmt* SwDoc::MakeTableLineFmt() { SwTableLineFmt* pFmt = new SwTableLineFmt( GetAttrPool(), aEmptyStr, - pDfltFrmFmt ); + mpDfltFrmFmt ); SetModified(); return pFmt; } @@ -2306,14 +2306,14 @@ void SwDoc::_CreateNumberFormatter() { RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "SW", "JP93722", "SwDoc::_CreateNumberFormatter" ); - OSL_ENSURE( !pNumberFormatter, "is already there" ); + OSL_ENSURE( !mpNumberFormatter, "is already there" ); LanguageType eLang = LANGUAGE_SYSTEM; - pNumberFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLang ); - pNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL ); - pNumberFormatter->SetYear2000(static_cast(::utl::MiscCfg().GetYear2000())); + mpNumberFormatter = new SvNumberFormatter( comphelper::getProcessComponentContext(), eLang ); + mpNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL ); + mpNumberFormatter->SetYear2000(static_cast(::utl::MiscCfg().GetYear2000())); } diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index e58d29ecbda8..56ac5ee27110 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -278,7 +278,7 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo) *pNewChrFmt = rInfo.GetCharFmt( *this ); bool bFtnChrFmts = pOldChrFmt != pNewChrFmt; - *pFtnInfo = rInfo; + *mpFtnInfo = rInfo; if (pTmpRoot) { @@ -314,7 +314,7 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo) { SwFmtChg aOld( pOldChrFmt ); SwFmtChg aNew( pNewChrFmt ); - pFtnInfo->ModifyNotification( &aOld, &aNew ); + mpFtnInfo->ModifyNotification( &aOld, &aNew ); } // #i81002# no update during loading @@ -353,7 +353,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) *pNewChrFmt = rInfo.GetCharFmt( *this ); bool bFtnChrFmts = pOldChrFmt != pNewChrFmt; - *pEndNoteInfo = rInfo; + *mpEndNoteInfo = rInfo; if ( pTmpRoot ) { @@ -383,7 +383,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo) { SwFmtChg aOld( pOldChrFmt ); SwFmtChg aNew( pNewChrFmt ); - pEndNoteInfo->ModifyNotification( &aOld, &aNew ); + mpEndNoteInfo->ModifyNotification( &aOld, &aNew ); } // #i81002# no update during loading diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index be192d2d0250..9bd14f07aa9f 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -151,7 +151,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c // Iterate over all the template's Nodes, creating an own // document for every single one and replace linked sections (GlobalDoc) for links (HTML). // Finally, we save this document as a GlobalDoc/HTMLDoc. - if( !pDocShell || !pDocShell->GetMedium() || + if( !mpDocShell || !mpDocShell->GetMedium() || ( SPLITDOC_TO_GLOBALDOC == eDocType && get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) ) return false; @@ -290,8 +290,8 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c pDoc->ReplaceStyles( *this ); // Take over chapter numbering - if( pOutlineRule ) - pDoc->SetOutlineNumRule( *pOutlineRule ); + if( mpOutlineRule ) + pDoc->SetOutlineNumRule( *mpOutlineRule ); SwNodeRange aRg( *pStartNd, 0, aEndIdx.GetNode() ); SwNodeIndex aTmpIdx( pDoc->GetNodes().GetEndOfContent() ); @@ -488,7 +488,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c while( !GetSections().empty() ) DelSectionFmt( GetSections().front() ); - SfxFilterContainer* pFCntnr = pDocShell->GetFactory().GetFilterContainer(); + SfxFilterContainer* pFCntnr = mpDocShell->GetFactory().GetFilterContainer(); pFilter = pFCntnr->GetFilter4EA( pFilter->GetTypeName(), SFX_FILTER_EXPORT ); } break; @@ -505,7 +505,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c aReq.AppendItem( SfxBoolItem( SID_SAVETO, sal_True ) ); if(pFilter) aReq.AppendItem( SfxStringItem( SID_FILTER_NAME, pFilter->GetName() ) ); - const SfxBoolItem *pRet = (const SfxBoolItem*)pDocShell->ExecuteSlot( aReq ); + const SfxBoolItem *pRet = (const SfxBoolItem*)mpDocShell->ExecuteSlot( aReq ); return pRet && pRet->GetValue(); } diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index b97a2639bc41..4329d28315d2 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1489,7 +1489,7 @@ SwDoc::InsertLabel( bBefore, nId, rCharacterStyle, bCpyBrd ); } - SwFlyFrmFmt *const pNewFmt = lcl_InsertLabel(*this, pTxtFmtCollTbl, pUndo, + SwFlyFrmFmt *const pNewFmt = lcl_InsertLabel(*this, mpTxtFmtCollTbl, pUndo, eType, rTxt, rSeparator, rNumberingSeparator, bBefore, nId, nNdIdx, rCharacterStyle, bCpyBrd); @@ -1781,7 +1781,7 @@ SwFlyFrmFmt* SwDoc::InsertDrawLabel( } SwFlyFrmFmt *const pNewFmt = lcl_InsertDrawLabel( - *this, pTxtFmtCollTbl, pUndo, pOldFmt, + *this, mpTxtFmtCollTbl, pUndo, pOldFmt, rTxt, rSeparator, rNumberSeparator, nId, rCharacterStyle, rSdrObj); if (pUndo) @@ -1806,31 +1806,31 @@ void SwDoc::StartIdling() { mbStartIdleTimer = true; if( !mIdleBlockCount ) - aIdleTimer.Start(); + maIdleTimer.Start(); } void SwDoc::StopIdling() { mbStartIdleTimer = false; - aIdleTimer.Stop(); + maIdleTimer.Stop(); } void SwDoc::BlockIdling() { - aIdleTimer.Stop(); + maIdleTimer.Stop(); ++mIdleBlockCount; } void SwDoc::UnblockIdling() { --mIdleBlockCount; - if( !mIdleBlockCount && mbStartIdleTimer && !aIdleTimer.IsActive() ) - aIdleTimer.Start(); + if( !mIdleBlockCount && mbStartIdleTimer && !maIdleTimer.IsActive() ) + maIdleTimer.Start(); } void SwDoc::StartBackgroundJobs() { // Trigger DoIdleJobs(), asynchronously. - aIdleTimer.Start(); + maIdleTimer.Start(); } /************************************************************************* @@ -1848,7 +1848,7 @@ IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer ) SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219 if( pTmpRoot && - !SfxProgress::GetActiveProgress( pDocShell ) ) + !SfxProgress::GetActiveProgress( mpDocShell ) ) { ViewShell *pSh, *pStartSh; pSh = pStartSh = GetCurrentViewShell(); @@ -2168,7 +2168,7 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const // Because Redlines are also attached to Start and EndNoden, // the Index must not necessarily be from a ContentNode. SwNode* pNd = &rIdx.GetNode(); - if( pNd->IsCntntNode() && pCurrentView )//swmod 071029//swmod 071225 + if( pNd->IsCntntNode() && mpCurrentView )//swmod 071029//swmod 071225 { const SwFrm *pFrm = pNd->GetCntntNode()->getLayoutFrm( GetCurrentLayout() ); if( pFrm ) @@ -2284,32 +2284,32 @@ bool SwDoc::IsInVerticalText( const SwPosition& rPos, const Point* pPt ) const void SwDoc::SetCurrentViewShell( ViewShell* pNew ) { - pCurrentView = pNew; + mpCurrentView = pNew; } SwLayouter* SwDoc::GetLayouter() { - return pLayouter; + return mpLayouter; } const SwLayouter* SwDoc::GetLayouter() const { - return pLayouter; + return mpLayouter; } void SwDoc::SetLayouter( SwLayouter* pNew ) { - pLayouter = pNew; + mpLayouter = pNew; } const ViewShell *SwDoc::GetCurrentViewShell() const { - return pCurrentView; + return mpCurrentView; } ViewShell *SwDoc::GetCurrentViewShell() { - return pCurrentView; + return mpCurrentView; } //swmod 080219 @@ -2331,7 +2331,7 @@ SwRootFrm *SwDoc::GetCurrentLayout() bool SwDoc::HasLayout() const { // if there is a view, there is always a layout - return (pCurrentView != 0); + return (mpCurrentView != 0); } std::set SwDoc::GetAllLayouts() @@ -2356,7 +2356,7 @@ std::set SwDoc::GetAllLayouts() void SwDoc::ShareLayout(boost::shared_ptr& rPtr) { - pLayoutPtr = rPtr; + mpLayoutPtr = rPtr; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 7b1faa60025e..2ed4de3f13ac 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -142,13 +142,13 @@ void StartGrammarChecking( SwDoc &rDoc ) { // check for a visible view bool bVisible = false; - const SwDocShell *pDocShell = rDoc.GetDocShell(); - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False ); + const SwDocShell *mpDocShell = rDoc.GetDocShell(); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( mpDocShell, sal_False ); while (pFrame && !bVisible) { if (pFrame->IsVisible()) bVisible = true; - pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False ); + pFrame = SfxViewFrame::GetNext( *pFrame, mpDocShell, sal_False ); } //!! only documents with visible views need to be checked @@ -190,69 +190,69 @@ SwDoc::SwDoc() : m_pNodes( new SwNodes(this) ) , mpAttrPool(new SwAttrPool(this)), - pMarkManager(new ::sw::mark::MarkManager(*this)), + mpMarkManager(new ::sw::mark::MarkManager(*this)), m_pMetaFieldManager(new ::sw::MetaFieldManager()), m_pUndoManager(new ::sw::UndoManager( ::std::auto_ptr(new SwNodes(this)), *this, *this, *this)), - pDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ), - pEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, pDfltFrmFmt ) ), - pColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, pDfltFrmFmt ) ), - pDfltCharFmt( new SwCharFmt( GetAttrPool(), sCharFmtStr, 0 ) ), - pDfltTxtFmtColl( new SwTxtFmtColl( GetAttrPool(), sTxtCollStr ) ), - pDfltGrfFmtColl( new SwGrfFmtColl( GetAttrPool(), sGrfCollStr ) ), - pFrmFmtTbl( new SwFrmFmts() ), - pCharFmtTbl( new SwCharFmts() ), - pSpzFrmFmtTbl( new SwFrmFmts() ), - pSectionFmtTbl( new SwSectionFmts() ), - pTblFrmFmtTbl( new SwFrmFmts() ), - pTxtFmtCollTbl( new SwTxtFmtColls() ), - pGrfFmtCollTbl( new SwGrfFmtColls() ), - pTOXTypes( new SwTOXTypes() ), - pDefTOXBases( new SwDefTOXBase_Impl() ), - pCurrentView( 0 ), //swmod 071225 - pDrawModel( 0 ), - pUpdtFlds( new SwDocUpdtFld( this ) ), - pFldTypes( new SwFldTypes() ), - pVirDev( 0 ), - pPrt( 0 ), - pPrtData( 0 ), - pGlossaryDoc( 0 ), - pOutlineRule( 0 ), - pFtnInfo( new SwFtnInfo ), - pEndNoteInfo( new SwEndNoteInfo ), - pLineNumberInfo( new SwLineNumberInfo ), - pFtnIdxs( new SwFtnIdxs ), - pDocStat( new SwDocStat ), - pDocShell( 0 ), - pLinkMgr( new sfx2::LinkManager( 0 ) ), - pACEWord( 0 ), - pURLStateChgd( 0 ), - pNumberFormatter( 0 ), - pNumRuleTbl( new SwNumRuleTbl ), + mpDfltFrmFmt( new SwFrmFmt( GetAttrPool(), sFrmFmtStr, 0 ) ), + mpEmptyPageFmt( new SwFrmFmt( GetAttrPool(), sEmptyPageStr, mpDfltFrmFmt ) ), + mpColumnContFmt( new SwFrmFmt( GetAttrPool(), sColumnCntStr, mpDfltFrmFmt ) ), + mpDfltCharFmt( new SwCharFmt( GetAttrPool(), sCharFmtStr, 0 ) ), + mpDfltTxtFmtColl( new SwTxtFmtColl( GetAttrPool(), sTxtCollStr ) ), + mpDfltGrfFmtColl( new SwGrfFmtColl( GetAttrPool(), sGrfCollStr ) ), + mpFrmFmtTbl( new SwFrmFmts() ), + mpCharFmtTbl( new SwCharFmts() ), + mpSpzFrmFmtTbl( new SwFrmFmts() ), + mpSectionFmtTbl( new SwSectionFmts() ), + mpTblFrmFmtTbl( new SwFrmFmts() ), + mpTxtFmtCollTbl( new SwTxtFmtColls() ), + mpGrfFmtCollTbl( new SwGrfFmtColls() ), + mpTOXTypes( new SwTOXTypes() ), + mpDefTOXBases( new SwDefTOXBase_Impl() ), + mpCurrentView( 0 ), //swmod 071225 + mpDrawModel( 0 ), + mpUpdtFlds( new SwDocUpdtFld( this ) ), + mpFldTypes( new SwFldTypes() ), + mpVirDev( 0 ), + mpPrt( 0 ), + mpPrtData( 0 ), + mpGlossaryDoc( 0 ), + mpOutlineRule( 0 ), + mpFtnInfo( new SwFtnInfo ), + mpEndNoteInfo( new SwEndNoteInfo ), + mpLineNumberInfo( new SwLineNumberInfo ), + mpFtnIdxs( new SwFtnIdxs ), + mpDocStat( new SwDocStat ), + mpDocShell( 0 ), + mpLinkMgr( new sfx2::LinkManager( 0 ) ), + mpACEWord( 0 ), + mpURLStateChgd( 0 ), + mpNumberFormatter( 0 ), + mpNumRuleTbl( new SwNumRuleTbl ), maLists(), maListStyleLists(), - pRedlineTbl( new SwRedlineTbl ), - pAutoFmtRedlnComment( 0 ), - pUnoCrsrTbl( new SwUnoCrsrTbl() ), - pPgPViewPrtData( 0 ), - pExtInputRing( 0 ), - pLayouter( 0 ), - pStyleAccess( 0 ), - pLayoutCache( 0 ), - pUnoCallBack(new SwModify(0)), + mpRedlineTbl( new SwRedlineTbl ), + mpAutoFmtRedlnComment( 0 ), + mpUnoCrsrTbl( new SwUnoCrsrTbl() ), + mpPgPViewPrtData( 0 ), + mpExtInputRing( 0 ), + mpLayouter( 0 ), + mpStyleAccess( 0 ), + mpLayoutCache( 0 ), + mpUnoCallBack(new SwModify(0)), mpGrammarContact(createGrammarContact()), - aChartDataProviderImplRef(), - pChartControllerHelper( 0 ), + maChartDataProviderImplRef(), + mpChartControllerHelper( 0 ), mpListItemsList( new tImplSortedNodeNumList() ), // #i83479# m_pXmlIdRegistry(), - nAutoFmtRedlnCommentNo( 0 ), - nLinkUpdMode( GLOBALSETTING ), - eFldUpdMode( AUTOUPD_GLOBALSETTING ), - eRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)), - eChrCmprType( CHARCOMPRESS_NONE ), + mnAutoFmtRedlnCommentNo( 0 ), + mnLinkUpdMode( GLOBALSETTING ), + meFldUpdMode( AUTOUPD_GLOBALSETTING ), + meRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)), + meChrCmprType( CHARCOMPRESS_NONE ), mReferenceCount(0), mIdleBlockCount(0), - nLockExpFld( 0 ), + mnLockExpFld( 0 ), mbGlossDoc(false), mbModified(false), mbDtor(false), @@ -319,8 +319,8 @@ SwDoc::SwDoc() mbBackgroundParaOverDrawings(false), mbTabOverMargin(false), mbLastBrowseMode( false ), - n32DummyCompatabilityOptions1(0), - n32DummyCompatabilityOptions2(0), + mn32DummyCompatabilityOptions1(0), + mn32DummyCompatabilityOptions2(0), // COMPATIBILITY FLAGS END @@ -361,53 +361,53 @@ SwDoc::SwDoc() * DefaultFormats and are also in the list. */ /* Formats */ - pFrmFmtTbl->push_back(pDfltFrmFmt); - pCharFmtTbl->push_back(pDfltCharFmt); + mpFrmFmtTbl->push_back(mpDfltFrmFmt); + mpCharFmtTbl->push_back(mpDfltCharFmt); /* FmtColls */ // TXT - pTxtFmtCollTbl->push_back(pDfltTxtFmtColl); + mpTxtFmtCollTbl->push_back(mpDfltTxtFmtColl); // GRF - pGrfFmtCollTbl->push_back(pDfltGrfFmtColl); + mpGrfFmtCollTbl->push_back(mpDfltGrfFmtColl); // Create PageDesc, EmptyPageFmt and ColumnFmt - if ( aPageDescs.empty() ) + if ( maPageDescs.empty() ) GetPageDescFromPool( RES_POOLPAGE_STANDARD ); // Set to "Empty Page" - pEmptyPageFmt->SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE ) ); + mpEmptyPageFmt->SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE ) ); // Set BodyFmt for columns - pColumnContFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ) ); + mpColumnContFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ) ); _InitFieldTypes(); // Create a default OutlineNumRule (for Filters) - pOutlineRule = new SwNumRule( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), + mpOutlineRule = new SwNumRule( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), // #i89178# numfunc::GetDefaultPositionAndSpaceMode(), OUTLINE_RULE ); - AddNumRule(pOutlineRule); + AddNumRule(mpOutlineRule); // Counting of phantoms depends on - pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) ); + mpOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) ); new SwTxtNode( SwNodeIndex(GetUndoManager().GetUndoNodes().GetEndOfContent()), - pDfltTxtFmtColl ); + mpDfltTxtFmtColl ); new SwTxtNode( SwNodeIndex( GetNodes().GetEndOfContent() ), GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); // set the own IdleTimer - aIdleTimer.SetTimeout( 600 ); - aIdleTimer.SetTimeoutHdl( LINK(this, SwDoc, DoIdleJobs) ); + maIdleTimer.SetTimeout( 600 ); + maIdleTimer.SetTimeoutHdl( LINK(this, SwDoc, DoIdleJobs) ); - aOLEModifiedTimer.SetTimeout( 1000 ); - aOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE )); + maOLEModifiedTimer.SetTimeout( 1000 ); + maOLEModifiedTimer.SetTimeoutHdl( LINK( this, SwDoc, DoUpdateModifiedOLE )); - aStatsUpdateTimer.SetTimeout( 100 ); - aStatsUpdateTimer.SetTimeoutHdl( LINK( this, SwDoc, DoIdleStatsUpdate ) ); + maStatsUpdateTimer.SetTimeout( 100 ); + maStatsUpdateTimer.SetTimeoutHdl( LINK( this, SwDoc, DoIdleStatsUpdate ) ); // Create DBMgr - pNewDBMgr = new SwNewDBMgr; + mpNewDBMgr = new SwNewDBMgr; // create TOXTypes InitTOXTypes(); @@ -416,16 +416,16 @@ SwDoc::SwDoc() // as ignorable items to the stype manager. { SfxItemSet aIgnorableParagraphItems( GetAttrPool(), RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1); - pStyleAccess = createStyleManager( &aIgnorableParagraphItems ); + mpStyleAccess = createStyleManager( &aIgnorableParagraphItems ); } // Initialize the session id of the current document to a random number // smaller than 2^21. static rtlRandomPool aPool = rtl_random_createPool(); - rtl_random_getBytes( aPool, &nRsid, sizeof ( nRsid ) ); - nRsid &= ( 1<<21 ) - 1; - nRsid++; - nRsidRoot = nRsid; + rtl_random_getBytes( aPool, &mnRsid, sizeof ( mnRsid ) ); + mnRsid &= ( 1<<21 ) - 1; + mnRsid++; + mnRsidRoot = mnRsid; ResetModified(); } @@ -480,9 +480,9 @@ SwDoc::~SwDoc() // nothing here should create Undo actions! GetIDocumentUndoRedo().DoUndo(false); - if (pDocShell) + if (mpDocShell) { - pDocShell->SetUndoManager(0); + mpDocShell->SetUndoManager(0); } @@ -494,8 +494,8 @@ SwDoc::~SwDoc() // Note: the chart data provider gets already diposed in ~SwDocShell // since all UNO API related functionality requires an existing SwDocShell // this assures that dipose gets called if there is need for it. - aChartDataProviderImplRef.reset(); - delete pChartControllerHelper; + maChartDataProviderImplRef.reset(); + delete mpChartControllerHelper; delete mpGrammarContact; mpGrammarContact = 0; @@ -511,41 +511,41 @@ SwDoc::~SwDoc() SetDefault(aCharFmt); StopIdling(); // stop idle timer - aStatsUpdateTimer.Stop(); + maStatsUpdateTimer.Stop(); - delete pUnoCallBack, pUnoCallBack = 0; - delete pURLStateChgd; + delete mpUnoCallBack, mpUnoCallBack = 0; + delete mpURLStateChgd; - delete pLayouter; - pLayouter = 0L; + delete mpLayouter; + mpLayouter = 0L; // Deactivate Undo notification from Draw - if( pDrawModel ) + if( mpDrawModel ) { DrawNotifyUndoHdl(); ClrContourCache(); } - delete pPgPViewPrtData; + delete mpPgPViewPrtData; mbDtor = true; - pLayoutPtr.reset(); + mpLayoutPtr.reset(); - delete pRedlineTbl; - delete pUnoCrsrTbl; - delete pAutoFmtRedlnComment; - delete pUpdtFlds; - delete pACEWord; + delete mpRedlineTbl; + delete mpUnoCrsrTbl; + delete mpAutoFmtRedlnComment; + delete mpUpdtFlds; + delete mpACEWord; // Release the BaseLinks { - ::sfx2::SvLinkSources aTemp(pLinkMgr->GetServers()); + ::sfx2::SvLinkSources aTemp(mpLinkMgr->GetServers()); for( ::sfx2::SvLinkSources::const_iterator it = aTemp.begin(); it != aTemp.end(); ++it ) (*it)->Closed(); - if( !pLinkMgr->GetLinks().empty() ) - pLinkMgr->Remove( 0, pLinkMgr->GetLinks().size() ); + if( !mpLinkMgr->GetLinks().empty() ) + mpLinkMgr->Remove( 0, mpLinkMgr->GetLinks().size() ); } // The ChapterNumbers/Numbers need to be deleted before the styles @@ -554,19 +554,19 @@ SwDoc::~SwDoc() SwNodes & rUndoNodes( GetUndoManager().GetUndoNodes() ); rUndoNodes.pOutlineNds->clear(); - pFtnIdxs->clear(); + mpFtnIdxs->clear(); // indices could be registered in attributes m_pUndoManager->DelAllUndoObj(); // The BookMarks contain indices to the Content. These must be deleted // before deleting the Nodes. - pMarkManager->clearAllMarks(); + mpMarkManager->clearAllMarks(); - if( pExtInputRing ) + if( mpExtInputRing ) { - Ring* pTmp = pExtInputRing; - pExtInputRing = 0; + Ring* pTmp = mpExtInputRing; + mpExtInputRing = 0; while( pTmp->GetNext() != pTmp ) delete pTmp->GetNext(); delete pTmp; @@ -575,31 +575,31 @@ SwDoc::~SwDoc() // Old - deletion without a Flag is expensive, because we send a Modify // aTOXTypes.DeleteAndDestroy( 0, aTOXTypes.Count() ); { - for( sal_uInt16 n = pTOXTypes->size(); n; ) + for( sal_uInt16 n = mpTOXTypes->size(); n; ) { - (*pTOXTypes)[ --n ]->SetInDocDTOR(); - delete (*pTOXTypes)[ n ]; + (*mpTOXTypes)[ --n ]->SetInDocDTOR(); + delete (*mpTOXTypes)[ n ]; } - pTOXTypes->clear(); + mpTOXTypes->clear(); } - delete pDefTOXBases; + delete mpDefTOXBases; // Any of the FrmFormats can still have indices registered. // These need to be destroyed now at the latest. - BOOST_FOREACH( SwFrmFmt* pFmt, *pFrmFmtTbl ) + BOOST_FOREACH( SwFrmFmt* pFmt, *mpFrmFmtTbl ) lcl_DelFmtIndizes( pFmt ); - BOOST_FOREACH( SwFrmFmt* pFmt, *pSpzFrmFmtTbl ) + BOOST_FOREACH( SwFrmFmt* pFmt, *mpSpzFrmFmtTbl ) lcl_DelFmtIndizes( pFmt ); - BOOST_FOREACH( SwSectionFmt* pFmt, *pSectionFmtTbl ) + BOOST_FOREACH( SwSectionFmt* pFmt, *mpSectionFmtTbl ) lcl_DelFmtIndizes( pFmt ); // The formats/styles that follow depend on the default formats. // Destroy these only after destroying the FmtIndices, because the content // of headers/footers has to be deleted as well. If in the headers/footers // there are still Flys registered at that point, we have a problem. - BOOST_FOREACH(SwPageDesc *pPageDesc, aPageDescs) + BOOST_FOREACH(SwPageDesc *pPageDesc, maPageDescs) delete pPageDesc; - aPageDescs.clear(); + maPageDescs.clear(); // Delete content selections. // Don't wait for the SwNodes dtor to destroy them; so that Formats @@ -611,25 +611,25 @@ SwDoc::~SwDoc() // Delete for Collections // So that we get rid of the dependencies - pFtnInfo->ReleaseCollection(); - pEndNoteInfo->ReleaseCollection(); + mpFtnInfo->ReleaseCollection(); + mpEndNoteInfo->ReleaseCollection(); - OSL_ENSURE( pDfltTxtFmtColl == (*pTxtFmtCollTbl)[0], + OSL_ENSURE( mpDfltTxtFmtColl == (*mpTxtFmtCollTbl)[0], "Default-Text-Collection must always be at the start" ); // Optimization: Based on the fact that Standard is always 2nd in the // array, we should delete it as the last. With this we avoid // reparenting the Formats all the time! - if( 2 < pTxtFmtCollTbl->size() ) - DeleteAndDestroy(*pTxtFmtCollTbl, 2, pTxtFmtCollTbl->size()); - DeleteAndDestroy(*pTxtFmtCollTbl, 1, pTxtFmtCollTbl->size()); - delete pTxtFmtCollTbl; + if( 2 < mpTxtFmtCollTbl->size() ) + DeleteAndDestroy(*mpTxtFmtCollTbl, 2, mpTxtFmtCollTbl->size()); + DeleteAndDestroy(*mpTxtFmtCollTbl, 1, mpTxtFmtCollTbl->size()); + delete mpTxtFmtCollTbl; - OSL_ENSURE( pDfltGrfFmtColl == (*pGrfFmtCollTbl)[0], + OSL_ENSURE( mpDfltGrfFmtColl == (*mpGrfFmtCollTbl)[0], "DefaultGrfCollection must always be at the start" ); - DeleteAndDestroy(*pGrfFmtCollTbl, 1, pGrfFmtCollTbl->size()); - delete pGrfFmtCollTbl; + DeleteAndDestroy(*mpGrfFmtCollTbl, 1, mpGrfFmtCollTbl->size()); + delete mpGrfFmtCollTbl; /* * DefaultFormats and DefaultFormatCollections (FmtColl) @@ -637,16 +637,16 @@ SwDoc::~SwDoc() * In order to not be deleted by the array's dtor, we remove them * now. */ - pFrmFmtTbl->erase( pFrmFmtTbl->begin() ); - pCharFmtTbl->erase( pCharFmtTbl->begin() ); + mpFrmFmtTbl->erase( mpFrmFmtTbl->begin() ); + mpCharFmtTbl->erase( mpCharFmtTbl->begin() ); - DELETEZ( pPrt ); - DELETEZ( pNewDBMgr ); + DELETEZ( mpPrt ); + DELETEZ( mpNewDBMgr ); // All Flys need to be destroyed before the Drawing Model, // because Flys can still contain DrawContacts, when no // Layout could be constructed due to a read error. - DeleteAndDestroy( *pSpzFrmFmtTbl, 0, pSpzFrmFmtTbl->size() ); + DeleteAndDestroy( *mpSpzFrmFmtTbl, 0, mpSpzFrmFmtTbl->size() ); // Only now destroy the Model, the drawing objects - which are also // contained in the Undo - need to remove their attributes from the @@ -654,21 +654,21 @@ SwDoc::~SwDoc() ReleaseDrawModel(); // Destroy DrawModel before the LinkManager, because it's always set // in the DrawModel. - DELETEZ( pLinkMgr ); + DELETEZ( mpLinkMgr ); // Clear the Tables before deleting the defaults, or we crash due to // dependencies on defaults. - delete pFrmFmtTbl; - delete pSpzFrmFmtTbl; + delete mpFrmFmtTbl; + delete mpSpzFrmFmtTbl; - delete pStyleAccess; + delete mpStyleAccess; - delete pCharFmtTbl; - delete pSectionFmtTbl; - delete pTblFrmFmtTbl; - delete pDfltTxtFmtColl; - delete pDfltGrfFmtColl; - delete pNumRuleTbl; + delete mpCharFmtTbl; + delete mpSectionFmtTbl; + delete mpTblFrmFmtTbl; + delete mpDfltTxtFmtColl; + delete mpDfltGrfFmtColl; + delete mpNumRuleTbl; { for ( boost::unordered_map< String, SwList*, StringHash >::iterator @@ -682,21 +682,21 @@ SwDoc::~SwDoc() } maListStyleLists.clear(); - delete pPrtData; - delete pNumberFormatter; - delete pFtnInfo; - delete pEndNoteInfo; - delete pLineNumberInfo; - delete pFtnIdxs; - delete pFldTypes; - delete pTOXTypes; - delete pDocStat; - delete pEmptyPageFmt; - delete pColumnContFmt; - delete pDfltCharFmt; - delete pDfltFrmFmt; - delete pLayoutCache; - delete pVirDev; + delete mpPrtData; + delete mpNumberFormatter; + delete mpFtnInfo; + delete mpEndNoteInfo; + delete mpLineNumberInfo; + delete mpFtnIdxs; + delete mpFldTypes; + delete mpTOXTypes; + delete mpDocStat; + delete mpEmptyPageFmt; + delete mpColumnContFmt; + delete mpDfltCharFmt; + delete mpDfltFrmFmt; + delete mpLayoutCache; + delete mpVirDev; SfxItemPool::Free(mpAttrPool); } @@ -716,12 +716,12 @@ VirtualDevice& SwDoc::CreateVirtualDevice_() const pNewVir->SetMapMode( aMapMode ); const_cast(this)->setVirtualDevice( pNewVir, true, true ); - return *pVirDev; + return *mpVirDev; } SfxPrinter& SwDoc::CreatePrinter_() const { - OSL_ENSURE( ! pPrt, "Do not call CreatePrinter_(), call getPrinter() instead" ); + OSL_ENSURE( ! mpPrt, "Do not call CreatePrinter_(), call getPrinter() instead" ); #if OSL_DEBUG_LEVEL > 1 OSL_TRACE( "Printer will be created!" ); @@ -738,29 +738,29 @@ SfxPrinter& SwDoc::CreatePrinter_() const SfxPrinter* pNewPrt = new SfxPrinter( pSet ); const_cast(this)->setPrinter( pNewPrt, true, true ); - return *pPrt; + return *mpPrt; } void SwDoc::SetDocShell( SwDocShell* pDSh ) { - if( pDocShell != pDSh ) + if( mpDocShell != pDSh ) { - if (pDocShell) + if (mpDocShell) { - pDocShell->SetUndoManager(0); + mpDocShell->SetUndoManager(0); } - pDocShell = pDSh; - if (pDocShell) + mpDocShell = pDSh; + if (mpDocShell) { - pDocShell->SetUndoManager(& GetUndoManager()); + mpDocShell->SetUndoManager(& GetUndoManager()); } - pLinkMgr->SetPersist( pDocShell ); - if( pDrawModel ) + mpLinkMgr->SetPersist( mpDocShell ); + if( mpDrawModel ) { - ((SwDrawDocument*)pDrawModel)->SetObjectShell( pDocShell ); - pDrawModel->SetPersist( pDocShell ); - OSL_ENSURE( pDrawModel->GetPersist() == GetPersist(), + ((SwDrawDocument*)mpDrawModel)->SetObjectShell( mpDocShell ); + mpDrawModel->SetPersist( mpDocShell ); + OSL_ENSURE( mpDrawModel->GetPersist() == GetPersist(), "draw model's persist is out of sync" ); } } @@ -769,16 +769,16 @@ void SwDoc::SetDocShell( SwDocShell* pDSh ) // Convenience method; to avoid excessive includes from docsh.hxx uno::Reference < embed::XStorage > SwDoc::GetDocStorage() { - if( pDocShell ) - return pDocShell->GetStorage(); - if( pLinkMgr->GetPersist() ) - return pLinkMgr->GetPersist()->GetStorage(); + if( mpDocShell ) + return mpDocShell->GetStorage(); + if( mpLinkMgr->GetPersist() ) + return mpLinkMgr->GetPersist()->GetStorage(); return NULL; } SfxObjectShell* SwDoc::GetPersist() const { - return pDocShell ? pDocShell : pLinkMgr->GetPersist(); + return mpDocShell ? mpDocShell : mpLinkMgr->GetPersist(); } void SwDoc::ClearDoc() @@ -787,7 +787,7 @@ void SwDoc::ClearDoc() ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); // Deactivate Undo notification from Draw - if( pDrawModel ) + if( mpDrawModel ) { DrawNotifyUndoHdl(); ClrContourCache(); @@ -796,28 +796,28 @@ void SwDoc::ClearDoc() // if there are still FlyFrames dangling around, delete them too sal_uInt16 n; while ( 0 != (n = GetSpzFrmFmts()->size()) ) - DelLayoutFmt((*pSpzFrmFmtTbl)[n-1]); - OSL_ENSURE( !pDrawModel || !pDrawModel->GetPage(0)->GetObjCount(), + DelLayoutFmt((*mpSpzFrmFmtTbl)[n-1]); + OSL_ENSURE( !mpDrawModel || !mpDrawModel->GetPage(0)->GetObjCount(), "not all DrawObjects removed from the page" ); - pRedlineTbl->DeleteAndDestroyAll(); + mpRedlineTbl->DeleteAndDestroyAll(); - delete pACEWord; + delete mpACEWord; // The BookMarks contain indices to the Content. These must be deleted // before deleting the Nodes. - pMarkManager->clearAllMarks(); + mpMarkManager->clearAllMarks(); InitTOXTypes(); // create a dummy pagedesc for the layout sal_uInt16 nDummyPgDsc = MakePageDesc(rtl::OUString("?DUMMY?")); - SwPageDesc* pDummyPgDsc = aPageDescs[ nDummyPgDsc ]; + SwPageDesc* pDummyPgDsc = maPageDescs[ nDummyPgDsc ]; SwNodeIndex aSttIdx( *GetNodes().GetEndOfContent().StartOfSectionNode(), 1 ); // create the first one over and over again (without attributes/style etc. - SwTxtNode* pFirstNd = GetNodes().MakeTxtNode( aSttIdx, pDfltTxtFmtColl ); + SwTxtNode* pFirstNd = GetNodes().MakeTxtNode( aSttIdx, mpDfltTxtFmtColl ); - if( pCurrentView ) //swmod 071029//swmod 071225 + if( mpCurrentView ) //swmod 071029//swmod 071225 { // set the layout to the dummy pagedesc pFirstNd->SetAttr( SwFmtPageDesc( pDummyPgDsc )); @@ -833,10 +833,10 @@ void SwDoc::ClearDoc() // #i62440# // destruction of numbering rules and creation of new outline rule // *after* the document nodes are deleted. - pOutlineRule = NULL; - BOOST_FOREACH( SwNumRule* pNumRule, *pNumRuleTbl ) + mpOutlineRule = NULL; + BOOST_FOREACH( SwNumRule* pNumRule, *mpNumRuleTbl ) delete pNumRule; - pNumRuleTbl->clear(); + mpNumRuleTbl->clear(); // #i114725#,#i115828# { for ( boost::unordered_map< String, SwList*, StringHash >::iterator @@ -851,57 +851,57 @@ void SwDoc::ClearDoc() maListStyleLists.clear(); // creation of new outline numbering rule - pOutlineRule = new SwNumRule( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), + mpOutlineRule = new SwNumRule( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), // #i89178# numfunc::GetDefaultPositionAndSpaceMode(), OUTLINE_RULE ); - AddNumRule(pOutlineRule); + AddNumRule(mpOutlineRule); // Counting of phantoms depends on - pOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) ); + mpOutlineRule->SetCountPhantoms( !get(IDocumentSettingAccess::OLD_NUMBERING) ); // remove the dummy pagedec from the array and delete all the old ones - aPageDescs.erase( aPageDescs.begin() + nDummyPgDsc ); - BOOST_FOREACH(SwPageDesc *pPageDesc, aPageDescs) + maPageDescs.erase( maPageDescs.begin() + nDummyPgDsc ); + BOOST_FOREACH(SwPageDesc *pPageDesc, maPageDescs) delete pPageDesc; - aPageDescs.clear(); + maPageDescs.clear(); // Delete for Collections // So that we get rid of the dependencies - pFtnInfo->ReleaseCollection(); - pEndNoteInfo->ReleaseCollection(); + mpFtnInfo->ReleaseCollection(); + mpEndNoteInfo->ReleaseCollection(); // Optimization: Based on the fact that Standard is always 2nd in the // array, we should delete it as the last. With this we avoid // reparenting the Formats all the time! - if( 2 < pTxtFmtCollTbl->size() ) - DeleteAndDestroy(*pTxtFmtCollTbl, 2, pTxtFmtCollTbl->size()); - DeleteAndDestroy(*pTxtFmtCollTbl, 1, pTxtFmtCollTbl->size()); - DeleteAndDestroy(*pGrfFmtCollTbl, 1, pGrfFmtCollTbl->size()); - DeleteAndDestroy(*pCharFmtTbl, 1, pCharFmtTbl->size()); + if( 2 < mpTxtFmtCollTbl->size() ) + DeleteAndDestroy(*mpTxtFmtCollTbl, 2, mpTxtFmtCollTbl->size()); + DeleteAndDestroy(*mpTxtFmtCollTbl, 1, mpTxtFmtCollTbl->size()); + DeleteAndDestroy(*mpGrfFmtCollTbl, 1, mpGrfFmtCollTbl->size()); + DeleteAndDestroy(*mpCharFmtTbl, 1, mpCharFmtTbl->size()); - if( pCurrentView ) + if( mpCurrentView ) { // search the FrameFormat of the root frm. This is not allowed to delete - pFrmFmtTbl->erase( std::find( pFrmFmtTbl->begin(), pFrmFmtTbl->end(), pCurrentView->GetLayout()->GetFmt() ) ); - DeleteAndDestroy(*pFrmFmtTbl, 1, pFrmFmtTbl->size()); - pFrmFmtTbl->push_back( pCurrentView->GetLayout()->GetFmt() ); + mpFrmFmtTbl->erase( std::find( mpFrmFmtTbl->begin(), mpFrmFmtTbl->end(), mpCurrentView->GetLayout()->GetFmt() ) ); + DeleteAndDestroy(*mpFrmFmtTbl, 1, mpFrmFmtTbl->size()); + mpFrmFmtTbl->push_back( mpCurrentView->GetLayout()->GetFmt() ); } else //swmod 071029//swmod 071225 - DeleteAndDestroy(*pFrmFmtTbl, 1, pFrmFmtTbl->size()); + DeleteAndDestroy(*mpFrmFmtTbl, 1, mpFrmFmtTbl->size()); - xForbiddenCharsTable.clear(); + mxForbiddenCharsTable.clear(); - for(SwFldTypes::const_iterator it = pFldTypes->begin() + INIT_FLDTYPES; - it != pFldTypes->end(); ++it) + for(SwFldTypes::const_iterator it = mpFldTypes->begin() + INIT_FLDTYPES; + it != mpFldTypes->end(); ++it) delete *it; - pFldTypes->erase( pFldTypes->begin() + INIT_FLDTYPES, pFldTypes->end() ); + mpFldTypes->erase( mpFldTypes->begin() + INIT_FLDTYPES, mpFldTypes->end() ); - delete pNumberFormatter, pNumberFormatter = 0; + delete mpNumberFormatter, mpNumberFormatter = 0; GetPageDescFromPool( RES_POOLPAGE_STANDARD ); pFirstNd->ChgFmtColl( GetTxtCollFromPool( RES_POOLCOLL_STANDARD )); - nDummyPgDsc = aPageDescs.size(); - aPageDescs.push_back( pDummyPgDsc ); + nDummyPgDsc = maPageDescs.size(); + maPageDescs.push_back( pDummyPgDsc ); // set the layout back to the new standard pagedesc pFirstNd->ResetAllAttr(); // delete now the dummy pagedesc @@ -912,19 +912,19 @@ void SwDoc::SetPreViewPrtData( const SwPagePreViewPrtData* pNew ) { if( pNew ) { - if( pPgPViewPrtData ) - *pPgPViewPrtData = *pNew; + if( mpPgPViewPrtData ) + *mpPgPViewPrtData = *pNew; else - pPgPViewPrtData = new SwPagePreViewPrtData( *pNew ); + mpPgPViewPrtData = new SwPagePreViewPrtData( *pNew ); } - else if( pPgPViewPrtData ) - DELETEZ( pPgPViewPrtData ); + else if( mpPgPViewPrtData ) + DELETEZ( mpPgPViewPrtData ); SetModified(); } SwModify* SwDoc::GetUnoCallBack() const { - return pUnoCallBack; + return mpUnoCallBack; } @@ -933,19 +933,19 @@ SwModify* SwDoc::GetUnoCallBack() const *--------------------------------------------------*/ void SwDoc::ReadLayoutCache( SvStream& rStream ) { - if( !pLayoutCache ) - pLayoutCache = new SwLayoutCache(); - if( !pLayoutCache->IsLocked() ) + if( !mpLayoutCache ) + mpLayoutCache = new SwLayoutCache(); + if( !mpLayoutCache->IsLocked() ) { - pLayoutCache->GetLockCount() |= 0x8000; - pLayoutCache->Read( rStream ); - pLayoutCache->GetLockCount() &= 0x7fff; + mpLayoutCache->GetLockCount() |= 0x8000; + mpLayoutCache->Read( rStream ); + mpLayoutCache->GetLockCount() &= 0x7fff; } } void SwDoc::WriteLayoutCache( SvStream& rStream ) { - pLayoutCache->Write( rStream, *this ); + mpLayoutCache->Write( rStream, *this ); } IGrammarContact* getGrammarContact( const SwTxtNode& rTxtNode ) @@ -1046,19 +1046,19 @@ void SwDoc::InitTOXTypes() { ShellResource* pShellRes = ViewShell::GetShellRes(); SwTOXType * pNew = new SwTOXType(TOX_CONTENT, pShellRes->aTOXContentName ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); pNew = new SwTOXType(TOX_INDEX, pShellRes->aTOXIndexName ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); pNew = new SwTOXType(TOX_USER, pShellRes->aTOXUserName ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); pNew = new SwTOXType(TOX_ILLUSTRATIONS, pShellRes->aTOXIllustrationsName ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); pNew = new SwTOXType(TOX_OBJECTS, pShellRes->aTOXObjectsName ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); pNew = new SwTOXType(TOX_TABLES, pShellRes->aTOXTablesName ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); pNew = new SwTOXType(TOX_AUTHORITIES, pShellRes->aTOXAuthoritiesName ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); } void SwDoc::ReplaceDefaults(const SwDoc& rSource) @@ -1096,8 +1096,8 @@ void SwDoc::ReplaceDefaults(const SwDoc& rSource) void SwDoc::ReplaceCompatabilityOptions(const SwDoc& rSource) { - n32DummyCompatabilityOptions1 = rSource.n32DummyCompatabilityOptions1; - n32DummyCompatabilityOptions2 = rSource.n32DummyCompatabilityOptions2; + mn32DummyCompatabilityOptions1 = rSource.mn32DummyCompatabilityOptions1; + mn32DummyCompatabilityOptions2 = rSource.mn32DummyCompatabilityOptions2; mbParaSpaceMax = rSource.mbParaSpaceMax; mbParaSpaceMaxAtPages = rSource.mbParaSpaceMaxAtPages; mbTabCompat = rSource.mbTabCompat; diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 72d5757744c0..5b1680808d63 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -96,30 +96,30 @@ inline sal_uInt8 GetUpperLvlChg( sal_uInt8 nCurLvl, sal_uInt8 nLevel, sal_uInt16 void SwDoc::SetOutlineNumRule( const SwNumRule& rRule ) { - if( pOutlineRule ) - (*pOutlineRule) = rRule; + if( mpOutlineRule ) + (*mpOutlineRule) = rRule; else { - pOutlineRule = new SwNumRule( rRule ); + mpOutlineRule = new SwNumRule( rRule ); - AddNumRule(pOutlineRule); // #i36749# + AddNumRule(mpOutlineRule); // #i36749# } - pOutlineRule->SetRuleType( OUTLINE_RULE ); - pOutlineRule->SetName( rtl::OUString::createFromAscii( + mpOutlineRule->SetRuleType( OUTLINE_RULE ); + mpOutlineRule->SetName( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), *this); // assure that the outline numbering rule is an automatic rule - pOutlineRule->SetAutoRule( sal_True ); + mpOutlineRule->SetAutoRule( sal_True ); // test whether the optional CharFormats are defined in this Document - pOutlineRule->CheckCharFmts( this ); + mpOutlineRule->CheckCharFmts( this ); // notify text nodes, which are registered at the outline style, about the // changed outline style SwNumRule::tTxtNodeList aTxtNodeList; - pOutlineRule->GetTxtNodeList( aTxtNodeList ); + mpOutlineRule->GetTxtNodeList( aTxtNodeList ); for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin(); aIter != aTxtNodeList.end(); ++aIter ) { @@ -135,7 +135,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule ) } PropagateOutlineRule(); - pOutlineRule->SetInvalidRule(sal_True); + mpOutlineRule->SetInvalidRule(sal_True); UpdateNumRule(); // update if we have foot notes && numbering by chapter @@ -149,9 +149,9 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule ) void SwDoc::PropagateOutlineRule() { - for (sal_uInt16 n = 0; n < pTxtFmtCollTbl->size(); n++) + for (sal_uInt16 n = 0; n < mpTxtFmtCollTbl->size(); n++) { - SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n]; + SwTxtFmtColl *pColl = (*mpTxtFmtCollTbl)[n]; if(pColl->IsAssignedToListLevelOfOutlineStyle())//<-end,zhaojianwei { @@ -204,12 +204,12 @@ bool SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset ) SwTxtFmtColl* aCollArr[ MAXLEVEL ]; memset( aCollArr, 0, sizeof( SwTxtFmtColl* ) * MAXLEVEL ); - for( n = 0; n < pTxtFmtCollTbl->size(); ++n ) + for( n = 0; n < mpTxtFmtCollTbl->size(); ++n ) { - if((*pTxtFmtCollTbl)[ n ]->IsAssignedToListLevelOfOutlineStyle()) + if((*mpTxtFmtCollTbl)[ n ]->IsAssignedToListLevelOfOutlineStyle()) { - const int nLevel = (*pTxtFmtCollTbl)[ n ]->GetAssignedOutlineStyleLevel(); - aCollArr[ nLevel ] = (*pTxtFmtCollTbl)[ n ]; + const int nLevel = (*mpTxtFmtCollTbl)[ n ]->GetAssignedOutlineStyleLevel(); + aCollArr[ nLevel ] = (*mpTxtFmtCollTbl)[ n ]; }//<-end,zhaojianwei } @@ -845,7 +845,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam, if( !pNew ) { - pNew = (*pNumRuleTbl)[ MakeNumRule( rRule.GetName(), &rRule ) ]; + pNew = (*mpNumRuleTbl)[ MakeNumRule( rRule.GetName(), &rRule ) ]; } else if (rRule != *pNew) { @@ -1010,18 +1010,18 @@ bool SwDoc::DelNumRule( const String& rName, bool bBroadcast ) { sal_uInt16 nPos = FindNumRule( rName ); - if ( (*pNumRuleTbl)[ nPos ] == GetOutlineNumRule() ) + if ( (*mpNumRuleTbl)[ nPos ] == GetOutlineNumRule() ) { OSL_FAIL( " - No deletion of outline list style. This is serious defect - please inform OD" ); return false; } - if( USHRT_MAX != nPos && !IsUsed( *(*pNumRuleTbl)[ nPos ] )) + if( USHRT_MAX != nPos && !IsUsed( *(*mpNumRuleTbl)[ nPos ] )) { if (GetIDocumentUndoRedo().DoesUndo()) { SwUndo * pUndo = - new SwUndoNumruleDelete(*(*pNumRuleTbl)[nPos], this); + new SwUndoNumruleDelete(*(*mpNumRuleTbl)[nPos], this); GetIDocumentUndoRedo().AppendUndo(pUndo); } @@ -1054,8 +1054,8 @@ bool SwDoc::DelNumRule( const String& rName, bool bBroadcast ) // #i34097# DeleteAndDestroy deletes rName if // rName is directly taken from the numrule. const String aTmpName( rName ); - delete (*pNumRuleTbl)[ nPos ]; - pNumRuleTbl->erase( pNumRuleTbl->begin() + nPos ); + delete (*mpNumRuleTbl)[ nPos ]; + mpNumRuleTbl->erase( mpNumRuleTbl->begin() + nPos ); maNumRuleMap.erase(aTmpName); SetModified(); @@ -1377,8 +1377,8 @@ void SwDoc::DelNumRules( const SwPaM& rPam ) void SwDoc::InvalidateNumRules() { - for (sal_uInt16 n = 0; n < pNumRuleTbl->size(); ++n) - (*pNumRuleTbl)[n]->SetInvalidRule(sal_True); + for (sal_uInt16 n = 0; n < mpNumRuleTbl->size(); ++n) + (*mpNumRuleTbl)[n]->SetInvalidRule(sal_True); } // To the next/preceding Bullet at the same Level @@ -2126,8 +2126,8 @@ SwNumRule* SwDoc::GetCurrNumRule( const SwPosition& rPos ) const sal_uInt16 SwDoc::FindNumRule( const String& rName ) const { - for( sal_uInt16 n = pNumRuleTbl->size(); n; ) - if( (*pNumRuleTbl)[ --n ]->GetName() == rName ) + for( sal_uInt16 n = mpNumRuleTbl->size(); n; ) + if( (*mpNumRuleTbl)[ --n ]->GetName() == rName ) return n; return USHRT_MAX; @@ -2141,11 +2141,11 @@ SwNumRule* SwDoc::FindNumRulePtr( const String& rName ) const if ( !pResult ) { - for (sal_uInt16 n = 0; n < pNumRuleTbl->size(); ++n) + for (sal_uInt16 n = 0; n < mpNumRuleTbl->size(); ++n) { - if ((*pNumRuleTbl)[n]->GetName() == rName) + if ((*mpNumRuleTbl)[n]->GetName() == rName) { - pResult = (*pNumRuleTbl)[n]; + pResult = (*mpNumRuleTbl)[n]; break; } @@ -2157,12 +2157,12 @@ SwNumRule* SwDoc::FindNumRulePtr( const String& rName ) const void SwDoc::AddNumRule(SwNumRule * pRule) { - if ((SAL_MAX_UINT16 - 1) <= pNumRuleTbl->size()) + if ((SAL_MAX_UINT16 - 1) <= mpNumRuleTbl->size()) { OSL_ENSURE(false, "SwDoc::AddNumRule: table full."); abort(); // this should never happen on real documents } - pNumRuleTbl->push_back(pRule); + mpNumRuleTbl->push_back(pRule); maNumRuleMap[pRule->GetName()] = pRule; pRule->SetNumRuleMap(&maNumRuleMap); @@ -2196,7 +2196,7 @@ sal_uInt16 SwDoc::MakeNumRule( const String &rName, eDefaultNumberFormatPositionAndSpaceMode ); } - sal_uInt16 nRet = pNumRuleTbl->size(); + sal_uInt16 nRet = mpNumRuleTbl->size(); AddNumRule(pNew); @@ -2233,7 +2233,7 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, bool bAutoNum ) const aName = SW_RESSTR( STR_NUMRULE_DEFNAME ); } - sal_uInt16 nNum(0), nTmp, nFlagSize = ( pNumRuleTbl->size() / 8 ) +2; + sal_uInt16 nNum(0), nTmp, nFlagSize = ( mpNumRuleTbl->size() / 8 ) +2; sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ]; memset( pSetFlags, 0, nFlagSize ); @@ -2254,15 +2254,15 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, bool bAutoNum ) const const SwNumRule* pNumRule; sal_uInt16 n; - for( n = 0; n < pNumRuleTbl->size(); ++n ) - if( 0 != ( pNumRule = (*pNumRuleTbl)[ n ] ) ) + for( n = 0; n < mpNumRuleTbl->size(); ++n ) + if( 0 != ( pNumRule = (*mpNumRuleTbl)[ n ] ) ) { const String& rNm = pNumRule->GetName(); if( rNm.Match( aName ) == nNmLen ) { // Determine Number and set the Flag nNum = (sal_uInt16)rNm.Copy( nNmLen ).ToInt32(); - if( nNum-- && nNum < pNumRuleTbl->size() ) + if( nNum-- && nNum < mpNumRuleTbl->size() ) pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 )); } if( pChkStr && pChkStr->Equals( rNm ) ) @@ -2272,7 +2272,7 @@ String SwDoc::GetUniqueNumRuleName( const String* pChkStr, bool bAutoNum ) const if( !pChkStr ) { // All Numbers have been flagged accordingly, so identify the right Number - nNum = pNumRuleTbl->size(); + nNum = mpNumRuleTbl->size(); for( n = 0; n < nFlagSize; ++n ) if( 0xff != ( nTmp = pSetFlags[ n ] )) { diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 1313c756cc5a..933b68510c95 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -147,14 +147,14 @@ TYPEINIT1(SwRedlineHint, SfxHint); RedlineMode_t SwDoc::GetRedlineMode() const { - return eRedlineMode; + return meRedlineMode; } void SwDoc::SetRedlineMode( RedlineMode_t eMode ) { - if( eRedlineMode != eMode ) + if( meRedlineMode != eMode ) { - if( (nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode) != (nsRedlineMode_t::REDLINE_SHOW_MASK & eMode) + if( (nsRedlineMode_t::REDLINE_SHOW_MASK & meRedlineMode) != (nsRedlineMode_t::REDLINE_SHOW_MASK & eMode) || 0 == (nsRedlineMode_t::REDLINE_SHOW_MASK & eMode) ) { bool bSaveInXMLImportFlag = IsInXMLImport(); @@ -184,34 +184,34 @@ void SwDoc::SetRedlineMode( RedlineMode_t eMode ) if( pFnc ) for( sal_uInt16 nLoop = 1; nLoop <= 2; ++nLoop ) - for( sal_uInt16 i = 0; i < pRedlineTbl->size(); ++i ) - ((*pRedlineTbl)[ i ]->*pFnc)( nLoop ); + for( sal_uInt16 i = 0; i < mpRedlineTbl->size(); ++i ) + ((*mpRedlineTbl)[ i ]->*pFnc)( nLoop ); _CHECK_REDLINE( this ) SetInXMLImport( bSaveInXMLImportFlag ); } - eRedlineMode = eMode; + meRedlineMode = eMode; SetModified(); } } bool SwDoc::IsRedlineOn() const { - return IDocumentRedlineAccess::IsRedlineOn(eRedlineMode); + return IDocumentRedlineAccess::IsRedlineOn(meRedlineMode); } bool SwDoc::IsIgnoreRedline() const { - return (nsRedlineMode_t::REDLINE_IGNORE & eRedlineMode); + return (nsRedlineMode_t::REDLINE_IGNORE & meRedlineMode); } void SwDoc::SetRedlineMode_intern(RedlineMode_t eMode) { - eRedlineMode = eMode; + meRedlineMode = eMode; } const SwRedlineTbl& SwDoc::GetRedlineTbl() const { - return *pRedlineTbl; + return *mpRedlineTbl; } bool SwDoc::IsRedlineMove() const @@ -226,7 +226,7 @@ void SwDoc::SetRedlineMove(bool bFlag) const uno::Sequence & SwDoc::GetRedlinePassword() const { - return aRedlinePasswd; + return maRedlinePasswd; } inline bool IsPrevPos( const SwPosition rPos1, const SwPosition rPos2 ) @@ -297,7 +297,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) bool bError = true; _CHECK_REDLINE( this ) - if( IsRedlineOn() && !IsShowOriginal( eRedlineMode ) && + if( IsRedlineOn() && !IsShowOriginal( meRedlineMode ) && pNewRedl->GetAuthorString().Len() ) { pNewRedl->InvalidateRange(); @@ -305,10 +305,10 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) if( mbIsAutoFmtRedline ) { pNewRedl->SetAutoFmtFlag(); - if( pAutoFmtRedlnComment && pAutoFmtRedlnComment->Len() ) + if( mpAutoFmtRedlnComment && mpAutoFmtRedlnComment->Len() ) { - pNewRedl->SetComment( *pAutoFmtRedlnComment ); - pNewRedl->SetSeqNo( nAutoFmtRedlnCommentNo ); + pNewRedl->SetComment( *mpAutoFmtRedlnComment ); + pNewRedl->SetSeqNo( mnAutoFmtRedlnCommentNo ); } } @@ -364,11 +364,11 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) --n; bool bDec = false; - for( ; pNewRedl && n < pRedlineTbl->size(); bDec ? n : ++n ) + for( ; pNewRedl && n < mpRedlineTbl->size(); bDec ? n : ++n ) { bDec = false; - SwRedline* pRedl = (*pRedlineTbl)[ n ]; + SwRedline* pRedl = (*mpRedlineTbl)[ n ]; SwPosition* pRStt = pRedl->Start(), * pREnd = pRStt == pRedl->GetPoint() ? pRedl->GetMark() : pRedl->GetPoint(); @@ -377,7 +377,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) if( ( *pRStt == *pREnd ) && ( pRedl->GetContentIdx() == NULL ) ) { - pRedlineTbl->DeleteAndDestroy(n); + mpRedlineTbl->DeleteAndDestroy(n); continue; } @@ -399,16 +399,16 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) ( POS_COLLIDE_START == eCmpPos ) || ( POS_OVERLAP_BEHIND == eCmpPos ) ) && pRedl->CanCombine( *pNewRedl ) && - ( n+1 >= (sal_uInt16)pRedlineTbl->size() || - ( *(*pRedlineTbl)[ n+1 ]->Start() >= *pEnd && - *(*pRedlineTbl)[ n+1 ]->Start() != *pREnd ) ) ) + ( n+1 >= (sal_uInt16)mpRedlineTbl->size() || + ( *(*mpRedlineTbl)[ n+1 ]->Start() >= *pEnd && + *(*mpRedlineTbl)[ n+1 ]->Start() != *pREnd ) ) ) { pRedl->SetEnd( *pEnd, pREnd ); if( !pRedl->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); } bError = false; @@ -420,12 +420,12 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) ( POS_OVERLAP_BEFORE == eCmpPos ) ) && pRedl->CanCombine( *pNewRedl ) && ( !n || - *(*pRedlineTbl)[ n-1 ]->End() != *pRStt )) + *(*mpRedlineTbl)[ n-1 ]->End() != *pRStt )) { pRedl->SetStart( *pStt, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); bError = false; bDelete = true; @@ -434,7 +434,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { // own insert-over-insert redlines: // just scrap the inside ones - pRedlineTbl->Remove( n ); + mpRedlineTbl->Remove( n ); bDec = true; } else if( POS_OVERLAP_BEHIND == eCmpPos ) @@ -467,20 +467,20 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { SwRedline* pCpy = new SwRedline( *pRedl ); pCpy->SetStart( *pEnd ); - pRedlineTbl->Insert( pCpy ); + mpRedlineTbl->Insert( pCpy ); } pRedl->SetEnd( *pStt, pREnd ); if( ( *pStt == *pRStt ) && ( pRedl->GetContentIdx() == NULL ) ) { - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } else if( !pRedl->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); } } else if ( POS_OUTSIDE == eCmpPos ) @@ -493,7 +493,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) SwRedline* pSplit = new SwRedline( *pNewRedl ); pSplit->SetEnd( *pRStt ); pNewRedl->SetStart( *pREnd ); - pRedlineTbl->Insert( pSplit ); + mpRedlineTbl->Insert( pSplit ); if( *pStt == *pEnd && pNewRedl->GetContentIdx() == NULL ) { delete pNewRedl; @@ -527,20 +527,20 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { SwRedline* pCpy = new SwRedline( *pRedl ); pCpy->SetStart( *pEnd ); - pRedlineTbl->Insert( pCpy ); + mpRedlineTbl->Insert( pCpy ); } pRedl->SetEnd( *pStt, pREnd ); if( ( *pStt == *pRStt ) && ( pRedl->GetContentIdx() == NULL ) ) { - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } else if( !pRedl->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl, n ); } } else if ( POS_OUTSIDE == eCmpPos ) @@ -553,7 +553,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) SwRedline* pSplit = new SwRedline( *pNewRedl ); pSplit->SetEnd( *pRStt ); pNewRedl->SetStart( *pREnd ); - pRedlineTbl->Insert( pSplit ); + mpRedlineTbl->Insert( pSplit ); if( *pStt == *pEnd && pNewRedl->GetContentIdx() == NULL ) { delete pNewRedl; @@ -565,7 +565,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { // handle identical redlines in broken documents // delete old (delete) redline - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } else if ( POS_OVERLAP_BEHIND == eCmpPos ) @@ -579,8 +579,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_OVERLAP_BEFORE: pRedl->SetStart( *pEnd, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl, n ); bDec = true; break; @@ -588,7 +588,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pRedl->SetEnd( *pStt, pREnd ); if( *pStt == *pRStt && pRedl->GetContentIdx() == NULL ) { - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } break; @@ -597,7 +597,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_OUTSIDE: // Overlaps the current one completely or has the // same dimension, delete the old one - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; break; @@ -612,7 +612,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pNew->SetStart( *pEnd ); pRedl->SetEnd( *pStt, pREnd ); if( *pStt == *pRStt && pRedl->GetContentIdx() == NULL ) - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); AppendRedline( pNew, bCallDelete ); n = 0; // re-initialize bDec = true; @@ -672,7 +672,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pNewRedl->SetStart( *pRStt, pStt ); else pNewRedl->SetEnd( *pREnd, pEnd ); - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } else if( POS_OVERLAP_BEHIND == eCmpPos ) @@ -686,14 +686,14 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) if( pRedl->IsOwnRedline( *pNewRedl ) && pRedl->CanCombine( *pNewRedl ) ) { - if( IsHideChanges( eRedlineMode )) + if( IsHideChanges( meRedlineMode )) { // Before we can merge, we make it visible! // We insert temporarily so that pNew is // also dealt with when moving the indices. - pRedlineTbl->Insert( pNewRedl ); + mpRedlineTbl->Insert( pNewRedl ); pRedl->Show(); - pRedlineTbl->Remove( pNewRedl ); + mpRedlineTbl->Remove( pNewRedl ); pRStt = pRedl->Start(); pREnd = pRedl->End(); } @@ -723,7 +723,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) bDec = true; } - pRedlineTbl->DeleteAndDestroy( nToBeDeleted ); + mpRedlineTbl->DeleteAndDestroy( nToBeDeleted ); } break; default: @@ -735,26 +735,26 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { // b62341295: Do not throw away redlines // even if they are not allowed to be combined - RedlineMode_t eOld = eRedlineMode; + RedlineMode_t eOld = meRedlineMode; if( !( eOld & nsRedlineMode_t::REDLINE_DONTCOMBINE_REDLINES ) && pRedl->IsOwnRedline( *pNewRedl ) ) { // Set to NONE, so that the Delete::Redo merges the Redline data correctly! // The ShowMode needs to be retained! - eRedlineMode = (RedlineMode_t)(eOld & ~(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE)); + meRedlineMode = (RedlineMode_t)(eOld & ~(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE)); switch( eCmpPos ) { case POS_EQUAL: bCompress = true; - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; // no break! case POS_INSIDE: if( bCallDelete ) { - eRedlineMode = (RedlineMode_t)(eRedlineMode | nsRedlineMode_t::REDLINE_IGNOREDELETE_REDLINES); + meRedlineMode = (RedlineMode_t)(meRedlineMode | nsRedlineMode_t::REDLINE_IGNOREDELETE_REDLINES); // DeleteAndJoin does not yield the // desired result if there is no paragraph to @@ -780,15 +780,15 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_OUTSIDE: { - pRedlineTbl->Remove( n ); + mpRedlineTbl->Remove( n ); bDec = true; // We insert temporarily so that pNew is // also dealt with when moving the indices. if( bCallDelete ) { - pRedlineTbl->Insert( pNewRedl ); + mpRedlineTbl->Insert( pNewRedl ); DeleteAndJoin( *pRedl ); - if( !pRedlineTbl->Remove( pNewRedl ) ) + if( !mpRedlineTbl->Remove( pNewRedl ) ) pNewRedl = 0; } delete pRedl; @@ -800,22 +800,22 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) SwPaM aPam( *pRStt, *pEnd ); if( *pEnd == *pREnd ) - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); else { pRedl->SetStart( *pEnd, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl, n ); } if( bCallDelete ) { // We insert temporarily so that pNew is // also dealt with when moving the indices. - pRedlineTbl->Insert( pNewRedl ); + mpRedlineTbl->Insert( pNewRedl ); DeleteAndJoin( aPam ); - if( !pRedlineTbl->Remove( pNewRedl ) ) + if( !mpRedlineTbl->Remove( pNewRedl ) ) pNewRedl = 0; n = 0; // re-initialize } @@ -829,7 +829,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) if( *pStt == *pRStt ) { - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } else @@ -839,9 +839,9 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { // We insert temporarily so that pNew is // also dealt with when moving the indices. - pRedlineTbl->Insert( pNewRedl ); + mpRedlineTbl->Insert( pNewRedl ); DeleteAndJoin( aPam ); - if( !pRedlineTbl->Remove( pNewRedl ) ) + if( !mpRedlineTbl->Remove( pNewRedl ) ) pNewRedl = 0; n = 0; // re-initialize bDec = true; @@ -852,7 +852,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) break; } - eRedlineMode = eOld; + meRedlineMode = eOld; } else { @@ -868,7 +868,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { pRedl->PushData( *pNewRedl ); delete pNewRedl, pNewRedl = 0; - if( IsHideChanges( eRedlineMode )) + if( IsHideChanges( meRedlineMode )) pRedl->Hide(); bCompress = true; } @@ -885,8 +885,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pNewRedl->PushData( *pRedl, sal_False ); pRedl->SetStart( *pEnd, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl, n ); bDec = true; } } @@ -902,8 +902,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) if( !pRedl->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl, n ); } } } @@ -930,11 +930,11 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { pRedl->PushData( *pNewRedl ); pNewRedl->SetEnd( *pRStt, pEnd ); - if( IsHideChanges( eRedlineMode )) + if( IsHideChanges( meRedlineMode )) { - pRedlineTbl->Insert( pNewRedl ); + mpRedlineTbl->Insert( pNewRedl ); pRedl->Hide(); - pRedlineTbl->Remove( pNewRedl ); + mpRedlineTbl->Remove( pNewRedl ); } } else @@ -945,8 +945,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pNewRedl->SetEnd( *pRStt, pEnd ); pRedl->SetStart( *pNew->End(), pRStt ) ; // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); bDec = true; } } @@ -958,11 +958,11 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { pRedl->PushData( *pNewRedl ); pNewRedl->SetStart( *pREnd, pStt ); - if( IsHideChanges( eRedlineMode )) + if( IsHideChanges( meRedlineMode )) { - pRedlineTbl->Insert( pNewRedl ); + mpRedlineTbl->Insert( pNewRedl ); pRedl->Hide(); - pRedlineTbl->Remove( pNewRedl ); + mpRedlineTbl->Remove( pNewRedl ); } } else @@ -975,8 +975,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) if( !pRedl->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); } } } @@ -988,7 +988,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) // insert the pNew part (if it exists) if( pNew ) { - pRedlineTbl->Insert( pNew ); + mpRedlineTbl->Insert( pNew ); // pNew must be deleted if Insert() wasn't // successful. But that can't happen, since pNew is @@ -1009,8 +1009,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_OVERLAP_BEFORE: pRedl->SetStart( *pEnd, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl, n ); bDec = true; break; @@ -1022,7 +1022,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_OUTSIDE: // Overlaps the current one completely or has the // same dimension, delete the old one - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; break; @@ -1038,7 +1038,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pRedl->SetEnd( *pStt, pREnd ); if( ( *pStt == *pRStt ) && ( pRedl->GetContentIdx() == NULL ) ) - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); AppendRedline( pNew, bCallDelete ); n = 0; // re-initialize bDec = true; @@ -1106,7 +1106,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { // Overlaps the current one completely or has the // same dimension, delete the old one - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } break; @@ -1125,8 +1125,8 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) // or else only shorten the current one pRedl->SetStart( *pEnd, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl, n ); bDec = true; } else @@ -1153,7 +1153,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pNewRedl->SetStart( *pRStt, pStt ); else pNewRedl->SetEnd( *pREnd, pEnd ); - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = 0; } else if( POS_OVERLAP_BEHIND == eCmpPos ) @@ -1165,25 +1165,25 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) case POS_COLLIDE_END: if( pRedl->IsOwnRedline( *pNewRedl ) && pRedl->CanCombine( *pNewRedl ) && n && - *(*pRedlineTbl)[ n-1 ]->End() < *pStt ) + *(*mpRedlineTbl)[ n-1 ]->End() < *pStt ) { // If that's the case we can merge it, meaning // the new one covers this well pNewRedl->SetEnd( *pREnd, pEnd ); - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } break; case POS_COLLIDE_START: if( pRedl->IsOwnRedline( *pNewRedl ) && pRedl->CanCombine( *pNewRedl ) && - n+1 < (sal_uInt16)pRedlineTbl->size() && - *(*pRedlineTbl)[ n+1 ]->Start() < *pEnd ) + n+1 < (sal_uInt16)mpRedlineTbl->size() && + *(*mpRedlineTbl)[ n+1 ]->Start() < *pEnd ) { // If that's the case we can merge it, meaning // the new one covers this well pNewRedl->SetStart( *pRStt, pStt ); - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); bDec = true; } break; @@ -1215,7 +1215,7 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) pNewRedl = 0; } else - pRedlineTbl->Insert( pNewRedl ); + mpRedlineTbl->Insert( pNewRedl ); } if( bCompress ) @@ -1225,12 +1225,12 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete ) { if( bCallDelete && nsRedlineType_t::REDLINE_DELETE == pNewRedl->GetType() ) { - RedlineMode_t eOld = eRedlineMode; + RedlineMode_t eOld = meRedlineMode; // Set to NONE, so that the Delete::Redo merges the Redline data correctly! // The ShowMode needs to be retained! - eRedlineMode = (RedlineMode_t)(eOld & ~(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE)); + meRedlineMode = (RedlineMode_t)(eOld & ~(nsRedlineMode_t::REDLINE_ON | nsRedlineMode_t::REDLINE_IGNORE)); DeleteAndJoin( *pNewRedl ); - eRedlineMode = eOld; + meRedlineMode = eOld; } delete pNewRedl, pNewRedl = 0; } @@ -1244,7 +1244,7 @@ void SwDoc::CompressRedlines() _CHECK_REDLINE( this ) void (SwRedline::*pFnc)(sal_uInt16) = 0; - switch( nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode ) + switch( nsRedlineMode_t::REDLINE_SHOW_MASK & meRedlineMode ) { case nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE: pFnc = &SwRedline::Show; @@ -1255,10 +1255,10 @@ void SwDoc::CompressRedlines() } // Try to merge identical ones - for( sal_uInt16 n = 1; n < pRedlineTbl->size(); ++n ) + for( sal_uInt16 n = 1; n < mpRedlineTbl->size(); ++n ) { - SwRedline* pPrev = (*pRedlineTbl)[ n-1 ], - * pCur = (*pRedlineTbl)[ n ]; + SwRedline* pPrev = (*mpRedlineTbl)[ n-1 ], + * pCur = (*mpRedlineTbl)[ n ]; const SwPosition* pPrevStt = pPrev->Start(), * pPrevEnd = pPrevStt == pPrev->GetPoint() ? pPrev->GetMark() : pPrev->GetPoint(); @@ -1275,7 +1275,7 @@ void SwDoc::CompressRedlines() pCur->Show(); pPrev->SetEnd( *pCur->End() ); - pRedlineTbl->DeleteAndDestroy( n ); + mpRedlineTbl->DeleteAndDestroy( n ); --n; if( pFnc ) (pPrev->*pFnc)(0); @@ -1292,9 +1292,9 @@ bool SwDoc::SplitRedline( const SwPaM& rRange ) * pEnd = pStt == rRange.GetPoint() ? rRange.GetMark() : rRange.GetPoint(); GetRedline( *pStt, &n ); - for( ; n < pRedlineTbl->size() ; ++n ) + for( ; n < mpRedlineTbl->size() ; ++n ) { - SwRedline* pTmp = (*pRedlineTbl)[ n ]; + SwRedline* pTmp = (*mpRedlineTbl)[ n ]; SwPosition* pTStt = pTmp->Start(), * pTEnd = pTStt == pTmp->GetPoint() ? pTmp->GetMark() : pTmp->GetPoint(); @@ -1327,18 +1327,18 @@ bool SwDoc::SplitRedline( const SwPaM& rRange ) case 3: pTmp->InvalidateRange(); - pRedlineTbl->DeleteAndDestroy( n-- ); + mpRedlineTbl->DeleteAndDestroy( n-- ); pTmp = 0; break; } if( pTmp && !pTmp->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pTmp, n ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pTmp, n ); } if( pNew ) - pRedlineTbl->Insert( pNew, n ); + mpRedlineTbl->Insert( pNew, n ); } else if( *pEnd < *pTStt ) break; @@ -1349,7 +1349,7 @@ bool SwDoc::SplitRedline( const SwPaM& rRange ) bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, sal_uInt16 nDelType ) { - if( nsRedlineMode_t::REDLINE_IGNOREDELETE_REDLINES & eRedlineMode || + if( nsRedlineMode_t::REDLINE_IGNOREDELETE_REDLINES & meRedlineMode || !rRange.HasMark() || *rRange.GetMark() == *rRange.GetPoint() ) return sal_False; @@ -1371,9 +1371,9 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, : rRange.GetPoint(); sal_uInt16 n = 0; GetRedline( *pStt, &n ); - for( ; n < pRedlineTbl->size() ; ++n ) + for( ; n < mpRedlineTbl->size() ; ++n ) { - SwRedline* pRedl = (*pRedlineTbl)[ n ]; + SwRedline* pRedl = (*mpRedlineTbl)[ n ]; if( USHRT_MAX != nDelType && nDelType != pRedl->GetType() ) continue; @@ -1385,7 +1385,7 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, case POS_EQUAL: case POS_OUTSIDE: pRedl->InvalidateRange(); - pRedlineTbl->DeleteAndDestroy( n-- ); + mpRedlineTbl->DeleteAndDestroy( n-- ); bChg = true; break; @@ -1393,8 +1393,8 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, pRedl->InvalidateRange(); pRedl->SetStart( *pEnd, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); --n; break; @@ -1404,8 +1404,8 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, if( !pRedl->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); --n; } break; @@ -1418,8 +1418,8 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, { pRedl->SetStart( *pEnd, pRStt ); // re-insert - pRedlineTbl->Remove( n ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( n ); + mpRedlineTbl->Insert( pRedl ); --n; } else @@ -1436,19 +1436,19 @@ bool SwDoc::DeleteRedline( const SwPaM& rRange, bool bSaveInUndo, if( !pRedl->HasValidRange() ) { // re-insert - pRedlineTbl->Remove( pRedl ); - pRedlineTbl->Insert( pRedl ); + mpRedlineTbl->Remove( pRedl ); + mpRedlineTbl->Insert( pRedl ); --n; } if( pCpy ) - pRedlineTbl->Insert( pCpy ); + mpRedlineTbl->Insert( pCpy ); } } break; case POS_COLLIDE_END: case POS_BEFORE: - n = pRedlineTbl->size(); + n = mpRedlineTbl->size(); break; default: break; @@ -1471,9 +1471,9 @@ bool SwDoc::DeleteRedline( const SwStartNode& rNode, bool bSaveInUndo, sal_uInt16 SwDoc::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const { const sal_uLong nNdIdx = rNd.GetIndex(); - for( sal_uInt16 n = 0; n < pRedlineTbl->size() ; ++n ) + for( sal_uInt16 n = 0; n < mpRedlineTbl->size() ; ++n ) { - const SwRedline* pTmp = (*pRedlineTbl)[ n ]; + const SwRedline* pTmp = (*mpRedlineTbl)[ n ]; sal_uLong nPt = pTmp->GetPoint()->nNode.GetIndex(), nMk = pTmp->GetMark()->nNode.GetIndex(); if( nPt < nMk ) { long nTmp = nMk; nMk = nPt; nPt = nTmp; } @@ -1491,14 +1491,14 @@ sal_uInt16 SwDoc::GetRedlinePos( const SwNode& rNd, sal_uInt16 nType ) const const SwRedline* SwDoc::GetRedline( const SwPosition& rPos, sal_uInt16* pFndPos ) const { - sal_uInt16 nO = pRedlineTbl->size(), nM, nU = 0; + sal_uInt16 nO = mpRedlineTbl->size(), nM, nU = 0; if( nO > 0 ) { nO--; while( nU <= nO ) { nM = nU + ( nO - nU ) / 2; - const SwRedline* pRedl = (*pRedlineTbl)[ nM ]; + const SwRedline* pRedl = (*mpRedlineTbl)[ nM ]; const SwPosition* pStt = pRedl->Start(); const SwPosition* pEnd = pStt == pRedl->GetPoint() ? pRedl->GetMark() @@ -1507,11 +1507,11 @@ const SwRedline* SwDoc::GetRedline( const SwPosition& rPos, ? *pStt == rPos : ( *pStt <= rPos && rPos < *pEnd ) ) { - while( nM && rPos == *(*pRedlineTbl)[ nM - 1 ]->End() && - rPos == *(*pRedlineTbl)[ nM - 1 ]->Start() ) + while( nM && rPos == *(*mpRedlineTbl)[ nM - 1 ]->End() && + rPos == *(*mpRedlineTbl)[ nM - 1 ]->Start() ) { --nM; - pRedl = (*pRedlineTbl)[ nM ]; + pRedl = (*mpRedlineTbl)[ nM ]; } // if there are format and insert changes in the same position // show insert change first. @@ -1519,19 +1519,19 @@ const SwRedline* SwDoc::GetRedline( const SwPosition& rPos, // before and after the current redline if( nsRedlineType_t::REDLINE_FORMAT == pRedl->GetType() ) { - if( nM && rPos >= *(*pRedlineTbl)[ nM - 1 ]->Start() && - rPos <= *(*pRedlineTbl)[ nM - 1 ]->End() && - ( nsRedlineType_t::REDLINE_INSERT == (*pRedlineTbl)[ nM - 1 ]->GetType() ) ) + if( nM && rPos >= *(*mpRedlineTbl)[ nM - 1 ]->Start() && + rPos <= *(*mpRedlineTbl)[ nM - 1 ]->End() && + ( nsRedlineType_t::REDLINE_INSERT == (*mpRedlineTbl)[ nM - 1 ]->GetType() ) ) { --nM; - pRedl = (*pRedlineTbl)[ nM ]; + pRedl = (*mpRedlineTbl)[ nM ]; } - else if( ( nM + 1 ) <= nO && rPos >= *(*pRedlineTbl)[ nM + 1 ]->Start() && - rPos <= *(*pRedlineTbl)[ nM + 1 ]->End() && - ( nsRedlineType_t::REDLINE_INSERT == (*pRedlineTbl)[ nM + 1 ]->GetType() ) ) + else if( ( nM + 1 ) <= nO && rPos >= *(*mpRedlineTbl)[ nM + 1 ]->Start() && + rPos <= *(*mpRedlineTbl)[ nM + 1 ]->End() && + ( nsRedlineType_t::REDLINE_INSERT == (*mpRedlineTbl)[ nM + 1 ]->GetType() ) ) { ++nM; - pRedl = (*pRedlineTbl)[ nM ]; + pRedl = (*mpRedlineTbl)[ nM ]; } } @@ -2042,10 +2042,10 @@ bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete ) // Switch to visible in any case if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) != - (nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode) ) - SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | eRedlineMode)); + (nsRedlineMode_t::REDLINE_SHOW_MASK & meRedlineMode) ) + SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | meRedlineMode)); - SwRedline* pTmp = (*pRedlineTbl)[ nPos ]; + SwRedline* pTmp = (*mpRedlineTbl)[ nPos ]; if( pTmp->HasMark() && pTmp->IsVisible() ) { if (GetIDocumentUndoRedo().DoesUndo()) @@ -2067,19 +2067,19 @@ bool SwDoc::AcceptRedline( sal_uInt16 nPos, bool bCallDelete ) GetIDocumentUndoRedo().AppendUndo(pUndo); } - bRet |= lcl_AcceptRedline( *pRedlineTbl, nPos, bCallDelete ); + bRet |= lcl_AcceptRedline( *mpRedlineTbl, nPos, bCallDelete ); if( nSeqNo ) { if( USHRT_MAX == nPos ) nPos = 0; sal_uInt16 nFndPos = 2 == nLoopCnt - ? pRedlineTbl->FindNextSeqNo( nSeqNo, nPos ) - : pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ); + ? mpRedlineTbl->FindNextSeqNo( nSeqNo, nPos ) + : mpRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ); if( USHRT_MAX != nFndPos || ( 0 != ( --nLoopCnt ) && USHRT_MAX != ( nFndPos = - pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ))) ) - pTmp = (*pRedlineTbl)[ nPos = nFndPos ]; + mpRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ))) ) + pTmp = (*mpRedlineTbl)[ nPos = nFndPos ]; else nLoopCnt = 0; } @@ -2106,8 +2106,8 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete ) { // Switch to visible in any case if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) != - (nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode) ) - SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | eRedlineMode)); + (nsRedlineMode_t::REDLINE_SHOW_MASK & meRedlineMode) ) + SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | meRedlineMode)); // The Selection is only in the ContentSection. If there are Redlines // to Non-ContentNodes before or after that, then the Selections @@ -2121,7 +2121,7 @@ bool SwDoc::AcceptRedline( const SwPaM& rPam, bool bCallDelete ) GetIDocumentUndoRedo().AppendUndo( new SwUndoAcceptRedline( aPam )); } - int nRet = lcl_AcceptRejectRedl( lcl_AcceptRedline, *pRedlineTbl, + int nRet = lcl_AcceptRejectRedl( lcl_AcceptRedline, *mpRedlineTbl, bCallDelete, aPam ); if( nRet > 0 ) { @@ -2152,10 +2152,10 @@ bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete ) // Switch to visible in any case if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) != - (nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode) ) - SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | eRedlineMode)); + (nsRedlineMode_t::REDLINE_SHOW_MASK & meRedlineMode) ) + SetRedlineMode( (RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | meRedlineMode)); - SwRedline* pTmp = (*pRedlineTbl)[ nPos ]; + SwRedline* pTmp = (*mpRedlineTbl)[ nPos ]; if( pTmp->HasMark() && pTmp->IsVisible() ) { if (GetIDocumentUndoRedo().DoesUndo()) @@ -2177,19 +2177,19 @@ bool SwDoc::RejectRedline( sal_uInt16 nPos, bool bCallDelete ) GetIDocumentUndoRedo().AppendUndo(pUndo); } - bRet |= lcl_RejectRedline( *pRedlineTbl, nPos, bCallDelete ); + bRet |= lcl_RejectRedline( *mpRedlineTbl, nPos, bCallDelete ); if( nSeqNo ) { if( USHRT_MAX == nPos ) nPos = 0; sal_uInt16 nFndPos = 2 == nLoopCnt - ? pRedlineTbl->FindNextSeqNo( nSeqNo, nPos ) - : pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ); + ? mpRedlineTbl->FindNextSeqNo( nSeqNo, nPos ) + : mpRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ); if( USHRT_MAX != nFndPos || ( 0 != ( --nLoopCnt ) && USHRT_MAX != ( nFndPos = - pRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ))) ) - pTmp = (*pRedlineTbl)[ nPos = nFndPos ]; + mpRedlineTbl->FindPrevSeqNo( nSeqNo, nPos ))) ) + pTmp = (*mpRedlineTbl)[ nPos = nFndPos ]; else nLoopCnt = 0; } @@ -2216,8 +2216,8 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete ) { // Switch to visible in any case if( (nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE) != - (nsRedlineMode_t::REDLINE_SHOW_MASK & eRedlineMode) ) - SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | eRedlineMode)); + (nsRedlineMode_t::REDLINE_SHOW_MASK & meRedlineMode) ) + SetRedlineMode((RedlineMode_t)(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE | meRedlineMode)); // The Selection is only in the ContentSection. If there are Redlines // to Non-ContentNodes before or after that, then the Selections @@ -2231,7 +2231,7 @@ bool SwDoc::RejectRedline( const SwPaM& rPam, bool bCallDelete ) GetIDocumentUndoRedo().AppendUndo( new SwUndoRejectRedline(aPam) ); } - int nRet = lcl_AcceptRejectRedl( lcl_RejectRedline, *pRedlineTbl, + int nRet = lcl_AcceptRejectRedl( lcl_RejectRedline, *mpRedlineTbl, bCallDelete, aPam ); if( nRet > 0 ) { @@ -2288,9 +2288,9 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const do { bRestart = false; - for( ; !pFnd && n < pRedlineTbl->size(); ++n ) + for( ; !pFnd && n < mpRedlineTbl->size(); ++n ) { - pFnd = (*pRedlineTbl)[ n ]; + pFnd = (*mpRedlineTbl)[ n ]; if( pFnd->HasMark() && pFnd->IsVisible() ) { *rPam.GetMark() = *pFnd->Start(); @@ -2306,9 +2306,9 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const // Merge all of the same type and author that are // consecutive into one Selection. const SwPosition* pPrevEnd = pFnd->End(); - while( ++n < pRedlineTbl->size() ) + while( ++n < mpRedlineTbl->size() ) { - const SwRedline* pTmp = (*pRedlineTbl)[ n ]; + const SwRedline* pTmp = (*mpRedlineTbl)[ n ]; if( pTmp->HasMark() && pTmp->IsVisible() ) { const SwPosition *pRStt; @@ -2356,7 +2356,7 @@ const SwRedline* SwDoc::SelNextRedline( SwPaM& rPam ) const if( !pFnd || *rPam.GetMark() == *rPam.GetPoint() ) { - if( n < pRedlineTbl->size() ) + if( n < mpRedlineTbl->size() ) { bRestart = true; *rPam.GetPoint() = *pSaveFnd->End(); @@ -2407,7 +2407,7 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const while( !pFnd && 0 < n ) { - pFnd = (*pRedlineTbl)[ --n ]; + pFnd = (*mpRedlineTbl)[ --n ]; if( pFnd->HasMark() && pFnd->IsVisible() ) { *rPam.GetMark() = *pFnd->End(); @@ -2424,7 +2424,7 @@ const SwRedline* SwDoc::SelPrevRedline( SwPaM& rPam ) const const SwPosition* pNextStt = pFnd->Start(); while( 0 < n ) { - const SwRedline* pTmp = (*pRedlineTbl)[ --n ]; + const SwRedline* pTmp = (*mpRedlineTbl)[ --n ]; if( pTmp->HasMark() && pTmp->IsVisible() ) { const SwPosition *pREnd; @@ -2503,10 +2503,10 @@ bool SwDoc::SetRedlineComment( const SwPaM& rPaM, const String& rS ) sal_uInt16 n = 0; if( lcl_FindCurrRedline( *pStt, n, true ) ) { - for( ; n < pRedlineTbl->size(); ++n ) + for( ; n < mpRedlineTbl->size(); ++n ) { bRet = true; - SwRedline* pTmp = (*pRedlineTbl)[ n ]; + SwRedline* pTmp = (*mpRedlineTbl)[ n ]; if( pStt != pEnd && *pTmp->Start() > *pEnd ) break; @@ -2553,21 +2553,21 @@ void SwDoc::SetAutoFmtRedlineComment( const String* pTxt, sal_uInt16 nSeqNo ) mbIsAutoFmtRedline = 0 != pTxt; if( pTxt ) { - if( !pAutoFmtRedlnComment ) - pAutoFmtRedlnComment = new String( *pTxt ); + if( !mpAutoFmtRedlnComment ) + mpAutoFmtRedlnComment = new String( *pTxt ); else - *pAutoFmtRedlnComment = *pTxt; + *mpAutoFmtRedlnComment = *pTxt; } else - delete pAutoFmtRedlnComment, pAutoFmtRedlnComment = 0; + delete mpAutoFmtRedlnComment, mpAutoFmtRedlnComment = 0; - nAutoFmtRedlnCommentNo = nSeqNo; + mnAutoFmtRedlnCommentNo = nSeqNo; } void SwDoc::SetRedlinePassword( /*[in]*/const uno::Sequence & rNewPassword) { - aRedlinePasswd = rNewPassword; + maRedlinePasswd = rNewPassword; SetModified(); } diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 40cc23e66c3d..8be21d80ee92 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -343,7 +343,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) SwUndoRedlineSort* pRedlUndo = 0; SwUndoSort* pUndoSort = 0; - if( IsRedlineOn() || (!IsIgnoreRedline() && !pRedlineTbl->empty() )) + if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) { pRedlPam = new SwPaM( pStart->nNode, pEnd->nNode, -1, 1 ); SwCntntNode* pCNd = pRedlPam->GetCntntNode( sal_False ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index fa871b20b0b6..cbe89a415851 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -463,13 +463,13 @@ const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, bool bCreate ) SwTOXBase** prBase = 0; switch(eTyp) { - case TOX_CONTENT: prBase = &pDefTOXBases->pContBase; break; - case TOX_INDEX: prBase = &pDefTOXBases->pIdxBase; break; - case TOX_USER: prBase = &pDefTOXBases->pUserBase; break; - case TOX_TABLES: prBase = &pDefTOXBases->pTblBase; break; - case TOX_OBJECTS: prBase = &pDefTOXBases->pObjBase; break; - case TOX_ILLUSTRATIONS: prBase = &pDefTOXBases->pIllBase; break; - case TOX_AUTHORITIES: prBase = &pDefTOXBases->pAuthBase; break; + case TOX_CONTENT: prBase = &mpDefTOXBases->pContBase; break; + case TOX_INDEX: prBase = &mpDefTOXBases->pIdxBase; break; + case TOX_USER: prBase = &mpDefTOXBases->pUserBase; break; + case TOX_TABLES: prBase = &mpDefTOXBases->pTblBase; break; + case TOX_OBJECTS: prBase = &mpDefTOXBases->pObjBase; break; + case TOX_ILLUSTRATIONS: prBase = &mpDefTOXBases->pIllBase; break; + case TOX_AUTHORITIES: prBase = &mpDefTOXBases->pAuthBase; break; } if(!(*prBase) && bCreate) { @@ -485,13 +485,13 @@ void SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase) SwTOXBase** prBase = 0; switch(rBase.GetType()) { - case TOX_CONTENT: prBase = &pDefTOXBases->pContBase; break; - case TOX_INDEX: prBase = &pDefTOXBases->pIdxBase; break; - case TOX_USER: prBase = &pDefTOXBases->pUserBase; break; - case TOX_TABLES: prBase = &pDefTOXBases->pTblBase; break; - case TOX_OBJECTS: prBase = &pDefTOXBases->pObjBase; break; - case TOX_ILLUSTRATIONS: prBase = &pDefTOXBases->pIllBase; break; - case TOX_AUTHORITIES: prBase = &pDefTOXBases->pAuthBase; break; + case TOX_CONTENT: prBase = &mpDefTOXBases->pContBase; break; + case TOX_INDEX: prBase = &mpDefTOXBases->pIdxBase; break; + case TOX_USER: prBase = &mpDefTOXBases->pUserBase; break; + case TOX_TABLES: prBase = &mpDefTOXBases->pTblBase; break; + case TOX_OBJECTS: prBase = &mpDefTOXBases->pObjBase; break; + case TOX_ILLUSTRATIONS: prBase = &mpDefTOXBases->pIllBase; break; + case TOX_AUTHORITIES: prBase = &mpDefTOXBases->pAuthBase; break; } if(*prBase) delete (*prBase); @@ -595,8 +595,8 @@ bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes ) sal_uInt16 SwDoc::GetTOXTypeCount(TOXTypes eTyp) const { sal_uInt16 nCnt = 0; - for( sal_uInt16 n = 0; n < pTOXTypes->size(); ++n ) - if( eTyp == (*pTOXTypes)[n]->GetType() ) + for( sal_uInt16 n = 0; n < mpTOXTypes->size(); ++n ) + if( eTyp == (*mpTOXTypes)[n]->GetType() ) ++nCnt; return nCnt; } @@ -604,16 +604,16 @@ sal_uInt16 SwDoc::GetTOXTypeCount(TOXTypes eTyp) const const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, sal_uInt16 nId ) const { sal_uInt16 nCnt = 0; - for( sal_uInt16 n = 0; n < pTOXTypes->size(); ++n ) - if( eTyp == (*pTOXTypes)[n]->GetType() && nCnt++ == nId ) - return (*pTOXTypes)[n]; + for( sal_uInt16 n = 0; n < mpTOXTypes->size(); ++n ) + if( eTyp == (*mpTOXTypes)[n]->GetType() && nCnt++ == nId ) + return (*mpTOXTypes)[n]; return 0; } const SwTOXType* SwDoc::InsertTOXType( const SwTOXType& rTyp ) { SwTOXType * pNew = new SwTOXType( rTyp ); - pTOXTypes->push_back( pNew ); + mpTOXTypes->push_back( pNew ); return pNew; } @@ -631,12 +631,12 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, sal_uInt16 nNum = 0; sal_uInt16 nTmp = 0; - sal_uInt16 nFlagSize = ( pSectionFmtTbl->size() / 8 ) +2; + sal_uInt16 nFlagSize = ( mpSectionFmtTbl->size() / 8 ) +2; sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ]; memset( pSetFlags, 0, nFlagSize ); - for( n = 0; n < pSectionFmtTbl->size(); ++n ) - if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) )&& + for( n = 0; n < mpSectionFmtTbl->size(); ++n ) + if( 0 != ( pSectNd = (*mpSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) )&& TOX_CONTENT_SECTION == (pSect = &pSectNd->GetSection())->GetType()) { const String& rNm = pSect->GetSectionName(); @@ -644,7 +644,7 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, { // Calculate number and set the Flag nNum = (sal_uInt16)rNm.Copy( nNmLen ).ToInt32(); - if( nNum-- && nNum < pSectionFmtTbl->size() ) + if( nNum-- && nNum < mpSectionFmtTbl->size() ) pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 )); } if( pChkStr && pChkStr->Equals( rNm ) ) @@ -654,7 +654,7 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, if( !pChkStr ) { // All Numbers have been flagged accordingly, so get the right Number - nNum = pSectionFmtTbl->size(); + nNum = mpSectionFmtTbl->size(); for( n = 0; n < nFlagSize; ++n ) if( 0xff != ( nTmp = pSetFlags[ n ] )) { diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx index 65a967dc0fad..9730e62525c3 100644 --- a/sw/source/core/doc/docxforms.cxx +++ b/sw/source/core/doc/docxforms.cxx @@ -45,12 +45,12 @@ using rtl::OUString; Reference SwDoc::getXForms() const { - return xXForms; + return mxXForms; } bool SwDoc::isXForms() const { - return xXForms.is(); + return mxXForms.is(); } static Reference lcl_createInstance( const sal_Char* pServiceName ) @@ -67,9 +67,9 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) try { // create XForms components - xXForms.set( lcl_createInstance( "com.sun.star.xforms.XForms" ), + mxXForms.set( lcl_createInstance( "com.sun.star.xforms.XForms" ), UNO_QUERY ); - OSL_ENSURE( xXForms.is(), "can't create XForms container" ); + OSL_ENSURE( mxXForms.is(), "can't create XForms container" ); // change our module identifier, to be able to have a dedicated UI Reference< XModule > xModule; @@ -81,7 +81,7 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) xModule->setIdentifier( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xforms.XMLFormDocument" ) ) ); // create default model - if( bCreateDefaultModel && xXForms.is() ) + if( bCreateDefaultModel && mxXForms.is() ) { OUString sName(RTL_CONSTASCII_USTRINGPARAM("Model 1")); Reference xModel( @@ -95,9 +95,9 @@ void SwDoc::initXForms( bool bCreateDefaultModel ) OUString(RTL_CONSTASCII_USTRINGPARAM("Instance 1")), OUString(), sal_True ); xModel->initialize(); - xXForms->insertByName( sName, makeAny( xModel ) ); + mxXForms->insertByName( sName, makeAny( xModel ) ); } - OSL_ENSURE( xXForms->hasElements(), "can't create XForms model" ); + OSL_ENSURE( mxXForms->hasElements(), "can't create XForms model" ); } OSL_ENSURE( isXForms(), "initialization failed" ); diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index 2c2d7af8b27e..9d3c63adecb9 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -229,21 +229,21 @@ void SwExtTextInput::SetOverwriteCursor( sal_Bool bFlag ) SwExtTextInput* SwDoc::CreateExtTextInput( const SwPaM& rPam ) { - SwExtTextInput* pNew = new SwExtTextInput( rPam, pExtInputRing ); - if( !pExtInputRing ) - pExtInputRing = pNew; + SwExtTextInput* pNew = new SwExtTextInput( rPam, mpExtInputRing ); + if( !mpExtInputRing ) + mpExtInputRing = pNew; pNew->SetMark(); return pNew; } void SwDoc::DeleteExtTextInput( SwExtTextInput* pDel ) { - if( pDel == pExtInputRing ) + if( pDel == mpExtInputRing ) { - if( pDel->GetNext() != pExtInputRing ) - pExtInputRing = (SwPaM*)pDel->GetNext(); + if( pDel->GetNext() != mpExtInputRing ) + mpExtInputRing = (SwPaM*)pDel->GetNext(); else - pExtInputRing = 0; + mpExtInputRing = 0; } delete pDel; } @@ -252,10 +252,10 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd, xub_StrLen nCntntPos ) const { SwExtTextInput* pRet = 0; - if( pExtInputRing ) + if( mpExtInputRing ) { sal_uLong nNdIdx = rNd.GetIndex(); - SwExtTextInput* pTmp = (SwExtTextInput*)pExtInputRing; + SwExtTextInput* pTmp = (SwExtTextInput*)mpExtInputRing; do { sal_uLong nPt = pTmp->GetPoint()->nNode.GetIndex(), nMk = pTmp->GetMark()->nNode.GetIndex(); @@ -275,16 +275,16 @@ SwExtTextInput* SwDoc::GetExtTextInput( const SwNode& rNd, pRet = pTmp; break; } - } while( pExtInputRing != (pTmp = (SwExtTextInput*)pExtInputRing ) ); + } while( mpExtInputRing != (pTmp = (SwExtTextInput*)mpExtInputRing ) ); } return pRet; } SwExtTextInput* SwDoc::GetExtTextInput() const { - OSL_ENSURE( !pExtInputRing || pExtInputRing == pExtInputRing->GetNext(), + OSL_ENSURE( !mpExtInputRing || mpExtInputRing == mpExtInputRing->GetNext(), "more then one InputEngine available" ); - return (SwExtTextInput*)pExtInputRing; + return (SwExtTextInput*)mpExtInputRing; } diff --git a/sw/source/core/doc/lineinfo.cxx b/sw/source/core/doc/lineinfo.cxx index 5ffc382f2547..870fda5c616d 100644 --- a/sw/source/core/doc/lineinfo.cxx +++ b/sw/source/core/doc/lineinfo.cxx @@ -29,8 +29,8 @@ void SwDoc::SetLineNumberInfo( const SwLineNumberInfo &rNew ) { SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219 if ( pTmpRoot && - (rNew.IsCountBlankLines() != pLineNumberInfo->IsCountBlankLines() || - rNew.IsRestartEachPage() != pLineNumberInfo->IsRestartEachPage()) ) + (rNew.IsCountBlankLines() != mpLineNumberInfo->IsCountBlankLines() || + rNew.IsRestartEachPage() != mpLineNumberInfo->IsRestartEachPage()) ) { std::set aAllLayouts = GetAllLayouts();//swmod 080225 pTmpRoot->StartAllAction(); @@ -40,13 +40,13 @@ void SwDoc::SetLineNumberInfo( const SwLineNumberInfo &rNew ) std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::InvalidateAllCntnt), INV_LINENUM | INV_SIZE));//swmod 080226 pTmpRoot->EndAllAction(); } //swmod 080219 - *pLineNumberInfo = rNew; + *mpLineNumberInfo = rNew; SetModified(); } const SwLineNumberInfo& SwDoc::GetLineNumberInfo() const { - return *pLineNumberInfo; + return *mpLineNumberInfo; } SwLineNumberInfo::SwLineNumberInfo() : diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx index 0322db38f0a5..63fb41444e74 100644 --- a/sw/source/core/doc/poolfmt.cxx +++ b/sw/source/core/doc/poolfmt.cxx @@ -315,9 +315,9 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) SwTxtFmtColl* pNewColl; sal_uInt16 nOutLvlBits = 0; - for( sal_uInt16 n = 0; n < pTxtFmtCollTbl->size(); ++n ) + for( sal_uInt16 n = 0; n < mpTxtFmtCollTbl->size(); ++n ) { - if( nId == ( pNewColl = (*pTxtFmtCollTbl)[ n ] )->GetPoolFmtId() ) + if( nId == ( pNewColl = (*mpTxtFmtCollTbl)[ n ] )->GetPoolFmtId() ) { return pNewColl; } @@ -357,15 +357,15 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( sal_uInt16 nId, bool bRegardLanguage ) //FEATURE::CONDCOLL if(::IsConditionalByPoolId( nId )) pNewColl = new SwConditionTxtFmtColl( GetAttrPool(), aNm, !nParent - ? pDfltTxtFmtColl + ? mpDfltTxtFmtColl : GetTxtCollFromPool( nParent )); else //FEATURE::CONDCOLL pNewColl = new SwTxtFmtColl( GetAttrPool(), aNm, !nParent - ? pDfltTxtFmtColl + ? mpDfltTxtFmtColl : GetTxtCollFromPool( nParent )); pNewColl->SetPoolFmtId( nId ); - pTxtFmtCollTbl->push_back( pNewColl ); + mpTxtFmtCollTbl->push_back( pNewColl ); } bool bNoDefault = get( IDocumentSettingAccess::STYLES_NODEFAULT ); @@ -1052,9 +1052,9 @@ bool SwDoc::IsPoolTxtCollUsed( sal_uInt16 nId ) const SwTxtFmtColl* pNewColl = 0; bool bFnd = false; - for( sal_uInt16 n = 0; !bFnd && n < pTxtFmtCollTbl->size(); ++n ) + for( sal_uInt16 n = 0; !bFnd && n < mpTxtFmtCollTbl->size(); ++n ) { - pNewColl = (*pTxtFmtCollTbl)[ n ]; + pNewColl = (*mpTxtFmtCollTbl)[ n ]; if( nId == pNewColl->GetPoolFmtId() ) bFnd = true; } @@ -1081,8 +1081,8 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId ) { case POOLGRP_CHARFMT: { - pArray[0] = pCharFmtTbl; - pDeriveFmt = pDfltCharFmt; + pArray[0] = mpCharFmtTbl; + pDeriveFmt = mpDfltCharFmt; if( nId > RES_POOLCHR_NORMAL_END ) nRCId = RC_POOLCHRFMT_HTML_BEGIN - RES_POOLCHR_HTML_BEGIN; @@ -1101,9 +1101,9 @@ SwFmt* SwDoc::GetFmtFromPool( sal_uInt16 nId ) break; case POOLGRP_FRAMEFMT: { - pArray[0] = pFrmFmtTbl; - pArray[1] = pSpzFrmFmtTbl; - pDeriveFmt = pDfltFrmFmt; + pArray[0] = mpFrmFmtTbl; + pArray[1] = mpSpzFrmFmtTbl; + pDeriveFmt = mpDfltFrmFmt; nArrCnt = 2; nRCId = RC_POOLFRMFMT_BEGIN - RES_POOLFRM_BEGIN; pWhichRange = aFrmFmtSetRange; @@ -1367,12 +1367,12 @@ bool SwDoc::IsPoolFmtUsed( sal_uInt16 nId ) const if (RES_POOLCHR_BEGIN <= nId && nId < RES_POOLCHR_END) { - pArray[0] = pCharFmtTbl; + pArray[0] = mpCharFmtTbl; } else if (RES_POOLFRM_BEGIN <= nId && nId < RES_POOLFRM_END) { - pArray[0] = pFrmFmtTbl; - pArray[1] = pSpzFrmFmtTbl; + pArray[0] = mpFrmFmtTbl; + pArray[1] = mpSpzFrmFmtTbl; nArrCnt = 2; } else @@ -1430,8 +1430,8 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) SwPageDesc *pNewPgDsc; sal_uInt16 n; - for( n = 0; n < aPageDescs.size(); ++n ) - if( nId == ( pNewPgDsc = aPageDescs[ n ] )->GetPoolFmtId() ) + for( n = 0; n < maPageDescs.size(); ++n ) + if( nId == ( pNewPgDsc = maPageDescs[ n ] )->GetPoolFmtId() ) { return pNewPgDsc; } @@ -1453,7 +1453,7 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage ) n = MakePageDesc( aNm, 0, bRegardLanguage ); } - pNewPgDsc = aPageDescs[ n ]; + pNewPgDsc = maPageDescs[ n ]; pNewPgDsc->SetPoolFmtId( nId ); if( !bIsModified ) ResetModified(); @@ -2269,9 +2269,9 @@ bool SwDoc::IsPoolPageDescUsed( sal_uInt16 nId ) const "Wrong AutoFormat Id" ); SwPageDesc *pNewPgDsc = 0; bool bFnd = false; - for( sal_uInt16 n = 0; !bFnd && n < aPageDescs.size(); ++n ) + for( sal_uInt16 n = 0; !bFnd && n < maPageDescs.size(); ++n ) { - pNewPgDsc = aPageDescs[ n ]; + pNewPgDsc = maPageDescs[ n ]; if( nId == pNewPgDsc->GetPoolFmtId() ) bFnd = true; } @@ -2310,20 +2310,20 @@ sal_uInt16 SwDoc::SetDocPattern( const String& rPatternName ) { OSL_ENSURE( rPatternName.Len(), "no Document style name" ); - size_t nNewPos = aPatternNms.size(); - for(size_t n = 0; n < aPatternNms.size(); ++n) - if( boost::is_null(aPatternNms.begin() + n) ) + size_t nNewPos = maPatternNms.size(); + for(size_t n = 0; n < maPatternNms.size(); ++n) + if( boost::is_null(maPatternNms.begin() + n) ) { - if( nNewPos == aPatternNms.size() ) + if( nNewPos == maPatternNms.size() ) nNewPos = n; } - else if( rPatternName == aPatternNms[n] ) + else if( rPatternName == maPatternNms[n] ) return n; - if( nNewPos < aPatternNms.size() ) - aPatternNms.erase(aPatternNms.begin() + nNewPos); // Free space again + if( nNewPos < maPatternNms.size() ) + maPatternNms.erase(maPatternNms.begin() + nNewPos); // Free space again - aPatternNms.insert(aPatternNms.begin() + nNewPos, new String(rPatternName)); + maPatternNms.insert(maPatternNms.begin() + nNewPos, new String(rPatternName)); SetModified(); return nNewPos; } diff --git a/sw/source/core/doc/visiturl.cxx b/sw/source/core/doc/visiturl.cxx index 264b853aeba1..094883b62b0b 100644 --- a/sw/source/core/doc/visiturl.cxx +++ b/sw/source/core/doc/visiturl.cxx @@ -98,9 +98,9 @@ bool SwDoc::IsVisitedURL( const String& rURL ) const if( rURL.Len() ) { INetURLHistory *pHist = INetURLHistory::GetOrCreate(); - if( '#' == rURL.GetChar( 0 ) && pDocShell && pDocShell->GetMedium() ) + if( '#' == rURL.GetChar( 0 ) && mpDocShell && mpDocShell->GetMedium() ) { - INetURLObject aIObj( pDocShell->GetMedium()->GetURLObject() ); + INetURLObject aIObj( mpDocShell->GetMedium()->GetURLObject() ); aIObj.SetMark( rURL.Copy( 1 ) ); bRet = pHist->QueryUrl( aIObj ); } @@ -108,10 +108,10 @@ bool SwDoc::IsVisitedURL( const String& rURL ) const bRet = pHist->QueryUrl( rURL ); // We also want to be informed about status updates in the History - if( !pURLStateChgd ) + if( !mpURLStateChgd ) { SwDoc* pD = (SwDoc*)this; - pD->pURLStateChgd = new SwURLStateChanged( this ); + pD->mpURLStateChgd = new SwURLStateChanged( this ); } } return bRet; diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index d798fa162c14..cd1f735cdcd2 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -318,7 +318,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, SetRedlineMode_intern( eOld ); - if( IsRedlineOn() || (!IsIgnoreRedline() && !pRedlineTbl->empty() )) + if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) { SwPaM aPam( *pNewSectNode->EndOfSectionNode(), *pNewSectNode, 1 ); if( IsRedlineOn() ) @@ -504,19 +504,19 @@ SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) const SwSectionFmt* SwDoc::MakeSectionFmt( SwSectionFmt *pDerivedFrom ) { if( !pDerivedFrom ) - pDerivedFrom = (SwSectionFmt*)pDfltFrmFmt; + pDerivedFrom = (SwSectionFmt*)mpDfltFrmFmt; SwSectionFmt* pNew = new SwSectionFmt( pDerivedFrom, this ); - pSectionFmtTbl->push_back( pNew ); + mpSectionFmtTbl->push_back( pNew ); return pNew; } void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, bool bDelNodes ) { - SwSectionFmts::iterator itFmtPos = std::find( pSectionFmtTbl->begin(), pSectionFmtTbl->end(), pFmt ); + SwSectionFmts::iterator itFmtPos = std::find( mpSectionFmtTbl->begin(), mpSectionFmtTbl->end(), pFmt ); GetIDocumentUndoRedo().StartUndo(UNDO_DELSECTION, NULL); - if( pSectionFmtTbl->end() != itFmtPos ) + if( mpSectionFmtTbl->end() != itFmtPos ) { const SwNodeIndex* pIdx = pFmt->GetCntnt( sal_False ).GetCntntIdx(); const SfxPoolItem* pFtnEndAtTxtEnd; @@ -565,11 +565,11 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, bool bDelNodes ) // A ClearRedo could result in a recursive call of this function and delete some section // formats, thus the position inside the SectionFmtTbl could have changed - itFmtPos = std::find( pSectionFmtTbl->begin(), pSectionFmtTbl->end(), pFmt ); + itFmtPos = std::find( mpSectionFmtTbl->begin(), mpSectionFmtTbl->end(), pFmt ); // WARNING: First remove from the array and then delete, // as the Section DTOR tries to delete it's format itself. - pSectionFmtTbl->erase( itFmtPos ); + mpSectionFmtTbl->erase( itFmtPos ); //FEATURE::CONDCOLL sal_uLong nCnt = 0, nSttNd = 0; if( pIdx && &GetNodes() == &pIdx->GetNodes() && @@ -605,7 +605,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, bool bDelNodes ) void SwDoc::UpdateSection(sal_uInt16 const nPos, SwSectionData & rNewData, SfxItemSet const*const pAttr, bool const bPreventLinkUpdate) { - SwSectionFmt* pFmt = (*pSectionFmtTbl)[ nPos ]; + SwSectionFmt* pFmt = (*mpSectionFmtTbl)[ nPos ]; SwSection* pSection = pFmt->GetSection(); /// remember hidden condition flag of SwSection before changes @@ -1391,22 +1391,22 @@ String SwDoc::GetUniqueSectionName( const String* pChkStr ) const xub_StrLen nNmLen = aName.Len(); sal_uInt16 nNum = 0; - sal_uInt16 nTmp, nFlagSize = ( pSectionFmtTbl->size() / 8 ) +2; + sal_uInt16 nTmp, nFlagSize = ( mpSectionFmtTbl->size() / 8 ) +2; sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ]; memset( pSetFlags, 0, nFlagSize ); const SwSectionNode* pSectNd; sal_uInt16 n; - for( n = 0; n < pSectionFmtTbl->size(); ++n ) - if( 0 != ( pSectNd = (*pSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) )) + for( n = 0; n < mpSectionFmtTbl->size(); ++n ) + if( 0 != ( pSectNd = (*mpSectionFmtTbl)[ n ]->GetSectionNode( sal_False ) )) { const String& rNm = pSectNd->GetSection().GetSectionName(); if( rNm.Match( aName ) == nNmLen ) { // Calculate the Number and reset the Flag nNum = static_cast(rNm.Copy( nNmLen ).ToInt32()); - if( nNum-- && nNum < pSectionFmtTbl->size() ) + if( nNum-- && nNum < mpSectionFmtTbl->size() ) pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 )); } if( pChkStr && pChkStr->Equals( rNm ) ) @@ -1416,7 +1416,7 @@ String SwDoc::GetUniqueSectionName( const String* pChkStr ) const if( !pChkStr ) { // Flagged all Numbers accordingly, so get the right Number - nNum = pSectionFmtTbl->size(); + nNum = mpSectionFmtTbl->size(); for( n = 0; n < nFlagSize; ++n ) if( 0xff != ( nTmp = pSetFlags[ n ] )) { diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 9e296eb8106d..ec4a14662751 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -540,7 +540,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, GetNodes().GoNext( &aNdIdx ); // Go to the next ContentNode pTblNd->MakeFrms( &aNdIdx ); - if( IsRedlineOn() || (!IsIgnoreRedline() && !pRedlineTbl->empty() )) + if( IsRedlineOn() || (!IsIgnoreRedline() && !mpRedlineTbl->empty() )) { SwPaM aPam( *pTblNd->EndOfSectionNode(), *pTblNd, 1 ); if( IsRedlineOn() ) @@ -3881,27 +3881,27 @@ String SwDoc::GetUniqueTblName() const String aName( aId ); xub_StrLen nNmLen = aName.Len(); - sal_uInt16 nNum, nTmp, nFlagSize = ( pTblFrmFmtTbl->size() / 8 ) +2; + sal_uInt16 nNum, nTmp, nFlagSize = ( mpTblFrmFmtTbl->size() / 8 ) +2; sal_uInt16 n; sal_uInt8* pSetFlags = new sal_uInt8[ nFlagSize ]; memset( pSetFlags, 0, nFlagSize ); - for( n = 0; n < pTblFrmFmtTbl->size(); ++n ) + for( n = 0; n < mpTblFrmFmtTbl->size(); ++n ) { - const SwFrmFmt* pFmt = (*pTblFrmFmtTbl)[ n ]; + const SwFrmFmt* pFmt = (*mpTblFrmFmtTbl)[ n ]; if( !pFmt->IsDefault() && IsUsed( *pFmt ) && pFmt->GetName().Match( aName ) == nNmLen ) { // Get number and set the Flag nNum = static_cast(pFmt->GetName().Copy( nNmLen ).ToInt32()); - if( nNum-- && nNum < pTblFrmFmtTbl->size() ) + if( nNum-- && nNum < mpTblFrmFmtTbl->size() ) pSetFlags[ nNum / 8 ] |= (0x01 << ( nNum & 0x07 )); } } // All numbers are flagged properly, thus calculate the right number - nNum = pTblFrmFmtTbl->size(); + nNum = mpTblFrmFmtTbl->size(); for( n = 0; n < nFlagSize; ++n ) if( 0xff != ( nTmp = pSetFlags[ n ] )) { @@ -3920,13 +3920,13 @@ SwTableFmt* SwDoc::FindTblFmtByName( const String& rName, sal_Bool bAll ) const { const SwFmt* pRet = 0; if( bAll ) - pRet = FindFmtByName( *pTblFrmFmtTbl, rName ); + pRet = FindFmtByName( *mpTblFrmFmtTbl, rName ); else { // Only the ones set in the Doc - for( sal_uInt16 n = 0; n < pTblFrmFmtTbl->size(); ++n ) + for( sal_uInt16 n = 0; n < mpTblFrmFmtTbl->size(); ++n ) { - const SwFrmFmt* pFmt = (*pTblFrmFmtTbl)[ n ]; + const SwFrmFmt* pFmt = (*mpTblFrmFmtTbl)[ n ]; if( !pFmt->IsDefault() && IsUsed( *pFmt ) && pFmt->GetName() == rName ) { diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx index 81b356682f53..ca2efd4fc7c5 100644 --- a/sw/source/core/docnode/nodedump.cxx +++ b/sw/source/core/docnode/nodedump.cxx @@ -120,8 +120,8 @@ void SwDoc::dumpAsXml( xmlTextWriterPtr w ) writer.startElement( "doc" ); writer.writeFormatAttribute( "ptr", "%p", this ); m_pNodes->dumpAsXml( writer ); - pMarkManager->dumpAsXml( writer ); - pFldTypes->dumpAsXml( writer ); + mpMarkManager->dumpAsXml( writer ); + mpFldTypes->dumpAsXml( writer ); writer.endElement(); }