diff options
author | Ilhan Yesil <ilhanyesil@gmx.de> | 2018-04-11 15:44:11 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-01 09:52:33 +0200 |
commit | 2ded7acd61cf01a7c50d770b17605252738ed684 (patch) | |
tree | 325c13d422abe1fb84f6f718ca423643639b1725 /starmath/source/unomodel.cxx | |
parent | 23b08449736ba825a9c582ba18b7a5fdba178e47 (diff) |
tdf#87995 Missing setting for save thumbnail in settings.xml.
If the user unchecks "Save preview picture with this document" in the
dialog field and saves the document, the appropriate flag is now
written to settings.xml by introducing the setting named
"SaveThumbnail".
Change-Id: I4916b4149a9494dd1891c0e05cb9a985ba0a9121
Reviewed-on: https://gerrit.libreoffice.org/52768
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'starmath/source/unomodel.cxx')
-rw-r--r-- | starmath/source/unomodel.cxx | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 0afc6093de15..1c66e2b44825 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -214,6 +214,7 @@ enum SmModelPropertyHandles HANDLE_PRINTER_NAME, HANDLE_PRINTER_SETUP, HANDLE_SYMBOLS, + HANDLE_SAVE_THUMBNAIL, HANDLE_USED_SYMBOLS, HANDLE_BASIC_LIBRARIES, HANDLE_RUNTIME_UID, @@ -286,15 +287,16 @@ static rtl::Reference<PropertySetInfo> lcl_createModelPropertyInfo () { OUString("RelativeSymbolPrimaryHeight") , HANDLE_RELATIVE_SYMBOL_PRIMARY_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSIZE }, { OUString("RelativeUpperLimitDistance") , HANDLE_RELATIVE_UPPER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_UPPERLIMIT }, { OUString("RightMargin") , HANDLE_RIGHT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_RIGHTSPACE }, - { OUString("RuntimeUID") , HANDLE_RUNTIME_UID , cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0 }, - { OUString("Symbols") , HANDLE_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PROPERTY_NONE, 0 }, - { OUString("UserDefinedSymbolsInUse") , HANDLE_USED_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PropertyAttribute::READONLY, 0 }, + { OUString("RuntimeUID") , HANDLE_RUNTIME_UID , cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0 }, + { OUString("SaveThumbnail") , HANDLE_SAVE_THUMBNAIL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, + { OUString("Symbols") , HANDLE_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PROPERTY_NONE, 0 }, + { OUString("UserDefinedSymbolsInUse") , HANDLE_USED_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PropertyAttribute::READONLY, 0 }, { OUString("TopMargin") , HANDLE_TOP_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_TOPSPACE }, // #i33095# Security Options - { OUString("LoadReadonly") , HANDLE_LOAD_READONLY , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, + { OUString("LoadReadonly") , HANDLE_LOAD_READONLY , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, // #i972# { OUString("BaseLine") , HANDLE_BASELINE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, - { OUString("InteropGrabBag") , HANDLE_INTEROP_GRAB_BAG , cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get(), PROPERTY_NONE, 0 }, + { OUString("InteropGrabBag") , HANDLE_INTEROP_GRAB_BAG , cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get(), PROPERTY_NONE, 0 }, { OUString(), 0, css::uno::Type(), 0, 0 } }; return rtl::Reference<PropertySetInfo>( new PropertySetInfo ( aModelPropertyInfoMap ) ); @@ -668,6 +670,15 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* case HANDLE_INTEROP_GRAB_BAG: setGrabBagItem(*pValues); break; + case HANDLE_SAVE_THUMBNAIL: + { + if ((*pValues).getValueType() != cppu::UnoType<bool>::get()) + throw IllegalArgumentException(); + bool bThumbnail = false; + if (*pValues >>= bThumbnail) + pDocSh->SetUseThumbnailSave(bThumbnail); + } + break; } } @@ -882,6 +893,11 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu case HANDLE_INTEROP_GRAB_BAG: getGrabBagItem(*pValue); break; + case HANDLE_SAVE_THUMBNAIL: + { + *pValue <<= pDocSh->IsUseThumbnailSave(); + } + break; } } } |