diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-01-06 21:19:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-07 11:11:59 +0100 |
commit | c52aa97b988aeeb16d1eb21262889f565b8a72a3 (patch) | |
tree | b9525f57c24bba13e6a33a2c5a851b3d1af4375e /svx | |
parent | 81ccab11ff457786c3877e7b0047d08685493d3c (diff) |
move some methods BaseProperties->DefaultProperties
These methods are part of the implementation of DefaultProperties,
so they do not belong in a superclass
Change-Id: I553f5d5b771aa0a408a8ade25f009cc56f829c72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128091
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/sdr/properties/emptyproperties.hxx | 15 | ||||
-rw-r--r-- | svx/inc/sdr/properties/pageproperties.hxx | 15 | ||||
-rw-r--r-- | svx/source/sdr/properties/emptyproperties.cxx | 29 | ||||
-rw-r--r-- | svx/source/sdr/properties/pageproperties.cxx | 31 |
4 files changed, 1 insertions, 89 deletions
diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx index b1afcf74a1f6..89deec42f3bd 100644 --- a/svx/inc/sdr/properties/emptyproperties.hxx +++ b/svx/inc/sdr/properties/emptyproperties.hxx @@ -35,21 +35,6 @@ namespace sdr::properties // the to be used ItemSet mutable std::optional<SfxItemSet> mxEmptyItemSet; - // create a new itemset - virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& rPool) override; - - // test changeability for a single item - virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; - - // Do the ItemChange, may do special handling - virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; - - // Called after ItemChange() is done for all items. - virtual void PostItemChange(const sal_uInt16 nWhich) override; - - // react on ItemSet changes - virtual void ItemSetChanged(const SfxItemSet*) override; - public: // basic constructor explicit EmptyProperties(SdrObject& rObj); diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx index 7f801d2e99b7..5473c692812d 100644 --- a/svx/inc/sdr/properties/pageproperties.hxx +++ b/svx/inc/sdr/properties/pageproperties.hxx @@ -31,21 +31,6 @@ namespace sdr::properties // the to be used ItemSet mutable std::optional<SfxItemSet> mxEmptyItemSet; - // create a new object specific itemset with object specific ranges. - virtual SfxItemSet CreateObjectSpecificItemSet(SfxItemPool& pPool) override; - - // Do the ItemChange, may do special handling - virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override; - - // Called after ItemChange() is done for all items. - virtual void PostItemChange(const sal_uInt16 nWhich) override; - - // test changeability for a single item - virtual bool AllowItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) const override; - - // react on ItemSet changes - virtual void ItemSetChanged(const SfxItemSet*) override; - public: // basic constructor explicit PageProperties(SdrObject& rObj); diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx index 42af61012a8a..d8e13d47a410 100644 --- a/svx/source/sdr/properties/emptyproperties.cxx +++ b/svx/source/sdr/properties/emptyproperties.cxx @@ -26,14 +26,6 @@ namespace sdr::properties { - // create a new itemset - SfxItemSet EmptyProperties::CreateObjectSpecificItemSet(SfxItemPool& ) - { - // Basic implementation; Basic object has NO attributes - assert(!"EmptyProperties::CreateObjectSpecificItemSet() should never be called"); - abort(); - } - EmptyProperties::EmptyProperties(SdrObject& rObj) : BaseProperties(rObj) { @@ -75,27 +67,6 @@ namespace sdr::properties assert(!"EmptyProperties::SetObjectItemSet() should never be called"); } - void EmptyProperties::ItemSetChanged(const SfxItemSet* /*pSet*/) - { - assert(!"EmptyProperties::ItemSetChanged() should never be called"); - } - - bool EmptyProperties::AllowItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) const - { - assert(!"EmptyProperties::AllowItemChange() should never be called"); - return true; - } - - void EmptyProperties::ItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) - { - assert(!"EmptyProperties::ItemChange() should never be called"); - } - - void EmptyProperties::PostItemChange(const sal_uInt16 /*nWhich*/) - { - assert(!"EmptyProperties::PostItemChange() should never be called"); - } - void EmptyProperties::SetStyleSheet(SfxStyleSheet* /*pNewStyleSheet*/, bool /*bDontRemoveHardAttr*/) { assert(!"EmptyProperties::SetStyleSheet() should never be called"); diff --git a/svx/source/sdr/properties/pageproperties.cxx b/svx/source/sdr/properties/pageproperties.cxx index 8ae0cda8d2ed..63d35f4a75a7 100644 --- a/svx/source/sdr/properties/pageproperties.cxx +++ b/svx/source/sdr/properties/pageproperties.cxx @@ -28,13 +28,6 @@ namespace sdr::properties { - // create a new itemset - SfxItemSet PageProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool) - { - // override to legally return a valid ItemSet - return SfxItemSet(rPool); - } - PageProperties::PageProperties(SdrObject& rObj) : BaseProperties(rObj) { @@ -60,7 +53,7 @@ namespace sdr::properties { if(!mxEmptyItemSet) { - mxEmptyItemSet.emplace(const_cast<PageProperties*>(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool())); + mxEmptyItemSet.emplace(GetSdrObject().GetObjectItemPool()); } DBG_ASSERT(mxEmptyItemSet, "Could not create an SfxItemSet(!)"); @@ -68,11 +61,6 @@ namespace sdr::properties return *mxEmptyItemSet; } - void PageProperties::ItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) - { - // #86481# simply ignore item setting on page objects - } - SfxStyleSheet* PageProperties::GetStyleSheet() const { // override to legally return a 0L pointer here @@ -84,28 +72,11 @@ namespace sdr::properties // override to legally ignore the StyleSheet here } - void PageProperties::PostItemChange(const sal_uInt16 nWhich ) - { - if( (nWhich == XATTR_FILLSTYLE) && mxEmptyItemSet ) - CleanupFillProperties(*mxEmptyItemSet); - } - void PageProperties::ClearObjectItem(const sal_uInt16 /*nWhich*/) { // simply ignore item clearing on page objects } - bool PageProperties::AllowItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) const - { - assert(!"PageProperties::AllowItemChange() should never be called"); - return true; - } - - void PageProperties::ItemSetChanged(const SfxItemSet* /*pSet*/) - { - assert(!"PageProperties::ItemSetChanged() should never be called"); - } - void PageProperties::SetObjectItem(const SfxPoolItem& /*rItem*/) { assert(!"PageProperties::SetObjectItem() should never be called"); |