diff options
Diffstat (limited to 'oox/inc/oox/dump')
-rw-r--r-- | oox/inc/oox/dump/dffdumper.hxx | 7 | ||||
-rw-r--r-- | oox/inc/oox/dump/dumperbase.hxx | 37 |
2 files changed, 37 insertions, 7 deletions
diff --git a/oox/inc/oox/dump/dffdumper.hxx b/oox/inc/oox/dump/dffdumper.hxx index 7a4177cfc104..f229c19eff8c 100644 --- a/oox/inc/oox/dump/dffdumper.hxx +++ b/oox/inc/oox/dump/dffdumper.hxx @@ -59,10 +59,15 @@ protected: private: void constructDffObj(); + sal_uInt32 dumpDffSimpleColor( const String& rName ); + sal_uInt32 dumpDffColor( const String& rName ); + + void dumpDffOpt(); sal_uInt16 dumpDffOptPropHeader(); - void dumpDffOptPropValue( sal_uInt16 nPropId, sal_uInt32 nValue ); private: + ItemFormatMap maSimpleProps; + ItemFormatMap maComplexProps; sal_uInt16 mnInstVer; sal_Int32 mnRealSize; }; diff --git a/oox/inc/oox/dump/dumperbase.hxx b/oox/inc/oox/dump/dumperbase.hxx index b7a46ca71da7..ecca5751c16c 100644 --- a/oox/inc/oox/dump/dumperbase.hxx +++ b/oox/inc/oox/dump/dumperbase.hxx @@ -101,6 +101,9 @@ const sal_Unicode OOX_DUMP_EMPTYVALUE = '~'; const sal_Unicode OOX_DUMP_CMDPROMPT = '?'; const sal_Unicode OOX_DUMP_PLACEHOLDER = '\x01'; +typedef ::std::pair< ::rtl::OUString, ::rtl::OUString > OUStringPair; +typedef ::std::pair< sal_Int64, sal_Int64 > Int64Pair; + typedef ::std::vector< ::rtl::OUString > OUStringVector; typedef ::std::vector< sal_Int64 > Int64Vector; @@ -406,6 +409,7 @@ public: // string conversion ------------------------------------------------------ static ::rtl::OUString trimSpaces( const ::rtl::OUString& rStr ); + static ::rtl::OUString trimTrailingNul( const ::rtl::OUString& rStr ); static ::rtl::OString convertToUtf8( const ::rtl::OUString& rStr ); static DataType convertToDataType( const ::rtl::OUString& rStr ); @@ -418,6 +422,8 @@ public: static bool convertStringToDouble( double& orfData, const ::rtl::OUString& rData ); static bool convertStringToBool( const ::rtl::OUString& rData ); + static OUStringPair convertStringToPair( const ::rtl::OUString& rString, sal_Unicode cSep = '=' ); + // string to list conversion ---------------------------------------------- static void convertStringToStringList( OUStringVector& orVec, const ::rtl::OUString& rData, bool bIgnoreEmpty ); @@ -764,10 +770,10 @@ class FlagsList : public NameListBase public: explicit FlagsList( const SharedConfigData& rCfgData ); + /** Returns the flags to be ignored on output. */ + inline sal_Int64 getIgnoreFlags() const { return mnIgnore; } /** Sets flags to be ignored on output. */ - template< typename Type > - inline void setIgnoreFlags( Type nIgnore ) - { mnIgnore = static_cast< sal_Int64 >( nIgnore ); } + inline void setIgnoreFlags( sal_Int64 nIgnore ) { mnIgnore = nIgnore; } protected: virtual void implProcessConfigItemStr( @@ -804,12 +810,20 @@ protected: virtual void implIncludeList( const NameListBase& rList ); private: + struct ExtItemFormatKey + { + sal_Int64 mnKey; + Int64Pair maFilter; + inline explicit ExtItemFormatKey( sal_Int64 nKey ) : mnKey( nKey ), maFilter( 0, 0 ) {} + bool operator<( const ExtItemFormatKey& rRight ) const; + + }; struct ExtItemFormat : public ItemFormat { bool mbShiftValue; inline explicit ExtItemFormat() : mbShiftValue( true ) {} }; - typedef ::std::map< sal_Int64, ExtItemFormat > ExtItemFormatMap; + typedef ::std::map< ExtItemFormatKey, ExtItemFormat > ExtItemFormatMap; ExtItemFormatMap maFmtMap; }; @@ -859,6 +873,17 @@ private: static const NameListWrapper NO_LIST; // ============================================================================ + +class ItemFormatMap : public ::std::map< sal_Int64, ItemFormat > +{ +public: + inline explicit ItemFormatMap() {} + inline explicit ItemFormatMap( const NameListRef& rxNameList ) { insertFormats( rxNameList ); } + + void insertFormats( const NameListRef& rxNameList ); +}; + +// ============================================================================ // ============================================================================ class SharedConfigData : public Base, public ConfigItemBase @@ -1582,8 +1607,8 @@ protected: sal_Unicode dumpChar( const String& rName, rtl_TextEncoding eTextEnc ); sal_Unicode dumpUnicode( const String& rName ); - ::rtl::OUString dumpCharArray( const String& rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc ); - ::rtl::OUString dumpUnicodeArray( const String& rName, sal_Int32 nLen ); + ::rtl::OUString dumpCharArray( const String& rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc, bool bHideTrailingNul = false ); + ::rtl::OUString dumpUnicodeArray( const String& rName, sal_Int32 nLen, bool bHideTrailingNul = false ); ::rtl::OUString dumpNullCharArray( const String& rName, rtl_TextEncoding eTextEnc ); ::rtl::OUString dumpNullUnicodeArray( const String& rName ); |