diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2023-12-29 21:55:54 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2024-01-01 09:21:06 +0100 |
commit | 252c0316c3be09079e08afc9fa512ca5a60ea957 (patch) | |
tree | 4a1115e2af8e842e4a47f967fcfe2b46157e0d48 /editeng | |
parent | ee2164d484541e0b45a40aad619d0db31afde634 (diff) |
editeng: prefix members of EditDoc
Change-Id: I403db061b6e3e184e97c5ec3ce5746d2fdff0749
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161478
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editdoc.hxx | 60 | ||||
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 38 |
2 files changed, 59 insertions, 39 deletions
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx index 738c0b2d5772..7fc29556957c 100644 --- a/editeng/inc/editdoc.hxx +++ b/editeng/inc/editdoc.hxx @@ -104,20 +104,20 @@ public: class EditDoc { private: - mutable sal_Int32 nLastCache; - std::vector<std::unique_ptr<ContentNode> > maContents; + mutable sal_Int32 mnLastCache; + std::vector<std::unique_ptr<ContentNode>> maContents; - rtl::Reference<SfxItemPool> pItemPool; - Link<LinkParamNone*,void> aModifyHdl; + rtl::Reference<SfxItemPool> mpItemPool; + Link<LinkParamNone*,void> maModifyHdl; SvxFont maDefFont; //faster than ever from the pool!! - sal_uInt16 nDefTab; - bool bIsVertical:1; + sal_uInt16 mnDefTab; + bool mbIsVertical:1; TextRotation mnRotation; - bool bIsFixedCellHeight:1; + bool mbIsFixedCellHeight:1; - bool bModified:1; - bool bDisableAttributeExpanding:1; + bool mbModified:1; + bool mbDisableAttributeExpanding:1; public: EditDoc( SfxItemPool* pItemPool ); @@ -126,28 +126,44 @@ public: void dumpAsXml(xmlTextWriterPtr pWriter) const; void ClearSpellErrors(); - bool IsModified() const { return bModified; } + bool IsModified() const { return mbModified; } void SetModified( bool b ); - void DisableAttributeExpanding() { bDisableAttributeExpanding = true; } + void DisableAttributeExpanding() { mbDisableAttributeExpanding = true; } - void SetModifyHdl( const Link<LinkParamNone*,void>& rLink ) { aModifyHdl = rLink; } + void SetModifyHdl(const Link<LinkParamNone*,void>& rLink) + { + maModifyHdl = rLink; + } void CreateDefFont( bool bUseStyles ); const SvxFont& GetDefFont() const { return maDefFont; } - void SetDefTab( sal_uInt16 nTab ) { nDefTab = nTab ? nTab : DEFTAB; } - sal_uInt16 GetDefTab() const { return nDefTab; } + void SetDefTab(sal_uInt16 nTab) + { + mnDefTab = nTab ? nTab : DEFTAB; + } - void SetVertical( bool bVertical ) { bIsVertical = bVertical; } + sal_uInt16 GetDefTab() const + { + return mnDefTab; + } + + void SetVertical( bool bVertical ) { mbIsVertical = bVertical; } bool IsEffectivelyVertical() const; bool IsTopToBottom() const; bool GetVertical() const; void SetRotation( TextRotation nRotation ) { mnRotation = nRotation; } TextRotation GetRotation() const { return mnRotation; } - void SetFixedCellHeight( bool bUseFixedCellHeight ) { bIsFixedCellHeight = bUseFixedCellHeight; } - bool IsFixedCellHeight() const { return bIsFixedCellHeight; } + void SetFixedCellHeight( bool bUseFixedCellHeight ) + { + mbIsFixedCellHeight = bUseFixedCellHeight; + } + bool IsFixedCellHeight() const + { + return mbIsFixedCellHeight; + } EditPaM Clear(); EditPaM RemoveText(); @@ -166,8 +182,14 @@ public: EditPaM GetStartPaM() const; EditPaM GetEndPaM() const; - SfxItemPool& GetItemPool() { return *pItemPool; } - const SfxItemPool& GetItemPool() const { return *pItemPool; } + SfxItemPool& GetItemPool() + { + return *mpItemPool; + } + const SfxItemPool& GetItemPool() const + { + return *mpItemPool; + } void InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd ); void InsertAttrib( ContentNode* pNode, sal_Int32 nStart, sal_Int32 nEnd, const SfxPoolItem& rPoolItem ); diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index fdfd74edb09a..0afcc9cdd81c 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -790,14 +790,14 @@ void EditSelection::Adjust( const EditDoc& rNodes ) } EditDoc::EditDoc( SfxItemPool* pPool ) : - nLastCache(0), - pItemPool(pPool ? pPool : new EditEngineItemPool()), - nDefTab(DEFTAB), - bIsVertical(false), + mnLastCache(0), + mpItemPool(pPool ? pPool : new EditEngineItemPool()), + mnDefTab(DEFTAB), + mbIsVertical(false), mnRotation(TextRotation::NONE), - bIsFixedCellHeight(false), - bModified(false), - bDisableAttributeExpanding(false) + mbIsFixedCellHeight(false), + mbModified(false), + mbDisableAttributeExpanding(false) { // Don't create an empty node, Clear() will be called in EditEngine-CTOR }; @@ -903,24 +903,24 @@ void EditDoc::CreateDefFont( bool bUseStyles ) bool EditDoc::IsEffectivelyVertical() const { - return (bIsVertical && mnRotation == TextRotation::NONE) || - (!bIsVertical && mnRotation != TextRotation::NONE); + return (mbIsVertical && mnRotation == TextRotation::NONE) || + (!mbIsVertical && mnRotation != TextRotation::NONE); } bool EditDoc::IsTopToBottom() const { - return (bIsVertical && mnRotation == TextRotation::NONE) || - (!bIsVertical && mnRotation == TextRotation::TOPTOBOTTOM); + return (mbIsVertical && mnRotation == TextRotation::NONE) || + (!mbIsVertical && mnRotation == TextRotation::TOPTOBOTTOM); } bool EditDoc::GetVertical() const { - return bIsVertical; + return mbIsVertical; } -sal_Int32 EditDoc::GetPos(const ContentNode* p) const +sal_Int32 EditDoc::GetPos(const ContentNode* pContentNode) const { - return FastGetPos(maContents, p, nLastCache); + return FastGetPos(maContents, pContentNode, mnLastCache); } const ContentNode* EditDoc::GetObject(sal_Int32 nPos) const @@ -1085,11 +1085,9 @@ void EditDoc::ClearSpellErrors() void EditDoc::SetModified( bool b ) { - bModified = b; - if ( bModified ) - { - aModifyHdl.Call( nullptr ); - } + mbModified = b; + if (mbModified) + maModifyHdl.Call(nullptr); } EditPaM EditDoc::RemoveText() @@ -1235,7 +1233,7 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, sal_Int32 nStart, sal // tdf#132288 By default inserting an attribute beside another that is of // the same type expands the original instead of inserting another. But the // spell check dialog doesn't want that behaviour - if (bDisableAttributeExpanding) + if (mbDisableAttributeExpanding) { pStartingAttrib = nullptr; pEndingAttrib = nullptr; |