include/svx/autoformathelper.hxx | 4 --- svx/source/items/autoformathelper.cxx | 38 ---------------------------------- sw/inc/tblafmt.hxx | 1 sw/source/core/doc/tblafmt.cxx | 32 ++++++++++++++++++++++------ 4 files changed, 25 insertions(+), 50 deletions(-)
New commits: commit f799194720f3105a075d58f2f0fa4bb964c48227 Author: Caolán McNamara <[email protected]> AuthorDate: Thu Mar 5 23:20:00 2026 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Mar 6 09:29:35 2026 +0100 remove AutoFormatBase::operator= fold its body into SwBoxAutoFormat::operator= Change-Id: Id30de41c3ffca82bb93b0fab1d87706b10e5733c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201078 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/include/svx/autoformathelper.hxx b/include/svx/autoformathelper.hxx index 7b8462fcfd71..e2f384093923 100644 --- a/include/svx/autoformathelper.hxx +++ b/include/svx/autoformathelper.hxx @@ -84,10 +84,6 @@ protected: std::unique_ptr<SvxHorJustifyItem> m_aHorJustify; std::unique_ptr<SvxVerJustifyItem> m_aVerJustify; - // assignment-op is protected due to this being a tooling - // class, so callers need to be aware of what they do - AutoFormatBase& operator=(const AutoFormatBase&); - AutoFormatBase(); AutoFormatBase( const AutoFormatBase& rNew ); ~AutoFormatBase(); diff --git a/svx/source/items/autoformathelper.cxx b/svx/source/items/autoformathelper.cxx index 0f03e6b83262..071e1a87ee0e 100644 --- a/svx/source/items/autoformathelper.cxx +++ b/svx/source/items/autoformathelper.cxx @@ -105,42 +105,4 @@ AutoFormatBase::~AutoFormatBase() { } -AutoFormatBase& AutoFormatBase::operator=(const AutoFormatBase& rRef) -{ - // check self-assignment - if(this == &rRef) - { - return *this; - } - - // copy local members - this will use ::Clone() on all involved Items - SetFont(rRef.GetFont()); - SetHeight(rRef.GetHeight()); - SetWeight(rRef.GetWeight()); - SetPosture(rRef.GetPosture()); - SetCJKFont(rRef.GetCJKFont()); - SetCJKHeight(rRef.GetCJKHeight()); - SetCJKWeight(rRef.GetCJKWeight()); - SetCJKPosture(rRef.GetCJKPosture()); - SetCTLFont(rRef.GetCTLFont()); - SetCTLHeight(rRef.GetCTLHeight()); - SetCTLWeight(rRef.GetCTLWeight()); - SetCTLPosture(rRef.GetCTLPosture()); - SetUnderline(rRef.GetUnderline()); - SetOverline(rRef.GetOverline()); - SetCrossedOut(rRef.GetCrossedOut()); - SetContour(rRef.GetContour()); - SetShadowed(rRef.GetShadowed()); - SetColor(rRef.GetColor()); - SetBox(rRef.GetBox()); - SetTLBR(rRef.GetTLBR()); - SetBLTR(rRef.GetBLTR()); - SetBackground(rRef.GetBackground()); - SetAdjust(rRef.GetAdjust()); - SetHorJustify(rRef.GetHorJustify()); - SetVerJustify(rRef.GetVerJustify()); - - return *this; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index a4540b1f1ba2..fafea70d17a2 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -54,7 +54,6 @@ public: SwBoxAutoFormat(const SvxAutoFormatDataField& rNew); ~SwBoxAutoFormat(); - /// assignment-op (still used) SwBoxAutoFormat& operator=(const SwBoxAutoFormat& rRef); /// Comparing based of boxes backgrounds. diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index 89ba4fc49f02..fbeef32d0b30 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -178,16 +178,34 @@ SwBoxAutoFormat::~SwBoxAutoFormat() {} SwBoxAutoFormat& SwBoxAutoFormat::operator=(const SwBoxAutoFormat& rRef) { - // check self-assignment if (this == &rRef) - { return *this; - } - - // call baseclass implementation - AutoFormatBase::operator=(rRef); - // copy local members - this will use ::Clone() on all involved Items + SetFont(rRef.GetFont()); + SetHeight(rRef.GetHeight()); + SetWeight(rRef.GetWeight()); + SetPosture(rRef.GetPosture()); + SetCJKFont(rRef.GetCJKFont()); + SetCJKHeight(rRef.GetCJKHeight()); + SetCJKWeight(rRef.GetCJKWeight()); + SetCJKPosture(rRef.GetCJKPosture()); + SetCTLFont(rRef.GetCTLFont()); + SetCTLHeight(rRef.GetCTLHeight()); + SetCTLWeight(rRef.GetCTLWeight()); + SetCTLPosture(rRef.GetCTLPosture()); + SetUnderline(rRef.GetUnderline()); + SetOverline(rRef.GetOverline()); + SetCrossedOut(rRef.GetCrossedOut()); + SetContour(rRef.GetContour()); + SetShadowed(rRef.GetShadowed()); + SetColor(rRef.GetColor()); + SetBox(rRef.GetBox()); + SetTLBR(rRef.GetTLBR()); + SetBLTR(rRef.GetBLTR()); + SetBackground(rRef.GetBackground()); + SetAdjust(rRef.GetAdjust()); + SetHorJustify(rRef.GetHorJustify()); + SetVerJustify(rRef.GetVerJustify()); SetTextOrientation(rRef.GetTextOrientation()); SetVerticalAlignment(rRef.GetVerticalAlignment()); SetNumFormatString(rRef.GetNumFormatString());
