diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-06-28 15:12:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-07-03 09:28:11 +0200 |
commit | 85fd526fc681a994415bb422090d1d23aa7d54f6 (patch) | |
tree | 5eb25eb47b22c82a649e1f4c5fcfb8e3fdfeaa25 /include/editeng | |
parent | 6c3318d7597956314feac7c61a7ef2da6d3f41a1 (diff) |
fix and simplify the ItemInstanceManager mechanism
The mechanism is currently broken because it uses hash values as keys,
in two different places. But hash values are not required to be unique,
and as soon as there are enough items of a given type, a collision is
inevitable.
So just simplify this whole mechanism. There is no reason we need
type-specific item managers. Stuff everything into a single global pool,
that uses hashing correctly.
Notes
(*) Performance, as far as I can tell, is the same or slightly better.
(*) I removed the NUMBER_OF_UNSHARED_INSTANCES thing, in favour
of just having a simpler mechanism
Change-Id: I9068baf9bf6fae2500ae5748c6d1aabe6c3a18a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169709
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/adjustitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/boxitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/brushitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/charreliefitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/crossedoutitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/emphasismarkitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/fhgtitem.hxx | 5 | ||||
-rw-r--r-- | include/editeng/fontitem.hxx | 5 | ||||
-rw-r--r-- | include/editeng/frmdiritem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/langitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/lrspitem.hxx | 38 | ||||
-rw-r--r-- | include/editeng/postitem.hxx | 3 | ||||
-rw-r--r-- | include/editeng/protitem.hxx | 8 | ||||
-rw-r--r-- | include/editeng/rsiditem.hxx | 2 | ||||
-rw-r--r-- | include/editeng/shaditem.hxx | 8 | ||||
-rw-r--r-- | include/editeng/sizeitem.hxx | 2 | ||||
-rw-r--r-- | include/editeng/udlnitem.hxx | 6 | ||||
-rw-r--r-- | include/editeng/ulspitem.hxx | 12 | ||||
-rw-r--r-- | include/editeng/wghtitem.hxx | 3 |
19 files changed, 49 insertions, 67 deletions
diff --git a/include/editeng/adjustitem.hxx b/include/editeng/adjustitem.hxx index c660598abfc7..4a6324893820 100644 --- a/include/editeng/adjustitem.hxx +++ b/include/editeng/adjustitem.hxx @@ -44,9 +44,6 @@ class EDITENG_DLLPUBLIC SvxAdjustItem final : public SfxEnumItemInterface bool bLastCenter : 1; bool bLastBlock : 1; -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx index 49f18d6de4b4..0d9ee80281ef 100644 --- a/include/editeng/boxitem.hxx +++ b/include/editeng/boxitem.hxx @@ -73,9 +73,6 @@ class EDITENG_DLLPUBLIC SvxBoxItem final : public SfxPoolItem void tryMigrateComplexColor(SvxBoxItemLine eLine); -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/brushitem.hxx b/include/editeng/brushitem.hxx index 6897e319a3b6..8412634a1157 100644 --- a/include/editeng/brushitem.hxx +++ b/include/editeng/brushitem.hxx @@ -54,9 +54,6 @@ class EDITENG_DLLPUBLIC SvxBrushItem final : public SfxPoolItem void ApplyGraphicTransparency_Impl(); -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/charreliefitem.hxx b/include/editeng/charreliefitem.hxx index 910adcf11e24..78b57fa7df00 100644 --- a/include/editeng/charreliefitem.hxx +++ b/include/editeng/charreliefitem.hxx @@ -33,9 +33,6 @@ class EDITENG_DLLPUBLIC SvxCharReliefItem final : public SfxEnumItem<FontRelief> { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/crossedoutitem.hxx b/include/editeng/crossedoutitem.hxx index 259eb412e1e1..5d8b18fe2650 100644 --- a/include/editeng/crossedoutitem.hxx +++ b/include/editeng/crossedoutitem.hxx @@ -31,9 +31,6 @@ class EDITENG_DLLPUBLIC SvxCrossedOutItem final : public SfxEnumItem<FontStrikeout> { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/emphasismarkitem.hxx b/include/editeng/emphasismarkitem.hxx index 94d48e4b8d9c..e0fd74cf4400 100644 --- a/include/editeng/emphasismarkitem.hxx +++ b/include/editeng/emphasismarkitem.hxx @@ -32,9 +32,6 @@ class EDITENG_DLLPUBLIC SvxEmphasisMarkItem final : public SfxUInt16Item { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/fhgtitem.hxx b/include/editeng/fhgtitem.hxx index bdde8c6f0afd..342419e4e359 100644 --- a/include/editeng/fhgtitem.hxx +++ b/include/editeng/fhgtitem.hxx @@ -44,9 +44,6 @@ class EDITENG_DLLPUBLIC SvxFontHeightItem final : public SfxPoolItem friend void Create_legacy_direct_set(SvxFontHeightItem& rItem, sal_uInt32 nH, sal_uInt16 nP, MapUnit eP); void legacy_direct_set(sal_uInt32 nH, sal_uInt16 nP, MapUnit eP) { nHeight = nH; nProp = nP; ePropUnit = eP; } -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); @@ -54,6 +51,8 @@ public: const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; diff --git a/include/editeng/fontitem.hxx b/include/editeng/fontitem.hxx index f892178c521e..82d19ca40490 100644 --- a/include/editeng/fontitem.hxx +++ b/include/editeng/fontitem.hxx @@ -34,9 +34,6 @@ class EDITENG_DLLPUBLIC SvxFontItem final : public SfxPoolItem FontPitch ePitch; rtl_TextEncoding eTextEncoding; -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); @@ -48,6 +45,8 @@ public: const sal_uInt16 nId); // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==(const SfxPoolItem& rItem) const override; virtual SvxFontItem* Clone(SfxItemPool *pPool = nullptr) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; diff --git a/include/editeng/frmdiritem.hxx b/include/editeng/frmdiritem.hxx index e2bba96b8974..7bb6dc09950d 100644 --- a/include/editeng/frmdiritem.hxx +++ b/include/editeng/frmdiritem.hxx @@ -30,9 +30,6 @@ class EDITENG_DLLPUBLIC SvxFrameDirectionItem final : public SfxEnumItem<SvxFrameDirection> { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: SvxFrameDirectionItem( SvxFrameDirection nValue, sal_uInt16 nWhich ); virtual ~SvxFrameDirectionItem() override; diff --git a/include/editeng/langitem.hxx b/include/editeng/langitem.hxx index 4ebef0837a6c..c84aebf3b33c 100644 --- a/include/editeng/langitem.hxx +++ b/include/editeng/langitem.hxx @@ -40,9 +40,6 @@ protected: class EDITENG_DLLPUBLIC SvxLanguageItem final : public SvxLanguageItem_Base { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/lrspitem.hxx b/include/editeng/lrspitem.hxx index edab3ef23d73..998ea71fbb84 100644 --- a/include/editeng/lrspitem.hxx +++ b/include/editeng/lrspitem.hxx @@ -68,6 +68,8 @@ public: SvxLeftMarginItem(SvxLeftMarginItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==(const SfxPoolItem&) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; @@ -110,6 +112,8 @@ public: SvxTextLeftMarginItem(SvxTextLeftMarginItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==(const SfxPoolItem&) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; @@ -145,17 +149,19 @@ public: void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp = 100); short GetTextFirstLineOffset() const { return m_nFirstLineOffset; } void SetPropTextFirstLineOffset(const sal_uInt16 nProp) - { m_nPropFirstLineOffset = nProp; } + { ASSERT_CHANGE_REFCOUNTED_ITEM; m_nPropFirstLineOffset = nProp; } sal_uInt16 GetPropTextFirstLineOffset() const { return m_nPropFirstLineOffset; } void SetTextFirstLineOffsetValue(const short nValue) - { m_nFirstLineOffset = nValue; } + { ASSERT_CHANGE_REFCOUNTED_ITEM; m_nFirstLineOffset = nValue; } explicit SvxFirstLineIndentItem(const sal_uInt16 nId); SvxFirstLineIndentItem(const short nOffset, const sal_uInt16 nId); SvxFirstLineIndentItem(SvxFirstLineIndentItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==(const SfxPoolItem&) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; @@ -195,6 +201,8 @@ public: SvxRightMarginItem(SvxRightMarginItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==(const SfxPoolItem&) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; @@ -221,13 +229,15 @@ private: tools::Long m_nGutterMargin = 0; public: - void SetGutterMargin(const tools::Long nGutterMargin) { m_nGutterMargin = nGutterMargin; } + void SetGutterMargin(const tools::Long nGutterMargin) { ASSERT_CHANGE_REFCOUNTED_ITEM; m_nGutterMargin = nGutterMargin; } tools::Long GetGutterMargin() const { return m_nGutterMargin; } explicit SvxGutterLeftMarginItem(const sal_uInt16 nId); SvxGutterLeftMarginItem(SvxGutterLeftMarginItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==(const SfxPoolItem&) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; @@ -260,6 +270,8 @@ public: SvxGutterRightMarginItem(SvxGutterRightMarginItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==(const SfxPoolItem&) const override; virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; @@ -305,6 +317,8 @@ public: SvxLRSpaceItem(SvxLRSpaceItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; @@ -326,15 +340,15 @@ public: // Query/direct setting of the absolute values tools::Long GetLeft() const { return nLeftMargin; } tools::Long GetRight() const { return nRightMargin;} - void SetLeftValue( const tools::Long nL ) { assert(nFirstLineOffset == 0); nLeftMargin = nL; } - void SetRightValue( const tools::Long nR ) { nRightMargin = nR; } + void SetLeftValue( const tools::Long nL ) { ASSERT_CHANGE_REFCOUNTED_ITEM; assert(nFirstLineOffset == 0); nLeftMargin = nL; } + void SetRightValue( const tools::Long nR ) { ASSERT_CHANGE_REFCOUNTED_ITEM; nRightMargin = nR; } bool IsAutoFirst() const { return bAutoFirst; } - void SetAutoFirst( const bool bNew ) { bAutoFirst = bNew; } + void SetAutoFirst( const bool bNew ) { ASSERT_CHANGE_REFCOUNTED_ITEM; bAutoFirst = bNew; } bool IsExplicitZeroMarginValRight() const { return bExplicitZeroMarginValRight; } bool IsExplicitZeroMarginValLeft() const { return bExplicitZeroMarginValLeft; } - void SetExplicitZeroMarginValRight( const bool eR ) { bExplicitZeroMarginValRight = eR; } - void SetExplicitZeroMarginValLeft( const bool eL ) { bExplicitZeroMarginValLeft = eL; } + void SetExplicitZeroMarginValRight( const bool eR ) { ASSERT_CHANGE_REFCOUNTED_ITEM; bExplicitZeroMarginValRight = eR; } + void SetExplicitZeroMarginValLeft( const bool eL ) { ASSERT_CHANGE_REFCOUNTED_ITEM; bExplicitZeroMarginValLeft = eL; } sal_uInt16 GetPropLeft() const { return nPropLeftMargin; } sal_uInt16 GetPropRight() const { return nPropRightMargin;} @@ -345,14 +359,14 @@ public: void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp = 100); short GetTextFirstLineOffset() const { return nFirstLineOffset; } void SetPropTextFirstLineOffset( const sal_uInt16 nProp ) - { nPropFirstLineOffset = nProp; } + { ASSERT_CHANGE_REFCOUNTED_ITEM; nPropFirstLineOffset = nProp; } sal_uInt16 GetPropTextFirstLineOffset() const { return nPropFirstLineOffset; } void SetTextFirstLineOffsetValue( const short nValue ) - { nFirstLineOffset = nValue; } - void SetGutterMargin(const tools::Long nGutterMargin) { m_nGutterMargin = nGutterMargin; } + { ASSERT_CHANGE_REFCOUNTED_ITEM; nFirstLineOffset = nValue; } + void SetGutterMargin(const tools::Long nGutterMargin) { ASSERT_CHANGE_REFCOUNTED_ITEM; m_nGutterMargin = nGutterMargin; } tools::Long GetGutterMargin() const { return m_nGutterMargin; } - void SetRightGutterMargin(const tools::Long nRightGutterMargin) { m_nRightGutterMargin = nRightGutterMargin; } + void SetRightGutterMargin(const tools::Long nRightGutterMargin) { ASSERT_CHANGE_REFCOUNTED_ITEM; m_nRightGutterMargin = nRightGutterMargin; } tools::Long GetRightGutterMargin() const { return m_nRightGutterMargin; } void dumpAsXml(xmlTextWriterPtr pWriter) const override; diff --git a/include/editeng/postitem.hxx b/include/editeng/postitem.hxx index 392a9627feb6..93ed44b6b794 100644 --- a/include/editeng/postitem.hxx +++ b/include/editeng/postitem.hxx @@ -32,9 +32,6 @@ class EDITENG_DLLPUBLIC SvxPostureItem final : public SfxEnumItem<FontItalic> { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/protitem.hxx b/include/editeng/protitem.hxx index 0c3b473700d1..18ad76fcf3ac 100644 --- a/include/editeng/protitem.hxx +++ b/include/editeng/protitem.hxx @@ -43,6 +43,8 @@ public: SvxProtectItem(SvxProtectItem const &) = default; // SfxPoolItem copy function dichotomy // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool GetPresentation( SfxItemPresentation ePres, @@ -56,9 +58,9 @@ public: bool IsContentProtected() const { return bCntnt; } bool IsSizeProtected() const { return bSize; } bool IsPosProtected() const { return bPos; } - void SetContentProtect( bool bNew ) { bCntnt = bNew; } - void SetSizeProtect ( bool bNew ) { bSize = bNew; } - void SetPosProtect ( bool bNew ) { bPos = bNew; } + void SetContentProtect( bool bNew ) { ASSERT_CHANGE_REFCOUNTED_ITEM; bCntnt = bNew; } + void SetSizeProtect ( bool bNew ) { ASSERT_CHANGE_REFCOUNTED_ITEM; bSize = bNew; } + void SetPosProtect ( bool bNew ) { ASSERT_CHANGE_REFCOUNTED_ITEM; bPos = bNew; } virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; diff --git a/include/editeng/rsiditem.hxx b/include/editeng/rsiditem.hxx index 64b4c1cc2b1f..24213c3fa697 100644 --- a/include/editeng/rsiditem.hxx +++ b/include/editeng/rsiditem.hxx @@ -33,8 +33,6 @@ public: void dumpAsXml(xmlTextWriterPtr pWriter) const override; -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; }; #endif // INCLUDED_EDITENG_RSIDITEM_HXX diff --git a/include/editeng/shaditem.hxx b/include/editeng/shaditem.hxx index bed848215985..9d15e5ea56e5 100644 --- a/include/editeng/shaditem.hxx +++ b/include/editeng/shaditem.hxx @@ -48,6 +48,8 @@ public: const SvxShadowLocation eLoc = SvxShadowLocation::NONE ); // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; @@ -62,13 +64,13 @@ public: virtual bool HasMetrics() const override; const Color& GetColor() const { return aShadowColor;} - void SetColor( const Color &rNew ) { aShadowColor = rNew; } + void SetColor( const Color &rNew ) { ASSERT_CHANGE_REFCOUNTED_ITEM; aShadowColor = rNew; } sal_uInt16 GetWidth() const { return nWidth; } SvxShadowLocation GetLocation() const { return eLocation; } - void SetWidth( sal_uInt16 nNew ) { nWidth = nNew; } - void SetLocation( SvxShadowLocation eNew ) { eLocation = eNew; } + void SetWidth( sal_uInt16 nNew ) { ASSERT_CHANGE_REFCOUNTED_ITEM; nWidth = nNew; } + void SetLocation( SvxShadowLocation eNew ) { ASSERT_CHANGE_REFCOUNTED_ITEM; eLocation = eNew; } // Calculate width of the shadow on the page. sal_uInt16 CalcShadowSpace( SvxShadowItemSide nShadow ) const; diff --git a/include/editeng/sizeitem.hxx b/include/editeng/sizeitem.hxx index 4e20699f1cef..841846b30235 100644 --- a/include/editeng/sizeitem.hxx +++ b/include/editeng/sizeitem.hxx @@ -42,6 +42,8 @@ public: SvxSizeItem( const sal_uInt16 nId, const Size& rSize); // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; diff --git a/include/editeng/udlnitem.hxx b/include/editeng/udlnitem.hxx index b140c47b8bc5..b4f3107b5c7f 100644 --- a/include/editeng/udlnitem.hxx +++ b/include/editeng/udlnitem.hxx @@ -87,9 +87,6 @@ public: class EDITENG_DLLPUBLIC SvxUnderlineItem final : public SvxTextLineItem { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); @@ -106,9 +103,6 @@ public: class EDITENG_DLLPUBLIC SvxOverlineItem final : public SvxTextLineItem { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); diff --git a/include/editeng/ulspitem.hxx b/include/editeng/ulspitem.hxx index b0131ab9904d..5c26ce2eb6a8 100644 --- a/include/editeng/ulspitem.hxx +++ b/include/editeng/ulspitem.hxx @@ -46,6 +46,8 @@ public: const sal_uInt16 nId ); // "pure virtual Methods" from SfxPoolItem + virtual bool isHashable() const override; + virtual size_t hashCode() const override; virtual bool operator==( const SfxPoolItem& ) const override; virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override; @@ -63,11 +65,11 @@ public: inline void SetUpper( const sal_uInt16 nU, const sal_uInt16 nProp = 100 ); inline void SetLower( const sal_uInt16 nL, const sal_uInt16 nProp = 100 ); - void SetUpperValue( const sal_uInt16 nU ) { nUpper = nU; } - void SetLowerValue( const sal_uInt16 nL ) { nLower = nL; } - void SetContextValue( const bool bC ) { bContext = bC; } - void SetPropUpper( const sal_uInt16 nU ) { nPropUpper = nU; } - void SetPropLower( const sal_uInt16 nL ) { nPropLower = nL; } + void SetUpperValue( const sal_uInt16 nU ) { ASSERT_CHANGE_REFCOUNTED_ITEM; nUpper = nU; } + void SetLowerValue( const sal_uInt16 nL ) { ASSERT_CHANGE_REFCOUNTED_ITEM; nLower = nL; } + void SetContextValue( const bool bC ) { ASSERT_CHANGE_REFCOUNTED_ITEM; bContext = bC; } + void SetPropUpper( const sal_uInt16 nU ) { ASSERT_CHANGE_REFCOUNTED_ITEM; nPropUpper = nU; } + void SetPropLower( const sal_uInt16 nL ) { ASSERT_CHANGE_REFCOUNTED_ITEM; nPropLower = nL; } sal_uInt16 GetUpper() const { return nUpper; } sal_uInt16 GetLower() const { return nLower; } diff --git a/include/editeng/wghtitem.hxx b/include/editeng/wghtitem.hxx index f8beb7c7a62f..121cfcf318a6 100644 --- a/include/editeng/wghtitem.hxx +++ b/include/editeng/wghtitem.hxx @@ -32,9 +32,6 @@ class EDITENG_DLLPUBLIC SvxWeightItem final : public SfxEnumItem<FontWeight> { -protected: - virtual ItemInstanceManager* getItemInstanceManager() const override; - public: static SfxPoolItem* CreateDefault(); |