diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-12 12:31:38 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-12 15:10:35 +0100 |
commit | 45c0a6174d452b9eb0ab2b5f8d9743922049338c (patch) | |
tree | 7c50153534956008c382b5a60f6388674941e9f6 | |
parent | CheckInverted() is not used anywhere. (diff) | |
download | core-45c0a6174d452b9eb0ab2b5f8d9743922049338c.tar.gz core-45c0a6174d452b9eb0ab2b5f8d9743922049338c.zip |
Simplify comphelper::PropertyInfo
...as its sole two uses (in sw) are already fine with initializing arrays of
it dynamically, there is no harm in changing it and thereby getting rid of the
last use of comphelper/TypeGeneration.hxx.
Change-Id: I11931dbbec48dac5a694a59cf6425206c806fbfb
-rw-r--r-- | comphelper/source/property/ChainablePropertySetInfo.cxx | 31 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySetInfo.cxx | 30 | ||||
-rw-r--r-- | include/comphelper/ChainablePropertySetInfo.hxx | 5 | ||||
-rw-r--r-- | include/comphelper/MasterPropertySetInfo.hxx | 5 | ||||
-rw-r--r-- | include/comphelper/PropertyInfoHash.hxx | 13 | ||||
-rw-r--r-- | sw/inc/pch/precompiled_sw.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/uno/SwXDocumentSettings.cxx | 164 | ||||
-rw-r--r-- | sw/source/ui/uno/unomod.cxx | 127 |
8 files changed, 178 insertions, 198 deletions
diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index c645af7c1c15..97be665f5b65 100644 --- a/comphelper/source/property/ChainablePropertySetInfo.cxx +++ b/comphelper/source/property/ChainablePropertySetInfo.cxx @@ -18,10 +18,8 @@ */ #include <comphelper/ChainablePropertySetInfo.hxx> -#include <comphelper/TypeGeneration.hxx> using ::comphelper::PropertyInfo; -using ::comphelper::GenerateCppuType; using ::comphelper::ChainablePropertySetInfo; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Type; @@ -33,7 +31,7 @@ using ::com::sun::star::beans::Property; using ::com::sun::star::beans::XPropertySetInfo; using ::com::sun::star::beans::UnknownPropertyException; -ChainablePropertySetInfo::ChainablePropertySetInfo( PropertyInfo* pMap ) +ChainablePropertySetInfo::ChainablePropertySetInfo( PropertyInfo const * pMap ) throw() { add ( pMap ); @@ -44,7 +42,7 @@ ChainablePropertySetInfo::~ChainablePropertySetInfo() { } -void ChainablePropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount ) +void ChainablePropertySetInfo::add( PropertyInfo const * pMap, sal_Int32 nCount ) throw() { // nCount < 0 => add all @@ -53,16 +51,15 @@ void ChainablePropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount ) if( maProperties.getLength() ) maProperties.realloc( 0 ); - while( pMap->mpName && ( ( nCount < 0) || ( nCount-- > 0 ) ) ) + while( !pMap->maName.isEmpty() && ( ( nCount < 0) || ( nCount-- > 0 ) ) ) { - OUString aName( pMap->mpName, pMap->mnNameLen, RTL_TEXTENCODING_ASCII_US ); - #ifdef DBG_UTIL - PropertyInfoHash::iterator aIter = maMap.find( aName ); + PropertyInfoHash::iterator aIter = maMap.find( pMap->maName ); if( aIter != maMap.end() ) OSL_FAIL( "Warning: PropertyInfo added twice, possible error!"); #endif - maMap[aName] = pMap++; + maMap[pMap->maName] = pMap; + ++pMap; } } @@ -85,13 +82,11 @@ Sequence< ::Property > SAL_CALL ChainablePropertySetInfo::getProperties() for (PropertyInfoHash::const_iterator aIter(maMap.begin()), aEnd(maMap.end()); aIter != aEnd; ++aIter, ++pProperties) { - PropertyInfo* pInfo = (*aIter).second; + PropertyInfo const * pInfo = (*aIter).second; - pProperties->Name = OUString( pInfo->mpName, pInfo->mnNameLen, RTL_TEXTENCODING_ASCII_US ); + pProperties->Name = pInfo->maName; pProperties->Handle = pInfo->mnHandle; - const Type* pType; - GenerateCppuType ( pInfo->meCppuType, pType); - pProperties->Type = *pType; + pProperties->Type = pInfo->maType; pProperties->Attributes = pInfo->mnAttributes; } } @@ -106,13 +101,11 @@ Property SAL_CALL ChainablePropertySetInfo::getPropertyByName( const OUString& r if ( maMap.end() == aIter ) throw UnknownPropertyException( rName, *this ); - PropertyInfo *pInfo = (*aIter).second; + PropertyInfo const *pInfo = (*aIter).second; Property aProperty; - aProperty.Name = OUString( pInfo->mpName, pInfo->mnNameLen, RTL_TEXTENCODING_ASCII_US ); + aProperty.Name = pInfo->maName; aProperty.Handle = pInfo->mnHandle; - const Type* pType = &aProperty.Type; - GenerateCppuType ( pInfo->meCppuType, pType ); - aProperty.Type = *pType; + aProperty.Type = pInfo->maType; aProperty.Attributes = pInfo->mnAttributes; return aProperty; } diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index e85d7402eb3a..d6f1496dfb4b 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -18,10 +18,8 @@ */ #include <comphelper/MasterPropertySetInfo.hxx> -#include <comphelper/TypeGeneration.hxx> using ::comphelper::PropertyInfo; -using ::comphelper::GenerateCppuType; using ::comphelper::MasterPropertySetInfo; using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Type; @@ -33,7 +31,7 @@ using ::com::sun::star::beans::Property; using ::com::sun::star::beans::XPropertySetInfo; using ::com::sun::star::beans::UnknownPropertyException; -MasterPropertySetInfo::MasterPropertySetInfo( PropertyInfo* pMap ) +MasterPropertySetInfo::MasterPropertySetInfo( PropertyInfo const * pMap ) throw() { add ( pMap ); @@ -50,7 +48,7 @@ MasterPropertySetInfo::~MasterPropertySetInfo() } } -void MasterPropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount, sal_uInt8 nMapId ) +void MasterPropertySetInfo::add( PropertyInfo const * pMap, sal_Int32 nCount, sal_uInt8 nMapId ) throw() { // nCount < 0 => add all @@ -59,16 +57,14 @@ void MasterPropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount, sal_uInt8 if( maProperties.getLength() ) maProperties.realloc( 0 ); - for ( ; pMap->mpName && ( ( nCount < 0 ) || ( nCount > 0 ) ); --nCount, ++pMap ) + for ( ; !pMap->maName.isEmpty() && ( ( nCount < 0 ) || ( nCount > 0 ) ); --nCount, ++pMap ) { - OUString aName( pMap->mpName, pMap->mnNameLen, RTL_TEXTENCODING_ASCII_US ); - #ifdef DBG_UTIL - PropertyDataHash::iterator aIter = maMap.find( aName ); + PropertyDataHash::iterator aIter = maMap.find( pMap->maName ); if( aIter != maMap.end() ) OSL_FAIL( "Warning: PropertyInfo added twice, possible error!"); #endif - maMap[aName] = new PropertyData ( nMapId, pMap ); + maMap[pMap->maName] = new PropertyData ( nMapId, pMap ); } } @@ -102,13 +98,11 @@ Sequence< ::Property > SAL_CALL MasterPropertySetInfo::getProperties() for (PropertyDataHash::const_iterator aIter(maMap.begin()), aEnd(maMap.end()) ; aIter != aEnd; ++aIter, ++pProperties) { - PropertyInfo* pInfo = (*aIter).second->mpInfo; + PropertyInfo const * pInfo = (*aIter).second->mpInfo; - pProperties->Name = OUString( pInfo->mpName, pInfo->mnNameLen, RTL_TEXTENCODING_ASCII_US ); + pProperties->Name = pInfo->maName; pProperties->Handle = pInfo->mnHandle; - const Type* pType; - GenerateCppuType ( pInfo->meCppuType, pType); - pProperties->Type = *pType; + pProperties->Type = pInfo->maType; pProperties->Attributes = pInfo->mnAttributes; } } @@ -123,13 +117,11 @@ Property SAL_CALL MasterPropertySetInfo::getPropertyByName( const OUString& rNam if ( maMap.end() == aIter ) throw UnknownPropertyException( rName, *this ); - PropertyInfo *pInfo = (*aIter).second->mpInfo; + PropertyInfo const *pInfo = (*aIter).second->mpInfo; Property aProperty; - aProperty.Name = OUString( pInfo->mpName, pInfo->mnNameLen, RTL_TEXTENCODING_ASCII_US ); + aProperty.Name = pInfo->maName; aProperty.Handle = pInfo->mnHandle; - const Type* pType; - GenerateCppuType ( pInfo->meCppuType, pType ); - aProperty.Type = *pType; + aProperty.Type = pInfo->maType; aProperty.Attributes = pInfo->mnAttributes; return aProperty; diff --git a/include/comphelper/ChainablePropertySetInfo.hxx b/include/comphelper/ChainablePropertySetInfo.hxx index 5e8e546d0354..e5d731d429c6 100644 --- a/include/comphelper/ChainablePropertySetInfo.hxx +++ b/include/comphelper/ChainablePropertySetInfo.hxx @@ -23,7 +23,6 @@ #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <comphelper/PropertyInfoHash.hxx> #include <cppuhelper/implbase1.hxx> -#include <comphelper/TypeGeneration.hxx> #include <comphelper/comphelperdllapi.h> /* @@ -44,13 +43,13 @@ namespace comphelper PropertyInfoHash maMap; com::sun::star::uno::Sequence < com::sun::star::beans::Property > maProperties; public: - ChainablePropertySetInfo( PropertyInfo * pMap ) + ChainablePropertySetInfo( PropertyInfo const * pMap ) throw(); virtual ~ChainablePropertySetInfo() throw(); - void add( PropertyInfo* pMap, sal_Int32 nCount = -1 ) + void add( PropertyInfo const * pMap, sal_Int32 nCount = -1 ) throw(); void remove( const OUString& aName ) throw(); diff --git a/include/comphelper/MasterPropertySetInfo.hxx b/include/comphelper/MasterPropertySetInfo.hxx index 15664f185f01..e3553a9a6fc9 100644 --- a/include/comphelper/MasterPropertySetInfo.hxx +++ b/include/comphelper/MasterPropertySetInfo.hxx @@ -22,7 +22,6 @@ #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <comphelper/PropertyInfoHash.hxx> #include <cppuhelper/implbase1.hxx> -#include <comphelper/TypeGeneration.hxx> #include <comphelper/comphelperdllapi.h> namespace comphelper @@ -36,11 +35,11 @@ namespace comphelper PropertyDataHash maMap; com::sun::star::uno::Sequence < com::sun::star::beans::Property > maProperties; public: - MasterPropertySetInfo( PropertyInfo * pMap ) + MasterPropertySetInfo( PropertyInfo const * pMap ) throw(); virtual ~MasterPropertySetInfo() throw(); - void add( PropertyInfo* pMap, sal_Int32 nCount = -1, sal_uInt8 nMapId = 0 ) + void add( PropertyInfo const * pMap, sal_Int32 nCount = -1, sal_uInt8 nMapId = 0 ) throw(); void add( PropertyInfoHash &rHash, sal_uInt8 nMapId ) throw(); diff --git a/include/comphelper/PropertyInfoHash.hxx b/include/comphelper/PropertyInfoHash.hxx index 25a1e8daba8d..b0c89a0b4363 100644 --- a/include/comphelper/PropertyInfoHash.hxx +++ b/include/comphelper/PropertyInfoHash.hxx @@ -21,31 +21,30 @@ #define INCLUDED_COMPHELPER_PROPERTYINFOHASH_HXX #include <rtl/ustring.hxx> -#include <comphelper/TypeGeneration.hxx> +#include <com/sun/star/uno/Type.hxx> #include <boost/unordered_map.hpp> namespace comphelper { struct PropertyInfo { - const sal_Char* mpName; - sal_uInt16 mnNameLen; + OUString maName; sal_Int32 mnHandle; - CppuTypes meCppuType; + css::uno::Type maType; sal_Int16 mnAttributes; sal_uInt8 mnMemberId; }; struct PropertyData { sal_uInt8 mnMapId; - PropertyInfo *mpInfo; - PropertyData ( sal_uInt8 nMapId, PropertyInfo *pInfo ) + PropertyInfo const *mpInfo; + PropertyData ( sal_uInt8 nMapId, PropertyInfo const *pInfo ) : mnMapId ( nMapId ) , mpInfo ( pInfo ) {} }; } typedef boost::unordered_map < OUString, - ::comphelper::PropertyInfo*, + ::comphelper::PropertyInfo const *, OUStringHash > PropertyInfoHash; typedef boost::unordered_map < OUString, ::comphelper::PropertyData*, diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 8b7bf4bf7bb9..a9856d90784c 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -435,7 +435,6 @@ #include <com/sun/star/xml/sax/Writer.hpp> #include <comphelper/ChainablePropertySetInfo.hxx> #include <comphelper/MasterPropertySetInfo.hxx> -#include <comphelper/TypeGeneration.hxx> #include <comphelper/accessibleeventnotifier.hxx> #include <comphelper/accessiblekeybindinghelper.hxx> #include <comphelper/accessibletexthelper.hxx> diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx index d21805662132..2ca1fbf9d108 100644 --- a/sw/source/ui/uno/SwXDocumentSettings.cxx +++ b/sw/source/ui/uno/SwXDocumentSettings.cxx @@ -129,97 +129,97 @@ enum SwDocumentSettingsPropertyHandles static MasterPropertySetInfo * lcl_createSettingsInfo() { - static PropertyInfo aWriterSettingsInfoMap[] = + static PropertyInfo const aWriterSettingsInfoMap[] = { - { RTL_CONSTASCII_STRINGPARAM("ForbiddenCharacters"), HANDLE_FORBIDDEN_CHARS, CPPUTYPE_REFFORBCHARS, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("LinkUpdateMode"), HANDLE_LINK_UPDATE_MODE, CPPUTYPE_INT16, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("FieldAutoUpdate"), HANDLE_FIELD_AUTO_UPDATE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ChartAutoUpdate"), HANDLE_CHART_AUTO_UPDATE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("AddParaTableSpacing"), HANDLE_ADD_PARA_TABLE_SPACING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("AddParaTableSpacingAtStart"), HANDLE_ADD_PARA_TABLE_SPACING_AT_START, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("AlignTabStopPosition"), HANDLE_ALIGN_TAB_STOP_POSITION, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("PrinterName"), HANDLE_PRINTER_NAME, CPPUTYPE_OUSTRING, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("PrinterSetup"), HANDLE_PRINTER_SETUP, CPPUTYPE_SEQINT8, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("IsKernAsianPunctuation"), HANDLE_IS_KERN_ASIAN_PUNCTUATION, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("CharacterCompressionType"), HANDLE_CHARACTER_COMPRESSION_TYPE, CPPUTYPE_INT16, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ApplyUserData"), HANDLE_APPLY_USER_DATA, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("SaveGlobalDocumentLinks"), HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("CurrentDatabaseDataSource"), HANDLE_CURRENT_DATABASE_DATA_SOURCE, CPPUTYPE_OUSTRING, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("CurrentDatabaseCommand"), HANDLE_CURRENT_DATABASE_COMMAND, CPPUTYPE_OUSTRING, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("CurrentDatabaseCommandType"), HANDLE_CURRENT_DATABASE_COMMAND_TYPE, CPPUTYPE_INT32, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("SaveVersionOnClose"), HANDLE_SAVE_VERSION_ON_CLOSE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UpdateFromTemplate"), HANDLE_UPDATE_FROM_TEMPLATE, CPPUTYPE_BOOLEAN, 0, 0}, + { OUString("ForbiddenCharacters"), HANDLE_FORBIDDEN_CHARS, cppu::UnoType<css::i18n::XForbiddenCharacters>::get(), 0, 0}, + { OUString("LinkUpdateMode"), HANDLE_LINK_UPDATE_MODE, cppu::UnoType<sal_Int16>::get(), 0, 0}, + { OUString("FieldAutoUpdate"), HANDLE_FIELD_AUTO_UPDATE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ChartAutoUpdate"), HANDLE_CHART_AUTO_UPDATE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("AddParaTableSpacing"), HANDLE_ADD_PARA_TABLE_SPACING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("AddParaTableSpacingAtStart"), HANDLE_ADD_PARA_TABLE_SPACING_AT_START, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("AlignTabStopPosition"), HANDLE_ALIGN_TAB_STOP_POSITION, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("PrinterName"), HANDLE_PRINTER_NAME, cppu::UnoType<OUString>::get(), 0, 0}, + { OUString("PrinterSetup"), HANDLE_PRINTER_SETUP, cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(), 0, 0}, + { OUString("IsKernAsianPunctuation"), HANDLE_IS_KERN_ASIAN_PUNCTUATION, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("CharacterCompressionType"), HANDLE_CHARACTER_COMPRESSION_TYPE, cppu::UnoType<sal_Int16>::get(), 0, 0}, + { OUString("ApplyUserData"), HANDLE_APPLY_USER_DATA, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("SaveGlobalDocumentLinks"), HANDLE_SAVE_GLOBAL_DOCUMENT_LINKS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("CurrentDatabaseDataSource"), HANDLE_CURRENT_DATABASE_DATA_SOURCE, cppu::UnoType<OUString>::get(), 0, 0}, + { OUString("CurrentDatabaseCommand"), HANDLE_CURRENT_DATABASE_COMMAND, cppu::UnoType<OUString>::get(), 0, 0}, + { OUString("CurrentDatabaseCommandType"), HANDLE_CURRENT_DATABASE_COMMAND_TYPE, cppu::UnoType<sal_Int32>::get(), 0, 0}, + { OUString("SaveVersionOnClose"), HANDLE_SAVE_VERSION_ON_CLOSE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UpdateFromTemplate"), HANDLE_UPDATE_FROM_TEMPLATE, cppu::UnoType<bool>::get(), 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("PrinterIndependentLayout"), HANDLE_PRINTER_INDEPENDENT_LAYOUT, CPPUTYPE_INT16, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("IsLabelDocument"), HANDLE_IS_LABEL_DOC, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("AddFrameOffsets"), HANDLE_IS_ADD_FLY_OFFSET, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("AddExternalLeading"), HANDLE_IS_ADD_EXTERNAL_LEADING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UseOldNumbering"), HANDLE_OLD_NUMBERING, CPPUTYPE_BOOLEAN, 0, 0}, // #111955# - { RTL_CONSTASCII_STRINGPARAM("OutlineLevelYieldsNumbering"), HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, CPPUTYPE_BOOLEAN, 0, 0}, + { OUString("PrinterIndependentLayout"), HANDLE_PRINTER_INDEPENDENT_LAYOUT, cppu::UnoType<sal_Int16>::get(), 0, 0}, + { OUString("IsLabelDocument"), HANDLE_IS_LABEL_DOC, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("AddFrameOffsets"), HANDLE_IS_ADD_FLY_OFFSET, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("AddExternalLeading"), HANDLE_IS_ADD_EXTERNAL_LEADING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UseOldNumbering"), HANDLE_OLD_NUMBERING, cppu::UnoType<bool>::get(), 0, 0}, // #111955# + { OUString("OutlineLevelYieldsNumbering"), HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, cppu::UnoType<bool>::get(), 0, 0}, /* Stampit It disable the print cancel button of the shown progress dialog. */ - { RTL_CONSTASCII_STRINGPARAM("AllowPrintJobCancel"), HANDLE_ALLOW_PRINTJOB_CANCEL, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UseFormerLineSpacing"), HANDLE_USE_FORMER_LINE_SPACING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("AddParaSpacingToTableCells"), HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UseFormerObjectPositioning"), HANDLE_USE_FORMER_OBJECT_POSITIONING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UseFormerTextWrapping"), HANDLE_USE_FORMER_TEXT_WRAPPING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("RedlineProtectionKey"), HANDLE_CHANGES_PASSWORD, CPPUTYPE_SEQINT8, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ConsiderTextWrapOnObjPos"), HANDLE_CONSIDER_WRAP_ON_OBJPOS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("IgnoreFirstLineIndentInNumbering"), HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("DoNotJustifyLinesWithManualBreak"), HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("DoNotResetParaAttrsForNumFont"), HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("TableRowKeep"), HANDLE_TABLE_ROW_KEEP, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("IgnoreTabsAndBlanksForLineCalculation"), HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("LoadReadonly"), HANDLE_LOAD_READONLY, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("DoNotCaptureDrawObjsOnPage"), HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ClipAsCharacterAnchoredWriterFlyFrames"), HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UnxForceZeroExtLeading"), HANDLE_UNIX_FORCE_ZERO_EXT_LEADING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UseOldPrinterMetrics"), HANDLE_USE_OLD_PRINTER_METRICS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("TabsRelativeToIndent"), HANDLE_TABS_RELATIVE_TO_INDENT, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("Rsid"), HANDLE_RSID, CPPUTYPE_INT32, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("RsidRoot"), HANDLE_RSID_ROOT, CPPUTYPE_INT32, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ProtectForm"), HANDLE_PROTECT_FORM, CPPUTYPE_BOOLEAN, 0, 0}, + { OUString("AllowPrintJobCancel"), HANDLE_ALLOW_PRINTJOB_CANCEL, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UseFormerLineSpacing"), HANDLE_USE_FORMER_LINE_SPACING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("AddParaSpacingToTableCells"), HANDLE_ADD_PARA_SPACING_TO_TABLE_CELLS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UseFormerObjectPositioning"), HANDLE_USE_FORMER_OBJECT_POSITIONING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UseFormerTextWrapping"), HANDLE_USE_FORMER_TEXT_WRAPPING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("RedlineProtectionKey"), HANDLE_CHANGES_PASSWORD, cppu::UnoType< cppu::UnoSequenceType<sal_Int8> >::get(), 0, 0}, + { OUString("ConsiderTextWrapOnObjPos"), HANDLE_CONSIDER_WRAP_ON_OBJPOS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("IgnoreFirstLineIndentInNumbering"), HANDLE_IGNORE_FIRST_LINE_INDENT_IN_NUMBERING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("DoNotJustifyLinesWithManualBreak"), HANDLE_DO_NOT_JUSTIFY_LINES_WITH_MANUAL_BREAK, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("DoNotResetParaAttrsForNumFont"), HANDLE_DO_NOT_RESET_PARA_ATTRS_FOR_NUM_FONT, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("TableRowKeep"), HANDLE_TABLE_ROW_KEEP, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("IgnoreTabsAndBlanksForLineCalculation"), HANDLE_IGNORE_TABS_AND_BLANKS_FOR_LINE_CALCULATION, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("LoadReadonly"), HANDLE_LOAD_READONLY, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("DoNotCaptureDrawObjsOnPage"), HANDLE_DO_NOT_CAPTURE_DRAW_OBJS_ON_PAGE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ClipAsCharacterAnchoredWriterFlyFrames"), HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UnxForceZeroExtLeading"), HANDLE_UNIX_FORCE_ZERO_EXT_LEADING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UseOldPrinterMetrics"), HANDLE_USE_OLD_PRINTER_METRICS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("TabsRelativeToIndent"), HANDLE_TABS_RELATIVE_TO_INDENT, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("Rsid"), HANDLE_RSID, cppu::UnoType<sal_Int32>::get(), 0, 0}, + { OUString("RsidRoot"), HANDLE_RSID_ROOT, cppu::UnoType<sal_Int32>::get(), 0, 0}, + { OUString("ProtectForm"), HANDLE_PROTECT_FORM, cppu::UnoType<bool>::get(), 0, 0}, // #i89181# - { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, CPPUTYPE_PROPERTYVALUE, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("TabOverflow"), HANDLE_TAB_OVERFLOW, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("UnbreakableNumberings"), HANDLE_UNBREAKABLE_NUMBERINGS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("StylesNoDefault"), HANDLE_STYLES_NODEFAULT, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("FloattableNomargins"), HANDLE_FLOATTABLE_NOMARGINS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ClippedPictures"), HANDLE_CLIPPED_PICTURES, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("BackgroundParaOverDrawings"), HANDLE_BACKGROUND_PARA_OVER_DRAWINGS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("EmbedFonts"), HANDLE_EMBED_FONTS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, CPPUTYPE_BOOLEAN, 0, 0}, + { OUString("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ModifyPasswordInfo"), HANDLE_MODIFYPASSWORDINFO, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), 0, 0}, + { OUString("MathBaselineAlignment"), HANDLE_MATH_BASELINE_ALIGNMENT, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("InvertBorderSpacing"), HANDLE_INVERT_BORDER_SPACING, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("CollapseEmptyCellPara"), HANDLE_COLLAPSE_EMPTY_CELL_PARA, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("SmallCapsPercentage66"), HANDLE_SMALL_CAPS_PERCENTAGE_66, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("TabOverflow"), HANDLE_TAB_OVERFLOW, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("UnbreakableNumberings"), HANDLE_UNBREAKABLE_NUMBERINGS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("StylesNoDefault"), HANDLE_STYLES_NODEFAULT, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("FloattableNomargins"), HANDLE_FLOATTABLE_NOMARGINS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ClippedPictures"), HANDLE_CLIPPED_PICTURES, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("BackgroundParaOverDrawings"), HANDLE_BACKGROUND_PARA_OVER_DRAWINGS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("EmbedFonts"), HANDLE_EMBED_FONTS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("EmbedSystemFonts"), HANDLE_EMBED_SYSTEM_FONTS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("TabOverMargin"), HANDLE_TAB_OVER_MARGIN, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("SurroundTextWrapSmall"), HANDLE_SURROUND_TEXT_WRAP_SMALL, cppu::UnoType<bool>::get(), 0, 0}, /* * As OS said, we don't have a view when we need to set this, so I have to * find another solution before adding them to this property set - MTG - { RTL_CONSTASCII_STRINGPARAM("IsGridVisible"), HANDLE_IS_GRID_VISIBLE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("IsSnapToGrid"), HANDLE_IS_SNAP_TO_GRID, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("IsSynchroniseAxes"), HANDLE_IS_SYNCHRONISE_AXES, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("HorizontalGridResolution"), HANDLE_HORIZONTAL_GRID_RESOLUTION, CPPUTYPE_INT32, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("HorizontalGridSubdivision"), HANDLE_HORIZONTAL_GRID_SUBDIVISION, CPPUTYPE_INT16, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("VerticalGridResolution"), HANDLE_VERTICAL_GRID_RESOLUTION, CPPUTYPE_INT32, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("VerticalGridSubdivision"), HANDLE_VERTICAL_GRID_SUBDIVISION, CPPUTYPE_INT16, 0, 0}, + { OUString("IsGridVisible"), HANDLE_IS_GRID_VISIBLE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("IsSnapToGrid"), HANDLE_IS_SNAP_TO_GRID, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("IsSynchroniseAxes"), HANDLE_IS_SYNCHRONISE_AXES, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("HorizontalGridResolution"), HANDLE_HORIZONTAL_GRID_RESOLUTION, cppu::UnoType<sal_Int32>::get(), 0, 0}, + { OUString("HorizontalGridSubdivision"), HANDLE_HORIZONTAL_GRID_SUBDIVISION, cppu::UnoType<sal_Int16>::get(), 0, 0}, + { OUString("VerticalGridResolution"), HANDLE_VERTICAL_GRID_RESOLUTION, cppu::UnoType<sal_Int32>::get(), 0, 0}, + { OUString("VerticalGridSubdivision"), HANDLE_VERTICAL_GRID_SUBDIVISION, cppu::UnoType<sal_Int16>::get(), 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowParagraphEnd"), HANDLE_SHOW_PARAGRAPH_END, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowOptionalHyphens"), HANDLE_SHOW_OPTIONAL_HYPHENS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowSpaces"), HANDLE_SHOW_SPACES, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowTabs"), HANDLE_SHOW_TABS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowBreaks"), HANDLE_SHOW_BREAKS, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowHiddenText"), HANDLE_SHOW_HIDDEN_TEXT, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowHiddenParagraphs"), HANDLE_SHOW_HIDDEN_PARAGRAPHS, CPPUTYPE_BOOLEAN, 0, 0}, + { OUString("ShowParagraphEnd"), HANDLE_SHOW_PARAGRAPH_END, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowOptionalHyphens"), HANDLE_SHOW_OPTIONAL_HYPHENS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowSpaces"), HANDLE_SHOW_SPACES, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowTabs"), HANDLE_SHOW_TABS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowBreaks"), HANDLE_SHOW_BREAKS, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowHiddenText"), HANDLE_SHOW_HIDDEN_TEXT, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowHiddenParagraphs"), HANDLE_SHOW_HIDDEN_PARAGRAPHS, cppu::UnoType<bool>::get(), 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowTextLimitGuide"), HANDLE_SHOW_TEXT_LIMIT_GUIDE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowTableLimitGuide"), HANDLE_SHOW_TABLE_LIMIT_GUIDE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowSectionLimitGuide"), HANDLE_SHOW_SECTION_LIMIT_GUIDE, CPPUTYPE_BOOLEAN, 0, 0}, - { RTL_CONSTASCII_STRINGPARAM("ShowGuidesWhileMoving"), HANDLE_SHOW_GUIDES_WHILE_MOVING, CPPUTYPE_BOOLEAN, 0, 0}, + { OUString("ShowTextLimitGuide"), HANDLE_SHOW_TEXT_LIMIT_GUIDE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowTableLimitGuide"), HANDLE_SHOW_TABLE_LIMIT_GUIDE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowSectionLimitGuide"), HANDLE_SHOW_SECTION_LIMIT_GUIDE, cppu::UnoType<bool>::get(), 0, 0}, + { OUString("ShowGuidesWhileMoving"), HANDLE_SHOW_GUIDES_WHILE_MOVING, cppu::UnoType<bool>::get(), 0, 0}, */ - { NULL, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } + { OUString(), 0, css::uno::Type(), 0, 0 } }; return new MasterPropertySetInfo ( aWriterSettingsInfoMap ); } @@ -311,7 +311,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException ) { if (rInfo.mnAttributes & PropertyAttribute::READONLY) - throw PropertyVetoException ("Property is read-only: " + OUString::createFromAscii(rInfo.mpName), static_cast < cppu::OWeakObject * > ( 0 ) ); + throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( 0 ) ); switch( rInfo.mnHandle ) { diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx index 2a78e866bc8d..27e0c6f515f6 100644 --- a/sw/source/ui/uno/unomod.cxx +++ b/sw/source/ui/uno/unomod.cxx @@ -34,7 +34,6 @@ #include <vcl/svapp.hxx> #include <com/sun/star/text/NotePrintMode.hpp> #include <doc.hxx> -#include <comphelper/TypeGeneration.hxx> #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/view/DocumentZoomType.hpp> #include <comphelper/ChainablePropertySetInfo.hxx> @@ -117,77 +116,77 @@ enum SwPrintSettingsPropertyHandles static ChainablePropertySetInfo * lcl_createViewSettingsInfo() { - static PropertyInfo aViewSettingsMap_Impl[] = + static PropertyInfo const aViewSettingsMap_Impl[] = { - { RTL_CONSTASCII_STRINGPARAM ( "HelpURL" ), HANDLE_VIEWSET_HELP_URL , CPPUTYPE_OUSTRING, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "HorizontalRulerMetric"),HANDLE_VIEWSET_HORI_RULER_METRIC , CPPUTYPE_INT32, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "IsRasterVisible"), HANDLE_VIEWSET_IS_RASTER_VISIBLE, CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "IsSnapToRaster"), HANDLE_VIEWSET_IS_SNAP_TO_RASTER, CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "IsVertRulerRightAligned"),HANDLE_VIEWSET_VRULER_RIGHT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowContentTips" ), HANDLE_VIEWSET_SHOW_CONTENT_TIPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "RasterResolutionX"), HANDLE_VIEWSET_RASTER_RESOLUTION_X, CPPUTYPE_INT32, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "RasterResolutionY"), HANDLE_VIEWSET_RASTER_RESOLUTION_Y, CPPUTYPE_INT32, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "RasterSubdivisionX"), HANDLE_VIEWSET_RASTER_SUBDIVISION_X, CPPUTYPE_INT32, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "RasterSubdivisionY"), HANDLE_VIEWSET_RASTER_SUBDIVISION_Y, CPPUTYPE_INT32, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowAnnotations" ), HANDLE_VIEWSET_ANNOTATIONS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowBreaks"), HANDLE_VIEWSET_BREAKS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowDrawings"), HANDLE_VIEWSET_DRAWINGS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowFieldCommands"), HANDLE_VIEWSET_FIELD_COMMANDS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowFootnoteBackground"),HANDLE_VIEWSET_FOOTNOTE_BACKGROUND , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowGraphics"), HANDLE_VIEWSET_GRAPHICS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowHiddenCharacters"), HANDLE_VIEWSET_HIDDEN_CHARACTERS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowHiddenParagraphs"), HANDLE_VIEWSET_HIDDEN_PARAGRAPHS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowHiddenText"), HANDLE_VIEWSET_HIDDEN_TEXT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowHoriRuler"), HANDLE_VIEWSET_HRULER , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowHoriScrollBar"), HANDLE_VIEWSET_HSCROLL , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowIndexMarkBackground"),HANDLE_VIEWSET_INDEX_MARK_BACKGROUND, CPPUTYPE_BOOLEAN,PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowNonprintingCharacters"),HANDLE_VIEWSET_NONPRINTING_CHARACTERS, CPPUTYPE_BOOLEAN,PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowOnlineLayout"), HANDLE_VIEWSET_ONLINE_LAYOUT , CPPUTYPE_BOOLEAN, PropertyAttribute::MAYBEVOID, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowParaBreaks"), HANDLE_VIEWSET_PARA_BREAKS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowProtectedSpaces"), HANDLE_VIEWSET_PROTECTED_SPACES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowRulers"), HANDLE_VIEWSET_SHOW_RULER , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowScrollBarTips"), HANDLE_VIEWSET_SCROLLBAR_TIPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowSoftHyphens"), HANDLE_VIEWSET_SOFT_HYPHENS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowSpaces"), HANDLE_VIEWSET_SPACES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowTableBoundaries"), HANDLE_VIEWSET_TABLE_BOUNDARIES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowTables"), HANDLE_VIEWSET_TABLES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowTabstops"), HANDLE_VIEWSET_TABSTOPS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowTextBoundaries"), HANDLE_VIEWSET_TEXT_BOUNDARIES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowTextFieldBackground"),HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND, CPPUTYPE_BOOLEAN,PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowVertRuler"), HANDLE_VIEWSET_VRULER , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ShowVertScrollBar"), HANDLE_VIEWSET_VSCROLL , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "SmoothScrolling"), HANDLE_VIEWSET_SMOOTH_SCROLLING , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "VerticalRulerMetric"), HANDLE_VIEWSET_VERT_RULER_METRIC , CPPUTYPE_INT32, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ZoomType"), HANDLE_VIEWSET_ZOOM_TYPE , CPPUTYPE_INT16, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "ZoomValue"), HANDLE_VIEWSET_ZOOM , CPPUTYPE_INT16, PROPERTY_NONE, 0}, - { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } + { OUString( "HelpURL" ), HANDLE_VIEWSET_HELP_URL , cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0}, + { OUString( "HorizontalRulerMetric"),HANDLE_VIEWSET_HORI_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, + { OUString( "IsRasterVisible"), HANDLE_VIEWSET_IS_RASTER_VISIBLE, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "IsSnapToRaster"), HANDLE_VIEWSET_IS_SNAP_TO_RASTER, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "IsVertRulerRightAligned"),HANDLE_VIEWSET_VRULER_RIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowContentTips" ), HANDLE_VIEWSET_SHOW_CONTENT_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "RasterResolutionX"), HANDLE_VIEWSET_RASTER_RESOLUTION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, + { OUString( "RasterResolutionY"), HANDLE_VIEWSET_RASTER_RESOLUTION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, + { OUString( "RasterSubdivisionX"), HANDLE_VIEWSET_RASTER_SUBDIVISION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, + { OUString( "RasterSubdivisionY"), HANDLE_VIEWSET_RASTER_SUBDIVISION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowAnnotations" ), HANDLE_VIEWSET_ANNOTATIONS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowBreaks"), HANDLE_VIEWSET_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowDrawings"), HANDLE_VIEWSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowFieldCommands"), HANDLE_VIEWSET_FIELD_COMMANDS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowFootnoteBackground"),HANDLE_VIEWSET_FOOTNOTE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowGraphics"), HANDLE_VIEWSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowHiddenCharacters"), HANDLE_VIEWSET_HIDDEN_CHARACTERS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowHiddenParagraphs"), HANDLE_VIEWSET_HIDDEN_PARAGRAPHS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowHiddenText"), HANDLE_VIEWSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowHoriRuler"), HANDLE_VIEWSET_HRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowHoriScrollBar"), HANDLE_VIEWSET_HSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowIndexMarkBackground"),HANDLE_VIEWSET_INDEX_MARK_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE, 0}, + { OUString( "ShowNonprintingCharacters"),HANDLE_VIEWSET_NONPRINTING_CHARACTERS, cppu::UnoType<bool>::get(),PROPERTY_NONE, 0}, + { OUString( "ShowOnlineLayout"), HANDLE_VIEWSET_ONLINE_LAYOUT , cppu::UnoType<bool>::get(), PropertyAttribute::MAYBEVOID, 0}, + { OUString( "ShowParaBreaks"), HANDLE_VIEWSET_PARA_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowProtectedSpaces"), HANDLE_VIEWSET_PROTECTED_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowRulers"), HANDLE_VIEWSET_SHOW_RULER , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowScrollBarTips"), HANDLE_VIEWSET_SCROLLBAR_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowSoftHyphens"), HANDLE_VIEWSET_SOFT_HYPHENS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowSpaces"), HANDLE_VIEWSET_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowTableBoundaries"), HANDLE_VIEWSET_TABLE_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowTables"), HANDLE_VIEWSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowTabstops"), HANDLE_VIEWSET_TABSTOPS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowTextBoundaries"), HANDLE_VIEWSET_TEXT_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowTextFieldBackground"),HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE, 0}, + { OUString( "ShowVertRuler"), HANDLE_VIEWSET_VRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "ShowVertScrollBar"), HANDLE_VIEWSET_VSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "SmoothScrolling"), HANDLE_VIEWSET_SMOOTH_SCROLLING , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "VerticalRulerMetric"), HANDLE_VIEWSET_VERT_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE, 0}, + { OUString( "ZoomType"), HANDLE_VIEWSET_ZOOM_TYPE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0}, + { OUString( "ZoomValue"), HANDLE_VIEWSET_ZOOM , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; return new ChainablePropertySetInfo ( aViewSettingsMap_Impl ); } static ChainablePropertySetInfo * lcl_createPrintSettingsInfo() { - static PropertyInfo aPrintSettingsMap_Impl[] = + static PropertyInfo const aPrintSettingsMap_Impl[] = { - { RTL_CONSTASCII_STRINGPARAM ( "PrintAnnotationMode" ), HANDLE_PRINTSET_ANNOTATION_MODE , CPPUTYPE_INT16, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintBlackFonts" ), HANDLE_PRINTSET_BLACK_FONTS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintControls" ), HANDLE_PRINTSET_CONTROLS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintDrawings" ), HANDLE_PRINTSET_DRAWINGS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintGraphics" ), HANDLE_PRINTSET_GRAPHICS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintHiddenText"), HANDLE_PRINTSET_HIDDEN_TEXT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintLeftPages" ), HANDLE_PRINTSET_LEFT_PAGES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintPageBackground" ), HANDLE_PRINTSET_PAGE_BACKGROUND , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintProspect" ), HANDLE_PRINTSET_PROSPECT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintProspectRTL" ), HANDLE_PRINTSET_PROSPECT_RTL , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintReversed" ), HANDLE_PRINTSET_REVERSED , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintRightPages" ), HANDLE_PRINTSET_RIGHT_PAGES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintFaxName" ), HANDLE_PRINTSET_FAX_NAME , CPPUTYPE_OUSTRING, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintPaperFromSetup" ), HANDLE_PRINTSET_PAPER_FROM_SETUP , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintTables" ), HANDLE_PRINTSET_TABLES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintTextPlaceholder"), HANDLE_PRINTSET_PLACEHOLDER , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintSingleJobs" ), HANDLE_PRINTSET_SINGLE_JOBS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { RTL_CONSTASCII_STRINGPARAM ( "PrintEmptyPages" ), HANDLE_PRINTSET_EMPTY_PAGES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0}, - { 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 } + { OUString( "PrintAnnotationMode" ), HANDLE_PRINTSET_ANNOTATION_MODE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintBlackFonts" ), HANDLE_PRINTSET_BLACK_FONTS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintControls" ), HANDLE_PRINTSET_CONTROLS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintDrawings" ), HANDLE_PRINTSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintGraphics" ), HANDLE_PRINTSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintHiddenText"), HANDLE_PRINTSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintLeftPages" ), HANDLE_PRINTSET_LEFT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintPageBackground" ), HANDLE_PRINTSET_PAGE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintProspect" ), HANDLE_PRINTSET_PROSPECT , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintProspectRTL" ), HANDLE_PRINTSET_PROSPECT_RTL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintReversed" ), HANDLE_PRINTSET_REVERSED , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintRightPages" ), HANDLE_PRINTSET_RIGHT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintFaxName" ), HANDLE_PRINTSET_FAX_NAME , cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintPaperFromSetup" ), HANDLE_PRINTSET_PAPER_FROM_SETUP , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintTables" ), HANDLE_PRINTSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintTextPlaceholder"), HANDLE_PRINTSET_PLACEHOLDER , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintSingleJobs" ), HANDLE_PRINTSET_SINGLE_JOBS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString( "PrintEmptyPages" ), HANDLE_PRINTSET_EMPTY_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; return new ChainablePropertySetInfo ( aPrintSettingsMap_Impl ); } |