summaryrefslogtreecommitdiff
path: root/include/svx/autoformathelper.hxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@me.com>2019-05-16 11:33:38 +0200
committerArmin Le Grand <Armin.Le.Grand@me.com>2019-05-18 01:29:25 +0200
commit10d8682e4cf77361e0ebf68a4ea1b565f05e91a9 (patch)
tree04159e0b5992ceda41c745afb2d8a9b913f172d2 /include/svx/autoformathelper.hxx
parent1cbf0ee54519bf81d934609352e8a1a641d8a534 (diff)
Adapt AutoFormatHelper to std::unique_ptr
Change-Id: I3087a7e95e73dbcda798ca62705f7941a6466ccb Reviewed-on: https://gerrit.libreoffice.org/72401 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Diffstat (limited to 'include/svx/autoformathelper.hxx')
-rw-r--r--include/svx/autoformathelper.hxx72
1 files changed, 38 insertions, 34 deletions
diff --git a/include/svx/autoformathelper.hxx b/include/svx/autoformathelper.hxx
index a2d72646cbce..c731ff70b5e0 100644
--- a/include/svx/autoformathelper.hxx
+++ b/include/svx/autoformathelper.hxx
@@ -93,47 +93,50 @@ class SVX_DLLPUBLIC AutoFormatBase
protected:
// common attributes of Calc and Writer
// --- from 641 on: CJK and CTL font settings
- std::shared_ptr<SvxFontItem> m_aFont;
- std::shared_ptr<SvxFontHeightItem> m_aHeight;
- std::shared_ptr<SvxWeightItem> m_aWeight;
- std::shared_ptr<SvxPostureItem> m_aPosture;
-
- std::shared_ptr<SvxFontItem> m_aCJKFont;
- std::shared_ptr<SvxFontHeightItem> m_aCJKHeight;
- std::shared_ptr<SvxWeightItem> m_aCJKWeight;
- std::shared_ptr<SvxPostureItem> m_aCJKPosture;
-
- std::shared_ptr<SvxFontItem> m_aCTLFont;
- std::shared_ptr<SvxFontHeightItem> m_aCTLHeight;
- std::shared_ptr<SvxWeightItem> m_aCTLWeight;
- std::shared_ptr<SvxPostureItem> m_aCTLPosture;
-
- std::shared_ptr<SvxUnderlineItem> m_aUnderline;
- std::shared_ptr<SvxOverlineItem> m_aOverline;
- std::shared_ptr<SvxCrossedOutItem> m_aCrossedOut;
- std::shared_ptr<SvxContourItem> m_aContour;
- std::shared_ptr<SvxShadowedItem> m_aShadowed;
- std::shared_ptr<SvxColorItem> m_aColor;
- std::shared_ptr<SvxBoxItem> m_aBox;
- std::shared_ptr<SvxLineItem> m_aTLBR;
- std::shared_ptr<SvxLineItem> m_aBLTR;
- std::shared_ptr<SvxBrushItem> m_aBackground;
+ std::unique_ptr<SvxFontItem> m_aFont;
+ std::unique_ptr<SvxFontHeightItem> m_aHeight;
+ std::unique_ptr<SvxWeightItem> m_aWeight;
+ std::unique_ptr<SvxPostureItem> m_aPosture;
+
+ std::unique_ptr<SvxFontItem> m_aCJKFont;
+ std::unique_ptr<SvxFontHeightItem> m_aCJKHeight;
+ std::unique_ptr<SvxWeightItem> m_aCJKWeight;
+ std::unique_ptr<SvxPostureItem> m_aCJKPosture;
+
+ std::unique_ptr<SvxFontItem> m_aCTLFont;
+ std::unique_ptr<SvxFontHeightItem> m_aCTLHeight;
+ std::unique_ptr<SvxWeightItem> m_aCTLWeight;
+ std::unique_ptr<SvxPostureItem> m_aCTLPosture;
+
+ std::unique_ptr<SvxUnderlineItem> m_aUnderline;
+ std::unique_ptr<SvxOverlineItem> m_aOverline;
+ std::unique_ptr<SvxCrossedOutItem> m_aCrossedOut;
+ std::unique_ptr<SvxContourItem> m_aContour;
+ std::unique_ptr<SvxShadowedItem> m_aShadowed;
+ std::unique_ptr<SvxColorItem> m_aColor;
+ std::unique_ptr<SvxBoxItem> m_aBox;
+ std::unique_ptr<SvxLineItem> m_aTLBR;
+ std::unique_ptr<SvxLineItem> m_aBLTR;
+ std::unique_ptr<SvxBrushItem> m_aBackground;
// Writer specific
- std::shared_ptr<SvxAdjustItem> m_aAdjust;
+ std::unique_ptr<SvxAdjustItem> m_aAdjust;
// Calc specific
- std::shared_ptr<SvxHorJustifyItem> m_aHorJustify;
- std::shared_ptr<SvxVerJustifyItem> m_aVerJustify;
- std::shared_ptr<SfxBoolItem> m_aStacked;
- std::shared_ptr<SvxMarginItem> m_aMargin;
- std::shared_ptr<SfxBoolItem> m_aLinebreak;
+ std::unique_ptr<SvxHorJustifyItem> m_aHorJustify;
+ std::unique_ptr<SvxVerJustifyItem> m_aVerJustify;
+ std::unique_ptr<SfxBoolItem> m_aStacked;
+ std::unique_ptr<SvxMarginItem> m_aMargin;
+ std::unique_ptr<SfxBoolItem> m_aLinebreak;
// from SO5, 504k on, rotated text
- std::shared_ptr<SfxInt32Item> m_aRotateAngle;
- std::shared_ptr<SvxRotateModeItem> m_aRotateMode;
+ std::unique_ptr<SfxInt32Item> m_aRotateAngle;
+ std::unique_ptr<SvxRotateModeItem> m_aRotateMode;
+
+ // 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&);
-public:
AutoFormatBase();
AutoFormatBase( const AutoFormatBase& rNew );
~AutoFormatBase();
@@ -141,6 +144,7 @@ public:
/// Comparing based of boxes backgrounds.
bool operator==(const AutoFormatBase& rRight);
+public:
// The get-methods.
const SvxFontItem &GetFont() const { return *m_aFont; }
const SvxFontHeightItem &GetHeight() const { return *m_aHeight; }