include/svx/svdmodel.hxx | 126 +++++------ sc/source/core/data/drwlayer.cxx | 6 sd/inc/drawdoc.hxx | 4 sd/source/core/drawdoc.cxx | 38 +-- sd/source/core/drawdoc2.cxx | 6 sd/source/core/drawdoc3.cxx | 4 sd/source/core/drawdoc4.cxx | 12 - svx/source/svdraw/svdmodel.cxx | 436 +++++++++++++++++++-------------------- 8 files changed, 316 insertions(+), 316 deletions(-)
New commits: commit bb16c36512189c0ff0c72cdb49a7fd24ee8f474d Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Oct 29 21:37:20 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Oct 30 08:36:24 2019 +0100 svx: prefix members of SdrModel See tdf#94879 for motivation. Change-Id: I08d77b07092894b67f33ce4cdbe29302b61121d3 Reviewed-on: https://gerrit.libreoffice.org/81717 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index b7b723c0d256..62980f1f000a 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -164,49 +164,49 @@ private: protected: std::vector<SdrPage*> maMaPag; // master pages std::vector<SdrPage*> maPages; - std::function<void(std::unique_ptr<SdrUndoAction>)> aUndoLink; // link to a NotifyUndo-Handler - Size aMaxObjSize; // e.g. for auto-growing text - Fraction aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ... - MapUnit eObjUnit; // see above - FieldUnit eUIUnit; // unit, scale (e.g. 1/1000) for the UI (status bar) is set by ImpSetUIUnit() - Fraction aUIScale; // see above - OUString aUIUnitStr; // see above - Fraction aUIUnitFact; // see above - int nUIUnitDecimalMark; // see above - - std::unique_ptr<SdrLayerAdmin> pLayerAdmin; - SfxItemPool* pItemPool; + std::function<void(std::unique_ptr<SdrUndoAction>)> m_aUndoLink; // link to a NotifyUndo-Handler + Size m_aMaxObjSize; // e.g. for auto-growing text + Fraction m_aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ... + MapUnit m_eObjUnit; // see above + FieldUnit m_eUIUnit; // unit, scale (e.g. 1/1000) for the UI (status bar) is set by ImpSetUIUnit() + Fraction m_aUIScale; // see above + OUString m_aUIUnitStr; // see above + Fraction m_aUIUnitFact; // see above + int m_nUIUnitDecimalMark; // see above + + std::unique_ptr<SdrLayerAdmin> m_pLayerAdmin; + SfxItemPool* m_pItemPool; comphelper::IEmbeddedHelper* m_pEmbeddedHelper; // helper for embedded objects to get rid of the SfxObjectShell - std::unique_ptr<SdrOutliner> pDrawOutliner; // an Outliner for outputting text - std::unique_ptr<SdrOutliner> pHitTestOutliner;// an Outliner for the HitTest - std::unique_ptr<SdrOutliner> pChainingOutliner; // an Outliner for chaining overflowing text + std::unique_ptr<SdrOutliner> m_pDrawOutliner; // an Outliner for outputting text + std::unique_ptr<SdrOutliner> m_pHitTestOutliner;// an Outliner for the HitTest + std::unique_ptr<SdrOutliner> m_pChainingOutliner; // an Outliner for chaining overflowing text sal_Int32 mnDefTextHgt; // Default text height in logical units - VclPtr<OutputDevice> pRefOutDev; // ReferenceDevice for the EditEngine + VclPtr<OutputDevice> m_pRefOutDev; // ReferenceDevice for the EditEngine rtl::Reference< SfxStyleSheetBasePool > mxStyleSheetPool; - SfxStyleSheet* pDefaultStyleSheet; + SfxStyleSheet* m_pDefaultStyleSheet; SfxStyleSheet* mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj; // #i119287# - sfx2::LinkManager* pLinkManager; // LinkManager - std::unique_ptr<std::deque<std::unique_ptr<SfxUndoAction>>> pUndoStack; - std::unique_ptr<std::deque<std::unique_ptr<SfxUndoAction>>> pRedoStack; - std::unique_ptr<SdrUndoGroup> pCurrentUndoGroup; // For multi-level - sal_uInt16 nUndoLevel; // undo nesting - bool bMyPool:1; // to clean up pMyPool from 303a + sfx2::LinkManager* m_pLinkManager; // LinkManager + std::unique_ptr<std::deque<std::unique_ptr<SfxUndoAction>>> m_pUndoStack; + std::unique_ptr<std::deque<std::unique_ptr<SfxUndoAction>>> m_pRedoStack; + std::unique_ptr<SdrUndoGroup> m_pCurrentUndoGroup; // For multi-level + sal_uInt16 m_nUndoLevel; // undo nesting + bool m_bMyPool:1; // to clean up pMyPool from 303a bool mbUndoEnabled:1; // If false no undo is recorded or we are during the execution of an undo action bool mbChanged:1; - bool bPagNumsDirty:1; - bool bMPgNumsDirty:1; - bool bTransportContainer:1; // doc is temporary object container, no display (e.g. clipboard) - bool bReadOnly:1; - bool bTransparentTextFrames:1; - bool bSwapGraphics:1; - bool bPasteResize:1; // Objects are being resized due to Paste with different MapMode - bool bStarDrawPreviewMode:1; + bool m_bPagNumsDirty:1; + bool m_bMPgNumsDirty:1; + bool m_bTransportContainer:1; // doc is temporary object container, no display (e.g. clipboard) + bool m_bReadOnly:1; + bool m_bTransparentTextFrames:1; + bool m_bSwapGraphics:1; + bool m_bPasteResize:1; // Objects are being resized due to Paste with different MapMode + bool m_bStarDrawPreviewMode:1; bool mbDisableTextEditUsesCommonUndoManager:1; - sal_uInt16 nDefaultTabulator; - sal_uInt32 nMaxUndoCount; + sal_uInt16 m_nDefaultTabulator; + sal_uInt32 m_nMaxUndoCount; - std::unique_ptr<TextChain> pTextChain; + std::unique_ptr<TextChain> m_pTextChain; public: @@ -265,9 +265,9 @@ private: public: SVX_DLLPRIVATE virtual bool IsCreatingDataObj() const { return false; } - bool IsTransportContainer() const { return bTransportContainer; } - bool IsPasteResize() const { return bPasteResize; } - void SetPasteResize(bool bOn) { bPasteResize=bOn; } + bool IsTransportContainer() const { return m_bTransportContainer; } + bool IsPasteResize() const { return m_bPasteResize; } + void SetPasteResize(bool bOn) { m_bPasteResize=bOn; } // If a custom Pool is put here, the class will call methods // on it (Put(), Remove()). On disposal of SdrModel the pool // will be deleted with delete. @@ -308,15 +308,15 @@ public: virtual SdrModel* AllocModel() const; // Changes on the layers set the modified flag and broadcast on the model! - const SdrLayerAdmin& GetLayerAdmin() const { return *pLayerAdmin; } - SdrLayerAdmin& GetLayerAdmin() { return *pLayerAdmin; } + const SdrLayerAdmin& GetLayerAdmin() const { return *m_pLayerAdmin; } + SdrLayerAdmin& GetLayerAdmin() { return *m_pLayerAdmin; } - const SfxItemPool& GetItemPool() const { return *pItemPool; } - SfxItemPool& GetItemPool() { return *pItemPool; } + const SfxItemPool& GetItemPool() const { return *m_pItemPool; } + SfxItemPool& GetItemPool() { return *m_pItemPool; } SdrOutliner& GetDrawOutliner(const SdrTextObj* pObj=nullptr) const; - SdrOutliner& GetHitTestOutliner() const { return *pHitTestOutliner; } + SdrOutliner& GetHitTestOutliner() const { return *m_pHitTestOutliner; } const SdrTextObj* GetFormattingTextObj() const; // put the TextDefaults (Font,Height,Color) in a Set void SetTextDefaults() const; @@ -327,26 +327,26 @@ public: // ReferenceDevice for the EditEngine void SetRefDevice(OutputDevice* pDev); - OutputDevice* GetRefDevice() const { return pRefOutDev.get(); } + OutputDevice* GetRefDevice() const { return m_pRefOutDev.get(); } // If a new MapMode is set on the RefDevice (or similar) void RefDeviceChanged(); // not yet implemented // default font height in logical units void SetDefaultFontHeight(sal_Int32 nVal); // default tabulator width for the EditEngine void SetDefaultTabulator(sal_uInt16 nVal); - sal_uInt16 GetDefaultTabulator() const { return nDefaultTabulator; } + sal_uInt16 GetDefaultTabulator() const { return m_nDefaultTabulator; } // The DefaultStyleSheet will be used in every symbol object which is inserted // in this model and does not have a StyleSheet set. - SfxStyleSheet* GetDefaultStyleSheet() const { return pDefaultStyleSheet; } - void SetDefaultStyleSheet(SfxStyleSheet* pDefSS) { pDefaultStyleSheet = pDefSS; } + SfxStyleSheet* GetDefaultStyleSheet() const { return m_pDefaultStyleSheet; } + void SetDefaultStyleSheet(SfxStyleSheet* pDefSS) { m_pDefaultStyleSheet = pDefSS; } // #i119287# default StyleSheet for SdrGrafObj and SdrOle2Obj SfxStyleSheet* GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj() const { return mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj; } void SetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj(SfxStyleSheet* pDefSS) { mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj = pDefSS; } - sfx2::LinkManager* GetLinkManager() { return pLinkManager; } - void SetLinkManager( sfx2::LinkManager* pLinkMgr ) { pLinkManager = pLinkMgr; } + sfx2::LinkManager* GetLinkManager() { return m_pLinkManager; } + void SetLinkManager( sfx2::LinkManager* pLinkMgr ) { m_pLinkManager = pLinkMgr; } ::comphelper::IEmbeddedHelper* GetPersist() const { return m_pEmbeddedHelper; } void SetPersist( ::comphelper::IEmbeddedHelper *p ) { m_pEmbeddedHelper = p; } @@ -364,23 +364,23 @@ public: // (FWIW: you cannot represent light years). // The scaling unit is needed for the Engine to serve the Clipboard // with the correct sizes. - MapUnit GetScaleUnit() const { return eObjUnit; } + MapUnit GetScaleUnit() const { return m_eObjUnit; } void SetScaleUnit(MapUnit eMap); - const Fraction& GetScaleFraction() const { return aObjUnit; } + const Fraction& GetScaleFraction() const { return m_aObjUnit; } void SetScaleFraction(const Fraction& rFrac); // Setting both simultaneously performs a little better void SetScaleUnit(MapUnit eMap, const Fraction& rFrac); // maximal size e.g. for auto growing texts - const Size& GetMaxObjSize() const { return aMaxObjSize; } - void SetMaxObjSize(const Size& rSiz) { aMaxObjSize=rSiz; } + const Size& GetMaxObjSize() const { return m_aMaxObjSize; } + void SetMaxObjSize(const Size& rSiz) { m_aMaxObjSize=rSiz; } // For the View! to display sane numbers in the status bar: Default is mm. void SetUIUnit(FieldUnit eUnit); - FieldUnit GetUIUnit() const { return eUIUnit; } + FieldUnit GetUIUnit() const { return m_eUIUnit; } // The scale of the drawing. Default 1/1. void SetUIScale(const Fraction& rScale); - const Fraction& GetUIScale() const { return aUIScale; } + const Fraction& GetUIScale() const { return m_aUIScale; } // Setting both simultaneously performs a little better void SetUIUnit(FieldUnit eUnit, const Fraction& rScale); @@ -390,8 +390,8 @@ public: static OUString GetPercentString(const Fraction& rVal); // RecalcPageNums is ordinarily only called by the Page. - bool IsPagNumsDirty() const { return bPagNumsDirty; }; - bool IsMPgNumsDirty() const { return bMPgNumsDirty; }; + bool IsPagNumsDirty() const { return m_bPagNumsDirty; }; + bool IsMPgNumsDirty() const { return m_bMPgNumsDirty; }; void RecalcPageNums(bool bMaster); // After the Insert the Page belongs to the SdrModel. virtual void InsertPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF); @@ -426,14 +426,14 @@ public: // - be pruned from memory if they are not needed. // For that to work, override the virtual method GetDocumentStream(). // Default=FALSE. Flag is not persistent. - bool IsSwapGraphics() const { return bSwapGraphics; } + bool IsSwapGraphics() const { return m_bSwapGraphics; } void SetSwapGraphics(); // Text frames without filling can be select with a mouse click by default (sal_False). // With this flag set to true you can hit them only in the area in which text is to be // found. - bool IsPickThroughTransparentTextFrames() const { return bTransparentTextFrames; } - void SetPickThroughTransparentTextFrames(bool bOn) { bTransparentTextFrames=bOn; } + bool IsPickThroughTransparentTextFrames() const { return m_bTransparentTextFrames; } + void SetPickThroughTransparentTextFrames(bool bOn) { m_bTransparentTextFrames=bOn; } // Can the model be changed at all? // Is only evaluated by the possibility methods of the View. @@ -482,7 +482,7 @@ public: void BegUndo(const OUString& rComment, const OUString& rObjDescr, SdrRepeatFunc eFunc); // open Undo group void EndUndo(); // close Undo group void AddUndo(std::unique_ptr<SdrUndoAction> pUndo); - sal_uInt16 GetUndoBracketLevel() const { return nUndoLevel; } + sal_uInt16 GetUndoBracketLevel() const { return m_nUndoLevel; } // only after the first BegUndo or before the last EndUndo: void SetUndoComment(const OUString& rComment); void SetUndoComment(const OUString& rComment, const OUString& rObjDescr); @@ -503,7 +503,7 @@ public: // void NotifyUndoActionHdl(SfxUndoAction* pUndoAction); // When calling the handler ownership is transferred; // The UndoAction belongs to the Handler, not the SdrModel. - void SetNotifyUndoActionHdl(const std::function<void(std::unique_ptr<SdrUndoAction>)>& rLink) { aUndoLink=rLink; } + void SetNotifyUndoActionHdl(const std::function<void(std::unique_ptr<SdrUndoAction>)>& rLink) { m_aUndoLink=rLink; } /** application can set its own undo manager, BegUndo, EndUndo and AddUndoAction calls are routed to this interface if given */ @@ -539,7 +539,7 @@ public: void SetStyleSheetPool(SfxStyleSheetBasePool* pPool) { mxStyleSheetPool=pPool; } void SetStarDrawPreviewMode(bool bPreview); - bool IsStarDrawPreviewMode() const { return bStarDrawPreviewMode; } + bool IsStarDrawPreviewMode() const { return m_bStarDrawPreviewMode; } bool GetDisableTextEditUsesCommonUndoManager() const { return mbDisableTextEditUsesCommonUndoManager; } void SetDisableTextEditUsesCommonUndoManager(bool bNew) { mbDisableTextEditUsesCommonUndoManager = bNew; } @@ -573,7 +573,7 @@ public: std::unique_ptr<SdrOutliner> createOutliner( OutlinerMode nOutlinerMode ); void disposeOutliner( std::unique_ptr<SdrOutliner> pOutliner ); - bool IsWriter() const { return !bMyPool; } + bool IsWriter() const { return !m_bMyPool; } // Used as a fallback in *::ReadUserDataSequence() to process common properties void ReadUserDataSequenceValue(const css::beans::PropertyValue *pValue); diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 9228ce80cee7..4dd80df9a85a 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -304,9 +304,9 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const OUString& rName ) : SfxItemPool* pOutlinerPool = rOutliner.GetEditTextObjectPool(); if ( pOutlinerPool ) { - pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt - pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt - pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt + m_pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT )); // 12Pt + m_pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CJK )); // 12Pt + m_pItemPool->SetPoolDefaultItem(SvxFontHeightItem( 423, 100, EE_CHAR_FONTHEIGHT_CTL )); // 12Pt } SfxItemPool* pHitOutlinerPool = rHitOutliner.GetEditTextObjectPool(); if ( pHitOutlinerPool ) diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index e0deb23993ac..304d4e282c78 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -133,7 +133,7 @@ class SD_DLLPUBLIC SdDrawDocument : public FmFormModel public: SAL_DLLPRIVATE void setDocAccTitle( const OUString& rTitle ) { msDocAccTitle = rTitle; } SAL_DLLPRIVATE const OUString& getDocAccTitle() const { return msDocAccTitle; } - SAL_DLLPRIVATE bool getDocReadOnly() const { return bReadOnly; } + SAL_DLLPRIVATE bool getDocReadOnly() const { return m_bReadOnly; } private: OUString msDocAccTitle; std::unique_ptr<SdOutliner> @@ -245,7 +245,7 @@ public: SAL_DLLPRIVATE virtual bool IsReadOnly() const override; SAL_DLLPRIVATE virtual void SetChanged(bool bFlag = true) override; - SAL_DLLPRIVATE SfxItemPool& GetPool() { return( *pItemPool ); } + SAL_DLLPRIVATE SfxItemPool& GetPool() { return( *m_pItemPool ); } SAL_DLLPRIVATE SdOutliner* GetOutliner(bool bCreateOutliner=true); SdOutliner* GetInternalOutliner(bool bCreateOutliner=true); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index fb040971caba..93074a90ce41 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -163,8 +163,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) SetScaleFraction(Fraction(1, 1)); SetDefaultFontHeight(847); // 24p - pItemPool->SetDefaultMetric(MapUnit::Map100thMM); - pItemPool->FreezeIdRanges(); + m_pItemPool->SetDefaultMetric(MapUnit::Map100thMM); + m_pItemPool->FreezeIdRanges(); SetTextDefaults(); // DrawingEngine has to know where it is... @@ -260,28 +260,28 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) // Set the StyleSheetPool for HitTestOutliner. // The link to the StyleRequest handler of the document is set later, in // NewOrLoadCompleted, because only then do all the templates exist. - pHitTestOutliner->SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()) ); + m_pHitTestOutliner->SetStyleSheetPool( static_cast<SfxStyleSheetPool*>(GetStyleSheetPool()) ); - SetCalcFieldValueHdl( pHitTestOutliner.get() ); + SetCalcFieldValueHdl( m_pHitTestOutliner.get() ); try { Reference< XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() ); if ( xSpellChecker.is() ) - pHitTestOutliner->SetSpeller( xSpellChecker ); + m_pHitTestOutliner->SetSpeller( xSpellChecker ); Reference< XHyphenator > xHyphenator( LinguMgr::GetHyphenator() ); if( xHyphenator.is() ) - pHitTestOutliner->SetHyphenator( xHyphenator ); + m_pHitTestOutliner->SetHyphenator( xHyphenator ); } catch(...) { OSL_FAIL("Can't get SpellChecker"); } - pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); + m_pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); - EEControlBits nCntrl2 = pHitTestOutliner->GetControlWord(); + EEControlBits nCntrl2 = m_pHitTestOutliner->GetControlWord(); nCntrl2 |= EEControlBits::ALLOWBIGOBJS; nCntrl2 &= ~EEControlBits::ONLINESPELLING; @@ -289,7 +289,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) if ( pOptions->IsSummationOfParagraphs() ) nCntrl2 |= EEControlBits::ULSPACESUMMATION; - pHitTestOutliner->SetControlWord( nCntrl2 ); + m_pHitTestOutliner->SetControlWord( nCntrl2 ); /** Create layers * @@ -348,16 +348,16 @@ SdDrawDocument::~SdDrawDocument() ClearModel(true); - if (pLinkManager) + if (m_pLinkManager) { // Release BaseLinks - if ( !pLinkManager->GetLinks().empty() ) + if ( !m_pLinkManager->GetLinks().empty() ) { - pLinkManager->Remove( 0, pLinkManager->GetLinks().size() ); + m_pLinkManager->Remove( 0, m_pLinkManager->GetLinks().size() ); } - delete pLinkManager; - pLinkManager = nullptr; + delete m_pLinkManager; + m_pLinkManager = nullptr; } maFrameViewList.clear(); @@ -759,7 +759,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) // Initialize HitTestOutliner and DocumentOutliner, but don't initialize the // global outliner, as it is not document specific like StyleSheetPool and // StyleRequestHandler are. - pHitTestOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool())); + m_pHitTestOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool())); if(mpOutliner) { @@ -809,7 +809,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode) /** updates all links, only links in this document should by resolved */ void SdDrawDocument::UpdateAllLinks() { - if (s_pDocLockedInsertingLinks || !pLinkManager || pLinkManager->GetLinks().empty()) + if (s_pDocLockedInsertingLinks || !m_pLinkManager || m_pLinkManager->GetLinks().empty()) return; s_pDocLockedInsertingLinks = this; // lock inserting links. only links in this document should by resolved @@ -820,7 +820,7 @@ void SdDrawDocument::UpdateAllLinks() rEmbeddedObjectContainer.setUserAllowsLinkUpdate(true); } - pLinkManager->UpdateAllLinks(true, false, nullptr); // query box: update all links? + m_pLinkManager->UpdateAllLinks(true, false, nullptr); // query box: update all links? if (s_pDocLockedInsertingLinks == this) s_pDocLockedInsertingLinks = nullptr; // unlock inserting links @@ -914,7 +914,7 @@ SdOutliner* SdDrawDocument::GetOutliner(bool bCreateOutliner) if (mpDocSh) mpOutliner->SetRefDevice( SD_MOD()->GetVirtualRefDevice() ); - mpOutliner->SetDefTab( nDefaultTabulator ); + mpOutliner->SetDefTab( m_nDefaultTabulator ); mpOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool())); } @@ -938,7 +938,7 @@ SdOutliner* SdDrawDocument::GetInternalOutliner(bool bCreateOutliner) if (mpDocSh) mpInternalOutliner->SetRefDevice( SD_MOD()->GetVirtualRefDevice() ); - mpInternalOutliner->SetDefTab( nDefaultTabulator ); + mpInternalOutliner->SetDefTab( m_nDefaultTabulator ); mpInternalOutliner->SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool())); } diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index cc27e8553d8e..5d4335a5c53d 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -839,7 +839,7 @@ bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage) // Return number of links in sfx2::LinkManager sal_uLong SdDrawDocument::GetLinkCount() const { - return pLinkManager->GetLinks().size(); + return m_pLinkManager->GetLinks().size(); } // Set Language @@ -866,8 +866,8 @@ void SdDrawDocument::SetLanguage( const LanguageType eLang, const sal_uInt16 nId if( bChanged ) { GetDrawOutliner().SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); - pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); - pItemPool->SetPoolDefaultItem( SvxLanguageItem( eLang, nId ) ); + m_pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); + m_pItemPool->SetPoolDefaultItem( SvxLanguageItem( eLang, nId ) ); SetChanged( bChanged ); } } diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 626a7dfd79d0..99647b42aab0 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -427,9 +427,9 @@ bool SdDrawDocument::InsertBookmarkAsPage( // this will make copied masters to differ from the originals, // and thus InsertBookmarkAsPage_FindDuplicateLayouts will // duplicate masters on insert to same document - bTransportContainer = (SD_MOD()->pTransferClip && + m_bTransportContainer = (SD_MOD()->pTransferClip && SD_MOD()->pTransferClip->GetWorkDocument() == this); - if (!bTransportContainer) + if (!m_bTransportContainer) { if (rBookmarkList.empty()) bScaleObjects = pRefPage->IsScaleObjects(); diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index be447edcef72..a8dd775a8cdd 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -1236,7 +1236,7 @@ void SdDrawDocument::SetTextDefaults() const aBulletItem.SetStart(1); aBulletItem.SetScale(45); // In percent aBulletItem.SetSymbol( 0x25CF ); // In points - pItemPool->SetPoolDefaultItem( aBulletItem ); + m_pItemPool->SetPoolDefaultItem( aBulletItem ); // New BulletItem SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL); @@ -1262,12 +1262,12 @@ void SdDrawDocument::SetTextDefaults() const } SvxNumBulletItem aNumBulletItem( aNumRule, EE_PARA_NUMBULLET ); - pItemPool->SetPoolDefaultItem( aNumBulletItem ); + m_pItemPool->SetPoolDefaultItem( aNumBulletItem ); } css::text::WritingMode SdDrawDocument::GetDefaultWritingMode() const { - const SfxPoolItem* pItem = ( pItemPool ? pItemPool->GetPoolDefaultItem( EE_PARA_WRITINGDIR ) : nullptr ); + const SfxPoolItem* pItem = ( m_pItemPool ? m_pItemPool->GetPoolDefaultItem( EE_PARA_WRITINGDIR ) : nullptr ); css::text::WritingMode eRet = css::text::WritingMode_LR_TB; if( pItem ) @@ -1289,7 +1289,7 @@ css::text::WritingMode SdDrawDocument::GetDefaultWritingMode() const void SdDrawDocument::SetDefaultWritingMode(css::text::WritingMode eMode ) { - if( !pItemPool ) + if( !m_pItemPool ) return; SvxFrameDirection nVal; @@ -1304,14 +1304,14 @@ void SdDrawDocument::SetDefaultWritingMode(css::text::WritingMode eMode ) } SvxFrameDirectionItem aModeItem( nVal, EE_PARA_WRITINGDIR ); - pItemPool->SetPoolDefaultItem( aModeItem ); + m_pItemPool->SetPoolDefaultItem( aModeItem ); SvxAdjustItem aAdjust( SvxAdjust::Left, EE_PARA_JUST ); if( eMode == css::text::WritingMode_RL_TB ) aAdjust.SetAdjust( SvxAdjust::Right ); - pItemPool->SetPoolDefaultItem( aAdjust ); + m_pItemPool->SetPoolDefaultItem( aAdjust ); } void SdDrawDocument::getDefaultFonts( vcl::Font& rLatinFont, vcl::Font& rCJKFont, vcl::Font& rCTLFont ) diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index e49833f13c5c..e78fffc0b34f 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -109,37 +109,37 @@ void SdrModel::ImpCtor( mpImpl->mpUndoFactory=nullptr; mpImpl->mbAnchoredTextOverflowLegacy = false; mbInDestruction = false; - aObjUnit=SdrEngineDefaults::GetMapFraction(); - eObjUnit=SdrEngineDefaults::GetMapUnit(); - eUIUnit=FieldUnit::MM; - aUIScale=Fraction(1,1); - nUIUnitDecimalMark=0; - pLayerAdmin=nullptr; - pItemPool=pPool; - bMyPool=false; + m_aObjUnit=SdrEngineDefaults::GetMapFraction(); + m_eObjUnit=SdrEngineDefaults::GetMapUnit(); + m_eUIUnit=FieldUnit::MM; + m_aUIScale=Fraction(1,1); + m_nUIUnitDecimalMark=0; + m_pLayerAdmin=nullptr; + m_pItemPool=pPool; + m_bMyPool=false; m_pEmbeddedHelper=_pEmbeddedHelper; - pDrawOutliner=nullptr; - pHitTestOutliner=nullptr; - pRefOutDev=nullptr; - pDefaultStyleSheet=nullptr; + m_pDrawOutliner=nullptr; + m_pHitTestOutliner=nullptr; + m_pRefOutDev=nullptr; + m_pDefaultStyleSheet=nullptr; mpDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj = nullptr; - pLinkManager=nullptr; - pUndoStack=nullptr; - pRedoStack=nullptr; - nMaxUndoCount=16; - pCurrentUndoGroup=nullptr; - nUndoLevel=0; + m_pLinkManager=nullptr; + m_pUndoStack=nullptr; + m_pRedoStack=nullptr; + m_nMaxUndoCount=16; + m_pCurrentUndoGroup=nullptr; + m_nUndoLevel=0; mbUndoEnabled=true; mbChanged = false; - bPagNumsDirty=false; - bMPgNumsDirty=false; - bTransportContainer = false; - bSwapGraphics=false; - bPasteResize=false; - bReadOnly=false; - nDefaultTabulator=0; - bTransparentTextFrames=false; - bStarDrawPreviewMode = false; + m_bPagNumsDirty=false; + m_bMPgNumsDirty=false; + m_bTransportContainer = false; + m_bSwapGraphics=false; + m_bPasteResize=false; + m_bReadOnly=false; + m_nDefaultTabulator=0; + m_bTransparentTextFrames=false; + m_bStarDrawPreviewMode = false; mpForbiddenCharactersTable = nullptr; mbModelLocked = false; mpOutlinerCache = nullptr; @@ -157,45 +157,45 @@ void SdrModel::ImpCtor( if ( pPool == nullptr ) { - pItemPool=new SdrItemPool(nullptr); + m_pItemPool=new SdrItemPool(nullptr); // Outliner doesn't have its own Pool, so use the EditEngine's SfxItemPool* pOutlPool=EditEngine::CreatePool(); // OutlinerPool as SecondaryPool of SdrPool - pItemPool->SetSecondaryPool(pOutlPool); + m_pItemPool->SetSecondaryPool(pOutlPool); // remember that I created both pools myself - bMyPool=true; + m_bMyPool=true; } - pItemPool->SetDefaultMetric(eObjUnit); + m_pItemPool->SetDefaultMetric(m_eObjUnit); // using static SdrEngineDefaults only if default SvxFontHeight item is not available - const SfxPoolItem* pPoolItem = pItemPool->GetPoolDefaultItem( EE_CHAR_FONTHEIGHT ); + const SfxPoolItem* pPoolItem = m_pItemPool->GetPoolDefaultItem( EE_CHAR_FONTHEIGHT ); if ( pPoolItem ) mnDefTextHgt = static_cast<const SvxFontHeightItem*>(pPoolItem)->GetHeight(); else mnDefTextHgt = SdrEngineDefaults::GetFontHeight(); - pItemPool->SetPoolDefaultItem( makeSdrTextWordWrapItem( false ) ); + m_pItemPool->SetPoolDefaultItem( makeSdrTextWordWrapItem( false ) ); SetTextDefaults(); - pLayerAdmin.reset(new SdrLayerAdmin); - pLayerAdmin->SetModel(this); + m_pLayerAdmin.reset(new SdrLayerAdmin); + m_pLayerAdmin->SetModel(this); ImpSetUIUnit(); // can't create DrawOutliner OnDemand, because I can't get the Pool, // then (only from 302 onwards!) - pDrawOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this); - ImpSetOutlinerDefaults(pDrawOutliner.get(), true); + m_pDrawOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this); + ImpSetOutlinerDefaults(m_pDrawOutliner.get(), true); - pHitTestOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this); - ImpSetOutlinerDefaults(pHitTestOutliner.get(), true); + m_pHitTestOutliner = SdrMakeOutliner(OutlinerMode::TextObject, *this); + ImpSetOutlinerDefaults(m_pHitTestOutliner.get(), true); /* Start Text Chaining related code */ // Initialize Chaining Outliner - pChainingOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *this ); - ImpSetOutlinerDefaults(pChainingOutliner.get(), true); + m_pChainingOutliner = SdrMakeOutliner( OutlinerMode::TextObject, *this ); + ImpSetOutlinerDefaults(m_pChainingOutliner.get(), true); // Make a TextChain - pTextChain.reset(new TextChain); + m_pTextChain.reset(new TextChain); /* End Text Chaining related code */ ImpCreateTables(bDisablePropertyFiles || utl::ConfigManager::IsFuzzing()); @@ -227,10 +227,10 @@ SdrModel::~SdrModel() ClearUndoBuffer(); #ifdef DBG_UTIL - SAL_WARN_IF(pCurrentUndoGroup, "svx", "In the Dtor of the SdrModel there is an open Undo left: \"" - << pCurrentUndoGroup->GetComment() << '\"'); + SAL_WARN_IF(m_pCurrentUndoGroup, "svx", "In the Dtor of the SdrModel there is an open Undo left: \"" + << m_pCurrentUndoGroup->GetComment() << '\"'); #endif - pCurrentUndoGroup.reset(); + m_pCurrentUndoGroup.reset(); ClearModel(true); @@ -249,14 +249,14 @@ SdrModel::~SdrModel() } #endif - pLayerAdmin.reset(); + m_pLayerAdmin.reset(); - pTextChain.reset(); + m_pTextChain.reset(); // Delete DrawOutliner only after deleting ItemPool, because ItemPool // references Items of the DrawOutliner! - pChainingOutliner.reset(); - pHitTestOutliner.reset(); - pDrawOutliner.reset(); + m_pChainingOutliner.reset(); + m_pHitTestOutliner.reset(); + m_pDrawOutliner.reset(); // delete StyleSheetPool, derived classes should not do this since // the DrawingEngine may need it in its destructor @@ -273,11 +273,11 @@ SdrModel::~SdrModel() mxStyleSheetPool.clear(); } - if (bMyPool) + if (m_bMyPool) { // delete Pools if they're mine - SfxItemPool* pOutlPool=pItemPool->GetSecondaryPool(); - SfxItemPool::Free(pItemPool); + SfxItemPool* pOutlPool=m_pItemPool->GetSecondaryPool(); + SfxItemPool::Free(m_pItemPool); // OutlinerPool has to be deleted after deleting ItemPool, because // ItemPool contains SetItems that themselves reference Items from OutlinerPool. SfxItemPool::Free(pOutlPool); @@ -290,45 +290,45 @@ SdrModel::~SdrModel() void SdrModel::SetSwapGraphics() { - bSwapGraphics = true; + m_bSwapGraphics = true; } bool SdrModel::IsReadOnly() const { - return bReadOnly; + return m_bReadOnly; } void SdrModel::SetReadOnly(bool bYes) { - bReadOnly=bYes; + m_bReadOnly=bYes; } void SdrModel::SetMaxUndoActionCount(sal_uInt32 nCount) { if (nCount<1) nCount=1; - nMaxUndoCount=nCount; - if (pUndoStack) { - while (pUndoStack->size()>nMaxUndoCount) { - pUndoStack->pop_back(); + m_nMaxUndoCount=nCount; + if (m_pUndoStack) { + while (m_pUndoStack->size()>m_nMaxUndoCount) { + m_pUndoStack->pop_back(); } } } void SdrModel::ClearUndoBuffer() { - pUndoStack.reset(); - pRedoStack.reset(); + m_pUndoStack.reset(); + m_pRedoStack.reset(); } bool SdrModel::HasUndoActions() const { - return pUndoStack && !pUndoStack->empty(); + return m_pUndoStack && !m_pUndoStack->empty(); } bool SdrModel::HasRedoActions() const { - return pRedoStack && !pRedoStack->empty(); + return m_pRedoStack && !m_pRedoStack->empty(); } void SdrModel::Undo() @@ -341,15 +341,15 @@ void SdrModel::Undo() { if(HasUndoActions()) { - SfxUndoAction* pDo = pUndoStack->front().get(); + SfxUndoAction* pDo = m_pUndoStack->front().get(); const bool bWasUndoEnabled = mbUndoEnabled; mbUndoEnabled = false; pDo->Undo(); - if(!pRedoStack) - pRedoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>); - std::unique_ptr<SfxUndoAction> p = std::move(pUndoStack->front()); - pUndoStack->pop_front(); - pRedoStack->emplace_front(std::move(p)); + if(!m_pRedoStack) + m_pRedoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>); + std::unique_ptr<SfxUndoAction> p = std::move(m_pUndoStack->front()); + m_pUndoStack->pop_front(); + m_pRedoStack->emplace_front(std::move(p)); mbUndoEnabled = bWasUndoEnabled; } } @@ -365,15 +365,15 @@ void SdrModel::Redo() { if(HasRedoActions()) { - SfxUndoAction* pDo = pRedoStack->front().get(); + SfxUndoAction* pDo = m_pRedoStack->front().get(); const bool bWasUndoEnabled = mbUndoEnabled; mbUndoEnabled = false; pDo->Redo(); - if(!pUndoStack) - pUndoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>); - std::unique_ptr<SfxUndoAction> p = std::move(pRedoStack->front()); - pRedoStack->pop_front(); - pUndoStack->emplace_front(std::move(p)); + if(!m_pUndoStack) + m_pUndoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>); + std::unique_ptr<SfxUndoAction> p = std::move(m_pRedoStack->front()); + m_pRedoStack->pop_front(); + m_pUndoStack->emplace_front(std::move(p)); mbUndoEnabled = bWasUndoEnabled; } } @@ -389,7 +389,7 @@ void SdrModel::Repeat(SfxRepeatTarget& rView) { if(HasUndoActions()) { - SfxUndoAction* pDo = pUndoStack->front().get(); + SfxUndoAction* pDo = m_pUndoStack->front().get(); if(pDo->CanRepeat(rView)) { pDo->Repeat(rView); @@ -403,21 +403,21 @@ void SdrModel::ImpPostUndoAction(std::unique_ptr<SdrUndoAction> pUndo) DBG_ASSERT( mpImpl->mpUndoManager == nullptr, "svx::SdrModel::ImpPostUndoAction(), method not supported with application undo manager!" ); if( IsUndoEnabled() ) { - if (aUndoLink) + if (m_aUndoLink) { - aUndoLink(std::move(pUndo)); + m_aUndoLink(std::move(pUndo)); } else { - if (!pUndoStack) - pUndoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>); - pUndoStack->emplace_front(std::move(pUndo)); - while (pUndoStack->size()>nMaxUndoCount) + if (!m_pUndoStack) + m_pUndoStack.reset(new std::deque<std::unique_ptr<SfxUndoAction>>); + m_pUndoStack->emplace_front(std::move(pUndo)); + while (m_pUndoStack->size()>m_nMaxUndoCount) { - pUndoStack->pop_back(); + m_pUndoStack->pop_back(); } - if (pRedoStack!=nullptr) - pRedoStack->clear(); + if (m_pRedoStack!=nullptr) + m_pRedoStack->clear(); } } } @@ -430,18 +430,18 @@ void SdrModel::BegUndo() if (SfxViewShell* pViewShell = SfxViewShell::Current()) nViewShellId = pViewShell->GetViewShellId(); mpImpl->mpUndoManager->EnterListAction("","",0,nViewShellId); - nUndoLevel++; + m_nUndoLevel++; } else if( IsUndoEnabled() ) { - if(!pCurrentUndoGroup) + if(!m_pCurrentUndoGroup) { - pCurrentUndoGroup.reset(new SdrUndoGroup(*this)); - nUndoLevel=1; + m_pCurrentUndoGroup.reset(new SdrUndoGroup(*this)); + m_nUndoLevel=1; } else { - nUndoLevel++; + m_nUndoLevel++; } } } @@ -454,14 +454,14 @@ void SdrModel::BegUndo(const OUString& rComment) if (SfxViewShell* pViewShell = SfxViewShell::Current()) nViewShellId = pViewShell->GetViewShellId(); mpImpl->mpUndoManager->EnterListAction( rComment, "", 0, nViewShellId ); - nUndoLevel++; + m_nUndoLevel++; } else if( IsUndoEnabled() ) { BegUndo(); - if (nUndoLevel==1) + if (m_nUndoLevel==1) { - pCurrentUndoGroup->SetComment(rComment); + m_pCurrentUndoGroup->SetComment(rComment); } } } @@ -479,46 +479,46 @@ void SdrModel::BegUndo(const OUString& rComment, const OUString& rObjDescr, SdrR if (SfxViewShell* pViewShell = SfxViewShell::Current()) nViewShellId = pViewShell->GetViewShellId(); mpImpl->mpUndoManager->EnterListAction( aComment,"",0,nViewShellId ); - nUndoLevel++; + m_nUndoLevel++; } else if( IsUndoEnabled() ) { BegUndo(); - if (nUndoLevel==1) + if (m_nUndoLevel==1) { - pCurrentUndoGroup->SetComment(rComment); - pCurrentUndoGroup->SetObjDescription(rObjDescr); - pCurrentUndoGroup->SetRepeatFunction(eFunc); + m_pCurrentUndoGroup->SetComment(rComment); + m_pCurrentUndoGroup->SetObjDescription(rObjDescr); + m_pCurrentUndoGroup->SetRepeatFunction(eFunc); } } } void SdrModel::EndUndo() { - DBG_ASSERT(nUndoLevel!=0,"SdrModel::EndUndo(): UndoLevel is already 0!"); + DBG_ASSERT(m_nUndoLevel!=0,"SdrModel::EndUndo(): UndoLevel is already 0!"); if( mpImpl->mpUndoManager ) { - if( nUndoLevel ) + if( m_nUndoLevel ) { - nUndoLevel--; + m_nUndoLevel--; mpImpl->mpUndoManager->LeaveListAction(); } } else { - if(pCurrentUndoGroup!=nullptr && IsUndoEnabled()) + if(m_pCurrentUndoGroup!=nullptr && IsUndoEnabled()) { - nUndoLevel--; - if(nUndoLevel==0) + m_nUndoLevel--; + if(m_nUndoLevel==0) { - if(pCurrentUndoGroup->GetActionCount()!=0) + if(m_pCurrentUndoGroup->GetActionCount()!=0) { - ImpPostUndoAction(std::move(pCurrentUndoGroup)); + ImpPostUndoAction(std::move(m_pCurrentUndoGroup)); } else { // was empty - pCurrentUndoGroup.reset(); + m_pCurrentUndoGroup.reset(); } } } @@ -527,31 +527,31 @@ void SdrModel::EndUndo() void SdrModel::SetUndoComment(const OUString& rComment) { - DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is already 0!"); + DBG_ASSERT(m_nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is already 0!"); if( mpImpl->mpUndoManager ) { OSL_FAIL("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" ); } - else if( IsUndoEnabled() && nUndoLevel==1) + else if( IsUndoEnabled() && m_nUndoLevel==1) { - pCurrentUndoGroup->SetComment(rComment); + m_pCurrentUndoGroup->SetComment(rComment); } } void SdrModel::SetUndoComment(const OUString& rComment, const OUString& rObjDescr) { - DBG_ASSERT(nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is already 0!"); + DBG_ASSERT(m_nUndoLevel!=0,"SdrModel::SetUndoComment(): UndoLevel is already 0!"); if( mpImpl->mpUndoManager ) { OSL_FAIL("svx::SdrModel::SetUndoComment(), method not supported with application undo manager!" ); } else { - if (nUndoLevel==1) + if (m_nUndoLevel==1) { - pCurrentUndoGroup->SetComment(rComment); - pCurrentUndoGroup->SetObjDescription(rObjDescr); + m_pCurrentUndoGroup->SetComment(rComment); + m_pCurrentUndoGroup->SetObjDescription(rObjDescr); } } } @@ -564,9 +564,9 @@ void SdrModel::AddUndo(std::unique_ptr<SdrUndoAction> pUndo) } else if( IsUndoEnabled() ) { - if (pCurrentUndoGroup) + if (m_pCurrentUndoGroup) { - pCurrentUndoGroup->AddAction(std::move(pUndo)); + m_pCurrentUndoGroup->AddAction(std::move(pUndo)); } else { @@ -636,13 +636,13 @@ void SdrModel::ClearModel(bool bCalledFromDestructor) maMaPag.clear(); MasterPageListChanged(); - pLayerAdmin->ClearLayers(); + m_pLayerAdmin->ClearLayers(); } SdrModel* SdrModel::AllocModel() const { SdrModel* pModel=new SdrModel(); - pModel->SetScaleUnit(eObjUnit,aObjUnit); + pModel->SetScaleUnit(m_eObjUnit,m_aObjUnit); return pModel; } @@ -653,7 +653,7 @@ SdrPage* SdrModel::AllocPage(bool bMasterPage) void SdrModel::SetTextDefaults() const { - SetTextDefaults( pItemPool, mnDefTextHgt ); + SetTextDefaults( m_pItemPool, mnDefTextHgt ); } void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt ) @@ -706,20 +706,20 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_Int32 nDefTextHgt ) SdrOutliner& SdrModel::GetDrawOutliner(const SdrTextObj* pObj) const { - pDrawOutliner->SetTextObj(pObj); - return *pDrawOutliner; + m_pDrawOutliner->SetTextObj(pObj); + return *m_pDrawOutliner; } SdrOutliner& SdrModel::GetChainingOutliner(const SdrTextObj* pObj) const { - pChainingOutliner->SetTextObj(pObj); - return *pChainingOutliner; + m_pChainingOutliner->SetTextObj(pObj); + return *m_pChainingOutliner; } const SdrTextObj* SdrModel::GetFormattingTextObj() const { - if (pDrawOutliner!=nullptr) { - return pDrawOutliner->GetTextObj(); + if (m_pDrawOutliner!=nullptr) { + return m_pDrawOutliner->GetTextObj(); } return nullptr; } @@ -731,8 +731,8 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit ) { pOutliner->EraseVirtualDevice(); pOutliner->SetUpdateMode(false); - pOutliner->SetEditTextObjectPool(pItemPool); - pOutliner->SetDefTab(nDefaultTabulator); + pOutliner->SetEditTextObjectPool(m_pItemPool); + pOutliner->SetDefTab(m_nDefaultTabulator); } pOutliner->SetRefDevice(GetRefDevice()); @@ -743,16 +743,16 @@ void SdrModel::ImpSetOutlinerDefaults( SdrOutliner* pOutliner, bool bInit ) if ( !GetRefDevice() ) { - MapMode aMapMode(eObjUnit, Point(0,0), aObjUnit, aObjUnit); + MapMode aMapMode(m_eObjUnit, Point(0,0), m_aObjUnit, m_aObjUnit); pOutliner->SetRefMapMode(aMapMode); } } void SdrModel::SetRefDevice(OutputDevice* pDev) { - pRefOutDev=pDev; - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + m_pRefOutDev=pDev; + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); RefDeviceChanged(); } @@ -863,8 +863,8 @@ void SdrModel::SetDefaultFontHeight(sal_Int32 nVal) void SdrModel::SetDefaultTabulator(sal_uInt16 nVal) { - if (nDefaultTabulator!=nVal) { - nDefaultTabulator=nVal; + if (m_nDefaultTabulator!=nVal) { + m_nDefaultTabulator=nVal; Outliner& rOutliner=GetDrawOutliner(); rOutliner.SetDefTab(nVal); Broadcast(SdrHint(SdrHintKind::DefaultTabChange)); @@ -874,29 +874,29 @@ void SdrModel::SetDefaultTabulator(sal_uInt16 nVal) void SdrModel::ImpSetUIUnit() { - if(0 == aUIScale.GetNumerator() || 0 == aUIScale.GetDenominator()) + if(0 == m_aUIScale.GetNumerator() || 0 == m_aUIScale.GetDenominator()) { - aUIScale = Fraction(1,1); + m_aUIScale = Fraction(1,1); } // set start values - nUIUnitDecimalMark = 0; + m_nUIUnitDecimalMark = 0; sal_Int64 nMul(1); sal_Int64 nDiv(1); // normalize on meters resp. inch - switch (eObjUnit) - { - case MapUnit::Map100thMM : nUIUnitDecimalMark+=5; break; - case MapUnit::Map10thMM : nUIUnitDecimalMark+=4; break; - case MapUnit::MapMM : nUIUnitDecimalMark+=3; break; - case MapUnit::MapCM : nUIUnitDecimalMark+=2; break; - case MapUnit::Map1000thInch: nUIUnitDecimalMark+=3; break; - case MapUnit::Map100thInch : nUIUnitDecimalMark+=2; break; - case MapUnit::Map10thInch : nUIUnitDecimalMark+=1; break; - case MapUnit::MapInch : nUIUnitDecimalMark+=0; break; + switch (m_eObjUnit) + { + case MapUnit::Map100thMM : m_nUIUnitDecimalMark+=5; break; + case MapUnit::Map10thMM : m_nUIUnitDecimalMark+=4; break; + case MapUnit::MapMM : m_nUIUnitDecimalMark+=3; break; + case MapUnit::MapCM : m_nUIUnitDecimalMark+=2; break; + case MapUnit::Map1000thInch: m_nUIUnitDecimalMark+=3; break; + case MapUnit::Map100thInch : m_nUIUnitDecimalMark+=2; break; + case MapUnit::Map10thInch : m_nUIUnitDecimalMark+=1; break; + case MapUnit::MapInch : m_nUIUnitDecimalMark+=0; break; case MapUnit::MapPoint : nDiv=72; break; // 1Pt = 1/72" - case MapUnit::MapTwip : nDiv=144; nUIUnitDecimalMark++; break; // 1Twip = 1/1440" + case MapUnit::MapTwip : nDiv=144; m_nUIUnitDecimalMark++; break; // 1Twip = 1/1440" case MapUnit::MapPixel : break; case MapUnit::MapSysFont : break; case MapUnit::MapAppFont : break; @@ -910,25 +910,25 @@ void SdrModel::ImpSetUIUnit() // 1 pole = 5 1/2 yd = 198" = 5.029,2mm // 1 yd = 3 ft = 36" = 914,4mm // 1 ft = 12 " = 1" = 304,8mm - switch (eUIUnit) + switch (m_eUIUnit) { case FieldUnit::NONE : break; // metric - case FieldUnit::MM_100TH: nUIUnitDecimalMark-=5; break; - case FieldUnit::MM : nUIUnitDecimalMark-=3; break; - case FieldUnit::CM : nUIUnitDecimalMark-=2; break; - case FieldUnit::M : nUIUnitDecimalMark+=0; break; - case FieldUnit::KM : nUIUnitDecimalMark+=3; break; + case FieldUnit::MM_100TH: m_nUIUnitDecimalMark-=5; break; + case FieldUnit::MM : m_nUIUnitDecimalMark-=3; break; + case FieldUnit::CM : m_nUIUnitDecimalMark-=2; break; + case FieldUnit::M : m_nUIUnitDecimalMark+=0; break; + case FieldUnit::KM : m_nUIUnitDecimalMark+=3; break; // Inch - case FieldUnit::TWIP : nMul=144; nUIUnitDecimalMark--; break; // 1Twip = 1/1440" + case FieldUnit::TWIP : nMul=144; m_nUIUnitDecimalMark--; break; // 1Twip = 1/1440" case FieldUnit::POINT : nMul=72; break; // 1Pt = 1/72" case FieldUnit::PICA : nMul=6; break; // 1Pica = 1/6" case FieldUnit::INCH : break; // 1" = 1" case FieldUnit::FOOT : nDiv*=12; break; // 1Ft = 12" - case FieldUnit::MILE : nDiv*=6336; nUIUnitDecimalMark++; break; // 1mile = 63360" + case FieldUnit::MILE : nDiv*=6336; m_nUIUnitDecimalMark++; break; // 1mile = 63360" // other case FieldUnit::CUSTOM : break; - case FieldUnit::PERCENT: nUIUnitDecimalMark+=2; break; + case FieldUnit::PERCENT: m_nUIUnitDecimalMark+=2; break; // TODO: Add code to handle the following if needed (added to remove warning) case FieldUnit::CHAR : break; case FieldUnit::LINE : break; @@ -939,22 +939,22 @@ void SdrModel::ImpSetUIUnit() } // switch // check if mapping is from metric to inch and adapt - const bool bMapInch(IsInch(eObjUnit)); - const bool bUIMetr(IsMetric(eUIUnit)); + const bool bMapInch(IsInch(m_eObjUnit)); + const bool bUIMetr(IsMetric(m_eUIUnit)); if (bMapInch && bUIMetr) { - nUIUnitDecimalMark += 4; + m_nUIUnitDecimalMark += 4; nMul *= 254; } // check if mapping is from inch to metric and adapt - const bool bMapMetr(IsMetric(eObjUnit)); - const bool bUIInch(IsInch(eUIUnit)); + const bool bMapMetr(IsMetric(m_eObjUnit)); + const bool bUIInch(IsInch(m_eUIUnit)); if (bMapMetr && bUIInch) { - nUIUnitDecimalMark -= 4; + m_nUIUnitDecimalMark -= 4; nDiv *= 254; } @@ -968,72 +968,72 @@ void SdrModel::ImpSetUIUnit() } // #i89872# take Unit of Measurement into account - if(1 != aUIScale.GetDenominator() || 1 != aUIScale.GetNumerator()) + if(1 != m_aUIScale.GetDenominator() || 1 != m_aUIScale.GetNumerator()) { // divide by UIScale - nMul *= aUIScale.GetDenominator(); - nDiv *= aUIScale.GetNumerator(); + nMul *= m_aUIScale.GetDenominator(); + nDiv *= m_aUIScale.GetNumerator(); } // shorten trailing zeros for dividend while(0 == (nMul % 10)) { - nUIUnitDecimalMark--; + m_nUIUnitDecimalMark--; nMul /= 10; } // shorten trailing zeros for divisor while(0 == (nDiv % 10)) { - nUIUnitDecimalMark++; + m_nUIUnitDecimalMark++; nDiv /= 10; } // end preparations, set member values - aUIUnitFact = Fraction(sal_Int32(nMul), sal_Int32(nDiv)); - aUIUnitStr = GetUnitString(eUIUnit); + m_aUIUnitFact = Fraction(sal_Int32(nMul), sal_Int32(nDiv)); + m_aUIUnitStr = GetUnitString(m_eUIUnit); } void SdrModel::SetScaleUnit(MapUnit eMap, const Fraction& rFrac) { - if (eObjUnit!=eMap || aObjUnit!=rFrac) { - eObjUnit=eMap; - aObjUnit=rFrac; - pItemPool->SetDefaultMetric(eObjUnit); + if (m_eObjUnit!=eMap || m_aObjUnit!=rFrac) { + m_eObjUnit=eMap; + m_aObjUnit=rFrac; + m_pItemPool->SetDefaultMetric(m_eObjUnit); ImpSetUIUnit(); - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); ImpReformatAllTextObjects(); } } void SdrModel::SetScaleUnit(MapUnit eMap) { - if (eObjUnit!=eMap) { - eObjUnit=eMap; - pItemPool->SetDefaultMetric(eObjUnit); + if (m_eObjUnit!=eMap) { + m_eObjUnit=eMap; + m_pItemPool->SetDefaultMetric(m_eObjUnit); ImpSetUIUnit(); - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); ImpReformatAllTextObjects(); } } void SdrModel::SetScaleFraction(const Fraction& rFrac) { - if (aObjUnit!=rFrac) { - aObjUnit=rFrac; + if (m_aObjUnit!=rFrac) { + m_aObjUnit=rFrac; ImpSetUIUnit(); - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); ImpReformatAllTextObjects(); } } void SdrModel::SetUIUnit(FieldUnit eUnit) { - if (eUIUnit!=eUnit) { - eUIUnit=eUnit; + if (m_eUIUnit!=eUnit) { + m_eUIUnit=eUnit; ImpSetUIUnit(); ImpReformatAllTextObjects(); } @@ -1041,8 +1041,8 @@ void SdrModel::SetUIUnit(FieldUnit eUnit) void SdrModel::SetUIScale(const Fraction& rScale) { - if (aUIScale!=rScale) { - aUIScale=rScale; + if (m_aUIScale!=rScale) { + m_aUIScale=rScale; ImpSetUIUnit(); ImpReformatAllTextObjects(); } @@ -1050,9 +1050,9 @@ void SdrModel::SetUIScale(const Fraction& rScale) void SdrModel::SetUIUnit(FieldUnit eUnit, const Fraction& rScale) { - if (eUIUnit!=eUnit || aUIScale!=rScale) { - eUIUnit=eUnit; - aUIScale=rScale; + if (m_eUIUnit!=eUnit || m_aUIScale!=rScale) { + m_eUIUnit=eUnit; + m_aUIScale=rScale; ImpSetUIUnit(); ImpReformatAllTextObjects(); } @@ -1100,7 +1100,7 @@ OUString SdrModel::GetMetricString(long nVal, bool bNoUnitChars, sal_Int32 nNumD const bool bNegative(nVal < 0); SvtSysLocale aSysLoc; const LocaleDataWrapper& rLoc(aSysLoc.GetLocaleData()); - double fLocalValue(double(nVal) * double(aUIUnitFact)); + double fLocalValue(double(nVal) * double(m_aUIUnitFact)); if(bNegative) { @@ -1112,7 +1112,7 @@ OUString SdrModel::GetMetricString(long nVal, bool bNoUnitChars, sal_Int32 nNumD nNumDigits = LocaleDataWrapper::getNumDigits(); } - sal_Int32 nDecimalMark(nUIUnitDecimalMark); + sal_Int32 nDecimalMark(m_nUIUnitDecimalMark); if(nDecimalMark > nNumDigits) { @@ -1210,7 +1210,7 @@ OUString SdrModel::GetMetricString(long nVal, bool bNoUnitChars, sal_Int32 nNumD } if(!bNoUnitChars) - aBuf.append(aUIUnitStr); + aBuf.append(m_aUIUnitStr); return aBuf.makeStringAndClear(); } @@ -1286,7 +1286,7 @@ void SdrModel::RecalcPageNums(bool bMaster) SdrPage* pPg=maMaPag[i]; pPg->SetPageNum(i); } - bMPgNumsDirty=false; + m_bMPgNumsDirty=false; } else { @@ -1296,7 +1296,7 @@ void SdrModel::RecalcPageNums(bool bMaster) SdrPage* pPg=maPages[i]; pPg->SetPageNum(i); } - bPagNumsDirty=false; + m_bPagNumsDirty=false; } } @@ -1312,7 +1312,7 @@ void SdrModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos) if (mbMakePageObjectsNamesUnique) pPage->MakePageObjectsNamesUnique(); - if (nPos<nCount) bPagNumsDirty=true; + if (nPos<nCount) m_bPagNumsDirty=true; SetChanged(); SdrHint aHint(SdrHintKind::PageOrderChange, pPage); Broadcast(aHint); @@ -1332,7 +1332,7 @@ SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum) if (pPg!=nullptr) { pPg->SetInserted(false); } - bPagNumsDirty=true; + m_bPagNumsDirty=true; SetChanged(); SdrHint aHint(SdrHintKind::PageOrderChange, pPg); Broadcast(aHint); @@ -1362,7 +1362,7 @@ void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos) pPage->SetPageNum(nPos); if (nPos<nCount) { - bMPgNumsDirty=true; + m_bMPgNumsDirty=true; } SetChanged(); @@ -1395,7 +1395,7 @@ SdrPage* SdrModel::RemoveMasterPage(sal_uInt16 nPgNum) pRetPg->SetInserted(false); } - bMPgNumsDirty=true; + m_bMPgNumsDirty=true; SetChanged(); SdrHint aHint(SdrHintKind::PageOrderChange, pRetPg); Broadcast(aHint); @@ -1412,7 +1412,7 @@ void SdrModel::MoveMasterPage(sal_uInt16 nPgNum, sal_uInt16 nNewPos) maMaPag.insert(maMaPag.begin()+nNewPos,pPg); MasterPageListChanged(); } - bMPgNumsDirty=true; + m_bMPgNumsDirty=true; SetChanged(); SdrHint aHint(SdrHintKind::PageOrderChange, pPg); Broadcast(aHint); @@ -1588,7 +1588,7 @@ void SdrModel::Merge(SdrModel& rSourceModel, maMaPag.insert(maMaPag.begin()+nDstMasterPageCnt, pPg); MasterPageListChanged(); pPg->SetInserted(); - bMPgNumsDirty=true; + m_bMPgNumsDirty=true; if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoNewPage(*pPg)); } else { OSL_FAIL("SdrModel::Merge(): MasterPage not found in SourceModel."); @@ -1671,8 +1671,8 @@ void SdrModel::Merge(SdrModel& rSourceModel, pMasterMap.reset(); pMasterNeed.reset(); - bMPgNumsDirty=true; - bPagNumsDirty=true; + m_bMPgNumsDirty=true; + m_bPagNumsDirty=true; SetChanged(); // TODO: Missing: merging and mapping of layers @@ -1682,14 +1682,14 @@ void SdrModel::Merge(SdrModel& rSourceModel, void SdrModel::SetStarDrawPreviewMode(bool bPreview) { - if (!bPreview && bStarDrawPreviewMode && GetPageCount()) + if (!bPreview && m_bStarDrawPreviewMode && GetPageCount()) { // Resetting is not allowed, because the Model might not be loaded completely SAL_WARN("svx", "SdrModel::SetStarDrawPreviewMode(): Resetting not allowed, because Model might not be complete."); } else { - bStarDrawPreviewMode = bPreview; + m_bStarDrawPreviewMode = bPreview; } } @@ -1800,8 +1800,8 @@ void SdrModel::SetForbiddenCharsTable(const std::shared_ptr<SvxForbiddenCharacte { mpForbiddenCharactersTable = xForbiddenChars; - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); } @@ -1810,8 +1810,8 @@ void SdrModel::SetCharCompressType( CharCompressType nType ) if( nType != mnCharCompressType ) { mnCharCompressType = nType; - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); } } @@ -1820,8 +1820,8 @@ void SdrModel::SetKernAsianPunctuation( bool bEnabled ) if( mbKernAsianPunctuation != bEnabled ) { mbKernAsianPunctuation = bEnabled; - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); } } @@ -1830,8 +1830,8 @@ void SdrModel::SetAddExtLeading( bool bEnabled ) if( mbAddExtLeading != bEnabled ) { mbAddExtLeading = bEnabled; - ImpSetOutlinerDefaults( pDrawOutliner.get() ); - ImpSetOutlinerDefaults( pHitTestOutliner.get() ); + ImpSetOutlinerDefaults( m_pDrawOutliner.get() ); + ImpSetOutlinerDefaults( m_pHitTestOutliner.get() ); } } @@ -1861,8 +1861,8 @@ std::unique_ptr<SdrOutliner> SdrModel::createOutliner( OutlinerMode nOutlinerMod std::vector<SdrOutliner*> SdrModel::GetActiveOutliners() const { std::vector< SdrOutliner* > aRet(mpOutlinerCache ? mpOutlinerCache->GetActiveOutliners() : std::vector< SdrOutliner* >()); - aRet.push_back(pDrawOutliner.get()); - aRet.push_back(pHitTestOutliner.get()); + aRet.push_back(m_pDrawOutliner.get()); + aRet.push_back(m_pHitTestOutliner.get()); return aRet; } @@ -1937,7 +1937,7 @@ void SdrModel::PageListChanged() TextChain *SdrModel::GetTextChain() const { - return pTextChain.get(); + return m_pTextChain.get(); } const SdrPage* SdrModel::GetMasterPage(sal_uInt16 nPgNum) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits