diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-01-04 21:39:20 +0900 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2023-06-06 13:03:48 +0200 |
commit | d19f877be396bb69e1ae0ee5535e193e3feb35e1 (patch) | |
tree | 5aa14f2b0fc7cf37b6c68a2526d1167e600ca4b6 | |
parent | tdf#155611: SwFrame::FindNext sometimes returns a sub-frame of this frame (diff) | |
download | core-d19f877be396bb69e1ae0ee5535e193e3feb35e1.tar.gz core-d19f877be396bb69e1ae0ee5535e193e3feb35e1.zip |
sc: fix crash with document properties dialog
"ImagePreferredDPI" property was added for impress and writer,
but it was not handled in calc, so it document properties dialog
crashed (exception because of a non existent property).
Change-Id: I9eb3f6aa7cf6d8ab48930b3071b993e073117688
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127942
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 88d8c9af7140ec25dfbcd9323b870a2da7b6f7e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152558
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Aron Budea <aron.budea@collabora.com>
-rw-r--r-- | sc/inc/unonames.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/unoobj/confuno.cxx | 14 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index 36ab650e918b..848053ba4542 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -574,6 +574,7 @@ #define SC_UNO_UPDTEMPL "UpdateFromTemplate" #define SC_UNO_FILTERED_RANGE_SELECTION "FilteredRangeSelection" #define SC_UNO_VISAREASCREEN "VisibleAreaOnScreen" +#define SC_UNO_IMAGE_PREFERRED_DPI "ImagePreferredDPI" /*Stampit enable/disable print cancel */ #define SC_UNO_ALLOWPRINTJOBCANCEL "AllowPrintJobCancel" diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index ba081d5e2433..95c6fe64c9e8 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -89,6 +89,7 @@ static const SfxItemPropertyMapEntry* lcl_GetConfigPropertyMap() {u"" SC_UNO_EMBED_FONT_SCRIPT_LATIN, 0, cppu::UnoType<bool>::get(), 0, 0}, {u"" SC_UNO_EMBED_FONT_SCRIPT_ASIAN, 0, cppu::UnoType<bool>::get(), 0, 0}, {u"" SC_UNO_EMBED_FONT_SCRIPT_COMPLEX, 0, cppu::UnoType<bool>::get(), 0, 0}, + {u"" SC_UNO_IMAGE_PREFERRED_DPI, 0, cppu::UnoType<sal_Int32>::get(), 0, 0}, {u"" SC_UNO_SYNTAXSTRINGREF, 0, cppu::UnoType<sal_Int16>::get(), 0, 0}, { u"", 0, css::uno::Type(), 0, 0 } }; @@ -396,7 +397,13 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( rDoc.SetCalcConfig( aCalcConfig ); } } - + else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI) + { + if (aValue.has<sal_Int32>()) + { + rDoc.SetImagePreferredDPI(aValue.get<sal_Int32>()); + } + } else { ScGridOptions aGridOpt(aViewOpt.GetGridOptions()); @@ -599,7 +606,10 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr } } } - + else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI) + { + aRet <<= rDoc.GetImagePreferredDPI(); + } else { const ScGridOptions& aGridOpt = aViewOpt.GetGridOptions(); |