From 51b1e751477c75e7ce8f40eeebdc1d9747ba32d2 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Tue, 31 Aug 2004 11:25:29 +0000 Subject: INTEGRATION: CWS xmlsec05 (1.28.44); FILE MERGED 2004/08/25 07:26:04 pb 1.28.44.1: fix: #i33095# load and save 'LoadReadonly' in settings.xml --- starmath/source/unomodel.cxx | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'starmath') diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 19614902de87..8b66dc099e89 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unomodel.cxx,v $ * - * $Revision: 1.28 $ + * $Revision: 1.29 $ * - * last change: $Author: hr $ $Date: 2004-04-13 12:27:16 $ + * last change: $Author: kz $ $Date: 2004-08-31 12:25:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,6 +67,9 @@ #ifndef _OSL_MUTEX_HXX_ #include #endif +#ifndef _SFXDOCINF_HXX +#include +#endif #ifndef _SFX_PRINTER_HXX #include #endif @@ -228,7 +231,10 @@ enum SmModelPropertyHandles HANDLE_PRINTER_SETUP, HANDLE_SYMBOLS, HANDLE_BASIC_LIBRARIES, /* #93295# */ - HANDLE_RUNTIME_UID + HANDLE_RUNTIME_UID, + // --> PB 2004-08-25 #i33095# Security Options + HANDLE_LOAD_READONLY + // <-- }; PropertySetInfo * lcl_createModelPropertyInfo () @@ -295,6 +301,9 @@ PropertySetInfo * lcl_createModelPropertyInfo () { RTL_CONSTASCII_STRINGPARAM( "RuntimeUID" ), HANDLE_RUNTIME_UID , &::getCppuType(static_cast< const rtl::OUString * >(0)), PropertyAttribute::READONLY, 0 }, { RTL_CONSTASCII_STRINGPARAM( "Symbols" ), HANDLE_SYMBOLS , &::getCppuType((const Sequence < SymbolDescriptor > *)0), PROPERTY_NONE, 0 }, { RTL_CONSTASCII_STRINGPARAM( "TopMargin" ), HANDLE_TOP_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_TOPSPACE }, + // --> PB 2004-08-25 #i33095# Security Options + { RTL_CONSTASCII_STRINGPARAM( "LoadReadonly" ), HANDLE_LOAD_READONLY, &::getBooleanCppuType(), PROPERTY_NONE, 0 }, + // <-- { NULL, 0, 0, NULL, 0, 0 } }; PropertySetInfo *pInfo = new PropertySetInfo ( aModelPropertyInfoMap ); @@ -702,6 +711,17 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* throw IllegalArgumentException(); } break; + // --> PB 2004-08-25 #i33095# Security Options + case HANDLE_LOAD_READONLY : + { + if ( (*pValues).getValueType() != ::getBooleanCppuType() ) + throw IllegalArgumentException(); + sal_Bool bReadonly; + if ( *pValues >>= bReadonly ) + pDocSh->GetDocInfo().SetLoadReadonly( bReadonly ); + break; + } + // <-- } } } @@ -888,6 +908,13 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu case HANDLE_RUNTIME_UID: *pValue <<= getRuntimeUID(); break; + // --> PB 2004-08-25 #i33095# Security Options + case HANDLE_LOAD_READONLY : + { + *pValue <<= pDocSh->GetDocInfo().IsLoadReadonly(); + break; + } + // <-- } } } -- cgit