diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-12-21 13:07:33 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-12-21 09:51:14 +0100 |
commit | 69fb0fb44d8d60d3bb550f0117f91f64b6194369 (patch) | |
tree | 4a257f3e77e3d3e258a2a81c2d8e1cb9d02f51c3 /cui/source | |
parent | 98cf3bfefd10f8680d8307920c8ad8a4ebf5127e (diff) |
Transfer preferred DPI into SfxTabPage with additional properties
This adds to SfxTabPage a new member maAdditionalProperties, to
make it easier to transfer additional properties into a tab page.
This is then used to transfer the preferred DPI into the tab page,
which was previously done by user data, which is less than ideal
and always doesn't work.
Change-Id: Ia4daa72093d96310009b0065f8a0e26be6bedec3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127205
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index b83e0bbc0426..905415f70928 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -288,10 +288,9 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet) DBG_ASSERT( pPool, "Where is the pool?" ); #endif - if (!GetUserData().isEmpty()) - { - m_aPreferredDPI = GetUserData().toInt32(); - } + auto& aProperties = getAdditionalProperties(); + if (aProperties.find("PreferredDPI") != aProperties.end()) + m_aPreferredDPI = aProperties.at("PreferredDPI").get<sal_Int32>(); bSetOrigSize = false; |