diff options
author | Noel Power <noel.power@suse.com> | 2013-04-17 17:08:59 +0100 |
---|---|---|
committer | Noel Power <noel.power@suse.com> | 2013-04-17 17:39:39 +0100 |
commit | 474362028e13f98e73ea9420834a1aaa3490fd83 (patch) | |
tree | c36f6e33106e5b25e158e25b2d31a91331284885 /oox/inc | |
parent | fd1d0c1817abb98cda6423b4d299d6a9ebc25ab9 (diff) |
implement MultiPage, Page & TabStrip import for oox
Change-Id: I1912c9550c12a971fcc7fdbc8bd623f18ccc40b8
(cherry picked from commit a43cc9ec8dde4f311bcf8ff96e6a26d56b2abdcf)
Change-Id: I9d31017ab149ed8a4c80feefc891dc6c911bad20
Diffstat (limited to 'oox/inc')
-rw-r--r-- | oox/inc/oox/ole/axbinaryreader.hxx | 20 | ||||
-rw-r--r-- | oox/inc/oox/ole/axcontrol.hxx | 50 |
2 files changed, 58 insertions, 12 deletions
diff --git a/oox/inc/oox/ole/axbinaryreader.hxx b/oox/inc/oox/ole/axbinaryreader.hxx index d63ccb133e4e..4a03f8a56a14 100644 --- a/oox/inc/oox/ole/axbinaryreader.hxx +++ b/oox/inc/oox/ole/axbinaryreader.hxx @@ -87,7 +87,7 @@ private: typedef ::std::pair< sal_Int32, sal_Int32 > AxPairData; /** An array of string values as a property. */ -typedef ::std::vector< ::rtl::OUString > AxStringArray; +typedef ::std::vector< ::rtl::OUString > AxArrayString; // ============================================================================ @@ -111,7 +111,10 @@ public: void readPairProperty( AxPairData& orPairData ); /** Reads the next string property from the stream, if the respective flag in the property mask is set. */ - void readStringProperty( ::rtl::OUString& orValue ); + void readStringProperty( OUString& orValue ); + /** Reads ArrayString, an array of fmString ( compressed or uncompressed ) + is read from the stream and inserted into rStrings */ + void readArrayStringProperty( std::vector< OUString >& rStrings ); /** Reads the next GUID property from the stream, if the respective flag in the property mask is set. The GUID will be enclosed in braces. */ void readGuidProperty( ::rtl::OUString& orGuid ); @@ -135,6 +138,9 @@ public: /** Skips the next string property in the stream, if the respective flag in the property mask is set. */ inline void skipStringProperty() { readStringProperty( maDummyString ); } + /** Skips the next ArrayString property in the stream, if the respective flag in + the property mask is set. */ + inline void skipArrayStringProperty() { readArrayStringProperty( maDummyArrayString ); } /** Skips the next GUID property in the stream, if the respective flag in the property mask is set. */ inline void skipGuidProperty() { readGuidProperty( maDummyString ); } @@ -185,11 +191,11 @@ private: }; /** Complex property for an array of strings. */ - struct StringArrayProperty : public ComplexProperty + struct ArrayStringProperty : public ComplexProperty { - AxStringArray& mrArray; + AxArrayString& mrArray; sal_uInt32 mnSize; - inline explicit StringArrayProperty( AxStringArray& rArray, sal_uInt32 nSize ) : + inline explicit ArrayStringProperty( AxArrayString& rArray, sal_uInt32 nSize ) : mrArray( rArray ), mnSize( nSize ) {} virtual bool readProperty( AxAlignedInputStream& rInStrm ); }; @@ -233,8 +239,8 @@ private: AxPairData maDummyPairData; ///< Dummy pair for unsupported properties. AxFontData maDummyFontData; ///< Dummy font for unsupported properties. StreamDataSequence maDummyPicData; ///< Dummy picture for unsupported properties. - ::rtl::OUString maDummyString; ///< Dummy string for unsupported properties. - AxStringArray maDummyStringArray; ///< Dummy string array for unsupported properties. + OUString maDummyString; ///< Dummy string for unsupported properties. + AxArrayString maDummyArrayString; ///< Dummy strings for unsupported ArrayString properties. sal_Int64 mnPropFlags; ///< Flags specifying existing properties. sal_Int64 mnNextProp; ///< Next property to read. sal_Int64 mnPropsEnd; ///< End position of simple/large properties. diff --git a/oox/inc/oox/ole/axcontrol.hxx b/oox/inc/oox/ole/axcontrol.hxx index 9e002783e64a..1f4b6408af65 100644 --- a/oox/inc/oox/ole/axcontrol.hxx +++ b/oox/inc/oox/ole/axcontrol.hxx @@ -157,13 +157,13 @@ enum ApiControlType API_CONTROL_COMBOBOX, API_CONTROL_SPINBUTTON, API_CONTROL_SCROLLBAR, - API_CONTROL_TABSTRIP, + API_CONTROL_TABSTRIP, //11 API_CONTROL_PROGRESSBAR, API_CONTROL_GROUPBOX, - API_CONTROL_FRAME, - API_CONTROL_PAGE, - API_CONTROL_MULTIPAGE, - API_CONTROL_DIALOG + API_CONTROL_FRAME, // 14 + API_CONTROL_PAGE, // 15 + API_CONTROL_MULTIPAGE, // 16 + API_CONTROL_DIALOG // 17 }; // ============================================================================ @@ -601,6 +601,24 @@ private: bool mbPicTiling; ///< True = picture is repeated. }; +class OOX_DLLPUBLIC AxTabStripModel : public AxFontDataModel +{ +public: + explicit AxTabStripModel(); + + virtual bool importBinaryModel( BinaryInputStream& rInStrm ); + + virtual ApiControlType getControlType() const; + +public: + sal_uInt32 mnListIndex; + sal_uInt32 mnTabStyle; + sal_uInt32 mnTabData; + sal_uInt32 mnVariousPropertyBits; + std::vector< ::rtl::OUString > maItems; // captions for each tab + std::vector< ::rtl::OUString > maTabNames; // names for each tab +}; + // ============================================================================ /** Base class for a Forms 2.0 morph data control. */ @@ -854,6 +872,28 @@ public: virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const; }; +class OOX_DLLPUBLIC AxPageModel : public AxContainerModelBase +{ +public: + explicit AxPageModel(); + + virtual ApiControlType getControlType() const; + virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const; +}; + +class OOX_DLLPUBLIC AxMultiPageModel : public AxContainerModelBase +{ +public: + explicit AxMultiPageModel(); + + virtual ApiControlType getControlType() const; + virtual bool importPageAndMultiPageProperties( BinaryInputStream& rInStrm, sal_Int32 nPages ); + virtual void convertProperties( PropertyMap& rPropMap, const ControlConverter& rConv ) const; + std::vector<sal_uInt32> mnIDs; + sal_uInt32 mnActiveTab; + sal_uInt32 mnTabStyle; +}; + // ============================================================================ |