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>
This commit is contained in:
parent
43befdeda4
commit
88d8c9af71
2 changed files with 13 additions and 2 deletions
|
@ -574,6 +574,7 @@ inline constexpr OUStringLiteral SC_SERVICENAME_CHART_PIVOTTABLE_DATAPROVIDER =
|
|||
#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"
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue