summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-12-24 16:37:58 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-12-29 12:38:11 +0100
commit5c198a8d1345a5f658a46085de9cdd76d49a959e (patch)
treed736db7822614c61373e4cf774aaabd6a1f7b69c /editeng
parent62aee46df1f8e4b863e2927e0b9d3b6bcd270008 (diff)
editeng: simplify and remove unneded const. of ContentNode & co
ContentNode, CharAttribList, ContentAttribs constructors and destructors can be simplified and in some cases removed (if they are empty). Change-Id: Id5b1d4c1934a9b0b6e0ed8a7fe2af0d41ce4b4fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161356 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/inc/ContentNode.hxx9
-rw-r--r--editeng/source/editeng/ContentNode.cxx17
2 files changed, 4 insertions, 22 deletions
diff --git a/editeng/inc/ContentNode.hxx b/editeng/inc/ContentNode.hxx
index d89612ddeac8..391953d7f4ae 100644
--- a/editeng/inc/ContentNode.hxx
+++ b/editeng/inc/ContentNode.hxx
@@ -37,7 +37,7 @@ class SvxTabStop;
class ContentAttribs
{
private:
- SfxStyleSheet* mpStyle;
+ SfxStyleSheet* mpStyle = nullptr;
SfxItemSetFixed<EE_PARA_START, EE_CHAR_END> maAttribSet;
public:
@@ -68,12 +68,9 @@ public:
private:
AttribsType maAttribs;
SvxFont maDefFont; // faster than ever from the pool!
- bool mbHasEmptyAttribs;
+ bool mbHasEmptyAttribs = false;
public:
- CharAttribList();
- ~CharAttribList();
-
void dumpAsXml(xmlTextWriterPtr pWriter) const;
void DeleteEmptyAttribs();
@@ -122,7 +119,7 @@ private:
public:
ContentNode(SfxItemPool& rItemPool);
ContentNode(const OUString& rStr, const ContentAttribs& rContentAttribs);
- ~ContentNode();
+
ContentNode(const ContentNode&) = delete;
ContentNode& operator=(const ContentNode&) = delete;
diff --git a/editeng/source/editeng/ContentNode.cxx b/editeng/source/editeng/ContentNode.cxx
index 16d6a1ed808b..0cc3a72da65c 100644
--- a/editeng/source/editeng/ContentNode.cxx
+++ b/editeng/source/editeng/ContentNode.cxx
@@ -40,10 +40,6 @@ ContentNode::ContentNode( const OUString& rStr, const ContentAttribs& rContentAt
{
}
-ContentNode::~ContentNode()
-{
-}
-
void ContentNode::ExpandAttribs( sal_Int32 nIndex, sal_Int32 nNew )
{
if ( !nNew )
@@ -653,12 +649,10 @@ void ContentNode::checkAndDeleteEmptyAttribs() const
}
ContentAttribs::ContentAttribs( SfxItemPool& rPool )
-: mpStyle(nullptr)
-, maAttribSet( rPool )
+ : maAttribSet(rPool)
{
}
-
SvxTabStop ContentAttribs::FindTabStop( sal_Int32 nCurPos, sal_uInt16 nDefTab )
{
const SvxTabStopItem& rTabs = GetItem( EE_PARA_TABS );
@@ -741,15 +735,6 @@ struct LessByStart
}
-CharAttribList::CharAttribList()
-: mbHasEmptyAttribs(false)
-{
-}
-
-CharAttribList::~CharAttribList()
-{
-}
-
void CharAttribList::InsertAttrib( EditCharAttrib* pAttrib )
{
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!