diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-01-04 21:39:20 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-01-05 05:42:14 +0100 |
commit | 88d8c9af7140ec25dfbcd9323b870a2da7b6f7e0 (patch) | |
tree | d9bfd8cbc9c8c295a570c34f8c340a2af9c32404 /sc/source/ui | |
parent | 43befdeda4a66a71bd3c204a79f06cb96c7b0145 (diff) |
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>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/unoobj/confuno.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 9fa7ca85a25b..c71f2f28fd04 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -89,6 +89,7 @@ static const SfxItemPropertyMapEntry* lcl_GetConfigPropertyMap() { SC_UNO_EMBED_FONT_SCRIPT_LATIN, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_EMBED_FONT_SCRIPT_ASIAN, 0, cppu::UnoType<bool>::get(), 0, 0}, { SC_UNO_EMBED_FONT_SCRIPT_COMPLEX, 0, cppu::UnoType<bool>::get(), 0, 0}, + { SC_UNO_IMAGE_PREFERRED_DPI, 0, cppu::UnoType<sal_Int32>::get(), 0, 0}, { 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(); |