diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-22 10:18:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-22 15:27:21 +0100 |
commit | 41372210fbbc497eb6353c998fca0b5502b331d9 (patch) | |
tree | 9c26dd883003dc394873c8468e0511378f44bbdc /include/sfx2 | |
parent | b7ca9576c26ed258537134c0cf2944cfcfc65f2e (diff) |
tdf#135590 MapUnit::Map100thMM fallback is inappropiate for writer
which uses MapUnit::Twip
so directly after insert, envelope, ok the new document sidebar
was using MapUnit::Map100thMM to lookup paper sizes instead of
MapUnit::Twip giving inconsistent results against format, page
Change-Id: I6a92fddedfe9fef8ad7532ad00b2b38b9741bb69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109782
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/ctrlitem.hxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx index 489fdb9461a8..da9f86f93e1c 100644 --- a/include/sfx2/ctrlitem.hxx +++ b/include/sfx2/ctrlitem.hxx @@ -30,9 +30,10 @@ class SfxBindings; class SFX2_DLLPUBLIC SfxControllerItem { private: - sal_uInt16 nId; + sal_uInt16 nId; SfxControllerItem* pNext; // to notify next ControllerItem SfxBindings* pBindings; + MapUnit eFallbackCoreMetric; public: SfxBindings & GetBindings() { @@ -67,6 +68,11 @@ public: virtual void GetControlState( sal_uInt16 nSID, boost::property_tree::ptree& ); MapUnit GetCoreMetric() const; + // override what GetCoreMetric will return if it cannot determine the current CoreMetric + void SetFallbackCoreMetric(MapUnit eFallback) + { + eFallbackCoreMetric = eFallback; + } static SfxItemState GetItemState( const SfxPoolItem* pState ); |