summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-22 10:18:38 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-22 21:02:18 +0100
commitcf175d313b7cb3084f99f01e6213cdeeee124d92 (patch)
treeb40f79c82151239e964e3732777a7d3cc22f5eec /include
parent9355d020e0b6bec6c6e08bd5155ed1428df5f674 (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/+/109751 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/ctrlitem.hxx8
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 );