diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx index 4f1381749a55..b98f5dc85147 100644 --- a/filter/inc/filter/msfilter/escherex.hxx +++ b/filter/inc/filter/msfilter/escherex.hxx @@ -28,7 +28,9 @@ #ifndef _SVX_ESCHEREX_HXX #define _SVX_ESCHEREX_HXX +#include #include +#include #include #include #include @@ -945,13 +947,13 @@ enum ESCHER_LineCap #define ESCHER_Persist_PrivateEntry 0x80000000 #define ESCHER_Persist_Dgg 0x00010000 -#define ESCHER_Persist_Dgg_FIDCL 0x00010001 #define ESCHER_Persist_Dg 0x00020000 -#define ESCHER_Persist_BlibStoreContainer 0x00030000 #define ESCHER_Persist_CurrentPosition 0x00040000 #define ESCHER_Persist_Grouping_Snap 0x00050000 #define ESCHER_Persist_Grouping_Logic 0x00060000 +const sal_uInt32 DFF_DGG_CLUSTER_SIZE = 0x00000400; /// Shape IDs per cluster in DGG atom. + // --------------------------------------------------------------------------------------------- namespace com { namespace sun { namespace star { @@ -961,6 +963,7 @@ namespace com { namespace sun { namespace star { namespace drawing { struct EnhancedCustomShapeAdjustmentValue; class XShape; + class XShapes; } }}} @@ -1030,13 +1033,11 @@ struct EscherPersistEntry // --------------------------------------------------------------------------------------------- -class SvMemoryStream; class EscherBlibEntry { friend class EscherGraphicProvider; friend class EscherEx; - friend class _EscherEx; protected: @@ -1344,52 +1345,137 @@ public: }; +// ============================================================================ + +/** Instance for global DFF data, shared through various instances of EscherEx. */ +class MSFILTER_DLLPUBLIC EscherExGlobal : public EscherGraphicProvider +{ +public: + explicit EscherExGlobal( sal_uInt32 nGraphicProvFlags = _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES ); + virtual ~EscherExGlobal(); + + /** Returns a new drawing ID for a new drawing container (DGCONTAINER). */ + sal_uInt32 GenerateDrawingId(); + /** Creates and returns a new shape identifier, updates the internal shape + counters and registers the identifier in the DGG cluster table. + @param nDrawingId Drawing identifier has to be passed to be able to + generate shape identifiers for multiple drawings simultaniously. */ + sal_uInt32 GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpgr ); + /** Returns the number of shapes in the current drawing, based on number of + calls to the GenerateShapeId() function. */ + sal_uInt32 GetDrawingShapeCount( sal_uInt32 nDrawingId ) const; + /** Returns the last shape identifier generated by the GenerateShapeId() + function. */ + sal_uInt32 GetLastShapeId( sal_uInt32 nDrawingId ) const; + + /** Sets the flag indicating that the DGGCONTAINER exists. */ + inline void SetDggContainer() { mbHasDggCont = true; } + /** Sets the flag indicating that the DGGCONTAINER exists. */ + inline bool HasDggContainer() const { return mbHasDggCont; } + /** Returns the total size of the DGG atom (including header). */ + sal_uInt32 GetDggAtomSize() const; + /** Writes the complete DGG atom to the passed stream (overwrites existing data!). */ + void WriteDggAtom( SvStream& rStrm ) const; + + /** Called if a picture shall be written and no picture stream is set at + class ImplEscherExSdr. + + On first invokation, this function calls the virtual member function + ImplQueryPictureStream(). The return value will be cached internally + for subsequent calls and for the GetPictureStream() function. + */ + SvStream* QueryPictureStream(); + + /** Returns the picture stream if existing (queried), otherwise null. */ + inline SvStream* GetPictureStream() { return mpPicStrm; } + +private: + /** Derived classes may implement to create a new stream used to store the + picture data. + + The implementation has to take care about lifetime of the returned + stream (it will not be destructed automatically). This function is + called exactly once. The return value will be cached internally for + repeated calls of the public QueryPictureStream() function. + */ + virtual SvStream* ImplQueryPictureStream(); + +private: + struct ClusterEntry + { + sal_uInt32 mnDrawingId; /// Identifier of drawing this cluster belongs to (one-based index into maDrawingInfos). + sal_uInt32 mnNextShapeId; /// Next free shape identifier in this cluster. + inline explicit ClusterEntry( sal_uInt32 nDrawingId ) : mnDrawingId( nDrawingId ), mnNextShapeId( 0 ) {} + }; + typedef ::std::vector< ClusterEntry > ClusterTable; + + struct DrawingInfo + { + sal_uInt32 mnClusterId; /// Currently used cluster (one-based index into maClusterTable). + sal_uInt32 mnShapeCount; /// Current number of shapes in this drawing. + sal_uInt32 mnLastShapeId; /// Last shape identifier generated for this drawing. + inline explicit DrawingInfo( sal_uInt32 nClusterId ) : mnClusterId( nClusterId ), mnShapeCount( 0 ), mnLastShapeId( 0 ) {} + }; + typedef ::std::vector< DrawingInfo > DrawingInfoVector; + + ClusterTable maClusterTable; /// List with cluster IDs (used object IDs in drawings). + DrawingInfoVector maDrawingInfos; /// Data about all used drawings. + SvStream* mpPicStrm; /// Cached result of ImplQueryPictureStream(). + bool mbHasDggCont; /// True = the DGGCONTAINER has been initialized. + bool mbPicStrmQueried; /// True = ImplQueryPictureStream() has been called. +}; + +typedef ::boost::shared_ptr< EscherExGlobal > EscherExGlobalRef; + // --------------------------------------------------------------------------------------------- class SdrObject; class SdrPage; class ImplEscherExSdr; -class Color; -class Graphic; -class SvMemoryStream; -class SvStream; - -class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicProvider +class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable { - protected : + protected: + typedef ::std::auto_ptr< ImplEscherExSdr > ImplEscherExSdrPtr; + EscherExGlobalRef mxGlobal; + ImplEscherExSdrPtr mpImplEscherExSdr; SvStream* mpOutStrm; - ImplEscherExSdr* mpImplEscherExSdr; UINT32 mnStrmStartOfs; std::vector< sal_uInt32 > mOffsets; std::vector< sal_uInt16 > mRecTypes; - UINT32 mnDrawings; - UINT32 mnFIDCLs; // anzahl der cluster ID's - UINT32 mnCurrentDg; - UINT32 mnCurrentShapeID; // die naechste freie ID - UINT32 mnCurrentShapeMaximumID; // die hoechste und auch benutzte ID - UINT32 mnTotalShapesDg; // anzahl der shapes im Dg - UINT32 mnTotalShapeIdUsedDg; // anzahl der benutzten shape Id's im Dg - UINT32 mnTotalShapesDgg; // anzahl der shapes im Dgg UINT32 mnCountOfs; UINT32 mnGroupLevel; UINT16 mnHellLayerId; BOOL mbEscherSpgr; - BOOL mbEscherDgg; BOOL mbEscherDg; BOOL mbOleEmf; // OLE is EMF instead of WMF virtual BOOL DoSeek( UINT32 nKey ); - public: +public: + explicit EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm ); + virtual ~EscherEx(); - EscherEx( SvStream& rOut, UINT32 nDrawings ); + /** Creates and returns a new shape identifier, updates the internal shape + counters and registers the identifier in the DGG cluster table. */ + inline sal_uInt32 GenerateShapeId() { return mxGlobal->GenerateShapeId( mnCurrentDg, mbEscherSpgr ); } + + /** Returns the graphic provider from the global object that has been + passed to the constructor. + */ + inline EscherGraphicProvider& + GetGraphicProvider() { return *mxGlobal; } + + /** Called if a picture shall be written and no picture stream is set at + class ImplEscherExSdr. + */ + inline SvStream* QueryPictureStream() { return mxGlobal->QueryPictureStream(); } /// Fuegt in den EscherStream interne Daten ein, dieser Vorgang /// darf und muss nur einmal ausgefuehrt werden. @@ -1398,14 +1484,29 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap /// gemerged, wie es fuer Excel (und Word?) benoetigt wird. virtual void Flush( SvStream* pPicStreamMergeBSE = NULL ); - virtual ~EscherEx(); + /** Inserts the passed number of bytes at the current position of the + output stream. - // Application may overload this function to maintain an offset - // table for specific regions but MUST call this function too. - virtual void InsertAtCurrentPos( UINT32 nBytes, BOOL bCont = FALSE );// es werden nBytes an der aktuellen Stream Position eingefuegt, - // die PersistantTable und interne Zeiger angepasst + Inserts dummy bytes and moves all following stream data, and updates + all internal stream offsets stored in the PersistTable and the affected + container sizes, which makes this operation very expensive. (!) + + @param nBytes The number of bytes to be inserted into the stream. + + @param bExpandEndOfAtom If set to true, an atom that currently ends + exactly at the current stream position will be expanded to include + the inserted data. If set to false, an atom that currently ends + exactly at the current stream position will not be expanded to + include the inserted data (used to insert e.g. a new atom after an + existing atom). Note that containers that end exactly at the + current stream position are always expanded to include the inserted + data. + */ + void InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom ); void InsertPersistOffset( UINT32 nKey, UINT32 nOffset ); // Es wird nicht geprueft, ob sich jener schluessel schon in der PersistantTable befindet + void ReplacePersistOffset( UINT32 nKey, UINT32 nOffset ); + UINT32 GetPersistOffset( UINT32 nKey ); BOOL SeekToPersistOffset( UINT32 nKey ); virtual BOOL InsertAtPersistOffset( UINT32 nKey, UINT32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die // aktuelle StreamPosition aendert @@ -1440,21 +1541,16 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap // ein ESCHER_Sp wird geschrieben ( Ein ESCHER_DgContainer muss dazu geoeffnet sein !!) virtual void AddShape( UINT32 nShpInstance, UINT32 nFlagIds, UINT32 nShapeID = 0 ); - // reserviert eine ShapeId - UINT32 GetShapeID(); virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect ); UINT32 GetColor( const UINT32 nColor, BOOL bSwap = TRUE ); UINT32 GetColor( const Color& rColor, BOOL bSwap = TRUE ); - // OLE is written as EMF instead of WMF (default WMF) - void SetOleEmf( BOOL bVal ) { mbOleEmf = bVal; } - BOOL IsOleEmf() const { return mbOleEmf; } - // ...Sdr... implemented in eschesdo.cxx void AddSdrPage( const SdrPage& rPage ); + void AddUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes ); /// returns the ShapeID UINT32 AddSdrObject( const SdrObject& rObj ); @@ -1467,7 +1563,9 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap /// Called before a shape is written, application supplies /// ClientRecords. May set AppData::bDontWriteShape so the /// shape is ignored. - virtual EscherExHostAppData* StartShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape ); + virtual EscherExHostAppData* StartShape( + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape, + const Rectangle* pChildAnchor ); /// Called after a shape is written to inform the application /// of the resulted shape type and ID. @@ -1491,10 +1589,6 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap /// the same functionality as an ordinary recursive group. virtual EscherExHostAppData* EnterAdditionalTextGroup(); - /// Called if a picture shall be written and no PicStream is - /// set at ImplEscherExSdr - virtual SvStream* QueryPicStream(); - /// Called if an ESCHER_Prop_lTxid shall be written virtual UINT32 QueryTextID( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >&, UINT32 nShapeId ); // add an dummy rectangle shape into the escher stream @@ -1504,6 +1598,14 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap void SetHellLayerId( UINT16 nId ) { mnHellLayerId = nId; } UINT16 GetHellLayerId() const { return mnHellLayerId; } + +private: + EscherEx( const EscherEx& ); + EscherEx& operator=( const EscherEx& ); + + // prevent C-style cast to former base class EscherGraphicProvider + operator EscherGraphicProvider&(); + operator EscherGraphicProvider const&(); }; diff --git a/filter/qa/complex/filter/detection/typeDetection/makefile.mk b/filter/qa/complex/filter/detection/typeDetection/makefile.mk index bbc25efa3c29..942c40372de4 100644 --- a/filter/qa/complex/filter/detection/typeDetection/makefile.mk +++ b/filter/qa/complex/filter/detection/typeDetection/makefile.mk @@ -81,10 +81,6 @@ CT_APP = org.openoffice.Runner $(CLASSDIR)$/$(PACKAGE)$/files.csv : ALLDEP .ENDIF - -TST: - @echo "$(USE_SHELL)" - .INCLUDE : target.mk $(CLASSDIR)$/$(PACKAGE)$/preselectedFilter.csv : preselectedFilter.csv @@ -109,16 +105,9 @@ $(CLASSDIR)$/$(PACKAGE)$/TypeDetection.props : TypeDetection.props # --- chmod -------------------------------------------------------- -.IF "$(USE_SHELL)" != "4nt" CHMOD : chmod 444 $(CLASSDIR)$/$(PACKAGE)$/*.csv chmod 666 $(CLASSDIR)$/$(PACKAGE)$/*.props -.ELSE -CHMOD : - echo erstmanix -.ENDIF - - RUN: run diff --git a/filter/source/config/cache/exports.map b/filter/source/config/cache/exports.map deleted file mode 100644 index 85610ad80888..000000000000 --- a/filter/source/config/cache/exports.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/filter/source/config/cache/lateinitlistener.cxx b/filter/source/config/cache/lateinitlistener.cxx index feaf7f645efc..b9b090025227 100644 --- a/filter/source/config/cache/lateinitlistener.cxx +++ b/filter/source/config/cache/lateinitlistener.cxx @@ -56,7 +56,7 @@ LateInitListener::LateInitListener(const css::uno::Reference< css::lang::XMultiS // important to do so ... // Otherwhise the temp. reference to ourselves // will kill us at realeasing time! - ++m_refCount; + osl_incrementInterlockedCount( &m_refCount ); m_xBroadcaster = css::uno::Reference< css::document::XEventBroadcaster >( m_xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster")), @@ -64,7 +64,7 @@ LateInitListener::LateInitListener(const css::uno::Reference< css::lang::XMultiS m_xBroadcaster->addEventListener(static_cast< css::document::XEventListener* >(this)); - --m_refCount; + osl_decrementInterlockedCount( &m_refCount ); } /*----------------------------------------------- @@ -92,6 +92,16 @@ void SAL_CALL LateInitListener::notifyEvent(const css::document::EventObject& aE // SAFE -> ::osl::ResettableMutexGuard aLock(m_aLock); + if ( !m_xBroadcaster.is() ) + // the beauty of multi-threading ... OnLoad can be notified synchronously or asynchronously. In particular, + // SFX-based documents notify it synchronously, database documents do it asynchronously. + // Now if multiple documents are opened "at the same time", it is well possible that we get two events from + // different threads, where upon the first event, we already remove ourself from m_xBroadcaster, and start + // the thread, nonetheless there's also a second notification "in the queue", which will arrive short + // thereafter. + // In such a case, simply ignore this second event. + return; + m_xBroadcaster->removeEventListener(static_cast< css::document::XEventListener* >(this)); m_xBroadcaster.clear(); diff --git a/filter/source/config/cache/makefile.mk b/filter/source/config/cache/makefile.mk index 62eb4353fcf3..fbc4806b0a32 100644 --- a/filter/source/config/cache/makefile.mk +++ b/filter/source/config/cache/makefile.mk @@ -72,7 +72,7 @@ DEF1NAME= $(SHL1TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) -SHL1VERSIONMAP= exports.map +SHL1VERSIONMAP= $(SOLARENV)/src/component.map # --- Targets ---------------------------------- diff --git a/filter/source/config/fragments/filters/HTML__StarCalc_.xcu b/filter/source/config/fragments/filters/HTML__StarCalc_.xcu index f691055e00cf..01d88c818c09 100644 --- a/filter/source/config/fragments/filters/HTML__StarCalc_.xcu +++ b/filter/source/config/fragments/filters/HTML__StarCalc_.xcu @@ -1,6 +1,6 @@ - IMPORT EXPORT ALIEN - + IMPORT EXPORT ALIEN USEOPTIONS + com.sun.star.comp.Calc.FilterOptionsDialog 0 diff --git a/filter/source/config/fragments/filters/calc_HTML_WebQuery.xcu b/filter/source/config/fragments/filters/calc_HTML_WebQuery.xcu index 1a3aa01e5717..8808adc140a1 100644 --- a/filter/source/config/fragments/filters/calc_HTML_WebQuery.xcu +++ b/filter/source/config/fragments/filters/calc_HTML_WebQuery.xcu @@ -1,6 +1,6 @@ - IMPORT ALIEN - + IMPORT ALIEN USEOPTIONS + com.sun.star.comp.Calc.FilterOptionsDialog 0 diff --git a/filter/source/config/fragments/filters/writerglobal8_writer.xcu b/filter/source/config/fragments/filters/writerglobal8_writer.xcu index cd19313777df..f61bbeeea958 100644 --- a/filter/source/config/fragments/filters/writerglobal8_writer.xcu +++ b/filter/source/config/fragments/filters/writerglobal8_writer.xcu @@ -1,5 +1,5 @@ - EXPORT TEMPLATE + EXPORT TEMPLATE DEFAULT CXML diff --git a/filter/source/config/fragments/makefile.mk b/filter/source/config/fragments/makefile.mk index 71bd6ca2b6e6..d827b3496359 100644 --- a/filter/source/config/fragments/makefile.mk +++ b/filter/source/config/fragments/makefile.mk @@ -187,7 +187,7 @@ MERGE:=python ../tools/merge/pyAltFCFGMerge MERGE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/python ../tools/merge/pyAltFCFGMerge .ENDIF .ELSE -MERGE := $(JAVAI) -jar $(SOLARBINDIR)$/FCFGMerge.jar +MERGE := $(JAVAI) $(JAVAIFLAGS) -jar $(SOLARBINDIR)$/FCFGMerge.jar .ENDIF PACKLANG := $(XSLTPROC) --nonet diff --git a/filter/source/config/fragments/types/pcd_Photo_CD_Base.xcu b/filter/source/config/fragments/types/pcd_Photo_CD_Base.xcu index dba3845285d7..2888c0f0ba46 100644 --- a/filter/source/config/fragments/types/pcd_Photo_CD_Base.xcu +++ b/filter/source/config/fragments/types/pcd_Photo_CD_Base.xcu @@ -2,7 +2,7 @@ com.sun.star.comp.draw.FormatDetector pcd - image/x-photo-cd> + image/x-photo-cd false draw_PCD_Photo_CD_Base diff --git a/filter/source/config/fragments/types/pcd_Photo_CD_Base16.xcu b/filter/source/config/fragments/types/pcd_Photo_CD_Base16.xcu index bb0a97823c32..e7bcee7e4c4c 100644 --- a/filter/source/config/fragments/types/pcd_Photo_CD_Base16.xcu +++ b/filter/source/config/fragments/types/pcd_Photo_CD_Base16.xcu @@ -2,7 +2,7 @@ com.sun.star.comp.draw.FormatDetector pcd - image/x-photo-cd> + image/x-photo-cd false draw_PCD_Photo_CD_Base16 diff --git a/filter/source/config/fragments/types/pcd_Photo_CD_Base4.xcu b/filter/source/config/fragments/types/pcd_Photo_CD_Base4.xcu index 72ca4d282717..966a77a47c73 100644 --- a/filter/source/config/fragments/types/pcd_Photo_CD_Base4.xcu +++ b/filter/source/config/fragments/types/pcd_Photo_CD_Base4.xcu @@ -2,7 +2,7 @@ com.sun.star.comp.draw.FormatDetector pcd - image/x-photo-cd> + image/x-photo-cd false draw_PCD_Photo_CD_Base4 diff --git a/filter/source/config/fragments/types/svm_StarView_Metafile.xcu b/filter/source/config/fragments/types/svm_StarView_Metafile.xcu index ac5e04e18a55..d7e52dbbb11a 100644 --- a/filter/source/config/fragments/types/svm_StarView_Metafile.xcu +++ b/filter/source/config/fragments/types/svm_StarView_Metafile.xcu @@ -2,7 +2,7 @@ com.sun.star.comp.draw.FormatDetector svm - image/x-svm> + image/x-svm false SVM - StarView Metafile diff --git a/filter/source/config/tools/merge/pyAltFCFGMerge b/filter/source/config/tools/merge/pyAltFCFGMerge index 17fe16fb3445..faf9b9c34cb7 100755 --- a/filter/source/config/tools/merge/pyAltFCFGMerge +++ b/filter/source/config/tools/merge/pyAltFCFGMerge @@ -438,7 +438,6 @@ def generateHeader(sVersion, sEncoding, sPath, sPackage, bLanguagePack): sHeader += " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"" sHeader += " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" else: - sHeader += "\n" sHeader += "> n16; rSt << UINT16( ESCHER_BlipFirst + nBlibType ); - DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherEx::Flush: BLIP record types differ" ); + DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherGraphicProvider::WriteBlibStoreContainer: BLIP record types differ" ); UINT32 n32; // record size *pMergePicStreamBSE >> n32; nBlipSize -= 8; rSt << nBlipSize; - DBG_ASSERT( nBlipSize == n32, "EscherEx::Flush: BLIP sizes differ" ); + DBG_ASSERT( nBlipSize == n32, "EscherGraphicProvider::WriteBlibStoreContainer: BLIP sizes differ" ); // record while ( nBlipSize ) { @@ -4289,64 +4289,190 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm ) } } +// --------------------------------------------------------------------------------------------- + +EscherExGlobal::EscherExGlobal( sal_uInt32 nGraphicProvFlags ) : + EscherGraphicProvider( nGraphicProvFlags ), + mpPicStrm( 0 ), + mbHasDggCont( false ), + mbPicStrmQueried( false ) +{ +} + +EscherExGlobal::~EscherExGlobal() +{ +} + +sal_uInt32 EscherExGlobal::GenerateDrawingId() +{ + // new drawing starts a new cluster in the cluster table (cluster identifiers are one-based) + sal_uInt32 nClusterId = static_cast< sal_uInt32 >( maClusterTable.size() + 1 ); + // drawing identifiers are one-based + sal_uInt32 nDrawingId = static_cast< sal_uInt32 >( maDrawingInfos.size() + 1 ); + // prepare new entries in the tables + maClusterTable.push_back( ClusterEntry( nDrawingId ) ); + maDrawingInfos.push_back( DrawingInfo( nClusterId ) ); + // return the new drawing identifier + return nDrawingId; +} + +sal_uInt32 EscherExGlobal::GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpgr ) +{ + // drawing identifier is one-based + size_t nDrawingIdx = nDrawingId - 1; + OSL_ENSURE( nDrawingIdx < maDrawingInfos.size(), "EscherExGlobal::GenerateShapeId - invalid drawing ID" ); + if( nDrawingIdx >= maDrawingInfos.size() ) + return 0; + DrawingInfo& rDrawingInfo = maDrawingInfos[ nDrawingIdx ]; + + // cluster identifier in drawing info struct is one-based + ClusterEntry* pClusterEntry = &maClusterTable[ rDrawingInfo.mnClusterId - 1 ]; + + // check cluster overflow, create new cluster entry + if( pClusterEntry->mnNextShapeId == DFF_DGG_CLUSTER_SIZE ) + { + // start a new cluster in the cluster table + maClusterTable.push_back( ClusterEntry( nDrawingId ) ); + pClusterEntry = &maClusterTable.back(); + // new size of maClusterTable is equal to one-based identifier of the new cluster + rDrawingInfo.mnClusterId = static_cast< sal_uInt32 >( maClusterTable.size() ); + } + + // build shape identifier from cluster identifier and next free cluster shape identifier + rDrawingInfo.mnLastShapeId = static_cast< sal_uInt32 >( rDrawingInfo.mnClusterId * DFF_DGG_CLUSTER_SIZE + pClusterEntry->mnNextShapeId ); + // update free shape identifier in cluster entry + ++pClusterEntry->mnNextShapeId; + /* Old code has counted the shapes only, if we are in a SPGRCONTAINER. Is + this really intended? Maybe it's always true... */ + if( bIsInSpgr ) + ++rDrawingInfo.mnShapeCount; + + // return the new shape identifier + return rDrawingInfo.mnLastShapeId; +} + +sal_uInt32 EscherExGlobal::GetDrawingShapeCount( sal_uInt32 nDrawingId ) const +{ + size_t nDrawingIdx = nDrawingId - 1; + OSL_ENSURE( nDrawingIdx < maDrawingInfos.size(), "EscherExGlobal::GetDrawingShapeCount - invalid drawing ID" ); + return (nDrawingIdx < maDrawingInfos.size()) ? maDrawingInfos[ nDrawingIdx ].mnShapeCount : 0; +} + +sal_uInt32 EscherExGlobal::GetLastShapeId( sal_uInt32 nDrawingId ) const +{ + size_t nDrawingIdx = nDrawingId - 1; + OSL_ENSURE( nDrawingIdx < maDrawingInfos.size(), "EscherExGlobal::GetLastShapeId - invalid drawing ID" ); + return (nDrawingIdx < maDrawingInfos.size()) ? maDrawingInfos[ nDrawingIdx ].mnLastShapeId : 0; +} + +sal_uInt32 EscherExGlobal::GetDggAtomSize() const +{ + // 8 bytes header, 16 bytes fixed DGG data, 8 bytes for each cluster + return static_cast< sal_uInt32 >( 24 + 8 * maClusterTable.size() ); +} + +void EscherExGlobal::WriteDggAtom( SvStream& rStrm ) const +{ + sal_uInt32 nDggSize = GetDggAtomSize(); + + // write the DGG record header (do not include the 8 bytes of the header in the data size) + rStrm << static_cast< sal_uInt32 >( ESCHER_Dgg << 16 ) << static_cast< sal_uInt32 >( nDggSize - 8 ); + + // claculate and write the fixed DGG data + sal_uInt32 nShapeCount = 0; + sal_uInt32 nLastShapeId = 0; + for( DrawingInfoVector::const_iterator aIt = maDrawingInfos.begin(), aEnd = maDrawingInfos.end(); aIt != aEnd; ++aIt ) + { + nShapeCount += aIt->mnShapeCount; + nLastShapeId = ::std::max( nLastShapeId, aIt->mnLastShapeId ); + } + // the non-existing cluster with index #0 is counted too + sal_uInt32 nClusterCount = static_cast< sal_uInt32 >( maClusterTable.size() + 1 ); + sal_uInt32 nDrawingCount = static_cast< sal_uInt32 >( maDrawingInfos.size() ); + rStrm << nLastShapeId << nClusterCount << nShapeCount << nDrawingCount; + + // write the cluster table + for( ClusterTable::const_iterator aIt = maClusterTable.begin(), aEnd = maClusterTable.end(); aIt != aEnd; ++aIt ) + rStrm << aIt->mnDrawingId << aIt->mnNextShapeId; +} + +SvStream* EscherExGlobal::QueryPictureStream() +{ + if( !mbPicStrmQueried ) + { + mpPicStrm = ImplQueryPictureStream(); + mbPicStrmQueried = true; + } + return mpPicStrm; +} + +SvStream* EscherExGlobal::ImplQueryPictureStream() +{ + return 0; +} + // --------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------- -EscherEx::EscherEx( SvStream& rOutStrm, UINT32 nDrawings ) : - EscherGraphicProvider ( 0 ), +EscherEx::EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm ) : + mxGlobal ( rxGlobal ), mpOutStrm ( &rOutStrm ), - mnDrawings ( nDrawings ), mnGroupLevel ( 0 ), mnHellLayerId ( USHRT_MAX ), mbEscherSpgr ( FALSE ), - mbEscherDgg ( FALSE ), // TRUE, wenn jemals ein ESCHER_Dgg angelegt wurde, dieser wird dann im Dest. aktualisiert - mbEscherDg ( FALSE ), - mbOleEmf ( FALSE ) + mbEscherDg ( FALSE ) { mnStrmStartOfs = mpOutStrm->Tell(); - mpImplEscherExSdr = new ImplEscherExSdr( *this ); + mpImplEscherExSdr.reset( new ImplEscherExSdr( *this ) ); +} + +EscherEx::~EscherEx() +{ } // --------------------------------------------------------------------------------------------- void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ ) { - if ( mbEscherDgg ) // ESCHER_Dgg anpassen + if ( mxGlobal->HasDggContainer() ) { + // store the current stream position at ESCHER_Persist_CurrentPosition key PtReplaceOrInsert( ESCHER_Persist_CurrentPosition, mpOutStrm->Tell() ); if ( DoSeek( ESCHER_Persist_Dgg ) ) { - *mpOutStrm << mnCurrentShapeID << (UINT32)( mnFIDCLs + 1 ) << mnTotalShapesDgg << mnDrawings; - } - if ( HasGraphics() ) - { - if ( DoSeek( ESCHER_Persist_BlibStoreContainer ) ) // ESCHER_BlibStoreContainer schreiben + /* The DGG record is still not written. ESCHER_Persist_Dgg seeks + to the place where the complete record has to be inserted. */ + InsertAtCurrentPos( mxGlobal->GetDggAtomSize(), false ); + mxGlobal->WriteDggAtom( *mpOutStrm ); + + if ( mxGlobal->HasGraphics() ) { - sal_uInt32 nAddBytes = GetBlibStoreContainerSize( pPicStreamMergeBSE ); - if ( nAddBytes ) + /* Calculate the total size of the BSTORECONTAINER including + all BSE records containing the picture data contained in + the passed in pPicStreamMergeBSE. */ + sal_uInt32 nBSCSize = mxGlobal->GetBlibStoreContainerSize( pPicStreamMergeBSE ); + if ( nBSCSize > 0 ) { - InsertAtCurrentPos( nAddBytes, TRUE ); // platz schaffen fuer Blib Container samt seinen Blib Atomen - WriteBlibStoreContainer( *mpOutStrm, pPicStreamMergeBSE ); + InsertAtCurrentPos( nBSCSize, false ); + mxGlobal->WriteBlibStoreContainer( *mpOutStrm, pPicStreamMergeBSE ); } } + + /* Forget the stream position stored for the DGG which is invalid + after the call to InsertAtCurrentPos() anyway. */ + PtDelete( ESCHER_Persist_Dgg ); } + // seek to initial position (may be different due to inserted DGG and BLIPs) mpOutStrm->Seek( PtGetOffsetByID( ESCHER_Persist_CurrentPosition ) ); } } // --------------------------------------------------------------------------------------------- -EscherEx::~EscherEx() -{ - delete mpImplEscherExSdr; -} - -// --------------------------------------------------------------------------------------------- - -void EscherEx::InsertAtCurrentPos( UINT32 nBytes, BOOL bContainer ) +void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom ) { UINT32 nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell(); BYTE* pBuf; @@ -4364,11 +4490,16 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, BOOL bContainer ) while ( mpOutStrm->Tell() < nCurPos ) { *mpOutStrm >> nType >> nSize; - if ( ( mpOutStrm->Tell() + nSize ) >= ( ( bContainer ) ? nCurPos + 1 : nCurPos ) ) + sal_uInt32 nEndOfRecord = mpOutStrm->Tell() + nSize; + bool bContainer = (nType & 0x0F) == 0x0F; + /* Expand the record, if the insertion position is inside, or if the + position is at the end of a container (expands always), or at the + end of an atom and bExpandEndOfAtom is set. */ + if ( (nCurPos < nEndOfRecord) || ((nCurPos == nEndOfRecord) && (bContainer || bExpandEndOfAtom)) ) { mpOutStrm->SeekRel( -4 ); *mpOutStrm << (UINT32)( nSize + nBytes ); - if ( ( nType & 0xf ) != 0xf ) + if ( !bContainer ) mpOutStrm->SeekRel( nSize ); } else @@ -4428,6 +4559,16 @@ void EscherEx::InsertPersistOffset( UINT32 nKey, UINT32 nOffset ) PtInsert( ESCHER_Persist_PrivateEntry | nKey, nOffset ); } +void EscherEx::ReplacePersistOffset( UINT32 nKey, UINT32 nOffset ) +{ + PtReplace( ESCHER_Persist_PrivateEntry | nKey, nOffset ); +} + +UINT32 EscherEx::GetPersistOffset( UINT32 nKey ) +{ + return PtGetOffsetByID( ESCHER_Persist_PrivateEntry | nKey ); +} + // --------------------------------------------------------------------------------------------- BOOL EscherEx::DoSeek( UINT32 nKey ) @@ -4476,39 +4617,25 @@ void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance ) { case ESCHER_DggContainer : { - mbEscherDgg = TRUE; - mnFIDCLs = mnDrawings; + mxGlobal->SetDggContainer(); mnCurrentDg = 0; - mnCurrentShapeID = 0; - mnTotalShapesDgg = 0; - mnCurrentShapeMaximumID = 0; - AddAtom( 16 + ( mnDrawings << 3 ), ESCHER_Dgg ); // an FDGG and several FIDCLs + /* Remember the current position as start position of the DGG + record and BSTORECONTAINER, but do not write them actually. + This will be done later in Flush() when the number of drawings, + the size and contents of the FIDCL cluster table, and the size + of the BLIP container are known. */ PtReplaceOrInsert( ESCHER_Persist_Dgg, mpOutStrm->Tell() ); - *mpOutStrm << (UINT32)0 // the current maximum shape ID - << (UINT32)0 // the number of ID clusters + 1 - << (UINT32)0 // the number of total shapes saved - << (UINT32)0; // the total number of drawings saved - PtReplaceOrInsert( ESCHER_Persist_Dgg_FIDCL, mpOutStrm->Tell() ); - for ( UINT32 i = 0; i < mnFIDCLs; i++ ) // Dummy FIDCLs einfuegen - { - *mpOutStrm << (UINT32)0 << (UINT32)0; // Drawing Nummer, Anzahl der Shapes in diesem IDCL - } - PtReplaceOrInsert( ESCHER_Persist_BlibStoreContainer, mpOutStrm->Tell() ); } break; case ESCHER_DgContainer : { - if ( mbEscherDgg ) + if ( mxGlobal->HasDggContainer() ) { if ( !mbEscherDg ) { mbEscherDg = TRUE; - mnCurrentDg++; - mnTotalShapesDg = 0; - mnTotalShapeIdUsedDg = 0; - mnCurrentShapeID = ( mnCurrentShapeMaximumID &~0x3ff ) + 0x400; // eine neue Seite bekommt immer eine neue ShapeId die ein vielfaches von 1024 ist, - // damit ist erste aktuelle Shape ID 0x400 + mnCurrentDg = mxGlobal->GenerateDrawingId(); AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg ); PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() ); *mpOutStrm << (UINT32)0 // The number of shapes in this drawing @@ -4554,48 +4681,7 @@ void EscherEx::CloseContainer() { mbEscherDg = FALSE; if ( DoSeek( ESCHER_Persist_Dg | mnCurrentDg ) ) - { - // shapeanzahl des drawings setzen - mnTotalShapesDgg += mnTotalShapesDg; - *mpOutStrm << mnTotalShapesDg << mnCurrentShapeMaximumID; - if ( DoSeek( ESCHER_Persist_Dgg_FIDCL ) ) - { - if ( mnTotalShapesDg == 0 ) - { - mpOutStrm->SeekRel( 8 ); - } - else - { - if ( mnTotalShapeIdUsedDg ) - { - // die benutzten Shape Ids des drawings in die fidcls setzen - UINT32 i, nFIDCL = ( ( mnTotalShapeIdUsedDg - 1 ) / 0x400 ); - if ( nFIDCL ) - { - if ( nPos > mpOutStrm->Tell() ) - nPos += ( nFIDCL << 3 ); - - mnFIDCLs += nFIDCL; - InsertAtCurrentPos( nFIDCL << 3 ); // platz schaffen fuer weitere FIDCL's - } - for ( i = 0; i <= nFIDCL; i++ ) - { - *mpOutStrm << mnCurrentDg; - if ( i < nFIDCL ) - *mpOutStrm << (UINT32)0x400; - else - { - UINT32 nShapesLeft = mnTotalShapeIdUsedDg % 0x400; - if ( !nShapesLeft ) - nShapesLeft = 0x400; - *mpOutStrm << (UINT32)nShapesLeft; - } - } - } - } - PtReplaceOrInsert( ESCHER_Persist_Dgg_FIDCL, mpOutStrm->Tell() ); // neuen FIDCL Offset fuer naechste Seite - } - } + *mpOutStrm << mxGlobal->GetDrawingShapeCount( mnCurrentDg ) << mxGlobal->GetLastShapeId( mnCurrentDg ); } } break; @@ -4649,10 +4735,10 @@ void EscherEx::AddAtom( UINT32 nAtomSize, UINT16 nRecType, int nRecVersion, int void EscherEx::AddChildAnchor( const Rectangle& rRect ) { AddAtom( 16, ESCHER_ChildAnchor ); - GetStream() << (INT32)rRect.Left() - << (INT32)rRect.Top() - << (INT32)rRect.Right() - << (INT32)rRect.Bottom(); + *mpOutStrm << (sal_Int32)rRect.Left() + << (sal_Int32)rRect.Top() + << (sal_Int32)rRect.Right() + << (sal_Int32)rRect.Bottom(); } // --------------------------------------------------------------------------------------------- @@ -4691,7 +4777,7 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe << (INT32)aRect.Right() << (INT32)aRect.Bottom(); - UINT32 nShapeId = GetShapeID(); + sal_uInt32 nShapeId = GenerateShapeId(); if ( !mnGroupLevel ) AddShape( ESCHER_ShpInst_Min, 5, nShapeId ); // Flags: Group | Patriarch else @@ -4782,7 +4868,7 @@ void EscherEx::AddShape( UINT32 nShpInstance, UINT32 nFlags, UINT32 nShapeID ) AddAtom( 8, ESCHER_Sp, 2, nShpInstance ); if ( !nShapeID ) - nShapeID = GetShapeID(); + nShapeID = GenerateShapeId(); if ( nFlags ^ 1 ) // is this a group shape ? { // if not @@ -4790,19 +4876,6 @@ void EscherEx::AddShape( UINT32 nShpInstance, UINT32 nFlags, UINT32 nShapeID ) nFlags |= 2; // this not a topmost shape } *mpOutStrm << nShapeID << nFlags; - - if ( mbEscherSpgr ) - mnTotalShapesDg++; -} - -// --------------------------------------------------------------------------------------------- - -UINT32 EscherEx::GetShapeID() -{ - mnCurrentShapeMaximumID = mnCurrentShapeID; // maximum setzen - mnCurrentShapeID++; // mnCurrentShape ID auf nachste freie ID - mnTotalShapeIdUsedDg++; - return mnCurrentShapeMaximumID; } // --------------------------------------------------------------------------------------------- @@ -4842,3 +4915,4 @@ UINT32 EscherEx::GetColor( const Color& rSOColor, BOOL bSwap ) } // --------------------------------------------------------------------------------------------- + diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index b72427d78571..facc6e799d04 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -146,7 +146,7 @@ void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherProperty #define ADD_SHAPE( nType, nFlags ) \ { \ nShapeType = nType; \ - nShapeID = mpEscherEx->GetShapeID(); \ + nShapeID = mpEscherEx->GenerateShapeId(); \ rObj.SetShapeId( nShapeID ); \ mpEscherEx->AddShape( (UINT32)nType, (UINT32)nFlags, nShapeID ); \ rSolverContainer.AddShape( rObj.GetShapeRef(), nShapeID ); \ @@ -182,7 +182,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, UINT32 nGrpShapeID = 0; do { - mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef() ); + mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 ); if ( mpHostAppData && mpHostAppData->DontWriteShape() ) break; @@ -238,8 +238,8 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, const ::com::sun::star::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() ); Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); if ( !mpPicStrm ) - mpPicStrm = mpEscherEx->QueryPicStream(); - EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpEscherEx, mpPicStrm, aRect100thmm ); + mpPicStrm = mpEscherEx->QueryPictureStream(); + EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm ); // #i51348# shape name if( aShapeName.Len() > 0 ) @@ -764,7 +764,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, UINT16 nShapeType = 0; do { - mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef() ); + mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 ); if ( mpHostAppData && mpHostAppData->DontWriteShape() ) break; @@ -772,8 +772,8 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, const ::com::sun::star::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() ); Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) ); if ( !mpPicStrm ) - mpPicStrm = mpEscherEx->QueryPicStream(); - EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpEscherEx, mpPicStrm, aRect100thmm ); + mpPicStrm = mpEscherEx->QueryPictureStream(); + EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm ); rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle"))); INT32 nAngle = rObj.GetAngle(); if( rObj.GetType().EqualsAscii( "drawing.Line" )) @@ -802,7 +802,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj, else { mpEscherEx->OpenContainer( ESCHER_SpContainer ); - nShapeID = mpEscherEx->GetShapeID(); + nShapeID = mpEscherEx->GenerateShapeId(); mpEscherEx->AddShape( nShapeType = ESCHER_ShpInst_TextBox, 0xa00, nShapeID ); if ( rObj.ImplGetText() ) aPropOpt.CreateTextProperties( rObj.mXPropSet, @@ -862,7 +862,7 @@ UINT32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >& { mpHostAppData = mpEscherEx->EnterAdditionalTextGroup(); UINT32 nGrpId = mpEscherEx->EnterGroup( pBoundRect ); - mpHostAppData = mpEscherEx->StartShape( rShape ); + mpHostAppData = mpEscherEx->StartShape( rShape, pBoundRect ); return nGrpId; } @@ -934,7 +934,7 @@ ImplEscherExSdr::~ImplEscherExSdr() // ------------------------------------------------------------------- -SvxDrawPage* ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) +bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) { do { @@ -960,12 +960,32 @@ SvxDrawPage* ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) else pSvxDrawPage = SvxDrawPage::getImplementation(mXDrawPage); - return pSvxDrawPage; + return pSvxDrawPage != 0; } while ( 0 ); - return NULL; + return false; } +// ------------------------------------------------------------------- + +bool ImplEscherExSdr::ImplInitUnoShapes( const Reference< XShapes >& rxShapes ) +{ + // eventually write SolverContainer of current page, deletes the Solver + ImplFlushSolverContainer(); + + if( !rxShapes.is() ) + return false; + + mpSdrPage = 0; + mXDrawPage.clear(); + mXShapes = rxShapes; + + if( !ImplInitPageValues() ) // ImplEESdrWriter + return false; + + mpSolverContainer = new EscherSolverContainer; + return true; +} // ------------------------------------------------------------------- @@ -1020,6 +1040,13 @@ void EscherEx::AddSdrPage( const SdrPage& rPage ) mpImplEscherExSdr->ImplWriteCurrentPage(); } +// ------------------------------------------------------------------- + +void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes ) +{ + if ( mpImplEscherExSdr->ImplInitUnoShapes( rxShapes ) ) + mpImplEscherExSdr->ImplWriteCurrentPage(); +} // ------------------------------------------------------------------- @@ -1041,7 +1068,7 @@ void EscherEx::EndSdrObjectPage() // ------------------------------------------------------------------- -EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */ ) +EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const Rectangle* /*pChildAnchor*/ ) { return NULL; } @@ -1054,13 +1081,6 @@ void EscherEx::EndShape( UINT16 /* nShapeType */, UINT32 /* nShapeID */ ) // ------------------------------------------------------------------- -SvStream* EscherEx::QueryPicStream() -{ - return NULL; -} - -// ------------------------------------------------------------------- - UINT32 EscherEx::QueryTextID( const Reference< XShape >&, UINT32 ) { return 0; @@ -1071,7 +1091,7 @@ UINT32 EscherEx::QueryTextID( const Reference< XShape >&, UINT32 ) UINT32 EscherEx::AddDummyShape() { OpenContainer( ESCHER_SpContainer ); - UINT32 nShapeID = GetShapeID(); + UINT32 nShapeID = GenerateShapeId(); AddShape( ESCHER_ShpInst_Rectangle, 0xa00, nShapeID ); //?? aSolverContainer.AddShape( mXShape, nShapeID ); CloseContainer(); @@ -1109,16 +1129,12 @@ ImplEESdrObject::ImplEESdrObject( ImplEscherExSdr& rEx, { SdrPage* pPage = rObj.GetPage(); DBG_ASSERT( pPage, "ImplEESdrObject::ImplEESdrObject: no SdrPage" ); - if( pPage ) + if( pPage && rEx.ImplInitPage( *pPage ) ) { - SvxDrawPage* pSvxDrawPage = rEx.ImplInitPage( *pPage ); - if( pSvxDrawPage ) - { - // why not declare a const parameter if the object will - // not be modified? - mXShape = uno::Reference< drawing::XShape >::query( ((SdrObject*)&rObj)->getUnoShape() );; - Init( rEx ); - } + // why not declare a const parameter if the object will + // not be modified? + mXShape = uno::Reference< drawing::XShape >::query( ((SdrObject*)&rObj)->getUnoShape() );; + Init( rEx ); } } diff --git a/filter/source/msfilter/eschesdo.hxx b/filter/source/msfilter/eschesdo.hxx index 962000e5c2cf..754eb6f3a2c0 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -191,7 +191,8 @@ public: ImplEscherExSdr( EscherEx& rEx ); virtual ~ImplEscherExSdr(); - SvxDrawPage* ImplInitPage( const SdrPage& rPage ); + bool ImplInitPage( const SdrPage& rPage ); + bool ImplInitUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes ); void ImplWriteCurrentPage(); UINT32 ImplWriteTheShape( ImplEESdrObject& rObj ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 28e8696a89dd..c96dab01c9c1 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5374,6 +5374,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r ((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly ); } + pRet->SetMergedItemSet( aSet ); } } diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx index e434da1fbfb3..82663cdf2523 100644 --- a/filter/source/msfilter/msocximex.cxx +++ b/filter/source/msfilter/msocximex.cxx @@ -2323,8 +2323,8 @@ sal_Bool OCX_ToggleButton::Import(com::sun::star::uno::Reference< if (pValue) { INT16 nTmp=pValue[0]-0x30; - aTmp <<= nTmp; - rPropSet->setPropertyValue( WW8_ASCII2STR("State"), aTmp); + aTmp <<= nTmp == 1; + rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp); } if (pCaption) @@ -2444,9 +2444,9 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents, WriteAlign(rContents,4); nValueLen = 1|SVX_MSOCX_COMPRESSED; - aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("State")); - sal_Int16 nDefault = sal_Int16(); - aTmp >>= nDefault; + bool bDefault = false; + rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultState")) >>= bDefault; + sal_uInt8 nDefault = static_cast< sal_uInt8 >( bDefault ? '1' : '0' ); *rContents << nValueLen; pBlockFlags[2] |= 0x40; @@ -2459,8 +2459,7 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents, *rContents << rSize.Width; *rContents << rSize.Height; - nDefault += 0x30; - *rContents << sal_uInt8(nDefault); + *rContents << nDefault; *rContents << sal_uInt8(0x00); aCaption.WriteCharArray( *rContents ); diff --git a/filter/source/msfilter/powerpoint/exports.map b/filter/source/msfilter/powerpoint/exports.map deleted file mode 100644 index a7e1e75c930a..000000000000 --- a/filter/source/msfilter/powerpoint/exports.map +++ /dev/null @@ -1,9 +0,0 @@ -PPTIMPORTER_1_0 { - global: - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; \ No newline at end of file diff --git a/filter/source/msfilter/powerpoint/makefile.mk b/filter/source/msfilter/powerpoint/makefile.mk index 5857bcb83e36..0ad3d4202f1f 100644 --- a/filter/source/msfilter/powerpoint/makefile.mk +++ b/filter/source/msfilter/powerpoint/makefile.mk @@ -54,7 +54,7 @@ SHL1STDLIBS=\ SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 848bc60b4203..8d8e48832dc9 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -3127,10 +3127,12 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry* } if ( rSlidePersist.pBObj ) { - if ( rSlidePersist.bBObjIsTemporary ) - SdrObject::Free( rSlidePersist.pBObj ); - else - pRet->SetBackgroundObj( rSlidePersist.pBObj ); + // #i99386# transfer the attributes from the temporary BackgroundObject + // to the Page and delete it. Maybe rSlidePersist.bBObjIsTemporary is + // obsolete here, too. + pRet->getSdrPageProperties().ClearItem(); + pRet->getSdrPageProperties().PutItemSet(rSlidePersist.pBObj->GetMergedItemSet()); + SdrObject::Free( rSlidePersist.pBObj ); } } } diff --git a/filter/source/pdf/exports.map b/filter/source/pdf/exports.map deleted file mode 100644 index c673092ae700..000000000000 --- a/filter/source/pdf/exports.map +++ /dev/null @@ -1,9 +0,0 @@ -PDFFILTER_1_0 { - global: - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; \ No newline at end of file diff --git a/filter/source/pdf/makefile.mk b/filter/source/pdf/makefile.mk index e2319422691f..edf3147a822c 100644 --- a/filter/source/pdf/makefile.mk +++ b/filter/source/pdf/makefile.mk @@ -61,6 +61,7 @@ SHL1STDLIBS=\ $(TKLIB) \ $(VCLLIB) \ $(SVLLIB) \ + $(BASEGFXLIB) \ $(SFX2LIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ @@ -73,7 +74,7 @@ SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) SHL1LIBS= $(SLB)$/$(TARGET).lib SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 3ff1b23aad5d..793503abf9ba 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -50,6 +50,9 @@ #include #include #include +#include "basegfx/polygon/b2dpolygon.hxx" +#include "basegfx/polygon/b2dpolypolygon.hxx" +#include "basegfx/polygon/b2dpolygontools.hxx" #include // only for testing of relative saving options in PDF @@ -940,7 +943,8 @@ sal_Bool PDFExport::ImplExportPage( PDFWriter& rWriter, PDFExtOutDevData& rPDFEx rWriter.NewPage( aSizePDF.Width(), aSizePDF.Height() ); rWriter.SetMapMode( rMtf.GetPrefMapMode() ); - rWriter.SetClipRegion( aPageRect ); + basegfx::B2DRectangle aB2DRect( aPageRect.Left(), aPageRect.Top(), aPageRect.Right(), aPageRect.Bottom() ); + rWriter.SetClipRegion( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aB2DRect ) ) ); bRet = ImplWriteActions( rWriter, &rPDFExtOutDevData, rMtf, aDummyVDev ); rPDFExtOutDevData.ResetSyncData(); @@ -1643,7 +1647,15 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF const MetaClipRegionAction* pA = (const MetaClipRegionAction*) pAction; if( pA->IsClipping() ) - rWriter.SetClipRegion( pA->GetRegion() ); + { + if( pA->GetRegion().IsEmpty() ) + rWriter.SetClipRegion( basegfx::B2DPolyPolygon() ); + else + { + Region aReg( pA->GetRegion() ); + rWriter.SetClipRegion( aReg.ConvertToB2DPolyPolygon() ); + } + } else rWriter.SetClipRegion(); } @@ -1658,8 +1670,9 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF case( META_ISECTREGIONCLIPREGION_ACTION ): { - const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pAction; - rWriter.IntersectClipRegion( pA->GetRegion() ); + const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pAction; + Region aReg( pA->GetRegion() ); + rWriter.IntersectClipRegion( aReg.ConvertToB2DPolyPolygon() ); } break; @@ -1829,7 +1842,7 @@ void PDFExport::ImplWriteGradient( PDFWriter& rWriter, const PolyPolygon& rPolyP rDummyVDev.AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); rWriter.Push(); - rWriter.IntersectClipRegion( rPolyPoly ); + rWriter.IntersectClipRegion( rPolyPoly.getB2DPolyPolygon() ); ImplWriteActions( rWriter, NULL, aTmpMtf, rDummyVDev ); rWriter.Pop(); } diff --git a/filter/source/placeware/makefile.mk b/filter/source/placeware/makefile.mk index 1f26aabe8072..3238193c52ae 100644 --- a/filter/source/placeware/makefile.mk +++ b/filter/source/placeware/makefile.mk @@ -53,7 +53,7 @@ SHL1STDLIBS= \ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(SALLIB) -SHL1VERSIONMAP=$(TARGET).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEPN= SHL1IMPLIB= i$(TARGET) diff --git a/filter/source/placeware/placeware.map b/filter/source/placeware/placeware.map deleted file mode 100644 index ac2c3750bfe0..000000000000 --- a/filter/source/placeware/placeware.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/filter/source/svg/exports.map b/filter/source/svg/exports.map deleted file mode 100644 index c673092ae700..000000000000 --- a/filter/source/svg/exports.map +++ /dev/null @@ -1,9 +0,0 @@ -PDFFILTER_1_0 { - global: - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; \ No newline at end of file diff --git a/filter/source/svg/makefile.mk b/filter/source/svg/makefile.mk index 0cac9d29e632..12c1210c18c4 100644 --- a/filter/source/svg/makefile.mk +++ b/filter/source/svg/makefile.mk @@ -73,7 +73,7 @@ SHL1STDLIBS+=\ SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/filter/source/t602/makefile.mk b/filter/source/t602/makefile.mk index c51c055978ae..c65de1bc9b7c 100644 --- a/filter/source/t602/makefile.mk +++ b/filter/source/t602/makefile.mk @@ -47,7 +47,7 @@ SHL1TARGETDEPN=makefile.mk SHL1OBJS=$(SLOFILES) SHL1TARGET=$(LIBNAME)$(DLLPOSTFIX) SHL1IMPLIB=i$(LIBNAME) -SHL1VERSIONMAP=$(LIBNAME).map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map #SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/filter/source/t602/t602filter.map b/filter/source/t602/t602filter.map deleted file mode 100644 index ea06e33d056c..000000000000 --- a/filter/source/t602/t602filter.map +++ /dev/null @@ -1,8 +0,0 @@ -T602IMP_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/filter/source/xmlfilteradaptor/makefile.mk b/filter/source/xmlfilteradaptor/makefile.mk index 74a40a38ca95..b3d39f860388 100644 --- a/filter/source/xmlfilteradaptor/makefile.mk +++ b/filter/source/xmlfilteradaptor/makefile.mk @@ -44,7 +44,7 @@ CDEFS+=-DCOMPMOD_NAMESPACE=framework SHL1TARGET= xmlfa$(DLLPOSTFIX) SHL1IMPLIB= i$(SHL1TARGET) -SHL1VERSIONMAP= xmlfa.map +SHL1VERSIONMAP= $(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/filter/source/xmlfilteradaptor/xmlfa.map b/filter/source/xmlfilteradaptor/xmlfa.map deleted file mode 100644 index ba501f9ae076..000000000000 --- a/filter/source/xmlfilteradaptor/xmlfa.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/filter/source/xmlfilterdetect/makefile.mk b/filter/source/xmlfilterdetect/makefile.mk index a08346c23127..d13c4af5f576 100644 --- a/filter/source/xmlfilterdetect/makefile.mk +++ b/filter/source/xmlfilterdetect/makefile.mk @@ -45,7 +45,7 @@ CDEFS+=-DCOMPMOD_NAMESPACE=framework SHL1TARGET= xmlfd$(DLLPOSTFIX) SHL1IMPLIB= i$(SHL1TARGET) -SHL1VERSIONMAP= xmlfd.map +SHL1VERSIONMAP= $(SOLARENV)/src/component.map SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) diff --git a/filter/source/xmlfilterdetect/xmlfd.map b/filter/source/xmlfilterdetect/xmlfd.map deleted file mode 100644 index ba501f9ae076..000000000000 --- a/filter/source/xmlfilterdetect/xmlfd.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/filter/source/xsltfilter/XSLTransformer.java b/filter/source/xsltfilter/XSLTransformer.java index 86d13cbc23e5..4806c18b8161 100644 --- a/filter/source/xsltfilter/XSLTransformer.java +++ b/filter/source/xsltfilter/XSLTransformer.java @@ -78,6 +78,8 @@ import com.sun.star.uno.UnoRuntime; import com.sun.star.lib.uno.adapter.XInputStreamToInputStreamAdapter; import com.sun.star.lib.uno.adapter.XOutputStreamToOutputStreamAdapter; +import net.sf.saxon.FeatureKeys; + /** This outer class provides an inner class to implement the service * description, a method to instantiate the * component on demand (__getServiceFactory()), and a method to give @@ -291,6 +293,9 @@ public class XSLTransformer // create new transformer for this stylesheet TransformerFactory tfactory = TransformerFactory.newInstance(); debug("TransformerFactory is '" + tfactory.getClass().getName() + "'"); + // some external saxons (Debian, Ubuntu, ...) have this disabled + // per default + tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true)); transformer = tfactory.newTransformer(new StreamSource(stylesheeturl)); transformer.setOutputProperty("encoding", "UTF-8"); // transformer.setURIResolver(XSLTransformer.this); diff --git a/filter/source/xsltfilter/exports.map b/filter/source/xsltfilter/exports.map deleted file mode 100644 index ba501f9ae076..000000000000 --- a/filter/source/xsltfilter/exports.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/filter/source/xsltfilter/makefile.mk b/filter/source/xsltfilter/makefile.mk index af9476224c63..1a20572d1698 100644 --- a/filter/source/xsltfilter/makefile.mk +++ b/filter/source/xsltfilter/makefile.mk @@ -33,9 +33,6 @@ LIBTARGET=NO # --- Settings ----------------------------------------------------- CLASSDIR!:=$(CLASSDIR)$/$(TARGET) -.IF "$(XML_CLASSPATH)" != "" -XCLASSPATH+=":$(XML_CLASSPATH)" -.ENDIF .INCLUDE: settings.mk SLOFILES=$(SLO)$/XSLTFilter.obj $(SLO)$/fla.obj @@ -44,7 +41,7 @@ SHL1TARGETDEPN=makefile.mk SHL1OBJS=$(SLOFILES) SHL1TARGET=$(LIBNAME)$(DLLPOSTFIX) SHL1IMPLIB=i$(LIBNAME) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) @@ -68,6 +65,12 @@ JARCOMPRESS = TRUE JARCLASSDIRS = XSLTransformer*.class XSLTFilterOLEExtracter*.class JARTARGET = $(TARGET).jar +.IF "$(SYSTEM_SAXON)" == "YES" +XCLASSPATH+=$(SAXON_JAR) +.ELSE +JARFILES += saxon9.jar +.ENDIF + # --- Files -------------------------------------------------------- JAVACLASSFILES=$(CLASSDIR)$/XSLTransformer.class $(CLASSDIR)$/XSLTFilterOLEExtracter.class .ENDIF diff --git a/filter/source/xsltvalidate/makefile.mk b/filter/source/xsltvalidate/makefile.mk index 45e46cca459b..5337d31a4bd7 100644 --- a/filter/source/xsltvalidate/makefile.mk +++ b/filter/source/xsltvalidate/makefile.mk @@ -39,13 +39,13 @@ CLASSDIR!:=$(CLASSDIR)$/$(TARGET) JARFILES = ridl.jar unoil.jar jurt.jar juh.jar crimson.jar .IF "$(SYSTEM_XALAN)" == "YES" -XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(XALAN_JAR) +EXTRAJARFILES += $(XALAN_JAR) .ELSE JARFILES += xalan.jar .ENDIF .IF "$(SYSTEM_XML_APIS)" == "YES" -XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(XML_APIS_JAR) +EXTRAJARFILES += $(XML_APIS_JAR) .ELSE JARFILES += xml-apis.jar .ENDIF diff --git a/hwpfilter/source/hwp.map b/hwpfilter/source/hwp.map deleted file mode 100644 index ac2c3750bfe0..000000000000 --- a/hwpfilter/source/hwp.map +++ /dev/null @@ -1,8 +0,0 @@ -UDK_3_0_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/hwpfilter/source/makefile.mk b/hwpfilter/source/makefile.mk index c059c1ae2ed4..98b00d0618d6 100644 --- a/hwpfilter/source/makefile.mk +++ b/hwpfilter/source/makefile.mk @@ -88,7 +88,7 @@ SHL1STDLIBS+= \ SHL1DEF= $(MISC)$/$(SHL1TARGET).def SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1VERSIONMAP = hwp.map +SHL1VERSIONMAP = $(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) diff --git a/oox/inc/oox/drawingml/chart/chartconverter.hxx b/oox/inc/oox/drawingml/chart/chartconverter.hxx index d45a5c95c388..f9d10388ce13 100644 --- a/oox/inc/oox/drawingml/chart/chartconverter.hxx +++ b/oox/inc/oox/drawingml/chart/chartconverter.hxx @@ -32,14 +32,15 @@ #include namespace com { namespace sun { namespace star { + namespace awt { struct Point; } + namespace awt { struct Size; } + namespace drawing { class XShapes; } namespace chart2 { class XChartDocument; } namespace chart2 { namespace data { class XDataProvider; } } namespace chart2 { namespace data { class XDataSequence; } } } } } -namespace oox { namespace core { - class XmlFilterBase; -} } +namespace oox { namespace core { class XmlFilterBase; } } namespace oox { namespace drawingml { @@ -56,11 +57,32 @@ public: explicit ChartConverter(); virtual ~ChartConverter(); - /** Converts the passed OOXML chart model to the passed chart2 document. */ + /** Converts the passed OOXML chart model to the passed chart2 document. + + @param rChartModel The filled MSOOXML chart model structure. + + @param rxChartDoc The UNO chart document model to be initialized. + + @param rxExternalPage If null, all embedded shapes will be inserted + into the internal drawing page of the chart document. If not null, + all embedded shapes will be inserted into this shapes collection. + + @param rChartPos The position of the chart shape in its drawing page, + in 1/100 mm. Will be used only, if parameter rxExternalPage is not + null, for correct positioning of the embedded shapes in the + external drawing page. + + @param rChartSize The size of the chart shape in 1/100 mm. Needed for + calculation of position and size of the chart elements (diagram, + titles, legend, etc.) and embedded shapes. + */ void convertFromModel( ::oox::core::XmlFilterBase& rFilter, - ChartSpaceModel& rModel, - const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc ); + ChartSpaceModel& rChartModel, + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc, + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxExternalPage, + const ::com::sun::star::awt::Point& rChartPos, + const ::com::sun::star::awt::Size& rChartSize ); /** Creates an internal data provider. Derived classes may override this function to create an external data provider. */ diff --git a/oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx b/oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx new file mode 100644 index 000000000000..e38311394046 --- /dev/null +++ b/oox/inc/oox/drawingml/chart/chartdrawingfragment.hxx @@ -0,0 +1,126 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: chartdrawingfragment.hxx,v $ + * + * $Revision: 1.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX +#define OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX + +#include "oox/core/fragmenthandler2.hxx" +#include "oox/drawingml/shape.hxx" + +namespace oox { +namespace drawingml { +namespace chart { + +// ============================================================================ + +/** Relative shape position in a chart object. */ +struct AnchorPosModel +{ + double mfX; /// X coordinate relative to chart object (0.0 to 1.0). + double mfY; /// Y coordinate relative to chart object (0.0 to 1.0). + + inline explicit AnchorPosModel() : mfX( -1.0 ), mfY( -1.0 ) {} + inline bool isValid() const { return (0.0 <= mfX) && (mfX <= 1.0) && (0.0 <= mfY) && (mfY <= 1.0); } +}; + +// ---------------------------------------------------------------------------- + +/** Absolute shape size in a chart object (in EMUs). */ +struct AnchorSizeModel : public EmuSize +{ + inline explicit AnchorSizeModel() : EmuSize( -1, -1 ) {} + inline bool isValid() const { return (Width >= 0) && (Height >= 0); } +}; + +// ============================================================================ + +/** Contains the position of a shape in the chart object. Supports different + shape anchor modes (absolute, relative). + */ +class ShapeAnchor +{ +public: + explicit ShapeAnchor( bool bRelSize ); + + /** Imports the absolute anchor size from the cdr:ext element. */ + void importExt( const AttributeList& rAttribs ); + /** Sets an the relative anchor position from the cdr:from or cdr:to element. */ + void setPos( sal_Int32 nElement, sal_Int32 nParentContext, const ::rtl::OUString& rValue ); + + /** Calculates the resulting shape anchor in EMUs. */ + ::com::sun::star::awt::Rectangle + calcEmuLocation( const EmuRectangle& rEmuChartRect ) const; + +private: + AnchorPosModel maFrom; /// Top-left position relative to chart object. + AnchorPosModel maTo; /// Bottom-right position relative to chart object. + AnchorSizeModel maSize; /// Shape size, if anchor has absolute size. + bool mbRelSize; /// True = relative size, false = absolute size. +}; + +typedef ::boost::shared_ptr< ShapeAnchor > ShapeAnchorRef; + +// ============================================================================ + +/** Handler for a chart drawing fragment (c:userShapes root element). + */ +class ChartDrawingFragment : public ::oox::core::FragmentHandler2 +{ +public: + explicit ChartDrawingFragment( + ::oox::core::XmlFilterBase& rFilter, + const ::rtl::OUString& rFragmentPath, + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxDrawPage, + const ::com::sun::star::awt::Size& rChartSize, + const ::com::sun::star::awt::Point& rShapesOffset, + bool bOleSupport ); + virtual ~ChartDrawingFragment(); + + virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ); + virtual void onEndElement( const ::rtl::OUString& rChars ); + +private: + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > + mxDrawPage; /// Drawing page of this sheet. + ::oox::drawingml::ShapePtr mxShape; /// Current top-level shape. + ShapeAnchorRef mxAnchor; /// Current anchor of top-level shape. + EmuRectangle maEmuChartRect; /// Position and size of the chart object for embedded shapes (in EMUs). + bool mbOleSupport; /// True = allow to insert OLE objects into the drawing page. +}; + +// ============================================================================ + +} // namespace chart +} // namespace drawingml +} // namespace oox + +#endif + diff --git a/oox/inc/oox/drawingml/chart/chartspaceconverter.hxx b/oox/inc/oox/drawingml/chart/chartspaceconverter.hxx index edeb24f0022f..b4c40015f825 100644 --- a/oox/inc/oox/drawingml/chart/chartspaceconverter.hxx +++ b/oox/inc/oox/drawingml/chart/chartspaceconverter.hxx @@ -30,6 +30,10 @@ #include "oox/drawingml/chart/converterbase.hxx" +namespace com { namespace sun { namespace star { + namespace drawing { class XShapes; } +} } } + namespace oox { namespace drawingml { namespace chart { @@ -45,7 +49,9 @@ public: virtual ~ChartSpaceConverter(); /** Converts the contained OOXML chart model to a chart2 document. */ - void convertFromModel(); + void convertFromModel( + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxExternalPage, + const ::com::sun::star::awt::Point& rChartPos ); }; // ============================================================================ diff --git a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx index 5955dd9aef51..ddfa57fb919c 100644 --- a/oox/inc/oox/drawingml/chart/chartspacemodel.hxx +++ b/oox/inc/oox/drawingml/chart/chartspacemodel.hxx @@ -57,6 +57,7 @@ struct ChartSpaceModel View3DRef mxView3D; /// 3D settings. TitleRef mxTitle; /// Chart main title. LegendRef mxLegend; /// Chart legend. + ::rtl::OUString maDrawingPath; /// Path to drawing fragment with embedded shapes. sal_Int32 mnDispBlanksAs; /// Mode how to display blank values. sal_Int32 mnStyle; /// Index to default formatting. bool mbAutoTitleDel; /// True = automatic title deleted manually. diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index 683e1cd8f05d..23f5a5ff9266 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -32,6 +32,7 @@ #include "oox/drawingml/chart/objectformatter.hxx" namespace com { namespace sun { namespace star { + namespace awt { struct Size; } namespace lang { class XMultiServiceFactory; } namespace chart2 { class XChartDocument; } } } } @@ -57,8 +58,9 @@ public: explicit ConverterRoot( ::oox::core::XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ); + const ::com::sun::star::awt::Size& rChartSize ); virtual ~ConverterRoot(); /** Creates an instance for the passed service name, using the passed service factory. */ @@ -79,6 +81,8 @@ protected: /** Returns the API chart document model. */ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > getChartDocument() const; + /** Returns the position and size of the chart shape in 1/100 mm. */ + const ::com::sun::star::awt::Size& getChartSize() const; /** Returns the object formatter. */ ObjectFormatter& getFormatter() const; diff --git a/oox/inc/oox/drawingml/drawingmltypes.hxx b/oox/inc/oox/drawingml/drawingmltypes.hxx index 37d8804bfb62..ed4367e63857 100644 --- a/oox/inc/oox/drawingml/drawingmltypes.hxx +++ b/oox/inc/oox/drawingml/drawingmltypes.hxx @@ -146,6 +146,37 @@ IndexRange GetIndexRange( const ::com::sun::star::uno::Reference< ::com::sun::st // ============================================================================ +struct EmuPoint +{ + sal_Int64 X; + sal_Int64 Y; + + inline explicit EmuPoint() : X( 0 ), Y( 0 ) {} + inline explicit EmuPoint( sal_Int64 nX, sal_Int64 nY ) : X( nX ), Y( nY ) {} +}; + +// ============================================================================ + +struct EmuSize +{ + sal_Int64 Width; + sal_Int64 Height; + + inline explicit EmuSize() : Width( 0 ), Height( 0 ) {} + inline explicit EmuSize( sal_Int64 nWidth, sal_Int64 nHeight ) : Width( nWidth ), Height( nHeight ) {} +}; + +// ============================================================================ + +struct EmuRectangle : public EmuPoint, public EmuSize +{ + inline explicit EmuRectangle() {} + inline explicit EmuRectangle( const EmuPoint& rPos, const EmuSize& rSize ) : EmuPoint( rPos ), EmuSize( rSize ) {} + inline explicit EmuRectangle( sal_Int64 nX, sal_Int64 nY, sal_Int64 nWidth, sal_Int64 nHeight ) : EmuPoint( nX, nY ), EmuSize( nWidth, nHeight ) {} +}; + +// ============================================================================ + } // namespace drawingml } // namespace oox diff --git a/oox/inc/oox/drawingml/graphicshapecontext.hxx b/oox/inc/oox/drawingml/graphicshapecontext.hxx index 0452ed30e895..d515a4553936 100644 --- a/oox/inc/oox/drawingml/graphicshapecontext.hxx +++ b/oox/inc/oox/drawingml/graphicshapecontext.hxx @@ -50,10 +50,12 @@ public: class GraphicalObjectFrameContext : public ShapeContext { public: - GraphicalObjectFrameContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ); + GraphicalObjectFrameContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); +private: + bool mbEmbedShapesInChart; }; // ==================================================================== @@ -95,13 +97,16 @@ class ChartGraphicDataContext : public ShapeContext public: explicit ChartGraphicDataContext( ::oox::core::ContextHandler& rParent, - const ShapePtr& rxShape ); + const ShapePtr& rxShape, bool bEmbedShapes ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + +private: + bool mbEmbedShapes; }; // ==================================================================== diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx index b6c015f73938..94fb6a4f29fc 100644 --- a/oox/inc/oox/drawingml/shape.hxx +++ b/oox/inc/oox/drawingml/shape.hxx @@ -69,7 +69,8 @@ public: const ::com::sun::star::awt::Rectangle& rShapeRect ); virtual void onXShapeCreated( - const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape ) const; + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape, + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes ) const; inline const PropertyMap& getShapeProperties() const { return maShapeProps; } @@ -124,7 +125,8 @@ public: void setId( const rtl::OUString& rId ) { msId = rId; } void setSubType( sal_uInt32 nSubType ) { mnSubType = nSubType; } sal_Int32 getSubType() const { return mnSubType; } - void setIndex( sal_uInt32 nIndex ) { mnIndex = nIndex; } + void setSubTypeIndex( sal_uInt32 nSubTypeIndex ) { mnSubTypeIndex = nSubTypeIndex; } + sal_Int32 getSubTypeIndex() const { return mnSubTypeIndex; } // setDefaults has to be called if styles are imported (OfficeXML is not storing properties having the default value) void setDefaults(); @@ -143,7 +145,7 @@ public: // addShape is creating and inserting the corresponding XShape. void addShape( const oox::core::XmlFilterBase& rFilterBase, - const ThemePtr& rxTheme, + const Theme* pTheme, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes, const ::com::sun::star::awt::Rectangle* pShapeRect = 0, ShapeIdMap* pShapeMap = 0 ); @@ -161,7 +163,7 @@ protected: createAndInsert( const ::oox::core::XmlFilterBase& rFilterBase, const ::rtl::OUString& rServiceName, - const ThemePtr& rxTheme, + const Theme* pTheme, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes, const ::com::sun::star::awt::Rectangle* pShapeRect, sal_Bool bClearText ); @@ -169,7 +171,7 @@ protected: void addChildren( const ::oox::core::XmlFilterBase& rFilterBase, Shape& rMaster, - const ThemePtr& rxTheme, + const Theme* pTheme, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes, const ::com::sun::star::awt::Rectangle& rClientRect, ShapeIdMap* pShapeMap ); @@ -185,11 +187,11 @@ protected: TextListStylePtr mpMasterTextListStyle; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape; - rtl::OUString msServiceName; - rtl::OUString msName; - rtl::OUString msId; - sal_uInt32 mnSubType; // if this type is not zero, then the shape is a placeholder - sal_uInt32 mnIndex; + rtl::OUString msServiceName; + rtl::OUString msName; + rtl::OUString msId; + sal_uInt32 mnSubType; // if this type is not zero, then the shape is a placeholder + sal_uInt32 mnSubTypeIndex; ShapeStyleRefMap maShapeStyleRefs; diff --git a/oox/inc/oox/drawingml/textbodyproperties.hxx b/oox/inc/oox/drawingml/textbodyproperties.hxx index 7b17c561e286..6688eea7746c 100644 --- a/oox/inc/oox/drawingml/textbodyproperties.hxx +++ b/oox/inc/oox/drawingml/textbodyproperties.hxx @@ -41,6 +41,10 @@ struct TextBodyProperties PropertyMap maPropertyMap; OptValue< sal_Int32 > moRotation; OptValue< sal_Int32 > moVert; + + explicit TextBodyProperties(); + + void pushToPropMap( PropertyMap& rPropMap ) const; }; // ============================================================================ diff --git a/oox/inc/oox/drawingml/textparagraph.hxx b/oox/inc/oox/drawingml/textparagraph.hxx index e98232477f3b..d8c97cbfa114 100644 --- a/oox/inc/oox/drawingml/textparagraph.hxx +++ b/oox/inc/oox/drawingml/textparagraph.hxx @@ -54,8 +54,8 @@ public: inline TextParagraphProperties& getProperties() { return maProperties; } inline const TextParagraphProperties& getProperties() const { return maProperties; } - inline TextParagraphProperties& getEndProperties() { return maEndProperties; } - inline const TextParagraphProperties& getEndProperties() const { return maEndProperties; } + inline TextCharacterProperties& getEndProperties() { return maEndProperties; } + inline const TextCharacterProperties& getEndProperties() const { return maEndProperties; } //inline void setProperties( TextParagraphPropertiesPtr pProps ) { mpProperties = pProps; } @@ -69,7 +69,7 @@ public: private: TextParagraphProperties maProperties; - TextParagraphProperties maEndProperties; + TextCharacterProperties maEndProperties; TextRunVector maRuns; }; 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; }; @@ -858,6 +872,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 ); +}; + // ============================================================================ // ============================================================================ @@ -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 ); diff --git a/oox/inc/oox/ppt/pptshape.hxx b/oox/inc/oox/ppt/pptshape.hxx index 032e38d1dbbd..59f1beb39677 100644 --- a/oox/inc/oox/ppt/pptshape.hxx +++ b/oox/inc/oox/ppt/pptshape.hxx @@ -50,7 +50,7 @@ public: void addShape( const oox::core::XmlFilterBase& rFilterBase, const SlidePersist& rPersist, - const oox::drawingml::ThemePtr& rxTheme, + const oox::drawingml::Theme* pTheme, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes, const com::sun::star::awt::Rectangle* pShapeRect = 0, ::oox::drawingml::ShapeIdMap* pShapeMap = 0 ); diff --git a/oox/inc/oox/xls/drawingfragment.hxx b/oox/inc/oox/xls/drawingfragment.hxx index a75baf41149a..22fddd373a86 100644 --- a/oox/inc/oox/xls/drawingfragment.hxx +++ b/oox/inc/oox/xls/drawingfragment.hxx @@ -41,25 +41,19 @@ namespace xls { // ============================================================================ /** Absolute position in spreadsheet (in EMUs) independent from cells. */ -struct AnchorPosModel +struct AnchorPosModel : public ::oox::drawingml::EmuPoint { - sal_Int64 mnX; /// Absolute X coordinate (EMUs). - sal_Int64 mnY; /// Absolute Y coordinate (EMUs). - - explicit AnchorPosModel(); - inline bool isValid() const { return (mnX >= 0) && (mnY >= 0); } + inline explicit AnchorPosModel() : ::oox::drawingml::EmuPoint( -1, -1 ) {} + inline bool isValid() const { return (X >= 0) && (Y >= 0); } }; // ---------------------------------------------------------------------------- /** Absolute size in spreadsheet (in EMUs). */ -struct AnchorSizeModel +struct AnchorSizeModel : public ::oox::drawingml::EmuSize { - sal_Int64 mnWidth; /// Total width (EMUs). - sal_Int64 mnHeight; /// Total height (EMUs). - - explicit AnchorSizeModel(); - inline bool isValid() const { return (mnWidth >= 0) && (mnHeight >= 0); } + inline explicit AnchorSizeModel() : ::oox::drawingml::EmuSize( -1, -1 ) {} + inline bool isValid() const { return (Width >= 0) && (Height >= 0); } }; // ---------------------------------------------------------------------------- diff --git a/oox/inc/oox/xls/stylesbuffer.hxx b/oox/inc/oox/xls/stylesbuffer.hxx index 8af5127143de..7eb00d4bd57d 100644 --- a/oox/inc/oox/xls/stylesbuffer.hxx +++ b/oox/inc/oox/xls/stylesbuffer.hxx @@ -509,8 +509,13 @@ struct ApiBorderData bool mbDiagUsed; /// True = diagonal line format used. explicit ApiBorderData(); + + /** Returns true, if any of the outer border lines is visible. */ + bool hasAnyOuterBorder() const; }; +bool operator==( const ApiBorderData& rLeft, const ApiBorderData& rRight ); + // ============================================================================ class Border : public WorkbookHelper @@ -544,6 +549,11 @@ public: /** Final processing after import of all style settings. */ void finalizeImport(); + /** Returns the border model structure. */ + inline const BorderModel& getModel() const { return maModel; } + /** Returns the converted API border data struct. */ + inline const ApiBorderData& getApiData() const { return maApiData; } + /** Writes all border attributes to the passed property map. */ void writeToPropertyMap( PropertyMap& rPropMap ) const; @@ -619,6 +629,8 @@ struct ApiSolidFillData explicit ApiSolidFillData(); }; +bool operator==( const ApiSolidFillData& rLeft, const ApiSolidFillData& rRight ); + // ============================================================================ /** Contains cell fill attributes, either a pattern fill or a gradient fill. */ @@ -665,6 +677,13 @@ public: /** Final processing after import of all style settings. */ void finalizeImport(); + /** Returns the fill pattern model structure, if extant. */ + inline const PatternFillModel* getPatternModel() const { return mxPatternModel.get(); } + /** Returns the fill gradient model structure, if extant. */ + inline const GradientFillModel* getGradientModel() const { return mxGradientModel.get(); } + /** Returns the converted API fill data struct. */ + inline const ApiSolidFillData& getApiData() const { return maApiData; } + /** Writes all fill attributes to the passed property map. */ void writeToPropertyMap( PropertyMap& rPropMap ) const; @@ -734,6 +753,9 @@ public: /** Final processing after import of all style settings. */ void finalizeImport(); + /** Returns true, if the XF is a cell XF, and false, if it is a style XF. */ + inline bool isCellXf() const { return maModel.mbCellXf; } + /** Returns the referred font object. */ FontRef getFont() const; /** Returns the alignment data of this style. */ @@ -751,13 +773,13 @@ public: private: /** Sets 'attribute used' flags from the passed BIFF bit field. */ void setBiffUsedFlags( sal_uInt8 nUsedFlags ); - /** Updates own used flags from the passed cell style XF. */ - void updateUsedFlags( const Xf& rStyleXf ); private: XfModel maModel; /// Cell XF or style XF model data. Alignment maAlignment; /// Cell alignment data. Protection maProtection; /// Cell protection data. + ::com::sun::star::table::CellVertJustify + meRotationRef; /// Rotation reference dependent on border. }; typedef ::boost::shared_ptr< Xf > XfRef; @@ -964,6 +986,8 @@ public: sal_Int32 getPaletteColor( sal_Int32 nIndex ) const; /** Returns the specified font object. */ FontRef getFont( sal_Int32 nFontId ) const; + /** Returns the specified border object. */ + BorderRef getBorder( sal_Int32 nBorderId ) const; /** Returns the specified cell format object. */ XfRef getCellXf( sal_Int32 nXfId ) const; /** Returns the specified style format object. */ @@ -978,6 +1002,11 @@ public: /** Returns the model of the default application font (used in the "Normal" cell style). */ const FontModel& getDefaultFontModel() const; + /** Returns true, if the specified borders are equal. */ + bool equalBorders( sal_Int32 nBorderId1, sal_Int32 nBorderId2 ) const; + /** Returns true, if the specified fills are equal. */ + bool equalFills( sal_Int32 nFillId1, sal_Int32 nFillId2 ) const; + /** Returns the default style sheet for unused cells. */ ::rtl::OUString getDefaultStyleName() const; /** Creates the style sheet described by the style XF with the passed identifier. */ diff --git a/oox/inc/oox/xls/workbookhelper.hxx b/oox/inc/oox/xls/workbookhelper.hxx index 6fa79c629dbc..90c0f33c3c50 100644 --- a/oox/inc/oox/xls/workbookhelper.hxx +++ b/oox/inc/oox/xls/workbookhelper.hxx @@ -302,8 +302,6 @@ public: WorksheetBuffer& getWorksheets() const; /** Returns the office theme object read from the theme substorage. */ ThemeBuffer& getTheme() const; - /** Returns the office theme object reference read from the theme substorage. */ - ::boost::shared_ptr< ::oox::drawingml::Theme > getThemeRef() const; /** Returns all cell formatting objects read from the styles substream. */ StylesBuffer& getStyles() const; /** Returns the shared strings read from the shared strings substream. */ diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx old mode 100644 new mode 100755 diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 9c06caffe0c2..87faadd7a9ce 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -85,13 +85,25 @@ namespace core { // ============================================================================ +namespace { + +bool lclHasSuffix( const OUString& rFragmentPath, const OUString& rSuffix ) +{ + sal_Int32 nSuffixPos = rFragmentPath.getLength() - rSuffix.getLength(); + return (nSuffixPos >= 0) && rFragmentPath.match( rSuffix, nSuffixPos ); +} + +} // namespace + +// ============================================================================ + struct XmlFilterBaseImpl { typedef RefMap< OUString, Relations > RelationsMap; + Reference< XFastParser > mxFastParser; OUString maBinSuffix; - Reference< XFastTokenHandler > - mxTokenHandler; + OUString maVmlSuffix; RelationsMap maRelationsMap; TextFieldStack maTextFieldStack; explicit XmlFilterBaseImpl(); @@ -101,7 +113,7 @@ struct XmlFilterBaseImpl XmlFilterBaseImpl::XmlFilterBaseImpl() : maBinSuffix( CREATE_OUSTRING( ".bin" ) ), - mxTokenHandler( new FastTokenHandler ) + maVmlSuffix( CREATE_OUSTRING( ".vml" ) ) { } @@ -113,6 +125,38 @@ XmlFilterBase::XmlFilterBase( const Reference< XMultiServiceFactory >& rxGlobalF mnRelId( 1 ), mnMaxDocId( 0 ) { + try + { + // create the fast parser + mxImpl->mxFastParser.set( rxGlobalFactory->createInstance( CREATE_OUSTRING( "com.sun.star.xml.sax.FastParser" ) ), UNO_QUERY_THROW ); + mxImpl->mxFastParser->setTokenHandler( new FastTokenHandler ); + + // register XML namespaces + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://www.w3.org/XML/1998/namespace" ), NMSP_XML ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/package/2006/relationships" ), NMSP_PACKAGE_RELATIONSHIPS ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/officeDocument/2006/relationships" ), NMSP_RELATIONSHIPS ); + + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/main" ), NMSP_DRAWINGML ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ), NMSP_DIAGRAM ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/chart" ), NMSP_CHART ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing" ), NMSP_CDR ); + + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:vml" ), NMSP_VML ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:office" ), NMSP_OFFICE ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:word" ), NMSP_VML_DOC ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:excel" ), NMSP_VML_XLS ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:powerpoint" ), NMSP_VML_PPT ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/2006/activeX" ), NMSP_AX ); + + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/spreadsheetml/2006/main"), NMSP_XLS ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" ), NMSP_XDR ); + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/excel/2006/main" ), NMSP_XM ); + + mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/presentationml/2006/main"), NMSP_PPT ); + } + catch( Exception& ) + { + } } XmlFilterBase::~XmlFilterBase() @@ -140,8 +184,7 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& r return false; // try to import binary streams (fragment extension must be '.bin') - sal_Int32 nBinSuffixPos = aFragmentPath.getLength() - mxImpl->maBinSuffix.getLength(); - if( (nBinSuffixPos >= 0) && aFragmentPath.match( mxImpl->maBinSuffix, nBinSuffixPos ) ) + if( lclHasSuffix( aFragmentPath, mxImpl->maBinSuffix ) ) { try { @@ -170,40 +213,16 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& r if( !xDocHandler.is() ) return false; + // check that the fast parser exists + if( !mxImpl->mxFastParser.is() ) + return false; + // try to import XML stream try { // try to open the fragment stream (this may fail - do not assert) Reference< XInputStream > xInStrm( rxHandler->openFragmentStream(), UNO_SET_THROW ); - // create the fast parser - Reference< XFastParser > xParser( getGlobalFactory()->createInstance( - CREATE_OUSTRING( "com.sun.star.xml.sax.FastParser" ) ), UNO_QUERY_THROW ); - xParser->setFastDocumentHandler( xDocHandler ); - xParser->setTokenHandler( mxImpl->mxTokenHandler ); - - // register XML namespaces - xParser->registerNamespace( CREATE_OUSTRING( "http://www.w3.org/XML/1998/namespace" ), NMSP_XML ); - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/package/2006/relationships" ), NMSP_PACKAGE_RELATIONSHIPS ); - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/officeDocument/2006/relationships" ), NMSP_RELATIONSHIPS ); - - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/main" ), NMSP_DRAWINGML ); - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ), NMSP_DIAGRAM ); - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/chart" ), NMSP_CHART ); - - xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:vml" ), NMSP_VML ); - xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:office" ), NMSP_OFFICE ); - xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:word" ), NMSP_VML_DOC ); - xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:excel" ), NMSP_VML_XLS ); - xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:powerpoint" ), NMSP_VML_PPT ); - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/2006/activeX" ), NMSP_AX ); - - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/spreadsheetml/2006/main"), NMSP_XLS ); - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" ), NMSP_XDR ); - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/excel/2006/main" ), NMSP_XM ); - - xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/presentationml/2006/main"), NMSP_PPT ); - // create the input source and parse the stream InputSource aSource; aSource.aInputStream = xInStrm; @@ -211,7 +230,8 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& r // own try/catch block for showing parser failure assertion with fragment path try { - xParser->parseStream( aSource ); + mxImpl->mxFastParser->setFastDocumentHandler( xDocHandler ); + mxImpl->mxFastParser->parseStream( aSource ); return true; } catch( Exception& ) diff --git a/oox/source/drawingml/chart/chartconverter.cxx b/oox/source/drawingml/chart/chartconverter.cxx index f1b592631f2d..efd8e6d021e1 100644 --- a/oox/source/drawingml/chart/chartconverter.cxx +++ b/oox/source/drawingml/chart/chartconverter.cxx @@ -33,6 +33,9 @@ using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Exception; +using ::com::sun::star::awt::Point; +using ::com::sun::star::awt::Size; +using ::com::sun::star::drawing::XShapes; using ::com::sun::star::chart2::XChartDocument; using ::com::sun::star::chart2::data::XDataProvider; using ::com::sun::star::chart2::data::XDataSequence; @@ -53,14 +56,15 @@ ChartConverter::~ChartConverter() } void ChartConverter::convertFromModel( XmlFilterBase& rFilter, - ChartSpaceModel& rModel, const Reference< XChartDocument >& rxChartDoc ) + ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, + const Reference< XShapes >& rxExternalPage, const Point& rChartPos, const Size& rChartSize ) { OSL_ENSURE( rxChartDoc.is(), "ChartConverter::convertFromModel - missing chart document" ); if( rxChartDoc.is() ) { - ConverterRoot aConvBase( rFilter, *this, rxChartDoc, rModel ); - ChartSpaceConverter aSpaceConv( aConvBase, rModel ); - aSpaceConv.convertFromModel(); + ConverterRoot aConvBase( rFilter, *this, rChartModel, rxChartDoc, rChartSize ); + ChartSpaceConverter aSpaceConv( aConvBase, rChartModel ); + aSpaceConv.convertFromModel( rxExternalPage, rChartPos ); } } diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx new file mode 100644 index 000000000000..9df064125457 --- /dev/null +++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx @@ -0,0 +1,239 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: chartdrawingfragment.cxx,v $ + * + * $Revision: 1.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "oox/drawingml/chart/chartdrawingfragment.hxx" +#include "oox/core/xmlfilterbase.hxx" +#include "oox/drawingml/connectorshapecontext.hxx" +#include "oox/drawingml/graphicshapecontext.hxx" +#include "oox/drawingml/shapecontext.hxx" +#include "oox/drawingml/shapegroupcontext.hxx" + +using ::rtl::OUString; +using ::com::sun::star::uno::Reference; +using ::com::sun::star::awt::Point; +using ::com::sun::star::awt::Rectangle; +using ::com::sun::star::awt::Size; +using ::com::sun::star::drawing::XShapes; +using ::oox::core::ContextHandlerRef; +using ::oox::core::FragmentHandler2; +using ::oox::core::XmlFilterBase; + +namespace oox { +namespace drawingml { +namespace chart { + +// ============================================================================ + +ShapeAnchor::ShapeAnchor( bool bRelSize ) : + mbRelSize( bRelSize ) +{ +} + +void ShapeAnchor::importExt( const AttributeList& rAttribs ) +{ + OSL_ENSURE( !mbRelSize, "ShapeAnchor::importExt - unexpected 'cdr:ext' element" ); + maSize.Width = rAttribs.getHyper( XML_cx, 0 ); + maSize.Height = rAttribs.getHyper( XML_cy, 0 ); +} + +void ShapeAnchor::setPos( sal_Int32 nElement, sal_Int32 nParentContext, const OUString& rValue ) +{ + AnchorPosModel* pAnchorPos = 0; + switch( nParentContext ) + { + case CDR_TOKEN( from ): + pAnchorPos = &maFrom; + break; + case CDR_TOKEN( to ): + OSL_ENSURE( mbRelSize, "ShapeAnchor::setPos - unexpected 'cdr:to' element" ); + pAnchorPos = &maTo; + break; + default: + OSL_ENSURE( false, "ShapeAnchor::setPos - unexpected parent element" ); + } + if( pAnchorPos ) switch( nElement ) + { + case CDR_TOKEN( x ): pAnchorPos->mfX = rValue.toDouble(); break; + case CDR_TOKEN( y ): pAnchorPos->mfY = rValue.toDouble(); break; + default: OSL_ENSURE( false, "ShapeAnchor::setPos - unexpected element" ); + } +} + +Rectangle ShapeAnchor::calcEmuLocation( const EmuRectangle& rEmuChartRect ) const +{ + Rectangle aLoc( -1, -1, -1, -1 ); + + OSL_ENSURE( maFrom.isValid(), "ShapeAnchor::calcEmuLocation - invalid from position" ); + OSL_ENSURE( mbRelSize ? maTo.isValid() : maSize.isValid(), "ShapeAnchor::calcEmuLocation - invalid to/size" ); + if( maFrom.isValid() && (mbRelSize ? maTo.isValid() : maSize.isValid()) ) + { + // calculate shape position + aLoc.X = getLimitedValue< sal_Int32, double >( maFrom.mfX * rEmuChartRect.Width, 0, SAL_MAX_INT32 ); + aLoc.Y = getLimitedValue< sal_Int32, double >( maFrom.mfY * rEmuChartRect.Height, 0, SAL_MAX_INT32 ); + + // calculate shape size + if( mbRelSize ) + { + aLoc.Width = getLimitedValue< sal_Int32, double >( maTo.mfX * rEmuChartRect.Width, 0, SAL_MAX_INT32 ) - aLoc.X; + if( aLoc.Width < 0 ) + { + aLoc.X += aLoc.Width; + aLoc.Width *= -1; + } + aLoc.Height = getLimitedValue< sal_Int32, double >( maTo.mfY * rEmuChartRect.Height, 0, SAL_MAX_INT32 ) - aLoc.Y; + if( aLoc.Height < 0 ) + { + aLoc.Y += aLoc.Height; + aLoc.Height *= -1; + } + } + else + { + aLoc.Width = getLimitedValue< sal_Int32, sal_Int64 >( maSize.Width, 0, SAL_MAX_INT32 ); + aLoc.Height = getLimitedValue< sal_Int32, sal_Int64 >( maSize.Height, 0, SAL_MAX_INT32 ); + } + } + + return aLoc; +} +// ============================================================================ + +ChartDrawingFragment::ChartDrawingFragment( XmlFilterBase& rFilter, + const OUString& rFragmentPath, const Reference< XShapes >& rxDrawPage, + const Size& rChartSize, const Point& rShapesOffset, bool bOleSupport ) : + FragmentHandler2( rFilter, rFragmentPath ), + mxDrawPage( rxDrawPage ), + mbOleSupport( bOleSupport ) +{ + maEmuChartRect.X = static_cast< sal_Int64 >( rShapesOffset.X ) * 360; + maEmuChartRect.Y = static_cast< sal_Int64 >( rShapesOffset.Y ) * 360; + maEmuChartRect.Width = static_cast< sal_Int64 >( rChartSize.Width ) * 360; + maEmuChartRect.Height = static_cast< sal_Int64 >( rChartSize.Height ) * 360; +} + +ChartDrawingFragment::~ChartDrawingFragment() +{ +} + +ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) +{ + switch( getCurrentElement() ) + { + case XML_ROOT_CONTEXT: + if( nElement == C_TOKEN( userShapes ) ) return this; + break; + + case C_TOKEN( userShapes ): + switch( nElement ) + { + case CDR_TOKEN( absSizeAnchor ): + mxAnchor.reset( new ShapeAnchor( false ) ); + return this; + case CDR_TOKEN( relSizeAnchor ): + mxAnchor.reset( new ShapeAnchor( true ) ); + return this; + } + break; + + case CDR_TOKEN( absSizeAnchor ): + case CDR_TOKEN( relSizeAnchor ): + switch( nElement ) + { + case CDR_TOKEN( sp ): + mxShape.reset( new Shape( "com.sun.star.drawing.CustomShape" ) ); + return new ShapeContext( *this, ShapePtr(), mxShape ); + case CDR_TOKEN( cxnSp ): + mxShape.reset( new Shape( "com.sun.star.drawing.ConnectorShape" ) ); + return new ConnectorShapeContext( *this, ShapePtr(), mxShape ); + case CDR_TOKEN( pic ): + mxShape.reset( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ); + return new GraphicShapeContext( *this, ShapePtr(), mxShape ); + case CDR_TOKEN( graphicFrame ): + if( !mbOleSupport ) + return 0; + mxShape.reset( new Shape( "com.sun.star.drawing.OLE2Shape" ) ); + return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape, true ); + case CDR_TOKEN( grpSp ): + mxShape.reset( new Shape( "com.sun.star.drawing.GroupShape" ) ); + return new ShapeGroupContext( *this, ShapePtr(), mxShape ); + + case CDR_TOKEN( from ): + case CDR_TOKEN( to ): + return this; + + case CDR_TOKEN( ext ): + if( mxAnchor.get() ) mxAnchor->importExt( rAttribs ); + return 0; + } + break; + + case CDR_TOKEN( from ): + case CDR_TOKEN( to ): + switch( nElement ) + { + case CDR_TOKEN( x ): + case CDR_TOKEN( y ): + return this; // collect value in onEndElement() + } + break; + } + return 0; +} + +void ChartDrawingFragment::onEndElement( const OUString& rChars ) +{ + switch( getCurrentElement() ) + { + case CDR_TOKEN( x ): + case CDR_TOKEN( y ): + if( mxAnchor.get() ) mxAnchor->setPos( getCurrentElement(), getPreviousElement(), rChars ); + break; + + case CDR_TOKEN( absSizeAnchor ): + case CDR_TOKEN( relSizeAnchor ): + if( mxDrawPage.is() && mxShape.get() && mxAnchor.get() ) + { + Rectangle aLoc = mxAnchor->calcEmuLocation( maEmuChartRect ); + if( (aLoc.X >= 0) && (aLoc.Y >= 0) && (aLoc.Width >= 0) && (aLoc.Height >= 0) ) + mxShape->addShape( getFilter(), getFilter().getCurrentTheme(), mxDrawPage, &aLoc ); + } + mxShape.reset(); + mxAnchor.reset(); + break; + } +} + +// ============================================================================ + +} // namespace chart +} // namespace drawingml +} // namespace oox + diff --git a/oox/source/drawingml/chart/chartspaceconverter.cxx b/oox/source/drawingml/chart/chartspaceconverter.cxx index 390f7ccfe7b9..6460e94a4f3b 100644 --- a/oox/source/drawingml/chart/chartspaceconverter.cxx +++ b/oox/source/drawingml/chart/chartspaceconverter.cxx @@ -26,24 +26,29 @@ ************************************************************************/ #include "oox/drawingml/chart/chartspaceconverter.hxx" +#include +#include #include #include #include #include -#include #include "oox/core/xmlfilterbase.hxx" #include "oox/drawingml/chart/chartconverter.hxx" +#include "oox/drawingml/chart/chartdrawingfragment.hxx" #include "oox/drawingml/chart/chartspacemodel.hxx" #include "oox/drawingml/chart/plotareaconverter.hxx" #include "oox/drawingml/chart/titleconverter.hxx" #include "properties.hxx" using ::rtl::OUString; +using ::com::sun::star::awt::Point; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::util::XNumberFormatsSupplier; +using ::com::sun::star::drawing::XDrawPageSupplier; +using ::com::sun::star::drawing::XShapes; using ::com::sun::star::chart2::XDiagram; using ::com::sun::star::chart2::XTitled; using ::com::sun::star::chart2::data::XDataReceiver; @@ -63,7 +68,7 @@ ChartSpaceConverter::~ChartSpaceConverter() { } -void ChartSpaceConverter::convertFromModel() +void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExternalPage, const Point& rChartPos ) { /* create data provider (virtual function in the ChartConverter class, derived converters may create an external data provider) */ @@ -81,8 +86,8 @@ void ChartSpaceConverter::convertFromModel() } // formatting of the chart background - PropertySet aPropSet( getChartDocument()->getPageBackground() ); - getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); + PropertySet aBackPropSet( getChartDocument()->getPageBackground() ); + getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE ); // convert plot area (container of all chart type groups) PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() ); @@ -121,10 +126,10 @@ void ChartSpaceConverter::convertFromModel() } // legend - if( mrModel.mxLegend.is() ) + if( xDiagram.is() && mrModel.mxLegend.is() ) { LegendConverter aLegendConv( *this, *mrModel.mxLegend ); - aLegendConv.convertFromModel( getChartDocument()->getFirstDiagram() ); + aLegendConv.convertFromModel( xDiagram ); } // treatment of missing values @@ -142,12 +147,48 @@ void ChartSpaceConverter::convertFromModel() aDiaProp.setProperty( PROP_MissingValueTreatment, nMissingValues ); } - // set the IncludeHiddenCells property via the old API as only this ensures that the data provider and al created sequences get this flag correctly - Reference< com::sun::star::chart::XChartDocument > xStandardApiChartDoc( getChartDocument(), UNO_QUERY ); - if( xStandardApiChartDoc.is() ) + Reference< com::sun::star::chart::XChartDocument > xOldChartDoc( getChartDocument(), UNO_QUERY ); + if( xOldChartDoc.is() ) + { + /* Set the IncludeHiddenCells property via the old API as only this + ensures that the data provider and all created sequences get this + flag correctly. */ + PropertySet aOldDiaProp( xOldChartDoc->getDiagram() ); + aOldDiaProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly ); + } + + // embedded drawing shapes + if( mrModel.maDrawingPath.getLength() > 0 ) try + { + /* Get the internal draw page of the chart document, if no external + drawing page has been passed. */ + Reference< XShapes > xShapes; + Point aShapesOffset( 0, 0 ); + if( rxExternalPage.is() ) + { + xShapes = rxExternalPage; + // offset for embedded shapes to move them inside the chart area + aShapesOffset = rChartPos; + } + else + { + Reference< XDrawPageSupplier > xDrawPageSupp( getChartDocument(), UNO_QUERY_THROW ); + xShapes.set( xDrawPageSupp->getDrawPage(), UNO_QUERY_THROW ); + } + + /* If an external drawing page is passed, all embedded shapes will be + inserted there (used e.g. with 'chart sheets' in spreadsheet + documents). In this case, all types of shapes including OLE objects + are supported. If the shapes are inserted into the internal chart + drawing page instead, it is not possible to embed OLE objects. */ + bool bOleSupport = rxExternalPage.is(); + + // now, xShapes is not null anymore + getFilter().importFragment( new ChartDrawingFragment( + getFilter(), mrModel.maDrawingPath, xShapes, getChartSize(), aShapesOffset, bOleSupport ) ); + } + catch( Exception& ) { - PropertySet aStandardApiDiagramProp( xStandardApiChartDoc->getDiagram() ); - aStandardApiDiagramProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly ); } } diff --git a/oox/source/drawingml/chart/chartspacefragment.cxx b/oox/source/drawingml/chart/chartspacefragment.cxx index d041997636a9..75df94e95de7 100644 --- a/oox/source/drawingml/chart/chartspacefragment.cxx +++ b/oox/source/drawingml/chart/chartspacefragment.cxx @@ -75,6 +75,9 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const return 0; case C_TOKEN( txPr ): return new TextBodyContext( *this, mrModel.mxTextProp.create() ); + case C_TOKEN( userShapes ): + mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) ); + return 0; } break; diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 596efcf8b30f..534ce48e0278 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -40,6 +40,7 @@ using ::com::sun::star::uno::Exception; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::frame::XModel; +using ::com::sun::star::awt::Size; using ::com::sun::star::chart2::XChartDocument; using ::oox::core::XmlFilterBase; @@ -51,16 +52,18 @@ namespace chart { struct ConverterData { + ObjectFormatter maFormatter; XmlFilterBase& mrFilter; ChartConverter& mrConverter; Reference< XChartDocument > mxDoc; - ObjectFormatter maFormatter; + Size maSize; explicit ConverterData( XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ); + const Size& rChartSize ); ~ConverterData(); }; @@ -69,12 +72,14 @@ struct ConverterData ConverterData::ConverterData( XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ) : + const Size& rChartSize ) : + maFormatter( rFilter, rxChartDoc, rChartModel ), mrFilter( rFilter ), mrConverter( rChartConverter ), mxDoc( rxChartDoc ), - maFormatter( rFilter, rxChartDoc, rChartSpace ) + maSize( rChartSize ) { OSL_ENSURE( mxDoc.is(), "ConverterData::ConverterData - missing chart document" ); // lock the model to suppress internal updates during conversion @@ -106,9 +111,10 @@ ConverterData::~ConverterData() ConverterRoot::ConverterRoot( XmlFilterBase& rFilter, ChartConverter& rChartConverter, + const ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc, - const ChartSpaceModel& rChartSpace ) : - mxData( new ConverterData( rFilter, rChartConverter, rxChartDoc, rChartSpace ) ) + const Size& rChartSize ) : + mxData( new ConverterData( rFilter, rChartConverter, rChartModel, rxChartDoc, rChartSize ) ) { } @@ -151,6 +157,11 @@ Reference< XChartDocument > ConverterRoot::getChartDocument() const return mxData->mxDoc; } +const Size& ConverterRoot::getChartSize() const +{ + return mxData->maSize; +} + ObjectFormatter& ConverterRoot::getFormatter() const { return mxData->maFormatter; diff --git a/oox/source/drawingml/chart/makefile.mk b/oox/source/drawingml/chart/makefile.mk index 3ba22a30f9e6..84762e6a2540 100644 --- a/oox/source/drawingml/chart/makefile.mk +++ b/oox/source/drawingml/chart/makefile.mk @@ -46,6 +46,7 @@ SLOFILES = \ $(SLO)$/axismodel.obj \ $(SLO)$/chartcontextbase.obj \ $(SLO)$/chartconverter.obj \ + $(SLO)$/chartdrawingfragment.obj \ $(SLO)$/chartspaceconverter.obj \ $(SLO)$/chartspacefragment.obj \ $(SLO)$/chartspacemodel.obj \ diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index bcb562c0118f..a0335fe68ee2 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -106,8 +106,9 @@ Reference< XFastContextHandler > GraphicShapeContext::createFastChildContext( sa // ============================================================================ // CT_GraphicalObjectFrameContext -GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr ) -: ShapeContext( rParent, pMasterShapePtr, pShapePtr ) +GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ) : + ShapeContext( rParent, pMasterShapePtr, pShapePtr ), + mbEmbedShapesInChart( bEmbedShapesInChart ) { } @@ -135,7 +136,7 @@ Reference< XFastContextHandler > GraphicalObjectFrameContext::createFastChildCon else if ( sUri.equalsAscii( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ) ) xRet.set( new DiagramGraphicDataContext( *this, mpShapePtr ) ); else if ( sUri.equalsAscii( "http://schemas.openxmlformats.org/drawingml/2006/chart" ) ) - xRet.set( new ChartGraphicDataContext( *this, mpShapePtr ) ); + xRet.set( new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart ) ); else if ( sUri.compareToAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) == 0 ) xRet.set( new table::TableContext( *this, mpShapePtr ) ); else @@ -349,22 +350,24 @@ Reference< XFastContextHandler > DiagramGraphicDataContext::createFastChildConte class CreateChartCallback : public CreateShapeCallback { public: - explicit CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath ); - virtual void onXShapeCreated( const Reference< drawing::XShape >& rxShape ) const; + explicit CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEmbedShapes ); + virtual void onXShapeCreated( const Reference< drawing::XShape >& rxShape, const Reference< drawing::XShapes >& rxShapes ) const; private: OUString maFragmentPath; + bool mbEmbedShapes; }; // ---------------------------------------------------------------------------- -CreateChartCallback::CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath ) : +CreateChartCallback::CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEmbedShapes ) : CreateShapeCallback( rFilter ), - maFragmentPath( rFragmentPath ) + maFragmentPath( rFragmentPath ), + mbEmbedShapes( bEmbedShapes ) { } -void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& rxShape ) const +void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& rxShape, const Reference< drawing::XShapes >& rxShapes ) const { OSL_ENSURE( maFragmentPath.getLength() > 0, "CreateChartCallback::onXShapeCreated - missing chart fragment" ); if( maFragmentPath.getLength() > 0 ) try @@ -376,14 +379,17 @@ void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& r // get the XModel interface of the embedded object from the OLE shape Reference< frame::XModel > xDocModel; aShapeProp.getProperty( xDocModel, PROP_Model ); + Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW ); // load the chart data from the XML fragment chart::ChartSpaceModel aModel; mrFilter.importFragment( new chart::ChartSpaceFragment( mrFilter, maFragmentPath, aModel ) ); // convert imported chart model to chart document - Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW ); - mrFilter.getChartConverter().convertFromModel( mrFilter, aModel, xChartDoc ); + Reference< drawing::XShapes > xExternalPage; + if( !mbEmbedShapes ) + xExternalPage = rxShapes; + mrFilter.getChartConverter().convertFromModel( mrFilter, aModel, xChartDoc, xExternalPage, rxShape->getPosition(), rxShape->getSize() ); } catch( Exception& ) { @@ -392,8 +398,9 @@ void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& r // ============================================================================ -ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler& rParent, const ShapePtr& rxShape ) : - ShapeContext( rParent, ShapePtr(), rxShape ) +ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler& rParent, const ShapePtr& rxShape, bool bEmbedShapes ) : + ShapeContext( rParent, ShapePtr(), rxShape ), + mbEmbedShapes( bEmbedShapes ) { rxShape->setServiceName( "com.sun.star.drawing.OLE2Shape" ); } @@ -405,7 +412,7 @@ Reference< XFastContextHandler > ChartGraphicDataContext::createFastChildContext { AttributeList aAttribs( rxAttribs ); OUString aFragmentPath = getFragmentPathFromRelId( aAttribs.getString( R_TOKEN( id ), OUString() ) ); - CreateShapeCallbackRef xCallback( new CreateChartCallback( getFilter(), aFragmentPath ) ); + CreateShapeCallbackRef xCallback( new CreateChartCallback( getFilter(), aFragmentPath, mbEmbedShapes ) ); mpShapePtr->setCreateShapeCallback( xCallback ); } return 0; diff --git a/oox/source/drawingml/makefile.mk b/oox/source/drawingml/makefile.mk index 443c30bb16a9..e2d4ea6b8f3d 100644 --- a/oox/source/drawingml/makefile.mk +++ b/oox/source/drawingml/makefile.mk @@ -66,6 +66,7 @@ SLOFILES = \ $(SLO)$/spdefcontext.obj\ $(SLO)$/textbody.obj\ $(SLO)$/textbodycontext.obj\ + $(SLO)$/textbodyproperties.obj\ $(SLO)$/textbodypropertiescontext.obj\ $(SLO)$/textcharacterproperties.obj\ $(SLO)$/textcharacterpropertiescontext.obj\ diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 8bbfc820fca1..dea4a6a51206 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -47,6 +47,7 @@ #include #include #include +#include using rtl::OUString; using namespace ::oox::core; @@ -76,7 +77,7 @@ OUString CreateShapeCallback::onCreateXShape( const OUString& rServiceName, cons return rServiceName; } -void CreateShapeCallback::onXShapeCreated( const Reference< XShape >& ) const +void CreateShapeCallback::onXShapeCreated( const Reference< XShape >&, const Reference< XShapes >& ) const { } @@ -89,7 +90,7 @@ Shape::Shape( const sal_Char* pServiceName ) , mpCustomShapePropertiesPtr( new CustomShapeProperties ) , mpMasterTextListStyle( new TextListStyle ) , mnSubType( 0 ) -, mnIndex( 0 ) +, mnSubTypeIndex( -1 ) , mnRotation( 0 ) , mbFlipH( false ) , mbFlipV( false ) @@ -135,7 +136,7 @@ const ShapeStyleRef* Shape::getShapeStyleRef( sal_Int32 nRefType ) const void Shape::addShape( const ::oox::core::XmlFilterBase& rFilterBase, - const ThemePtr& rxTheme, + const Theme* pTheme, const Reference< XShapes >& rxShapes, const awt::Rectangle* pShapeRect, ShapeIdMap* pShapeMap ) @@ -145,7 +146,7 @@ void Shape::addShape( rtl::OUString sServiceName( msServiceName ); if( sServiceName.getLength() ) { - Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, rxTheme, rxShapes, pShapeRect, sal_False ) ); + Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, sal_False ) ); if( pShapeMap && msId.getLength() ) { @@ -155,7 +156,7 @@ void Shape::addShape( // if this is a group shape, we have to add also each child shape Reference< XShapes > xShapes( xShape, UNO_QUERY ); if ( xShapes.is() ) - addChildren( rFilterBase, *this, rxTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap ); + addChildren( rFilterBase, *this, pTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap ); } } catch( const Exception& ) @@ -184,7 +185,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape ) void Shape::addChildren( const ::oox::core::XmlFilterBase& rFilterBase, Shape& rMaster, - const ThemePtr& rxTheme, + const Theme* pTheme, const Reference< XShapes >& rxShapes, const awt::Rectangle& rClientRect, ShapeIdMap* pShapeMap ) @@ -235,14 +236,14 @@ void Shape::addChildren( pShapeRect = &aShapeRect; } } - (*aIter++)->addShape( rFilterBase, rxTheme, rxShapes, pShapeRect, pShapeMap ); + (*aIter++)->addShape( rFilterBase, pTheme, rxShapes, pShapeRect, pShapeMap ); } } Reference< XShape > Shape::createAndInsert( const ::oox::core::XmlFilterBase& rFilterBase, const rtl::OUString& rServiceName, - const ThemePtr& rxTheme, + const Theme* pTheme, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes, const awt::Rectangle* pShapeRect, sal_Bool bClearText ) @@ -365,6 +366,10 @@ Reference< XShape > Shape::createAndInsert( } rxShapes->add( mxShape ); + Reference< document::XActionLockable > xLockable( mxShape, UNO_QUERY ); + if( xLockable.is() ) + xLockable->addActionLock(); + // sj: removing default text of placeholder objects such as SlideNumberShape or HeaderShape if ( bClearText ) { @@ -383,23 +388,23 @@ Reference< XShape > Shape::createAndInsert( aFillProperties.moFillType = XML_noFill; sal_Int32 nFillPhClr = -1; - if( rxTheme.get() ) + if( pTheme ) { if( const ShapeStyleRef* pLineRef = getShapeStyleRef( XML_lnRef ) ) { - if( const LineProperties* pLineProps = rxTheme->getLineStyle( pLineRef->mnThemedIdx ) ) + if( const LineProperties* pLineProps = pTheme->getLineStyle( pLineRef->mnThemedIdx ) ) aLineProperties.assignUsed( *pLineProps ); nLinePhClr = pLineRef->maPhClr.getColor( rFilterBase ); } if( const ShapeStyleRef* pFillRef = getShapeStyleRef( XML_fillRef ) ) { - if( const FillProperties* pFillProps = rxTheme->getFillStyle( pFillRef->mnThemedIdx ) ) + if( const FillProperties* pFillProps = pTheme->getFillStyle( pFillRef->mnThemedIdx ) ) aFillProperties.assignUsed( *pFillProps ); nFillPhClr = pFillRef->maPhClr.getColor( rFilterBase ); } // if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_fillRef ) ) // { -// if( const EffectProperties* pEffectProps = rxTheme->getEffectStyle( pEffectRef->mnThemedIdx ) ) +// if( const EffectProperties* pEffectProps = pTheme->getEffectStyle( pEffectRef->mnThemedIdx ) ) // aEffectProperties.assignUsed( *pEffectProps ); // nEffectPhClr = pEffectRef->maPhClr.getColor( rFilterBase ); // } @@ -409,13 +414,23 @@ Reference< XShape > Shape::createAndInsert( aFillProperties.assignUsed( getFillProperties() ); PropertyMap aShapeProperties; + PropertyMap::const_iterator aShapePropIter; + aShapeProperties.insert( getShapeProperties().begin(), getShapeProperties().end() ); if( mxCreateCallback.get() ) - aShapeProperties.insert( mxCreateCallback->getShapeProperties().begin(), mxCreateCallback->getShapeProperties().end() ); + { + for ( aShapePropIter = mxCreateCallback->getShapeProperties().begin(); + aShapePropIter != mxCreateCallback->getShapeProperties().end(); aShapePropIter++ ) + aShapeProperties[ (*aShapePropIter).first ] = (*aShapePropIter).second; + } // add properties from textbody to shape properties if( mpTextBody.get() ) - aShapeProperties.insert( mpTextBody->getTextProperties().maPropertyMap.begin(), mpTextBody->getTextProperties().maPropertyMap.end() ); + { + for ( aShapePropIter = mpTextBody->getTextProperties().maPropertyMap.begin(); + aShapePropIter != mpTextBody->getTextProperties().maPropertyMap.end(); aShapePropIter++ ) + aShapeProperties[ (*aShapePropIter).first ] = (*aShapePropIter).second; + } // applying properties PropertySet aPropSet( xSet ); @@ -451,8 +466,8 @@ Reference< XShape > Shape::createAndInsert( TextCharacterProperties aCharStyleProperties; if( const ShapeStyleRef* pFontRef = getShapeStyleRef( XML_fontRef ) ) { - if( rxTheme.get() ) - if( const TextCharacterProperties* pCharProps = rxTheme->getFontStyle( pFontRef->mnThemedIdx ) ) + if( pTheme ) + if( const TextCharacterProperties* pCharProps = pTheme->getFontStyle( pFontRef->mnThemedIdx ) ) aCharStyleProperties.assignUsed( *pCharProps ); aCharStyleProperties.maCharColor.assignIfUsed( pFontRef->maPhClr ); } @@ -461,11 +476,13 @@ Reference< XShape > Shape::createAndInsert( getTextBody()->insertAt( rFilterBase, xText, xAt, aCharStyleProperties, mpMasterTextListStyle ); } } + if( xLockable.is() ) + xLockable->removeActionLock(); } // use a callback for further processing on the XShape (e.g. charts) if( mxShape.is() && mxCreateCallback.get() ) - mxCreateCallback->onXShapeCreated( mxShape ); + mxCreateCallback->onXShapeCreated( mxShape, rxShapes ); return mxShape; } diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx index 4ee664b1c66c..a5a1f16f5935 100644 --- a/oox/source/drawingml/shapecontext.cxx +++ b/oox/source/drawingml/shapecontext.cxx @@ -90,7 +90,7 @@ Reference< XFastContextHandler > ShapeContext::createFastChildContext( sal_Int32 break; case XML_ph: mpShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) ); - mpShapePtr->setIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); + mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); break; // nvSpPr CT_ShapeNonVisual end diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx index 3d93d5866886..56ce53767641 100644 --- a/oox/source/drawingml/shapegroupcontext.cxx +++ b/oox/source/drawingml/shapegroupcontext.cxx @@ -75,7 +75,7 @@ Reference< XFastContextHandler > ShapeGroupContext::createFastChildContext( sal_ break; case XML_ph: mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) ); - mpGroupShapePtr->setIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); + mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); break; // nvSpPr CT_ShapeNonVisual end @@ -103,7 +103,7 @@ Reference< XFastContextHandler > ShapeGroupContext::createFastChildContext( sal_ xRet.set( new GraphicShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ) ) ); break; case XML_graphicFrame: // CT_GraphicalObjectFrame - xRet.set( new GraphicalObjectFrameContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.OLE2Shape" ) ) ) ); + xRet.set( new GraphicalObjectFrameContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.OLE2Shape" ) ), true ) ); break; } if( !xRet.is() ) diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx index 9a197ee691bf..8de730849b24 100644 --- a/oox/source/drawingml/textbodycontext.cxx +++ b/oox/source/drawingml/textbodycontext.cxx @@ -109,7 +109,7 @@ Reference< XFastContextHandler > TextParagraphContext::createFastChildContext( s xRet.set( new TextParagraphPropertiesContext( *this, xAttribs, mrParagraph.getProperties() ) ); break; case NMSP_DRAWINGML|XML_endParaRPr: - xRet.set( new TextParagraphPropertiesContext( *this, xAttribs, mrParagraph.getEndProperties() ) ); + xRet.set( new TextCharacterPropertiesContext( *this, xAttribs, mrParagraph.getEndProperties() ) ); break; } diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx new file mode 100644 index 000000000000..afd4766b0106 --- /dev/null +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -0,0 +1,58 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: textbodyproperties.cxx,v $ + * $Revision: 1.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "oox/drawingml/textbodyproperties.hxx" +#include +#include "properties.hxx" +#include "tokens.hxx" + +namespace oox { +namespace drawingml { + +// ============================================================================ + +TextBodyProperties::TextBodyProperties() +{ +} + +void TextBodyProperties::pushToPropMap( PropertyMap& rPropMap ) const +{ + rPropMap.insert( maPropertyMap.begin(), maPropertyMap.end() ); + + // #160799# fake different vertical text modes by top-bottom writing mode + if( moVert.get( XML_horz ) != XML_horz ) + rPropMap[ PROP_TextWritingMode ] <<= ::com::sun::star::text::WritingMode_TB_RL; +} + +// ============================================================================ + +} // namespace drawingml +} // namespace oox + diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index 291af2687149..ec605a3adadd 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -28,6 +28,8 @@ #include "oox/drawingml/textbodypropertiescontext.hxx" #include +#include +#include #include "oox/drawingml/textbodyproperties.hxx" #include "oox/drawingml/drawingmltypes.hxx" #include "oox/helper/attributelist.hxx" @@ -38,6 +40,7 @@ using ::rtl::OUString; using namespace ::oox::core; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; using namespace ::com::sun::star::xml::sax; @@ -56,7 +59,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, // ST_TextWrappingType sal_Int32 nWrappingType = aAttribs.getToken( XML_wrap, XML_square ); - mrTextBodyProp.maPropertyMap[ PROP_TextWordWrap ] <<= (nWrappingType == XML_square); + mrTextBodyProp.maPropertyMap[ PROP_TextWordWrap ] <<= static_cast< sal_Bool >( nWrappingType == XML_square ); // ST_Coordinate OUString sValue; @@ -78,7 +81,17 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, // ST_TextAnchoringType -// sal_Int32 nAnchoringType = xAttributes->getOptionalValueToken( XML_anchor, XML_t ); + drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP ); + switch( xAttributes->getOptionalValueToken( XML_anchor, XML_t ) ) + { + case XML_b : eVA = drawing::TextVerticalAdjust_BOTTOM; break; + case XML_dist : + case XML_just : + case XML_ctr : eVA = drawing::TextVerticalAdjust_CENTER; break; + default: + case XML_t : eVA = drawing::TextVerticalAdjust_TOP; break; + } + mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA; // bool bAnchorCenter = aAttribs.getBool( XML_anchorCtr, false ); diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx index 6797b8336c02..cfba04a7b44b 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -56,13 +56,20 @@ TextCharacterPropertiesContext::TextCharacterPropertiesContext( , mrTextCharacterProperties( rTextCharacterProperties ) { AttributeList aAttribs( rXAttributes ); - mrTextCharacterProperties.moLang = aAttribs.getString( XML_lang ); - mrTextCharacterProperties.moHeight = aAttribs.getInteger( XML_sz ); - mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u ); - mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike ); -// mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap ); - mrTextCharacterProperties.moBold = aAttribs.getBool( XML_b ); - mrTextCharacterProperties.moItalic = aAttribs.getBool( XML_i ); + if ( aAttribs.hasAttribute( XML_lang ) ) + mrTextCharacterProperties.moLang = aAttribs.getString( XML_lang ); + if ( aAttribs.hasAttribute( XML_sz ) ) + mrTextCharacterProperties.moHeight = aAttribs.getInteger( XML_sz ); + if ( aAttribs.hasAttribute( XML_u ) ) + mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u ); + if ( aAttribs.hasAttribute( XML_strike ) ) + mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike ); + +// mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap ); + if ( aAttribs.hasAttribute( XML_b ) ) + mrTextCharacterProperties.moBold = aAttribs.getBool( XML_b ); + if ( aAttribs.hasAttribute( XML_i ) ) + mrTextCharacterProperties.moItalic = aAttribs.getBool( XML_i ); // TODO /* todo: we need to be able to iterate over the XFastAttributes diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 1ff78541243e..a4bef1a5013c 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -29,6 +29,7 @@ #include "oox/drawingml/drawingmltypes.hxx" #include +#include "oox/helper/propertyset.hxx" #include #include #include @@ -78,11 +79,21 @@ void TextParagraph::insertAt( xText->insertControlCharacter( xStart, ControlCharacter::APPEND_PARAGRAPH, sal_False ); xAt->gotoEnd( sal_True ); } - - for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt ) + if ( maRuns.begin() == maRuns.end() ) { - (*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle ); - nParagraphSize += (*aIt)->getText().getLength(); + PropertySet aPropSet( xStart ); + + TextCharacterProperties aTextCharacterProps( aTextCharacterStyle ); + aTextCharacterProps.assignUsed( maEndProperties ); + aTextCharacterProps.pushToPropSet( aPropSet, rFilterBase ); + } + else + { + for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt ) + { + (*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle ); + nParagraphSize += (*aIt)->getText().getLength(); + } } xAt->gotoEnd( sal_True ); @@ -94,7 +105,6 @@ void TextParagraph::insertAt( pTextParagraphStyle->pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize ); fCharacterSize = pTextParagraphStyle->getCharHeightPoints( 18 ); } - maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize ); // empty paragraphs do not have bullets in ppt diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini index 645bb2bb7825..618e89c996e0 100644 --- a/oox/source/dump/biffdumper.ini +++ b/oox/source/dump/biffdumper.ini @@ -358,7 +358,7 @@ multilist=RECORD-NAMES-BIFF5 # chart records exclude=0x1004,0x102D,0x102F,0x1036,0x1037,0x1038,0x103B 0x1040=CHRADARAREA,CHAXESSET,,CHLEGENDENTRY,CHPROPERTIES,CHSERGROUP,CHUSEDAXESSETS, - 0x1048=CHPIVOTREF,,CHSERPARENT,CHSERTRENDLINE,,,CHFORMAT,CHPOS + 0x1048=CHPIVOTREF,,CHSERPARENT,CHSERTRENDLINE,,,CHFORMAT,CHFRAMEPOS 0x1050=CHFORMATRUNS,CHSOURCELINK,,,,,, 0x1058=,,,CHSERERRORBAR,,CHSERIESFORMAT,, end @@ -976,10 +976,11 @@ end shortlist=CHPROPERTIES-EMPTYCELLS,0,do-not-plot,as-zero,interpolated flagslist=CHPROPERTIES-FLAGS - 0x0001=manual-format + 0x0001=manual-series 0x0002=plot-visible-only 0x0004=fixed-size 0x0008=manual-plotarea + 0x0010=apply-plotarea-pos end # CHSCATTER ------------------------------------------------------------------ @@ -1039,7 +1040,7 @@ shortlist=CHTEXT-HORALIGN,1,left,center,right,block,distribute shortlist=CHTEXT-VERALIGN,1,top,center,bottom,block,distribute shortlist=CHTEXT-FILLMODE,1,transparent,opaque -combilist=CHTEXT-FLAGS-BIFF2 +flagslist=CHTEXT-FLAGS-BIFF2 0x0001=auto-color 0x0002=show-symbol 0x0004=show-value diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx index bbd8c78d1a10..599687f5bd50 100644 --- a/oox/source/dump/dffdumper.cxx +++ b/oox/source/dump/dffdumper.cxx @@ -36,6 +36,30 @@ namespace dump { // ============================================================================ +namespace { + +const sal_uInt16 DFF_ID_BSE = 0xF007; /// BLIP store entry. +const sal_uInt16 DFF_ID_BSTORECONTAINER = 0xF001; /// BLIP store container. +const sal_uInt16 DFF_ID_CHILDANCHOR = 0xF00F; /// Child anchor (in groups). +const sal_uInt16 DFF_ID_CLIENTANCHOR = 0xF010; /// Client anchor. +const sal_uInt16 DFF_ID_DG = 0xF008; /// Drawing. +const sal_uInt16 DFF_ID_DGG = 0xF006; /// Drawing group. +const sal_uInt16 DFF_ID_OPT = 0xF00B; /// Property set. +const sal_uInt16 DFF_ID_OPT2 = 0xF121; /// Secondary property set. +const sal_uInt16 DFF_ID_OPT3 = 0xF122; /// Ternary property set. +const sal_uInt16 DFF_ID_SP = 0xF00A; /// Shape. +const sal_uInt16 DFF_ID_SPGR = 0xF009; /// Shape group. +const sal_uInt16 DFF_ID_SPLITMENUCOLORS = 0xF11E; /// Current toolbar colors. + +const sal_uInt16 DFF_OPT_IDMASK = 0x3FFF; +const sal_uInt16 DFF_OPT_PICTURE = 0x4000; +const sal_uInt16 DFF_OPT_COMPLEX = 0x8000; +const sal_uInt16 DFF_OPT_FLAGSMASK = 0x003F; + +} // namespace + +// ============================================================================ + void DffStreamObject::construct( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName ) { SequenceRecordObjectBase::construct( rParent, rxStrm, rSysFileName, "DFF-RECORD-NAMES" ); @@ -62,10 +86,12 @@ void DffStreamObject::implWriteExtHeader() const sal_Char* pcListName = "DFF-RECORD-INST"; switch( getRecId() ) { - case 0xF001: pcListName = "DFFBSTORECONT-RECORD-INST"; break; // DFFBSTORECONTAINER contains BLIP count - case 0xF007: pcListName = "DFFBSE-RECORD-INST"; break; // DFFBSE contains BLIP type - case 0xF00A: pcListName = "DFFSP-RECORD-INST"; break; // DFFSP contains shape type - case 0xF00B: pcListName = "DFFOPT-RECORD-INST"; break; // DFFOPT contains property count + case DFF_ID_BSE: pcListName = "DFFBSE-RECORD-INST"; break; // BLIP type + case DFF_ID_BSTORECONTAINER: pcListName = "DFFBSTORECONT-RECORD-INST"; break; // BLIP count + case DFF_ID_DG: pcListName = "DFFDG-RECORD-INST"; break; // drawing ID + case DFF_ID_OPT: pcListName = "DFFOPT-RECORD-INST"; break; // property count + case DFF_ID_SP: pcListName = "DFFSP-RECORD-INST"; break; // shape type + case DFF_ID_SPLITMENUCOLORS: pcListName = "DFFSPLITMENUC-RECORD-INST"; break; // number of colors } MultiItemsGuard aMultiGuard( out() ); writeHexItem( "instance", mnInstVer, pcListName ); @@ -76,7 +102,7 @@ void DffStreamObject::implDumpRecordBody() { switch( getRecId() ) { - case 0xF007: // DFFBSE + case DFF_ID_BSE: dumpDec< sal_uInt8 >( "win-type", "DFFBSE-TYPE" ); dumpDec< sal_uInt8 >( "mac-type", "DFFBSE-TYPE" ); dumpGuid( "guid" ); @@ -89,26 +115,63 @@ void DffStreamObject::implDumpRecordBody() dumpUnused( 2 ); break; - case 0xF00A: // DFFSP - dumpHex< sal_uInt32 >( "shape-id", "CONV-DEC" ); - dumpHex< sal_uInt32 >( "shape-flags", "DFFSP-FLAGS" ); + case DFF_ID_CHILDANCHOR: + dumpDec< sal_uInt32 >( "left" ); + dumpDec< sal_uInt32 >( "top" ); + dumpDec< sal_uInt32 >( "right" ); + dumpDec< sal_uInt32 >( "bottom" ); break; - case 0xF00B: // DFFOPT + case DFF_ID_CLIENTANCHOR: + implDumpClientAnchor(); + break; + + case DFF_ID_DG: + dumpDec< sal_uInt32 >( "shape-count" ); + dumpHex< sal_uInt32 >( "max-shape-id", "CONV-DEC" ); + break; + + case DFF_ID_DGG: { - sal_uInt16 nPropCount = getInst(); - out().resetItemIndex(); - for( sal_uInt16 nPropIdx = 0; !in().isEof() && (nPropIdx < nPropCount); ++nPropIdx ) + dumpHex< sal_uInt32 >( "max-shape-id", "CONV-DEC" ); + sal_uInt32 nClusters = dumpDec< sal_uInt32 >( "id-cluster-count" ); + dumpDec< sal_uInt32 >( "shape-count" ); + dumpDec< sal_uInt32 >( "drawing-count" ); + out().resetItemIndex( 1 ); + TableGuard aTabGuard( out(), 15, 16 ); + for( sal_uInt32 nCluster = 1; !in().isEof() && (nCluster < nClusters); ++nCluster ) { - sal_uInt16 nPropId = dumpDffOptPropHeader(); - IndentGuard aIndent( out() ); - dumpDffOptPropValue( nPropId, in().readuInt32() ); + MultiItemsGuard aMultiGuard( out() ); + writeEmptyItem( "#cluster" ); + dumpDec< sal_uInt32 >( "drawing-id" ); + dumpHex< sal_uInt32 >( "next-free-id", "CONV-DEC" ); } } break; - case 0xF010: // DFFCLIENTANCHOR - implDumpClientAnchor(); + case DFF_ID_OPT: + case DFF_ID_OPT2: + case DFF_ID_OPT3: + dumpDffOpt(); + break; + + case DFF_ID_SP: + dumpHex< sal_uInt32 >( "shape-id", "CONV-DEC" ); + dumpHex< sal_uInt32 >( "shape-flags", "DFFSP-FLAGS" ); + break; + + case DFF_ID_SPGR: + dumpDec< sal_uInt32 >( "left" ); + dumpDec< sal_uInt32 >( "top" ); + dumpDec< sal_uInt32 >( "right" ); + dumpDec< sal_uInt32 >( "bottom" ); + break; + + case DFF_ID_SPLITMENUCOLORS: + dumpDffSimpleColor( "fill-color" ); + dumpDffSimpleColor( "line-color" ); + dumpDffSimpleColor( "shadow-color" ); + dumpDffSimpleColor( "3d-color" ); break; } } @@ -121,6 +184,126 @@ void DffStreamObject::constructDffObj() { mnInstVer = 0; mnRealSize = 0; + if( SequenceRecordObjectBase::implIsValid() ) + { + maSimpleProps.insertFormats( cfg().getNameList( "DFFOPT-SIMPLE-PROPERTIES" ) ); + maComplexProps.insertFormats( cfg().getNameList( "DFFOPT-COMPLEX-PROPERTIES" ) ); + } +} + +sal_uInt32 DffStreamObject::dumpDffSimpleColor( const String& rName ) +{ + return dumpHex< sal_uInt32 >( rName, "DFF-SIMPLE-COLOR" ); +} + +sal_uInt32 DffStreamObject::dumpDffColor( const String& rName ) +{ + return dumpHex< sal_uInt32 >( rName, "DFF-COLOR" ); +} + +namespace { + +enum PropType { PROPTYPE_BINARY, PROPTYPE_STRING, PROPTYPE_BLIP, PROPTYPE_COLORARRAY }; + +struct PropInfo +{ + OUString maName; + PropType meType; + sal_uInt16 mnId; + sal_uInt32 mnSize; + inline explicit PropInfo( const OUString& rName, PropType eType, sal_uInt16 nId, sal_uInt32 nSize ) : + maName( rName ), meType( eType ), mnId( nId ), mnSize( nSize ) {} +}; + +typedef ::std::vector< PropInfo > PropInfoVector; + +} // namespace + +void DffStreamObject::dumpDffOpt() +{ + sal_uInt16 nPropCount = getInst(); + PropInfoVector aPropInfos; + out().resetItemIndex(); + for( sal_uInt16 nPropIdx = 0; !in().isEof() && (nPropIdx < nPropCount); ++nPropIdx ) + { + sal_uInt16 nPropId = dumpDffOptPropHeader(); + sal_uInt16 nBaseId = nPropId & DFF_OPT_IDMASK; + sal_uInt32 nValue = in().readuInt32(); + + IndentGuard aIndent( out() ); + if( getFlag( nPropId, DFF_OPT_COMPLEX ) ) + { + writeHexItem( "complex-size", nValue, "CONV-DEC" ); + String aName; + PropType eType = PROPTYPE_BINARY; + ItemFormatMap::const_iterator aIt = maComplexProps.find( nBaseId ); + if( aIt != maComplexProps.end() ) + { + const ItemFormat& rItemFmt = aIt->second; + aName = rItemFmt.maItemName; + if( rItemFmt.maListName.equalsAscii( "binary" ) ) + eType = PROPTYPE_BINARY; + else if( rItemFmt.maListName.equalsAscii( "string" ) ) + eType = PROPTYPE_STRING; + else if( rItemFmt.maListName.equalsAscii( "blip" ) ) + eType = PROPTYPE_BLIP; + else if( rItemFmt.maListName.equalsAscii( "colorarray" ) ) + eType = PROPTYPE_COLORARRAY; + } + aPropInfos.push_back( PropInfo( aName( "property-data" ), eType, nBaseId, nValue ) ); + } + else + { + ItemFormatMap::const_iterator aIt = maSimpleProps.find( nBaseId ); + if( aIt != maSimpleProps.end() ) + { + const ItemFormat& rItemFmt = aIt->second; + // flags always at end of block of 64 properties + if( (nBaseId & DFF_OPT_FLAGSMASK) == DFF_OPT_FLAGSMASK ) + { + FlagsList* pFlagsList = dynamic_cast< FlagsList* >( cfg().getNameList( rItemFmt.maListName ).get() ); + sal_Int64 nOldIgnoreFlags = 0; + if( pFlagsList ) + { + nOldIgnoreFlags = pFlagsList->getIgnoreFlags(); + pFlagsList->setIgnoreFlags( nOldIgnoreFlags | 0xFFFF0000 | ~(nValue >> 16) ); + } + writeValueItem( rItemFmt, nValue ); + if( pFlagsList ) + pFlagsList->setIgnoreFlags( nOldIgnoreFlags ); + } + else + writeValueItem( rItemFmt, nValue ); + } + else + writeHexItem( "value", nValue ); + } + } + + out().resetItemIndex(); + for( PropInfoVector::iterator aIt = aPropInfos.begin(), aEnd = aPropInfos.end(); !in().isEof() && (aIt != aEnd); ++aIt ) + { + out().startMultiItems(); + writeEmptyItem( "#complex-data" ); + writeHexItem( "id", aIt->mnId, "DFFOPT-PROPERTY-NAMES" ); + out().endMultiItems(); + IndentGuard aIndent( out() ); + switch( aIt->meType ) + { + case PROPTYPE_BINARY: + dumpBinary( aIt->maName, aIt->mnSize ); + break; + case PROPTYPE_STRING: + dumpUnicodeArray( aIt->maName, aIt->mnSize / 2, true ); + break; + case PROPTYPE_BLIP: + dumpBinary( aIt->maName, aIt->mnSize ); + break; + case PROPTYPE_COLORARRAY: + dumpBinary( aIt->maName, aIt->mnSize ); + break; + } + } } sal_uInt16 DffStreamObject::dumpDffOptPropHeader() @@ -131,28 +314,6 @@ sal_uInt16 DffStreamObject::dumpDffOptPropHeader() return dumpHex< sal_uInt16 >( "id", "DFFOPT-PROPERTY-ID" ); } -void DffStreamObject::dumpDffOptPropValue( sal_uInt16 nPropId, sal_uInt32 nValue ) -{ - switch( nPropId & 0x3FFF ) - { - case 127: writeHexItem( "flags", nValue, "DFFOPT-LOCK-FLAGS" ); break; - case 191: writeHexItem( "flags", nValue, "DFFOPT-TEXT-FLAGS" ); break; - case 255: writeHexItem( "flags", nValue, "DFFOPT-TEXTGEO-FLAGS" ); break; - case 319: writeHexItem( "flags", nValue, "DFFOPT-PICTURE-FLAGS" ); break; - case 383: writeHexItem( "flags", nValue, "DFFOPT-GEO-FLAGS" ); break; - case 447: writeHexItem( "flags", nValue, "DFFOPT-FILL-FLAGS" ); break; - case 511: writeHexItem( "flags", nValue, "DFFOPT-LINE-FLAGS" ); break; - case 575: writeHexItem( "flags", nValue, "DFFOPT-SHADOW-FLAGS" ); break; - case 639: writeHexItem( "flags", nValue, "DFFOPT-PERSP-FLAGS" ); break; - case 703: writeHexItem( "flags", nValue, "DFFOPT-3DOBJ-FLAGS" ); break; - case 767: writeHexItem( "flags", nValue, "DFFOPT-3DSTYLE-FLAGS" ); break; - case 831: writeHexItem( "flags", nValue, "DFFOPT-SHAPE1-FLAGS" ); break; - case 895: writeHexItem( "flags", nValue, "DFFOPT-CALLOUT-FLAGS" ); break; - case 959: writeHexItem( "flags", nValue, "DFFOPT-SHAPE2-FLAGS" ); break; - default: writeHexItem( "value", nValue ); - } -} - // ============================================================================ } // namespace dump diff --git a/oox/source/dump/dffdumper.ini b/oox/source/dump/dffdumper.ini index 9c3184b275e5..c33d733c6bd8 100644 --- a/oox/source/dump/dffdumper.ini +++ b/oox/source/dump/dffdumper.ini @@ -12,7 +12,7 @@ multilist=DFF-RECORD-NAMES 0xF010=DFFCLIENTANCHOR,DFFCLIENTDATA,DFFCONNECTORRULE,DFFALIGNRULE,DFFARCRULE,DFFCLIENTRULE,DFFCLASSID,DFFCALLOUTRULE # 0xF018-0xF117 reserved for pictures 0xF118=DFFREGROUPITEM,DFFSELECTION,DFFCOLORMRU,,,DFFDELETEDPSPL,DFFSPLITMENUCOLORS,DFFOLEOBJECT - 0xF120=DFFCOLORSCHEME,,DFFUSERDEFPROP + 0xF120=DFFCOLORSCHEME,DFFOPT2,DFFOPT3 end combilist=DFF-RECORD-INST @@ -25,13 +25,60 @@ constlist=DFF-RECORD-VERSION 15=container end -# DFFBSTORECONTAINER --------------------------------------------------------- - -combilist=DFFBSTORECONT-RECORD-INST - include=DFF-RECORD-INST - 0xFFF0=uint16,dec,blip-count +combilist=DFF-SIMPLE-COLOR + 0x000000FF=uint8,dec,red,,filter=0x10000000~0x00000000 + 0x0000FF00=uint8,dec,green,,filter=0x10000000~0x00000000 + 0x00FF0000=uint8,dec,blue,,filter=0x10000000~0x00000000 + 0x000000FF=uint8,dec,scheme-idx,,filter=0x10000000~0x10000000 + 0x10000000=!rgb!scheme + ignore=0x08000000 end +combilist=DFF-COLOR + 0x0000FFFF=uint16,dec,palette-idx,,filter=0xFF000000~0x01000000 + 0x000000FF=uint8,dec,red,,filter=0xF9000000~0x00000000 + 0x0000FF00=uint8,dec,green,,filter=0xF9000000~0x00000000 + 0x00FF0000=uint8,dec,blue,,filter=0xF9000000~0x00000000 + 0x000000FF=uint8,dec,scheme-idx,,filter=0xFF000000~0x08000000 + 0x0000FFFF=uint16,dec,system-idx,DFF-SYSTEMCOLOR,filter=0xFF000000~0x10000000 + 0x00FF0000=uint16,dec,mod-by,,filter=0xFF000000~0x10000000 + 0x01000000=palette-idx + 0x02000000=palette-rgb + 0x04000000=system-rgb + 0x08000000=scheme-idx + 0x10000000=system-idx +end + +combilist=DFF-SYSTEMCOLOR + 0x00FF=uint8,dec,color-id,DFF-SYSTEMCOLOR-ID + 0x0F00=uint8,dec,mod,DFF-SYSTEMCOLOR-MOD + 0x2000=invert-after + 0x4000=half-invert-after + 0x8000=grey-before +end + +constlist=DFF-SYSTEMCOLOR-ID + include=SYSTEMCOLOR + 0xF0=shape-fill + 0xF1=shape-line-or-fill + 0xF2=shape-line + 0xF3=shape-shadow + 0xF4=current-or-last-used + 0xF5=shape-fill-back + 0xF6=shape-line-back + 0xF7=shape-fill-or-line +end + +shortlist=DFF-SYSTEMCOLOR-MOD,0,none,darken-by,lighten-by,add-grey-by,sub-grey-by,reverse-sub-grey-by,monochrome-by + +combilist=DFF-COLORMOD + 0x00000300=uint8,dec,type,DFF-COLORMOD-TYPE + 0x00FF0000=uint8,dec,level + ignore=0x200000FF +end + +shortlist=DFF-COLORMOD-TYPE,0,none,shade,tint + # DFFBSE --------------------------------------------------------------------- combilist=DFFBSE-RECORD-INST @@ -46,6 +93,507 @@ end shortlist=DFFBSE-USAGE,0,default,texture +# DFFBSTORECONTAINER --------------------------------------------------------- + +combilist=DFFBSTORECONT-RECORD-INST + include=DFF-RECORD-INST + 0xFFF0=uint16,dec,blip-count +end + +# DFFDG ---------------------------------------------------------------------- + +combilist=DFFDG-RECORD-INST + include=DFF-RECORD-INST + 0xFFF0=uint16,dec,drawing-id +end + +# DFFOPT --------------------------------------------------------------------- + +combilist=DFFOPT-RECORD-INST + include=DFF-RECORD-INST + 0xFFF0=uint16,dec,property-count +end + +combilist=DFFOPT-PROPERTY-ID + 0x3FFF=uint16,dec,id,DFFOPT-PROPERTY-NAMES + 0x4000=picture + 0x8000=complex +end + +multilist=DFFOPT-PROPERTY-NAMES + # 0x0000-0x003F: transformation + 0x0000=transf-left,transf-top,transf-right,transf-bottom,transf-rotation,transf-page + 0x003F=transf-flags + # 0x0040-0x007F: protection + 0x007F=prot-flags + # 0x0080-0x00BF: text + 0x0080=text-id,text-left,text-top,text-right,text-bottom,text-wrap-mode,text-scale,text-anchor-mode + 0x0088=text-flow,text-font-orient,text-next-shape,text-bidi + 0x00BF=text-flags + # 0x00C0-0x00FF: text geometry + 0x00C0=textgeo-unicode-string,textgeo-rtf-string,textgeo-curve-align,textgeo-def-size,textgeo-spacing,textgeo-font,textgeo-css-font + 0x00FF=textgeo-flags + # 0x0100-0x013F: picture (BLIP) + 0x0100=blip-crop-top,blip-crop-bottom,blip-crop-left,blip-crop-right,blip-id,blip-name,blip-opt,blip-transparency-color + 0x0108=blip-contrast,blip-brightness,blip-gamma,blip-ole-id,blip-double-cr-mod,blip-fill-cr-mod,blip-line-cr-mod,blip-print-id + 0x0110=blip-print-name,blip-print-opt,blip-movie,,,blip-transparency-color-ext,,blip-transparency-color-ext-mod + 0x0118,,blip-recolor,blip-recolor,blip-recolor-ext,,blip-recolor-ext-mod + 0x013F=blip-flags + # 0x0140-0x017F: shape geometry + 0x0140=geo-left,geo-top,geo-right,geo-bottom,geo-shape-path,geo-vertices,geo-segment-info,geo-adjust-1 + 0x0148=geo-adjust-2,geo-adjust-3,geo-adjust-4,geo-adjust-5,geo-adjust-6,geo-adjust-7,geo-adjust-8, + 0x0150=,geo-connect-sites,geo-connect-sites-dir,geo-stretch-x,geo-stretch-y,geo-handles,geo-guides,geo-inscribe + 0x0158=geo-connect-points + 0x017F=geo-flags + # 0x0180-0x01BF: fill style + 0x0180=fill-type,fill-color,fill-opacity,fill-back-color,fill-back-opacity,fill-cr-mod,fill-blip,fill-blip-name + 0x0188=fill-blip-opt,fill-width,fill-height,fill-angle,fill-focus,fill-to-left,fill-to-top,fill-to-right + 0x0190=fill-to-bottom,fill-rect-left,fill-rect-top,fill-rect-right,fill-rect-bottom,fill-dz-type,fill-shade-preset,fill-shade-colors + 0x0198=fill-origin-x,fill-origin-y,fill-shape-origin-x,fill-shape-origin-y,fill-shade-type,,fill-color-ext, + 0x01A0=fill-color-ext-mod,,fill-back-color-ext,,fill-back-color-ext-mod + 0x01BF=fill-flags + # 0x01C0-0x01FF: line style + 0x01C0=line-color,line-opacity,line-back-color,line-cr-mod,line-type,line-fill-blip,line-fill-blip-name,line-fill-blip-opt + 0x01C8=line-fill-width,line-fill-height,line-fill-dz-type,line-width,line-miter-limit,line-style,line-dash,line-dash-style + 0x01D0=line-start-arrow-head,line-end-arrow-head,line-start-arrow-width,line-start-arrow-length,line-end-arrow-width,line-end-arrow-length,line-join-style,line-end-cap-style + 0x01D8=,line-color-ext,,line-color-ext-mod,,line-back-color-ext,,line-back-color-ext-mod + 0x01FF=line-flags + # 0x0200-0x023F: shadow style + 0x0200=shadow-type,shadow-color,shadow-highlight,shadow-cr-mod,shadow-opacity,shadow-offset-x,shadow-offset-y,shadow-2nd-offset-x + 0x0208=shadow-2nd-offset-y,,,,,,, + 0x0210=shadow-origin-x,shadow-origin-y,shadow-color-ext,,shadow-color-ext-mod,,shadow-highlight-ext, + 0x0218=shadow-highlight-ext-mod + 0x023F=shadow-flags + # 0x0240-0x027F: perspective + 0x0240=persp-type,persp-offset-x,persp-offsety,persp-scale-x-to-x,persp-scale-y-to-x,persp-scale-x-to-y,persp-scale-y-to-y,persp-persp-x + 0x0248=persp-persp-y,persp-weight,persp-origin-x,persp-origin-y + 0x027F=persp-flags + # 0x0280-0x02BF: 3d object + 0x0280=3dobj-specular-amt,3dobj-diffuse-amt,3dobj-shininess,3dobj-edge-thickness,3dobj-extrude-forward,3dobj-extrude-backward,3dobj-extrude-plane,3dobj-extrusion-color + 0x0288=3dobj-cr-mod,3dobj-extrusion-color-ext,,3dobj-extrusion-color-ext-mod + 0x02BF=3dobj-flags + # 0x02C0-0x02FF: 3d style + 0x02C0=3dstyle-y-rotation,3dstyle-x-rotation,3dstyle-rotation-axis-x,3dstyle-rotation-axis-y,3dstyle-rotation-axis-z,3dstyle-rotation,3dstyle-rotation-center-x,3dstyle-rotation-center-y + 0x02C8=3dstyle-rotation-center-z,3dstyle-render-mode,3dstyle-tolerance,3dstyle-view-point-x,3dstyle-view-point-y,3dstyle-view-point-z,3dstyle-origin-x,3dstyle-origin-y + 0x02D0=3dstyle-skew-angle,3dstyle-skew-amount,3dstyle-ambient-intensity,3dstyle-key-light-x,3dstyle-key-light-y,3dstyle-key-light-z,3dstyle-key-light-intensity,3dstyle-fill-light-x + 0x02D8=3dstyle-fill-light-y,3dstyle-fill-light-z,3dstyle-fill-light-intensity + 0x02FF=3dstyle-flags + # 0x0300-0x033F: shape + 0x0300=,shape-master,,shape-connect-style,shape-bw-mod,shape-bw-mode-pure-bw,shape-bw-mode-bw,shape-discuss-anchor-id + 0x0308=,shape-dia-layout,shape-dia-node-kind,shape-dia-layout-mru,shape-equation-xml + 0x033F=shape-flags + # 0x0340-0x037F: callout + 0x0340=callout-type,callout-box-distance,callout-angle,callout-drop-type,callout-drop-pos,callout-length + 0x037F=callout-flags + # 0x0380-0x03BF: group or shape + 0x0380=group-name,group-description,group-hyperlink,group-wrap-polygon-vertices,group-wrap-left,group-wrap-top,group-wrap-right,group-wrap-bottom + 0x0388=group-regroup-id,,,,,group-tooltip,group-script,group-pos-h + 0x0390=group-pos-rel-h,group-pos-v,group-pos-rel-v,group-rel-width-hr,group-align-hr,group-height-hr,group-width-hr,group-script-ext-attr + 0x0398=group-script-lang,,group-script-lang-attr,group-border-top-color,group-border-left-color,group-border-bottom-color,group-border-right-color,group-table-props + 0x03A0=group-table-row-props,,,,,group-web-bot,, + 0x03A8=,group-metro-blob,group-rel-z-order, + 0x03BF=group-flags + # 0x03C0-0x03FF: relative transformation + 0x03C0=reltransf-left,reltransf-top,reltransf-right,reltransf-bottom,reltransf-rotation,reltransf-page + 0x03FF=reltransf-flags + # 0x0400-0x043F: unknown HTML + 0x0400=,,uhtml-line-id,uhtml-fill-id,uhtml-pic-id,uhtml-path-id,uhtml-shadow-id,uhtml-persp-id + 0x0408=uhtml-text-path-id,uhtml-formulae-id,uhtml-handles-id,uhtml-callout-id,uhtml-lock-id,uhtml-text-id,uhtml-3d-id + 0x043F=uhtml-flags + # 0x0500-0x053F: diagram + 0x0500=dia-type,dia-style,,,dia-rel-table,dia-scale-x,dia-scale-y,dia-def-fontsize + 0x0508=dia-constrain-bounds,dia-base-text-scale + 0x053F=dia-flags + # 0x0540-0x057F: left line style + 0x0540=lline-color,lline-opacity,lline-back-color,lline-cr-mod,lline-type,lline-fill-blip,lline-fill-blip-name,lline-fill-blip-opt + 0x0548=lline-fill-width,lline-fill-height,lline-fill-dz-type,lline-width,lline-miter-limit,lline-style,lline-dash,lline-dash-style + 0x0550=lline-start-arrow-head,lline-end-arrow-head,lline-start-arrow-width,lline-start-arrow-length,lline-end-arrow-width,lline-end-arrow-length,lline-join-style,lline-end-cap-style + 0x0558=,lline-color-ext,,lline-color-ext-mod,,lline-back-color-ext,,lline-back-color-ext-mod + 0x057F=lline-flags + # 0x0580-0x05BF: top line style + 0x0580=tline-color,tline-opacity,tline-back-color,tline-cr-mod,tline-type,tline-fill-blip,tline-fill-blip-name,tline-fill-blip-opt + 0x0588=tline-fill-width,tline-fill-height,tline-fill-dz-type,tline-width,tline-miter-limit,tline-style,tline-dash,tline-dash-style + 0x0590=tline-start-arrow-head,tline-end-arrow-head,tline-start-arrow-width,tline-start-arrow-length,tline-end-arrow-width,tline-end-arrow-length,tline-join-style,tline-end-cap-style + 0x0598=,tline-color-ext,,tline-color-ext-mod,,tline-back-color-ext,,tline-back-color-ext-mod + 0x05BF=tline-flags + # 0x05C0-0x05FF: right line style + 0x05C0=rline-color,rline-opacity,rline-back-color,rline-cr-mod,rline-type,rline-fill-blip,rline-fill-blip-name,rline-fill-blip-opt + 0x05C8=rline-fill-width,rline-fill-height,rline-fill-dz-type,rline-width,rline-miter-limit,rline-style,rline-dash,rline-dash-style + 0x05D0=rline-start-arrow-head,rline-end-arrow-head,rline-start-arrow-width,rline-start-arrow-length,rline-end-arrow-width,rline-end-arrow-length,rline-join-style,rline-end-cap-style + 0x05D8=,rline-color-ext,,rline-color-ext-mod,,rline-back-color-ext,,rline-back-color-ext-mod + 0x05FF=rline-flags + # 0x0600-0x063F: bottom line style + 0x0600=bline-color,bline-opacity,bline-back-color,bline-cr-mod,bline-type,bline-fill-blip,bline-fill-blip-name,bline-fill-blip-opt + 0x0608=bline-fill-width,bline-fill-height,bline-fill-dz-type,bline-width,bline-miter-limit,bline-style,bline-dash,bline-dash-style + 0x0610=bline-start-arrow-head,bline-end-arrow-head,bline-start-arrow-width,bline-start-arrow-length,bline-end-arrow-width,bline-end-arrow-length,bline-join-style,bline-end-cap-style + 0x0618=,bline-color-ext,,bline-color-ext-mod,,bline-back-color-ext,,bline-back-color-ext-mod + 0x063F=bline-flags + # 0x0680-0x06BF: web component + 0x0680=webcomp-html,webcomp-name,webcomp-url + 0x06BF=webcomp-flags + # 0x0700-0x073F: ink data + 0x0700=ink-data + 0x073F=ink-flags + # 0x0780-0x07BF: signature line + 0x0780=,sigline-guid,sigline-provider-guid,sigline-suggested-signer,sigline-suggested-signer-info,sigline-suggested-signer-email,sigline-sign-instruction,sigline-add-xml + 0x0788=sigline-provider-url + 0x07BF=sigline-flags + # 0x07C0-0x07FF: group or shape #2 + 0x07C0=group2-rel-width,group2-rel-height,group2-rel-pos-x,group2-rel-pos-y,group2-size-rel-h,group2-size-rel-v +end + +constlist=DFFOPT-SIMPLE-PROPERTIES + # transformation + 0x003F=uint32,hex,flags,DFFOPT-TRANSFORM-FLAGS + # protection + 0x007F=uint32,hex,flags,DFFOPT-PROTECTION-FLAGS + # text + 0x00BF=uint32,hex,flags,DFFOPT-TEXT-FLAGS + # text geometry + 0x00FF=uint32,hex,flags,DFFOPT-TEXTGEO-FLAGS + # picture (BLIP) + 0x013F=uint32,hex,flags,DFFOPT-BLIP-FLAGS + # shape geometry + 0x017F=uint32,hex,flags,DFFOPT-GEO-FLAGS + # fill style + 0x0180=uint32,dec,type,DFFOPT-FILL-TYPE + 0x0181=uint32,hex,color,DFF-COLOR + 0x0182=int32,fix,opacity,CONV-FLOAT-TO-PERC + 0x0183=uint32,hex,color,DFF-COLOR + 0x0184=int32,fix,opacity,DFF-OPACITY + 0x0185=uint32,hex,color,DFF-COLOR + 0x0186=uint32,dec,blip-id + 0x0188=uint32,dec,blip-opt,DFFOPT-BLIPOPT + 0x0189=int32,dec,width + 0x018A=int32,dec,height + 0x018B=int32,fix,angle,CONV-DEG + 0x018C=int32,dec,focus,CONV-PERCENT + 0x018D=int32,fix,size,CONV-FLOAT-TO-PERC + 0x018E=int32,fix,size,CONV-FLOAT-TO-PERC + 0x018F=int32,fix,size,CONV-FLOAT-TO-PERC + 0x0190=int32,fix,size,CONV-FLOAT-TO-PERC + 0x0191=int32,fix,size,CONV-EMU-TO-CM + 0x0192=int32,fix,size,CONV-EMU-TO-CM + 0x0193=int32,fix,size,CONV-EMU-TO-CM + 0x0194=int32,fix,size,CONV-EMU-TO-CM + 0x0195=uint32,dec,type,DFFOPT-FILL-DZTYPE + 0x0196=int32,dec,preset + 0x0198=int32,fix,pos,CONV-FLOAT-TO-PERC + 0x0199=int32,fix,pos,CONV-FLOAT-TO-PERC + 0x019A=int32,fix,pos,CONV-FLOAT-TO-PERC + 0x019B=int32,fix,pos,CONV-FLOAT-TO-PERC + 0x019C=uint32,hex,type,DFFOPT-FILL-SHADETYPE + 0x019E=uint32,hex,color,DFF-COLOR + 0x01A0=uint32,hex,color-mod,DFF-COLORMOD + 0x01A2=uint32,hex,color,DFF-COLOR + 0x01A4=uint32,hex,color-mod,DFF-COLORMOD + 0x01BF=uint32,hex,flags,DFFOPT-FILL-FLAGS + # line style + 0x01C0=uint32,hex,color,DFF-COLOR + 0x01C2=uint32,hex,color,DFF-COLOR + 0x01FF=uint32,hex,flags,DFFOPT-LINE-FLAGS + # shadow style + 0x0201=uint32,hex,color,DFF-COLOR + 0x023F=uint32,hex,flags,DFFOPT-SHADOW-FLAGS + # perspective + 0x027F=uint32,hex,flags,DFFOPT-PERSP-FLAGS + # 3d object + 0x02BF=uint32,hex,flags,DFFOPT-3DOBJ-FLAGS + # 3d style + 0x02FF=uint32,hex,flags,DFFOPT-3DSTYLE-FLAGS + # shape + 0x033F=uint32,hex,flags,DFFOPT-SHAPE-FLAGS + # callout + 0x037F=uint32,hex,flags,DFFOPT-CALLOUT-FLAGS + # group or shape + 0x03BF=uint32,hex,flags,DFFOPT-GROUP-FLAGS + # relative transformation + 0x03FF=uint32,hex,flags,DFFOPT-TRANSFORM-FLAGS + # unknown HTML + 0x043F=uint32,hex,flags,DFFOPT-UHTML-FLAGS + # diagram + 0x053F=uint32,hex,flags,DFFOPT-DIAGRAM-FLAGS + # left line style + 0x0540=uint32,hex,color,DFF-COLOR + 0x0542=uint32,hex,color,DFF-COLOR + 0x057F=uint32,hex,flags,DFFOPT-LINE-FLAGS + # top line style + 0x0580=uint32,hex,color,DFF-COLOR + 0x0582=uint32,hex,color,DFF-COLOR + 0x05BF=uint32,hex,flags,DFFOPT-LINE-FLAGS + # right line style + 0x05C0=uint32,hex,color,DFF-COLOR + 0x05C2=uint32,hex,color,DFF-COLOR + 0x05FF=uint32,hex,flags,DFFOPT-LINE-FLAGS + # bottom line style + 0x0600=uint32,hex,color,DFF-COLOR + 0x0602=uint32,hex,color,DFF-COLOR + 0x063F=uint32,hex,flags,DFFOPT-LINE-FLAGS + # web component + 0x06BF=uint32,hex,flags,DFFOPT-WEBCOMP-FLAGS + # ink data + 0x073F=uint32,hex,flags,DFFOPT-INK-FLAGS + # signature line + 0x07BF=uint32,hex,flags,DFFOPT-SIGLINE-FLAGS + # group or shape #2 +end + +constlist=DFFOPT-COMPLEX-PROPERTIES + 0x0186=uint32,hex,blip,blip + 0x0187=uint32,hex,blip-name,string + 0x0197=uint32,hex,shade-colors,colorarray + 0x0380=uint32,hex,shape-name,string +end + +# common + +combilist=DFFOPT-BLIPOPT + 0x00000003=uint8,dec,type,DFFOPT-BLIPOPT-TYPE + 0x00000004=do-not-save + 0x00000008=linked +end + +shortlist=DFFOPT-BLIPOPT-TYPE,0,comment,file,url + +# transformation + +flagslist=DFFOPT-TRANSFORM-FLAGS + 0x0001=:flip-h + 0x0002=:flip-v +end + +# protection + +flagslist=DFFOPT-PROTECTION-FLAGS + 0x0001=:lock-against-grouping + 0x0002=:lock-adjust-handles + 0x0004=:lock-text + 0x0008=:lock-vertices + 0x0010=:lock-cropping + 0x0020=:lock-against-select + 0x0040=:lock-position + 0x0080=:lock-aspect-ratio + 0x0100=:lock-rotation + 0x0200=:lock-against-ungrouping +end + +# text + +flagslist=DFFOPT-TEXT-FLAGS + 0x0002=:fit-shape-to-text + 0x0008=:auto-text-margin + 0x0010=:select-text + ignore=0x0005 +end + +# text geometry + +flagslist=DFFOPT-TEXTGEO-FLAGS + 0x0001=:strike-through + 0x0002=:small-caps + 0x0004=:shadow + 0x0008=:underline + 0x0010=:italic + 0x0020=:bold + 0x0040=:no-measure-along-path + 0x0080=:normalize + 0x0100=:best-fit + 0x0200=:shrink-to-fit + 0x0400=:stretch-to-fit + 0x0800=:tightening + 0x1000=:kerning + 0x2000=:vertical + 0x4000=:has-effect + 0x8000=:reverse-rows +end + +# picture (BLIP) + +flagslist=DFFOPT-BLIP-FLAGS + 0x0001=:ole-alive + 0x0002=:bi-level-display + 0x0004=:grayscale + 0x0008=:no-hit-test + 0x0010=:loop-anim + 0x0020=:rewind-anim + 0x0040=:preserve-gray +end + +# shape geometry + +flagslist=DFFOPT-GEO-FLAGS + 0x0001=:fill-support + 0x0002=:fill-shade-shape-support + 0x0004=:fontwork-support + 0x0008=:line-support + 0x0010=:3d-support + 0x0020=:shadow-support +end + +# fill style + +shortlist=DFFOPT-FILL-TYPE,0,solid,pattern,texture,picture,edge-shade,linear-shade,shape-shade,point-shade,title-shade,background + +combilist=DFFOPT-FILL-DZTYPE + 0x00000003=uint8,dec,unit,DFFOPT-FILL-DZTYPE-UNIT + 0x0000000C=uint8,dec,aspect,DFFOPT-FILL-DZTYPE-ASPECT +end + +shortlist=DFFOPT-FILL-DZTYPE-UNIT,0,unused,emu,pixel,shape-size-rel +shortlist=DFFOPT-FILL-DZTYPE-ASPECT,0,none,fixed,prefer-largest + +flagslist=DFFOPT-FILL-SHADETYPE + 0x00000001=none + 0x00000002=gamma + 0x00000004=sigma-transfer + 0x00000008=flat-band + 0x00000010=one-color +end + +flagslist=DFFOPT-FILL-FLAGS + 0x0001=:no-fill-hit-test + 0x0002=:fill-to-rect + 0x0004=:fill-rel-to-shape + 0x0008=:hit-test-fill + 0x0010=:has-fill + 0x0020=:shape-anchor + 0x0040=:recolor-as-pic +end + +# line style + +flagslist=DFFOPT-LINE-FLAGS + 0x0001=:draw-dash-for-invisible + 0x0002=:fill-rel-to-shape + 0x0004=:hit-test-line + 0x0008=:has-line + 0x0010=:arrowhead-support + 0x0020=:inset-pen-support + 0x0040=:inset-pen + 0x0200=:opaque-back-line +end + +# shadow style + +flagslist=DFFOPT-SHADOW-FLAGS + 0x0001=:obscured-shadow + 0x0002=:has-shadow +end + +# perspective + +flagslist=DFFOPT-PERSP-FLAGS + 0x0001=:has-perspective +end + +# 3d object + +flagslist=DFFOPT-3DOBJ-FLAGS + 0x0001=:light-face + 0x0002=:extrusion-color + 0x0004=:metallic + 0x0008=:has-3d +end + +# 3d style + +flagslist=DFFOPT-3DSTYLE-FLAGS + 0x0001=:fill-color-harsh + 0x0002=:key-color-harsh + 0x0004=:parallel + 0x0008=:rotation-center-auto + 0x0010=:constrain-rotation +end + +# shape + +flagslist=DFFOPT-SHAPE-FLAGS + 0x0001=:background + 0x0004=:initiator + 0x0008=:lock-shape-type + 0x0010=:prefer-rel-resize + 0x0020=:ole-iconified + 0x0040=:flip-v-override + 0x0080=:flip-h-override + 0x0100=:policy-barcode + 0x0200=:policy-label +end + +# callout + +flagslist=DFFOPT-CALLOUT-FLAGS + 0x0001=:length-specified + 0x0002=:drop-auto + 0x0004=:minus-y + 0x0008=:minus-x + 0x0010=:has-text-border + 0x0020=:has-accent-bar + 0x0040=:is-callout +end + +# group or shape + +flagslist=DFFOPT-GROUP-FLAGS + 0x0001=:print + 0x0002=:hidden + 0x0004=:1d-adjustment + 0x0008=:is-button + 0x0010=:notify-double-click + 0x0020=:behind-doc + 0x0040=:wrap-edited + 0x0080=:script-anchor + 0x0100=:really-hidden + 0x0200=:allow-overlap + 0x0400=:user-drawn + 0x0800=:is-hr + 0x1000=:no-shade-hr + 0x2000=:standard-hr + 0x4000=:is-bullet + 0x8000=:layout-in-cell +end + +# unknown HTML + +flagslist=DFFOPT-UHTML-FLAGS + 0x0002=:fake-master + 0x0004=:ole-from-html +end + +# diagram + +flagslist=DFFOPT-DIAGRAM-FLAGS + 0x0001=:pseudo-inline + 0x0002=:do-layout + 0x0004=:reverse + 0x0008=:do-format +end + +# web component + +flagslist=DFFOPT-WEBCOMP-FLAGS + 0x0001=:is-web-component +end + +# ink data + +flagslist=DFFOPT-INK-FLAGS + 0x0001=:render-ink + 0x0002=:render-shape + 0x0004=:hit-test-ink + 0x0008=:ink-annotation +end + +# signature line + +flagslist=DFFOPT-SIGLINE-FLAGS + 0x0001=:is-signature-line + 0x0002=:show-sign-instruction + 0x0004=:show-sign-comment + 0x0008=:show-sign-date +end + +# group or shape #2 + # DFFSP ---------------------------------------------------------------------- combilist=DFFSP-RECORD-INST @@ -92,219 +640,11 @@ flagslist=DFFSP-FLAGS 0x00000800=has-shape-type end -# DFFOPT --------------------------------------------------------------------- +# DFFSPLITMENUCOLORS --------------------------------------------------------- -combilist=DFFOPT-RECORD-INST +combilist=DFFSPLITMENUC-RECORD-INST include=DFF-RECORD-INST - 0xFFF0=uint16,dec,property-count -end - -combilist=DFFOPT-PROPERTY-ID - 0x3FFF=uint16,dec,id,DFFOPT-PROPERTY-NAMES - 0x4000=picture - 0x8000=complex -end - -multilist=DFFOPT-PROPERTY-NAMES - # transform - 0x0004=rotation - # protection - 0x007F=lock-flags - # text - 0x0080=text-id,text-left,text-top,text-right,text-bottom,text-wrap-mode,text-scale,text-anchor-mode - 0x0088=text-flow,text-font-rotation,text-next-shape,text-bidi - 0x00BF=text-flags - # text geometry - 0x00C0=text-unicode-string,text-rtf-string,text-curve-align,text-def-size,text-spacing,text-font-family - 0x00FF=text-geometry-flags - # picture - 0x0100=pic-crop-top,pic-crop-bottom,pic-crop-left,pic-crop-right,pic-data,pic-file-name,pic-flags,pic-transparency-color - 0x0108=pic-contrast,pic-brightness,pic-gamma,pic-id,pic-double-cr-mod,pic-fill-cr-mod,pic-line-cr-mod,pic-data-print - 0x0110=pic-name-print,pic-flags-print - 0x013F=pic-flags - # geometry - 0x0140=geo-left,geo-top,geo-right,geo-bottom,geo-shape-path,geo-vertices,geo-segment-info,geo-adjust-1 - 0x0148=geo-adjust-2,geo-adjust-3,geo-adjust-4,geo-adjust-5,geo-adjust-6,geo-adjust-7,geo-adjust-8,geo-adjust-9 - 0x0150=geo-adjust-10,geo-connect-points,geo-stretch-x,geo-stretch-y,geo-handles,geo-formulas,geo-text-recs - 0x0158=geo-connector-type - 0x017F=geo-flags - # fill style - 0x0180=fill-type,fill-color,fill-opacity,fill-back-color,fill-back-opacity,fill-cr-mod,fill-blip,fill-blip-name - 0x0188=fill-blip-flags,fill-width,fill-height,fill-angle,fill-focus,fill-to-left,fill-to-top,fill-to-right - 0x0190=fill-to-bottom,fill-rect-left,fill-rect-top,fill-rect-right,fill-rect-bottom,fill-dz-type,fill-shade-preset,fill-shade-colors - 0x0198=fill-origin-x,fill-origin-y,fill-shape-origin-x,fill-shape-origin-y,fill-shade-type - 0x01BF=fill-flags - # line style - 0x01C0=line-color,line-opacity,line-back-color,line-cr-mod,line-type,line-fill-blip,line-fill-blip-name,line-fill-blip-flags - 0x01C8=line-fill-width,line-fill-height,line-fill-dz-type,line-width,line-miter-limit,line-style,line-dash,line-dash-style - 0x01D0=line-start-arrow-head,line-end-arrow-head,line-start-arrow-width,line-start-arrow-length,line-end-arrow-width,line-end-arrow-length,line-join-style,line-end-cap-style - 0x01FF=line-flags - # shadow style - 0x0200=shadow-type,shadow-color,shadow-highlight,shadow-cr-mod,shadow-opacity,shadow-offset-x,shadow-offset-y,shadow-2nd-offset-x - 0x0208=shadow-2nd-offset-y,shadow-scale-x-to-x,shadow-scale-y-to-x,shadow-scale-x-to-y,shadow-scale-y-to-y,shadow-persp-x,shadow-persp-y,shadow-weight - 0x0210=shadow-origin-x,shadow-origin-y - 0x023F=shadow-flags - # perspective - 0x0240=persp-type,persp-offset-x,persp-offsety,persp-scale-x-to-x,persp-scale-y-to-x,persp-scale-x-to-y,persp-scale-y-to-y,persp-persp-x - 0x0248=persp-persp-y,persp-weight,persp-origin-x,persp-origin-y - 0x027F=persp-flags - # 3d object - 0x0280=3dobj-specular-amt,3dobj-diffuse-amt,3dobj-shininess,3dobj-edge-thickness,3dobj-extrude-forward,3dobj-extrude-backward,3dobj-extrude-plane,3dobj-extrusion-color - 0x0288=3dobj-cr-mod - 0x02BF=3dobj-flags - # 3d style - 0x02C0=3dstyle-y-rotation,3dstyle-x-rotation,3dstyle-rotation-axis-x,3dstyle-rotation-axis-y,3dstyle-rotation-axis-z,3dstyle-rotation,3dstyle-rotation-center-x,3dstyle-rotation-center-y - 0x02C8=3dstyle-rotation-center-z,3dstyle-render-mode,3dstyle-tolerance,3dstyle-view-point-x,3dstyle-view-point-y,3dstyle-view-point-z,3dstyle-origin-x,3dstyle-origin-y - 0x02D0=3dstyle-skew-angle,3dstyle-skew-amount,3dstyle-ambient-intensity,3dstyle-key-light-x,3dstyle-key-light-y,3dstyle-key-light-z,3dstyle-key-light-intensity,3dstyle-fill-light-x - 0x02D8=3dstyle-fill-light-y,3dstyle-fill-light-z,3dstyle-fill-light-intensity - 0x02FF=3dstyle-flags - # shape 1 - 0x0301=,shape-master,,shape-connect-style,shape-bw-mod,shape-bw-mode-pure-bw,shape-bw-mode-bw - 0x033F=shape1-flags - # callout - 0x0340=callout-type,callout-box-distance,callout-angle,callout-drop-type,callout-drop-distance,callout-length - 0x037F=callout-flags - # shape 2 - 0x0380=shape-name,shape-description,shape-hyperlink,shape-wrap-polygon-vertices,shape-wrap-left,shape-wrap-top,shape-wrap-right,shape-wrap-bottom - 0x0388=shape-regroup-id - 0x03BF=shape2-flags -end - -flagslist=DFFOPT-LOCK-FLAGS - 0x00000001=lock-against-grouping - 0x00000002=lock-adjust-handles - 0x00000004=lock-text - 0x00000008=lock-vertices - 0x00000010=lock-cropping - 0x00000020=lock-against-select - 0x00000040=lock-position - 0x00000080=lock-aspect-ratio - 0x00000100=lock-rotation - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-TEXT-FLAGS - 0x00000001=fit-text-to-shape - 0x00000002=fit-shape-to-text - 0x00000004=rotate-text - 0x00000008=auto-text-margin - 0x00000010=select-text - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-TEXTGEO-FLAGS - 0x00000001=strike-through - 0x00000002=small-caps - 0x00000004=shadow - 0x00000008=underline - 0x00000010=italic - 0x00000020=bold - 0x00000040=no-measure-along-path - 0x00000080=stretch-height - 0x00000100=scale-on-path - 0x00000200=shrink-to-fit - 0x00000400=stretch-to-fit - 0x00000800=tightening - 0x00001000=kerning - 0x00002000=vertical - 0x00004000=has-effect - 0x00008000=reverse-rows - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-PICTURE-FLAGS - 0x00000001=ole-alive - 0x00000002=bi-level-display - 0x00000004=grayscale - 0x00000008=no-hit-test - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-GEO-FLAGS - 0x00000001=fill-support - 0x00000002=fill-shade-shape-support - 0x00000004=fontwork-support - 0x00000008=line-support - 0x00000010=3d-support - 0x00000020=shadow-support - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-FILL-FLAGS - 0x00000001=no-fill-hit-test - 0x00000002=use-large-rect - 0x00000004=register-pattern - 0x00000008=hit-test-fill - 0x00000010=has-fill - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-LINE-FLAGS - 0x00000001=draw-dash-for-invisible - 0x00000002=register-pattern - 0x00000004=hit-test-line - 0x00000008=has-line - 0x00000010=arrowhead-support - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-SHADOW-FLAGS - 0x00000001=excel5-style - 0x00000002=has-shadow - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-PERSP-FLAGS - 0x00000001=has-perspective - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-3DOBJ-FLAGS - 0x00000001=light-face - 0x00000002=extrusion-color - 0x00000004=metallic - 0x00000008=has-3d - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-3DSTYLE-FLAGS - 0x00000001=fill-color-harsh - 0x00000002=key-color-harsh - 0x00000004=parallel - 0x00000008=rotation-center-auto - 0x00000010=constrain-rotation - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-SHAPE1-FLAGS - 0x00000001=background - 0x00000002=delete-attached-object - 0x00000008=lock-shape-type - 0x00000010=prefer-rel-resize - 0x00000020=ole-iconified - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-CALLOUT-FLAGS - 0x00000001=length-specified - 0x00000002=drop-auto - 0x00000004=minus-y - 0x00000008=minus-x - 0x00000010=has-text-border - 0x00000020=has-accent-bar - 0x00000040=is-callout - ignore=0xFFFF0000 -end - -flagslist=DFFOPT-SHAPE2-FLAGS - 0x00000001=print - 0x00000002=hidden - 0x00000004=1d-adjustment - 0x00000008=action-attached - 0x00000010=notify-double-click - 0x00000020=behind-text - 0x00000040=wrap-edited - ignore=0xFFFF0000 + 0xFFF0=uint16,dec,color-count end # ============================================================================ diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 6d834e04c487..8e0e9a4e1225 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -772,6 +772,14 @@ OUString StringHelper::trimSpaces( const OUString& rStr ) return rStr.copy( nBeg, nEnd - nBeg ); } +OUString StringHelper::trimTrailingNul( const OUString& rStr ) +{ + sal_Int32 nLastPos = rStr.getLength() - 1; + if( (nLastPos >= 0) && (rStr[ nLastPos ] == 0) ) + return rStr.copy( 0, nLastPos ); + return rStr; +} + OString StringHelper::convertToUtf8( const OUString& rStr ) { return OUStringToOString( rStr, RTL_TEXTENCODING_UTF8 ); @@ -888,6 +896,25 @@ bool StringHelper::convertStringToBool( const OUString& rData ) return convertStringToInt( nData, rData ) && (nData != 0); } +OUStringPair StringHelper::convertStringToPair( const OUString& rString, sal_Unicode cSep ) +{ + OUStringPair aPair; + if( rString.getLength() > 0 ) + { + sal_Int32 nEqPos = rString.indexOf( cSep ); + if( nEqPos < 0 ) + { + aPair.first = rString; + } + else + { + aPair.first = StringHelper::trimSpaces( rString.copy( 0, nEqPos ) ); + aPair.second = StringHelper::trimSpaces( rString.copy( nEqPos + 1 ) ); + } + } + return aPair; +} + void StringHelper::convertStringToStringList( OUStringVector& orVec, const OUString& rData, bool bIgnoreEmpty ) { orVec.clear(); @@ -1067,25 +1094,11 @@ ConfigItemBase::LineType ConfigItemBase::readConfigLine( } } - LineType eResult = LINETYPE_END; - if( aLine.getLength() > 0 ) - { - sal_Int32 nEqPos = aLine.indexOf( '=' ); - if( nEqPos < 0 ) - { - orKey = aLine; - } - else - { - orKey = StringHelper::trimSpaces( aLine.copy( 0, nEqPos ) ); - orData = StringHelper::trimSpaces( aLine.copy( nEqPos + 1 ) ); - } - - if( (orKey.getLength() > 0) && ((orData.getLength() > 0) || !orKey.equalsAscii( "end" )) ) - eResult = LINETYPE_DATA; - } - - return eResult; + OUStringPair aPair = StringHelper::convertStringToPair( aLine ); + orKey = aPair.first; + orData = aPair.second; + return ((orKey.getLength() > 0) && ((orData.getLength() > 0) || !orKey.equalsAscii( "end" ))) ? + LINETYPE_DATA : LINETYPE_END; } ConfigItemBase::LineType ConfigItemBase::readConfigLine( const ConfigInputStreamRef& rxStrm ) const @@ -1176,6 +1189,15 @@ void NameListBase::exclude( const OUString& rKeys ) // ============================================================================ +void ItemFormatMap::insertFormats( const NameListRef& rxNameList ) +{ + if( Base::isValid( rxNameList ) ) + for( NameListBase::const_iterator aIt = rxNameList->begin(), aEnd = rxNameList->end(); aIt != aEnd; ++aIt ) + (*this)[ aIt->first ].parse( aIt->second ); +} + +// ============================================================================ + ConstList::ConstList( const SharedConfigData& rCfgData ) : NameListBase( rCfgData ), maDefName( OOX_DUMP_ERR_NONAME ), @@ -1283,46 +1305,57 @@ void FlagsList::implProcessConfigItemStr( void FlagsList::implSetName( sal_Int64 nKey, const OUString& rName ) { - insertRawName( nKey, rName ); + if( (nKey != 0) && ((nKey & (nKey - 1)) == 0) ) // only a single bit set? + insertRawName( nKey, rName ); } OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const { - sal_Int64 nFlags = nKey; - setFlag( nFlags, mnIgnore, false ); - sal_Int64 nFound = 0; + sal_Int64 nFound = mnIgnore; OUStringBuffer aName; // add known flags for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt ) { sal_Int64 nMask = aIt->first; - const OUString& rFlagName = aIt->second; - bool bNegated = (rFlagName.getLength() > 0) && (rFlagName[ 0 ] == '!'); - sal_Int32 nBothSep = bNegated ? rFlagName.indexOf( '!', 1 ) : -1; - bool bFlag = getFlag( nFlags, nMask ); - if( bFlag ) - { - if( !bNegated ) - StringHelper::appendToken( aName, rFlagName ); - else if( nBothSep > 0 ) - StringHelper::appendToken( aName, rFlagName.copy( nBothSep + 1 ) ); - } - else if( bNegated ) - { - if( nBothSep > 0 ) - StringHelper::appendToken( aName, rFlagName.copy( 1, nBothSep - 1 ) ); - else - StringHelper::appendToken( aName, rFlagName.copy( 1 ) ); - } setFlag( nFound, nMask ); + if( !getFlag( mnIgnore, nMask ) ) + { + const OUString& rFlagName = aIt->second; + bool bOnOff = (rFlagName.getLength() > 0) && (rFlagName[ 0 ] == ':'); + bool bFlag = getFlag( nKey, nMask ); + if( bOnOff ) + { + StringHelper::appendToken( aName, rFlagName.copy( 1 ) ); + aName.appendAscii( bFlag ? ":on" : ":off" ); + } + else + { + bool bNegated = (rFlagName.getLength() > 0) && (rFlagName[ 0 ] == '!'); + sal_Int32 nBothSep = bNegated ? rFlagName.indexOf( '!', 1 ) : -1; + if( bFlag ) + { + if( !bNegated ) + StringHelper::appendToken( aName, rFlagName ); + else if( nBothSep > 0 ) + StringHelper::appendToken( aName, rFlagName.copy( nBothSep + 1 ) ); + } + else if( bNegated ) + { + if( nBothSep > 0 ) + StringHelper::appendToken( aName, rFlagName.copy( 1, nBothSep - 1 ) ); + else + StringHelper::appendToken( aName, rFlagName.copy( 1 ) ); + } + } + } } // add unknown flags - setFlag( nFlags, nFound, false ); - if( nFlags != 0 ) + setFlag( nKey, nFound, false ); + if( nKey != 0 ) { OUStringBuffer aUnknown( CREATE_OUSTRING( OOX_DUMP_UNKNOWN ) ); aUnknown.append( OOX_DUMP_ITEMSEP ); - StringHelper::appendShortHex( aUnknown, nFlags, true ); + StringHelper::appendShortHex( aUnknown, nKey, true ); StringHelper::enclose( aUnknown, '(', ')' ); StringHelper::appendToken( aName, aUnknown.makeStringAndClear() ); } @@ -1342,6 +1375,11 @@ void FlagsList::implIncludeList( const NameListBase& rList ) // ============================================================================ +bool CombiList::ExtItemFormatKey::operator<( const ExtItemFormatKey& rRight ) const +{ + return (mnKey < rRight.mnKey) || ((mnKey == rRight.mnKey) && (maFilter < rRight.maFilter)); +} + CombiList::CombiList( const SharedConfigData& rCfgData ) : FlagsList( rCfgData ) { @@ -1351,9 +1389,34 @@ void CombiList::implSetName( sal_Int64 nKey, const OUString& rName ) { if( (nKey & (nKey - 1)) != 0 ) // more than a single bit set? { - ExtItemFormat& rItemFmt = maFmtMap[ nKey ]; - OUStringVector aRemain = rItemFmt.parse( rName ); - rItemFmt.mbShiftValue = aRemain.empty() || !aRemain.front().equalsAscii( "noshift" ); + typedef ::std::set< ExtItemFormatKey > ExtItemFormatKeySet; + ::std::set< ExtItemFormatKey > aItemKeys; + ExtItemFormat aItemFmt; + OUStringVector aRemain = aItemFmt.parse( rName ); + for( OUStringVector::iterator aIt = aRemain.begin(), aEnd = aRemain.end(); aIt != aEnd; ++aIt ) + { + OUStringPair aPair = StringHelper::convertStringToPair( *aIt ); + if( aPair.first.equalsAscii( "noshift" ) ) + { + aItemFmt.mbShiftValue = StringHelper::convertStringToBool( aPair.second ); + } + else if( aPair.first.equalsAscii( "filter" ) ) + { + OUStringPair aFilter = StringHelper::convertStringToPair( aPair.second, '~' ); + ExtItemFormatKey aKey( nKey ); + if( (aFilter.first.getLength() > 0) && StringHelper::convertStringToInt( aKey.maFilter.first, aFilter.first ) && + (aFilter.second.getLength() > 0) && StringHelper::convertStringToInt( aKey.maFilter.second, aFilter.second ) ) + { + if( aKey.maFilter.first == 0 ) + aKey.maFilter.second = 0; + aItemKeys.insert( aKey ); + } + } + } + if( aItemKeys.empty() ) + aItemKeys.insert( ExtItemFormatKey( nKey ) ); + for( ExtItemFormatKeySet::iterator aIt = aItemKeys.begin(), aEnd = aItemKeys.end(); aIt != aEnd; ++aIt ) + maFmtMap[ *aIt ] = aItemFmt; } else { @@ -1363,18 +1426,18 @@ void CombiList::implSetName( sal_Int64 nKey, const OUString& rName ) OUString CombiList::implGetName( const Config& rCfg, sal_Int64 nKey ) const { - sal_Int64 nFlags = nKey; sal_Int64 nFound = 0; OUStringBuffer aName; // add known flag fields for( ExtItemFormatMap::const_iterator aIt = maFmtMap.begin(), aEnd = maFmtMap.end(); aIt != aEnd; ++aIt ) { - sal_Int64 nMask = aIt->first; - if( nMask != 0 ) + const ExtItemFormatKey& rMapKey = aIt->first; + sal_Int64 nMask = rMapKey.mnKey; + if( (nMask != 0) && ((nKey & rMapKey.maFilter.first) == rMapKey.maFilter.second) ) { const ExtItemFormat& rItemFmt = aIt->second; - sal_uInt64 nUFlags = static_cast< sal_uInt64 >( nFlags ); + sal_uInt64 nUFlags = static_cast< sal_uInt64 >( nKey ); sal_uInt64 nUMask = static_cast< sal_uInt64 >( nMask ); if( rItemFmt.mbShiftValue ) while( (nUMask & 1) == 0 ) { nUFlags >>= 1; nUMask >>= 1; } @@ -1411,8 +1474,8 @@ OUString CombiList::implGetName( const Config& rCfg, sal_Int64 nKey ) const setFlag( nFound, nMask ); } } - setFlag( nFlags, nFound, false ); - StringHelper::appendToken( aName, FlagsList::implGetName( rCfg, nFlags ) ); + setFlag( nKey, nFound, false ); + StringHelper::appendToken( aName, FlagsList::implGetName( rCfg, nKey ) ); return aName.makeStringAndClear(); } @@ -2627,7 +2690,7 @@ sal_Unicode InputObjectBase::dumpUnicode( const String& rName ) return cChar; } -OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc ) +OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc, bool bHideTrailingNul ) { sal_Int32 nDumpSize = getLimitedValue< sal_Int32, sal_Int64 >( mxStrm->getLength() - mxStrm->tell(), 0, nLen ); OUString aString; @@ -2638,16 +2701,20 @@ OUString InputObjectBase::dumpCharArray( const String& rName, sal_Int32 nLen, rt aBuffer[ nCharsRead ] = 0; aString = OStringToOUString( OString( &aBuffer.front() ), eTextEnc ); } + if( bHideTrailingNul ) + aString = StringHelper::trimTrailingNul( aString ); writeStringItem( rName( "text" ), aString ); return aString; } -OUString InputObjectBase::dumpUnicodeArray( const String& rName, sal_Int32 nLen ) +OUString InputObjectBase::dumpUnicodeArray( const String& rName, sal_Int32 nLen, bool bHideTrailingNul ) { OUStringBuffer aBuffer; for( sal_Int32 nIndex = 0; !mxStrm->isEof() && (nIndex < nLen); ++nIndex ) aBuffer.append( static_cast< sal_Unicode >( mxStrm->readuInt16() ) ); OUString aString = aBuffer.makeStringAndClear(); + if( bHideTrailingNul ) + aString = StringHelper::trimTrailingNul( aString ); writeStringItem( rName( "text" ), aString ); return aString; } @@ -3059,12 +3126,7 @@ bool RecordObjectBase::implIsValid() const void RecordObjectBase::implDump() { NameListRef xRecNames = getRecNames(); - - typedef ::std::map< sal_Int64, ItemFormat > ItemFormatMap; - ItemFormatMap aSimpleRecs; - if( NameListBase* pSimpleRecs = maSimpleRecs.getNameList( cfg() ).get() ) - for( NameListBase::const_iterator aIt = pSimpleRecs->begin(), aEnd = pSimpleRecs->end(); aIt != aEnd; ++aIt ) - aSimpleRecs[ aIt->first ].parse( aIt->second ); + ItemFormatMap aSimpleRecs( maSimpleRecs.getNameList( cfg() ) ); while( implStartRecord( *mxBaseStrm, mnRecPos, mnRecId, mnRecSize ) ) { diff --git a/oox/source/dump/dumperbase.ini b/oox/source/dump/dumperbase.ini index 99603e12e560..84d742c2b35f 100644 --- a/oox/source/dump/dumperbase.ini +++ b/oox/source/dump/dumperbase.ini @@ -164,7 +164,7 @@ show-record-position=0 # include = [,...] # exclude = [,...] # ignore = -# = | ! | !! +# = | ! | : | !! # end # # - include (optional): See constlist above. @@ -173,10 +173,14 @@ show-record-position=0 # name and not set in this declaration will be shown as unknown. Default is # to not ignore a bit. # - : The bit to be named. Must be a value with a single bit set. -# - : sets a name for the bit that will be shown if it is set. -# - !: sets a name for the bit that will be shown if it is cleared. -# - !!: sets a name for the cleared bit (constname0), -# and for the set bit (constname1). +# - - Sets a name for the bit that will be shown if the bit is set. +# Does not show anything if the bit is cleared. +# - ! - Sets a name for the bit that will be shown if the bit is +# cleared. Does not show anything if the bit is set. +# - : - Sets a name for the bit that will always be shown together +# with the actual state of the bit, appended as ':on' or ':off'. +# - !! - Sets a name for both the cleared bit (cname0), and +# for the set bit (cname1). # # ---------------------------------------------------------------------------- # @@ -191,8 +195,8 @@ show-record-position=0 # include = [,...] # exclude = [,...] # ignore = -# = | ! | !! -# = ,,[,[,noshift]] +# = | ! | : | !! +# = ,,[,[,options...]] # end # # - include (optional): See constlist above. @@ -206,7 +210,17 @@ show-record-position=0 # - : The name of the embedded bitfield. # - : Optional name list with names for the values of the embedded # bitfield. -# - noshift: If set, the extracted value is not shifted to the right. +# - options: Additional options for this bitfield: +# - filter = ~: If set, the entire bitfield +# will only be written, if the complete data item currently dumped +# contains exactly the value specified in in the bitfield +# specified in . Otherwise, nothing is written. It is +# possible to specify multiple filter rules for this bitfield. In that +# case, the bitfield will be written, if at least one filter rule +# applies for the current data item. +# - noshift = : If set to 'true', the extracted value will be +# shifted to the right (normalized). If set to 'false', the value will +# be written unshifted. Default is 'true'. # # ---------------------------------------------------------------------------- # @@ -230,6 +244,7 @@ unitconverter=CONV-PT-TO-CM,/28.346457,cm unitconverter=CONV-PT1616-TO-CM,/1857713.4,cm unitconverter=CONV-TWIP-TO-CM,/566.92913,cm unitconverter=CONV-TWIP-TO-PT,/20,pt +unitconverter=CONV-EMU-TO-CM,/36000,cm constlist=BOOLEAN 0=FALSE @@ -239,7 +254,7 @@ end combilist=RK-FLAGS 0x00000001=div-100 0x00000002=integer - 0xFFFFFFFC=int32,dec,value + 0xFFFFFFFC=int32,dec,value,,filter=0x2~0x2 end constlist=CHARSET @@ -370,5 +385,12 @@ multilist=COUNTRY 980=,iran end +multilist=SYSTEMCOLOR + 0x00=scrollbar,desktop,active-title,inactive-title,menu,window-back,window-frame,menu-text + 0x08=window-text,active-title-text,active-border,inactive-border,app-workspace,highlight,highlight-text,button-face + 0x10=button-shadow,disabled-text,button-text,inactive-title-text,button-highlight,button-dark-shadow,button-light-shadow,tooltip-text + 0x18=tooltip-back,,hot-light,active-title-2,inactive-title-2,menu-highlight,menubar +end + # ============================================================================ diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index 30b4fb67436b..b7750d4113b8 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -671,15 +671,7 @@ sal_uInt32 OcxPropertyObjectBase::dumpColorProperty( sal_uInt32 nDefault ) { MultiItemsGuard aMultiGuard( out() ); alignInput< sal_uInt32 >(); - sal_uInt32 nColor = dumpHex< sal_uInt32 >( getPropertyName(), "OCX-COLOR" ); - switch( extractValue< sal_uInt8 >( nColor, 24, 8 ) ) - { - case 0x00: writeColorABGRItem( "rgb", extractValue< sal_Int32 >( nColor, 0, 24 ) ); break; - case 0x01: writeDecItem( "palette-index", extractValue< sal_uInt16 >( nColor, 0, 16 ) ); break; - case 0x02: writeColorABGRItem( "rgb", extractValue< sal_Int32 >( nColor, 0, 24 ) ); break; - case 0x80: writeDecItem( "sys-color", extractValue< sal_uInt16 >( nColor, 0, 16 ), "OCX-SYSTEMCOLOR" ); break; - } - return nColor; + return dumpHex< sal_uInt32 >( getPropertyName(), "OCX-COLOR" ); } return nDefault; } diff --git a/oox/source/dump/oledumper.ini b/oox/source/dump/oledumper.ini index 96433d63c7fa..c398b0c01e51 100644 --- a/oox/source/dump/oledumper.ini +++ b/oox/source/dump/oledumper.ini @@ -115,8 +115,12 @@ end {0713E8D2-850A-101B-AFC0-4210102A8DA7}=COMCTL.ProgCtrl.1 combilist=OCX-COLOR + 0x0000FFFF=uint32,dec,palette-index,,filter=0xFF000000~0x01000000 + 0x000000FF=uint32,dec,red,,filter=0xFF000000~0x00000000,filter=0xFF000000~0x02000000 + 0x0000FF00=uint32,dec,green,,filter=0xFF000000~0x00000000,filter=0xFF000000~0x02000000 + 0x00FF0000=uint32,dec,blue,,filter=0xFF000000~0x00000000,filter=0xFF000000~0x02000000 + 0x0000FFFF=uint32,dec,system-color,SYSTEMCOLOR,filter=0xFF000000~0x80000000 0xFF000000=uint8,dec,type,OCX-COLORTYPE - 0x00FFFFFF=uint32,hex,value end constlist=OCX-COLORTYPE @@ -126,13 +130,6 @@ constlist=OCX-COLORTYPE 0x80=system-color end -multilist=OCX-SYSTEMCOLOR - 0x00=scrollbar,desktop,active-title,inactive-title,menubar,window-back,window-frame,menu-text - 0x08=window-text,active-title-text,active-border,inactive-border,app-workspace,highlight,highlight-text,button-face - 0x10=button-shadow,disabled-text,button-text,inactive-title-text,button-highlight,button-dark-shadow,button-light-shadow,tooltip-text - 0x18=tooltip-back -end - combilist=OCX-STRINGLEN 0x80000000=!unicode!compressed 0x7FFFFFFF=int32,dec,buffer-size @@ -543,16 +540,6 @@ flagslist=OCX-FORMSITE-FLAGS 0x00040000=container end -combilist=OCX-FORMSITE-CLASSIDCACHE - 0x7FFF=uint16,dec,cache-idx,OCX-FORMSITE-CLASSIDCACHEINDEX - 0x8000=!predefined-class-id!class-table-index -end - -constlist=OCX-FORMSITE-CLASSIDCACHEINDEX - default= - 0x7FFF=invalid -end - constlist=OCX-FORMSITE-CLASSNAMES 7=Forms.Form.1 12=Forms.Image.1 @@ -572,6 +559,17 @@ constlist=OCX-FORMSITE-CLASSNAMES 57=Forms.MultiPage.1 end +constlist=OCX-FORMSITE-CLASSIDCACHEINDEX + include=OCX-FORMSITE-CLASSNAMES + 0x7FFF=invalid +end + +combilist=OCX-FORMSITE-CLASSIDCACHE + 0x7FFF=uint16,dec,cache-idx,OCX-FORMSITE-CLASSIDCACHEINDEX,filter=0x8000~0x0000 + 0x7FFF=uint16,dec,class-table-idx,,filter=0x8000~0x8000 + 0x8000=!predefined-class-id!class-table-index +end + # form design extender ------------------------------------------------------ flagslist=OCX-FORMDESIGNEXT-PROPERTIES diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index a49d41ef4759..5aeb56883d2d 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1339,15 +1339,10 @@ void DrawingML::WriteConnectorConnections( EscherConnectorListEntry& rConnectorE // from sw/source/filter/ww8/wrtw8num.cxx for default bullets to export to MS intact static void lcl_SubstituteBullet(String& rNumStr, rtl_TextEncoding& rChrSet, String& rFontName) { - StarSymbolToMSMultiFont *pConvert = 0; - FontFamily eFamily = FAMILY_DECORATIVE; - - if (!pConvert) - { - pConvert = CreateStarSymbolToMSMultiFont(); - } sal_Unicode cChar = rNumStr.GetChar(0); + StarSymbolToMSMultiFont *pConvert = CreateStarSymbolToMSMultiFont(); String sFont = pConvert->ConvertChar(cChar); + delete pConvert; if (sFont.Len()) { rNumStr = static_cast< sal_Unicode >(cChar | 0xF000); @@ -1363,7 +1358,6 @@ static void lcl_SubstituteBullet(String& rNumStr, rtl_TextEncoding& rChrSet, Str let words own font substitution kick in */ rChrSet = RTL_TEXTENCODING_UNICODE; - eFamily = FAMILY_SWISS; rFontName = ::GetFontToken(rFontName, 0); } else @@ -1376,7 +1370,6 @@ static void lcl_SubstituteBullet(String& rNumStr, rtl_TextEncoding& rChrSet, Str rFontName.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Wingdings")); rNumStr = static_cast< sal_Unicode >(0x6C); } - delete pConvert; } sal_Unicode DrawingML::SubstituteBullet( sal_Unicode cBulletId, ::com::sun::star::awt::FontDescriptor& rFontDesc ) diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx index 9f99bf625333..96baaab4bb36 100644 --- a/oox/source/ole/axcontrol.cxx +++ b/oox/source/ole/axcontrol.cxx @@ -208,6 +208,16 @@ enum ApiTransparencyMode // ---------------------------------------------------------------------------- +/** Specifies how a form control supports the DefaultState property. */ +enum ApiDefaultStateMode +{ + API_DEFAULTSTATE_BOOLEAN, /// Control does not support tri-state, state is given as boolean. + API_DEFAULTSTATE_SHORT, /// Control does not support tri-state, state is given as short. + API_DEFAULTSTATE_TRISTATE /// Control supports tri-state, state is given as short. +}; + +// ---------------------------------------------------------------------------- + /** Converts the AX background formatting to UNO properties. */ void lclConvertBackground( AxControlHelper& rHelper, PropertyMap& rPropMap, sal_uInt32 nBackColor, sal_uInt32 nFlags, ApiTransparencyMode eTranspMode ) { @@ -318,8 +328,11 @@ void lclConvertPicture( AxControlHelper& rHelper, PropertyMap& rPropMap, const S // ---------------------------------------------------------------------------- /** Converts the AX value for checked/unchecked/dontknow to UNO properties. */ -void lclConvertState( AxControlHelper& /*rHelper*/, PropertyMap& rPropMap, const OUString& rValue, sal_Int32 nMultiSelect, bool bSupportsTriState ) +void lclConvertState( AxControlHelper& /*rHelper*/, PropertyMap& rPropMap, const OUString& rValue, sal_Int32 nMultiSelect, ApiDefaultStateMode eDefStateMode ) { + bool bBooleanState = eDefStateMode == API_DEFAULTSTATE_BOOLEAN; + bool bSupportsTriState = eDefStateMode == API_DEFAULTSTATE_TRISTATE; + // state sal_Int16 nState = bSupportsTriState ? API_STATE_DONTKNOW : API_STATE_UNCHECKED; if( rValue.getLength() == 1 ) switch( rValue[ 0 ] ) @@ -328,7 +341,10 @@ void lclConvertState( AxControlHelper& /*rHelper*/, PropertyMap& rPropMap, const case '1': nState = API_STATE_CHECKED; break; // any other string (also empty) means 'dontknow' } - rPropMap.setProperty( PROP_DefaultState, nState ); + if( bBooleanState ) + rPropMap.setProperty( PROP_DefaultState, nState != API_STATE_UNCHECKED ); + else + rPropMap.setProperty( PROP_DefaultState, nState ); // tristate if( bSupportsTriState ) @@ -808,6 +824,7 @@ void AxToggleButtonModel::convertProperties( AxControlHelper& rHelper, PropertyM rPropMap.setProperty( PROP_Toggle, true ); lclConvertBackground( rHelper, rPropMap, mnBackColor, mnFlags, API_TRANSPARENCY_NOTSUPPORTED ); lclConvertPicture( rHelper, rPropMap, maPictureData, mnPicturePos ); + lclConvertState( rHelper, rPropMap, maValue, mnMultiSelect, API_DEFAULTSTATE_BOOLEAN ); AxMorphDataModel::convertProperties( rHelper, rPropMap ); } @@ -831,7 +848,7 @@ void AxCheckBoxModel::convertProperties( AxControlHelper& rHelper, PropertyMap& lclConvertBackground( rHelper, rPropMap, mnBackColor, mnFlags, API_TRANSPARENCY_VOID ); lclConvertVisualEffect( rHelper, rPropMap, mnSpecialEffect ); lclConvertPicture( rHelper, rPropMap, maPictureData, mnPicturePos ); - lclConvertState( rHelper, rPropMap, maValue, mnMultiSelect, true ); + lclConvertState( rHelper, rPropMap, maValue, mnMultiSelect, API_DEFAULTSTATE_TRISTATE ); AxMorphDataModel::convertProperties( rHelper, rPropMap ); } @@ -855,7 +872,7 @@ void AxOptionButtonModel::convertProperties( AxControlHelper& rHelper, PropertyM lclConvertBackground( rHelper, rPropMap, mnBackColor, mnFlags, API_TRANSPARENCY_VOID ); lclConvertVisualEffect( rHelper, rPropMap, mnSpecialEffect ); lclConvertPicture( rHelper, rPropMap, maPictureData, mnPicturePos ); - lclConvertState( rHelper, rPropMap, maValue, mnMultiSelect, false ); + lclConvertState( rHelper, rPropMap, maValue, mnMultiSelect, API_DEFAULTSTATE_SHORT ); AxMorphDataModel::convertProperties( rHelper, rPropMap ); } diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 534a207a6e58..7b8c1ca95d35 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -64,7 +64,7 @@ PPTShape::~PPTShape() void PPTShape::addShape( const oox::core::XmlFilterBase& rFilterBase, const SlidePersist& rSlidePersist, - const oox::drawingml::ThemePtr& rxTheme, + const oox::drawingml::Theme* pTheme, const Reference< XShapes >& rxShapes, const awt::Rectangle* pShapeRect, ::oox::drawingml::ShapeIdMap* pShapeMap ) @@ -93,6 +93,12 @@ void PPTShape::addShape( aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle(); } break; + case XML_subTitle : + { + if ( ( meShapeLocation == Master ) || ( meShapeLocation == Layout ) ) + sServiceName = rtl::OUString(); + } + break; case XML_obj : { const rtl::OUString sOutlinerShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.OutlinerShape" ) ); @@ -155,37 +161,42 @@ void PPTShape::addShape( break; } } - if ( !aMasterTextListStyle.get() ) - aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getOtherTextStyle(); - setMasterTextListStyle( aMasterTextListStyle ); - Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, rxTheme, rxShapes, pShapeRect, bClearText ) ); - if ( !rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && ( (sal_Int32)mnSubType == XML_title ) ) + if ( sServiceName.getLength() ) { - try - { - rtl::OUString aTitleText; - Reference< XTextRange > xText( xShape, UNO_QUERY_THROW ); - aTitleText = xText->getString(); - if ( aTitleText.getLength() && ( aTitleText.getLength() < 64 ) ) // just a magic value, but we don't want to set slide names which are too long + if ( !aMasterTextListStyle.get() ) + aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getOtherTextStyle(); + setMasterTextListStyle( aMasterTextListStyle ); + + Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, bClearText ) ); + if ( !rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && ( (sal_Int32)mnSubType == XML_title ) ) + { + try { - Reference< container::XNamed > xName( rSlidePersist.getPage(), UNO_QUERY_THROW ); - xName->setName( aTitleText ); + rtl::OUString aTitleText; + Reference< XTextRange > xText( xShape, UNO_QUERY_THROW ); + aTitleText = xText->getString(); + if ( aTitleText.getLength() && ( aTitleText.getLength() < 64 ) ) // just a magic value, but we don't want to set slide names which are too long + { + Reference< container::XNamed > xName( rSlidePersist.getPage(), UNO_QUERY_THROW ); + xName->setName( aTitleText ); + } + } + catch( uno::Exception& ) + { + } } - catch( uno::Exception& ) + if( pShapeMap && msId.getLength() ) { + (*pShapeMap)[ msId ] = shared_from_this(); } - } - if( pShapeMap && msId.getLength() ) - { - (*pShapeMap)[ msId ] = shared_from_this(); - } - // if this is a group shape, we have to add also each child shape - Reference< XShapes > xShapes( xShape, UNO_QUERY ); - if ( xShapes.is() ) - addChildren( rFilterBase, *this, rxTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap ); + // if this is a group shape, we have to add also each child shape + Reference< XShapes > xShapes( xShape, UNO_QUERY ); + if ( xShapes.is() ) + addChildren( rFilterBase, *this, pTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap ); + } } } catch( const Exception& ) diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index 472f5292770e..8379a6e95735 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -63,7 +63,7 @@ PPTShapeContext::PPTShapeContext( ContextHandler& rParent, const SlidePersistPtr { } -oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ) +oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, sal_Int32 nSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes ) { oox::drawingml::ShapePtr aShapePtr; std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() ); @@ -71,11 +71,14 @@ oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, st { if ( (*aRevIter)->getSubType() == nMasterPlaceholder ) { - aShapePtr = *aRevIter; - break; + if ( ( nSubTypeIndex == -1 ) || ( nSubTypeIndex == (*aRevIter)->getSubTypeIndex() ) ) + { + aShapePtr = *aRevIter; + break; + } } std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren(); - aShapePtr = findPlaceholder( nMasterPlaceholder, rChildren ); + aShapePtr = findPlaceholder( nMasterPlaceholder, nSubTypeIndex, rChildren ); if ( aShapePtr.get() ) break; aRevIter++; @@ -84,10 +87,11 @@ oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, st } // if nFirstPlaceholder can't be found, it will be searched for nSecondPlaceholder -oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ) +oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, + sal_Int32 nSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes ) { - oox::drawingml::ShapePtr pPlaceholder = findPlaceholder( nFirstPlaceholder, rShapes ); - return !nSecondPlaceholder || pPlaceholder.get() ? pPlaceholder : findPlaceholder( nSecondPlaceholder, rShapes ); + oox::drawingml::ShapePtr pPlaceholder = findPlaceholder( nFirstPlaceholder, nSubTypeIndex, rShapes ); + return !nSecondPlaceholder || pPlaceholder.get() ? pPlaceholder : findPlaceholder( nSecondPlaceholder, nSubTypeIndex, rShapes ); } Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) @@ -107,7 +111,7 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In { sal_Int32 nSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) ); mpShapePtr->setSubType( nSubType ); - mpShapePtr->setIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); + mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); if ( nSubType ) { PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() ); @@ -131,7 +135,8 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In nSecondPlaceholder = XML_title; break; case XML_obj : // slide/layout - nFirstPlaceholder = XML_body; + nFirstPlaceholder = XML_obj; + nSecondPlaceholder = XML_body; break; case XML_dt : // slide/layout/master/notes/notesmaster/handoutmaster case XML_sldNum : // slide/layout/master/notes/notesmaster/handoutmaster @@ -154,12 +159,13 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In { oox::drawingml::ShapePtr pPlaceholder; if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree - pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, mpSlidePersistPtr->getShapes()->getChildren() ); + pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, -1, mpSlidePersistPtr->getShapes()->getChildren() ); else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects { SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() ); if ( pMasterPersist.get() ) - pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, pMasterPersist->getShapes()->getChildren() ); + pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, + pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() ); } if ( pPlaceholder.get() ) { diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx index bd9fd5d549b1..ef8dbeedcd6c 100644 --- a/oox/source/ppt/pptshapegroupcontext.cxx +++ b/oox/source/ppt/pptshapegroupcontext.cxx @@ -76,7 +76,7 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s break; case NMSP_PPT|XML_ph: mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) ); - mpGroupShapePtr->setIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); + mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); break; // nvSpPr CT_ShapeNonVisual end @@ -104,7 +104,7 @@ Reference< XFastContextHandler > PPTShapeGroupContext::createFastChildContext( s xRet.set( new oox::drawingml::GraphicShapeContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.GraphicObjectShape" ) ) ) ); break; case NMSP_PPT|XML_graphicFrame: // CT_GraphicalObjectFrame - xRet.set( new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) ) ) ); + xRet.set( new oox::drawingml::GraphicalObjectFrameContext( *this, mpGroupShapePtr, oox::drawingml::ShapePtr( new PPTShape( meShapeLocation, "com.sun.star.drawing.OLE2Shape" ) ), true ) ); break; } diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 227f0b7ce799..d5b3b13c762a 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -67,9 +67,11 @@ SlidePersist::SlidePersist( XmlFilterBase& rFilter, sal_Bool bMaster, sal_Bool b { if ( pDefaultTextStyle ) { + /* maTitleTextStylePtr->apply( *pDefaultTextStyle.get() ); maBodyTextStylePtr->apply( *pDefaultTextStyle.get() ); maNotesTextStylePtr->apply( *pDefaultTextStyle.get() ); + */ maOtherTextStylePtr->apply( *pDefaultTextStyle.get() ); } } @@ -143,9 +145,9 @@ void SlidePersist::createXShapes( const XmlFilterBase& rFilterBase ) { PPTShape* pPPTShape = dynamic_cast< PPTShape* >( (*aChildIter).get() ); if ( pPPTShape ) - pPPTShape->addShape( rFilterBase, *this, getTheme(), xShapes, 0, &getShapeMap() ); + pPPTShape->addShape( rFilterBase, *this, getTheme().get(), xShapes, 0, &getShapeMap() ); else - (*aChildIter)->addShape( rFilterBase, getTheme(), xShapes, 0, &getShapeMap() ); + (*aChildIter)->addShape( rFilterBase, getTheme().get(), xShapes, 0, &getShapeMap() ); aChildIter++; } diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index ef8831b06db3..42efee474d90 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -74,7 +74,7 @@ ShapeContextHandler::getGraphicShapeContext(::sal_Int32 Element ) case XML_graphic: mpShape.reset(new Shape("com.sun.star.drawing.OLE2Shape" )); mxGraphicShapeContext.set - (new GraphicalObjectFrameContext(*rFragmentHandler, pMasterShape, mpShape)); + (new GraphicalObjectFrameContext(*rFragmentHandler, pMasterShape, mpShape, true)); break; case XML_pic: mpShape.reset(new Shape("com.sun.star.drawing.GraphicObjectShape" )); @@ -240,7 +240,7 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException) } else if (mpShape.get() != NULL) { - mpShape->addShape(*mxFilterBase, mpThemePtr, xShapes); + mpShape->addShape(*mxFilterBase, mpThemePtr.get(), xShapes); xResult.set(mpShape->getXShape()); } } diff --git a/oox/source/token/gennamespaces.pl b/oox/source/token/gennamespaces.pl index b3d277b85c2f..2a7f2e2423bb 100644 --- a/oox/source/token/gennamespaces.pl +++ b/oox/source/token/gennamespaces.pl @@ -50,6 +50,7 @@ print ( HXX "// defines for tokens with specific namespaces, can be used in swit print ( HXX "#define A_TOKEN( token ) (::oox::NMSP_DRAWINGML | XML_##token)\n" ); print ( HXX "#define AX_TOKEN( token ) (::oox::NMSP_AX | XML_##token)\n" ); print ( HXX "#define C_TOKEN( token ) (::oox::NMSP_CHART | XML_##token)\n" ); +print ( HXX "#define CDR_TOKEN( token ) (::oox::NMSP_CDR | XML_##token)\n" ); print ( HXX "#define O_TOKEN( token ) (::oox::NMSP_OFFICE | XML_##token)\n" ); print ( HXX "#define PPT_TOKEN( token ) (::oox::NMSP_PPT | XML_##token)\n" ); print ( HXX "#define R_TOKEN( token ) (::oox::NMSP_RELATIONSHIPS | XML_##token)\n" ); diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt index 63ca76e95f54..45bb59541b1b 100644 --- a/oox/source/token/namespaces.txt +++ b/oox/source/token/namespaces.txt @@ -14,6 +14,7 @@ DRAWINGML PICTURE DIAGRAM CHART +CDR DOC_DRAWINGML # VML diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 0ecd40ee6595..4d20b8f1c255 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -369,6 +369,7 @@ TextOverlap TextRightDistance TextRotation TextUpperDistance +TextVerticalAdjust TextWordWrap TextWritingMode Toggle diff --git a/oox/source/token/tokenmap.cxx b/oox/source/token/tokenmap.cxx index 339ff5c40b44..b5ed8e9a9323 100644 --- a/oox/source/token/tokenmap.cxx +++ b/oox/source/token/tokenmap.cxx @@ -32,6 +32,8 @@ #include "tokens.hxx" #include "oox/helper/containerhelper.hxx" +#include + using ::rtl::OString; using ::rtl::OUString; using ::com::sun::star::uno::Sequence; diff --git a/oox/source/xls/biffhelper.cxx b/oox/source/xls/biffhelper.cxx index f69cac731ee7..8ecea303183e 100644 --- a/oox/source/xls/biffhelper.cxx +++ b/oox/source/xls/biffhelper.cxx @@ -119,19 +119,27 @@ struct CodePageEntry_TEPred // ---------------------------------------------------------------------------- -bool lclCalcRkFromDouble( sal_Int32& ornRkValue, double fValue ) +union DecodedDouble +{ + double mfValue; + sal_math_Double maStruct; + + inline explicit DecodedDouble() {} + inline explicit DecodedDouble( double fValue ) : mfValue( fValue ) {} +}; + +bool lclCalcRkFromDouble( sal_Int32& ornRkValue, const DecodedDouble& rDecDbl ) { // double - const sal_math_Double* pValue = reinterpret_cast< const sal_math_Double* >( &fValue ); - if( (pValue->w32_parts.lsw == 0) && ((pValue->w32_parts.msw & 0x3) == 0) ) + if( (rDecDbl.maStruct.w32_parts.lsw == 0) && ((rDecDbl.maStruct.w32_parts.msw & 0x3) == 0) ) { - ornRkValue = static_cast< sal_Int32 >( pValue->w32_parts.msw ); + ornRkValue = static_cast< sal_Int32 >( rDecDbl.maStruct.w32_parts.msw ); return true; } // integer double fInt = 0.0; - double fFrac = modf( fValue, &fInt ); + double fFrac = modf( rDecDbl.mfValue, &fInt ); if( (fFrac == 0.0) && (-536870912.0 <= fInt) && (fInt <= 536870911.0) ) // 2^29 { ornRkValue = static_cast< sal_Int32 >( fInt ); @@ -143,6 +151,22 @@ bool lclCalcRkFromDouble( sal_Int32& ornRkValue, double fValue ) return false; } +bool lclCalcRkFromDouble( sal_Int32& ornRkValue, double fValue ) +{ + DecodedDouble aDecDbl( fValue ); + if( lclCalcRkFromDouble( ornRkValue, aDecDbl ) ) + return true; + + aDecDbl.mfValue *= 100.0; + if( lclCalcRkFromDouble( ornRkValue, aDecDbl ) ) + { + ornRkValue |= BIFF_RK_100FLAG; + return true; + } + + return false; +} + // ---------------------------------------------------------------------------- void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm, sal_Int32 nBytes, BiffType eBiff ) @@ -229,23 +253,22 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm, /*static*/ double BiffHelper::calcDoubleFromRk( sal_Int32 nRkValue ) { - double fValue = 0.0; + DecodedDouble aDecDbl( 0.0 ); if( getFlag( nRkValue, BIFF_RK_INTFLAG ) ) { sal_Int32 nTemp = nRkValue >> 2; setFlag< sal_Int32 >( nTemp, 0xE0000000, nRkValue < 0 ); - fValue = nTemp; + aDecDbl.mfValue = nTemp; } else { - sal_math_Double* pDouble = reinterpret_cast< sal_math_Double* >( &fValue ); - pDouble->w32_parts.msw = static_cast< sal_uInt32 >( nRkValue & BIFF_RK_VALUEMASK ); + aDecDbl.maStruct.w32_parts.msw = static_cast< sal_uInt32 >( nRkValue & BIFF_RK_VALUEMASK ); } if( getFlag( nRkValue, BIFF_RK_100FLAG ) ) - fValue /= 100.0; + aDecDbl.mfValue /= 100.0; - return fValue; + return aDecDbl.mfValue; } /*static*/ bool BiffHelper::calcRkFromDouble( sal_Int32& ornRkValue, double fValue ) @@ -276,10 +299,10 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm, case BIFF_ERR_NA: nApiError = 0x7FFF; break; default: OSL_ENSURE( false, "BiffHelper::calcDoubleFromError - unknown error code" ); } - double fValue; - ::rtl::math::setNan( &fValue ); - reinterpret_cast< sal_math_Double* >( &fValue )->nan_parts.fraction_lo = nApiError; - return fValue; + DecodedDouble aDecDbl; + ::rtl::math::setNan( &aDecDbl.mfValue ); + aDecDbl.maStruct.nan_parts.fraction_lo = nApiError; + return aDecDbl.mfValue; } /*static*/ rtl_TextEncoding BiffHelper::calcTextEncodingFromCodePage( sal_uInt16 nCodePage ) @@ -309,15 +332,14 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm, sal_uInt16 nFormat, nEnv; sal_Int32 nBytes; rStrm >> nFormat >> nEnv >> nBytes; - OSL_ENSURE( (nFormat == BIFF_IMGDATA_WMF) || (nFormat == BIFF_IMGDATA_DIB) || (nFormat == BIFF_IMGDATA_NATIVE), "BiffHelper::importImgData - unknown format" ); OSL_ENSURE( nBytes > 0, "BiffHelper::importImgData - invalid data size" ); if( (0 < nBytes) && (nBytes <= rStrm.getRemaining()) ) { switch( nFormat ) { - case BIFF_IMGDATA_WMF: /* TODO */ break; +// case BIFF_IMGDATA_WMF: /* TODO */ break; case BIFF_IMGDATA_DIB: lclImportImgDataDib( orDataSeq, rStrm, nBytes, eBiff ); break; - case BIFF_IMGDATA_NATIVE: /* TODO */ break; +// case BIFF_IMGDATA_NATIVE: /* TODO */ break; default: OSL_ENSURE( false, "BiffHelper::importImgData - unknown image format" ); } } diff --git a/oox/source/xls/drawingfragment.cxx b/oox/source/xls/drawingfragment.cxx index 56e1c888d0a2..28687ba92da7 100644 --- a/oox/source/xls/drawingfragment.cxx +++ b/oox/source/xls/drawingfragment.cxx @@ -92,22 +92,6 @@ sal_Int64 lclCalcEmu( const UnitConverter& rUnitConv, sal_Int64 nValue, Unit eFr // ============================================================================ -AnchorPosModel::AnchorPosModel() : - mnX( -1 ), - mnY( -1 ) -{ -} - -// ---------------------------------------------------------------------------- - -AnchorSizeModel::AnchorSizeModel() : - mnWidth( -1 ), - mnHeight( -1 ) -{ -} - -// ---------------------------------------------------------------------------- - AnchorCellModel::AnchorCellModel() : mnCol( -1 ), mnRow( -1 ), @@ -155,15 +139,15 @@ void ShapeAnchor::importAnchor( sal_Int32 nElement, const AttributeList& rAttrib void ShapeAnchor::importPos( const AttributeList& rAttribs ) { OSL_ENSURE( meType == ANCHOR_ABSOLUTE, "ShapeAnchor::importPos - unexpected 'xdr:pos' element" ); - maPos.mnX = rAttribs.getHyper( XML_x, 0 ); - maPos.mnY = rAttribs.getHyper( XML_y, 0 ); + maPos.X = rAttribs.getHyper( XML_x, 0 ); + maPos.Y = rAttribs.getHyper( XML_y, 0 ); } void ShapeAnchor::importExt( const AttributeList& rAttribs ) { OSL_ENSURE( (meType == ANCHOR_ABSOLUTE) || (meType == ANCHOR_ONECELL), "ShapeAnchor::importExt - unexpected 'xdr:ext' element" ); - maSize.mnWidth = rAttribs.getHyper( XML_cx, 0 ); - maSize.mnHeight = rAttribs.getHyper( XML_cy, 0 ); + maSize.Width = rAttribs.getHyper( XML_cx, 0 ); + maSize.Height = rAttribs.getHyper( XML_cy, 0 ); } void ShapeAnchor::importClientData( const AttributeList& rAttribs ) @@ -229,12 +213,12 @@ bool ShapeAnchor::isValidAnchor() const case ANCHOR_ABSOLUTE: OSL_ENSURE( maPos.isValid(), "ShapeAnchor::isValidAnchor - invalid position" ); OSL_ENSURE( maSize.isValid(), "ShapeAnchor::isValidAnchor - invalid size" ); - bValid = maPos.isValid() && maSize.isValid() && (maSize.mnWidth > 0) && (maSize.mnHeight > 0); + bValid = maPos.isValid() && maSize.isValid() && (maSize.Width > 0) && (maSize.Height > 0); break; case ANCHOR_ONECELL: OSL_ENSURE( maFrom.isValid(), "ShapeAnchor::isValidAnchor - invalid from position" ); OSL_ENSURE( maSize.isValid(), "ShapeAnchor::isValidAnchor - invalid size" ); - bValid = maFrom.isValid() && maSize.isValid() && (maSize.mnWidth > 0) && (maSize.mnHeight > 0); + bValid = maFrom.isValid() && maSize.isValid() && (maSize.Width > 0) && (maSize.Height > 0); break; case ANCHOR_TWOCELL: case ANCHOR_VML: @@ -264,10 +248,10 @@ Rectangle ShapeAnchor::calcApiLocation( const Size& rApiSheetSize, const AnchorS { case ANCHOR_ABSOLUTE: OSL_ENSURE( maPos.isValid(), "ShapeAnchor::calcApiLocation - invalid position" ); - if( maPos.isValid() && (maPos.mnX < rEmuSheetSize.mnWidth) && (maPos.mnY < rEmuSheetSize.mnHeight) ) + if( maPos.isValid() && (maPos.X < rEmuSheetSize.Width) && (maPos.Y < rEmuSheetSize.Height) ) { - aApiLoc.X = rUnitConv.scaleToMm100( static_cast< double >( maPos.mnX ), UNIT_EMU ); - aApiLoc.Y = rUnitConv.scaleToMm100( static_cast< double >( maPos.mnY ), UNIT_EMU ); + aApiLoc.X = rUnitConv.scaleToMm100( static_cast< double >( maPos.X ), UNIT_EMU ); + aApiLoc.Y = rUnitConv.scaleToMm100( static_cast< double >( maPos.Y ), UNIT_EMU ); } break; case ANCHOR_ONECELL: @@ -295,10 +279,10 @@ Rectangle ShapeAnchor::calcApiLocation( const Size& rApiSheetSize, const AnchorS if( maSize.isValid() ) { aApiLoc.Width = ::std::min< sal_Int32 >( - rUnitConv.scaleToMm100( static_cast< double >( maSize.mnWidth ), UNIT_EMU ), + rUnitConv.scaleToMm100( static_cast< double >( maSize.Width ), UNIT_EMU ), rApiSheetSize.Width - aApiLoc.X ); aApiLoc.Height = ::std::min< sal_Int32 >( - rUnitConv.scaleToMm100( static_cast< double >( maSize.mnHeight ), UNIT_EMU ), + rUnitConv.scaleToMm100( static_cast< double >( maSize.Height ), UNIT_EMU ), rApiSheetSize.Height - aApiLoc.Y ); } break; @@ -340,8 +324,8 @@ Rectangle ShapeAnchor::calcEmuLocation( const AnchorSizeModel& rEmuSheetSize ) c UnitConverter& rUnitConv = getUnitConverter(); Size aSheetSize( - getLimitedValue< sal_Int32, sal_Int64 >( rEmuSheetSize.mnWidth, 0, SAL_MAX_INT32 ), - getLimitedValue< sal_Int32, sal_Int64 >( rEmuSheetSize.mnHeight, 0, SAL_MAX_INT32 ) ); + getLimitedValue< sal_Int32, sal_Int64 >( rEmuSheetSize.Width, 0, SAL_MAX_INT32 ), + getLimitedValue< sal_Int32, sal_Int64 >( rEmuSheetSize.Height, 0, SAL_MAX_INT32 ) ); Rectangle aLoc( -1, -1, -1, -1 ); Unit eUnitX = (meType == ANCHOR_VML) ? UNIT_SCREENX : UNIT_EMU; Unit eUnitY = (meType == ANCHOR_VML) ? UNIT_SCREENY : UNIT_EMU; @@ -351,10 +335,10 @@ Rectangle ShapeAnchor::calcEmuLocation( const AnchorSizeModel& rEmuSheetSize ) c { case ANCHOR_ABSOLUTE: OSL_ENSURE( maPos.isValid(), "ShapeAnchor::calcEmuLocation - invalid position" ); - if( maPos.isValid() && (maPos.mnX < aSheetSize.Width) && (maPos.mnY < aSheetSize.Height) ) + if( maPos.isValid() && (maPos.X < aSheetSize.Width) && (maPos.Y < aSheetSize.Height) ) { - aLoc.X = static_cast< sal_Int32 >( maPos.mnX ); - aLoc.Y = static_cast< sal_Int32 >( maPos.mnY ); + aLoc.X = static_cast< sal_Int32 >( maPos.X ); + aLoc.Y = static_cast< sal_Int32 >( maPos.Y ); } break; case ANCHOR_ONECELL: @@ -386,8 +370,8 @@ Rectangle ShapeAnchor::calcEmuLocation( const AnchorSizeModel& rEmuSheetSize ) c OSL_ENSURE( maSize.isValid(), "ShapeAnchor::calcEmuLocation - invalid size" ); if( maSize.isValid() ) { - aLoc.Width = static_cast< sal_Int32 >( ::std::min< sal_Int64 >( maSize.mnWidth, aSheetSize.Width - aLoc.X ) ); - aLoc.Height = static_cast< sal_Int32 >( ::std::min< sal_Int64 >( maSize.mnHeight, aSheetSize.Height - aLoc.Y ) ); + aLoc.Width = static_cast< sal_Int32 >( ::std::min< sal_Int64 >( maSize.Width, aSheetSize.Width - aLoc.X ) ); + aLoc.Height = static_cast< sal_Int32 >( ::std::min< sal_Int64 >( maSize.Height, aSheetSize.Height - aLoc.Y ) ); } break; case ANCHOR_TWOCELL: @@ -439,8 +423,8 @@ OoxDrawingFragment::OoxDrawingFragment( const WorksheetHelper& rHelper, const OU { OSL_ENSURE( mxDrawPage.is(), "OoxDrawingFragment::OoxDrawingFragment - missing drawing page" ); maApiSheetSize = getDrawPageSize(); - maEmuSheetSize.mnWidth = static_cast< sal_Int64 >( getUnitConverter().scaleFromMm100( maApiSheetSize.Width, UNIT_EMU ) ); - maEmuSheetSize.mnHeight = static_cast< sal_Int64 >( getUnitConverter().scaleFromMm100( maApiSheetSize.Height, UNIT_EMU ) ); + maEmuSheetSize.Width = static_cast< sal_Int64 >( getUnitConverter().scaleFromMm100( maApiSheetSize.Width, UNIT_EMU ) ); + maEmuSheetSize.Height = static_cast< sal_Int64 >( getUnitConverter().scaleFromMm100( maApiSheetSize.Height, UNIT_EMU ) ); } // oox.core.ContextHandler2Helper interface ----------------------------------- @@ -481,7 +465,7 @@ ContextHandlerRef OoxDrawingFragment::onCreateContext( sal_Int32 nElement, const return new GraphicShapeContext( *this, ShapePtr(), mxShape ); case XDR_TOKEN( graphicFrame ): mxShape.reset( new Shape( "com.sun.star.drawing.OLE2Shape" ) ); - return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape ); + return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape, getSheetType() != SHEETTYPE_CHARTSHEET ); case XDR_TOKEN( grpSp ): mxShape.reset( new Shape( "com.sun.star.drawing.GroupShape" ) ); return new ShapeGroupContext( *this, ShapePtr(), mxShape ); @@ -526,7 +510,7 @@ void OoxDrawingFragment::onEndElement( const OUString& rChars ) { Rectangle aLoc = mxAnchor->calcEmuLocation( maEmuSheetSize ); if( (aLoc.X >= 0) && (aLoc.Y >= 0) && (aLoc.Width >= 0) && (aLoc.Height >= 0) ) - mxShape->addShape( getOoxFilter(), getThemeRef(), mxDrawPage, &aLoc ); + mxShape->addShape( getOoxFilter(), &getTheme(), mxDrawPage, &aLoc ); } mxShape.reset(); mxAnchor.reset(); diff --git a/oox/source/xls/formulabase.cxx b/oox/source/xls/formulabase.cxx index b9b9c3d57dcc..b2e5ba0ee931 100644 --- a/oox/source/xls/formulabase.cxx +++ b/oox/source/xls/formulabase.cxx @@ -229,12 +229,13 @@ const size_t FUNCINFO_PARAMINFOCOUNT = 5; /// Number of parameter const sal_uInt16 FUNCFLAG_VOLATILE = 0x0001; /// Result is volatile (e.g. NOW() function). const sal_uInt16 FUNCFLAG_IMPORTONLY = 0x0002; /// Only used in import filter. const sal_uInt16 FUNCFLAG_EXPORTONLY = 0x0004; /// Only used in export filter. -const sal_uInt16 FUNCFLAG_MACROCALL = 0x0008; /// Function is simulated by macro call in Excel. -const sal_uInt16 FUNCFLAG_EXTERNAL = 0x0010; /// Function is external in Calc. -const sal_uInt16 FUNCFLAG_MACROFUNC = 0x0020; /// Function is a macro-sheet function. -const sal_uInt16 FUNCFLAG_MACROCMD = 0x0040; /// Function is a macro-sheet command. -const sal_uInt16 FUNCFLAG_ALWAYSVAR = 0x0080; /// Function is always represented by a tFuncVar token. -const sal_uInt16 FUNCFLAG_PARAMPAIRS = 0x0100; /// Optional parameters are expected to appear in pairs. +const sal_uInt16 FUNCFLAG_MACROCALL = 0x0008; /// Function is stored as macro call in Excel (_xlfn. prefix). OOXML name MUST exist. +const sal_uInt16 FUNCFLAG_MACROCALLODF = 0x0010; /// ODF-only function stored as macro call in Excel (_xlfnodf. prefix). ODF name MUST exist. +const sal_uInt16 FUNCFLAG_EXTERNAL = 0x0020; /// Function is external in Calc. +const sal_uInt16 FUNCFLAG_MACROFUNC = 0x0040; /// Function is a macro-sheet function. +const sal_uInt16 FUNCFLAG_MACROCMD = 0x0080; /// Function is a macro-sheet command. +const sal_uInt16 FUNCFLAG_ALWAYSVAR = 0x0100; /// Function is always represented by a tFuncVar token. +const sal_uInt16 FUNCFLAG_PARAMPAIRS = 0x0200; /// Optional parameters are expected to appear in pairs. const sal_uInt16 FUNCFLAG_FUNCLIBMASK = 0xF000; /// Mask for function library bits. const sal_uInt16 FUNCFLAG_EUROTOOL = 0x1000; /// Function is part of the EuroTool add-in. @@ -346,7 +347,6 @@ static const FunctionData saFuncTableBiff2[] = { "TREND", "TREND", 50, 50, 1, 3, A, { RA, RA, RA, C }, 0 }, { "LOGEST", "LOGEST", 51, 51, 1, 2, A, { RA, RA, C, C }, 0 }, { "GROWTH", "GROWTH", 52, 52, 1, 3, A, { RA, RA, RA, C }, 0 }, - { 0, "RETURN", 55, 55, 0, 1, R, { RO }, FUNCFLAG_MACROFUNC }, { "PV", "PV", 56, 56, 3, 5, V, { VR }, 0 }, { "FV", "FV", 57, 57, 3, 5, V, { VR }, 0 }, { "NPER", "NPER", 58, 58, 3, 5, V, { VR }, 0 }, @@ -370,11 +370,9 @@ static const FunctionData saFuncTableBiff2[] = { "ROWS", "ROWS", 76, 76, 1, 1, V, { RO }, 0 }, { "COLUMNS", "COLUMNS", 77, 77, 1, 1, V, { RO }, 0 }, { "OFFSET", "OFFSET", 78, 78, 3, 5, R, { RO, VR }, FUNCFLAG_VOLATILE }, - { 0, "ABSREF", 79, 79, 2, 2, R, { VR, RO }, FUNCFLAG_MACROFUNC }, { "SEARCH", "SEARCH", 82, 82, 2, 3, V, { VR }, 0 }, { "TRANSPOSE", "TRANSPOSE", 83, 83, 1, 1, A, { VO }, 0 }, { "TYPE", "TYPE", 86, 86, 1, 1, V, { VX }, 0 }, - { 0, "ACTIVE.CELL", 94, 94, 0, 0, R, {}, FUNCFLAG_MACROFUNC }, { "ATAN2", "ATAN2", 97, 97, 2, 2, V, { VR }, 0 }, { "ASIN", "ASIN", 98, 98, 1, 1, V, { VR }, 0 }, { "ACOS", "ACOS", 99, 99, 1, 1, V, { VR }, 0 }, @@ -408,9 +406,6 @@ static const FunctionData saFuncTableBiff2[] = { "SYD", "SYD", 143, 143, 4, 4, V, { VR }, 0 }, { "DDB", "DDB", 144, 144, 4, 5, V, { VR }, 0 }, { "INDIRECT", "INDIRECT", 148, 148, 1, 2, R, { VR }, FUNCFLAG_VOLATILE }, - { 0, "ADD.BAR", 151, 151, 0, 0, V, {}, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR }, - { 0, "ADD.MENU", 152, 152, 2, 2, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR }, - { 0, "ADD.COMMAND", 153, 153, 3, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR }, { "CLEAN", "CLEAN", 162, 162, 1, 1, V, { VR }, 0 }, { "MDETERM", "MDETERM", 163, 163, 1, 1, V, { VA }, 0 }, { "MINVERSE", "MINVERSE", 164, 164, 1, 1, A, { VA }, 0 }, @@ -434,10 +429,16 @@ static const FunctionData saFuncTableBiff2[] = // *** macro sheet commands *** { 0, "A1.R1C1", 30, 30, 0, 1, V, { VR }, FUNCFLAG_MACROCMD }, + { 0, "RETURN", 55, 55, 0, 1, R, { RO }, FUNCFLAG_MACROFUNC }, + { 0, "ABSREF", 79, 79, 2, 2, R, { VR, RO }, FUNCFLAG_MACROFUNC }, { 0, "ADD.ARROW", 81, 81, 0, 0, V, {}, FUNCFLAG_MACROCMD }, + { 0, "ACTIVE.CELL", 94, 94, 0, 0, R, {}, FUNCFLAG_MACROFUNC }, { 0, "ACTIVATE", 103, 103, 0, 2, V, { VR }, FUNCFLAG_MACROCMD }, { 0, "ACTIVATE.NEXT", 104, 104, 0, 0, V, {}, FUNCFLAG_MACROCMD }, - { 0, "ACTIVATE.PREV", 105, 105, 0, 0, V, {}, FUNCFLAG_MACROCMD } + { 0, "ACTIVATE.PREV", 105, 105, 0, 0, V, {}, FUNCFLAG_MACROCMD }, + { 0, "ADD.BAR", 151, 151, 0, 0, V, {}, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR }, + { 0, "ADD.MENU", 152, 152, 2, 2, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR }, + { 0, "ADD.COMMAND", 153, 153, 3, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC | FUNCFLAG_ALWAYSVAR } }; /** Functions new in BIFF3. */ @@ -447,9 +448,6 @@ static const FunctionData saFuncTableBiff3[] = { "TREND", "TREND", 50, 50, 1, 4, A, { RA, RA, RA, VV }, 0 }, // BIFF2: 1-3, BIFF3: 1-4 { "LOGEST", "LOGEST", 51, 51, 1, 4, A, { RA, RA, VV }, 0 }, // BIFF2: 1-2, BIFF3: 1-4 { "GROWTH", "GROWTH", 52, 52, 1, 4, A, { RA, RA, RA, VV }, 0 }, // BIFF2: 1-3, BIFF3: 1-4 - { 0, "ADD.BAR", 151, 151, 0, 1, V, { VR }, FUNCFLAG_MACROFUNC }, // BIFF2: 0, BIFF3: 0-1 - { 0, "ADD.MENU", 152, 152, 2, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC }, // BIFF2: 2, BIFF3: 2-3 - { 0, "ADD.COMMAND", 153, 153, 3, 4, V, { VR, RO }, FUNCFLAG_MACROFUNC }, // BIFF2: 3, BIFF3: 3-4 { "TRUNC", "TRUNC", 197, 197, 1, 2, V, { VR }, 0 }, // BIFF2: 1, BIFF3: 1-2 { "DOLLAR", "USDOLLAR", 204, 204, 1, 2, V, { VR }, FUNCFLAG_IMPORTONLY }, { 0/*"FIND"*/, "FINDB", 205, 205, 2, 3, V, { VR }, 0 }, @@ -478,7 +476,13 @@ static const FunctionData saFuncTableBiff3[] = { "ATANH", "ATANH", 234, 234, 1, 1, V, { VR }, 0 }, { "ACOTH", "ATANH", 234, 234, 1, 1, V, { VR }, FUNCFLAG_EXPORTONLY }, { "DGET", "DGET", 235, 235, 3, 3, V, { RO, RR }, 0 }, - { "INFO", "INFO", 244, 244, 1, 1, V, { VR }, FUNCFLAG_VOLATILE } + { "INFO", "INFO", 244, 244, 1, 1, V, { VR }, FUNCFLAG_VOLATILE }, + + // *** macro sheet commands *** + + { 0, "ADD.BAR", 151, 151, 0, 1, V, { VR }, FUNCFLAG_MACROFUNC }, // BIFF2: 0, BIFF3: 0-1 + { 0, "ADD.MENU", 152, 152, 2, 3, V, { VR, RO }, FUNCFLAG_MACROFUNC }, // BIFF2: 2, BIFF3: 2-3 + { 0, "ADD.COMMAND", 153, 153, 3, 4, V, { VR, RO }, FUNCFLAG_MACROFUNC } // BIFF2: 3, BIFF3: 3-4 }; /** Functions new in BIFF4. */ @@ -662,8 +666,6 @@ static const FunctionData saFuncTableBiff5[] = { "WEEKDAY", "WEEKDAY", 70, 70, 1, 2, V, { VR }, 0 }, // BIFF2-4: 1, BIFF5: 1-2 { "HLOOKUP", "HLOOKUP", 101, 101, 3, 4, V, { VV, RO, RO, VV }, 0 }, // BIFF2-4: 3, BIFF5: 3-4 { "VLOOKUP", "VLOOKUP", 102, 102, 3, 4, V, { VV, RO, RO, VV }, 0 }, // BIFF2-4: 3, BIFF5: 3-4 - { 0, "ADD.MENU", 152, 152, 2, 4, V, { VR, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 2-3, BIFF5: 2-4 - { 0, "ADD.COMMAND", 153, 153, 3, 5, V, { VR, RO, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 3-4, BIFF5: 3-5 { "DAYS360", "DAYS360", 220, 220, 2, 3, V, { VR }, 0 }, // BIFF3-4: 2, BIFF5: 2-3 { 0, "EXTERN.CALL", 255, 255, 1, MX, R, { RO_E, RO }, FUNCFLAG_EXPORTONLY }, // MACRO or EXTERNAL { "CONCATENATE", "CONCATENATE", 336, 336, 0, MX, V, { VR }, 0 }, @@ -686,6 +688,8 @@ static const FunctionData saFuncTableBiff5[] = // *** macro sheet commands *** + { 0, "ADD.MENU", 152, 152, 2, 4, V, { VR, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 2-3, BIFF5: 2-4 + { 0, "ADD.COMMAND", 153, 153, 3, 5, V, { VR, RO, RO, RO, VR }, FUNCFLAG_MACROFUNC }, // BIFF3-4: 3-4, BIFF5: 3-5 { 0, "ADD.CHART.AUTOFORMAT", 390, 390, 0, 2, V, { VR }, FUNCFLAG_MACROCMD }, { 0, "ADD.LIST.ITEM", 451, 451, 0, 2, V, { VR }, FUNCFLAG_MACROCMD }, { 0, "ACTIVE.CELL.FONT", 476, 476, 0, 14, V, { VR }, FUNCFLAG_MACROCMD } @@ -738,41 +742,39 @@ static const FunctionData saFuncTableOox[] = /** Functions defined by OpenFormula, but not supported by Calc or by Excel. */ static const FunctionData saFuncTableOdf[] = { - { "ARABIC", 0, NOID, NOID, 1, 1, V, { VR }, 0 }, - { "B", 0, NOID, NOID, 3, 4, V, { VR }, 0 }, - { "BASE", 0, NOID, NOID, 2, 3, V, { VR }, 0 }, - { "BITAND", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "BITLSHIFT", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "BITOR", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "BITRSHIFT", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "BITXOR", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "CHISQDIST", 0, NOID, NOID, 2, 3, V, { VR }, 0 }, - { "CHISQINV", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "COMBINA", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "DAYS", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "DDE", 0, NOID, NOID, 3, 4, V, { VR }, 0 }, - { "DECIMAL", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "FDIST", 0, NOID, NOID, 3, 4, V, { VR }, 0 }, - { "FINV", 0, NOID, NOID, 3, 3, V, { VR }, 0 }, - { "FORMULA", 0, NOID, NOID, 1, 1, V, { RO }, 0 }, - { "GAMMA", 0, NOID, NOID, 1, 1, V, { VR }, 0 }, - { "GAUSS", 0, NOID, NOID, 1, 1, V, { VR }, 0 }, - { "IFNA", 0, NOID, NOID, 2, 2, V, { VR, RO }, 0 }, - { "ISFORMULA", 0, NOID, NOID, 1, 1, V, { RO }, 0 }, - { "ISOWEEKNUM", 0, NOID, NOID, 1, 2, V, { VR }, 0 }, - { "MULTIPLE.OPERATIONS", 0, NOID, NOID, 3, 5, V, { RO }, 0 }, - { "MUNIT", 0, NOID, NOID, 1, 1, A, { VR }, 0 }, - { "NUMBERVALUE", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "PDURATION", 0, NOID, NOID, 3, 3, V, { VR }, 0 }, - { "PERMUTATIONA", 0, NOID, NOID, 2, 2, V, { VR }, 0 }, - { "PHI", 0, NOID, NOID, 1, 1, V, { VR }, 0 }, - { "RRI", 0, NOID, NOID, 3, 3, V, { VR }, 0 }, - { "SHEET", 0, NOID, NOID, 1, 1, V, { RO }, 0 }, - { "SHEETS", 0, NOID, NOID, 0, 1, V, { RO }, 0 }, - { "SKEWP", 0, NOID, NOID, 1, MX, V, { RX }, 0 }, - { "UNICHAR", 0, NOID, NOID, 1, 1, V, { VR }, 0 }, - { "UNICODE", 0, NOID, NOID, 1, 1, V, { VR }, 0 }, - { "XOR", 0, NOID, NOID, 1, MX, V, { RX }, 0 } + { "ARABIC", 0, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "B", 0, NOID, NOID, 3, 4, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "BASE", 0, NOID, NOID, 2, 3, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "BITAND", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "BITLSHIFT", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "BITOR", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "BITRSHIFT", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "BITXOR", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "CHISQDIST", 0, NOID, NOID, 2, 3, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "CHISQINV", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "COMBINA", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "DAYS", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "DECIMAL", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "FDIST", 0, NOID, NOID, 3, 4, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "FINV", 0, NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "FORMULA", 0, NOID, NOID, 1, 1, V, { RO }, FUNCFLAG_MACROCALLODF }, + { "GAMMA", 0, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "GAUSS", 0, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "IFNA", 0, NOID, NOID, 2, 2, V, { VR, RO }, FUNCFLAG_MACROCALLODF }, + { "ISFORMULA", 0, NOID, NOID, 1, 1, V, { RO }, FUNCFLAG_MACROCALLODF }, + { "ISOWEEKNUM", 0, NOID, NOID, 1, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "MUNIT", 0, NOID, NOID, 1, 1, A, { VR }, FUNCFLAG_MACROCALLODF }, + { "NUMBERVALUE", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "PDURATION", 0, NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "PERMUTATIONA", 0, NOID, NOID, 2, 2, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "PHI", 0, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "RRI", 0, NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "SHEET", 0, NOID, NOID, 1, 1, V, { RO }, FUNCFLAG_MACROCALLODF }, + { "SHEETS", 0, NOID, NOID, 0, 1, V, { RO }, FUNCFLAG_MACROCALLODF }, + { "SKEWP", 0, NOID, NOID, 1, MX, V, { RX }, FUNCFLAG_MACROCALLODF }, + { "UNICHAR", 0, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "UNICODE", 0, NOID, NOID, 1, 1, V, { VR }, FUNCFLAG_MACROCALLODF }, + { "XOR", 0, NOID, NOID, 1, MX, V, { RX }, FUNCFLAG_MACROCALLODF } }; // ---------------------------------------------------------------------------- @@ -895,6 +897,7 @@ FunctionProviderImpl::FunctionProviderImpl( FilterType eFilter, BiffType eBiff, initFuncs( saFuncTableBiff8, STATIC_ARRAY_END( saFuncTableBiff8 ), nMaxParam, bImportFilter ); if( eFilter == FILTER_OOX ) initFuncs( saFuncTableOox, STATIC_ARRAY_END( saFuncTableOox ), nMaxParam, bImportFilter ); + initFuncs( saFuncTableOdf, STATIC_ARRAY_END( saFuncTableOdf ), nMaxParam, bImportFilter ); } void FunctionProviderImpl::initFunc( const FunctionData& rFuncData, sal_uInt8 nMaxParam ) @@ -905,13 +908,25 @@ void FunctionProviderImpl::initFunc( const FunctionData& rFuncData, sal_uInt8 nM xFuncInfo->maOdfFuncName = OUString::createFromAscii( rFuncData.mpcOdfFuncName ); if( rFuncData.mpcOoxFuncName ) xFuncInfo->maOoxFuncName = OUString::createFromAscii( rFuncData.mpcOoxFuncName ); + if( getFlag( rFuncData.mnFlags, FUNCFLAG_MACROCALL ) ) + { + OSL_ENSURE( xFuncInfo->maOoxFuncName.getLength() > 0, "FunctionProviderImpl::initFunc - missing OOXML function name" ); + OSL_ENSURE( !getFlag( rFuncData.mnFlags, FUNCFLAG_MACROCALLODF ), "FunctionProviderImpl::initFunc - unexpected flag FUNCFLAG_MACROCALLODF" ); xFuncInfo->maBiffMacroName = CREATE_OUSTRING( "_xlfn." ) + xFuncInfo->maOoxFuncName; + } + else if( getFlag( rFuncData.mnFlags, FUNCFLAG_MACROCALLODF ) ) + { + OSL_ENSURE( xFuncInfo->maOdfFuncName.getLength() > 0, "FunctionProviderImpl::initFunc - missing ODF function name" ); + xFuncInfo->maBiffMacroName = CREATE_OUSTRING( "_xlfnodf." ) + xFuncInfo->maOdfFuncName; + } + switch( rFuncData.mnFlags & FUNCFLAG_FUNCLIBMASK ) { case FUNCFLAG_EUROTOOL: xFuncInfo->meFuncLibType = FUNCLIB_EUROTOOL; break; default: xFuncInfo->meFuncLibType = FUNCLIB_UNKNOWN; } + xFuncInfo->mnApiOpCode = -1; xFuncInfo->mnOobFuncId = rFuncData.mnOobFuncId; xFuncInfo->mnBiffFuncId = rFuncData.mnBiffFuncId; diff --git a/oox/source/xls/stylesbuffer.cxx b/oox/source/xls/stylesbuffer.cxx index 3eac90040667..cd914ceae196 100644 --- a/oox/source/xls/stylesbuffer.cxx +++ b/oox/source/xls/stylesbuffer.cxx @@ -69,6 +69,7 @@ using ::com::sun::star::awt::FontDescriptor; using ::com::sun::star::awt::XDevice; using ::com::sun::star::awt::XFont2; using ::com::sun::star::table::BorderLine; +using ::com::sun::star::table::TableBorder; using ::com::sun::star::text::XText; using ::com::sun::star::style::XStyle; using ::oox::core::FilterBase; @@ -1398,7 +1399,6 @@ void Alignment::writeToPropertyMap( PropertyMap& rPropMap ) const rPropMap[ PROP_VertJustify ] <<= maApiData.meVerJustify; rPropMap[ PROP_WritingMode ] <<= maApiData.mnWritingMode; rPropMap[ PROP_RotateAngle ] <<= maApiData.mnRotation; - rPropMap[ PROP_RotateReference ] <<= ::com::sun::star::table::CellVertJustify_STANDARD; // rotation reference rPropMap[ PROP_Orientation ] <<= maApiData.meOrientation; rPropMap[ PROP_ParaIndent ] <<= maApiData.mnIndent; rPropMap[ PROP_IsTextWrapped ] <<= maApiData.mbWrapText; @@ -1517,6 +1517,57 @@ ApiBorderData::ApiBorderData() : { } +bool ApiBorderData::hasAnyOuterBorder() const +{ + return + (maBorder.IsTopLineValid && (maBorder.TopLine.OuterLineWidth > 0)) || + (maBorder.IsBottomLineValid && (maBorder.BottomLine.OuterLineWidth > 0)) || + (maBorder.IsLeftLineValid && (maBorder.LeftLine.OuterLineWidth > 0)) || + (maBorder.IsRightLineValid && (maBorder.RightLine.OuterLineWidth > 0)); +} + +namespace { + +bool operator==( const BorderLine& rLeft, const BorderLine& rRight ) +{ + return + (rLeft.Color == rRight.Color) && + (rLeft.InnerLineWidth == rRight.InnerLineWidth) && + (rLeft.OuterLineWidth == rRight.OuterLineWidth) && + (rLeft.LineDistance == rRight.LineDistance); +} + +bool operator==( const TableBorder& rLeft, const TableBorder& rRight ) +{ + return + (rLeft.TopLine == rRight.TopLine) && + (rLeft.IsTopLineValid == rRight.IsTopLineValid) && + (rLeft.BottomLine == rRight.BottomLine) && + (rLeft.IsBottomLineValid == rRight.IsBottomLineValid) && + (rLeft.LeftLine == rRight.LeftLine) && + (rLeft.IsLeftLineValid == rRight.IsLeftLineValid) && + (rLeft.RightLine == rRight.RightLine) && + (rLeft.IsRightLineValid == rRight.IsRightLineValid) && + (rLeft.HorizontalLine == rRight.HorizontalLine) && + (rLeft.IsHorizontalLineValid == rRight.IsHorizontalLineValid) && + (rLeft.VerticalLine == rRight.VerticalLine) && + (rLeft.IsVerticalLineValid == rRight.IsVerticalLineValid) && + (rLeft.Distance == rRight.Distance) && + (rLeft.IsDistanceValid == rRight.IsDistanceValid); +} + +} // namespace + +bool operator==( const ApiBorderData& rLeft, const ApiBorderData& rRight ) +{ + return + (rLeft.maBorder == rRight.maBorder) && + (rLeft.maTLtoBR == rRight.maTLtoBR) && + (rLeft.maBLtoTR == rRight.maBLtoTR) && + (rLeft.mbBorderUsed == rRight.mbBorderUsed) && + (rLeft.mbDiagUsed == rRight.mbDiagUsed); +} + // ============================================================================ namespace { @@ -1820,6 +1871,14 @@ ApiSolidFillData::ApiSolidFillData() : { } +bool operator==( const ApiSolidFillData& rLeft, const ApiSolidFillData& rRight ) +{ + return + (rLeft.mnColor == rRight.mnColor) && + (rLeft.mbTransparent == rRight.mbTransparent) && + (rLeft.mbUsed == rRight.mbUsed); +} + // ============================================================================ namespace { @@ -2132,7 +2191,8 @@ XfModel::XfModel() : Xf::Xf( const WorkbookHelper& rHelper ) : WorkbookHelper( rHelper ), maAlignment( rHelper ), - maProtection( rHelper ) + maProtection( rHelper ), + meRotationRef( ::com::sun::star::table::CellVertJustify_STANDARD ) { } @@ -2315,13 +2375,46 @@ void Xf::importXf( BiffInputStream& rStrm ) void Xf::finalizeImport() { + StylesBuffer& rStyles = getStyles(); + // alignment and protection maAlignment.finalizeImport(); maProtection.finalizeImport(); - // update used flags from cell style - if( maModel.mbCellXf ) - if( const Xf* pStyleXf = getStyles().getStyleXf( maModel.mnStyleXfId ).get() ) - updateUsedFlags( *pStyleXf ); + + /* Enables the used flags, if the formatting attributes differ from the + style XF. In cell XFs Excel uses the cell attributes, if they differ + from the parent style XF (even if the used flag is switched off). + #109899# ...or if the respective flag is not set in parent style XF. + */ + const Xf* pStyleXf = isCellXf() ? rStyles.getStyleXf( maModel.mnStyleXfId ).get() : 0; + if( pStyleXf ) + { + const XfModel& rStyleData = pStyleXf->maModel; + if( !maModel.mbFontUsed ) + maModel.mbFontUsed = !rStyleData.mbFontUsed || (maModel.mnFontId != rStyleData.mnFontId); + if( !maModel.mbNumFmtUsed ) + maModel.mbNumFmtUsed = !rStyleData.mbNumFmtUsed || (maModel.mnNumFmtId != rStyleData.mnNumFmtId); + if( !maModel.mbAlignUsed ) + maModel.mbAlignUsed = !rStyleData.mbAlignUsed || !(maAlignment.getApiData() == pStyleXf->maAlignment.getApiData()); + if( !maModel.mbProtUsed ) + maModel.mbProtUsed = !rStyleData.mbProtUsed || !(maProtection.getApiData() == pStyleXf->maProtection.getApiData()); + if( !maModel.mbBorderUsed ) + maModel.mbBorderUsed = !rStyleData.mbBorderUsed || !rStyles.equalBorders( maModel.mnBorderId, rStyleData.mnBorderId ); + if( !maModel.mbAreaUsed ) + maModel.mbAreaUsed = !rStyleData.mbAreaUsed || !rStyles.equalFills( maModel.mnFillId, rStyleData.mnFillId ); + } + + /* #i38709# Decide which rotation reference mode to use. If any outer + border line of the cell is set (either explicitly or via cell style), + and the cell contents are rotated, set rotation reference to bottom of + cell. This causes the borders to be painted rotated with the text. */ + if( const Alignment* pAlignment = maModel.mbAlignUsed ? &maAlignment : (pStyleXf ? &pStyleXf->maAlignment : 0) ) + { + sal_Int32 nBorderId = maModel.mbBorderUsed ? maModel.mnBorderId : (pStyleXf ? pStyleXf->maModel.mnBorderId : -1); + if( const Border* pBorder = rStyles.getBorder( nBorderId ).get() ) + if( (pAlignment->getApiData().mnRotation != 0) && pBorder->getApiData().hasAnyOuterBorder() ) + meRotationRef = ::com::sun::star::table::CellVertJustify_BOTTOM; + } } FontRef Xf::getFont() const @@ -2341,7 +2434,7 @@ void Xf::writeToPropertyMap( PropertyMap& rPropMap ) const StylesBuffer& rStyles = getStyles(); // create and set cell style - if( maModel.mbCellXf ) + if( isCellXf() ) rPropMap[ PROP_CellStyle ] <<= rStyles.createCellStyle( maModel.mnStyleXfId ); if( maModel.mbFontUsed ) @@ -2356,6 +2449,8 @@ void Xf::writeToPropertyMap( PropertyMap& rPropMap ) const rStyles.writeBorderToPropertyMap( rPropMap, maModel.mnBorderId ); if( maModel.mbAreaUsed ) rStyles.writeFillToPropertyMap( rPropMap, maModel.mnFillId ); + if( maModel.mbAlignUsed || maModel.mbBorderUsed ) + rPropMap[ PROP_RotateReference ] <<= meRotationRef; } void Xf::writeToPropertySet( PropertySet& rPropSet ) const @@ -2371,37 +2466,15 @@ void Xf::setBiffUsedFlags( sal_uInt8 nUsedFlags ) - In cell XFs a *set* bit means a used attribute. - In style XFs a *cleared* bit means a used attribute. The boolean flags always store true, if the attribute is used. - The "maModel.mbCellXf == getFlag(...)" construct evaluates to true in - both mentioned cases: cell XF and set bit; or style XF and cleared bit. + The "isCellXf() == getFlag(...)" construct evaluates to true in both + mentioned cases: cell XF and set bit; or style XF and cleared bit. */ - maModel.mbFontUsed = maModel.mbCellXf == getFlag( nUsedFlags, BIFF_XF_FONT_USED ); - maModel.mbNumFmtUsed = maModel.mbCellXf == getFlag( nUsedFlags, BIFF_XF_NUMFMT_USED ); - maModel.mbAlignUsed = maModel.mbCellXf == getFlag( nUsedFlags, BIFF_XF_ALIGN_USED ); - maModel.mbProtUsed = maModel.mbCellXf == getFlag( nUsedFlags, BIFF_XF_PROT_USED ); - maModel.mbBorderUsed = maModel.mbCellXf == getFlag( nUsedFlags, BIFF_XF_BORDER_USED ); - maModel.mbAreaUsed = maModel.mbCellXf == getFlag( nUsedFlags, BIFF_XF_AREA_USED ); -} - -void Xf::updateUsedFlags( const Xf& rStyleXf ) -{ - /* Enables the used flags, if the formatting attributes differ from the - passed style XF. In cell XFs Excel uses the cell attributes, if they - differ from the parent style XF. - #109899# ...or if the respective flag is not set in parent style XF. - */ - const XfModel& rStyleData = rStyleXf.maModel; - if( !maModel.mbFontUsed ) - maModel.mbFontUsed = !rStyleData.mbFontUsed || (maModel.mnFontId != rStyleData.mnFontId); - if( !maModel.mbNumFmtUsed ) - maModel.mbNumFmtUsed = !rStyleData.mbNumFmtUsed || (maModel.mnNumFmtId != rStyleData.mnNumFmtId); - if( !maModel.mbAlignUsed ) - maModel.mbAlignUsed = !rStyleData.mbAlignUsed || !(maAlignment.getApiData() == rStyleXf.maAlignment.getApiData()); - if( !maModel.mbProtUsed ) - maModel.mbProtUsed = !rStyleData.mbProtUsed || !(maProtection.getApiData() == rStyleXf.maProtection.getApiData()); - if( !maModel.mbBorderUsed ) - maModel.mbBorderUsed = !rStyleData.mbBorderUsed || (maModel.mnBorderId != rStyleData.mnBorderId); - if( !maModel.mbAreaUsed ) - maModel.mbAreaUsed = !rStyleData.mbAreaUsed || (maModel.mnFillId != rStyleData.mnFillId); + maModel.mbFontUsed = isCellXf() == getFlag( nUsedFlags, BIFF_XF_FONT_USED ); + maModel.mbNumFmtUsed = isCellXf() == getFlag( nUsedFlags, BIFF_XF_NUMFMT_USED ); + maModel.mbAlignUsed = isCellXf() == getFlag( nUsedFlags, BIFF_XF_ALIGN_USED ); + maModel.mbProtUsed = isCellXf() == getFlag( nUsedFlags, BIFF_XF_PROT_USED ); + maModel.mbBorderUsed = isCellXf() == getFlag( nUsedFlags, BIFF_XF_BORDER_USED ); + maModel.mbAreaUsed = isCellXf() == getFlag( nUsedFlags, BIFF_XF_AREA_USED ); } // ============================================================================ @@ -3133,11 +3206,12 @@ void StylesBuffer::importFormat( BiffInputStream& rStrm ) void StylesBuffer::importXf( BiffInputStream& rStrm ) { XfRef xXf( new Xf( *this ) ); - // store XF in both lists (except BIFF2 which does not support cell styles) - maCellXfs.push_back( xXf ); - if( getBiff() != BIFF2 ) - maStyleXfs.push_back( xXf ); xXf->importXf( rStrm ); + + XfRef xCellXf, xStyleXf; + (xXf->isCellXf() ? xCellXf : xStyleXf) = xXf; + maCellXfs.push_back( xCellXf ); + maStyleXfs.push_back( xStyleXf ); } void StylesBuffer::importStyle( BiffInputStream& rStrm ) @@ -3156,20 +3230,11 @@ void StylesBuffer::finalizeImport() // borders and fills maBorders.forEachMem( &Border::finalizeImport ); maFills.forEachMem( &Fill::finalizeImport ); - - /* Style XFs and cell XFs. The BIFF format stores cell XFs and style XFs - mixed in a single list. The import filter has stored the XFs in both - lists to make the getStyleXf() function working correctly (e.g. for - retrieving the default font, see getDefaultFont() function), except for - BIFF2 which does not support cell styles at all. Therefore, if in BIFF - filter mode, we do not need to finalize the cell styles list. */ - if( getFilterType() == FILTER_OOX ) - maStyleXfs.forEachMem( &Xf::finalizeImport ); + // style XFs and cell XFs + maStyleXfs.forEachMem( &Xf::finalizeImport ); maCellXfs.forEachMem( &Xf::finalizeImport ); - // built-in and user defined cell styles maCellStyles.finalizeImport(); - // differential formatting (for conditional formatting) maDxfs.forEachMem( &Dxf::finalizeImport ); } @@ -3184,6 +3249,11 @@ FontRef StylesBuffer::getFont( sal_Int32 nFontId ) const return maFonts.get( nFontId ); } +BorderRef StylesBuffer::getBorder( sal_Int32 nBorderId ) const +{ + return maBorders.get( nBorderId ); +} + XfRef StylesBuffer::getCellXf( sal_Int32 nXfId ) const { return maCellXfs.get( nXfId ); @@ -3225,6 +3295,56 @@ const FontModel& StylesBuffer::getDefaultFontModel() const return xDefFont.get() ? xDefFont->getModel() : getTheme().getDefaultFontModel(); } +bool StylesBuffer::equalBorders( sal_Int32 nBorderId1, sal_Int32 nBorderId2 ) const +{ + if( nBorderId1 == nBorderId2 ) + return true; + + switch( getFilterType() ) + { + case FILTER_OOX: + // in OOXML, borders are assumed to be unique + return false; + + case FILTER_BIFF: + { + // in BIFF, a new border entry has been created for every XF + const Border* pBorder1 = maBorders.get( nBorderId1 ).get(); + const Border* pBorder2 = maBorders.get( nBorderId2 ).get(); + return pBorder1 && pBorder2 && (pBorder1->getApiData() == pBorder2->getApiData()); + } + + case FILTER_UNKNOWN: + break; + } + return false; +} + +bool StylesBuffer::equalFills( sal_Int32 nFillId1, sal_Int32 nFillId2 ) const +{ + if( nFillId1 == nFillId2 ) + return true; + + switch( getFilterType() ) + { + case FILTER_OOX: + // in OOXML, fills are assumed to be unique + return false; + + case FILTER_BIFF: + { + // in BIFF, a new fill entry has been created for every XF + const Fill* pFill1 = maFills.get( nFillId1 ).get(); + const Fill* pFill2 = maFills.get( nFillId2 ).get(); + return pFill1 && pFill2 && (pFill1->getApiData() == pFill2->getApiData()); + } + + case FILTER_UNKNOWN: + break; + } + return false; +} + OUString StylesBuffer::getDefaultStyleName() const { return maCellStyles.getDefaultStyleName(); diff --git a/oox/source/xls/workbookhelper.cxx b/oox/source/xls/workbookhelper.cxx index 8f6fb872e71e..93ad0a65422f 100644 --- a/oox/source/xls/workbookhelper.cxx +++ b/oox/source/xls/workbookhelper.cxx @@ -317,8 +317,6 @@ public: inline WorksheetBuffer& getWorksheets() const { return *mxWorksheets; } /** Returns the office theme object read from the theme substorage. */ inline ThemeBuffer& getTheme() const { return *mxTheme; } - /** Returns the office theme object reference read from the theme substorage. */ - inline ::boost::shared_ptr< Theme > getThemeRef() const { return mxTheme; } /** Returns all cell formatting objects read from the styles substream. */ inline StylesBuffer& getStyles() const { return *mxStyles; } /** Returns the shared strings read from the shared strings substream. */ @@ -961,11 +959,6 @@ ThemeBuffer& WorkbookHelper::getTheme() const return mrBookData.getTheme(); } -::boost::shared_ptr< Theme > WorkbookHelper::getThemeRef() const -{ - return mrBookData.getThemeRef(); -} - StylesBuffer& WorkbookHelper::getStyles() const { return mrBookData.getStyles(); diff --git a/unoxml/source/rdf/makefile.mk b/unoxml/source/rdf/makefile.mk index 39741bda15b1..1fd36f45ce0b 100644 --- a/unoxml/source/rdf/makefile.mk +++ b/unoxml/source/rdf/makefile.mk @@ -58,7 +58,7 @@ SHL1OBJS= $(SLOFILES) SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1IMPLIB= i$(TARGET) -SHL1VERSIONMAP=../service/exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/unoxml/source/service/exports.map b/unoxml/source/service/exports.map deleted file mode 100644 index ba501f9ae076..000000000000 --- a/unoxml/source/service/exports.map +++ /dev/null @@ -1,10 +0,0 @@ -UDK_3_0_0 { - global: - GetVersionInfo; - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/unoxml/source/service/makefile.mk b/unoxml/source/service/makefile.mk index bbce7e913f09..93aec0746323 100644 --- a/unoxml/source/service/makefile.mk +++ b/unoxml/source/service/makefile.mk @@ -53,7 +53,7 @@ SHL1OBJS= $(SLOFILES) SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1IMPLIB= i$(TARGET) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1DEF=$(MISC)$/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) diff --git a/unoxml/test/export.map b/unoxml/test/export.map index 709047ae63e5..7321bbca16ad 100644 --- a/unoxml/test/export.map +++ b/unoxml/test/export.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.1 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/unoxml/test/makefile.mk b/unoxml/test/makefile.mk index 8fcba9ff328a..11fe8884befd 100644 --- a/unoxml/test/makefile.mk +++ b/unoxml/test/makefile.mk @@ -37,6 +37,8 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + # --- Common ---------------------------------------------------------- # BEGIN ---------------------------------------------------------------- diff --git a/writerfilter/inc/resourcemodel/Protocol.hxx b/writerfilter/inc/resourcemodel/Protocol.hxx new file mode 100644 index 000000000000..d0405861f695 --- /dev/null +++ b/writerfilter/inc/resourcemodel/Protocol.hxx @@ -0,0 +1,98 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: $ + * $Revision: $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX +#define INCLUDE_WRITERFILTER_PROTOCOL_HXX + +#include +#include "WW8ResourceModel.hxx" +#include "TagLogger.hxx" +namespace writerfilter +{ + +class StreamProtocol : public Stream +{ + Stream * m_pStream; + TagLogger::Pointer_t m_pTagLogger; + +public: + typedef boost::shared_ptr Pointer_t; + + StreamProtocol(Stream * pStream, TagLogger::Pointer_t pTagLogger); + virtual ~StreamProtocol(); + + virtual void startSectionGroup(); + virtual void endSectionGroup(); + virtual void startParagraphGroup(); + virtual void endParagraphGroup(); + virtual void startCharacterGroup(); + virtual void endCharacterGroup(); + virtual void text(const sal_uInt8 * data, size_t len); + virtual void utext(const sal_uInt8 * data, size_t len); + virtual void props(writerfilter::Reference::Pointer_t ref); + virtual void table(Id name, + writerfilter::Reference::Pointer_t ref); + virtual void substream(Id name, + writerfilter::Reference::Pointer_t ref); + virtual void info(const string & rInfo); + virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); + virtual void endShape(); +}; + +class PropertiesProtocol : public Properties +{ + Properties * m_pProperties; + TagLogger::Pointer_t m_pTagLogger; + +public: + typedef boost::shared_ptr Pointer_t; + + PropertiesProtocol(Properties * pProperties, TagLogger::Pointer_t pTagLogger); + virtual ~PropertiesProtocol(); + + virtual void attribute(Id name, Value & val); + virtual void sprm(Sprm & sprm); +}; + +class TableProtocol : public Table +{ + Table * m_pTable; + TagLogger::Pointer_t m_pTagLogger; + +public: + typedef boost::shared_ptr Pointer_t; + + TableProtocol(Table * pTable, TagLogger::Pointer_t pTagLogger); + virtual ~TableProtocol(); + + virtual void entry(int pos, writerfilter::Reference::Pointer_t ref); +}; + +} +#endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX diff --git a/writerfilter/inc/resourcemodel/TableData.hxx b/writerfilter/inc/resourcemodel/TableData.hxx index 50f28d2bc5bf..aca4fce71064 100644 --- a/writerfilter/inc/resourcemodel/TableData.hxx +++ b/writerfilter/inc/resourcemodel/TableData.hxx @@ -207,6 +207,15 @@ public: mCells[i]->insertProperties(pProps); } + /** + Add properties to the last cell of the row. + */ + void insertCellProperties(PropertiesPointer pProps) + { + if (! mCells.empty()) + mCells.back()->insertProperties(pProps); + } + /** Return number of cells in the row. */ @@ -330,16 +339,34 @@ public: mpRow->addCell(start, pProps); } + /** + End the current cell of the current row. + + @parm end end handle of the cell + */ void endCell(const T & end) { mpRow->endCell(end); } + /** + Return if the current cell of the current row is open. + */ bool isCellOpen() const { return mpRow->isCellOpen(); } + /** + Insert properties to the current cell of the current row. + + @param pProps the properties to add + */ + void insertCellProperties(PropertiesPointer pProps) + { + mpRow->insertCellProperties(pProps); + } + /** Add properties to a cell of the current row. diff --git a/writerfilter/inc/resourcemodel/TableManager.hxx b/writerfilter/inc/resourcemodel/TableManager.hxx index 45fadad42351..fe43694d25d2 100644 --- a/writerfilter/inc/resourcemodel/TableManager.hxx +++ b/writerfilter/inc/resourcemodel/TableManager.hxx @@ -42,6 +42,8 @@ #include #include +#include "util.hxx" +#include "TagLogger.hxx" namespace writerfilter { @@ -100,11 +102,6 @@ public: @param rT end handle of cell */ virtual void endCell(const T & rT) = 0; - - virtual T* getTable( ) - { - return NULL; - }; }; template @@ -118,22 +115,289 @@ template */ class TableManager { - typedef boost::shared_ptr T_p; +#ifdef DEBUG_TABLE + TagLogger::Pointer_t mpTableLogger; +#endif + + class TableManagerState + { + /** + properties at the current point in document + */ + PropertiesPointer mpProps; + + /** + properties of the current cell + */ + PropertiesPointer mpCellProps; + + /** + properties of the current row + */ + PropertiesPointer mpRowProps; + + /** + properties of the current table + */ + stack mTableProps; + + /** + true if at the end of a row + */ + bool mbRowEnd; + + /** + true when in a cell + */ + bool mbInCell; + + /** + true when at the end of a cell + */ + bool mbCellEnd; + + public: + /** + Constructor + */ + TableManagerState() + : mbRowEnd(false), mbInCell(false), mbCellEnd(false) + { + } + + virtual ~TableManagerState() + { + } + + void startLevel() + { + PropertiesPointer pProps; + mTableProps.push(pProps); + } + + void endLevel() + { + mTableProps.pop(); + } + + /** + Reset to initial state at beginning of row. + */ + void resetCellSpecifics() + { + mbRowEnd = false; + mbInCell = false; + mbCellEnd = false; + } + + void resetProps() + { + mpProps.reset(); + } + + void setProps(PropertiesPointer pProps) + { + mpProps = pProps; + } + + PropertiesPointer getProps() + { + return mpProps; + } + + void resetCellProps() + { + mpCellProps.reset(); + } + + void setCellProps(PropertiesPointer pProps) + { + mpCellProps = pProps; + } + + PropertiesPointer getCellProps() + { + return mpCellProps; + } + + void resetRowProps() + { + mpCellProps.reset(); + } + + void setRowProps(PropertiesPointer pProps) + { + mpRowProps = pProps; + } + + PropertiesPointer getRowProps() + { + return mpRowProps; + } + + void resetTableProps() + { + if (mTableProps.size() > 0) + mTableProps.top().reset(); + } + + void setTableProps(PropertiesPointer pProps) + { + if (mTableProps.size() > 0) + mTableProps.top() = pProps; + } + + PropertiesPointer getTableProps() + { + PropertiesPointer pResult; + + if (mTableProps.size() > 0) + pResult = mTableProps.top(); + + return pResult; + } + + void setInCell(bool bInCell) + { + mbInCell = bInCell; + } + + bool isInCell() const + { + return mbInCell; + } + + void setCellEnd(bool bCellEnd) + { + mbCellEnd = bCellEnd; + } + + bool isCellEnd() const + { + return mbCellEnd; + } + + void setRowEnd(bool bRowEnd) + { + mbRowEnd = bRowEnd; + } + + bool isRowEnd() const + { + return mbRowEnd; + } + }; /** - true if at the end of a row + handle for the current position in document */ - bool mbRowEnd; + T mCurHandle; - /** - true when in a cell - */ - bool mbInCell; + TableManagerState mState; - /** - true when at the end of a cell - */ - bool mbCellEnd; +protected: + PropertiesPointer getProps() + { + return mState.getProps(); + } + + void setProps(PropertiesPointer pProps) + { + mState.setProps(pProps); + } + + void resetProps() + { + mState.resetProps(); + } + + PropertiesPointer getCellProps() + { + return mState.getCellProps(); + } + + void setCellProps(PropertiesPointer pProps) + { + mState.setCellProps(pProps); + } + + void resetCellProps() + { + mState.resetCellProps(); + } + + PropertiesPointer getRowProps() + { + return mState.getRowProps(); + } + + void setRowProps(PropertiesPointer pProps) + { + mState.setRowProps(pProps); + } + + void resetRowProps() + { + mState.resetRowProps(); + } + + void setInCell(bool bInCell) + { + mState.setInCell(bInCell); + } + + bool isInCell() const + { + return mState.isInCell(); + } + + void setCellEnd(bool bCellEnd) + { + mState.setCellEnd(bCellEnd); + } + + bool isCellEnd() const + { + return mState.isCellEnd(); + } + + void setRowEnd(bool bRowEnd) + { + mState.setRowEnd(bRowEnd); + } + + bool isRowEnd() const + { + return mState.isRowEnd(); + } + + PropertiesPointer getTableProps() + { + return mState.getTableProps(); + } + + void setTableProps(PropertiesPointer pProps) + { + mState.setTableProps(pProps); + } + + void resetTableProps() + { + mState.resetTableProps(); + } + + T getHandle() + { + return mCurHandle; + } + + void setHandle(const T & rHandle) + { + mCurHandle = rHandle; + } + +private: + typedef boost::shared_ptr T_p; /** depth of the current cell @@ -145,32 +409,6 @@ class TableManager */ sal_uInt32 mnTableDepth; - /** - properties at the current point in document - */ - PropertiesPointer mpProps; - - /** - properties of the current cell - */ - vector< PropertiesPointer > mpCellProps; - - /** - properties of the current row - */ - vector< PropertiesPointer > mpRowProps; - - /** - properties of the current table: don't use them directly. - */ - PropertiesPointer mpTableProps; - - /** - handle for the current position in document - */ - T mCurHandle; - - T* mpInnerTable; /** stack of table data @@ -212,6 +450,22 @@ class TableManager */ void resolveCurrentTable(); + /** + Open a cell at current level. + */ + + void openCell(const T & handle, PropertiesPointer pProps); + + /** + Close a cell at current level. + */ + void closeCell(const T & handle); + + /** + Ensure a cell is open at the current level. + */ + void ensureOpenCell(PropertiesPointer pProps); + protected: /** @@ -234,6 +488,7 @@ protected: */ virtual void clearData(); + public: TableManager(); virtual ~TableManager(){} @@ -348,25 +603,48 @@ public: only control information, e.g. end of row. */ virtual bool isIgnore() const; + + +#ifdef DEBUG_TABLE + void setTagLogger(TagLogger::Pointer_t _tagLogger) + { + mpTableLogger = _tagLogger; + } +#endif }; template TableManager::TableManager() -: mbRowEnd(false), mbInCell(false), mbCellEnd(false), mnTableDepthNew(0), - mnTableDepth(0), mpInnerTable( NULL ) +: mnTableDepthNew(0), mnTableDepth(0) { + setRowEnd(false); + setInCell(false); + setCellEnd(false); } template void TableManager::cellDepth(sal_uInt32 nDepth) { +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + { + mpTableLogger->startElement("tablemanager.cellDepth"); + mpTableLogger->attribute("depth", nDepth); + mpTableLogger->endElement("tablemanager.cellDepth"); + } +#endif + mnTableDepthNew = nDepth; } template void TableManager::inCell() { - mbInCell = true; +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->element("tablemanager.inCell"); +#endif + setInCell(true); if (mnTableDepthNew < 1) mnTableDepthNew = 1; @@ -375,13 +653,23 @@ void TableManager::inCell() template void TableManager::endCell() { - mbCellEnd = true; +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->element("tablemanager.endCell"); +#endif + + setCellEnd(true); } template void TableManager::endRow() { - mbRowEnd = true; +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->element("tablemanager.endRow"); +#endif + + setRowEnd(true); } template @@ -394,44 +682,80 @@ void TableManager::setHandler template void TableManager::handle(const T & rHandle) { - mCurHandle = rHandle; +#ifdef DEBUG_TABLE + if (mpTableLogger.get()) + { + mpTableLogger->startElement("tablemanager.handle"); + mpTableLogger->chars(toString(rHandle)); + mpTableLogger->endElement("tablemanager.handle"); + } +#endif + + setHandle(rHandle); } template void TableManager::startLevel() { -#if DEBUG - std::clog << "TableManager::startLevel()" << std::endl; +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + { + typename TableData::Pointer_t pTableData; + + if (mTableDataStack.size() > 0) + pTableData = mTableDataStack.top(); + + mpTableLogger->startElement("tablemanager.startLevel"); + mpTableLogger->attribute("level", mTableDataStack.size()); + + if (pTableData.get() != NULL) + mpTableLogger->attribute("openCell", + pTableData->isCellOpen() ? "yes" : "no"); + + mpTableLogger->endElement("tablemanager.startLevel"); + } #endif + typename TableData::Pointer_t pTableData (new TableData(mTableDataStack.size())); mTableDataStack.push(pTableData); - - PropertiesPointer pEmptyProps; - cellProps( pEmptyProps ); + mState.startLevel(); } template void TableManager::endLevel() { -#if DEBUG - std::clog << "TableManager::endLevel()" << std::endl; -#endif if (mpTableDataHandler.get() != NULL) resolveCurrentTable(); + + mState.endLevel(); mTableDataStack.pop(); - if ( mpCellProps.size( ) > 0 ) - mpCellProps.pop_back( ); +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + { + typename TableData::Pointer_t pTableData; + + if (mTableDataStack.size() > 0) + pTableData = mTableDataStack.top(); + + mpTableLogger->startElement("tablemanager.endLevel"); + mpTableLogger->attribute("level", mTableDataStack.size()); + + if (pTableData.get() != NULL) + mpTableLogger->attribute("openCell", + pTableData->isCellOpen() ? "yes" : "no"); + + mpTableLogger->endElement("tablemanager.endLevel"); + } +#endif } template void TableManager::startParagraphGroup() { - mbRowEnd = false; - mbInCell = false; - mbCellEnd = false; + mState.resetCellSpecifics(); mnTableDepthNew = 0; } @@ -439,6 +763,16 @@ template void TableManager::endParagraphGroup() { sal_Int32 nTableDepthDifference = mnTableDepthNew - mnTableDepth; + + PropertiesPointer pEmptyProps; + + while (nTableDepthDifference > 0) + { + ensureOpenCell(pEmptyProps); + startLevel(); + + --nTableDepthDifference; + } while (nTableDepthDifference < 0) { endLevel(); @@ -448,38 +782,30 @@ void TableManager::endParagraphGroup() mnTableDepth = mnTableDepthNew; - typename TableData::Pointer_t pTableData = + if (mnTableDepth > 0) + { + typename TableData::Pointer_t pTableData = mTableDataStack.top(); - if (mbRowEnd) - { - endOfRowAction(); - pTableData->endRow( mpRowProps.back( ) ); - mpRowProps.back( ).reset(); - } - else if ( mbInCell ) - { - if (! pTableData->isCellOpen()) + if (isRowEnd()) { - if ( mpInnerTable ) - { - pTableData->addCell( *mpInnerTable, mpCellProps.back( ) ); - mpInnerTable = NULL; - } - else - { - pTableData->addCell( mCurHandle, mpCellProps.back( ) ); - } + endOfRowAction(); + pTableData->endRow(getRowProps()); + resetRowProps(); } - if (mbCellEnd) + else if (isInCell()) { - endOfCellAction(); - pTableData->endCell(mCurHandle); + ensureOpenCell(getCellProps()); + + if (isCellEnd()) + { + endOfCellAction(); + closeCell(getHandle()); + } } + resetCellProps(); } - if ( mpCellProps.size( ) > 0 ) - mpCellProps.back().reset( ); } template @@ -513,19 +839,29 @@ bool TableManager::sprm(Sprm & rSprm) template void TableManager::props(PropertiesPointer pProps) { - mpProps = pProps; + setProps(pProps); } template void TableManager::handle0x7() { +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->startElement("tablemanager.handle0x7"); +#endif + if (mnTableDepthNew < 1) mnTableDepthNew = 1; - if (mbInCell) + if (isInCell()) endCell(); else endRow(); + +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->endElement("tablemanager.handle0x7"); +#endif } template @@ -555,50 +891,85 @@ void TableManager::utext(const sal_uInt8 * data, size_t le template void TableManager::cellProps(PropertiesPointer pProps) { - if ( mpCellProps.size( ) == mTableDataStack.size( ) ) - { - if ( mpCellProps.back( ).get( ) ) - mpCellProps.back()->insert( pProps ); - else - mpCellProps.back( ) = pProps; - } +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->startElement("tablemanager.cellProps"); +#endif + + if(getCellProps().get()) + getCellProps()->insert( pProps ); else - mpCellProps.push_back( pProps ); + setCellProps(pProps); + +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->endElement("tablemanager.cellProps"); +#endif } template void TableManager::cellPropsByCell (unsigned int i, PropertiesPointer pProps) { +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->startElement("tablemanager.cellPropsByCell"); +#endif + mTableDataStack.top()->insertCellProperties(i, pProps); + +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->endElement("tablemanager.cellPropsByCell"); +#endif } template void TableManager::insertRowProps(PropertiesPointer pProps) { - if ( mpRowProps.size( ) == ( mTableDataStack.size( ) - 1 ) ) - { - if( mpRowProps.back( ).get( ) ) - mpRowProps.back( )->insert( pProps ); - else - mpRowProps.back( ) = pProps; - } +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->startElement("tablemanager.insertRowProps"); +#endif + + if( getRowProps().get() ) + getRowProps()->insert( pProps ); else - mpRowProps.push_back( pProps ); + setRowProps(pProps); + +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->endElement("tablemanager.insertRowProps"); +#endif } template void TableManager::insertTableProps(PropertiesPointer pProps) { - typename TableData::Pointer_t - pTableData = mTableDataStack.top(); +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->startElement("tablemanager.insertTableProps"); +#endif - pTableData->insertTableProperties( pProps ); + if( getTableProps().get() ) + getTableProps()->insert( pProps ); + else + setTableProps(pProps); + +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->endElement("tablemanager.insertTableProps"); +#endif } template void TableManager::resolveCurrentTable() { +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->startElement("tablemanager.resolveCurrentTable"); +#endif + if (mpTableDataHandler.get() != NULL) { typename TableData::Pointer_t @@ -606,7 +977,7 @@ void TableManager::resolveCurrentTable() unsigned int nRows = pTableData->getRowCount(); - mpTableDataHandler->startTable(nRows, pTableData->getDepth(), pTableData->getTableProperties( ) ); + mpTableDataHandler->startTable(nRows, pTableData->getDepth(), getTableProps()); for (unsigned int nRow = 0; nRow < nRows; ++nRow) { @@ -629,13 +1000,14 @@ void TableManager::resolveCurrentTable() } mpTableDataHandler->endTable(); - - // The inner table has to be stored only if there is something in the stack - // The 0 depth is the dummy table for the whole stream - if ( pTableData->getDepth( ) > 1 ) - mpInnerTable = mpTableDataHandler->getTable( ); } + resetTableProps(); clearData(); + +#ifdef DEBUG_TABLE + if (mpTableLogger.get() != NULL) + mpTableLogger->endElement("tablemanager.resolveCurrentTable"); +#endif } template @@ -651,13 +1023,77 @@ void TableManager::endOfRowAction() template bool TableManager::isIgnore() const { - return mbRowEnd; + return isRowEnd(); } + template void TableManager::clearData() { } +template +void TableManager::openCell +(const T & rHandle, PropertiesPointer pProps) +{ +#ifdef DEBUG_TABLE + mpTableLogger->startElement("tablemanager.openCell"); + mpTableLogger->chars(toString(rHandle)); + mpTableLogger->endElement("tablemanager.openCell"); +#endif + + if (mTableDataStack.size() > 0) + { + typename TableData::Pointer_t + pTableData = mTableDataStack.top(); + + pTableData->addCell(rHandle, pProps); + } +} + +template +void TableManager::closeCell +(const T & rHandle) +{ +#ifdef DEBUG_TABLE + mpTableLogger->startElement("tablemanager.closeCell"); + mpTableLogger->chars(toString(rHandle)); + mpTableLogger->endElement("tablemanager.closeCell"); +#endif + + if (mTableDataStack.size() > 0) + { + typename TableData::Pointer_t + pTableData = mTableDataStack.top(); + + pTableData->endCell(rHandle); + } +} + +template +void TableManager::ensureOpenCell(PropertiesPointer pProps) +{ +#ifdef DEBUG_TABLE + mpTableLogger->startElement("tablemanager.ensureOpenCell"); +#endif + + if (mTableDataStack.size() > 0) + { + typename TableData::Pointer_t + pTableData = mTableDataStack.top(); + + if (pTableData.get() != NULL) + { + if (!pTableData->isCellOpen()) + openCell(getHandle(), pProps); + else + pTableData->insertCellProperties(pProps); + } + } +#ifdef DEBUG_TABLE + mpTableLogger->endElement("tablemanager.ensureOpenCell"); +#endif +} + } #endif // INCLUDED_TABLE_MANAGER_HXX diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index c846779df456..cf58dc3be8c3 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -74,6 +74,8 @@ namespace writerfilter XMLTag(string sTag, eMode mode = COMPLETE) : mTag(sTag), mMode(mode) {} void addAttr(string name, string value); + void addAttr(string name, const ::rtl::OUString & value); + void addAttr(string name, sal_uInt32 nValue); void addTag(Pointer_t pTag); void chars(const string & rChars); const string & getTag() const; @@ -90,6 +92,7 @@ namespace writerfilter private: stack mTags; XMLTag::Pointer_t currentTag() const; + XMLTag::Pointer_t mpRoot; TagLogger(); @@ -103,6 +106,7 @@ namespace writerfilter void startElement(const string & name); void attribute(const string & name, const string & value); void attribute(const string & name, const ::rtl::OUString & value); + void attribute(const string & name, sal_uInt32 value); void addTag(XMLTag::Pointer_t pTag); void chars(const string & chars); void chars(const ::rtl::OUString & chars); diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx index 387527f09e06..4dabea550a9d 100644 --- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx +++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx @@ -150,6 +150,7 @@ public: class WRITERFILTER_DLLPUBLIC Table { public: + typedef boost::shared_ptr
Pointer_t; /** Receives an entry of the table. diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx index 4b57a77326b8..360dfc3d4113 100644 --- a/writerfilter/inc/resourcemodel/util.hxx +++ b/writerfilter/inc/resourcemodel/util.hxx @@ -28,6 +28,7 @@ #ifndef INCLUDED_RESOURCEMODEL_UTIL_HXX #define INCLUDED_RESOURCEMODEL_UTIL_HXX #include +#include #include #include @@ -41,5 +42,7 @@ namespace writerfilter string WRITERFILTER_DLLPUBLIC propertysetToString (uno::Reference const & rProps); + string toString(uno::Reference< text::XTextRange > textRange); + string toString(const string & rString); } #endif // INCLUDED_RESOURCEMODEL_UTIL_HXX diff --git a/writerfilter/prj/build.lst b/writerfilter/prj/build.lst index 2ba4dc7301a4..e70b99a052c5 100644 --- a/writerfilter/prj/build.lst +++ b/writerfilter/prj/build.lst @@ -4,7 +4,7 @@ wf writerfilter\source\resourcemodel nmake - all wf_resourcemodel NULL wf writerfilter\source\doctok nmake - all wf_doctok wf_resourcemodel NULL wf writerfilter\source\ooxml nmake - all wf_ooxml wf_resourcemodel NULL wf writerfilter\source\filter nmake - all wf_filter NULL -wf writerfilter\source\dmapper nmake - all wf_dmapper wf_resourcemodel wf_ooxml NULL +wf writerfilter\source\dmapper nmake - all wf_dmapper wf_doctok wf_ooxml wf_resourcemodel NULL wf writerfilter\unocomponent\debugservices\doctok nmake - all wf_debugservicesdoctok NULL wf writerfilter\unocomponent\debugservices\ooxml nmake - all wf_debugservicesooxml NULL wf writerfilter\unocomponent nmake - all wf_unocomponent wf_doctok wf_ooxml wf_resourcemodel wf_debugservicesdoctok wf_debugservicesooxml NULL diff --git a/writerfilter/qa/cppunittests/doctok/export.map b/writerfilter/qa/cppunittests/doctok/export.map index 4ca70fa85463..879fa8953788 100644 --- a/writerfilter/qa/cppunittests/doctok/export.map +++ b/writerfilter/qa/cppunittests/doctok/export.map @@ -1,4 +1,4 @@ -UDK_3.0 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/writerfilter/qa/cppunittests/doctok/makefile.mk b/writerfilter/qa/cppunittests/doctok/makefile.mk index 6ee065ee6161..298bb4da906b 100644 --- a/writerfilter/qa/cppunittests/doctok/makefile.mk +++ b/writerfilter/qa/cppunittests/doctok/makefile.mk @@ -37,6 +37,7 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) # BEGIN ---------------------------------------------------------------- # auto generated Target:doctok by codegen.pl diff --git a/writerfilter/qa/cppunittests/odiapi/export.map b/writerfilter/qa/cppunittests/odiapi/export.map index 0e4fe0c88ff2..7321bbca16ad 100644 --- a/writerfilter/qa/cppunittests/odiapi/export.map +++ b/writerfilter/qa/cppunittests/odiapi/export.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.0 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/writerfilter/qa/cppunittests/odiapi/makefile.mk b/writerfilter/qa/cppunittests/odiapi/makefile.mk index 2843771e166f..6fc9adcd2f51 100644 --- a/writerfilter/qa/cppunittests/odiapi/makefile.mk +++ b/writerfilter/qa/cppunittests/odiapi/makefile.mk @@ -34,6 +34,8 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + # BEGIN ---------------------------------------------------------------- # auto generated Target:testjob by codegen.pl diff --git a/writerfilter/qa/cppunittests/qname/export.map b/writerfilter/qa/cppunittests/qname/export.map index 0e4fe0c88ff2..7321bbca16ad 100644 --- a/writerfilter/qa/cppunittests/qname/export.map +++ b/writerfilter/qa/cppunittests/qname/export.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.0 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/writerfilter/qa/cppunittests/qname/makefile.mk b/writerfilter/qa/cppunittests/qname/makefile.mk index 0eb0e16053db..c2e989d91beb 100644 --- a/writerfilter/qa/cppunittests/qname/makefile.mk +++ b/writerfilter/qa/cppunittests/qname/makefile.mk @@ -37,6 +37,8 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + # BEGIN ---------------------------------------------------------------- # auto generated Target:testjob by codegen.pl diff --git a/writerfilter/qa/cppunittests/sl/export.map b/writerfilter/qa/cppunittests/sl/export.map index 0e4fe0c88ff2..7321bbca16ad 100644 --- a/writerfilter/qa/cppunittests/sl/export.map +++ b/writerfilter/qa/cppunittests/sl/export.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.0 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/writerfilter/qa/cppunittests/sl/makefile.mk b/writerfilter/qa/cppunittests/sl/makefile.mk index 2bea9e16b792..b7a943e376e9 100644 --- a/writerfilter/qa/cppunittests/sl/makefile.mk +++ b/writerfilter/qa/cppunittests/sl/makefile.mk @@ -37,6 +37,8 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + # BEGIN ---------------------------------------------------------------- # auto generated Target:testjob by codegen.pl diff --git a/writerfilter/qa/cppunittests/xxml/export.map b/writerfilter/qa/cppunittests/xxml/export.map index 0e4fe0c88ff2..7321bbca16ad 100644 --- a/writerfilter/qa/cppunittests/xxml/export.map +++ b/writerfilter/qa/cppunittests/xxml/export.map @@ -25,7 +25,7 @@ # #************************************************************************* -UDK_3.0 { +UDK_3_0_0 { global: registerAllTestFunction; diff --git a/writerfilter/qa/cppunittests/xxml/makefile.mk b/writerfilter/qa/cppunittests/xxml/makefile.mk index 78022b6e59ba..32d0febc1c85 100644 --- a/writerfilter/qa/cppunittests/xxml/makefile.mk +++ b/writerfilter/qa/cppunittests/xxml/makefile.mk @@ -37,6 +37,8 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +CFLAGSCXX += $(CPPUNIT_CFLAGS) + # BEGIN ---------------------------------------------------------------- # auto generated Target:testjob by codegen.pl diff --git a/writerfilter/qa/documents/HeaderFooter.doc b/writerfilter/qa/documents/HeaderFooter.doc new file mode 100644 index 000000000000..9b023b485761 Binary files /dev/null and b/writerfilter/qa/documents/HeaderFooter.doc differ diff --git a/writerfilter/qa/documents/HeaderFooter.docx b/writerfilter/qa/documents/HeaderFooter.docx new file mode 100644 index 000000000000..1c550b4d547b Binary files /dev/null and b/writerfilter/qa/documents/HeaderFooter.docx differ diff --git a/writerfilter/qa/documents/Paragraph with footnote.doc b/writerfilter/qa/documents/Paragraph with footnote.doc new file mode 100644 index 000000000000..eaf22b5ef699 Binary files /dev/null and b/writerfilter/qa/documents/Paragraph with footnote.doc differ diff --git a/writerfilter/qa/documents/Paragraph with footnote.docx b/writerfilter/qa/documents/Paragraph with footnote.docx new file mode 100644 index 000000000000..fbaac59dc283 Binary files /dev/null and b/writerfilter/qa/documents/Paragraph with footnote.docx differ diff --git a/writerfilter/qa/documents/docx/tables/Table in B2.docx b/writerfilter/qa/documents/docx/tables/Table in B2.docx new file mode 100644 index 000000000000..4295cec35ff4 Binary files /dev/null and b/writerfilter/qa/documents/docx/tables/Table in B2.docx differ diff --git a/writerfilter/qa/documents/docx/tables/table in A1.docx b/writerfilter/qa/documents/docx/tables/table in A1.docx new file mode 100644 index 000000000000..d4161eaaa1ff Binary files /dev/null and b/writerfilter/qa/documents/docx/tables/table in A1.docx differ diff --git a/writerfilter/qa/documents/docx/tables/~$sted-tables3.docx b/writerfilter/qa/documents/docx/tables/~$sted-tables3.docx new file mode 100644 index 000000000000..bfea337b7db7 Binary files /dev/null and b/writerfilter/qa/documents/docx/tables/~$sted-tables3.docx differ diff --git a/writerfilter/source/dmapper/BorderHandler.cxx b/writerfilter/source/dmapper/BorderHandler.cxx index 66ca373b6465..df2503793884 100644 --- a/writerfilter/source/dmapper/BorderHandler.cxx +++ b/writerfilter/source/dmapper/BorderHandler.cxx @@ -26,12 +26,15 @@ ************************************************************************/ #include #include +#include #include #include #include #include +#include namespace writerfilter { + namespace dmapper { using namespace ::com::sun::star; @@ -60,6 +63,12 @@ BorderHandler::~BorderHandler() -----------------------------------------------------------------------*/ void BorderHandler::attribute(Id rName, Value & rVal) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("BorderHandler.attribute"); + dmapper_logger->attribute("id", (*QNameToString::Instance())(rName)); + dmapper_logger->endElement("BorderHandler.attribute"); +#endif + sal_Int32 nIntValue = rVal.getInt(); /* WRITERFILTERSTATUS: table: BorderHandler_attributedata */ switch( rName ) @@ -113,6 +122,11 @@ void BorderHandler::attribute(Id rName, Value & rVal) -----------------------------------------------------------------------*/ void BorderHandler::sprm(Sprm & rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("BorderHandler.sprm"); + dmapper_logger->attribute("sprm", rSprm.toString()); +#endif + /* WRITERFILTERSTATUS: table: BorderHandler_sprm */ switch( rSprm.getId()) { @@ -140,6 +154,11 @@ void BorderHandler::sprm(Sprm & rSprm) break; default:; } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("BorderHandler.sprm"); +#endif + } /*-- 24.04.2007 09:09:01--------------------------------------------------- diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx index 8220a55a60fd..2de4554e06dc 100644 --- a/writerfilter/source/dmapper/CellColorHandler.cxx +++ b/writerfilter/source/dmapper/CellColorHandler.cxx @@ -66,32 +66,32 @@ void CellColorHandler::attribute(Id rName, Value & rVal) /* WRITERFILTERSTATUS: table: CellColor_attributedata */ switch( rName ) { - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_cellTopColor: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_cellLeftColor: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_cellBottomColor: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_cellRightColor: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ // nIntValue contains the color, directly break; - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Shd_val: + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ { //might be clear, pct5...90, some hatch types //TODO: The values need symbolic names! m_nShadowType = nIntValue; //clear == 0, solid: 1, pct5: 2, pct50:8, pct95: x3c, horzStripe:0x0e, thinVertStripe: 0x15 } break; - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Shd_fill: + /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ if( nIntValue == OOXML_COLOR_AUTO ) nIntValue = 0xffffff; //fill color auto means white m_nFillColor = nIntValue; break; - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Shd_color: + /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ if( nIntValue == OOXML_COLOR_AUTO ) nIntValue = 0; //shading color auto means black //color of the shading diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx old mode 100644 new mode 100755 index 8e5fb325d2e9..81a02461971a --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -154,10 +154,6 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon { (void)rEx; } - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("domainmapper"); -#endif } /*-- 09.06.2006 09:52:12--------------------------------------------------- @@ -186,10 +182,6 @@ DomainMapper::~DomainMapper() } delete m_pImpl; - -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("domainmapper"); -#endif } /*-- 09.06.2006 09:52:12--------------------------------------------------- @@ -200,6 +192,7 @@ void DomainMapper::attribute(Id nName, Value & val) dmapper_logger->startElement("attribute"); dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); dmapper_logger->attribute("value", val.toString()); + dmapper_logger->endElement("attribute"); #endif static ::rtl::OUString sLocalBookmarkName; sal_Int32 nIntValue = val.getInt(); @@ -215,12 +208,6 @@ void DomainMapper::attribute(Id nName, Value & val) switch( nName ) { /* attributes to be ignored */ - case NS_rtf::LN_UNUSED4: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - - case NS_rtf::LN_UNUSED8: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_UNUSED1_3: /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ @@ -582,16 +569,13 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_rtf::LN_FNORESTART: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - case NS_rtf::LN_FPREV: + case NS_rtf::LN_FIDENTSAV: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - case NS_rtf::LN_FPREVSPACE: + case NS_rtf::LN_FCONVERTED: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - case NS_rtf::LN_FWORD6: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ - break; - case NS_rtf::LN_UNUSED5_7: + case NS_rtf::LN_FTENTATIVE: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; case NS_rtf::LN_RGBXCHNUMS: @@ -624,10 +608,10 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_rtf::LN_FSIMPLELIST: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - case NS_rtf::LN_FRESTARTHDN: + case NS_rtf::LN_fAutoNum: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - case NS_rtf::LN_UNSIGNED26_2: + case NS_rtf::LN_fHybrid: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; case NS_rtf::LN_ILVL: @@ -642,7 +626,7 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_rtf::LN_UNSIGNED4_6: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - case NS_rtf::LN_CLFOLVL: + case NS_rtf::LN_clfolvl: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; case NS_rtf::LN_CBFFNM1: @@ -1447,7 +1431,7 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_rtf::LN_LISTLEVEL: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - case NS_rtf::LN_LFO: + case NS_rtf::LN_LFOData: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; case NS_rtf::LN_F: @@ -1944,6 +1928,7 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_sprm::LN_PWHeightAbs: case NS_sprm::LN_PDxaFromText: case NS_sprm::LN_PDyaFromText: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { ParagraphProperties* pParaProperties = dynamic_cast< ParagraphProperties*>(m_pImpl->GetTopContext().get()); if( pParaProperties ) @@ -2036,8 +2021,8 @@ void DomainMapper::attribute(Id nName, Value & val) pParaProperties->SethRule( nIntValue ); break; case NS_sprm::LN_PWr: - { /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + { //should be either LN_Value_wordprocessingml_ST_Wrap_notBeside or LN_Value_wordprocessingml_ST_Wrap_around OSL_ENSURE( sal::static_int_cast(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_around || sal::static_int_cast(nIntValue) == NS_ooxml::LN_Value_wordprocessingml_ST_Wrap_notBeside, @@ -2055,11 +2040,11 @@ void DomainMapper::attribute(Id nName, Value & val) pParaProperties->Seth(ConversionHelper::convertTwipToMM100(nIntValue)); break; case NS_sprm::LN_PDxaFromText: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ pParaProperties->SethSpace( ConversionHelper::convertTwipToMM100(nIntValue )); break; case NS_sprm::LN_PDyaFromText: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ pParaProperties->SetvSpace( ConversionHelper::convertTwipToMM100(nIntValue )); break; default:; @@ -2103,15 +2088,19 @@ void DomainMapper::attribute(Id nName, Value & val) switch( nName ) { case NS_ooxml::LN_CT_LineNumber_countBy: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ aSettings.nInterval = nIntValue; break; case NS_ooxml::LN_CT_LineNumber_start: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ aSettings.nStartValue = nIntValue; // todo: has to be set at (each) first paragraph break; case NS_ooxml::LN_CT_LineNumber_distance: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ aSettings.nDistance = ConversionHelper::convertTwipToMM100( nIntValue ); break; case NS_ooxml::LN_CT_LineNumber_restart: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //page:empty, probably 0,section:1,continuous:2; aSettings.bRestartAtEachPage = nIntValue < 1; break; @@ -2124,12 +2113,15 @@ void DomainMapper::attribute(Id nName, Value & val) /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->SetCustomFtnMark( true ); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_FtnEdnRef_id: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ // footnote or endnote reference id - not needed case NS_ooxml::LN_CT_Color_themeColor: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Color_themeTint: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Color_themeShade: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //unsupported break; case NS_ooxml::LN_endtrackchange: @@ -2154,9 +2146,6 @@ void DomainMapper::attribute(Id nName, Value & val) } } } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("attribute"); -#endif } /*-- 09.06.2006 09:52:12--------------------------------------------------- @@ -2217,6 +2206,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_sprm::LN_PJcExtra: // sprmPJc Asian (undocumented) /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_sprm::LN_PJc: // sprmPJc + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ handleParaJustification(nIntValue, rContext, bExchangeLeftRight); break; case NS_sprm::LN_PFSideBySide: @@ -2322,9 +2312,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_sprm::LN_PNest: // sprmPNest //not handled in the old WW8 filter break; - case 0x8460: //first line indent Asian - undocumented + case NS_sprm::LN_PDxaLeft1: // sprmPDxaLeft1 case 19: - case NS_sprm::LN_PDxaLeft1: // sprmPDxaLeft1 + case NS_sprm::LN_PDxaLeft180: // sprmPDxaLeft180 /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */ rContext->Insert( eSprmType == SPRM_DEFAULT ? PROP_PARA_FIRST_LINE_INDENT : PROP_FIRST_LINE_OFFSET, @@ -2426,8 +2416,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmPWr - /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_PrBase_pBdr: //paragraph border + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ resolveSprmProps(rSprm); break; /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ @@ -2460,22 +2450,27 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp switch( nSprmId ) { case NS_sprm::LN_PBrcTop: + /* WRITERFILTERSTATUS: */ eBorderId = PROP_TOP_BORDER; eBorderDistId = PROP_TOP_BORDER_DISTANCE; break; case NS_sprm::LN_PBrcLeft: + /* WRITERFILTERSTATUS: */ eBorderId = PROP_LEFT_BORDER; eBorderDistId = PROP_LEFT_BORDER_DISTANCE; break; case NS_sprm::LN_PBrcBottom: + /* WRITERFILTERSTATUS: */ eBorderId = PROP_BOTTOM_BORDER ; eBorderDistId = PROP_BOTTOM_BORDER_DISTANCE; break; case NS_sprm::LN_PBrcRight: + /* WRITERFILTERSTATUS: */ eBorderId = PROP_RIGHT_BORDER; eBorderDistId = PROP_RIGHT_BORDER_DISTANCE ; break; case NS_sprm::LN_PBrcBetween: + /* WRITERFILTERSTATUS: */ //not supported break; default:; @@ -2495,21 +2490,26 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp switch( nSprmId ) { case NS_sprm::LN_PBrcBetween: // sprmPBrcBetween + /* WRITERFILTERSTATUS: */ OSL_ENSURE( false, "TODO: inner border is not handled"); break; case NS_sprm::LN_PBrcLeft: // sprmPBrcLeft + /* WRITERFILTERSTATUS: */ eBorderId = PROP_LEFT_BORDER; eBorderDistId = PROP_LEFT_BORDER_DISTANCE ; break; case NS_sprm::LN_PBrcRight: // sprmPBrcRight + /* WRITERFILTERSTATUS: */ eBorderId = PROP_RIGHT_BORDER ; eBorderDistId = PROP_RIGHT_BORDER_DISTANCE ; break; case NS_sprm::LN_PBrcTop: // sprmPBrcTop + /* WRITERFILTERSTATUS: */ eBorderId = PROP_TOP_BORDER ; eBorderDistId = PROP_TOP_BORDER_DISTANCE; break; case NS_sprm::LN_PBrcBottom: // sprmPBrcBottom + /* WRITERFILTERSTATUS: */ default: eBorderId = PROP_BOTTOM_BORDER ; eBorderDistId = PROP_BOTTOM_BORDER_DISTANCE; @@ -2537,6 +2537,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmPBrcBar case NS_sprm::LN_PFNoAutoHyph: // sprmPFNoAutoHyph + /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 0 */ rContext->Insert(PROP_PARA_IS_HYPHENATION, true, uno::makeAny( nIntValue ? false : true )); break; case NS_sprm::LN_PWHeightAbs: @@ -2547,8 +2548,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmPDcs case NS_sprm::LN_PShd: // sprmPShd - { /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 2 */ + { //contains fore color, back color and shadow percentage, results in a brush writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -2571,8 +2572,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmPFLocked case NS_sprm::LN_PFWidowControl: case NS_ooxml::LN_CT_PPrBase_widowControl: - { /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + { uno::Any aVal( uno::makeAny( sal_Int8(nIntValue ? 2 : 0 ))); rContext->Insert( PROP_PARA_WIDOWS, true, aVal ); rContext->Insert( PROP_PARA_ORPHANS, true, aVal ); @@ -2588,6 +2589,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmPFWordWrap case NS_sprm::LN_PFOverflowPunct: ; // sprmPFOverflowPunct - hanging punctuation + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ rContext->Insert(PROP_PARA_IS_HANGING_PUNCTUATION, true, uno::makeAny( nIntValue ? false : true )); break; case NS_sprm::LN_PFTopLinePunct: @@ -2726,6 +2728,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_sprm::LN_CFItalicBi:// sprmCFItalicBi (offset 0x27 to normal italic) /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */ case NS_sprm::LN_CFBold: //sprmCFBold + /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */ case 61: /*sprmCFItalic*/ /* WRITERFILTERSTATUS: done: 100, planned: , spent: 0.5 */ case NS_sprm::LN_CFItalic: //sprmCFItalic @@ -2751,31 +2754,39 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case 60:// sprmCFBold case NS_sprm::LN_CFBoldBi: // sprmCFBoldBi case NS_sprm::LN_CFBold: /*sprmCFBold*/ + /* WRITERFILTERSTATUS: */ ePropertyId = nSprmId != NS_sprm::LN_CFBoldBi ? PROP_CHAR_WEIGHT : PROP_CHAR_WEIGHT_COMPLEX; break; case 61: /*sprmCFItalic*/ case NS_sprm::LN_CFItalicBi: // sprmCFItalicBi case NS_sprm::LN_CFItalic: /*sprmCFItalic*/ + /* WRITERFILTERSTATUS: */ ePropertyId = nSprmId == 0x836 ? PROP_CHAR_POSTURE : PROP_CHAR_POSTURE_COMPLEX; break; case NS_sprm::LN_CFStrike: /*sprmCFStrike*/ case NS_sprm::LN_CFDStrike : /*sprmCFDStrike double strike through*/ + /* WRITERFILTERSTATUS: */ ePropertyId = PROP_CHAR_STRIKEOUT; break; case NS_sprm::LN_CFOutline: /*sprmCFOutline*/ + /* WRITERFILTERSTATUS: */ ePropertyId = PROP_CHAR_CONTOURED; break; case NS_sprm::LN_CFShadow: /*sprmCFShadow*/ + /* WRITERFILTERSTATUS: */ ePropertyId = PROP_CHAR_SHADOWED; break; case NS_sprm::LN_CFSmallCaps: /*sprmCFSmallCaps*/ case NS_sprm::LN_CFCaps: /*sprmCFCaps*/ + /* WRITERFILTERSTATUS: */ ePropertyId = PROP_CHAR_CASE_MAP; break; case NS_sprm::LN_CFVanish: /*sprmCFVanish*/ + /* WRITERFILTERSTATUS: */ ePropertyId = PROP_CHAR_HIDDEN; break; case NS_sprm::LN_CFEmboss: /*sprmCFEmboss*/ + /* WRITERFILTERSTATUS: */ ePropertyId = PROP_CHAR_RELIEF; break; } @@ -2817,6 +2828,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case 60:/*sprmCFBold*/ case NS_sprm::LN_CFBold: /*sprmCFBold*/ case NS_sprm::LN_CFBoldBi: // sprmCFBoldBi + /* WRITERFILTERSTATUS: */ { uno::Any aBold( uno::makeAny( nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) ); rContext->Insert(ePropertyId, true, aBold ); @@ -2827,6 +2839,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case 61: /*sprmCFItalic*/ case NS_sprm::LN_CFItalic: /*sprmCFItalic*/ case NS_sprm::LN_CFItalicBi: // sprmCFItalicBi + /* WRITERFILTERSTATUS: */ { uno::Any aPosture( uno::makeAny( nIntValue ? awt::FontSlant_ITALIC : awt::FontSlant_NONE ) ); rContext->Insert( ePropertyId, true, aPosture ); @@ -2835,27 +2848,33 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; case NS_sprm::LN_CFStrike: /*sprmCFStrike*/ + /* WRITERFILTERSTATUS: */ rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue ? awt::FontStrikeout::SINGLE : awt::FontStrikeout::NONE ) ); break; case NS_sprm::LN_CFDStrike : /*sprmCFDStrike double strike through*/ + /* WRITERFILTERSTATUS: */ rContext->Insert(ePropertyId, true, uno::makeAny( awt::FontStrikeout::DOUBLE ) ); break; case NS_sprm::LN_CFOutline: /*sprmCFOutline*/ case NS_sprm::LN_CFShadow: /*sprmCFShadow*/ case NS_sprm::LN_CFVanish: /*sprmCFVanish*/ + /* WRITERFILTERSTATUS: */ rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue ? true : false )); break; case NS_sprm::LN_CFSmallCaps: /*sprmCFSmallCaps*/ + /* WRITERFILTERSTATUS: */ rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue ? style::CaseMap::SMALLCAPS : style::CaseMap::NONE)); break; case NS_sprm::LN_CFCaps: /*sprmCFCaps*/ + /* WRITERFILTERSTATUS: */ rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue ? style::CaseMap::UPPERCASE : style::CaseMap::NONE)); break; case NS_sprm::LN_CFEmboss: /*sprmCFEmboss*/ + /* WRITERFILTERSTATUS: */ rContext->Insert(ePropertyId, true, uno::makeAny( nIntValue ? awt::FontRelief::EMBOSSED : awt::FontRelief::NONE )); break; @@ -3021,7 +3040,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp eFontPitch = PROP_CHAR_FONT_PITCH_COMPLEX; break; } - const FontEntry* pFontEntry = pFontTable->getFontEntry(sal_uInt32(nIntValue)); + const FontEntry::Pointer_t pFontEntry(pFontTable->getFontEntry(sal_uInt32(nIntValue))); rContext->Insert(eFontName, true, uno::makeAny( pFontEntry->sFontName )); // rContext->Insert(eFontStyle, uno::makeAny( pFontEntry-> )); // rContext->Insert(eFontFamily, uno::makeAny( pFontEntry-> )); @@ -3048,13 +3067,13 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCPropRMark case NS_sprm::LN_CSfxText: + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ // The file-format has many character animations. We have only // one, so we use it always. Suboptimal solution though. if (nIntValue) rContext->Insert(PROP_CHAR_FLASH, true, uno::makeAny( true )); else rContext->Insert(PROP_CHAR_FLASH, true, uno::makeAny( false )); - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCSfxText case NS_sprm::LN_CFBiDi: /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ @@ -3091,7 +3110,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmCCpg case NS_sprm::LN_CLidBi: // sprmCLidBi language complex /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ - case 0x4873: //sprmCRgLid + case NS_sprm::LN_CRgLid0_80: //sprmCRgLid0_80 /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 1 */ //undocumented but interpreted as western language case NS_sprm::LN_CRgLid0: // sprmCRgLid0 language Western @@ -3197,8 +3216,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case 143: case NS_sprm::LN_SFTitlePage: // sprmSFTitlePage case NS_ooxml::LN_EG_SectPrContents_titlePg: - { /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + { OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) pSectionContext->SetTitlePage( nIntValue > 0 ? true : false );//section has title page @@ -3689,14 +3708,14 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ resolveSprmProps(rSprm); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Tabs_tab: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ resolveSprmProps(rSprm); m_pImpl->IncorporateTabStop(m_pImpl->m_aCurrentTabStop); m_pImpl->m_aCurrentTabStop = DeletableTabStop(); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrBase_tabs: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { // Initialize tab stop vector from style sheet if( !m_pImpl->IsStyleSheetImport() ) @@ -3749,10 +3768,10 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ resolveSprmProps(rSprm); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_SectPrContents_footnotePr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 1ß0, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_SectPrContents_endnotePr: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->SetInFootnoteProperties( NS_ooxml::LN_EG_SectPrContents_footnotePr == nSprmId ); resolveSprmProps(rSprm); break; @@ -3783,8 +3802,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; case NS_ooxml::LN_CT_PPrBase_framePr: - { /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + { PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH); if( pContext.get() ) { @@ -3893,8 +3912,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; case NS_ooxml::LN_CT_PPrBase_pStyle: - { /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + { m_pImpl->SetCurrentParaStyleId( sStringValue ); StyleSheetTablePtr pStyleTable = m_pImpl->GetStyleSheetTable(); const ::rtl::OUString sConvertedStyleName = pStyleTable->ConvertStyleName( sStringValue, true ); @@ -3932,14 +3951,14 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp resolveSprmProps(rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right } break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblCellMar_top: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblCellMar_left: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblCellMar_bottom: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblCellMar_right: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -3951,14 +3970,18 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp switch(nSprmId) { case NS_ooxml::LN_CT_TblCellMar_top: + /* WRITERFILTERSTATUS: */ break; case NS_ooxml::LN_CT_TblCellMar_left: + /* WRITERFILTERSTATUS: */ eId = META_PROP_CELL_MAR_LEFT; break; case NS_ooxml::LN_CT_TblCellMar_bottom: + /* WRITERFILTERSTATUS: */ eId = META_PROP_CELL_MAR_BOTTOM; break; case NS_ooxml::LN_CT_TblCellMar_right: + /* WRITERFILTERSTATUS: */ eId = META_PROP_CELL_MAR_RIGHT; break; default:; @@ -4016,18 +4039,18 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp // case NS_ooxml::LN_CT_FtnEdn_id /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ // case NS_ooxml::LN_EG_FtnEdnNumProps_numRestart - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_FtnProps_pos: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //footnotes in word can be at page end or beneath text - writer supports only the first //endnotes in word can be at section end or document end - writer supports only the latter // -> so this property can be ignored break; - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_FtnEdnNumProps_numStart: - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_FtnProps_numFmt: - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_EdnProps_numFmt: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { try { @@ -4122,23 +4145,24 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ break; case NS_ooxml::LN_EG_RPrBase_snapToGrid: // "Use document grid settings for inter-paragraph spacing" + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; case NS_sprm::LN_PContextualSpacing: //TODO: determines whether top/bottom paragraph spacing is added if equal styles are following - unsupported break; case NS_ooxml::LN_EG_SectPrContents_formProt: //section protection, only form editing is enabled - unsupported + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; case NS_ooxml::LN_CT_Lvl_pStyle: + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ //TODO: numbering style should apply current numbering level - not yet supported break; default: { -#if OSL_DEBUG_LEVEL > 0 - ::rtl::OString sMessage( "DomainMapper::sprm() - Id: "); - sMessage += ::rtl::OString::valueOf( sal_Int32( nSprmId ), 10 ); - sMessage += ::rtl::OString(" / 0x"); - sMessage += ::rtl::OString::valueOf( sal_Int32( nSprmId ), 16 ); - OSL_ENSURE( false, sMessage.getStr()); // +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("unhandled"); + dmapper_logger->attribute("id", nSprmId); + dmapper_logger->endElement("unhandled"); #endif } } @@ -4153,7 +4177,15 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp void DomainMapper::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("entry"); +#endif + ref->resolve(*this); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("entry"); +#endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- @@ -4258,12 +4290,19 @@ void DomainMapper::endParagraphGroup() void DomainMapper::startShape( uno::Reference< drawing::XShape > xShape ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("shape"); +#endif m_pImpl->PushShapeContext( xShape ); } void DomainMapper::endShape( ) { m_pImpl->PopShapeContext( ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("shape"); +#endif } /*-- 13.06.2007 16:15:55--------------------------------------------------- @@ -4399,6 +4438,9 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len) //sal_uInt32 nSize = pContext->size(); //<-- + if (pContext == NULL) + pContext.reset(new PropertyMap()); + m_pImpl->appendTextPortion( sText, pContext ); #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("text"); @@ -4421,6 +4463,13 @@ void DomainMapper::utext(const sal_uInt8 * data_, size_t len) OUStringBuffer aBuffer = OUStringBuffer(len); aBuffer.append( (const sal_Unicode *) data_, len); sText = aBuffer.makeStringAndClear(); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("utext"); + dmapper_logger->chars(sText); + dmapper_logger->endElement("utext"); +#endif + try { m_pImpl->getTableManager().utext(data_, len); @@ -4449,7 +4498,7 @@ void DomainMapper::utext(const sal_uInt8 * data_, size_t len) //otherwise ignore sText } else */ - if( pContext->GetFootnote().is() ) + if( pContext && pContext->GetFootnote().is() ) { if( !pContext->GetFootnoteSymbol() ) pContext->GetFootnote()->setLabel( sText ); @@ -4462,13 +4511,13 @@ void DomainMapper::utext(const sal_uInt8 * data_, size_t len) set at the field or directly inserted into the text*/ m_pImpl->SetFieldResult( sText ); else - m_pImpl->appendTextPortion( sText, pContext ); + { + if (pContext == NULL) + pContext.reset(new PropertyMap()); + + m_pImpl->appendTextPortion( sText, pContext ); + } -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("utext"); - dmapper_logger->chars(sText); - dmapper_logger->endElement("utext"); -#endif } } catch( const uno::RuntimeException& ) @@ -4548,8 +4597,9 @@ void DomainMapper::table(Id name, writerfilter::Reference
::Pointer_t ref) case NS_ooxml::LN_THEMETABLE: ref->resolve ( *m_pImpl->GetThemeTable() ); break; - case NS_ooxml::LN_SETTINGS: - ref->resolve( *m_pImpl->GetSettingsTable( ) ); + case NS_ooxml::LN_settings_settings: + ref->resolve ( *m_pImpl->GetSettingsTable() ); + m_pImpl->ApplySettingsTable(); break; default: OSL_ENSURE( false, "which table is to be filled here?"); diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index e88d8d1d5a67..e070a42a3289 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -30,8 +30,10 @@ #include #include #include -#if OSL_DEBUG_LEVEL > 1 -#include +#include + +#ifdef DEBUG_DOMAINMAPPER +#include #endif namespace writerfilter { @@ -43,21 +45,13 @@ using namespace ::std; #define DEF_BORDER_DIST 190 //0,19cm #define DEFAULT_CELL_MARGIN 108 //default cell margin, not documented -#ifdef DEBUG -static void lcl_printHandle(const Handle_t rHandle) -{ - if (!rHandle.get()) - return; - rtl::OUString aOUStr = rHandle->getString(); - rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US ); - - clog << aOStr.getStr() << endl; -} +#ifdef DEBUG_DOMAINMAPPER static void lcl_printProperties( PropertyMapPtr pProps ) { if( pProps.get() ) { - clog << ""; + dmapper_logger->startElement("properties"); + PropertyMap::const_iterator aMapIter = pProps->begin(); PropertyMap::const_iterator aEndIter = pProps->end(); PropertyNameSupplier& rPropSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); @@ -71,18 +65,21 @@ static void lcl_printProperties( PropertyMapPtr pProps ) sal_Int32 nColor; if ( aMapIter->second >>= aLine ) { - clog << ": BorderLine ( Color: " << aLine.Color; - clog << ", Inner: " << aLine.InnerLineWidth; - clog << ", Outer: " << aLine.OuterLineWidth << ") "; + dmapper_logger->startElement("borderline"); + dmapper_logger->attribute("color", aLine.Color); + dmapper_logger->attribute("inner", aLine.InnerLineWidth); + dmapper_logger->attribute("outer", aLine.OuterLineWidth); + dmapper_logger->endElement("borderline"); } else if ( aMapIter->second >>= nColor ) { - clog << ": Color ( " << nColor << " ) "; + dmapper_logger->startElement("color"); + dmapper_logger->attribute("number", nColor); + dmapper_logger->endElement("color"); } - - clog << " - "; } - clog << endl; + + dmapper_logger->endElement("properties"); } } #endif @@ -107,11 +104,12 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, m_pTableSeq = TableSequencePointer_t(new TableSequence_t(nRows)); m_nRowIndex = 0; -#if OSL_DEBUG_LEVEL > 1 - char sBuffer[256]; - snprintf(sBuffer, sizeof(sBuffer), "%d", nRows); - clog << "
" << endl; - lcl_printProperties( pProps ); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("tablehandler.table"); + dmapper_logger->attribute("rows", nRows); + + if (pProps.get() != NULL) + dmapper_logger->addTag(pProps->toTag()); #endif } @@ -120,6 +118,11 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, -----------------------------------------------------------------------*/ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("lcl_SearchParentStyleSheetAndMergeProperties"); + dmapper_logger->addTag(pStyleSheet->toTag()); +#endif + PropertyMapPtr pRet; if( pStyleSheet->sBaseStyleIdentifier.getLength()) { @@ -132,6 +135,11 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr } pRet->insert( pStyleSheet->pProperties, true ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("lcl_SearchParentStyleSheetAndMergeProperties"); +#endif + return pRet; } @@ -233,46 +241,65 @@ void lcl_computeCellBorders( PropertyMapPtr pTableBorders, PropertyMapPtr pCellP } } -void DomainMapperTableHandler::endTable() -{ -#if OSL_DEBUG_LEVEL > 1 -{ - clog << "
" << endl; - sal_uInt32 nCells = 0; - sal_uInt32 nRows = m_aRowProperties.size(); - if( nRows == m_aCellProperties.size() ) - { - for( sal_uInt32 nRow = 0; nRow < nRows; ++nRow ) - nCells += m_aCellProperties[nRow].size(); - } - sal_uInt32 nTblPropSize = m_aTableProperties.get() ? m_aTableProperties->size() : 0; - (void)nTblPropSize; +#ifdef DEBUG_DOMAINMAPPER - ::rtl::OUString sNames; - if( nTblPropSize ) - { - const beans::PropertyValues aDebugTbl = m_aTableProperties->GetPropertyValues(); - for( sal_uInt32 nDebug = 0; nDebug < nTblPropSize; ++nDebug) - { - const ::rtl::OUString sName = aDebugTbl[nDebug].Name; - sNames += sName; - sNames += ::rtl::OUString('-'); - } - m_aTableProperties->Invalidate(); - sNames += ::rtl::OUString(' '); - clog << "Props: " << rtl::OUStringToOString( sNames, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl; - } +void lcl_debug_BorderLine(table::BorderLine & rLine) +{ + dmapper_logger->startElement("BorderLine"); + dmapper_logger->attribute("Color", rLine.Color); + dmapper_logger->attribute("InnerLineWidth", rLine.InnerLineWidth); + dmapper_logger->attribute("OuterLineWidth", rLine.OuterLineWidth); + dmapper_logger->attribute("LineDistance", rLine.LineDistance); + dmapper_logger->endElement("BorderLine"); +} + +void lcl_debug_TableBorder(table::TableBorder & rBorder) +{ + dmapper_logger->startElement("TableBorder"); + lcl_debug_BorderLine(rBorder.TopLine); + dmapper_logger->attribute("IsTopLineValid", rBorder.IsTopLineValid); + lcl_debug_BorderLine(rBorder.BottomLine); + dmapper_logger->attribute("IsBottomLineValid", rBorder.IsBottomLineValid); + lcl_debug_BorderLine(rBorder.LeftLine); + dmapper_logger->attribute("IsLeftLineValid", rBorder.IsLeftLineValid); + lcl_debug_BorderLine(rBorder.RightLine); + dmapper_logger->attribute("IsRightLineValid", rBorder.IsRightLineValid); + lcl_debug_BorderLine(rBorder.VerticalLine); + dmapper_logger->attribute("IsVerticalLineValid", rBorder.IsVerticalLineValid); + lcl_debug_BorderLine(rBorder.HorizontalLine); + dmapper_logger->attribute("IsHorizontalLineValid", rBorder.IsHorizontalLineValid); + dmapper_logger->attribute("Distance", rBorder.Distance); + dmapper_logger->attribute("IsDistanceValid", rBorder.IsDistanceValid); + dmapper_logger->endElement("TableBorder"); } #endif - TablePropertyValues_t aTableProperties; - sal_Int32 nLeftBorderDistance, nRightBorderDistance, nTopBorderDistance, nBottomBorderDistance; - nLeftBorderDistance = nRightBorderDistance = DEF_BORDER_DIST; - nTopBorderDistance = nBottomBorderDistance = 0; +struct TableInfo +{ + sal_Int32 nLeftBorderDistance; + sal_Int32 nRightBorderDistance; + sal_Int32 nTopBorderDistance; + sal_Int32 nBottomBorderDistance; + PropertyMapPtr pTableDefaults; + PropertyMapPtr pTableBorders; + TableStyleSheetEntry* pTableStyle; + TablePropertyValues_t aTableProperties; - PropertyMapPtr pTableDefaults( new PropertyMap ); - PropertyMapPtr pTableBorders( new PropertyMap ); + TableInfo() + : nLeftBorderDistance(DEF_BORDER_DIST) + , nRightBorderDistance(DEF_BORDER_DIST) + , nTopBorderDistance(0) + , nBottomBorderDistance(0) + , pTableDefaults(new PropertyMap) + , pTableBorders(new PropertyMap) + , pTableStyle(NULL) + { + } +}; + +TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo & rInfo) +{ // will receive the table style if any TableStyleSheetEntry* pTableStyle = NULL; @@ -286,7 +313,7 @@ void DomainMapperTableHandler::endTable() sal_Int32 nTableWidth = 0; PropertyMap::iterator aTableStyleIter = - m_aTableProperties->find( PropertyDefinition( META_PROP_TABLE_STYLE_NAME, false ) ); + m_aTableProperties->find( PropertyDefinition( META_PROP_TABLE_STYLE_NAME, false ) ); if(aTableStyleIter != m_aTableProperties->end()) { // Apply table style properties recursively @@ -294,7 +321,7 @@ void DomainMapperTableHandler::endTable() aTableStyleIter->second >>= sTableStyleName; StyleSheetTablePtr pStyleSheetTable = m_rDMapper_Impl.GetStyleSheetTable(); const StyleSheetEntryPtr pStyleSheet = pStyleSheetTable->FindStyleSheetByISTD( sTableStyleName ); - pTableStyle = static_cast( pStyleSheet.get( ) ); + pTableStyle = dynamic_cast( pStyleSheet.get( ) ); m_aTableProperties->erase( aTableStyleIter ); if( pStyleSheet ) @@ -307,31 +334,53 @@ void DomainMapperTableHandler::endTable() PropertyMapPtr pMergedProperties = lcl_SearchParentStyleSheetAndMergeProperties(pStyleSheet, pStyleSheetTable); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("mergedProps"); + dmapper_logger->addTag(pMergedProperties->toTag()); + dmapper_logger->endElement("mergedProps"); +#endif + m_aTableProperties->insert( pMergedProperties ); m_aTableProperties->insert( pTableProps ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("TableProperties"); + dmapper_logger->addTag(m_aTableProperties->toTag()); + dmapper_logger->endElement("TableProperties"); +#endif } } // Set the table default attributes for the cells - pTableDefaults->insert( m_aTableProperties ); + rInfo.pTableDefaults->insert( m_aTableProperties ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("TableDefaults"); + dmapper_logger->addTag(rInfo.pTableDefaults->toTag()); + dmapper_logger->endElement("TableDefaults"); +#endif m_aTableProperties->getValue( TablePropertyMap::GAP_HALF, nGapHalf ); m_aTableProperties->getValue( TablePropertyMap::LEFT_MARGIN, nLeftMargin ); - m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_LEFT, nLeftBorderDistance ); - m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_RIGHT, nRightBorderDistance ); - m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_TOP, nTopBorderDistance ); - m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_BOTTOM, nBottomBorderDistance ); + m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_LEFT, + rInfo.nLeftBorderDistance ); + m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_RIGHT, + rInfo.nRightBorderDistance ); + m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_TOP, + rInfo.nTopBorderDistance ); + m_aTableProperties->getValue( TablePropertyMap::CELL_MAR_BOTTOM, + rInfo.nBottomBorderDistance ); table::TableBorderDistances aDistances; aDistances.IsTopDistanceValid = - aDistances.IsBottomDistanceValid = - aDistances.IsLeftDistanceValid = - aDistances.IsRightDistanceValid = sal_True; - aDistances.TopDistance = static_cast( nTopBorderDistance ); - aDistances.BottomDistance = static_cast( nBottomBorderDistance ); - aDistances.LeftDistance = static_cast( nLeftBorderDistance ); - aDistances.RightDistance = static_cast( nRightBorderDistance ); + aDistances.IsBottomDistanceValid = + aDistances.IsLeftDistanceValid = + aDistances.IsRightDistanceValid = sal_True; + aDistances.TopDistance = static_cast( rInfo.nTopBorderDistance ); + aDistances.BottomDistance = static_cast( rInfo.nBottomBorderDistance ); + aDistances.LeftDistance = static_cast( rInfo.nLeftBorderDistance ); + aDistances.RightDistance = static_cast( rInfo.nRightBorderDistance ); m_aTableProperties->Insert( PROP_TABLE_BORDER_DISTANCES, false, uno::makeAny( aDistances ) ); @@ -345,10 +394,11 @@ void DomainMapperTableHandler::endTable() aTableBorder.IsTopLineValid = true; m_aTableProperties->erase( aTblBorderIter ); - pTableBorders->Insert( PROP_TOP_BORDER, false, uno::makeAny( aTableBorder.TopLine ) ); - PropertyMap::iterator pIt = pTableDefaults->find( PropertyDefinition( PROP_TOP_BORDER, false ) ); - if ( pIt != pTableDefaults->end( ) ) - pTableDefaults->erase( pIt ); + rInfo.pTableBorders->Insert( PROP_TOP_BORDER, false, + uno::makeAny( aTableBorder.TopLine ) ); + PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( PROP_TOP_BORDER, false ) ); + if ( pIt != rInfo.pTableDefaults->end( ) ) + rInfo.pTableDefaults->erase( pIt ); } aTblBorderIter = m_aTableProperties->find( PropertyDefinition(PROP_BOTTOM_BORDER, false) ); if( aTblBorderIter != m_aTableProperties->end() ) @@ -357,10 +407,11 @@ void DomainMapperTableHandler::endTable() aTableBorder.IsBottomLineValid = true; m_aTableProperties->erase( aTblBorderIter ); - pTableBorders->Insert( PROP_BOTTOM_BORDER, false, uno::makeAny( aTableBorder.BottomLine ) ); - PropertyMap::iterator pIt = pTableDefaults->find( PropertyDefinition( PROP_BOTTOM_BORDER, false ) ); - if ( pIt != pTableDefaults->end( ) ) - pTableDefaults->erase( pIt ); + rInfo.pTableBorders->Insert( PROP_BOTTOM_BORDER, false, + uno::makeAny( aTableBorder.BottomLine)); + PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( PROP_BOTTOM_BORDER, false ) ); + if ( pIt != rInfo.pTableDefaults->end( ) ) + rInfo.pTableDefaults->erase( pIt ); } aTblBorderIter = m_aTableProperties->find( PropertyDefinition(PROP_LEFT_BORDER, false) ); if( aTblBorderIter != m_aTableProperties->end() ) @@ -369,10 +420,11 @@ void DomainMapperTableHandler::endTable() aTableBorder.IsLeftLineValid = true; m_aTableProperties->erase( aTblBorderIter ); - pTableBorders->Insert( PROP_LEFT_BORDER, false, uno::makeAny( aTableBorder.LeftLine ) ); - PropertyMap::iterator pIt = pTableDefaults->find( PropertyDefinition( PROP_LEFT_BORDER, false ) ); - if ( pIt != pTableDefaults->end( ) ) - pTableDefaults->erase( pIt ); + rInfo.pTableBorders->Insert( PROP_LEFT_BORDER, false, + uno::makeAny( aTableBorder.LeftLine ) ); + PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( PROP_LEFT_BORDER, false ) ); + if ( pIt != rInfo.pTableDefaults->end( ) ) + rInfo.pTableDefaults->erase( pIt ); } aTblBorderIter = m_aTableProperties->find( PropertyDefinition(PROP_RIGHT_BORDER, false) ); if( aTblBorderIter != m_aTableProperties->end() ) @@ -381,10 +433,11 @@ void DomainMapperTableHandler::endTable() aTableBorder.IsRightLineValid = true; m_aTableProperties->erase( aTblBorderIter ); - pTableBorders->Insert( PROP_RIGHT_BORDER, false, uno::makeAny( aTableBorder.RightLine ) ); - PropertyMap::iterator pIt = pTableDefaults->find( PropertyDefinition( PROP_RIGHT_BORDER, false ) ); - if ( pIt != pTableDefaults->end( ) ) - pTableDefaults->erase( pIt ); + rInfo.pTableBorders->Insert( PROP_RIGHT_BORDER, false, + uno::makeAny( aTableBorder.RightLine ) ); + PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( PROP_RIGHT_BORDER, false ) ); + if ( pIt != rInfo.pTableDefaults->end( ) ) + rInfo.pTableDefaults->erase( pIt ); } aTblBorderIter = m_aTableProperties->find( PropertyDefinition(META_PROP_HORIZONTAL_BORDER, false) ); if( aTblBorderIter != m_aTableProperties->end() ) @@ -393,10 +446,12 @@ void DomainMapperTableHandler::endTable() aTableBorder.IsHorizontalLineValid = true; m_aTableProperties->erase( aTblBorderIter ); - pTableBorders->Insert( META_PROP_HORIZONTAL_BORDER, false, uno::makeAny( aTableBorder.HorizontalLine ) ); - PropertyMap::iterator pIt = pTableDefaults->find( PropertyDefinition( META_PROP_HORIZONTAL_BORDER, false ) ); - if ( pIt != pTableDefaults->end( ) ) - pTableDefaults->erase( pIt ); + rInfo.pTableBorders->Insert + (META_PROP_HORIZONTAL_BORDER, false, + uno::makeAny( aTableBorder.HorizontalLine ) ); + PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( META_PROP_HORIZONTAL_BORDER, false ) ); + if ( pIt != rInfo.pTableDefaults->end( ) ) + rInfo.pTableDefaults->erase( pIt ); } aTblBorderIter = m_aTableProperties->find( PropertyDefinition(META_PROP_VERTICAL_BORDER, false) ); if( aTblBorderIter != m_aTableProperties->end() ) @@ -405,17 +460,23 @@ void DomainMapperTableHandler::endTable() aTableBorder.IsVerticalLineValid = true; m_aTableProperties->erase( aTblBorderIter ); - pTableBorders->Insert( META_PROP_VERTICAL_BORDER, false, uno::makeAny( aTableBorder.VerticalLine ) ); - PropertyMap::iterator pIt = pTableDefaults->find( PropertyDefinition( META_PROP_VERTICAL_BORDER, false ) ); - if ( pIt != pTableDefaults->end( ) ) - pTableDefaults->erase( pIt ); + rInfo.pTableBorders->Insert + (META_PROP_VERTICAL_BORDER, false, + uno::makeAny( aTableBorder.VerticalLine ) ); + PropertyMap::iterator pIt = rInfo.pTableDefaults->find( PropertyDefinition( META_PROP_VERTICAL_BORDER, false ) ); + if ( pIt != rInfo.pTableDefaults->end( ) ) + rInfo.pTableDefaults->erase( pIt ); } aTableBorder.Distance = 0; aTableBorder.IsDistanceValid = false; m_aTableProperties->Insert( PROP_TABLE_BORDER, false, uno::makeAny( aTableBorder ) ); - m_aTableProperties->Insert( PROP_LEFT_MARGIN, false, uno::makeAny( nLeftMargin - nGapHalf - nLeftBorderDistance)); +#ifdef DEBUG_DOMAINMAPPER + lcl_debug_TableBorder(aTableBorder); +#endif + + m_aTableProperties->Insert( PROP_LEFT_MARGIN, false, uno::makeAny( nLeftMargin - nGapHalf - rInfo.nLeftBorderDistance)); m_aTableProperties->getValue( TablePropertyMap::TABLE_WIDTH, nTableWidth ); if( nTableWidth > 0 ) @@ -427,22 +488,37 @@ void DomainMapperTableHandler::endTable() //fill default value - if not available const PropertyMap::const_iterator aRepeatIter = - m_aTableProperties->find( PropertyDefinition( PROP_HEADER_ROW_COUNT, false ) ); + m_aTableProperties->find( PropertyDefinition( PROP_HEADER_ROW_COUNT, false ) ); if( aRepeatIter == m_aTableProperties->end() ) m_aTableProperties->Insert( PROP_HEADER_ROW_COUNT, false, uno::makeAny( (sal_Int32)0 )); // Remove the PROP_HEADER_ROW_COUNT from the table default to avoid // propagating it to the cells PropertyMap::iterator aDefaultRepeatIt = - pTableDefaults->find( PropertyDefinition( PROP_HEADER_ROW_COUNT, false ) ); - if ( aDefaultRepeatIt != pTableDefaults->end( ) ) - pTableDefaults->erase( aDefaultRepeatIt ); + rInfo.pTableDefaults->find( PropertyDefinition( PROP_HEADER_ROW_COUNT, false ) ); + if ( aDefaultRepeatIt != rInfo.pTableDefaults->end( ) ) + rInfo.pTableDefaults->erase( aDefaultRepeatIt ); + + rInfo.aTableProperties = m_aTableProperties->GetPropertyValues(); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("debug.tableprops"); + dmapper_logger->addTag(m_aTableProperties->toTag()); + dmapper_logger->endElement("debug.tableprops"); +#endif - aTableProperties = m_aTableProperties->GetPropertyValues(); } - // expands to uno::Sequence< Sequence< beans::PropertyValues > > - CellPropertyValuesSeq_t aCellProperties( m_aCellProperties.size() ); + return pTableStyle; +} + +CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(TableInfo & rInfo) +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("getCellProperties"); +#endif + + CellPropertyValuesSeq_t aCellProperties( m_aCellProperties.size() ); // std::vector< std::vector > m_aCellProperties PropertyMapVector2::const_iterator aRowOfCellsIterator = m_aCellProperties.begin(); @@ -467,7 +543,7 @@ void DomainMapperTableHandler::endTable() PropertyMap::iterator pTcCnfStyleIt = pRowProps->find( PropertyDefinition( PROP_CNF_STYLE, true ) ); if ( pTcCnfStyleIt != pRowProps->end( ) ) { - if ( pTableStyle ) + if ( rInfo.pTableStyle ) { rtl::OUString sMask; pTcCnfStyleIt->second >>= sMask; @@ -490,26 +566,26 @@ void DomainMapperTableHandler::endTable() //aCellIterator points to a PropertyMapPtr; if( aCellIterator->get() ) { - if ( pTableDefaults->size( ) ) - pAllCellProps->insert( pTableDefaults ); + if ( rInfo.pTableDefaults->size( ) ) + pAllCellProps->insert( rInfo.pTableDefaults ); - // Fill the cell properties with the ones of the style - sal_Int32 nCellStyleMask = 0; - const PropertyMap::iterator aCnfStyleIter = + // Fill the cell properties with the ones of the style + sal_Int32 nCellStyleMask = 0; + const PropertyMap::iterator aCnfStyleIter = aCellIterator->get()->find( PropertyDefinition( PROP_CNF_STYLE, false ) ); - if ( aCnfStyleIter != aCellIterator->get( )->end( ) ) - { - if ( pTableStyle ) { - rtl::OUString sMask; - aCnfStyleIter->second >>= sMask; - nCellStyleMask = sMask.toInt32( 2 ); + if ( aCnfStyleIter != aCellIterator->get( )->end( ) ) + { + if ( rInfo.pTableStyle ) { + rtl::OUString sMask; + aCnfStyleIter->second >>= sMask; + nCellStyleMask = sMask.toInt32( 2 ); + } + aCellIterator->get( )->erase( aCnfStyleIter ); } - aCellIterator->get( )->erase( aCnfStyleIter ); - } - if ( pTableStyle ) + if ( rInfo.pTableStyle ) { - PropertyMapPtr pStyleProps = pTableStyle->GetProperties( nCellStyleMask + nRowStyleMask ); + PropertyMapPtr pStyleProps = rInfo.pTableStyle->GetProperties( nCellStyleMask + nRowStyleMask ); pAllCellProps->insert( pStyleProps ); } @@ -517,43 +593,48 @@ void DomainMapperTableHandler::endTable() pAllCellProps->insert( *aCellIterator ); aCellIterator->get( )->swap( *pAllCellProps.get( ) ); -#if DEBUG - clog << "Cell #" << nCell << ", Row #" << nRow << endl; +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("cell"); + dmapper_logger->attribute("cell", nCell); + dmapper_logger->attribute("row", nRow); #endif - lcl_computeCellBorders( pTableBorders, *aCellIterator, nCell, nRow, bIsEndCol, bIsEndRow ); + lcl_computeCellBorders( rInfo.pTableBorders, *aCellIterator, nCell, nRow, bIsEndCol, bIsEndRow ); //now set the default left+right border distance TODO: there's an sprm containing the default distance! const PropertyMap::const_iterator aLeftDistanceIter = - aCellIterator->get()->find( PropertyDefinition(PROP_LEFT_BORDER_DISTANCE, false) ); + aCellIterator->get()->find( PropertyDefinition(PROP_LEFT_BORDER_DISTANCE, false) ); if( aLeftDistanceIter == aCellIterator->get()->end() ) aCellIterator->get()->Insert( PROP_LEFT_BORDER_DISTANCE, false, - uno::makeAny(nLeftBorderDistance ) ); + uno::makeAny(rInfo.nLeftBorderDistance ) ); const PropertyMap::const_iterator aRightDistanceIter = - aCellIterator->get()->find( PropertyDefinition(PROP_RIGHT_BORDER_DISTANCE, false) ); + aCellIterator->get()->find( PropertyDefinition(PROP_RIGHT_BORDER_DISTANCE, false) ); if( aRightDistanceIter == aCellIterator->get()->end() ) aCellIterator->get()->Insert( PROP_RIGHT_BORDER_DISTANCE, false, - uno::makeAny((sal_Int32) nRightBorderDistance ) ); + uno::makeAny((sal_Int32) rInfo.nRightBorderDistance ) ); const PropertyMap::const_iterator aTopDistanceIter = - aCellIterator->get()->find( PropertyDefinition(PROP_TOP_BORDER_DISTANCE, false) ); + aCellIterator->get()->find( PropertyDefinition(PROP_TOP_BORDER_DISTANCE, false) ); if( aTopDistanceIter == aCellIterator->get()->end() ) aCellIterator->get()->Insert( PROP_TOP_BORDER_DISTANCE, false, - uno::makeAny((sal_Int32) nTopBorderDistance ) ); + uno::makeAny((sal_Int32) rInfo.nTopBorderDistance ) ); const PropertyMap::const_iterator aBottomDistanceIter = - aCellIterator->get()->find( PropertyDefinition(PROP_BOTTOM_BORDER_DISTANCE, false) ); + aCellIterator->get()->find( PropertyDefinition(PROP_BOTTOM_BORDER_DISTANCE, false) ); if( aBottomDistanceIter == aCellIterator->get()->end() ) aCellIterator->get()->Insert( PROP_BOTTOM_BORDER_DISTANCE, false, - uno::makeAny((sal_Int32) nBottomBorderDistance ) ); + uno::makeAny((sal_Int32) rInfo.nBottomBorderDistance ) ); pSingleCellProperties[nCell] = aCellIterator->get()->GetPropertyValues(); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("cell"); +#endif } ++nCell; ++aCellIterator; } -#if OSL_DEBUG_LEVEL > 1 -//-->debug cell properties +#ifdef DEBUG_DOMAINMAPPER + //-->debug cell properties { ::rtl::OUString sNames; const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = aCellProperties[nRow]; @@ -573,91 +654,101 @@ void DomainMapperTableHandler::endTable() } (void)sNames; } -//--< + //--< #endif ++nRow; ++aRowOfCellsIterator; } -#if OSL_DEBUG_LEVEL > 1 -//-->debug cell properties of all rows - { - ::rtl::OUString sNames; - for( sal_Int32 nDebugRow = 0; nDebugRow < aCellProperties.getLength(); ++nDebugRow) - { - const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = aCellProperties[nDebugRow]; - sal_Int32 nDebugCells = aDebugCurrentRow.getLength(); - (void) nDebugCells; - for( sal_Int32 nDebugCell = 0; nDebugCell < nDebugCells; ++nDebugCell) - { - const uno::Sequence< beans::PropertyValue >& aDebugCellProperties = aDebugCurrentRow[nDebugCell]; - sal_Int32 nDebugCellProperties = aDebugCellProperties.getLength(); - for( sal_Int32 nDebugProperty = 0; nDebugProperty < nDebugCellProperties; ++nDebugProperty) - { - const ::rtl::OUString sName = aDebugCellProperties[nDebugProperty].Name; - sNames += sName; - sNames += ::rtl::OUString('-'); - } - sNames += ::rtl::OUString('+'); - } - sNames += ::rtl::OUString('|'); - } - (void)sNames; - } -//--< + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("getCellProperties"); #endif - RowPropertyValuesSeq_t aRowProperties( m_aRowProperties.size() ); + return aCellProperties; +} + +RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("getRowProperties"); +#endif + + RowPropertyValuesSeq_t aRowProperties( m_aRowProperties.size() ); PropertyMapVector1::const_iterator aRowIter = m_aRowProperties.begin(); PropertyMapVector1::const_iterator aRowIterEnd = m_aRowProperties.end(); - nRow = 0; + sal_Int32 nRow = 0; while( aRowIter != aRowIterEnd ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("rowProps.row"); +#endif if( aRowIter->get() ) { //set default to 'break across pages" if( aRowIter->get()->find( PropertyDefinition( PROP_IS_SPLIT_ALLOWED, false )) == aRowIter->get()->end()) aRowIter->get()->Insert( PROP_IS_SPLIT_ALLOWED, false, uno::makeAny(sal_True ) ); - aRowProperties[nRow] = aRowIter->get()->GetPropertyValues(); + aRowProperties[nRow] = (*aRowIter)->GetPropertyValues(); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->addTag((*aRowIter)->toTag()); + dmapper_logger->addTag(lcl_PropertyValuesToTag(aRowProperties[nRow])); +#endif } ++nRow; ++aRowIter; +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("rowProps.row"); +#endif } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("getRowProperties"); +#endif + + return aRowProperties; +} + +void DomainMapperTableHandler::endTable() +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("tablehandler.endTable"); +#endif + + TableInfo aTableInfo; + aTableInfo.pTableStyle = endTableGetTableStyle(aTableInfo); + // expands to uno::Sequence< Sequence< beans::PropertyValues > > + + CellPropertyValuesSeq_t aCellProperties = endTableGetCellProperties(aTableInfo); + + RowPropertyValuesSeq_t aRowProperties = endTableGetRowProperties(); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->addTag(lcl_PropertyValueSeqToTag(aRowProperties)); +#endif + if (m_pTableSeq->getLength() > 0) { try { -#if OSL_DEBUG_LEVEL > 1 - { - sal_Int32 nCellPropertiesRows = aCellProperties.getLength(); - sal_Int32 nCellPropertiesCells = aCellProperties[0].getLength(); - sal_Int32 nCellPropertiesProperties = aCellProperties[0][0].getLength(); - (void) nCellPropertiesRows; - (void) nCellPropertiesCells; - (void) nCellPropertiesProperties; - ++nCellPropertiesProperties; - } - clog << "Converting table" << endl; -#endif - uno::Reference xTable = m_xText->convertToTable(*m_pTableSeq, aCellProperties, aRowProperties, - aTableProperties); + aTableInfo.aTableProperties); m_xTableRange = xTable->getAnchor( ); } catch (lang::IllegalArgumentException e) { -#if OSL_DEBUG_LEVEL > 1 - clog << "failed to import table!" << endl; +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->chars("failed to import table!"); #endif } -#if OSL_DEBUG_LEVEL > 1 +#ifdef DEBUG_DOMAINMAPPER catch ( uno::Exception e ) { - clog << "Caught an other exception: " << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( ) << endl; + dmapper_logger->startElement("exception"); + dmapper_logger->chars(rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr( )); + dmapper_logger->endElement("exeception"); } #endif } @@ -665,6 +756,11 @@ void DomainMapperTableHandler::endTable() m_aTableProperties.reset(); m_aCellProperties.clear(); m_aRowProperties.clear(); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("tablehandler.endTable"); + dmapper_logger->endElement("tablehandler.table"); +#endif } void DomainMapperTableHandler::startRow(unsigned int nCells, @@ -673,12 +769,11 @@ void DomainMapperTableHandler::startRow(unsigned int nCells, m_aRowProperties.push_back( pProps ); m_aCellProperties.push_back( PropertyMapVector1() ); -#if OSL_DEBUG_LEVEL > 1 - char sBuffer[256]; - snprintf(sBuffer, sizeof(sBuffer), "%d", nCells); - - clog << "" << endl; - lcl_printProperties( pProps ); +#if DEBUG_DOMAINMAPPER + dmapper_logger->startElement("table.row"); + dmapper_logger->attribute("cells", nCells); + if (pProps != NULL) + dmapper_logger->addTag(pProps->toTag()); #endif m_pRowSeq = RowSequencePointer_t(new RowSequence_t(nCells)); @@ -690,8 +785,8 @@ void DomainMapperTableHandler::endRow() (*m_pTableSeq)[m_nRowIndex] = *m_pRowSeq; ++m_nRowIndex; m_nCellIndex = 0; -#if OSL_DEBUG_LEVEL > 1 - clog << "" << endl; +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("table.row"); #endif } @@ -709,11 +804,12 @@ void DomainMapperTableHandler::startCell(const Handle_t & start, m_aCellProperties[nRow - 1].push_back( pEmptyProps ); } -#if OSL_DEBUG_LEVEL > 1 - clog << ""; - lcl_printHandle(start); +#if DEBUG_DOMAINMAPPER + dmapper_logger->startElement("table.cell"); + dmapper_logger->startElement("table.cell.start"); + dmapper_logger->chars(toString(start)); + dmapper_logger->endElement("table.cell.start"); lcl_printProperties( pProps ); - clog << ","; #endif //add a new 'row' of properties @@ -728,8 +824,11 @@ void DomainMapperTableHandler::startCell(const Handle_t & start, void DomainMapperTableHandler::endCell(const Handle_t & end) { -#if OSL_DEBUG_LEVEL > 1 - lcl_printHandle(end); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("table.cell.end"); + dmapper_logger->chars(toString(end)); + dmapper_logger->endElement("table.cell.end"); + dmapper_logger->endElement("table.cell"); clog << "" << endl; #endif diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx index a71475f6eaa1..b5a1628a0725 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -54,6 +54,8 @@ typedef std::vector PropertyMapVector1; typedef std::vector PropertyMapVector2; class DomainMapper_Impl; +class TableStyleSheetEntry; +struct TableInfo; class DomainMapperTableHandler : public TableDataHandler { TextReference_t m_xText; @@ -72,6 +74,10 @@ class DomainMapperTableHandler : public TableDataHandler Pointer_t; diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index f49bf9ea93b1..452391fe6300 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -38,6 +38,7 @@ #include #include #include +#include namespace writerfilter { namespace dmapper { @@ -50,6 +51,7 @@ using namespace ::std; DomainMapperTableManager::DomainMapperTableManager(bool bOOXML) : m_nRow(0), m_nCell(0), + m_nGridSpan(1), m_nCellBorderIndex(0), m_nHeaderRepeat(0), m_nTableWidth(0), @@ -57,6 +59,12 @@ DomainMapperTableManager::DomainMapperTableManager(bool bOOXML) : m_pTablePropsHandler( new TablePropertiesHandler( bOOXML ) ) { m_pTablePropsHandler->SetTableManager( this ); + +#ifdef DEBUG_DOMAINMAPPER +#ifdef DEBUG_TABLE + setTagLogger(dmapper_logger); +#endif +#endif } /*-- 23.04.2007 14:57:49--------------------------------------------------- @@ -71,6 +79,12 @@ DomainMapperTableManager::~DomainMapperTableManager() -----------------------------------------------------------------------*/ bool DomainMapperTableManager::sprm(Sprm & rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("tablemanager.sprm"); + string sSprm = rSprm.toString(); + dmapper_logger->chars(sSprm); + dmapper_logger->endElement("tablemanager.sprm"); +#endif bool bRet = DomainMapperTableManager_Base_t::sprm(rSprm); if( !bRet ) { @@ -111,6 +125,9 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) if( m_nTableWidth ) pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, m_nTableWidth ); } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->addTag(pPropMap->toTag()); +#endif insertTableProps(pPropMap); } } @@ -239,18 +256,12 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TcPrBase_gridSpan: //number of grid positions spanned by this cell { -#if DEBUG - clog << "GridSpan: " << nIntValue << endl; +#if DEBUG_DOMAINMAPPER + dmapper_logger->startElement("tablemanager.GridSpan"); + dmapper_logger->attribute("gridSpan", nIntValue); + dmapper_logger->endElement("tablemanager.GridSpan"); #endif - //the cell width is determined by its position in the table grid - //it takes 'gridSpan' grid elements - IntVectorPtr pCurrentSpans = getCurrentSpans( ); - if( pCurrentSpans->size() < m_nCell) - { - //fill missing elements with '1' - pCurrentSpans->insert( pCurrentSpans->end(), m_nCell - pCurrentSpans->size(), 1 ); - } - pCurrentSpans->push_back( nIntValue ); + m_nGridSpan = nIntValue; } break; /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ @@ -276,13 +287,12 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) cellProps( pProps ); } break; - case NS_ooxml::LN_tblStart: - { - startLevel( ); - } - break; default: bRet = false; + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif } } return bRet; @@ -313,8 +323,17 @@ void DomainMapperTableManager::endLevel( ) { m_aTableGrid.pop_back( ); m_aGridSpans.pop_back( ); + m_nTableWidth = 0; DomainMapperTableManager_Base_t::endLevel( ); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("dmappertablemanager.endLevel"); + PropertyMapPtr pProps = getTableProps(); + if (pProps.get() != NULL) + dmapper_logger->addTag(getTableProps()->toTag()); + + dmapper_logger->endElement("dmappertablemanager.endLevel"); +#endif } /*-- 02.05.2007 14:36:26--------------------------------------------------- @@ -322,6 +341,12 @@ void DomainMapperTableManager::endLevel( ) -----------------------------------------------------------------------*/ void DomainMapperTableManager::endOfCellAction() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("endOFCellAction"); +#endif + + getCurrentSpans()->push_back(m_nGridSpan); + m_nGridSpan = 1; ++m_nCell; } /*-- 02.05.2007 14:36:26--------------------------------------------------- @@ -329,12 +354,30 @@ void DomainMapperTableManager::endOfCellAction() -----------------------------------------------------------------------*/ void DomainMapperTableManager::endOfRowAction() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("endOfRowAction"); +#endif + IntVectorPtr pTableGrid = getCurrentGrid( ); if(!m_nTableWidth && pTableGrid->size()) { ::std::vector::const_iterator aCellIter = pTableGrid->begin(); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("tableWidth"); +#endif + while( aCellIter != pTableGrid->end() ) + { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("col"); + dmapper_logger->attribute("width", *aCellIter); + dmapper_logger->endElement("col"); +#endif + m_nTableWidth += *aCellIter++; + } + if( m_nTableWidth > 0) { TablePropertyMapPtr pPropMap( new TablePropertyMap ); @@ -342,6 +385,10 @@ void DomainMapperTableManager::endOfRowAction() pPropMap->setValue( TablePropertyMap::TABLE_WIDTH, m_nTableWidth ); insertTableProps(pPropMap); } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("tableWidth"); +#endif } IntVectorPtr pCurrentSpans = getCurrentSpans( ); @@ -350,6 +397,25 @@ void DomainMapperTableManager::endOfRowAction() //fill missing elements with '1' pCurrentSpans->insert( pCurrentSpans->end( ), m_nCell - pCurrentSpans->size(), 1 ); } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("gridSpans"); + { + ::std::vector::const_iterator aGridSpanIter = pCurrentSpans->begin(); + ::std::vector::const_iterator aGridSpanIterEnd = pCurrentSpans->end(); + + while (aGridSpanIter != aGridSpanIterEnd) + { + dmapper_logger->startElement("gridSpan"); + dmapper_logger->attribute("span", *aGridSpanIter); + dmapper_logger->endElement("gridSpan"); + + aGridSpanIter++; + } + } + dmapper_logger->endElement("gridSpans"); +#endif + //calculate number of used grids - it has to match the size of m_aTableGrid size_t nGrids = 0; ::std::vector::const_iterator aGridSpanIter = pCurrentSpans->begin(); @@ -387,6 +453,12 @@ void DomainMapperTableManager::endOfRowAction() } TablePropertyMapPtr pPropMap( new TablePropertyMap ); pPropMap->Insert( PROP_TABLE_COLUMN_SEPARATORS, false, uno::makeAny( aSeparators ) ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("rowProperties"); + dmapper_logger->addTag(pPropMap->toTag()); + dmapper_logger->endElement("rowProperties"); +#endif insertRowProps(pPropMap); } @@ -394,6 +466,10 @@ void DomainMapperTableManager::endOfRowAction() m_nCell = 0; m_nCellBorderIndex = 0; pCurrentSpans->clear(); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("endOfRowAction"); +#endif } /*-- 18.06.2007 10:34:37--------------------------------------------------- @@ -442,4 +518,6 @@ void DomainMapperTableManager::CopyTextProperties(PropertyMapPtr pContext, Style } pContext->insert( m_pTableStyleTextProperies ); } + + }} diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx index 3d1e7f66effa..8f4fa082881e 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx @@ -44,6 +44,7 @@ class DomainMapperTableManager : public DomainMapperTableManager_Base_t sal_uInt32 m_nRow; sal_uInt32 m_nCell; + sal_uInt32 m_nGridSpan; sal_uInt32 m_nCellBorderIndex; //borders are provided for all cells and need counting sal_Int32 m_nHeaderRepeat; //counter of repeated headers - if == -1 then the repeating stops sal_Int32 m_nTableWidth; //might be set directly or has to be calculated from the column positions @@ -114,6 +115,7 @@ public: else DomainMapperTableManager_Base_t::insertTableProps( pProps ); }; + }; }} diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 596682cf9b46..4d9a9bd83c35 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -74,6 +74,7 @@ #ifdef DEBUG_DOMAINMAPPER #include #include +#include #endif #include @@ -419,15 +420,12 @@ DomainMapper_Impl::DomainMapper_Impl( TableDataHandler_t::Pointer_t pTableHandler (new DomainMapperTableHandler(xBodyTextAppendAndConvert, *this)); m_TableManager.setHandler(pTableHandler); - - m_TableManager.startLevel(); } /*-- 01.09.2006 10:22:28--------------------------------------------------- -----------------------------------------------------------------------*/ DomainMapper_Impl::~DomainMapper_Impl() { - m_TableManager.endLevel(); } /*------------------------------------------------------------------------- @@ -843,14 +841,20 @@ void lcl_AddRangeAndStyle( void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) { -#if DEBUG - clog << "finishParagraph" << endl; +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("finishParagraph"); #endif ParagraphPropertyMap* pParaContext = dynamic_cast< ParagraphPropertyMap* >( pPropertyMap.get() ); TextAppendContext& rAppendContext = m_aTextAppendStack.top(); uno::Reference< text::XTextAppend > xTextAppend = rAppendContext.xTextAppend; PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->attribute("isTextAppend", xTextAppend.is()); + dmapper_logger->attribute("isIgnor", m_TableManager.isIgnore()); +#endif + if(xTextAppend.is() && ! m_TableManager.isIgnore()) { try @@ -1096,6 +1100,10 @@ void DomainMapper_Impl::finishParagraph( PropertyMapPtr pPropertyMap ) //OSL_ENSURE( false, "ArgumentException in DomainMapper_Impl::finishParagraph" ); } } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("finishParagraph"); +#endif } /*------------------------------------------------------------------------- @@ -1359,7 +1367,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool bIsFootnote ) uno::Sequence< beans::PropertyValue > aFontProperties; if( pFontTable && pTopContext->GetFootnoteFontId() >= 0 && pFontTable->size() > (size_t)pTopContext->GetFootnoteFontId() ) { - const FontEntry* pFontEntry = pFontTable->getFontEntry(sal_uInt32(pTopContext->GetFootnoteFontId())); + const FontEntry::Pointer_t pFontEntry(pFontTable->getFontEntry(sal_uInt32(pTopContext->GetFootnoteFontId()))); PropertyMapPtr aFontProps( new PropertyMap ); aFontProps->Insert(PROP_CHAR_FONT_NAME, true, uno::makeAny( pFontEntry->sFontName )); aFontProps->Insert(PROP_CHAR_FONT_CHAR_SET, true, uno::makeAny( (sal_Int16)pFontEntry->nTextEncoding )); @@ -3719,4 +3727,23 @@ void DomainMapper_Impl::ResetParaRedline( ) } } +/*-- 22.09.2009 10:26:19--------------------------------------------------- + +-----------------------------------------------------------------------*/ +void DomainMapper_Impl::ApplySettingsTable() +{ + if( m_pSettingsTable ) + { + try + { + uno::Reference< beans::XPropertySet > xTextDefaults( + m_xTextFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Defaults"))), uno::UNO_QUERY_THROW ); + sal_Int32 nDefTab = m_pSettingsTable->GetDefaultTabStop(); + xTextDefaults->setPropertyValue( PropertyNameSupplier::GetPropertyNameSupplier().GetName( PROP_TAB_STOP_DISTANCE ), uno::makeAny(nDefTab) ); + } + catch(const uno::Exception& ) + { + } + } +} }} diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx old mode 100644 new mode 100755 index ae0dec6e1e54..d5493440ea48 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -306,8 +307,9 @@ private: LFOTablePtr m_pLFOTable; StyleSheetTablePtr m_pStyleSheetTable; ThemeTablePtr m_pThemeTable; - GraphicImportPtr m_pGraphicImport; SettingsTablePtr m_pSettingsTable; + GraphicImportPtr m_pGraphicImport; + PropertyMapPtr m_pTopContext; @@ -433,10 +435,10 @@ public: return m_pThemeTable; } - SettingsTablePtr GetSettingsTable( ) + SettingsTablePtr GetSettingsTable() { - if ( !m_pSettingsTable ) - m_pSettingsTable.reset( new SettingsTable ); + if( !m_pSettingsTable ) + m_pSettingsTable.reset( new SettingsTable( m_rDMapper, m_xTextFactory ) ); return m_pSettingsTable; } @@ -533,6 +535,8 @@ public: void RemoveCurrentRedline( ); void ResetParaRedline( ); + void ApplySettingsTable(); + }; } //namespace dmapper } //namespace writerfilter diff --git a/writerfilter/source/dmapper/FontTable.cxx b/writerfilter/source/dmapper/FontTable.cxx index c5a800769078..20f3d602156b 100644 --- a/writerfilter/source/dmapper/FontTable.cxx +++ b/writerfilter/source/dmapper/FontTable.cxx @@ -39,10 +39,9 @@ namespace dmapper struct FontTable_Impl { - std::vector< FontEntry > aFontEntries; - FontEntry* pCurrentEntry; - FontTable_Impl() : - pCurrentEntry(0){} + std::vector< FontEntry > aFontEntries; + FontEntry::Pointer_t pCurrentEntry; + FontTable_Impl() {} }; /*-- 19.06.2006 12:04:32--------------------------------------------------- @@ -494,14 +493,14 @@ void FontTable::attribute(Id Name, Value & val) // case NS_rtf::LN_LFO: break; case NS_rtf::LN_F: break; - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ case NS_rtf::LN_ALTFONTNAME: + /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ m_pImpl->pCurrentEntry->sAlternativeFont = sValue; break; - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ case NS_rtf::LN_XSZFFN: - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ + /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Font_name: + /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ m_pImpl->pCurrentEntry->sFontName = sValue; break; // case NS_rtf::LN_XSTZNAME: break; @@ -566,11 +565,11 @@ void FontTable::entry(int /*pos*/, writerfilter::Reference::Pointer_ { //create a new font entry OSL_ENSURE( !m_pImpl->pCurrentEntry, "current entry has to be NULL here"); - m_pImpl->pCurrentEntry = new FontEntry ; + m_pImpl->pCurrentEntry.reset(new FontEntry); ref->resolve(*this); //append it to the table m_pImpl->aFontEntries.push_back( *m_pImpl->pCurrentEntry ); - m_pImpl->pCurrentEntry = 0; + m_pImpl->pCurrentEntry.reset(); } /*-- 19.06.2006 12:04:34--------------------------------------------------- @@ -656,12 +655,12 @@ void FontTable::endShape( ) /*-- 21.06.2006 11:21:38--------------------------------------------------- -----------------------------------------------------------------------*/ -const FontEntry* FontTable::getFontEntry(sal_uInt32 nIndex) +const FontEntry::Pointer_t FontTable::getFontEntry(sal_uInt32 nIndex) { - const FontEntry* pRet = 0; + FontEntry::Pointer_t pRet; if(m_pImpl->aFontEntries.size() > nIndex) { - pRet = &m_pImpl->aFontEntries[nIndex]; + pRet.reset(&m_pImpl->aFontEntries[nIndex]); } return pRet; } diff --git a/writerfilter/source/dmapper/FontTable.hxx b/writerfilter/source/dmapper/FontTable.hxx index f63d0cf0ee1a..a2fa967d85fe 100644 --- a/writerfilter/source/dmapper/FontTable.hxx +++ b/writerfilter/source/dmapper/FontTable.hxx @@ -28,6 +28,7 @@ #ifndef INCLUDED_FONTTABLE_HXX #define INCLUDED_FONTTABLE_HXX +#include #include #include #include @@ -39,6 +40,8 @@ namespace dmapper struct FontTable_Impl; struct FontEntry { + typedef boost::shared_ptr Pointer_t; + ::rtl::OUString sFontName; ::rtl::OUString sFontName1; bool bTrueType; @@ -97,7 +100,7 @@ public: virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); virtual void endShape( ); - const FontEntry* getFontEntry(sal_uInt32 nIndex); + const FontEntry::Pointer_t getFontEntry(sal_uInt32 nIndex); sal_uInt32 size(); }; typedef boost::shared_ptr< FontTable > FontTablePtr; diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 308ce90ace65..c8d94f8302c2 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -379,46 +379,40 @@ void GraphicImport::attribute(Id nName, Value & val) /* WRITERFILTERSTATUS: table: PICFattribute */ switch( nName ) { - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_LCB: break;//byte count - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_CBHEADER: break;//ignored - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_MFP: //MetafilePict - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_DffRecord: //dff record - expands to an sprm which expands to ... - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_shpopt: //shape options - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_shpfbse: //BLIP store entry - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_BRCTOP: //top border - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_BRCLEFT: //left border - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_BRCBOTTOM: //bottom border - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_BRCRIGHT: //right border - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_shape: //shape - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_blip: //the binary graphic data in a shape + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { switch(nName) { case NS_rtf::LN_BRCTOP: //top border + /* WRITERFILTERSTATUS: */ m_pImpl->nCurrentBorderLine = BORDER_TOP; break; case NS_rtf::LN_BRCLEFT: //left border + /* WRITERFILTERSTATUS: */ m_pImpl->nCurrentBorderLine = BORDER_LEFT; break; case NS_rtf::LN_BRCBOTTOM: //bottom border + /* WRITERFILTERSTATUS: */ m_pImpl->nCurrentBorderLine = BORDER_BOTTOM; break; case NS_rtf::LN_BRCRIGHT: //right border + /* WRITERFILTERSTATUS: */ m_pImpl->nCurrentBorderLine = BORDER_RIGHT; break; case NS_rtf::LN_shpopt: + /* WRITERFILTERSTATUS: */ m_pImpl->bInShapeOptionMode = true; break; default:; @@ -431,6 +425,7 @@ void GraphicImport::attribute(Id nName, Value & val) switch(nName) { case NS_rtf::LN_shpopt: + /* WRITERFILTERSTATUS: */ m_pImpl->bInShapeOptionMode = false; break; default:; @@ -438,80 +433,97 @@ void GraphicImport::attribute(Id nName, Value & val) } break; case NS_rtf::LN_payload : + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { writerfilter::Reference::Pointer_t pPictureData = val.getBinary(); if( pPictureData.get()) pPictureData->resolve(*this); } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ case NS_rtf::LN_BM_RCWINMF: //windows bitmap structure - if it's a bitmap + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_DXAGOAL: //x-size in twip - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_DYAGOAL: //y-size in twip + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_MX: m_pImpl->nHoriScaling = nIntValue; break;// hori scaling in 0.001% - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_MY: m_pImpl->nVertScaling = nIntValue; break;// vert scaling in 0.001% - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_DXACROPLEFT: m_pImpl->nLeftCrop = ConversionHelper::convertTwipToMM100(nIntValue); break;// left crop in twips - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_DYACROPTOP: m_pImpl->nTopCrop = ConversionHelper::convertTwipToMM100(nIntValue); break;// top crop in twips - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_DXACROPRIGHT: m_pImpl->nRightCrop = ConversionHelper::convertTwipToMM100(nIntValue); break;// right crop in twips - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_DYACROPBOTTOM: m_pImpl->nBottomCrop = ConversionHelper::convertTwipToMM100(nIntValue); break;// bottom crop in twips - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_BRCL: break;//border type - legacy - - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_FFRAMEEMPTY: break;// picture consists of a single frame - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_rtf::LN_MX: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nHoriScaling = nIntValue; + break;// hori scaling in 0.001% + case NS_rtf::LN_MY: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nVertScaling = nIntValue; + break;// vert scaling in 0.001% + case NS_rtf::LN_DXACROPLEFT: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nLeftCrop = ConversionHelper::convertTwipToMM100(nIntValue); + break;// left crop in twips + case NS_rtf::LN_DYACROPTOP: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nTopCrop = ConversionHelper::convertTwipToMM100(nIntValue); + break;// top crop in twips + case NS_rtf::LN_DXACROPRIGHT: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nRightCrop = ConversionHelper::convertTwipToMM100(nIntValue); + break;// right crop in twips + case NS_rtf::LN_DYACROPBOTTOM: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nBottomCrop = ConversionHelper::convertTwipToMM100(nIntValue); + break;// bottom crop in twips + case NS_rtf::LN_BRCL: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;//border type - legacy - + case NS_rtf::LN_FFRAMEEMPTY: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// picture consists of a single frame case NS_rtf::LN_FBITMAP: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ m_pImpl->bIsBitmap = nIntValue > 0 ? true : false; break;//1 if it's a bitmap ??? - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_FDRAWHATCH: break;//1 if it's an active OLE object - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_FERROR: break;// 1 if picture is an error message - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_BPP: m_pImpl->nBitsPerPixel = nIntValue; break;//bits per pixel 0 - unknown, 1- mono, 4 - VGA + case NS_rtf::LN_FDRAWHATCH: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;//1 if it's an active OLE object + case NS_rtf::LN_FERROR: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// 1 if picture is an error message + case NS_rtf::LN_BPP: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nBitsPerPixel = nIntValue; + break;//bits per pixel 0 - unknown, 1- mono, 4 - VGA - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_DXAORIGIN: //horizontal offset of hand annotation origin - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_DYAORIGIN: //vertical offset of hand annotation origin + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_CPROPS:break;// unknown - ignored + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ //metafilepict - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_MM: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ // according to the documentation 99 or 98 are provided - but they are not! // m_pImpl->bIsBitmap = 99 == nIntValue ? true : false; // m_pImpl->bIsTiff = 98 == nIntValue ? true : false; break; //mapmode - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_XEXT: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->setXSize(nIntValue); break; // x-size - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_YEXT: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->setYSize(nIntValue); break; // y-size - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_HMF: break; //identifier - ignored + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ //sprm 0xf004 and 0xf008, 0xf00b - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_dfftype:// + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ m_pImpl->nDffType = nIntValue; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_dffinstance: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //todo: does this still work for PICF? //in case of LN_dfftype == 0xf01f the instance contains the bitmap type: if(m_pImpl->nDffType == 0xf01f) @@ -549,62 +561,80 @@ void GraphicImport::attribute(Id nName, Value & val) } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_dffversion:// ignored + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; //sprm 0xf008 - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shptype: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpid: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfGroup: break;// This shape is a group shape - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfChild: break;// Not a top-level shape - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfPatriarch: break;// This is the topmost group shape. Exactly one of these per drawing. - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfDeleted: break;// The shape has been deleted - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfOleShape: break;// The shape is an OLE object - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfHaveMaster: break;// Shape has a hspMaster property - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + case NS_rtf::LN_shptype: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpid: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpfGroup: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// This shape is a group shape + case NS_rtf::LN_shpfChild: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// Not a top-level shape + case NS_rtf::LN_shpfPatriarch: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// This is the topmost group shape. Exactly one of these per drawing. + case NS_rtf::LN_shpfDeleted: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// The shape has been deleted + case NS_rtf::LN_shpfOleShape: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// The shape is an OLE object + case NS_rtf::LN_shpfHaveMaster: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// Shape has a hspMaster property case NS_rtf::LN_shpfFlipH: // Shape is flipped horizontally + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->bHoriFlip = nIntValue ? true : false; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_shpfFlipV: // Shape is flipped vertically + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->bVertFlip = nIntValue ? true : false; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfConnector: break;// Connector type of shape - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfHaveAnchor: break;// Shape has an anchor of some kind - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfBackground: break;// Background shape - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfHaveSpt: break;// Shape has a shape type property - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shptypename: break;// shape type name - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_shppid: m_pImpl->nShapeOptionType = nIntValue; break; //type of shape option - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfBid: break; //ignored - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfComplex:break; - /* WRITERFILTERSTATUS: done: 50, planned: 10, spent: 5 */ + case NS_rtf::LN_shpfConnector: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// Connector type of shape + case NS_rtf::LN_shpfHaveAnchor: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// Shape has an anchor of some kind + case NS_rtf::LN_shpfBackground: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// Background shape + case NS_rtf::LN_shpfHaveSpt: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// Shape has a shape type property + case NS_rtf::LN_shptypename: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break;// shape type name + case NS_rtf::LN_shppid: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nShapeOptionType = nIntValue; + break; //type of shape option + case NS_rtf::LN_shpfBid: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + break; //ignored + case NS_rtf::LN_shpfComplex: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; case NS_rtf::LN_shpop: + /* WRITERFILTERSTATUS: done: 50, planned: 10, spent: 5 */ { if(NS_dff::LN_shpwzDescription != sal::static_int_cast(m_pImpl->nShapeOptionType) ) ProcessShapeOptions( val ); } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpname: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_rtf::LN_shpname: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; case NS_rtf::LN_shpvalue: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ { if( NS_dff::LN_shpwzDescription == sal::static_int_cast(m_pImpl->nShapeOptionType) ) ProcessShapeOptions( val ); @@ -612,95 +642,94 @@ void GraphicImport::attribute(Id nName, Value & val) break; //BLIP store entry - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpbtWin32: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpbtMacOS: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shprgbUid: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shptag: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpsize: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpcRef: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpfoDelay: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpusage: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpcbName: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpunused2: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpunused3: break; + case NS_rtf::LN_shpbtWin32: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpbtMacOS: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shprgbUid: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shptag: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpsize: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpcRef: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpfoDelay: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpusage: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpcbName: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpunused2: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_shpunused3: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; //border properties - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_shpblipbname : break; + case NS_rtf::LN_shpblipbname : + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; - /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */ case NS_rtf::LN_DPTLINEWIDTH: // 0x1759 + /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */ m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineWidth = nIntValue; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_BRCTYPE: // 0x175a + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //graphic borders don't support different line types //m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineType = nIntValue; break; - /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */ case NS_rtf::LN_ICO: // 0x175b + /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */ m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineColor = ConversionHelper::ConvertColor( nIntValue ); break; - /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */ case NS_rtf::LN_DPTSPACE: // 0x175c + /* WRITERFILTERSTATUS: done: 100, planned: 1, spent: 1 */ m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineDistance = nIntValue; break; - /* WRITERFILTERSTATUS: done: 0, planned: 1, spent: 0 */ case NS_rtf::LN_FSHADOW: // 0x175d + /* WRITERFILTERSTATUS: done: 0, planned: 1, spent: 0 */ m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].bHasShadow = nIntValue ? true : false; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_FFRAME: // ignored /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_UNUSED2_15: break;// ignored - -// const QName_t LN_shpoptextraoffset = 20028; -// const QName_t LN_shptypename = 20029; -// const QName_t LN_shpblipbname = 20031; -// const QName_t LN_binary = 20032; - - - -// case NS_rtf::LN_shpblipbname = 20031; -// case NS_rtf::LN_binary = 20032; -// case NS_rtf::LN_shpdgg = 10492; -// case NS_rtf::LN_shpfbse = 10493; - - -// case NS_rtf::LN_CPROPS: //unused - - - -// case NS_rtf::LN_LINECOLOR = 10372; -// case NS_rtf::LN_LINEWIDTH = 10373; -// case NS_rtf::LN_LINETYPE = 10374; - - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_SPID: break; + case NS_rtf::LN_UNUSED2_15: // ignored /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_XALEFT: m_pImpl->nLeftPosition = ConversionHelper::convertTwipToMM100(nIntValue); break; //left position - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_YATOP: m_pImpl->nTopPosition = ConversionHelper::convertTwipToMM100(nIntValue); break; //top position - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_XARIGHT: m_pImpl->nRightPosition = ConversionHelper::convertTwipToMM100(nIntValue); break; //right position - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_YABOTTOM: m_pImpl->nBottomPosition = ConversionHelper::convertTwipToMM100(nIntValue); break;//bottom position - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + + case NS_rtf::LN_SPID: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_rtf::LN_XALEFT: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nLeftPosition = ConversionHelper::convertTwipToMM100(nIntValue); + break; //left position + case NS_rtf::LN_YATOP: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nTopPosition = ConversionHelper::convertTwipToMM100(nIntValue); + break; //top position + case NS_rtf::LN_XARIGHT: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nRightPosition = ConversionHelper::convertTwipToMM100(nIntValue); + break; //right position + case NS_rtf::LN_YABOTTOM: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nBottomPosition = ConversionHelper::convertTwipToMM100(nIntValue); + break;//bottom position case NS_rtf::LN_FHDR: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_XAlign: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ /* static const SwHoriOrient aHoriOriTab[ nCntXAlign ] = { @@ -729,6 +758,7 @@ void GraphicImport::attribute(Id nName, Value & val) } break; case NS_rtf::LN_YAlign: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ /* static const SwVertOrient aVertOriTab[ nCntYAlign ] = { @@ -795,9 +825,10 @@ void GraphicImport::attribute(Id nName, Value & val) default:m_pImpl->nHoriRelation = text::RelOrientation::CHAR; } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_YRelTo: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_BY: //vert orient relation + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ switch( nIntValue ) { case 0: m_pImpl->nVertRelation = text::RelOrientation::PAGE_PRINT_AREA; break; @@ -808,8 +839,8 @@ void GraphicImport::attribute(Id nName, Value & val) } break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_WR: //wrapping + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ switch( nIntValue ) { case 0: //0 like 2, but doesn't require absolute object @@ -832,8 +863,8 @@ void GraphicImport::attribute(Id nName, Value & val) default:; } break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_WRK: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ if( !m_pImpl->bIgnoreWRK ) switch( nIntValue ) { @@ -855,21 +886,18 @@ void GraphicImport::attribute(Id nName, Value & val) default:; } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_FRCASIMPLE: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_FBELOWTEXT: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_FANCHORLOCK: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_CTXBX: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ // { // sal_Int32 nValue1 = val.getInt(); // nValue1++; // } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_shptxt: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //todo: text content break; /* case NS_rtf::LN_CH = 10421; @@ -881,6 +909,7 @@ void GraphicImport::attribute(Id nName, Value & val) case NS_rtf::LN_dffheader: break; case NS_ooxml::LN_CT_PositiveSize2D_cx:// 90407; case NS_ooxml::LN_CT_PositiveSize2D_cy:// 90408; + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { sal_Int32 nDim = ConversionHelper::convertEMUToMM100( nIntValue ); if( nName == NS_ooxml::LN_CT_PositiveSize2D_cx ) @@ -893,46 +922,58 @@ void GraphicImport::attribute(Id nName, Value & val) case NS_ooxml::LN_CT_EffectExtent_t:// 90908; case NS_ooxml::LN_CT_EffectExtent_r:// 90909; case NS_ooxml::LN_CT_EffectExtent_b:// 90910; + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ //todo: extends the wrapping size of the object, e.g. if shadow is added break; case NS_ooxml::LN_CT_NonVisualDrawingProps_id:// 90650; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //id of the object - ignored break; case NS_ooxml::LN_CT_NonVisualDrawingProps_name:// 90651; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //name of the object m_pImpl->sName = val.getString(); break; case NS_ooxml::LN_CT_NonVisualDrawingProps_descr:// 90652; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //alternative text m_pImpl->sAlternativeText = val.getString(); break; case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noChangeAspect://90644; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //disallow aspect ratio change - ignored break; case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noMove:// 90645; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->bPositionProtected = true; break; case NS_ooxml::LN_CT_GraphicalObjectFrameLocking_noResize: // 90646; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->bSizeProtected = true; break; case NS_ooxml::LN_CT_Anchor_distT: // 90983; case NS_ooxml::LN_CT_Anchor_distB: // 90984; case NS_ooxml::LN_CT_Anchor_distL: // 90985; case NS_ooxml::LN_CT_Anchor_distR: // 90986; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { //redirect to shape option processing switch( nName ) { case NS_ooxml::LN_CT_Anchor_distT: // 90983; + /* WRITERFILTERSTATUS: */ m_pImpl->nShapeOptionType = NS_dff::LN_shpdyWrapDistTop; break; case NS_ooxml::LN_CT_Anchor_distB: // 90984; + /* WRITERFILTERSTATUS: */ m_pImpl->nShapeOptionType = NS_dff::LN_shpdyWrapDistBottom; break; case NS_ooxml::LN_CT_Anchor_distL: // 90985; + /* WRITERFILTERSTATUS: */ m_pImpl->nShapeOptionType = NS_dff::LN_shpdxWrapDistLeft; break; case NS_ooxml::LN_CT_Anchor_distR: // 90986; + /* WRITERFILTERSTATUS: */ m_pImpl->nShapeOptionType = NS_dff::LN_shpdxWrapDistRight; break; //m_pImpl->nShapeOptionType = NS_dff::LN_shpcropFromTop @@ -942,25 +983,30 @@ void GraphicImport::attribute(Id nName, Value & val) } break; case NS_ooxml::LN_CT_Anchor_simplePos_attr: // 90987; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->bUseSimplePos = nIntValue > 0; break; case NS_ooxml::LN_CT_Anchor_relativeHeight: // 90988; + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ //z-order break; case NS_ooxml::LN_CT_Anchor_behindDoc: // 90989; - in background + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ if( nIntValue > 0 ) m_pImpl->bOpaque = false; break; case NS_ooxml::LN_CT_Anchor_locked: // 90990; - ignored case NS_ooxml::LN_CT_Anchor_layoutInCell: // 90991; - ignored - //true: inside cell, cell resizes, false: table is resized or relocated, object might be outside of the table case NS_ooxml::LN_CT_Anchor_hidden: // 90992; - ignored + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; case NS_ooxml::LN_CT_Anchor_allowOverlap: // 90993; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //enable overlapping - ignored break; case NS_ooxml::LN_CT_Point2D_x: // 90405; case NS_ooxml::LN_CT_Point2D_y: // 90406; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ if( m_pImpl->bUseSimplePos ) { //todo: absolute positioning @@ -970,9 +1016,11 @@ void GraphicImport::attribute(Id nName, Value & val) } break; case NS_ooxml::LN_CT_WrapTight_wrapText: // 90934; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->bContour = true; //no break; case NS_ooxml::LN_CT_WrapSquare_wrapText: //90928; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ switch ( val.getInt() ) { case NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides: // 90920; @@ -991,7 +1039,7 @@ void GraphicImport::attribute(Id nName, Value & val) } break; case NS_ooxml::LN_shape: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { uno::Reference< drawing::XShape> xShape; val.getAny( ) >>= xShape; @@ -1070,16 +1118,14 @@ void GraphicImport::attribute(Id nName, Value & val) } break; case NS_ooxml::LN_CT_Inline_distT: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Inline_distB: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Inline_distL: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Inline_distR: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ //TODO: need to be handled break; case NS_ooxml::LN_CT_GraphicalObjectData_uri: + /* WRITERFILTERSTATUS: done: 50, planned: 0.5, spent: 0 */ val.getString(); //TODO: does it need to be handled? break; @@ -1122,121 +1168,30 @@ void GraphicImport::ProcessShapeOptions(Value& val) /* WRITERFILTERSTATUS: table: ShapeOptionsAttribute */ switch( m_pImpl->nShapeOptionType ) { - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shprotation /*4*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockRotation /*119*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockAspectRatio /*120*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockPosition /*121*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockAgainstSelect /*122*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockCropping /*123*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockVertices /*124*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockText /*125*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockAdjustHandles /*126*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockAgainstGrouping /*127*/: break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockAgainstGrouping /*127*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplTxid /*128*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpdxTextLeft /*129*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpdyTextTop /*130*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpdxTextRight /*131*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpdyTextBottom /*132*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpWrapText /*133*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpscaleText /*134*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpanchorText /*135*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shptxflTextFlow /*136*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpcdirFont /*137*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shphspNext /*138*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shptxdir /*139*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfSelectText /*187*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfAutoTextMargin /*188*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfRotateText /*189*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfFitShapeToText /*190*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfFitTextToShape /*191*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextUNICODE /*192*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextRTF /*193*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextAlign /*194*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextSize /*195*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextSpacing /*196*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFont /*197*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFReverseRows /*240*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfGtext /*241*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFVertical /*242*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFKern /*243*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFTight /*244*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFStretch /*245*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFShrinkFit /*246*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFBestFit /*247*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFNormalize /*248*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFDxMeasure /*249*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFBold /*250*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFItalic /*251*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFUnderline /*252*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFShadow /*253*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFSmallcaps /*254*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgtextFStrikethrough /*255*/: - - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_dff::LN_shpcropFromTop /*256*/ : m_pImpl->nTopCrop = nTwipValue; break;// rtf:shpcropFromTop - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_dff::LN_shpcropFromBottom /*257*/ : m_pImpl->nBottomCrop= nTwipValue; break;// rtf:shpcropFromBottom - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_dff::LN_shpcropFromLeft /*258*/ : m_pImpl->nLeftCrop = nTwipValue; break;// rtf:shpcropFromLeft - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_dff::LN_shpcropFromRight/*259*/ : m_pImpl->nRightCrop = nTwipValue;break;// rtf:shpcropFromRight - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shppib/*260*/: break; // rtf:shppib - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shppibName/*261*/: break; // rtf:shppibName - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_dff::LN_shpcropFromTop /*256*/ : + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nTopCrop = nTwipValue; + break;// rtf:shpcropFromTop + case NS_dff::LN_shpcropFromBottom /*257*/ : + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nBottomCrop= nTwipValue; + break;// rtf:shpcropFromBottom + case NS_dff::LN_shpcropFromLeft /*258*/ : + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nLeftCrop = nTwipValue; + break;// rtf:shpcropFromLeft + case NS_dff::LN_shpcropFromRight/*259*/ : + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + m_pImpl->nRightCrop = nTwipValue; + break;// rtf:shpcropFromRight + case NS_dff::LN_shppib/*260*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shppib + case NS_dff::LN_shppibName/*261*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shppibName case NS_dff::LN_shppibFlags/*262*/: // rtf:shppibFlags + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ /* * // MSOBLIPFLAGS ñ flags for pictures typedef enum @@ -1258,10 +1213,8 @@ void GraphicImport::ProcessShapeOptions(Value& val) * * */ break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppictureTransparent /*263*/: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_dff::LN_shppictureContrast/*264*/: // rtf:shppictureContrast docu: "1<<16" + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ /* 0x10000 is msoffice 50% < 0x10000 is in units of 1/50th of 0x10000 per 1% @@ -1291,38 +1244,30 @@ void GraphicImport::ProcessShapeOptions(Value& val) m_pImpl->nContrast -= 100; } break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_dff::LN_shppictureBrightness/*265*/: // rtf:shppictureBrightness + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->nBrightness = ( (sal_Int32) nIntValue / 327 ); break; - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_dff::LN_shppictureGamma/*266*/: // rtf:shppictureGamma + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ //todo check gamma value with _real_ document m_pImpl->fGamma = double(nIntValue/655); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shppictureId /*267*/: break; // rtf:shppictureId - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shppictureDblCrMod /*268*/: break; // rtf:shppictureDblCrMod - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shppictureFillCrMod /*269*/: break; // rtf:shppictureFillCrMod - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shppictureLineCrMod /*270*/: break; // rtf:shppictureLineCrMod - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppibPrint /*271*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppibPrintName /*272*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppibPrintFlags /*273*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfNoHitTestPicture /*316*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppictureGray /*317*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppictureBiLevel /*318*/: + case NS_dff::LN_shppictureId /*267*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shppictureId + case NS_dff::LN_shppictureDblCrMod /*268*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shppictureDblCrMod + case NS_dff::LN_shppictureFillCrMod /*269*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shppictureFillCrMod + case NS_dff::LN_shppictureLineCrMod /*270*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shppictureLineCrMod - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_dff::LN_shppictureActive/*319*/: // rtf:shppictureActive + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ switch( nIntValue & 0x06 ) { case 0 : m_pImpl->eColorMode = drawing::ColorMode_STANDARD; break; @@ -1331,162 +1276,31 @@ void GraphicImport::ProcessShapeOptions(Value& val) default:; } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgeoLeft /*320*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgeoTop /*321*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgeoRight /*322*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpgeoBottom /*323*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshapePath /*324*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppVertices /*325*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shppSegmentInfo /*326*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjustValue /*327*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust2Value /*328*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust3Value /*329*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust4Value /*330*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust5Value /*331*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust6Value /*332*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust7Value /*333*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust8Value /*334*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust9Value /*335*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpadjust10Value /*336*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfShadowOK /*378*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpf3DOK /*379*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLineOK /*380*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfGtextOK /*381*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfFillShadeShapeOK /*382*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfFillOK /*383*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillType /*384*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_dff::LN_shpfillColor /*385*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ m_pImpl->nFillColor = (m_pImpl->nFillColor & 0xff000000) + ConversionHelper::ConvertColor( nIntValue ); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_dff::LN_shpfillOpacity /*386*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ { sal_Int32 nTrans = 0xff - ( nIntValue * 0xff ) / 0xffff; m_pImpl->nFillColor = (nTrans << 0x18 ) + (m_pImpl->nFillColor & 0xffffff); } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillBackColor /*387*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillBackOpacity /*388*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillCrMod /*389*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillBlip /*390*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillBlipName /*391*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillBlipFlags /*392*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillWidth /*393*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillHeight /*394*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillAngle /*395*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillFocus /*396*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillToLeft /*397*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillToTop /*398*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillToRight /*399*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillToBottom /*400*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillRectLeft /*401*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillRectTop /*402*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillRectRight /*403*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillRectBottom /*404*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillDztype /*405*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillShadePreset /*406*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillShadeColors /*407*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillOriginX /*408*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillOriginY /*409*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillShapeOriginX /*410*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillShapeOriginY /*411*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillShadeType /*412*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfFilled /*443*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfHitTestFill /*444*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillShape /*445*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfillUseRect /*446*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shpfNoFillHitTest /*447*/: break; // rtf:shpfNoFillHitTest - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + case NS_dff::LN_shpfNoFillHitTest /*447*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shpfNoFillHitTest case NS_dff::LN_shplineColor /*448*/: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineColor = ConversionHelper::ConvertColor( nIntValue ); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineOpacity /*449*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineBackColor /*450*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineCrMod /*451*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineType /*452*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineFillBlip /*453*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineFillBlipName /*454*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineFillBlipFlags /*455*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineFillWidth /*456*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineFillHeight /*457*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineFillDztype /*458*/: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_dff::LN_shplineWidth /*459*/: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ //1pt == 12700 units m_pImpl->aBorders[m_pImpl->nCurrentBorderLine].nLineWidth = ConversionHelper::convertTwipToMM100(nIntValue / 635); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineMiterLimit /*460*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineStyle /*461*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_dff::LN_shplineDashing /*462*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //graphic borders don't support different dashing /*MSOLINEDASHING msolineSolid, // Solid (continuous) pen @@ -1502,283 +1316,40 @@ void GraphicImport::ProcessShapeOptions(Value& val) msolineLongDashDotDotGEL // long dash short dash short dash*/ //m_pImpl->aBorders[nCurrentBorderLine].nLineType = nIntValue; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineDashStyle /*463*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineStartArrowhead /*464*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineEndArrowhead /*465*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineStartArrowWidth /*466*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineStartArrowLength /*467*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineEndArrowWidth /*468*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineEndArrowLength /*469*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineJoinStyle /*470*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineEndCapStyle /*471*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfArrowheadsOK /*507*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLine /*508*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfHitTestLine /*509*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplineFillShape /*510*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shpfNoLineDrawDash /*511*/: break; // rtf:shpfNoLineDrawDash - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowType /*512*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowColor /*513*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowHighlight /*514*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowCrMod /*515*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowOpacity /*516*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowOffsetX /*517*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowOffsetY /*518*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowSecondOffsetX /*519*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowSecondOffsetY /*520*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowScaleXToX /*521*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowScaleYToX /*522*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowScaleXToY /*523*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowScaleYToY /*524*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowPerspectiveX /*525*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowPerspectiveY /*526*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowWeight /*527*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowOriginX /*528*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpshadowOriginY /*529*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfShadow /*574*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfshadowObscured /*575*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveType /*576*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveOffsetX /*577*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveOffsetY /*578*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveScaleXToX /*579*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveScaleYToX /*580*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveScaleXToY /*581*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveScaleYToY /*582*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectivePerspectiveX /*583*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectivePerspectiveY /*584*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveWeight /*585*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveOriginX /*586*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpperspectiveOriginY /*587*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfPerspective /*639*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DSpecularAmt /*640*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DDiffuseAmt /*641*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DShininess /*642*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DEdgeThickness /*643*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DExtrudeForward /*644*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DExtrudeBackward /*645*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DExtrudePlane /*646*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DExtrusionColor /*647*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DCrMod /*648*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpf3D /*700*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DMetallic /*701*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DUseExtrusionColor /*702*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DLightFace /*703*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DYRotationAngle /*704*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DXRotationAngle /*705*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRotationAxisX /*706*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRotationAxisY /*707*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRotationAxisZ /*708*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRotationAngle /*709*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRotationCenterX /*710*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRotationCenterY /*711*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRotationCenterZ /*712*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DRenderMode /*713*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DTolerance /*714*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DXViewpoint /*715*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DYViewpoint /*716*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DZViewpoint /*717*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DOriginX /*718*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DOriginY /*719*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DSkewAngle /*720*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DSkewAmount /*721*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DAmbientIntensity /*722*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DKeyX /*723*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DKeyY /*724*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DKeyZ /*725*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DKeyIntensity /*726*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DFillX /*727*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DFillY /*728*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DFillZ /*729*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpc3DFillIntensity /*730*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DConstrainRotation /*763*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DRotationCenterAuto /*764*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DParallel /*765*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DKeyHarsh /*766*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfc3DFillHarsh /*767*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shphspMaster /*769*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpcxstyle /*771*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpbWMode /*772*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpbWModePureBW /*773*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpbWModeBW /*774*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfOleIcon /*826*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfPreferRelativeResize /*827*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfLockShapeType /*828*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfDeleteAttachedObject /*830*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfBackground /*831*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpspcot /*832*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpdxyCalloutGap /*833*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpspcoa /*834*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpspcod /*835*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpdxyCalloutDropSpecified /*836*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpdxyCalloutLengthSpecified /*837*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfCallout /*889*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfCalloutAccentBar /*890*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfCalloutTextBorder /*891*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfCalloutMinusX /*892*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfCalloutMinusY /*893*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfCalloutDropAuto /*894*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfCalloutLengthSpecified /*895*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpwzName /*896*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_dff::LN_shpfNoLineDrawDash /*511*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shpfNoLineDrawDash case NS_dff::LN_shpwzDescription /*897*/: //alternative text + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ m_pImpl->sAlternativeText = val.getString(); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ // case NS_dff::LN_shppihlShape /*898*/: - case NS_dff::LN_shppWrapPolygonVertices/*899*/: break; // rtf:shppWrapPolygonVertices - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_dff::LN_shppWrapPolygonVertices/*899*/: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; // rtf:shppWrapPolygonVertices case NS_dff::LN_shpdxWrapDistLeft /*900*/: // contains a twip/635 value + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustLRWrapForWordMargins() m_pImpl->nLeftMargin = nIntValue / 360; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_dff::LN_shpdyWrapDistTop /*901*/: // contains a twip/635 value + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustULWrapForWordMargins() m_pImpl->nTopMargin = nIntValue / 360; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_dff::LN_shpdxWrapDistRight /*902*/:// contains a twip/635 value + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustLRWrapForWordMargins() m_pImpl->nRightMargin = nIntValue / 360; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_dff::LN_shpdyWrapDistBottom /*903*/:// contains a twip/635 value + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //todo: changes have to be applied depending on the orientation, see SwWW8ImplReader::AdjustULWrapForWordMargins() m_pImpl->nBottomMargin = nIntValue / 360; break; + case NS_dff::LN_shpfPrint /*959*/: /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shplidRegroup /*904*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfEditedWrap /*953*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfBehindDocument /*954*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfOnDblClickNotify /*955*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfIsButton /*956*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfOneD /*957*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ -// case NS_dff::LN_shpfHidden /*958*/: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_dff::LN_shpfPrint /*959*/: break; // rtf:shpfPrint - + break; // rtf:shpfPrint default: OSL_ENSURE( false, "shape option unsupported?"); } @@ -1823,6 +1394,7 @@ void GraphicImport::sprm(Sprm & rSprm) case NS_ooxml::LN_CT_WrapTight_wrapPolygon: // 90933; case NS_ooxml::LN_graphic_graphic: case NS_ooxml::LN_pic_pic: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -1873,13 +1445,16 @@ void GraphicImport::sprm(Sprm & rSprm) } break; case NS_ooxml::LN_EG_WrapType_wrapNone: // 90944; - doesn't contain attributes + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //depending on the behindDoc attribute text wraps through behind or in fron of the object m_pImpl->nWrap = text::WrapTextMode_THROUGHT; break; case NS_ooxml::LN_EG_WrapType_wrapTopAndBottom: // 90948; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->nWrap = text::WrapTextMode_NONE; break; case NS_ooxml::LN_EG_WrapType_wrapThrough: // 90947; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->nWrap = text::WrapTextMode_THROUGHT; break; case 0xf010: @@ -1887,6 +1462,7 @@ void GraphicImport::sprm(Sprm & rSprm) //ignore - doesn't contain useful members break; case NS_ooxml::LN_CT_GraphicalObject_graphicData:// 90660; + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { m_pImpl->bIsGraphic = true; diff --git a/writerfilter/source/dmapper/LFOTable.cxx b/writerfilter/source/dmapper/LFOTable.cxx index 82d2b032b761..51ecafd2662e 100644 --- a/writerfilter/source/dmapper/LFOTable.cxx +++ b/writerfilter/source/dmapper/LFOTable.cxx @@ -94,434 +94,47 @@ void LFOTable::attribute(Id Name, Value & val) switch( Name ) { // case NS_rtf::LN_ISTD: break;//index of applied style - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_rtf::LN_ISTARTAT: - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_rtf::LN_ILVL: - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_rtf::LN_FSTARTAT: - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_rtf::LN_FFORMATTING: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ if(m_pImpl->m_pCurrentEntry->aLFOLevels.size()) { vector< LFOLevelPtr >::reverse_iterator aEndIter = m_pImpl->m_pCurrentEntry->aLFOLevels.rbegin(); switch( Name ) { case NS_rtf::LN_ISTARTAT: + /* WRITERFILTERSTATUS:*/ (*aEndIter)->nIStartAt = nIntValue; break; case NS_rtf::LN_ILVL: + /* WRITERFILTERSTATUS:*/ (*aEndIter)->sILevel = val.getString(); break; case NS_rtf::LN_FSTARTAT: + /* WRITERFILTERSTATUS:*/ (*aEndIter)->nFStartAt = nIntValue; break; case NS_rtf::LN_FFORMATTING: + /* WRITERFILTERSTATUS:*/ (*aEndIter)->nFFormatting = nIntValue; break; default:; } } break; -// case NS_rtf::LN_NFC: break; -// case NS_rtf::LN_JC: break; -// case NS_rtf::LN_FLEGAL: break; -// case NS_rtf::LN_FNORESTART: break; -// case NS_rtf::LN_FPREV: break; -// case NS_rtf::LN_FPREVSPACE: break; -// case NS_rtf::LN_FWORD6: break; -// case NS_rtf::LN_UNUSED5_7: break; -// case NS_rtf::LN_RGBXCHNUMS: break; -// case NS_rtf::LN_IXCHFOLLOW: break; -// case NS_rtf::LN_DXASPACE: break; -// case NS_rtf::LN_DXAINDENT: break; -// case NS_rtf::LN_CBGRPPRLCHPX: break; -// case NS_rtf::LN_CBGRPPRLPAPX: break; - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_rtf::LN_LSID: + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->nListId = nIntValue; break; -// case NS_rtf::LN_TPLC: break; -// case NS_rtf::LN_RGISTD: break; -// case NS_rtf::LN_FSIMPLELIST: break; -// case NS_rtf::LN_FRESTARTHDN: break; -// case NS_rtf::LN_UNSIGNED26_2: break; -// case NS_rtf::LN_UNSIGNED4_6: break; - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ - case NS_rtf::LN_UNUSED4: - /* WRITERFILTERSTATUS: done: 1, planned: 0, spent: 0 */ - case NS_rtf::LN_UNUSED8: - // as the names state they are unused - break; + case NS_rtf::LN_clfolvl: /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ - case NS_rtf::LN_CLFOLVL: m_pImpl->m_pCurrentEntry->nCLFOLevel = nIntValue; break; -// case NS_rtf::LN_CBFFNM1: break; -// case NS_rtf::LN_PRQ: break; -// case NS_rtf::LN_FTRUETYPE: break; -// case NS_rtf::LN_UNUSED1_3: break; -// case NS_rtf::LN_FF: break; -// case NS_rtf::LN_UNUSED1_7: break; -// case NS_rtf::LN_WWEIGHT: break; -// case NS_rtf::LN_CHS: break; -// case NS_rtf::LN_IXCHSZALT: break; -// case NS_rtf::LN_PANOSE: break; -// case NS_rtf::LN_FS: break; -// case NS_rtf::LN_STI: break; -// case NS_rtf::LN_FSCRATCH: break; -// case NS_rtf::LN_FINVALHEIGHT: break; -// case NS_rtf::LN_FHASUPE: break; -// case NS_rtf::LN_FMASSCOPY: break; -// case NS_rtf::LN_SGC: break; -// case NS_rtf::LN_ISTDBASE: break; -// case NS_rtf::LN_CUPX: break; -// case NS_rtf::LN_ISTDNEXT: break; -// case NS_rtf::LN_BCHUPE: break; -// case NS_rtf::LN_FAUTOREDEF: break; -// case NS_rtf::LN_FHIDDEN: break; -// case NS_rtf::LN_UNUSED8_3: break; -// case NS_rtf::LN_CSTD: break; -// case NS_rtf::LN_CBSTDBASEINFILE: break; -// case NS_rtf::LN_FSTDSTYLENAMESWRITTEN: break; -// case NS_rtf::LN_UNUSED4_2: break; -// case NS_rtf::LN_STIMAXWHENSAVED: break; -// case NS_rtf::LN_ISTDMAXFIXEDWHENSAVED: break; -// case NS_rtf::LN_NVERBUILTINNAMESWHENSAVED: break; -// case NS_rtf::LN_RGFTCSTANDARDCHPSTSH: break; -// case NS_rtf::LN_WIDENT: break; -// case NS_rtf::LN_NFIB: break; -// case NS_rtf::LN_NPRODUCT: break; -// case NS_rtf::LN_LID: break; -// case NS_rtf::LN_PNNEXT: break; -// case NS_rtf::LN_FDOT: break; -// case NS_rtf::LN_FGLSY: break; -// case NS_rtf::LN_FCOMPLEX: break; -// case NS_rtf::LN_FHASPIC: break; -// case NS_rtf::LN_CQUICKSAVES: break; -// case NS_rtf::LN_FENCRYPTED: break; -// case NS_rtf::LN_FWHICHTBLSTM: break; -// case NS_rtf::LN_FREADONLYRECOMMENDED: break; -// case NS_rtf::LN_FWRITERESERVATION: break; -// case NS_rtf::LN_FEXTCHAR: break; -// case NS_rtf::LN_FLOADOVERRIDE: break; -// case NS_rtf::LN_FFAREAST: break; -// case NS_rtf::LN_FCRYPTO: break; -// case NS_rtf::LN_NFIBBACK: break; -// case NS_rtf::LN_LKEY: break; -// case NS_rtf::LN_ENVR: break; -// case NS_rtf::LN_FMAC: break; -// case NS_rtf::LN_FEMPTYSPECIAL: break; -// case NS_rtf::LN_FLOADOVERRIDEPAGE: break; -// case NS_rtf::LN_FFUTURESAVEDUNDO: break; -// case NS_rtf::LN_FWORD97SAVED: break; -// case NS_rtf::LN_FSPARE0: break; -// case NS_rtf::LN_CHSTABLES: break; -// case NS_rtf::LN_FCMIN: break; -// case NS_rtf::LN_FCMAC: break; -// case NS_rtf::LN_CSW: break; -// case NS_rtf::LN_WMAGICCREATED: break; -// case NS_rtf::LN_WMAGICREVISED: break; -// case NS_rtf::LN_WMAGICCREATEDPRIVATE: break; -// case NS_rtf::LN_WMAGICREVISEDPRIVATE: break; -// case NS_rtf::LN_PNFBPCHPFIRST_W6: break; -// case NS_rtf::LN_PNCHPFIRST_W6: break; -// case NS_rtf::LN_CPNBTECHP_W6: break; -// case NS_rtf::LN_PNFBPPAPFIRST_W6: break; -// case NS_rtf::LN_PNPAPFIRST_W6: break; -// case NS_rtf::LN_CPNBTEPAP_W6: break; -// case NS_rtf::LN_PNFBPLVCFIRST_W6: break; -// case NS_rtf::LN_PNLVCFIRST_W6: break; -// case NS_rtf::LN_CPNBTELVC_W6: break; -// case NS_rtf::LN_LIDFE: break; -// case NS_rtf::LN_CLW: break; -// case NS_rtf::LN_CBMAC: break; -// case NS_rtf::LN_LPRODUCTCREATED: break; -// case NS_rtf::LN_LPRODUCTREVISED: break; -// case NS_rtf::LN_CCPTEXT: break; -// case NS_rtf::LN_CCPFTN: break; -// case NS_rtf::LN_CCPHDD: break; -// case NS_rtf::LN_CCPMCR: break; -// case NS_rtf::LN_CCPATN: break; -// case NS_rtf::LN_CCPEDN: break; -// case NS_rtf::LN_CCPTXBX: break; -// case NS_rtf::LN_CCPHDRTXBX: break; -// case NS_rtf::LN_PNFBPCHPFIRST: break; -// case NS_rtf::LN_PNCHPFIRST: break; -// case NS_rtf::LN_CPNBTECHP: break; -// case NS_rtf::LN_PNFBPPAPFIRST: break; -// case NS_rtf::LN_PNPAPFIRST: break; -// case NS_rtf::LN_CPNBTEPAP: break; -// case NS_rtf::LN_PNFBPLVCFIRST: break; -// case NS_rtf::LN_PNLVCFIRST: break; -// case NS_rtf::LN_CPNBTELVC: break; -// case NS_rtf::LN_FCISLANDFIRST: break; -// case NS_rtf::LN_FCISLANDLIM: break; -// case NS_rtf::LN_CFCLCB: break; -// case NS_rtf::LN_FCSTSHFORIG: break; -// case NS_rtf::LN_LCBSTSHFORIG: break; -// case NS_rtf::LN_FCSTSHF: break; -// case NS_rtf::LN_LCBSTSHF: break; -// case NS_rtf::LN_FCPLCFFNDREF: break; -// case NS_rtf::LN_LCBPLCFFNDREF: break; -// case NS_rtf::LN_FCPLCFFNDTXT: break; -// case NS_rtf::LN_LCBPLCFFNDTXT: break; -// case NS_rtf::LN_FCPLCFANDREF: break; -// case NS_rtf::LN_LCBPLCFANDREF: break; -// case NS_rtf::LN_FCPLCFANDTXT: break; -// case NS_rtf::LN_LCBPLCFANDTXT: break; -// case NS_rtf::LN_FCPLCFSED: break; -// case NS_rtf::LN_LCBPLCFSED: break; -// case NS_rtf::LN_FCPLCFPAD: break; -// case NS_rtf::LN_LCBPLCFPAD: break; -// case NS_rtf::LN_FCPLCFPHE: break; -// case NS_rtf::LN_LCBPLCFPHE: break; -// case NS_rtf::LN_FCSTTBFGLSY: break; -// case NS_rtf::LN_LCBSTTBFGLSY: break; -// case NS_rtf::LN_FCPLCFGLSY: break; -// case NS_rtf::LN_LCBPLCFGLSY: break; -// case NS_rtf::LN_FCPLCFHDD: break; -// case NS_rtf::LN_LCBPLCFHDD: break; -// case NS_rtf::LN_FCPLCFBTECHPX: break; -// case NS_rtf::LN_LCBPLCFBTECHPX: break; -// case NS_rtf::LN_FCPLCFBTEPAPX: break; -// case NS_rtf::LN_LCBPLCFBTEPAPX: break; -// case NS_rtf::LN_FCPLCFSEA: break; -// case NS_rtf::LN_LCBPLCFSEA: break; -// case NS_rtf::LN_FCSTTBFFFN: break; -// case NS_rtf::LN_LCBSTTBFFFN: break; -// case NS_rtf::LN_FCPLCFFLDMOM: break; -// case NS_rtf::LN_LCBPLCFFLDMOM: break; -// case NS_rtf::LN_FCPLCFFLDHDR: break; -// case NS_rtf::LN_LCBPLCFFLDHDR: break; -// case NS_rtf::LN_FCPLCFFLDFTN: break; -// case NS_rtf::LN_LCBPLCFFLDFTN: break; -// case NS_rtf::LN_FCPLCFFLDATN: break; -// case NS_rtf::LN_LCBPLCFFLDATN: break; -// case NS_rtf::LN_FCPLCFFLDMCR: break; -// case NS_rtf::LN_LCBPLCFFLDMCR: break; -// case NS_rtf::LN_FCSTTBFBKMK: break; -// case NS_rtf::LN_LCBSTTBFBKMK: break; -// case NS_rtf::LN_FCPLCFBKF: break; -// case NS_rtf::LN_LCBPLCFBKF: break; -// case NS_rtf::LN_FCPLCFBKL: break; -// case NS_rtf::LN_LCBPLCFBKL: break; -// case NS_rtf::LN_FCCMDS: break; -// case NS_rtf::LN_LCBCMDS: break; -// case NS_rtf::LN_FCPLCMCR: break; -// case NS_rtf::LN_LCBPLCMCR: break; -// case NS_rtf::LN_FCSTTBFMCR: break; -// case NS_rtf::LN_LCBSTTBFMCR: break; -// case NS_rtf::LN_FCPRDRVR: break; -// case NS_rtf::LN_LCBPRDRVR: break; -// case NS_rtf::LN_FCPRENVPORT: break; -// case NS_rtf::LN_LCBPRENVPORT: break; -// case NS_rtf::LN_FCPRENVLAND: break; -// case NS_rtf::LN_LCBPRENVLAND: break; -// case NS_rtf::LN_FCWSS: break; -// case NS_rtf::LN_LCBWSS: break; -// case NS_rtf::LN_FCDOP: break; -// case NS_rtf::LN_LCBDOP: break; -// case NS_rtf::LN_FCSTTBFASSOC: break; -// case NS_rtf::LN_LCBSTTBFASSOC: break; -// case NS_rtf::LN_FCCLX: break; -// case NS_rtf::LN_LCBCLX: break; -// case NS_rtf::LN_FCPLCFPGDFTN: break; -// case NS_rtf::LN_LCBPLCFPGDFTN: break; -// case NS_rtf::LN_FCAUTOSAVESOURCE: break; -// case NS_rtf::LN_LCBAUTOSAVESOURCE: break; -// case NS_rtf::LN_FCGRPXSTATNOWNERS: break; -// case NS_rtf::LN_LCBGRPXSTATNOWNERS: break; -// case NS_rtf::LN_FCSTTBFATNBKMK: break; -// case NS_rtf::LN_LCBSTTBFATNBKMK: break; -// case NS_rtf::LN_FCPLCDOAMOM: break; -// case NS_rtf::LN_LCBPLCDOAMOM: break; -// case NS_rtf::LN_FCPLCDOAHDR: break; -// case NS_rtf::LN_LCBPLCDOAHDR: break; -// case NS_rtf::LN_FCPLCSPAMOM: break; -// case NS_rtf::LN_LCBPLCSPAMOM: break; -// case NS_rtf::LN_FCPLCSPAHDR: break; -// case NS_rtf::LN_LCBPLCSPAHDR: break; -// case NS_rtf::LN_FCPLCFATNBKF: break; -// case NS_rtf::LN_LCBPLCFATNBKF: break; -// case NS_rtf::LN_FCPLCFATNBKL: break; -// case NS_rtf::LN_LCBPLCFATNBKL: break; -// case NS_rtf::LN_FCPMS: break; -// case NS_rtf::LN_LCBPMS: break; -// case NS_rtf::LN_FCFORMFLDSTTBF: break; -// case NS_rtf::LN_LCBFORMFLDSTTBF: break; -// case NS_rtf::LN_FCPLCFENDREF: break; -// case NS_rtf::LN_LCBPLCFENDREF: break; -// case NS_rtf::LN_FCPLCFENDTXT: break; -// case NS_rtf::LN_LCBPLCFENDTXT: break; -// case NS_rtf::LN_FCPLCFFLDEDN: break; -// case NS_rtf::LN_LCBPLCFFLDEDN: break; -// case NS_rtf::LN_FCPLCFPGDEDN: break; -// case NS_rtf::LN_LCBPLCFPGDEDN: break; -// case NS_rtf::LN_FCDGGINFO: break; -// case NS_rtf::LN_LCBDGGINFO: break; -// case NS_rtf::LN_FCSTTBFRMARK: break; -// case NS_rtf::LN_LCBSTTBFRMARK: break; -// case NS_rtf::LN_FCSTTBFCAPTION: break; -// case NS_rtf::LN_LCBSTTBFCAPTION: break; -// case NS_rtf::LN_FCSTTBFAUTOCAPTION: break; -// case NS_rtf::LN_LCBSTTBFAUTOCAPTION: break; -// case NS_rtf::LN_FCPLCFWKB: break; -// case NS_rtf::LN_LCBPLCFWKB: break; -// case NS_rtf::LN_FCPLCFSPL: break; -// case NS_rtf::LN_LCBPLCFSPL: break; -// case NS_rtf::LN_FCPLCFTXBXTXT: break; -// case NS_rtf::LN_LCBPLCFTXBXTXT: break; -// case NS_rtf::LN_FCPLCFFLDTXBX: break; -// case NS_rtf::LN_LCBPLCFFLDTXBX: break; -// case NS_rtf::LN_FCPLCFHDRTXBXTXT: break; -// case NS_rtf::LN_LCBPLCFHDRTXBXTXT: break; -// case NS_rtf::LN_FCPLCFFLDHDRTXBX: break; -// case NS_rtf::LN_LCBPLCFFLDHDRTXBX: break; -// case NS_rtf::LN_FCSTWUSER: break; -// case NS_rtf::LN_LCBSTWUSER: break; -// case NS_rtf::LN_FCSTTBTTMBD: break; -// case NS_rtf::LN_LCBSTTBTTMBD: break; -// case NS_rtf::LN_FCUNUSED: break; -// case NS_rtf::LN_LCBUNUSED: break; -// case NS_rtf::LN_FCPGDMOTHER: break; -// case NS_rtf::LN_LCBPGDMOTHER: break; -// case NS_rtf::LN_FCBKDMOTHER: break; -// case NS_rtf::LN_LCBBKDMOTHER: break; -// case NS_rtf::LN_FCPGDFTN: break; -// case NS_rtf::LN_LCBPGDFTN: break; -// case NS_rtf::LN_FCBKDFTN: break; -// case NS_rtf::LN_LCBBKDFTN: break; -// case NS_rtf::LN_FCPGDEDN: break; -// case NS_rtf::LN_LCBPGDEDN: break; -// case NS_rtf::LN_FCBKDEDN: break; -// case NS_rtf::LN_LCBBKDEDN: break; -// case NS_rtf::LN_FCSTTBFINTLFLD: break; -// case NS_rtf::LN_LCBSTTBFINTLFLD: break; -// case NS_rtf::LN_FCROUTESLIP: break; -// case NS_rtf::LN_LCBROUTESLIP: break; -// case NS_rtf::LN_FCSTTBSAVEDBY: break; -// case NS_rtf::LN_LCBSTTBSAVEDBY: break; -// case NS_rtf::LN_FCSTTBFNM: break; -// case NS_rtf::LN_LCBSTTBFNM: break; -// case NS_rtf::LN_FCPLCFLST: break; -// case NS_rtf::LN_LCBPLCFLST: break; -// case NS_rtf::LN_FCPLFLFO: break; -// case NS_rtf::LN_LCBPLFLFO: break; -// case NS_rtf::LN_FCPLCFTXBXBKD: break; -// case NS_rtf::LN_LCBPLCFTXBXBKD: break; -// case NS_rtf::LN_FCPLCFTXBXHDRBKD: break; -// case NS_rtf::LN_LCBPLCFTXBXHDRBKD: break; -// case NS_rtf::LN_FCDOCUNDO: break; -// case NS_rtf::LN_LCBDOCUNDO: break; -// case NS_rtf::LN_FCRGBUSE: break; -// case NS_rtf::LN_LCBRGBUSE: break; -// case NS_rtf::LN_FCUSP: break; -// case NS_rtf::LN_LCBUSP: break; -// case NS_rtf::LN_FCUSKF: break; -// case NS_rtf::LN_LCBUSKF: break; -// case NS_rtf::LN_FCPLCUPCRGBUSE: break; -// case NS_rtf::LN_LCBPLCUPCRGBUSE: break; -// case NS_rtf::LN_FCPLCUPCUSP: break; -// case NS_rtf::LN_LCBPLCUPCUSP: break; -// case NS_rtf::LN_FCSTTBGLSYSTYLE: break; -// case NS_rtf::LN_LCBSTTBGLSYSTYLE: break; -// case NS_rtf::LN_FCPLGOSL: break; -// case NS_rtf::LN_LCBPLGOSL: break; -// case NS_rtf::LN_FCPLCOCX: break; -// case NS_rtf::LN_LCBPLCOCX: break; -// case NS_rtf::LN_FCPLCFBTELVC: break; -// case NS_rtf::LN_LCBPLCFBTELVC: break; -// case NS_rtf::LN_DWLOWDATETIME: break; -// case NS_rtf::LN_DWHIGHDATETIME: break; -// case NS_rtf::LN_FCPLCFLVC: break; -// case NS_rtf::LN_LCBPLCFLVC: break; -// case NS_rtf::LN_FCPLCASUMY: break; -// case NS_rtf::LN_LCBPLCASUMY: break; -// case NS_rtf::LN_FCPLCFGRAM: break; -// case NS_rtf::LN_LCBPLCFGRAM: break; -// case NS_rtf::LN_FCSTTBLISTNAMES: break; -// case NS_rtf::LN_LCBSTTBLISTNAMES: break; -// case NS_rtf::LN_FCSTTBFUSSR: break; -// case NS_rtf::LN_LCBSTTBFUSSR: break; -// case NS_rtf::LN_FN: break; -// case NS_rtf::LN_FCSEPX: break; -// case NS_rtf::LN_FNMPR: break; -// case NS_rtf::LN_FCMPR: break; -// case NS_rtf::LN_ICOFORE: break; -// case NS_rtf::LN_ICOBACK: break; -// case NS_rtf::LN_IPAT: break; -// case NS_rtf::LN_SHDFORECOLOR: break; -// case NS_rtf::LN_SHDBACKCOLOR: break; -// case NS_rtf::LN_SHDPATTERN: break; -// case NS_rtf::LN_DPTLINEWIDTH: break; -// case NS_rtf::LN_BRCTYPE: break; -// case NS_rtf::LN_ICO: break; -// case NS_rtf::LN_DPTSPACE: break; -// case NS_rtf::LN_FSHADOW: break; -// case NS_rtf::LN_FFRAME: break; -// case NS_rtf::LN_UNUSED2_15: break; -// case NS_rtf::LN_FFIRSTMERGED: break; -// case NS_rtf::LN_FMERGED: break; -// case NS_rtf::LN_FVERTICAL: break; -// case NS_rtf::LN_FBACKWARD: break; -// case NS_rtf::LN_FROTATEFONT: break; -// case NS_rtf::LN_FVERTMERGE: break; -// case NS_rtf::LN_FVERTRESTART: break; -// case NS_rtf::LN_VERTALIGN: break; -// case NS_rtf::LN_FUNUSED: break; -// case NS_rtf::LN_WUNUSED: break; -// case NS_rtf::LN_BRCTOP: break; -// case NS_rtf::LN_BRCLEFT: break; -// case NS_rtf::LN_BRCBOTTOM: break; -// case NS_rtf::LN_BRCRIGHT: break; -// case NS_rtf::LN_IBKL: break; -// case NS_rtf::LN_ITCFIRST: break; -// case NS_rtf::LN_FPUB: break; -// case NS_rtf::LN_ITCLIM: break; -// case NS_rtf::LN_FCOL: break; -// case NS_rtf::LN_LINECOLOR: break; -// case NS_rtf::LN_LINEWIDTH: break; -// case NS_rtf::LN_LINETYPE: break; -// case NS_rtf::LN_MM: break; -// case NS_rtf::LN_XEXT: break; -// case NS_rtf::LN_YEXT: break; -// case NS_rtf::LN_HMF: break; -// case NS_rtf::LN_LCB: break; -// case NS_rtf::LN_CBHEADER: break; -// case NS_rtf::LN_MFP: break; -// case NS_rtf::LN_BM_RCWINMF: break; -// case NS_rtf::LN_DXAGOAL: break; -// case NS_rtf::LN_DYAGOAL: break; -// case NS_rtf::LN_MX: break; -// case NS_rtf::LN_MY: break; -// case NS_rtf::LN_DXACROPLEFT: break; -// case NS_rtf::LN_DYACROPTOP: break; -// case NS_rtf::LN_DXACROPRIGHT: break; -// case NS_rtf::LN_DYACROPBOTTOM: break; -// case NS_rtf::LN_BRCL: break; -// case NS_rtf::LN_FFRAMEEMPTY: break; -// case NS_rtf::LN_FBITMAP: break; -// case NS_rtf::LN_FDRAWHATCH: break; -// case NS_rtf::LN_FERROR: break; -// case NS_rtf::LN_BPP: break; -// case NS_rtf::LN_DXAORIGIN: break; -// case NS_rtf::LN_DYAORIGIN: break; -// case NS_rtf::LN_CPROPS: break; -// case NS_rtf::LN_LINEPROPSTOP: break; -// case NS_rtf::LN_LINEPROPSLEFT: break; -// case NS_rtf::LN_LINEPROPSBOTTOM: break; -// case NS_rtf::LN_LINEPROPSRIGHT: break; -// case NS_rtf::LN_LINEPROPSHORIZONTAL: break; -// case NS_rtf::LN_LINEPROPSVERTICAL: break; -// case NS_rtf::LN_headerr: break; -// case NS_rtf::LN_footerr: break; -// case NS_rtf::LN_endnote: break; -// case NS_rtf::LN_BOOKMARKNAME: break; - -// case NS_rtf::LN_LISTLEVEL: break; - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ - case NS_rtf::LN_LFO: +#if 0 + case NS_rtf::LN_LFOLevel: + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties; if(m_pImpl->m_pCurrentEntry && (pProperties = val.getProperties()).get()) @@ -531,27 +144,7 @@ void LFOTable::attribute(Id Name, Value & val) } } break; -// case NS_rtf::LN_F: break; -// case NS_rtf::LN_ALTFONTNAME: break; -// case NS_rtf::LN_XSZFFN: break; -// case NS_rtf::LN_XSTZNAME: break; -// case NS_rtf::LN_XSTZNAME1: break; -// case NS_rtf::LN_UPXSTART: break; -// case NS_rtf::LN_UPX: break; -// case NS_rtf::LN_sed: break; -// case NS_rtf::LN_picf: break; -// case NS_rtf::LN_rgbrc: break; -// case NS_rtf::LN_shd: break; -// case NS_rtf::LN_cellShd: break; -// case NS_rtf::LN_cellTopColor: break; -// case NS_rtf::LN_cellLeftColor: break; -// case NS_rtf::LN_cellBottomColor: break; -// case NS_rtf::LN_cellRightColor: break; - -// case NS_rtf::LN_LISTTABLE: break; -// case NS_rtf::LN_LFOTABLE: break; -// case NS_rtf::LN_FONTTABLE: break; -// case NS_rtf::LN_STYLESHEET: break; +#endif default: { OSL_ENSURE( false, "LFOTable::attribute: default statement"); diff --git a/writerfilter/source/dmapper/ListTable.cxx b/writerfilter/source/dmapper/ListTable.cxx index bd3c9da4e567..36cb4d8bdb47 100644 --- a/writerfilter/source/dmapper/ListTable.cxx +++ b/writerfilter/source/dmapper/ListTable.cxx @@ -340,13 +340,13 @@ void ListTable::attribute(Id nName, Value & rVal) /* WRITERFILTERSTATUS: table: ListTable_attributedata */ switch(nName) { - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_rtf::LN_RGBXCHNUMS: + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get()) m_pImpl->m_pCurrentEntry->pCurrentProperties->sRGBXchNums += rVal.getString(); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_LevelText_val: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ { //this strings contains the definition of the level //the level number is marked as %n @@ -360,429 +360,45 @@ void ListTable::attribute(Id nName, Value & rVal) } break; // case NS_rtf::LN_ISTD: break; - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_ISTARTAT: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_NFC: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_JC: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_FLEGAL: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_FNORESTART: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_FPREV: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_FPREVSPACE: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_FWORD6: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ + case NS_rtf::LN_FIDENTSAV: + case NS_rtf::LN_FCONVERTED: + case NS_rtf::LN_FTENTATIVE: case NS_rtf::LN_IXCHFOLLOW: + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ ApplyLevelValues( nName, nIntValue); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_rtf::LN_UNUSED5_7: - //unused - break; -// case NS_rtf::LN_DXASPACE: break; -// case NS_rtf::LN_DXAINDENT: break; -// case NS_rtf::LN_CBGRPPRLCHPX: break; -// case NS_rtf::LN_CBGRPPRLPAPX: break; - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_LSID: + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->nListId = nIntValue; break; - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_TPLC: + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->nTPLC = nIntValue; break; - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_RGISTD: + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->sRGISTD += rVal.getString(); break; - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_FSIMPLELIST: + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->nSimpleList = nIntValue; break; + case NS_rtf::LN_fAutoNum: /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_FRESTARTHDN: m_pImpl->m_pCurrentEntry->nRestart = nIntValue; break; + case NS_rtf::LN_fHybrid: /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_UNSIGNED26_2: m_pImpl->m_pCurrentEntry->nUnsigned = nIntValue; break; -// case NS_rtf::LN_ILVL: break; -// case NS_rtf::LN_FSTARTAT: break; -// case NS_rtf::LN_FFORMATTING: break; -// case NS_rtf::LN_UNSIGNED4_6: break; -// case NS_rtf::LN_UNUSED4: break; -// case NS_rtf::LN_UNUSED8: break; -// case NS_rtf::LN_CLFOLVL: break; -// case NS_rtf::LN_CBFFNM1: break; -// case NS_rtf::LN_PRQ: break; -// case NS_rtf::LN_FTRUETYPE: break; -// case NS_rtf::LN_UNUSED1_3: break; -// case NS_rtf::LN_FF: break; -// case NS_rtf::LN_UNUSED1_7: break; -// case NS_rtf::LN_WWEIGHT: break; -// case NS_rtf::LN_CHS: break; -// case NS_rtf::LN_IXCHSZALT: break; -// case NS_rtf::LN_PANOSE: break; -// case NS_rtf::LN_FS: break; -// case NS_rtf::LN_STI: break; -// case NS_rtf::LN_FSCRATCH: break; -// case NS_rtf::LN_FINVALHEIGHT: break; -// case NS_rtf::LN_FHASUPE: break; -// case NS_rtf::LN_FMASSCOPY: break; -// case NS_rtf::LN_SGC: break; -// case NS_rtf::LN_ISTDBASE: break; -// case NS_rtf::LN_CUPX: break; -// case NS_rtf::LN_ISTDNEXT: break; -// case NS_rtf::LN_BCHUPE: break; -// case NS_rtf::LN_FAUTOREDEF: break; -// case NS_rtf::LN_FHIDDEN: break; -// case NS_rtf::LN_UNUSED8_3: break; -// case NS_rtf::LN_CSTD: break; -// case NS_rtf::LN_CBSTDBASEINFILE: break; -// case NS_rtf::LN_FSTDSTYLENAMESWRITTEN: break; -// case NS_rtf::LN_UNUSED4_2: break; -// case NS_rtf::LN_STIMAXWHENSAVED: break; -// case NS_rtf::LN_ISTDMAXFIXEDWHENSAVED: break; -// case NS_rtf::LN_NVERBUILTINNAMESWHENSAVED: break; -// case NS_rtf::LN_RGFTCSTANDARDCHPSTSH: break; -// case NS_rtf::LN_WIDENT: break; -// case NS_rtf::LN_NFIB: break; -// case NS_rtf::LN_NPRODUCT: break; -// case NS_rtf::LN_LID: break; -// case NS_rtf::LN_PNNEXT: break; -// case NS_rtf::LN_FDOT: break; -// case NS_rtf::LN_FGLSY: break; -// case NS_rtf::LN_FCOMPLEX: break; -// case NS_rtf::LN_FHASPIC: break; -// case NS_rtf::LN_CQUICKSAVES: break; -// case NS_rtf::LN_FENCRYPTED: break; -// case NS_rtf::LN_FWHICHTBLSTM: break; -// case NS_rtf::LN_FREADONLYRECOMMENDED: break; -// case NS_rtf::LN_FWRITERESERVATION: break; -// case NS_rtf::LN_FEXTCHAR: break; -// case NS_rtf::LN_FLOADOVERRIDE: break; -// case NS_rtf::LN_FFAREAST: break; -// case NS_rtf::LN_FCRYPTO: break; -// case NS_rtf::LN_NFIBBACK: break; -// case NS_rtf::LN_LKEY: break; -// case NS_rtf::LN_ENVR: break; -// case NS_rtf::LN_FMAC: break; -// case NS_rtf::LN_FEMPTYSPECIAL: break; -// case NS_rtf::LN_FLOADOVERRIDEPAGE: break; -// case NS_rtf::LN_FFUTURESAVEDUNDO: break; -// case NS_rtf::LN_FWORD97SAVED: break; -// case NS_rtf::LN_FSPARE0: break; -// case NS_rtf::LN_CHSTABLES: break; -// case NS_rtf::LN_FCMIN: break; -// case NS_rtf::LN_FCMAC: break; -// case NS_rtf::LN_CSW: break; -// case NS_rtf::LN_WMAGICCREATED: break; -// case NS_rtf::LN_WMAGICREVISED: break; -// case NS_rtf::LN_WMAGICCREATEDPRIVATE: break; -// case NS_rtf::LN_WMAGICREVISEDPRIVATE: break; -// case NS_rtf::LN_PNFBPCHPFIRST_W6: break; -// case NS_rtf::LN_PNCHPFIRST_W6: break; -// case NS_rtf::LN_CPNBTECHP_W6: break; -// case NS_rtf::LN_PNFBPPAPFIRST_W6: break; -// case NS_rtf::LN_PNPAPFIRST_W6: break; -// case NS_rtf::LN_CPNBTEPAP_W6: break; -// case NS_rtf::LN_PNFBPLVCFIRST_W6: break; -// case NS_rtf::LN_PNLVCFIRST_W6: break; -// case NS_rtf::LN_CPNBTELVC_W6: break; -// case NS_rtf::LN_LIDFE: break; -// case NS_rtf::LN_CLW: break; -// case NS_rtf::LN_CBMAC: break; -// case NS_rtf::LN_LPRODUCTCREATED: break; -// case NS_rtf::LN_LPRODUCTREVISED: break; -// case NS_rtf::LN_CCPTEXT: break; -// case NS_rtf::LN_CCPFTN: break; -// case NS_rtf::LN_CCPHDD: break; -// case NS_rtf::LN_CCPMCR: break; -// case NS_rtf::LN_CCPATN: break; -// case NS_rtf::LN_CCPEDN: break; -// case NS_rtf::LN_CCPTXBX: break; -// case NS_rtf::LN_CCPHDRTXBX: break; -// case NS_rtf::LN_PNFBPCHPFIRST: break; -// case NS_rtf::LN_PNCHPFIRST: break; -// case NS_rtf::LN_CPNBTECHP: break; -// case NS_rtf::LN_PNFBPPAPFIRST: break; -// case NS_rtf::LN_PNPAPFIRST: break; -// case NS_rtf::LN_CPNBTEPAP: break; -// case NS_rtf::LN_PNFBPLVCFIRST: break; -// case NS_rtf::LN_PNLVCFIRST: break; -// case NS_rtf::LN_CPNBTELVC: break; -// case NS_rtf::LN_FCISLANDFIRST: break; -// case NS_rtf::LN_FCISLANDLIM: break; -// case NS_rtf::LN_CFCLCB: break; -// case NS_rtf::LN_FCSTSHFORIG: break; -// case NS_rtf::LN_LCBSTSHFORIG: break; -// case NS_rtf::LN_FCSTSHF: break; -// case NS_rtf::LN_LCBSTSHF: break; -// case NS_rtf::LN_FCPLCFFNDREF: break; -// case NS_rtf::LN_LCBPLCFFNDREF: break; -// case NS_rtf::LN_FCPLCFFNDTXT: break; -// case NS_rtf::LN_LCBPLCFFNDTXT: break; -// case NS_rtf::LN_FCPLCFANDREF: break; -// case NS_rtf::LN_LCBPLCFANDREF: break; -// case NS_rtf::LN_FCPLCFANDTXT: break; -// case NS_rtf::LN_LCBPLCFANDTXT: break; -// case NS_rtf::LN_FCPLCFSED: break; -// case NS_rtf::LN_LCBPLCFSED: break; -// case NS_rtf::LN_FCPLCFPAD: break; -// case NS_rtf::LN_LCBPLCFPAD: break; -// case NS_rtf::LN_FCPLCFPHE: break; -// case NS_rtf::LN_LCBPLCFPHE: break; -// case NS_rtf::LN_FCSTTBFGLSY: break; -// case NS_rtf::LN_LCBSTTBFGLSY: break; -// case NS_rtf::LN_FCPLCFGLSY: break; -// case NS_rtf::LN_LCBPLCFGLSY: break; -// case NS_rtf::LN_FCPLCFHDD: break; -// case NS_rtf::LN_LCBPLCFHDD: break; -// case NS_rtf::LN_FCPLCFBTECHPX: break; -// case NS_rtf::LN_LCBPLCFBTECHPX: break; -// case NS_rtf::LN_FCPLCFBTEPAPX: break; -// case NS_rtf::LN_LCBPLCFBTEPAPX: break; -// case NS_rtf::LN_FCPLCFSEA: break; -// case NS_rtf::LN_LCBPLCFSEA: break; -// case NS_rtf::LN_FCSTTBFFFN: break; -// case NS_rtf::LN_LCBSTTBFFFN: break; -// case NS_rtf::LN_FCPLCFFLDMOM: break; -// case NS_rtf::LN_LCBPLCFFLDMOM: break; -// case NS_rtf::LN_FCPLCFFLDHDR: break; -// case NS_rtf::LN_LCBPLCFFLDHDR: break; -// case NS_rtf::LN_FCPLCFFLDFTN: break; -// case NS_rtf::LN_LCBPLCFFLDFTN: break; -// case NS_rtf::LN_FCPLCFFLDATN: break; -// case NS_rtf::LN_LCBPLCFFLDATN: break; -// case NS_rtf::LN_FCPLCFFLDMCR: break; -// case NS_rtf::LN_LCBPLCFFLDMCR: break; -// case NS_rtf::LN_FCSTTBFBKMK: break; -// case NS_rtf::LN_LCBSTTBFBKMK: break; -// case NS_rtf::LN_FCPLCFBKF: break; -// case NS_rtf::LN_LCBPLCFBKF: break; -// case NS_rtf::LN_FCPLCFBKL: break; -// case NS_rtf::LN_LCBPLCFBKL: break; -// case NS_rtf::LN_FCCMDS: break; -// case NS_rtf::LN_LCBCMDS: break; -// case NS_rtf::LN_FCPLCMCR: break; -// case NS_rtf::LN_LCBPLCMCR: break; -// case NS_rtf::LN_FCSTTBFMCR: break; -// case NS_rtf::LN_LCBSTTBFMCR: break; -// case NS_rtf::LN_FCPRDRVR: break; -// case NS_rtf::LN_LCBPRDRVR: break; -// case NS_rtf::LN_FCPRENVPORT: break; -// case NS_rtf::LN_LCBPRENVPORT: break; -// case NS_rtf::LN_FCPRENVLAND: break; -// case NS_rtf::LN_LCBPRENVLAND: break; -// case NS_rtf::LN_FCWSS: break; -// case NS_rtf::LN_LCBWSS: break; -// case NS_rtf::LN_FCDOP: break; -// case NS_rtf::LN_LCBDOP: break; -// case NS_rtf::LN_FCSTTBFASSOC: break; -// case NS_rtf::LN_LCBSTTBFASSOC: break; -// case NS_rtf::LN_FCCLX: break; -// case NS_rtf::LN_LCBCLX: break; -// case NS_rtf::LN_FCPLCFPGDFTN: break; -// case NS_rtf::LN_LCBPLCFPGDFTN: break; -// case NS_rtf::LN_FCAUTOSAVESOURCE: break; -// case NS_rtf::LN_LCBAUTOSAVESOURCE: break; -// case NS_rtf::LN_FCGRPXSTATNOWNERS: break; -// case NS_rtf::LN_LCBGRPXSTATNOWNERS: break; -// case NS_rtf::LN_FCSTTBFATNBKMK: break; -// case NS_rtf::LN_LCBSTTBFATNBKMK: break; -// case NS_rtf::LN_FCPLCDOAMOM: break; -// case NS_rtf::LN_LCBPLCDOAMOM: break; -// case NS_rtf::LN_FCPLCDOAHDR: break; -// case NS_rtf::LN_LCBPLCDOAHDR: break; -// case NS_rtf::LN_FCPLCSPAMOM: break; -// case NS_rtf::LN_LCBPLCSPAMOM: break; -// case NS_rtf::LN_FCPLCSPAHDR: break; -// case NS_rtf::LN_LCBPLCSPAHDR: break; -// case NS_rtf::LN_FCPLCFATNBKF: break; -// case NS_rtf::LN_LCBPLCFATNBKF: break; -// case NS_rtf::LN_FCPLCFATNBKL: break; -// case NS_rtf::LN_LCBPLCFATNBKL: break; -// case NS_rtf::LN_FCPMS: break; -// case NS_rtf::LN_LCBPMS: break; -// case NS_rtf::LN_FCFORMFLDSTTBF: break; -// case NS_rtf::LN_LCBFORMFLDSTTBF: break; -// case NS_rtf::LN_FCPLCFENDREF: break; -// case NS_rtf::LN_LCBPLCFENDREF: break; -// case NS_rtf::LN_FCPLCFENDTXT: break; -// case NS_rtf::LN_LCBPLCFENDTXT: break; -// case NS_rtf::LN_FCPLCFFLDEDN: break; -// case NS_rtf::LN_LCBPLCFFLDEDN: break; -// case NS_rtf::LN_FCPLCFPGDEDN: break; -// case NS_rtf::LN_LCBPLCFPGDEDN: break; -// case NS_rtf::LN_FCDGGINFO: break; -// case NS_rtf::LN_LCBDGGINFO: break; -// case NS_rtf::LN_FCSTTBFRMARK: break; -// case NS_rtf::LN_LCBSTTBFRMARK: break; -// case NS_rtf::LN_FCSTTBFCAPTION: break; -// case NS_rtf::LN_LCBSTTBFCAPTION: break; -// case NS_rtf::LN_FCSTTBFAUTOCAPTION: break; -// case NS_rtf::LN_LCBSTTBFAUTOCAPTION: break; -// case NS_rtf::LN_FCPLCFWKB: break; -// case NS_rtf::LN_LCBPLCFWKB: break; -// case NS_rtf::LN_FCPLCFSPL: break; -// case NS_rtf::LN_LCBPLCFSPL: break; -// case NS_rtf::LN_FCPLCFTXBXTXT: break; -// case NS_rtf::LN_LCBPLCFTXBXTXT: break; -// case NS_rtf::LN_FCPLCFFLDTXBX: break; -// case NS_rtf::LN_LCBPLCFFLDTXBX: break; -// case NS_rtf::LN_FCPLCFHDRTXBXTXT: break; -// case NS_rtf::LN_LCBPLCFHDRTXBXTXT: break; -// case NS_rtf::LN_FCPLCFFLDHDRTXBX: break; -// case NS_rtf::LN_LCBPLCFFLDHDRTXBX: break; -// case NS_rtf::LN_FCSTWUSER: break; -// case NS_rtf::LN_LCBSTWUSER: break; -// case NS_rtf::LN_FCSTTBTTMBD: break; -// case NS_rtf::LN_LCBSTTBTTMBD: break; -// case NS_rtf::LN_FCUNUSED: break; -// case NS_rtf::LN_LCBUNUSED: break; -// case NS_rtf::LN_FCPGDMOTHER: break; -// case NS_rtf::LN_LCBPGDMOTHER: break; -// case NS_rtf::LN_FCBKDMOTHER: break; -// case NS_rtf::LN_LCBBKDMOTHER: break; -// case NS_rtf::LN_FCPGDFTN: break; -// case NS_rtf::LN_LCBPGDFTN: break; -// case NS_rtf::LN_FCBKDFTN: break; -// case NS_rtf::LN_LCBBKDFTN: break; -// case NS_rtf::LN_FCPGDEDN: break; -// case NS_rtf::LN_LCBPGDEDN: break; -// case NS_rtf::LN_FCBKDEDN: break; -// case NS_rtf::LN_LCBBKDEDN: break; -// case NS_rtf::LN_FCSTTBFINTLFLD: break; -// case NS_rtf::LN_LCBSTTBFINTLFLD: break; -// case NS_rtf::LN_FCROUTESLIP: break; -// case NS_rtf::LN_LCBROUTESLIP: break; -// case NS_rtf::LN_FCSTTBSAVEDBY: break; -// case NS_rtf::LN_LCBSTTBSAVEDBY: break; -// case NS_rtf::LN_FCSTTBFNM: break; -// case NS_rtf::LN_LCBSTTBFNM: break; -// case NS_rtf::LN_FCPLCFLST: break; -// case NS_rtf::LN_LCBPLCFLST: break; -// case NS_rtf::LN_FCPLFLFO: break; -// case NS_rtf::LN_LCBPLFLFO: break; -// case NS_rtf::LN_FCPLCFTXBXBKD: break; -// case NS_rtf::LN_LCBPLCFTXBXBKD: break; -// case NS_rtf::LN_FCPLCFTXBXHDRBKD: break; -// case NS_rtf::LN_LCBPLCFTXBXHDRBKD: break; -// case NS_rtf::LN_FCDOCUNDO: break; -// case NS_rtf::LN_LCBDOCUNDO: break; -// case NS_rtf::LN_FCRGBUSE: break; -// case NS_rtf::LN_LCBRGBUSE: break; -// case NS_rtf::LN_FCUSP: break; -// case NS_rtf::LN_LCBUSP: break; -// case NS_rtf::LN_FCUSKF: break; -// case NS_rtf::LN_LCBUSKF: break; -// case NS_rtf::LN_FCPLCUPCRGBUSE: break; -// case NS_rtf::LN_LCBPLCUPCRGBUSE: break; -// case NS_rtf::LN_FCPLCUPCUSP: break; -// case NS_rtf::LN_LCBPLCUPCUSP: break; -// case NS_rtf::LN_FCSTTBGLSYSTYLE: break; -// case NS_rtf::LN_LCBSTTBGLSYSTYLE: break; -// case NS_rtf::LN_FCPLGOSL: break; -// case NS_rtf::LN_LCBPLGOSL: break; -// case NS_rtf::LN_FCPLCOCX: break; -// case NS_rtf::LN_LCBPLCOCX: break; -// case NS_rtf::LN_FCPLCFBTELVC: break; -// case NS_rtf::LN_LCBPLCFBTELVC: break; -// case NS_rtf::LN_DWLOWDATETIME: break; -// case NS_rtf::LN_DWHIGHDATETIME: break; -// case NS_rtf::LN_FCPLCFLVC: break; -// case NS_rtf::LN_LCBPLCFLVC: break; -// case NS_rtf::LN_FCPLCASUMY: break; -// case NS_rtf::LN_LCBPLCASUMY: break; -// case NS_rtf::LN_FCPLCFGRAM: break; -// case NS_rtf::LN_LCBPLCFGRAM: break; -// case NS_rtf::LN_FCSTTBLISTNAMES: break; -// case NS_rtf::LN_LCBSTTBLISTNAMES: break; -// case NS_rtf::LN_FCSTTBFUSSR: break; -// case NS_rtf::LN_LCBSTTBFUSSR: break; -// case NS_rtf::LN_FN: break; -// case NS_rtf::LN_FCSEPX: break; -// case NS_rtf::LN_FNMPR: break; -// case NS_rtf::LN_FCMPR: break; -// case NS_rtf::LN_ICOFORE: break; -// case NS_rtf::LN_ICOBACK: break; -// case NS_rtf::LN_IPAT: break; -// case NS_rtf::LN_SHDFORECOLOR: break; -// case NS_rtf::LN_SHDBACKCOLOR: break; -// case NS_rtf::LN_SHDPATTERN: break; -// case NS_rtf::LN_DPTLINEWIDTH: break; -// case NS_rtf::LN_BRCTYPE: break; -// case NS_rtf::LN_ICO: break; -// case NS_rtf::LN_DPTSPACE: break; -// case NS_rtf::LN_FSHADOW: break; -// case NS_rtf::LN_FFRAME: break; -// case NS_rtf::LN_UNUSED2_15: break; -// case NS_rtf::LN_FFIRSTMERGED: break; -// case NS_rtf::LN_FMERGED: break; -// case NS_rtf::LN_FVERTICAL: break; -// case NS_rtf::LN_FBACKWARD: break; -// case NS_rtf::LN_FROTATEFONT: break; -// case NS_rtf::LN_FVERTMERGE: break; -// case NS_rtf::LN_FVERTRESTART: break; -// case NS_rtf::LN_VERTALIGN: break; -// case NS_rtf::LN_FUNUSED: break; -// case NS_rtf::LN_WUNUSED: break; -// case NS_rtf::LN_BRCTOP: break; -// case NS_rtf::LN_BRCLEFT: break; -// case NS_rtf::LN_BRCBOTTOM: break; -// case NS_rtf::LN_BRCRIGHT: break; -// case NS_rtf::LN_IBKL: break; -// case NS_rtf::LN_ITCFIRST: break; -// case NS_rtf::LN_FPUB: break; -// case NS_rtf::LN_ITCLIM: break; -// case NS_rtf::LN_FCOL: break; -// case NS_rtf::LN_LINECOLOR: break; -// case NS_rtf::LN_LINEWIDTH: break; -// case NS_rtf::LN_LINETYPE: break; -// case NS_rtf::LN_MM: break; -// case NS_rtf::LN_XEXT: break; -// case NS_rtf::LN_YEXT: break; -// case NS_rtf::LN_HMF: break; -// case NS_rtf::LN_LCB: break; -// case NS_rtf::LN_CBHEADER: break; -// case NS_rtf::LN_MFP: break; -// case NS_rtf::LN_BM_RCWINMF: break; -// case NS_rtf::LN_DXAGOAL: break; -// case NS_rtf::LN_DYAGOAL: break; -// case NS_rtf::LN_MX: break; -// case NS_rtf::LN_MY: break; -// case NS_rtf::LN_DXACROPLEFT: break; -// case NS_rtf::LN_DYACROPTOP: break; -// case NS_rtf::LN_DXACROPRIGHT: break; -// case NS_rtf::LN_DYACROPBOTTOM: break; -// case NS_rtf::LN_BRCL: break; -// case NS_rtf::LN_FFRAMEEMPTY: break; -// case NS_rtf::LN_FBITMAP: break; -// case NS_rtf::LN_FDRAWHATCH: break; -// case NS_rtf::LN_FERROR: break; -// case NS_rtf::LN_BPP: break; -// case NS_rtf::LN_DXAORIGIN: break; -// case NS_rtf::LN_DYAORIGIN: break; -// case NS_rtf::LN_CPROPS: break; -// case NS_rtf::LN_LINEPROPSTOP: break; -// case NS_rtf::LN_LINEPROPSLEFT: break; -// case NS_rtf::LN_LINEPROPSBOTTOM: break; -// case NS_rtf::LN_LINEPROPSRIGHT: break; -// case NS_rtf::LN_LINEPROPSHORIZONTAL: break; -// case NS_rtf::LN_LINEPROPSVERTICAL: break; -// case NS_rtf::LN_headerr: break; -// case NS_rtf::LN_footerr: break; -// case NS_rtf::LN_endnote: break; -// case NS_rtf::LN_BOOKMARKNAME: break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_LISTLEVEL: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { //add a new level to the level vector and make it the current one m_pImpl->AddLevel(); @@ -792,30 +408,8 @@ void ListTable::attribute(Id nName, Value & rVal) pProperties->resolve(*this); } break; -// case NS_rtf::LN_LFO: break; -// case NS_rtf::LN_F: break; -// case NS_rtf::LN_ALTFONTNAME: break; -// case NS_rtf::LN_XSZFFN: break; -// case NS_rtf::LN_XSTZNAME: break; -// case NS_rtf::LN_XSTZNAME1: break; -// case NS_rtf::LN_UPXSTART: break; -// case NS_rtf::LN_UPX: break; -// case NS_rtf::LN_sed: break; -// case NS_rtf::LN_picf: break; -// case NS_rtf::LN_rgbrc: break; -// case NS_rtf::LN_shd: break; -// case NS_rtf::LN_cellShd: break; -// case NS_rtf::LN_cellTopColor: break; -// case NS_rtf::LN_cellLeftColor: break; -// case NS_rtf::LN_cellBottomColor: break; -// case NS_rtf::LN_cellRightColor: break; - -// case NS_rtf::LN_LISTTABLE: break; -// case NS_rtf::LN_LFOTABLE: break; -// case NS_rtf::LN_FONTTABLE: break; -// case NS_rtf::LN_STYLESHEET: break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_AbstractNum_abstractNumId: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { sal_Int32 nVal = rVal.getString().toInt32(); m_pImpl->m_pCurrentEntry->nAbstractNumId = nVal; @@ -878,8 +472,8 @@ void ListTable::sprm(Sprm & rSprm) /* WRITERFILTERSTATUS: table: ListTable_sprm */ switch( nSprmId ) { - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Numbering_abstractNum: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if(pProperties.get()) @@ -894,8 +488,8 @@ void ListTable::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Numbering_num: + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if(pProperties.get()) @@ -908,15 +502,15 @@ void ListTable::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_AbstractNum_multiLevelType: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; - /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ case NS_rtf::LN_TPLC: + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->nTPLC = nIntValue; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_AbstractNum_lvl: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { m_pImpl->AddLevel(); writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); @@ -928,30 +522,24 @@ void ListTable::sprm(Sprm & rSprm) // case NS_rtf::LN_LSID: // m_pImpl->m_pCurrentEntry->nListId = nIntValue; // break; + case NS_rtf::LN_RGBXCHNUMS: /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ - case NS_rtf::LN_RGBXCHNUMS: break; - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ + break; case NS_rtf::LN_ISTARTAT: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_NFC: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_JC: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_FLEGAL: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ case NS_rtf::LN_FNORESTART: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_FPREV: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_FPREVSPACE: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ - case NS_rtf::LN_FWORD6: - /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ + case NS_rtf::LN_FIDENTSAV: + case NS_rtf::LN_FCONVERTED: + case NS_rtf::LN_FTENTATIVE: case NS_rtf::LN_IXCHFOLLOW: + /* WRITERFILTERSTATUS: done: 75, planned: 0, spent: 0 */ ApplyLevelValues( nSprmId, nIntValue ); break; case NS_ooxml::LN_CT_Lvl_lvlText: case NS_ooxml::LN_CT_Lvl_rPr : //contains LN_EG_RPrBase_rFonts + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if(pProperties.get()) @@ -959,6 +547,7 @@ void ListTable::sprm(Sprm & rSprm) } break; case NS_ooxml::LN_CT_NumLvl_lvl: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { // overwrite level writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); @@ -981,6 +570,7 @@ void ListTable::sprm(Sprm & rSprm) break; case NS_ooxml::LN_CT_Lvl_pPr: case NS_ooxml::LN_CT_PPrBase_ind: + /* WRITERFILTERSTATUS: done: 50, planned: 0, spent: 0 */ { //todo: how to handle paragraph properties within numbering levels (except LeftIndent and FirstLineIndent)? writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); @@ -997,6 +587,7 @@ void ListTable::sprm(Sprm & rSprm) } break; case NS_ooxml::LN_CT_Lvl_suff: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //todo: currently unsupported suffix //can be: "none", "space", "tab" break; @@ -1006,6 +597,7 @@ void ListTable::sprm(Sprm & rSprm) case NS_sprm::LN_CHps: // sprmCHps case NS_ooxml::LN_EG_RPrBase_lang: case NS_ooxml::LN_EG_RPrBase_eastAsianLayout: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ //no break! default: if(m_pImpl->m_pCurrentEntry->pCurrentProperties.get()) @@ -1026,30 +618,41 @@ void ListTable::ApplyLevelValues( sal_Int32 nId, sal_Int32 nIntValue) switch(nId) { case NS_rtf::LN_ISTARTAT: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nIStartAt = nIntValue; break; case NS_rtf::LN_NFC: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nNFC = nIntValue; break; case NS_rtf::LN_JC: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nJC = nIntValue; break; case NS_rtf::LN_FLEGAL: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nFLegal = nIntValue; break; case NS_rtf::LN_FNORESTART: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nFNoRestart = nIntValue; break; - case NS_rtf::LN_FPREV: + case NS_rtf::LN_FIDENTSAV: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nFPrev = nIntValue; break; - case NS_rtf::LN_FPREVSPACE: + case NS_rtf::LN_FCONVERTED: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nFPrevSpace = nIntValue; break; +#if 0 case NS_rtf::LN_FWORD6: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nFWord6 = nIntValue; break; +#endif case NS_rtf::LN_IXCHFOLLOW: + /* WRITERFILTERSTATUS: */ m_pImpl->m_pCurrentEntry->pCurrentProperties->nXChFollow = nIntValue; break; default: diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 896bc1a06e94..04dcf594339c 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -312,6 +312,7 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_STREAM_NAME: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")); break; case PROP_BITMAP : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Bitmap")); break; case PROP_IS_DATE : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDate")); break; + case PROP_TAB_STOP_DISTANCE : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TabStopDistance")); break; case PROP_CNF_STYLE : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CnfStyle")); break; case PROP_INDENT_AT : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IndentAt")); break; case PROP_FIRST_LINE_INDENT : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstLineIndent")); break; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index 461373c23a45..f9c4c333e8ea 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -275,12 +275,13 @@ enum PropertyIds /*239*/ ,PROP_STREAM_NAME /*240*/ ,PROP_BITMAP /*241*/ ,PROP_IS_DATE -/*242*/ ,PROP_CNF_STYLE -/*243*/ ,PROP_INDENT_AT -/*244*/ ,PROP_FIRST_LINE_INDENT -/*245*/ ,PROP_NUMBERING_STYLE_NAME -/*246*/ ,PROP_LISTTAB_STOP_POSITION -/*247*/ ,PROP_POSITION_AND_SPACE_MODE +/*242*/ ,PROP_TAB_STOP_DISTANCE +/*243*/ ,PROP_CNF_STYLE +/*244*/ ,PROP_INDENT_AT +/*245*/ ,PROP_FIRST_LINE_INDENT +/*246*/ ,PROP_NUMBERING_STYLE_NAME +/*247*/ ,PROP_LISTTAB_STOP_POSITION +/*248*/ ,PROP_POSITION_AND_SPACE_MODE }; struct PropertyNameSupplier_Impl; class PropertyNameSupplier diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index d0928f1bac8f..8d9c1fa84a7f 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -38,6 +38,8 @@ #include #include #include +#include "dmapperLoggers.hxx" +#include "PropertyMapHelper.hxx" using namespace ::com::sun::star; @@ -125,6 +127,47 @@ void PropertyMap::Insert( PropertyIds eId, bool bIsTextProperty, const uno::Any& rAny )); Invalidate(); } + +#ifdef DEBUG_DOMAINMAPPER +XMLTag::Pointer_t PropertyMap::toTag() const +{ + XMLTag::Pointer_t pResult(new XMLTag("PropertyMap")); + + PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); + PropertyMap::const_iterator aMapIter = begin(); + while (aMapIter != end()) + { + XMLTag::Pointer_t pTag(new XMLTag("property")); + + pTag->addAttr("name", rPropNameSupplier.GetName( aMapIter->first.eId )); + + switch (aMapIter->first.eId) + { + case PROP_TABLE_COLUMN_SEPARATORS: + pTag->addTag(lcl_TableColumnSeparatorsToTag(aMapIter->second)); + break; + default: + { + try { + sal_Int32 aInt; + aMapIter->second >>= aInt; + pTag->addAttr("value", aInt); + } + catch (...) { + } + } + break; + } + + pResult->addTag(pTag); + + ++aMapIter; + } + + return pResult; +} +#endif + /*-- 13.12.2006 10:46:42--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -152,6 +195,8 @@ void PropertyMap::insert( const PropertyMapPtr pMap, bool bOverwrite ) ::std::for_each( pMap->begin(), pMap->end(), removeExistingElements(*this) ); _PropertyMap::insert(pMap->begin(), pMap->end()); insertTableProperties(pMap.get()); + + Invalidate(); } } /*-- 06.06.2007 15:49:09--------------------------------------------------- @@ -166,6 +211,9 @@ const uno::Reference< text::XFootnote>& PropertyMap::GetFootnote() const -----------------------------------------------------------------------*/ void PropertyMap::insertTableProperties( const PropertyMap* ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("PropertyMap.insertTableProperties"); +#endif } /*-- 24.07.2006 08:29:01--------------------------------------------------- @@ -1043,6 +1091,11 @@ void TablePropertyMap::setValue( TablePropertyMapTarget eWhich, sal_Int32 nSet ) -----------------------------------------------------------------------*/ void TablePropertyMap::insertTableProperties( const PropertyMap* pMap ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("TablePropertyMap.insertTableProperties"); + dmapper_logger->addTag(pMap->toTag()); +#endif + const TablePropertyMap* pSource = dynamic_cast< const TablePropertyMap* >(pMap); if( pSource ) { @@ -1056,6 +1109,10 @@ void TablePropertyMap::insertTableProperties( const PropertyMap* pMap ) } } } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->addTag(toTag()); + dmapper_logger->endElement("TablePropertyMap.insertTableProperties"); +#endif } diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index be6209cd1f30..0f934b37d7d8 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -39,6 +39,10 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#endif + namespace com{namespace sun{namespace star{ namespace beans{ struct PropertyValue; @@ -99,9 +103,16 @@ class PropertyMap : public _PropertyMap ::rtl::OUString m_sFootnoteFontName; ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote > m_xFootnote; - public: - PropertyMap(); - virtual ~PropertyMap(); +protected: + void Invalidate() + { + if(m_aValues.getLength()) + m_aValues.realloc( 0 ); + } + +public: + PropertyMap(); + virtual ~PropertyMap(); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropertyValues(); bool hasEmptyPropertyValues() const {return !m_aValues.getLength();} @@ -111,12 +122,6 @@ class PropertyMap : public _PropertyMap using _PropertyMap::insert; void insert(const boost::shared_ptr pMap, bool bOverwrite = true); - void Invalidate() - { - if(m_aValues.getLength()) - m_aValues.realloc( 0 ); - } - const ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote>& GetFootnote() const; void SetFootnote( ::com::sun::star::uno::Reference< ::com::sun::star::text::XFootnote> xF ) { m_xFootnote = xF; } @@ -131,6 +136,10 @@ class PropertyMap : public _PropertyMap virtual void insertTableProperties( const PropertyMap* ); +#ifdef DEBUG_DOMAINMAPPER + virtual XMLTag::Pointer_t toTag() const; +#endif + }; typedef boost::shared_ptr PropertyMapPtr; diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx new file mode 100644 index 000000000000..555003774113 --- /dev/null +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include +#include +#include "PropertyMapHelper.hxx" + +namespace writerfilter +{ +namespace dmapper +{ + +using namespace ::com::sun::star; + + XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators) +{ + uno::Sequence aSeq; + rTableColumnSeparators >>= aSeq; + + XMLTag::Pointer_t pResult(new XMLTag("property.TableColumnSeparators")); + + sal_uInt32 nLength = aSeq.getLength(); + for (sal_uInt32 n = 0; n < nLength; ++n) + { + XMLTag::Pointer_t pTagSeparator(new XMLTag("separator")); + + pTagSeparator->addAttr("position", aSeq[n].Position); + pTagSeparator->addAttr("visible", aSeq[n].IsVisible); + + pResult->addTag(pTagSeparator); + } + + return pResult; +} + +XMLTag::Pointer_t lcl_PropertyValuesToTag(beans::PropertyValues & rValues) +{ + XMLTag::Pointer_t pResult(new XMLTag("propertyValues")); + + beans::PropertyValue * pValues = rValues.getArray(); + + for (sal_Int32 n = 0; n < rValues.getLength(); ++n) + { + XMLTag::Pointer_t pTag(new XMLTag("propertyValue")); + + pTag->addAttr("name", pValues[n].Name); + + try + { + sal_Int32 aInt = 0; + pValues[n].Value >>= aInt; + pTag->addAttr("value", aInt); + } + catch (...) + { + } + + if (pValues[n].Name.equalsAscii("TableColumnSeparators")) + { + pTag->addTag(lcl_TableColumnSeparatorsToTag(pValues[n].Value)); + } + + pResult->addTag(pTag); + } + + return pResult; +} + +XMLTag::Pointer_t lcl_PropertyValueSeqToTag(PropertyValueSeq_t & rPropValSeq) +{ + XMLTag::Pointer_t pResult(new XMLTag("PropertyValueSeq")); + + beans::PropertyValues * pValues = rPropValSeq.getArray(); + + for (sal_Int32 n = 0; n < rPropValSeq.getLength(); ++n) + { + XMLTag::Pointer_t pTag(lcl_PropertyValuesToTag(pValues[n])); + + pResult->addTag(pTag); + } + + return pResult; +} + +XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t rPropValSeqSeq) +{ + XMLTag::Pointer_t pResult(new XMLTag("PropertyValueSeq")); + + PropertyValueSeq_t * pValues = rPropValSeqSeq.getArray(); + + for (sal_Int32 n = 0; n < rPropValSeqSeq.getLength(); ++n) + { + XMLTag::Pointer_t pTag(lcl_PropertyValueSeqToTag(pValues[n])); + + pResult->addTag(pTag); + } + + return pResult; +} + +} +} diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx new file mode 100644 index 000000000000..fc9ea0a85bb4 --- /dev/null +++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "PropertyMap.hxx" +#include + +namespace writerfilter +{ +namespace dmapper +{ + +XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators); +XMLTag::Pointer_t lcl_PropertyValuesToTag(beans::PropertyValues & rValues); + +typedef uno::Sequence PropertyValueSeq_t; +XMLTag::Pointer_t lcl_PropertyValueSeqToTag(PropertyValueSeq_t & rPropValSeq); + +typedef uno::Sequence PropertyValueSeqSeq_t; +XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t & rPropValSeqSeq); +} +} diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx old mode 100644 new mode 100755 index dd5796a22ceb..10fc83e22dea --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -1,79 +1,226 @@ -#include "SettingsTable.hxx" +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SettingsTable.cxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include +#include #include - -#include -#include - -#if DEBUG -#include -#endif - -using namespace com::sun::star; -using namespace rtl; +#include +#include +#include +#include namespace writerfilter { -namespace dmapper { - -SettingsTable_Impl::SettingsTable_Impl( ) : - m_bRecordChanges( false ) +namespace dmapper { -} -SettingsTable_Impl::~SettingsTable_Impl( ) +struct SettingsTable_Impl { -} + DomainMapper& m_rDMapper; + const uno::Reference< lang::XMultiServiceFactory > m_xTextFactory; -SettingsTable::SettingsTable( ) : - m_pImpl( new SettingsTable_Impl ) -{ -} + ListTablePtr m_pListTable; -SettingsTable::~SettingsTable( ) -{ - delete m_pImpl, m_pImpl = NULL; -} + ::rtl::OUString m_sCharacterSpacing; + ::rtl::OUString m_sDecimalSymbol; + ::rtl::OUString m_sListSeparatorForFields; //2.15.1.56 listSeparator (List Separator for Field Code Evaluation) -void SettingsTable::attribute( Id /*nName*/, Value& /*rVal*/ ) -{ -#if DEBUG - clog << "SettingsTable::attribute( )" << endl; -#endif -} + int m_nDefaultTabStop; + int m_nHyphenationZone; -void SettingsTable::sprm( Sprm& rSprm ) -{ - switch ( rSprm.getId( ) ) + bool m_bNoPunctuationKerning; + bool m_doNotIncludeSubdocsInStats; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics) + bool m_bRecordChanges; + + SettingsTable_Impl( DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory ) : + m_rDMapper( rDMapper ) + , m_xTextFactory( xTextFactory ) + , m_nDefaultTabStop( 720 ) //default is 1/2 in + , m_nHyphenationZone(0) + , m_bNoPunctuationKerning(false) + , m_doNotIncludeSubdocsInStats(false) + , m_bRecordChanges(false) + {} + + ListTablePtr GetListTable() { - case NS_ooxml::LN_CT_Settings_trackRevisions: - { - m_pImpl->m_bRecordChanges = bool(rSprm.getValue( )->getInt( ) ); - } - break; - default: - { -#if DEBUG - clog << __FILE__ << ":" << __LINE__; - clog << ": unknown SPRM: " << rSprm.getName( ) << endl; + if(!m_pListTable) + m_pListTable.reset( + new ListTable( m_rDMapper, m_xTextFactory )); + return m_pListTable; + } +}; + +SettingsTable::SettingsTable(DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory) : +m_pImpl( new SettingsTable_Impl(rDMapper, xTextFactory) ) +{ + // printf("SettingsTable::SettingsTable()\n"); +} + +SettingsTable::~SettingsTable() +{ + delete m_pImpl; +} + +void SettingsTable::attribute(Id /*Name*/, Value & val) +{ + int nIntValue = val.getInt(); + (void)nIntValue; + ::rtl::OUString sValue = val.getString(); + (void)sValue; + //printf ( "SettingsTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr()); + /* WRITERFILTERSTATUS: table: SettingsTable_attributedata */ +#if 0 //no values known, yet + + switch(Name) + { + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::: + break; + default: + { + } + } #endif - } +} + +void SettingsTable::sprm(Sprm& rSprm) +{ + sal_uInt32 nSprmId = rSprm.getId(); + + Value::Pointer_t pValue = rSprm.getValue(); + sal_Int32 nIntValue = pValue->getInt(); + (void)nIntValue; + rtl::OUString sStringValue = pValue->getString(); + + //printf ( "SettingsTable::sprm(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nSprmId, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr()); + + /* WRITERFILTERSTATUS: table: SettingsTable_sprm */ + switch(nSprmId) + { + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_zoom: // 92469; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_proofState: // 92489; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_attachedTemplate: // 92491; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_hdrShapeDefaults: // 92544; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_footnotePr: // 92545; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_endnotePr: // 92546; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_compat: // 92547; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_themeFontLang: // 92552; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_shapeDefaults: // 92560; + + //PropertySetValues - need to be resolved + { + writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + if( pProperties.get()) + pProperties->resolve(*this); + } + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Numbering_num: // 92613; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Numbering_abstractNum: // 92612; + { + m_pImpl->GetListTable()->sprm( rSprm ); + } + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_stylePaneFormatFilter: // 92493; + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_defaultTabStop: // 92505; + m_pImpl->m_nDefaultTabStop = nIntValue; + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_noPunctuationKerning: // 92526; + m_pImpl->m_bNoPunctuationKerning = nIntValue ? true : false; + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_characterSpacingControl: // 92527; + m_pImpl->m_sCharacterSpacing = sStringValue; // doNotCompress, compressPunctuation, compressPunctuationAndJapaneseKana + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_doNotIncludeSubdocsInStats: // 92554; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics) + m_pImpl->m_doNotIncludeSubdocsInStats = nIntValue? true : false; + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_decimalSymbol: // 92562; + m_pImpl->m_sDecimalSymbol = sStringValue; + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_listSeparator: // 92563; + m_pImpl->m_sListSeparatorForFields = sStringValue; + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_rsids: // 92549; revision save Ids - probably not necessary + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Settings_hyphenationZone: // 92508; + m_pImpl->m_nHyphenationZone = nIntValue; + break; + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Compat_useFELayout: // 92422; + // useFELayout (Do Not Bypass East Asian/Complex Script Layout Code - support of old versions of Word - ignored) + break; + case NS_ooxml::LN_CT_Settings_trackRevisions: + { + m_pImpl->m_bRecordChanges = bool(rSprm.getValue( )->getInt( ) ); + } + break; + default: + { + OSL_ENSURE( false, "unknown sprmid in SettingsTable::sprm()"); + } } } -void SettingsTable::entry( int nPos, writerfilter::Reference::Pointer_t pRef ) +void SettingsTable::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) { - (void)nPos; -#if DEBUG - fprintf( stderr, "SettingsTable::entry( ), pos: %d\n", nPos ); -#endif - pRef->resolve( *this ); + // printf ( "SettingsTable::entry\n"); + ref->resolve(*this); } +//returns default TabStop in 1/100th mm -void SettingsTable::resolveSprmProps( Sprm& rSprm ) +/*-- 22.09.2009 10:29:32--------------------------------------------------- + + -----------------------------------------------------------------------*/ +int SettingsTable::GetDefaultTabStop() const { - writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); - if( pProperties.get()) - pProperties->resolve(*this); + return ConversionHelper::convertTwipToMM100( m_pImpl->m_nDefaultTabStop ); } void SettingsTable::ApplyProperties( uno::Reference< text::XTextDocument > xDoc ) @@ -81,7 +228,9 @@ void SettingsTable::ApplyProperties( uno::Reference< text::XTextDocument > xDoc uno::Reference< beans::XPropertySet> xDocProps( xDoc, uno::UNO_QUERY ); // Record changes value - xDocProps->setPropertyValue( OUString::createFromAscii( "RecordChanges" ), uno::makeAny( m_pImpl->m_bRecordChanges ) ); + xDocProps->setPropertyValue( ::rtl::OUString::createFromAscii( "RecordChanges" ), uno::makeAny( m_pImpl->m_bRecordChanges ) ); } -} } + +}//namespace dmapper +} //namespace writerfilter diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx old mode 100644 new mode 100755 index fb5ba5a8b010..cb3e7913c5e7 --- a/writerfilter/source/dmapper/SettingsTable.hxx +++ b/writerfilter/source/dmapper/SettingsTable.hxx @@ -1,31 +1,67 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: SettingsTable.hxx,v $ + * $Revision: 1.3 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + #ifndef INCLUDED_SETTINGSTABLE_HXX #define INCLUDED_SETTINGSTABLE_HXX #include #include - +#include #include +#include + +namespace com{ namespace sun{ namespace star{ +namespace lang{ +class XMultiServiceFactory; +struct Locale; +} +}}} namespace writerfilter { namespace dmapper { +class DomainMapper; -struct SettingsTable_Impl +using namespace std; + +struct SettingsTable_Impl; + +class WRITERFILTER_DLLPRIVATE SettingsTable : public Properties, public Table { -public: - bool m_bRecordChanges; + SettingsTable_Impl *m_pImpl; - SettingsTable_Impl( ); - ~SettingsTable_Impl( ); -}; - -class WRITERFILTER_DLLPRIVATE SettingsTable: public Properties, public Table -{ -public: - SettingsTable_Impl* m_pImpl; - - SettingsTable( ); - ~SettingsTable( ); + public: + SettingsTable( DomainMapper& rDMapper, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xTextFactory + ); + virtual ~SettingsTable(); // Properties virtual void attribute(Id Name, Value & val); @@ -34,13 +70,13 @@ public: // Table virtual void entry(int pos, writerfilter::Reference::Pointer_t ref); - void resolveSprmProps( Sprm& rSprm ); + //returns default TabStop in 1/100th mm + int GetDefaultTabStop() const; + + void ApplyProperties( uno::Reference< text::XTextDocument > xDoc ); - void ApplyProperties( com::sun::star::uno::Reference< com::sun::star::text::XTextDocument > xDoc ); }; -typedef boost::shared_ptr< SettingsTable > SettingsTablePtr; +typedef boost::shared_ptr< SettingsTable > SettingsTablePtr; +}} - -} } - -#endif +#endif // diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 118dc7c3bf60..cbf6240c15ce 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -46,6 +46,11 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#include +#endif + using namespace ::com::sun::star; namespace writerfilter { namespace dmapper @@ -66,8 +71,37 @@ StyleSheetEntry::StyleSheetEntry() : ,sBaseStyleIdentifier() ,sNextStyleIdentifier() ,pProperties(new StyleSheetPropertyMap) - { - } +{ +#if OSL_DEBUG_LEVEL > 1 + nStyleTypeCode = STYLE_TYPE_PARA; +#endif +} + +StyleSheetEntry::~StyleSheetEntry() +{ +} + +#ifdef DEBUG_DOMAINMAPPER +XMLTag::Pointer_t StyleSheetEntry::toTag() +{ + XMLTag::Pointer_t pResult(new XMLTag("StyleSheetEntry")); + + pResult->addAttr("identifierI", sStyleIdentifierI); + pResult->addAttr("identifierD", sStyleIdentifierD); + pResult->addAttr("default", bIsDefaultStyle ? "true" : "false"); + pResult->addAttr("invalidHeight", bInvalidHeight ? "true" : "false"); + pResult->addAttr("hasUPE", bHasUPE ? "true" : "false"); + pResult->addAttr("styleType", nStyleTypeCode); + pResult->addAttr("baseStyle", sBaseStyleIdentifier); + pResult->addAttr("nextStyle", sNextStyleIdentifier); + pResult->addAttr("styleName", sStyleName); + pResult->addAttr("styleName1", sStyleName1); + pResult->addAttr("convertedName", sConvertedStyleName); + pResult->addTag(pProperties->toTag()); + + return pResult; +} +#endif TableStyleSheetEntry::TableStyleSheetEntry( StyleSheetEntry& rEntry, StyleSheetTable* pStyles ): StyleSheetEntry( ), @@ -93,6 +127,13 @@ TableStyleSheetEntry::~TableStyleSheetEntry( ) void TableStyleSheetEntry::AddTblStylePr( TblStyleType nType, PropertyMapPtr pProps ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("AddTblStylePr"); + dmapper_logger->attribute("type", nType); + dmapper_logger->addTag(pProps->toTag()); + dmapper_logger->endElement("AddTblStylePr"); +#endif + static TblStyleType pTypesToFix[] = { TBL_STYLE_FIRSTROW, @@ -157,6 +198,24 @@ PropertyMapPtr TableStyleSheetEntry::GetProperties( sal_Int32 nMask ) return pProps; } +#ifdef DEBUG_DOMAINMAPPER +XMLTag::Pointer_t TableStyleSheetEntry::toTag() +{ + XMLTag::Pointer_t pResult(StyleSheetEntry::toTag()); + + for (sal_Int32 nBit = 0; nBit < 13; ++nBit) + { + PropertyMapPtr pMap = GetProperties(1 << nBit); + + XMLTag::Pointer_t pTag = pMap->toTag(); + pTag->addAttr("kind", nBit); + pResult->addTag(pTag); + } + + return pResult; +} +#endif + void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleType nStyleId ) { static PropertyIds pPropsToCheck[] = @@ -215,7 +274,8 @@ PropertyMapPtr TableStyleSheetEntry::GetLocalPropertiesFromMask( sal_Int32 nMask TBL_STYLE_LASTCOL, TBL_STYLE_FIRSTCOL, TBL_STYLE_LASTROW, - TBL_STYLE_FIRSTROW + TBL_STYLE_FIRSTROW, + TBL_STYLE_UNKNOWN }; // Get the properties applying according to the mask @@ -233,7 +293,7 @@ PropertyMapPtr TableStyleSheetEntry::GetLocalPropertiesFromMask( sal_Int32 nMask nBit++; } - while ( nBit < 12 ); + while ( nBit < 13 ); return pProps; } @@ -353,6 +413,11 @@ StyleSheetTable::~StyleSheetTable() -----------------------------------------------------------------------*/ void StyleSheetTable::attribute(Id Name, Value & val) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("StyleSheetTable.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(Name)); +#endif + OSL_ENSURE( m_pImpl->m_pCurrentEntry, "current entry has to be set here"); if(!m_pImpl->m_pCurrentEntry) return ; @@ -363,51 +428,12 @@ void StyleSheetTable::attribute(Id Name, Value & val) /* WRITERFILTERSTATUS: table: StyleSheetTable_attributedata */ switch(Name) { - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_ISTD: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->sStyleIdentifierD = ::rtl::OUString::valueOf(static_cast(nIntValue), 16); break; -// case NS_rtf::LN_ISTARTAT: break; -// case NS_rtf::LN_NFC: break; -// case NS_rtf::LN_JC: break; -// case NS_rtf::LN_FLEGAL: break; -// case NS_rtf::LN_FNORESTART: break; -// case NS_rtf::LN_FPREV: break; -// case NS_rtf::LN_FPREVSPACE: break; -// case NS_rtf::LN_FWORD6: break; -// case NS_rtf::LN_UNUSED5_7: break; -// case NS_rtf::LN_RGBXCHNUMS: break; -// case NS_rtf::LN_IXCHFOLLOW: break; -// case NS_rtf::LN_DXASPACE: break; -// case NS_rtf::LN_DXAINDENT: break; -// case NS_rtf::LN_CBGRPPRLCHPX: break; -// case NS_rtf::LN_CBGRPPRLPAPX: break; -// case NS_rtf::LN_LSID: break; -// case NS_rtf::LN_TPLC: break; -// case NS_rtf::LN_RGISTD: break; -// case NS_rtf::LN_FSIMPLELIST: break; -// case NS_rtf::LN_FRESTARTHDN: break; -// case NS_rtf::LN_UNSIGNED26_2: break; -// case NS_rtf::LN_ILVL: break; -// case NS_rtf::LN_FSTARTAT: break; -// case NS_rtf::LN_FFORMATTING: break; -// case NS_rtf::LN_UNSIGNED4_6: break; -// case NS_rtf::LN_UNUSED4: break; -// case NS_rtf::LN_UNUSED8: break; -// case NS_rtf::LN_CLFOLVL: break; -// case NS_rtf::LN_CBFFNM1: break; -// case NS_rtf::LN_PRQ: break; -// case NS_rtf::LN_FTRUETYPE: break; -// case NS_rtf::LN_UNUSED1_3: break; -// case NS_rtf::LN_FF: break; -// case NS_rtf::LN_UNUSED1_7: break; -// case NS_rtf::LN_WWEIGHT: break; -// case NS_rtf::LN_CHS: break; -// case NS_rtf::LN_IXCHSZALT: break; -// case NS_rtf::LN_PANOSE: break; -// case NS_rtf::LN_FS: break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_STI: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { ::rtl::OUString tempStyleIdentifier = GetStyleIdFromIndex(static_cast(nIntValue)); if (tempStyleIdentifier.getLength()) @@ -416,21 +442,20 @@ void StyleSheetTable::attribute(Id Name, Value & val) m_pImpl->m_pCurrentEntry->bIsDefaultStyle = true; } break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_SGC: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->nStyleTypeCode = (StyleType)nIntValue; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_ISTDBASE: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ if (static_cast(nIntValue) != 0xfff) m_pImpl->m_pCurrentEntry->sBaseStyleIdentifier = ::rtl::OUString::valueOf(static_cast(nIntValue), 16); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_ISTDNEXT: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ if (static_cast(nIntValue) != 0xfff) m_pImpl->m_pCurrentEntry->sNextStyleIdentifier = ::rtl::OUString::valueOf(static_cast(nIntValue), 16); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_FSCRATCH: /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_FINVALHEIGHT: @@ -448,385 +473,27 @@ void StyleSheetTable::attribute(Id Name, Value & val) case NS_rtf::LN_FHIDDEN: /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_rtf::LN_UNUSED8_3: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ //noone seems to care about it break; -// case NS_rtf::LN_CSTD: break; -// case NS_rtf::LN_CBSTDBASEINFILE: break; -// case NS_rtf::LN_FSTDSTYLENAMESWRITTEN: break; -// case NS_rtf::LN_UNUSED4_2: break; -// case NS_rtf::LN_STIMAXWHENSAVED: break; -// case NS_rtf::LN_ISTDMAXFIXEDWHENSAVED: break; -// case NS_rtf::LN_NVERBUILTINNAMESWHENSAVED: break; -// case NS_rtf::LN_RGFTCSTANDARDCHPSTSH: break; -// case NS_rtf::LN_WIDENT: break; -// case NS_rtf::LN_NFIB: break; -// case NS_rtf::LN_NPRODUCT: break; -// case NS_rtf::LN_LID: break; -// case NS_rtf::LN_PNNEXT: break; -// case NS_rtf::LN_FDOT: break; -// case NS_rtf::LN_FGLSY: break; -// case NS_rtf::LN_FCOMPLEX: break; -// case NS_rtf::LN_FHASPIC: break; -// case NS_rtf::LN_CQUICKSAVES: break; -// case NS_rtf::LN_FENCRYPTED: break; -// case NS_rtf::LN_FWHICHTBLSTM: break; -// case NS_rtf::LN_FREADONLYRECOMMENDED: break; -// case NS_rtf::LN_FWRITERESERVATION: break; -// case NS_rtf::LN_FEXTCHAR: break; -// case NS_rtf::LN_FLOADOVERRIDE: break; -// case NS_rtf::LN_FFAREAST: break; -// case NS_rtf::LN_FCRYPTO: break; -// case NS_rtf::LN_NFIBBACK: break; -// case NS_rtf::LN_LKEY: break; -// case NS_rtf::LN_ENVR: break; -// case NS_rtf::LN_FMAC: break; -// case NS_rtf::LN_FEMPTYSPECIAL: break; -// case NS_rtf::LN_FLOADOVERRIDEPAGE: break; -// case NS_rtf::LN_FFUTURESAVEDUNDO: break; -// case NS_rtf::LN_FWORD97SAVED: break; -// case NS_rtf::LN_FSPARE0: break; -// case NS_rtf::LN_CHSTABLES: break; -// case NS_rtf::LN_FCMIN: break; -// case NS_rtf::LN_FCMAC: break; -// case NS_rtf::LN_CSW: break; -// case NS_rtf::LN_WMAGICCREATED: break; -// case NS_rtf::LN_WMAGICREVISED: break; -// case NS_rtf::LN_WMAGICCREATEDPRIVATE: break; -// case NS_rtf::LN_WMAGICREVISEDPRIVATE: break; -// case NS_rtf::LN_PNFBPCHPFIRST_W6: break; -// case NS_rtf::LN_PNCHPFIRST_W6: break; -// case NS_rtf::LN_CPNBTECHP_W6: break; -// case NS_rtf::LN_PNFBPPAPFIRST_W6: break; -// case NS_rtf::LN_PNPAPFIRST_W6: break; -// case NS_rtf::LN_CPNBTEPAP_W6: break; -// case NS_rtf::LN_PNFBPLVCFIRST_W6: break; -// case NS_rtf::LN_PNLVCFIRST_W6: break; -// case NS_rtf::LN_CPNBTELVC_W6: break; -// case NS_rtf::LN_LIDFE: break; -// case NS_rtf::LN_CLW: break; -// case NS_rtf::LN_CBMAC: break; -// case NS_rtf::LN_LPRODUCTCREATED: break; -// case NS_rtf::LN_LPRODUCTREVISED: break; -// case NS_rtf::LN_CCPTEXT: break; -// case NS_rtf::LN_CCPFTN: break; -// case NS_rtf::LN_CCPHDD: break; -// case NS_rtf::LN_CCPMCR: break; -// case NS_rtf::LN_CCPATN: break; -// case NS_rtf::LN_CCPEDN: break; -// case NS_rtf::LN_CCPTXBX: break; -// case NS_rtf::LN_CCPHDRTXBX: break; -// case NS_rtf::LN_PNFBPCHPFIRST: break; -// case NS_rtf::LN_PNCHPFIRST: break; -// case NS_rtf::LN_CPNBTECHP: break; -// case NS_rtf::LN_PNFBPPAPFIRST: break; -// case NS_rtf::LN_PNPAPFIRST: break; -// case NS_rtf::LN_CPNBTEPAP: break; -// case NS_rtf::LN_PNFBPLVCFIRST: break; -// case NS_rtf::LN_PNLVCFIRST: break; -// case NS_rtf::LN_CPNBTELVC: break; -// case NS_rtf::LN_FCISLANDFIRST: break; -// case NS_rtf::LN_FCISLANDLIM: break; -// case NS_rtf::LN_CFCLCB: break; -// case NS_rtf::LN_FCSTSHFORIG: break; -// case NS_rtf::LN_LCBSTSHFORIG: break; -// case NS_rtf::LN_FCSTSHF: break; -// case NS_rtf::LN_LCBSTSHF: break; -// case NS_rtf::LN_FCPLCFFNDREF: break; -// case NS_rtf::LN_LCBPLCFFNDREF: break; -// case NS_rtf::LN_FCPLCFFNDTXT: break; -// case NS_rtf::LN_LCBPLCFFNDTXT: break; -// case NS_rtf::LN_FCPLCFANDREF: break; -// case NS_rtf::LN_LCBPLCFANDREF: break; -// case NS_rtf::LN_FCPLCFANDTXT: break; -// case NS_rtf::LN_LCBPLCFANDTXT: break; -// case NS_rtf::LN_FCPLCFSED: break; -// case NS_rtf::LN_LCBPLCFSED: break; -// case NS_rtf::LN_FCPLCFPAD: break; -// case NS_rtf::LN_LCBPLCFPAD: break; -// case NS_rtf::LN_FCPLCFPHE: break; -// case NS_rtf::LN_LCBPLCFPHE: break; -// case NS_rtf::LN_FCSTTBFGLSY: break; -// case NS_rtf::LN_LCBSTTBFGLSY: break; -// case NS_rtf::LN_FCPLCFGLSY: break; -// case NS_rtf::LN_LCBPLCFGLSY: break; -// case NS_rtf::LN_FCPLCFHDD: break; -// case NS_rtf::LN_LCBPLCFHDD: break; -// case NS_rtf::LN_FCPLCFBTECHPX: break; -// case NS_rtf::LN_LCBPLCFBTECHPX: break; -// case NS_rtf::LN_FCPLCFBTEPAPX: break; -// case NS_rtf::LN_LCBPLCFBTEPAPX: break; -// case NS_rtf::LN_FCPLCFSEA: break; -// case NS_rtf::LN_LCBPLCFSEA: break; -// case NS_rtf::LN_FCSTTBFFFN: break; -// case NS_rtf::LN_LCBSTTBFFFN: break; -// case NS_rtf::LN_FCPLCFFLDMOM: break; -// case NS_rtf::LN_LCBPLCFFLDMOM: break; -// case NS_rtf::LN_FCPLCFFLDHDR: break; -// case NS_rtf::LN_LCBPLCFFLDHDR: break; -// case NS_rtf::LN_FCPLCFFLDFTN: break; -// case NS_rtf::LN_LCBPLCFFLDFTN: break; -// case NS_rtf::LN_FCPLCFFLDATN: break; -// case NS_rtf::LN_LCBPLCFFLDATN: break; -// case NS_rtf::LN_FCPLCFFLDMCR: break; -// case NS_rtf::LN_LCBPLCFFLDMCR: break; -// case NS_rtf::LN_FCSTTBFBKMK: break; -// case NS_rtf::LN_LCBSTTBFBKMK: break; -// case NS_rtf::LN_FCPLCFBKF: break; -// case NS_rtf::LN_LCBPLCFBKF: break; -// case NS_rtf::LN_FCPLCFBKL: break; -// case NS_rtf::LN_LCBPLCFBKL: break; -// case NS_rtf::LN_FCCMDS: break; -// case NS_rtf::LN_LCBCMDS: break; -// case NS_rtf::LN_FCPLCMCR: break; -// case NS_rtf::LN_LCBPLCMCR: break; -// case NS_rtf::LN_FCSTTBFMCR: break; -// case NS_rtf::LN_LCBSTTBFMCR: break; -// case NS_rtf::LN_FCPRDRVR: break; -// case NS_rtf::LN_LCBPRDRVR: break; -// case NS_rtf::LN_FCPRENVPORT: break; -// case NS_rtf::LN_LCBPRENVPORT: break; -// case NS_rtf::LN_FCPRENVLAND: break; -// case NS_rtf::LN_LCBPRENVLAND: break; -// case NS_rtf::LN_FCWSS: break; -// case NS_rtf::LN_LCBWSS: break; -// case NS_rtf::LN_FCDOP: break; -// case NS_rtf::LN_LCBDOP: break; -// case NS_rtf::LN_FCSTTBFASSOC: break; -// case NS_rtf::LN_LCBSTTBFASSOC: break; -// case NS_rtf::LN_FCCLX: break; -// case NS_rtf::LN_LCBCLX: break; -// case NS_rtf::LN_FCPLCFPGDFTN: break; -// case NS_rtf::LN_LCBPLCFPGDFTN: break; -// case NS_rtf::LN_FCAUTOSAVESOURCE: break; -// case NS_rtf::LN_LCBAUTOSAVESOURCE: break; -// case NS_rtf::LN_FCGRPXSTATNOWNERS: break; -// case NS_rtf::LN_LCBGRPXSTATNOWNERS: break; -// case NS_rtf::LN_FCSTTBFATNBKMK: break; -// case NS_rtf::LN_LCBSTTBFATNBKMK: break; -// case NS_rtf::LN_FCPLCDOAMOM: break; -// case NS_rtf::LN_LCBPLCDOAMOM: break; -// case NS_rtf::LN_FCPLCDOAHDR: break; -// case NS_rtf::LN_LCBPLCDOAHDR: break; -// case NS_rtf::LN_FCPLCSPAMOM: break; -// case NS_rtf::LN_LCBPLCSPAMOM: break; -// case NS_rtf::LN_FCPLCSPAHDR: break; -// case NS_rtf::LN_LCBPLCSPAHDR: break; -// case NS_rtf::LN_FCPLCFATNBKF: break; -// case NS_rtf::LN_LCBPLCFATNBKF: break; -// case NS_rtf::LN_FCPLCFATNBKL: break; -// case NS_rtf::LN_LCBPLCFATNBKL: break; -// case NS_rtf::LN_FCPMS: break; -// case NS_rtf::LN_LCBPMS: break; -// case NS_rtf::LN_FCFORMFLDSTTBF: break; -// case NS_rtf::LN_LCBFORMFLDSTTBF: break; -// case NS_rtf::LN_FCPLCFENDREF: break; -// case NS_rtf::LN_LCBPLCFENDREF: break; -// case NS_rtf::LN_FCPLCFENDTXT: break; -// case NS_rtf::LN_LCBPLCFENDTXT: break; -// case NS_rtf::LN_FCPLCFFLDEDN: break; -// case NS_rtf::LN_LCBPLCFFLDEDN: break; -// case NS_rtf::LN_FCPLCFPGDEDN: break; -// case NS_rtf::LN_LCBPLCFPGDEDN: break; -// case NS_rtf::LN_FCDGGINFO: break; -// case NS_rtf::LN_LCBDGGINFO: break; -// case NS_rtf::LN_FCSTTBFRMARK: break; -// case NS_rtf::LN_LCBSTTBFRMARK: break; -// case NS_rtf::LN_FCSTTBFCAPTION: break; -// case NS_rtf::LN_LCBSTTBFCAPTION: break; -// case NS_rtf::LN_FCSTTBFAUTOCAPTION: break; -// case NS_rtf::LN_LCBSTTBFAUTOCAPTION: break; -// case NS_rtf::LN_FCPLCFWKB: break; -// case NS_rtf::LN_LCBPLCFWKB: break; -// case NS_rtf::LN_FCPLCFSPL: break; -// case NS_rtf::LN_LCBPLCFSPL: break; -// case NS_rtf::LN_FCPLCFTXBXTXT: break; -// case NS_rtf::LN_LCBPLCFTXBXTXT: break; -// case NS_rtf::LN_FCPLCFFLDTXBX: break; -// case NS_rtf::LN_LCBPLCFFLDTXBX: break; -// case NS_rtf::LN_FCPLCFHDRTXBXTXT: break; -// case NS_rtf::LN_LCBPLCFHDRTXBXTXT: break; -// case NS_rtf::LN_FCPLCFFLDHDRTXBX: break; -// case NS_rtf::LN_LCBPLCFFLDHDRTXBX: break; -// case NS_rtf::LN_FCSTWUSER: break; -// case NS_rtf::LN_LCBSTWUSER: break; -// case NS_rtf::LN_FCSTTBTTMBD: break; -// case NS_rtf::LN_LCBSTTBTTMBD: break; -// case NS_rtf::LN_FCUNUSED: break; -// case NS_rtf::LN_LCBUNUSED: break; -// case NS_rtf::LN_FCPGDMOTHER: break; -// case NS_rtf::LN_LCBPGDMOTHER: break; -// case NS_rtf::LN_FCBKDMOTHER: break; -// case NS_rtf::LN_LCBBKDMOTHER: break; -// case NS_rtf::LN_FCPGDFTN: break; -// case NS_rtf::LN_LCBPGDFTN: break; -// case NS_rtf::LN_FCBKDFTN: break; -// case NS_rtf::LN_LCBBKDFTN: break; -// case NS_rtf::LN_FCPGDEDN: break; -// case NS_rtf::LN_LCBPGDEDN: break; -// case NS_rtf::LN_FCBKDEDN: break; -// case NS_rtf::LN_LCBBKDEDN: break; -// case NS_rtf::LN_FCSTTBFINTLFLD: break; -// case NS_rtf::LN_LCBSTTBFINTLFLD: break; -// case NS_rtf::LN_FCROUTESLIP: break; -// case NS_rtf::LN_LCBROUTESLIP: break; -// case NS_rtf::LN_FCSTTBSAVEDBY: break; -// case NS_rtf::LN_LCBSTTBSAVEDBY: break; -// case NS_rtf::LN_FCSTTBFNM: break; -// case NS_rtf::LN_LCBSTTBFNM: break; -// case NS_rtf::LN_FCPLCFLST: break; -// case NS_rtf::LN_LCBPLCFLST: break; -// case NS_rtf::LN_FCPLFLFO: break; -// case NS_rtf::LN_LCBPLFLFO: break; -// case NS_rtf::LN_FCPLCFTXBXBKD: break; -// case NS_rtf::LN_LCBPLCFTXBXBKD: break; -// case NS_rtf::LN_FCPLCFTXBXHDRBKD: break; -// case NS_rtf::LN_LCBPLCFTXBXHDRBKD: break; -// case NS_rtf::LN_FCDOCUNDO: break; -// case NS_rtf::LN_LCBDOCUNDO: break; -// case NS_rtf::LN_FCRGBUSE: break; -// case NS_rtf::LN_LCBRGBUSE: break; -// case NS_rtf::LN_FCUSP: break; -// case NS_rtf::LN_LCBUSP: break; -// case NS_rtf::LN_FCUSKF: break; -// case NS_rtf::LN_LCBUSKF: break; -// case NS_rtf::LN_FCPLCUPCRGBUSE: break; -// case NS_rtf::LN_LCBPLCUPCRGBUSE: break; -// case NS_rtf::LN_FCPLCUPCUSP: break; -// case NS_rtf::LN_LCBPLCUPCUSP: break; -// case NS_rtf::LN_FCSTTBGLSYSTYLE: break; -// case NS_rtf::LN_LCBSTTBGLSYSTYLE: break; -// case NS_rtf::LN_FCPLGOSL: break; -// case NS_rtf::LN_LCBPLGOSL: break; -// case NS_rtf::LN_FCPLCOCX: break; -// case NS_rtf::LN_LCBPLCOCX: break; -// case NS_rtf::LN_FCPLCFBTELVC: break; -// case NS_rtf::LN_LCBPLCFBTELVC: break; -// case NS_rtf::LN_DWLOWDATETIME: break; -// case NS_rtf::LN_DWHIGHDATETIME: break; -// case NS_rtf::LN_FCPLCFLVC: break; -// case NS_rtf::LN_LCBPLCFLVC: break; -// case NS_rtf::LN_FCPLCASUMY: break; -// case NS_rtf::LN_LCBPLCASUMY: break; -// case NS_rtf::LN_FCPLCFGRAM: break; -// case NS_rtf::LN_LCBPLCFGRAM: break; -// case NS_rtf::LN_FCSTTBLISTNAMES: break; -// case NS_rtf::LN_LCBSTTBLISTNAMES: break; -// case NS_rtf::LN_FCSTTBFUSSR: break; -// case NS_rtf::LN_LCBSTTBFUSSR: break; -// case NS_rtf::LN_FN: break; -// case NS_rtf::LN_FCSEPX: break; -// case NS_rtf::LN_FNMPR: break; -// case NS_rtf::LN_FCMPR: break; -// case NS_rtf::LN_ICOFORE: break; -// case NS_rtf::LN_ICOBACK: break; -// case NS_rtf::LN_IPAT: break; -// case NS_rtf::LN_SHDFORECOLOR: break; -// case NS_rtf::LN_SHDBACKCOLOR: break; -// case NS_rtf::LN_SHDPATTERN: break; -// case NS_rtf::LN_DPTLINEWIDTH: break; -// case NS_rtf::LN_BRCTYPE: break; -// case NS_rtf::LN_ICO: break; -// case NS_rtf::LN_DPTSPACE: break; -// case NS_rtf::LN_FSHADOW: break; -// case NS_rtf::LN_FFRAME: break; -// case NS_rtf::LN_UNUSED2_15: break; -// case NS_rtf::LN_FFIRSTMERGED: break; -// case NS_rtf::LN_FMERGED: break; -// case NS_rtf::LN_FVERTICAL: break; -// case NS_rtf::LN_FBACKWARD: break; -// case NS_rtf::LN_FROTATEFONT: break; -// case NS_rtf::LN_FVERTMERGE: break; -// case NS_rtf::LN_FVERTRESTART: break; -// case NS_rtf::LN_VERTALIGN: break; -// case NS_rtf::LN_FUNUSED: break; -// case NS_rtf::LN_WUNUSED: break; -// case NS_rtf::LN_BRCTOP: break; -// case NS_rtf::LN_BRCLEFT: break; -// case NS_rtf::LN_BRCBOTTOM: break; -// case NS_rtf::LN_BRCRIGHT: break; -// case NS_rtf::LN_IBKL: break; -// case NS_rtf::LN_ITCFIRST: break; -// case NS_rtf::LN_FPUB: break; -// case NS_rtf::LN_ITCLIM: break; -// case NS_rtf::LN_FCOL: break; -// case NS_rtf::LN_LINECOLOR: break; -// case NS_rtf::LN_LINEWIDTH: break; -// case NS_rtf::LN_LINETYPE: break; -// case NS_rtf::LN_MM: break; -// case NS_rtf::LN_XEXT: break; -// case NS_rtf::LN_YEXT: break; -// case NS_rtf::LN_HMF: break; -// case NS_rtf::LN_LCB: break; -// case NS_rtf::LN_CBHEADER: break; -// case NS_rtf::LN_MFP: break; -// case NS_rtf::LN_BM_RCWINMF: break; -// case NS_rtf::LN_DXAGOAL: break; -// case NS_rtf::LN_DYAGOAL: break; -// case NS_rtf::LN_MX: break; -// case NS_rtf::LN_MY: break; -// case NS_rtf::LN_DXACROPLEFT: break; -// case NS_rtf::LN_DYACROPTOP: break; -// case NS_rtf::LN_DXACROPRIGHT: break; -// case NS_rtf::LN_DYACROPBOTTOM: break; -// case NS_rtf::LN_BRCL: break; -// case NS_rtf::LN_FFRAMEEMPTY: break; -// case NS_rtf::LN_FBITMAP: break; -// case NS_rtf::LN_FDRAWHATCH: break; -// case NS_rtf::LN_FERROR: break; -// case NS_rtf::LN_BPP: break; -// case NS_rtf::LN_DXAORIGIN: break; -// case NS_rtf::LN_DYAORIGIN: break; -// case NS_rtf::LN_CPROPS: break; -// case NS_rtf::LN_LINEPROPSTOP: break; -// case NS_rtf::LN_LINEPROPSLEFT: break; -// case NS_rtf::LN_LINEPROPSBOTTOM: break; -// case NS_rtf::LN_LINEPROPSRIGHT: break; -// case NS_rtf::LN_LINEPROPSHORIZONTAL: break; -// case NS_rtf::LN_LINEPROPSVERTICAL: break; -// case NS_rtf::LN_headerr: break; -// case NS_rtf::LN_footerr: break; -// case NS_rtf::LN_endnote: break; -// case NS_rtf::LN_BOOKMARKNAME: break; - -// case NS_rtf::LN_LISTLEVEL: break; -// case NS_rtf::LN_LFO: break; -// case NS_rtf::LN_F: break; -// case NS_rtf::LN_ALTFONTNAME: break; -// case NS_rtf::LN_XSZFFN: break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_XSTZNAME: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->sStyleName1 = sValue; if (m_pImpl->m_pCurrentEntry->sStyleIdentifierI.getLength()) m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_XSTZNAME1: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->sStyleName = sValue; if (m_pImpl->m_pCurrentEntry->sStyleIdentifierI.getLength()) m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue; break; -// case NS_rtf::LN_UPXSTART: break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_rtf::LN_UPX: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ resolveAttributeProperties(val); break; -// case NS_rtf::LN_sed: break; -// case NS_rtf::LN_picf: break; - -// case NS_rtf::LN_rgbrc: break; -// case NS_rtf::LN_shd: break; -// case NS_rtf::LN_cellShd: break; -// case NS_rtf::LN_cellTopColor: break; -// case NS_rtf::LN_cellLeftColor: break; -// case NS_rtf::LN_cellBottomColor: break; -// case NS_rtf::LN_cellRightColor: break; - -// case NS_rtf::LN_LISTTABLE: break; -// case NS_rtf::LN_LFOTABLE: break; -// case NS_rtf::LN_StyleSheetTable: break; -// case NS_rtf::LN_STYLESHEET: break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_type: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { /* defaults should be set at the service "com.sun.star.text.Defaults" if (nIntValue == 1) @@ -842,26 +509,26 @@ void StyleSheetTable::attribute(Id Name, Value & val) } else m_pImpl->m_pCurrentEntry->nStyleTypeCode = (StyleType)nIntValue; - break; } - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + break; case NS_ooxml::LN_CT_Style_default: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->bIsDefaultStyle = (nIntValue != 0); break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_customStyle: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_styleId: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->sStyleIdentifierI = sValue; m_pImpl->m_pCurrentEntry->sStyleIdentifierD = sValue; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblWidth_w: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TblWidth_w( nIntValue ); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblWidth_type: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TblWidth_type( nIntValue ); break; default: @@ -873,12 +540,21 @@ void StyleSheetTable::attribute(Id Name, Value & val) } break; } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("StyleSheetTable.attribute"); +#endif } /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ void StyleSheetTable::sprm(Sprm & rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("StyleSheetTable.sprm"); + dmapper_logger->attribute("sprm", rSprm.toString()); +#endif + sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); sal_Int32 nIntValue = pValue.get() ? pValue->getInt() : 0; @@ -889,51 +565,44 @@ void StyleSheetTable::sprm(Sprm & rSprm) /* WRITERFILTERSTATUS: table: StyleSheetTable_sprm */ switch(nSprmId) { - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_name: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ //this is only a UI name! m_pImpl->m_pCurrentEntry->sStyleName = sStringValue; m_pImpl->m_pCurrentEntry->sStyleName1 = sStringValue; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_basedOn: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->sBaseStyleIdentifier = sStringValue; break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_next: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->sNextStyleIdentifier = sStringValue; break; - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_aliases: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_link: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_autoRedefine: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_hidden: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_uiPriority: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_semiHidden: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_unhideWhenUsed: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_qFormat: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_locked: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_personal: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_personalCompose: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_personalReply: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_rsid: - /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_trPr: + case NS_ooxml::LN_CT_Style_tcPr: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + case NS_ooxml::LN_CT_Style_tblPr: //contains table properties case NS_ooxml::LN_CT_Style_tblStylePr: //contains to table properties + case NS_ooxml::LN_CT_DocDefaults_pPrDefault: + case NS_ooxml::LN_CT_DocDefaults_rPrDefault: + case NS_ooxml::LN_CT_TblPrBase_tblInd: //table properties - at least width value and type + case NS_ooxml::LN_EG_RPrBase_rFonts: //table fonts + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -944,50 +613,46 @@ void StyleSheetTable::sprm(Sprm & rSprm) // Add the properties to the table style TblStyleType nType = pTblStylePrHandler->getType( ); PropertyMapPtr pProps = pTblStylePrHandler->getProperties( ); - StyleSheetEntryPtr pEntry = m_pImpl->m_pCurrentEntry; - TableStyleSheetEntry* pTableEntry = static_cast( pEntry.get( ) ); - pTableEntry->AddTblStylePr( nType, pProps ); + StyleSheetEntry * pEntry = m_pImpl->m_pCurrentEntry.get(); + + if (nType == TBL_STYLE_UNKNOWN) + { + pEntry->pProperties->insert(pProps); + } + else + { + TableStyleSheetEntry * pTableEntry = dynamic_cast( pEntry ); + if (pTableEntry != NULL) + pTableEntry->AddTblStylePr( nType, pProps ); + } } break; } - case NS_ooxml::LN_CT_Style_tcPr: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_ooxml::LN_CT_Style_tblPr: //contains table properties - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_ooxml::LN_CT_DocDefaults_pPrDefault: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_ooxml::LN_CT_DocDefaults_rPrDefault: - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_ooxml::LN_CT_TblPrBase_tblInd: //table properties - at least width value and type - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ - case NS_ooxml::LN_EG_RPrBase_rFonts: //table fonts - resolveSprmProps(rSprm); - break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_PPrDefault_pPr: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultParaProps ); m_pImpl->m_rDMapper.sprm( rSprm ); m_pImpl->m_rDMapper.PopStyleSheetProperties(); applyDefaults( true ); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_RPrDefault_rPr: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pDefaultCharProps ); m_pImpl->m_rDMapper.sprm( rSprm ); m_pImpl->m_rDMapper.PopStyleSheetProperties(); applyDefaults( false ); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_jc: //table alignment - row properties! + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ m_pImpl->m_pCurrentEntry->pProperties->Insert( PROP_HORI_ORIENT, false, uno::makeAny( ConversionHelper::convertTableJustification( nIntValue ))); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TrPrBase_jc: //table alignment - row properties! + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ dynamic_cast< StyleSheetPropertyMap* >( m_pImpl->m_pCurrentEntry->pProperties.get() )->SetCT_TrPrBase_jc(nIntValue); break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblBorders: //table borders, might be defined in table style + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -1011,11 +676,13 @@ void StyleSheetTable::sprm(Sprm & rSprm) pTEntry->m_nColBandSize = nIntValue; } } + case NS_ooxml::LN_CT_TblPrBase_tblCellMar: + //no cell margins in styles break; - /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_pPr: /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ case NS_ooxml::LN_CT_Style_rPr: + /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ default: if (!m_pImpl->m_pCurrentEntry) break; @@ -1028,12 +695,20 @@ void StyleSheetTable::sprm(Sprm & rSprm) m_pImpl->m_rDMapper.PopStyleSheetProperties( ); } } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("StyleSheetTable.sprm"); +#endif } /*-- 19.06.2006 12:04:33--------------------------------------------------- -----------------------------------------------------------------------*/ void StyleSheetTable::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("StyleSheetTable.entry"); +#endif + //create a new style entry // printf("StyleSheetTable::entry(...)\n"); OSL_ENSURE( !m_pImpl->m_pCurrentEntry, "current entry has to be NULL here"); @@ -1052,8 +727,17 @@ void StyleSheetTable::entry(int /*pos*/, writerfilter::Reference::Po { //TODO: this entry contains the default settings - they have to be added to the settings } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->addTag(m_pImpl->m_pCurrentEntry->toTag()); +#endif + StyleSheetEntryPtr pEmptyEntry; m_pImpl->m_pCurrentEntry = pEmptyEntry; + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("StyleSheetTable.entry"); +#endif } /*-- 21.06.2006 15:34:49--------------------------------------------------- sorting helper @@ -1154,7 +838,8 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) { //TODO: Handle cases where a paragraph <> character style relation is needed StyleSheetEntryPtr pParent = FindStyleSheetByISTD( pEntry->sBaseStyleIdentifier ); - xStyle->setParentStyle(ConvertStyleName( pParent->sStyleName )); + if (pParent.get() != NULL) + xStyle->setParentStyle(ConvertStyleName( pParent->sStyleName )); } catch( const uno::RuntimeException& ) { @@ -1175,18 +860,18 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) // font size to 240 twip (12 pts) for all if not set pEntry->pProperties->Insert(PROP_CHAR_HEIGHT, true, aTwoHundredFortyTwip, false); // western font not already set -> apply first font - const FontEntry* pWesternFontEntry = rFontTable->getFontEntry( 0 ); + const FontEntry::Pointer_t pWesternFontEntry(rFontTable->getFontEntry( 0 )); rtl::OUString sWesternFontName = pWesternFontEntry->sFontName; pEntry->pProperties->Insert(PROP_CHAR_FONT_NAME, true, uno::makeAny( sWesternFontName ), false); // CJK ... apply second font - const FontEntry* pCJKFontEntry = rFontTable->getFontEntry( 2 ); + const FontEntry::Pointer_t pCJKFontEntry(rFontTable->getFontEntry( 2 )); pEntry->pProperties->Insert(PROP_CHAR_FONT_NAME_ASIAN, true, uno::makeAny( pCJKFontEntry->sFontName ), false); pEntry->pProperties->Insert(PROP_CHAR_HEIGHT_ASIAN, true, aTwoHundredFortyTwip, false); // CTL ... apply third font, if available if( nFontCount > 3 ) { - const FontEntry* pCTLFontEntry = rFontTable->getFontEntry( 3 ); + const FontEntry::Pointer_t pCTLFontEntry(rFontTable->getFontEntry( 3 )); pEntry->pProperties->Insert(PROP_CHAR_FONT_NAME_COMPLEX, true, uno::makeAny( pCTLFontEntry->sFontName ), false); pEntry->pProperties->Insert(PROP_CHAR_HEIGHT_COMPLEX, true, aTwoHundredFortyTwip, false); } @@ -1306,14 +991,26 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) uno::Reference< beans::XMultiPropertySet > xMultiPropertySet( xStyle, uno::UNO_QUERY_THROW); xMultiPropertySet->setPropertyValues( aSortedPropVals.getNames(), aSortedPropVals.getValues() ); } - catch( const beans::UnknownPropertyException& rUnknown) - { - (void) rUnknown; - OSL_ENSURE( false, "Some style properties could not be set"); - } catch( const lang::WrappedTargetException& rWrapped) { (void) rWrapped; + rtl::OString aMessage("Some style properties could not be set"); +#if OSL_DEBUG_LEVEL > 0 + beans::UnknownPropertyException aUnknownPropertyException; + + if( rWrapped.TargetException >>= aUnknownPropertyException ) + { + aMessage += rtl::OString(": " ); + ::rtl::OString sTemp; + aUnknownPropertyException.Message.convertToString(&sTemp, RTL_TEXTENCODING_ASCII_US, 0 ); + aMessage += sTemp; + } +#endif + OSL_ENSURE( false, aMessage.getStr()); + } + catch( const uno::Exception& rEx) + { + (void) rEx; OSL_ENSURE( false, "Some style properties could not be set"); } } diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index 0dd31ed52f9d..6eef483289ec 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -36,6 +36,10 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#endif + namespace com{ namespace sun { namespace star { namespace text{ class XTextDocument; }}}} @@ -56,8 +60,9 @@ enum StyleType }; struct StyleSheetTable_Impl; -struct StyleSheetEntry +class StyleSheetEntry { +public: ::rtl::OUString sStyleIdentifierI; ::rtl::OUString sStyleIdentifierD; bool bIsDefaultStyle; @@ -70,7 +75,13 @@ struct StyleSheetEntry ::rtl::OUString sStyleName1; PropertyMapPtr pProperties; ::rtl::OUString sConvertedStyleName; + +#ifdef DEBUG_DOMAINMAPPER + virtual XMLTag::Pointer_t toTag(); +#endif + StyleSheetEntry(); + virtual ~StyleSheetEntry(); }; typedef boost::shared_ptr StyleSheetEntryPtr; @@ -137,8 +148,12 @@ public: // + from the parent styles PropertyMapPtr GetProperties( sal_Int32 nMask ); +#ifdef DEBUG_DOMAINMAPPER + virtual XMLTag::Pointer_t toTag(); +#endif + TableStyleSheetEntry( StyleSheetEntry& aEntry, StyleSheetTable* pStyles ); - ~TableStyleSheetEntry( ); + virtual ~TableStyleSheetEntry( ); protected: PropertyMapPtr GetLocalPropertiesFromMask( sal_Int32 nMask ); diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx index e3739b56e636..10b2eed97a81 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx @@ -11,6 +11,7 @@ #include #include +#include namespace writerfilter { @@ -31,6 +32,11 @@ namespace dmapper { bool TablePropertiesHandler::sprm(Sprm & rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("TablePropertiesHandler.sprm"); + dmapper_logger->attribute("sprm", rSprm.toString()); +#endif + bool bRet = true; sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); @@ -133,6 +139,10 @@ namespace dmapper { pProperties->resolve(*pBorderHandler); TablePropertyMapPtr pTablePropMap( new TablePropertyMap ); pTablePropMap->insert( pBorderHandler->getProperties() ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->addTag(pTablePropMap->toTag()); +#endif insertTableProps( pTablePropMap ); } } @@ -210,8 +220,26 @@ namespace dmapper { } } break; + case NS_ooxml::LN_CT_TblPrBase_tblInd: + { + writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + if (pProperties.get()) + { + MeasureHandlerPtr pHandler(new MeasureHandler); + TablePropertyMapPtr pTblIndMap(new TablePropertyMap); + sal_uInt32 nTblInd = pHandler->getMeasureValue(); + pTblIndMap->setValue( TablePropertyMap::LEFT_MARGIN, nTblInd); + insertTableProps(pTblIndMap); + } + } + break; default: bRet = false; } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("TablePropertiesHandler.sprm"); +#endif + return bRet; } }} diff --git a/writerfilter/source/dmapper/TblStylePrHandler.cxx b/writerfilter/source/dmapper/TblStylePrHandler.cxx index d6f790990e22..53838353c3b0 100644 --- a/writerfilter/source/dmapper/TblStylePrHandler.cxx +++ b/writerfilter/source/dmapper/TblStylePrHandler.cxx @@ -1,6 +1,8 @@ #include #include #include +#include +#include namespace writerfilter { namespace dmapper { @@ -20,6 +22,13 @@ TblStylePrHandler::~TblStylePrHandler( ) void TblStylePrHandler::attribute(Id rName, Value & rVal) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("TblStylePrHandler.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(rName)); + dmapper_logger->chars(rVal.toString()); + dmapper_logger->endElement("TblStylePrHandler.attribute"); +#endif + switch ( rName ) { case NS_ooxml::LN_CT_TblStyleOverrideType: @@ -34,6 +43,11 @@ void TblStylePrHandler::attribute(Id rName, Value & rVal) void TblStylePrHandler::sprm(Sprm & rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("TblStylePrHandler.sprm"); + dmapper_logger->attribute("sprm", rSprm.toString()); +#endif + Value::Pointer_t pValue = rSprm.getValue(); switch ( rSprm.getId( ) ) { @@ -57,6 +71,10 @@ void TblStylePrHandler::sprm(Sprm & rSprm) m_rDMapper.PopStyleSheetProperties( true ); } } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("TblStylePrHandler.sprm"); +#endif } void TblStylePrHandler::resolveSprmProps(Sprm & rSprm) diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx old mode 100644 new mode 100755 index cde3c0d39082..ec9d8ea9d5a5 --- a/writerfilter/source/dmapper/ThemeTable.cxx +++ b/writerfilter/source/dmapper/ThemeTable.cxx @@ -25,9 +25,7 @@ * ************************************************************************/ -#ifndef INCLUDED_FONTTABLE_HXX #include -#endif #ifndef INCLUDED_RESOURCESIDS #include #include diff --git a/writerfilter/source/dmapper/dmapperLoggers.cxx b/writerfilter/source/dmapper/dmapperLoggers.cxx new file mode 100644 index 000000000000..29eece8a8f3d --- /dev/null +++ b/writerfilter/source/dmapper/dmapperLoggers.cxx @@ -0,0 +1,39 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: ooxmlLoggers.hxx,v $ + * $Revision: 1.2 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include "dmapperLoggers.hxx" + +namespace writerfilter { +namespace dmapper { + + + +} +} + diff --git a/writerfilter/source/doctok/WW8LFOLevel.cxx b/writerfilter/source/dmapper/dmapperLoggers.hxx similarity index 71% rename from writerfilter/source/doctok/WW8LFOLevel.cxx rename to writerfilter/source/dmapper/dmapperLoggers.hxx index b0a1d8c2c59d..a19ff4832370 100644 --- a/writerfilter/source/doctok/WW8LFOLevel.cxx +++ b/writerfilter/source/dmapper/dmapperLoggers.hxx @@ -2,10 +2,13 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: ooxmlLoggers.hxx,v $ + * $Revision: 1.2 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -25,21 +28,14 @@ * ************************************************************************/ -#include "resources.hxx" +#ifndef INCLUDED_DMAPPER_LOGGERS_HXX +#define INCLUDED_DMAPPER_LOGGERS_HXX -sal_uInt32 doctok::WW8LFOLevel::calcSize() -{ - sal_uInt32 nResult = doctok::WW8LFOLevel::getSize(); +#include - if (get_fFormatting()) - { - doctok::WW8ListLevel aLevel(parent, mnOffsetInParent + nResult) - nResult += aLevel.calcSize(); - - sal_uInt32 nXstSize = parent->getU16(nOffset); - - nResult += (nXstSize + 1) * 2; +namespace writerfilter { + namespace dmapper { + extern TagLogger::Pointer_t dmapper_logger; } - - return nResult; } +#endif // INCLUDED_DMAPPER_LOGGERS_HXX diff --git a/writerfilter/source/dmapper/makefile.mk b/writerfilter/source/dmapper/makefile.mk old mode 100644 new mode 100755 index b757af3fedeb..dd94415aa966 --- a/writerfilter/source/dmapper/makefile.mk +++ b/writerfilter/source/dmapper/makefile.mk @@ -38,32 +38,34 @@ ENABLE_EXCEPTIONS=TRUE # --- Files ------------------------------------- -SLOFILES= $(SLO)$/BorderHandler.obj \ - $(SLO)$/TblStylePrHandler.obj \ - $(SLO)$/GraphicHelpers.obj \ - $(SLO)$/TablePropertiesHandler.obj \ - $(SLO)$/CellColorHandler.obj \ - $(SLO)$/CellMarginHandler.obj \ - $(SLO)$/SectionColumnHandler.obj \ - $(SLO)$/ConversionHelper.obj \ - $(SLO)$/DomainMapper.obj \ - $(SLO)$/DomainMapper_Impl.obj \ - $(SLO)$/DomainMapperTableHandler.obj \ - $(SLO)$/DomainMapperTableManager.obj \ - $(SLO)$/FontTable.obj \ - $(SLO)$/GraphicImport.obj \ - $(SLO)$/LFOTable.obj \ - $(SLO)$/ListTable.obj \ - $(SLO)$/MeasureHandler.obj \ - $(SLO)$/PropertyMap.obj \ - $(SLO)$/PropertyIds.obj \ - $(SLO)$/StyleSheetTable.obj \ - $(SLO)$/TDefTableHandler.obj \ - $(SLO)$/ThemeTable.obj \ - $(SLO)$/SettingsTable.obj \ - $(SLO)$/ModelEventListener.obj\ - $(SLO)$/OLEHandler.obj \ - $(SLO)$/PageBordersHandler.obj +SLOFILES= \ + $(SLO)$/BorderHandler.obj \ + $(SLO)$/CellColorHandler.obj \ + $(SLO)$/CellMarginHandler.obj \ + $(SLO)$/ConversionHelper.obj \ + $(SLO)$/DomainMapper.obj \ + $(SLO)$/DomainMapperTableHandler.obj \ + $(SLO)$/DomainMapperTableManager.obj \ + $(SLO)$/DomainMapper_Impl.obj \ + $(SLO)$/FontTable.obj \ + $(SLO)$/GraphicHelpers.obj \ + $(SLO)$/GraphicImport.obj \ + $(SLO)$/LFOTable.obj \ + $(SLO)$/ListTable.obj \ + $(SLO)$/MeasureHandler.obj \ + $(SLO)$/ModelEventListener.obj \ + $(SLO)$/OLEHandler.obj \ + $(SLO)$/PageBordersHandler.obj \ + $(SLO)$/PropertyIds.obj \ + $(SLO)$/PropertyMap.obj \ + $(SLO)$/PropertyMapHelper.obj \ + $(SLO)$/SectionColumnHandler.obj \ + $(SLO)$/SettingsTable.obj \ + $(SLO)$/StyleSheetTable.obj \ + $(SLO)$/TDefTableHandler.obj \ + $(SLO)$/TablePropertiesHandler.obj \ + $(SLO)$/TblStylePrHandler.obj \ + $(SLO)$/ThemeTable.obj # --- Targets ---------------------------------- diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index d314854836e9..cda79dad1cdf 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -228,6 +228,11 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) break; } + if (mpFib->get_nFib() >= 0xD9) + { + mpFibRgFcLcb2000.reset(new WW8FibRgFcLcb2000(*mpFib)); + } + if (mpTableStream.get() == NULL) throw ExceptionNotFound("Table stream not found."); @@ -966,21 +971,45 @@ WW8SED * WW8DocumentImpl::getSED(const CpAndFc & rCpAndFc) const return pResult; } +writerfilter::Reference::Pointer_t WW8DocumentImpl::getListTplcs() const +{ + writerfilter::Reference
::Pointer_t pResult; + + if (mpFibRgFcLcb2000.get() != NULL && + mpFibRgFcLcb2000->get_fcSttbRgtplc() != 0 && + mpFibRgFcLcb2000->get_lcbSttbRgtplc() != 0) + { + WW8SttbRgtplc * pSttbRgtplc = + new WW8SttbRgtplc(*mpTableStream, + mpFibRgFcLcb2000->get_fcSttbRgtplc(), + mpFibRgFcLcb2000->get_lcbSttbRgtplc()); + + pResult = writerfilter::Reference
::Pointer_t(pSttbRgtplc); + } + + return pResult; +} + writerfilter::Reference
::Pointer_t WW8DocumentImpl::getListTable() const { writerfilter::Reference
::Pointer_t pResult; if (mpFib->get_fcPlcfLst() != 0 && mpFib->get_lcbPlcfLst() > 0) { - WW8ListTable * pList = new WW8ListTable(*mpTableStream, - mpFib->get_fcPlcfLst(), - mpFib->get_fcPlfLfo() - - mpFib->get_fcPlcfLst()); + try + { + WW8ListTable * pList = new WW8ListTable(*mpTableStream, + mpFib->get_fcPlcfLst(), + mpFib->get_fcPlfLfo() - + mpFib->get_fcPlcfLst()); - pList->setPayloadOffset(mpFib->get_lcbPlcfLst()); - pList->initPayload(); + pList->setPayloadOffset(mpFib->get_lcbPlcfLst()); + pList->initPayload(); - pResult = writerfilter::Reference
::Pointer_t(pList); + pResult = writerfilter::Reference
::Pointer_t(pList); + } + catch (ExceptionOutOfBounds aException) { + } } return pResult; @@ -1433,7 +1462,7 @@ void WW8DocumentImpl::utext(Stream & rStream, const sal_uInt8 * data, size_t len debug_logger->chars(OUStringToOString(sText, RTL_TEXTENCODING_ASCII_US).getStr()); debug_logger->endElement("utext"); #endif - rStream.text(data, len); + rStream.utext(data, len); } @@ -1618,6 +1647,13 @@ void WW8DocumentImpl::resolve(Stream & rStream) (new WW8Fib(*mpFib)); rStream.props(pFib); + if (mpFibRgFcLcb2000.get() != NULL) + { + writerfilter::Reference::Pointer_t pFibRgFcLcb2000 + (new WW8FibRgFcLcb2000(*mpFibRgFcLcb2000)); + rStream.props(pFibRgFcLcb2000); + } + #if 0 if (mpTextBoxStories.get() != NULL) { @@ -1685,6 +1721,10 @@ void WW8DocumentImpl::resolve(Stream & rStream) } #endif + writerfilter::Reference
::Pointer_t pSttbRgtplc = getListTplcs(); + + if (pSttbRgtplc.get() != NULL) + rStream.table(NS_rtf::LN_SttbRgtplc, pSttbRgtplc); writerfilter::Reference
::Pointer_t pListTable = getListTable(); diff --git a/writerfilter/source/doctok/WW8DocumentImpl.hxx b/writerfilter/source/doctok/WW8DocumentImpl.hxx index 65c24e913b37..9b123ae54cde 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.hxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.hxx @@ -299,6 +299,9 @@ class WW8DocumentImpl : public WW8Document /// pointer to the file information block WW8Fib::Pointer_t mpFib; + /// pointer to the file information block for post 2000 documents + WW8FibRgFcLcb2000::Pointer_t mpFibRgFcLcb2000; + /// pointer to the offsets of headers/footers WW8StructBase::Pointer_t mpHeaderOffsets; @@ -395,8 +398,6 @@ public: virtual WW8Stream::Sequence getText(const CpAndFc & rStart); - WW8Fib::Pointer_t getFib() const; - /** Returns the document stream. */ @@ -527,6 +528,11 @@ public: */ WW8SED * getSED(const CpAndFc & rCpAndFc) const; + /** + Return reference to list plcs. + */ + writerfilter::Reference
::Pointer_t getListTplcs() const; + /** Return reference to list table. */ diff --git a/writerfilter/source/doctok/WW8LFOTable.cxx b/writerfilter/source/doctok/WW8LFOTable.cxx index e0bf6d793d64..2164c4887c8b 100644 --- a/writerfilter/source/doctok/WW8LFOTable.cxx +++ b/writerfilter/source/doctok/WW8LFOTable.cxx @@ -35,39 +35,37 @@ void WW8LFOTable::initPayload() sal_uInt32 nCount = getEntryCount(); sal_uInt32 nOffset = 4; - sal_uInt32 nOffsetLevel = mnPlcfPayloadOffset; + sal_uInt32 nOffsetLFOData = mnPlcfPayloadOffset; for (sal_uInt32 n = 0; n < nCount; ++n) { WW8LFO aLFO(this, nOffset); entryOffsets.push_back(nOffset); - payloadIndices.push_back(payloadOffsets.size()); nOffset += WW8LFO::getSize(); - sal_uInt32 nLvlCount = aLFO.get_lfolevel_count(); + payloadOffsets.push_back(nOffsetLFOData); + payloadIndices.push_back(n); - for (sal_uInt32 i = 0; i < nLvlCount; ++i) + nOffsetLFOData += 4; + + sal_uInt32 nLvls = aLFO.get_clfolvl(); + + for (sal_uInt32 k = 0; k < nLvls; ++k) { - WW8LFOLevel aLevel(this, nOffsetLevel); - - payloadOffsets.push_back(nOffsetLevel); - - nOffsetLevel += aLevel.calcSize(); + WW8LFOLevel aLevel(this, nOffsetLFOData); + nOffsetLFOData += aLevel.calcSize(); } } entryOffsets.push_back(nOffset); - payloadOffsets.push_back(nOffsetLevel); + payloadOffsets.push_back(nOffsetLFOData); } sal_uInt32 WW8LFOTable::calcPayloadOffset() { sal_uInt32 nResult = 4 + getEntryCount() * WW8LFO::getSize(); - while (getU32(nResult) == 0xffffffff) - nResult += 4; - return nResult; } @@ -86,11 +84,18 @@ WW8LFOTable::getEntry(sal_uInt32 nIndex) return writerfilter::Reference::Pointer_t(pLFO); } -sal_uInt32 WW8LFO::get_lfolevel_count() +writerfilter::Reference::Pointer_t +WW8LFO::get_LFOData() { - return get_clfolvl(); + WW8LFOTable * pLFOTable = dynamic_cast(mpParent); + sal_uInt32 nPayloadOffset = pLFOTable->getPayloadOffset(mnIndex); + sal_uInt32 nPayloadSize = pLFOTable->getPayloadSize(mnIndex); + + return writerfilter::Reference::Pointer_t + (new WW8LFOData(mpParent, nPayloadOffset, nPayloadSize)); } +/* writerfilter::Reference::Pointer_t WW8LFO::get_lfolevel(sal_uInt32 nIndex) { @@ -102,6 +107,7 @@ WW8LFO::get_lfolevel(sal_uInt32 nIndex) return writerfilter::Reference::Pointer_t (new WW8LFOLevel(mpParent, nPayloadOffset, nPayloadSize)); } +*/ void WW8LFOLevel::resolveNoAuto(Properties & /*rHandler*/) { diff --git a/writerfilter/source/doctok/WW8ListTable.cxx b/writerfilter/source/doctok/WW8ListTable.cxx index 4e2e476f08e2..f70c7740dff2 100644 --- a/writerfilter/source/doctok/WW8ListTable.cxx +++ b/writerfilter/source/doctok/WW8ListTable.cxx @@ -26,6 +26,7 @@ ************************************************************************/ #include +#include namespace writerfilter { namespace doctok { @@ -53,10 +54,6 @@ void WW8ListTable::initPayload() payloadOffsets.push_back(nOffsetLevel); nOffsetLevel += aLevel.calcSize(); - - sal_uInt32 nXstSize = getU16(nOffsetLevel); - - nOffsetLevel += 2 + nXstSize * 2; } if (nOffsetLevel > getCount()) @@ -112,6 +109,16 @@ WW8List::get_listlevel(sal_uInt32 nIndex) (new WW8ListLevel(mpParent, nPayloadOffset, nPayloadSize)); } +::rtl::OUString WW8ListLevel::get_xst() +{ + sal_uInt32 nOffset = WW8ListLevel::getSize(); + + nOffset += get_cbGrpprlPapx(); + nOffset += get_cbGrpprlChpx(); + + return getString(nOffset); +} + void WW8ListLevel::resolveNoAuto(Properties & rHandler) { sal_uInt32 nOffset = getSize(); @@ -133,12 +140,6 @@ void WW8ListLevel::resolveNoAuto(Properties & rHandler) WW8PropertiesReference aRef(pSet); aRef.resolve(rHandler); } - - nOffset += get_cbGrpprlChpx(); - - WW8StringValue aVal(getString(nOffset)); - - rHandler.attribute(0, aVal); } sal_uInt32 WW8ListLevel::calcSize() @@ -147,6 +148,7 @@ sal_uInt32 WW8ListLevel::calcSize() nResult += get_cbGrpprlPapx(); nResult += get_cbGrpprlChpx(); + nResult += 2 + getU16(nResult) * 2; return nResult; } diff --git a/writerfilter/source/doctok/WW8PropertySetImpl.cxx b/writerfilter/source/doctok/WW8PropertySetImpl.cxx index 88633102e940..7b0cf28282c7 100644 --- a/writerfilter/source/doctok/WW8PropertySetImpl.cxx +++ b/writerfilter/source/doctok/WW8PropertySetImpl.cxx @@ -147,7 +147,15 @@ sal_uInt32 WW8PropertyImpl::getByteLength() const break; default: - nParamSize = getU8(2) + 1; + switch (getId()) + { + case 0xd608: + nParamSize = getU16(2) + 1; + break; + default: + nParamSize = getU8(2) + 1; + break; + } break; } @@ -314,7 +322,7 @@ string WW8PropertySetImpl::getType() const return "WW8PropertySetImpl"; } -void WW8PropertySetImpl::resolveLocal(Sprm & sprm) +void WW8PropertySetImpl::resolveLocal(Sprm & sprm, Properties & rHandler) { switch (sprm.getId()) { @@ -329,6 +337,27 @@ void WW8PropertySetImpl::resolveLocal(Sprm & sprm) { getDocument()->setPicIsData(true); } + break; + case 0x6646: + { + WW8Stream::Pointer_t pStream = getDocument()->getDataStream(); + + if (pStream.get() != NULL) + { + Value::Pointer_t pValue = sprm.getValue(); + sal_uInt32 nOffset = pValue->getInt(); + WW8StructBase aStruct(*pStream, nOffset, 2); + sal_uInt16 nCount = aStruct.getU16(0); + + { + WW8PropertySetImpl * pPropSet = + new WW8PropertySetImpl(*pStream, nOffset + 2, nCount); + + pPropSet->resolve(rHandler); + } + } + } + break; default: break; } @@ -353,7 +382,7 @@ void WW8PropertySetImpl::resolve(Properties & rHandler) rHandler.sprm(aSprm); - resolveLocal(aSprm); + resolveLocal(aSprm, rHandler); ++(*pIt); } diff --git a/writerfilter/source/doctok/WW8PropertySetImpl.hxx b/writerfilter/source/doctok/WW8PropertySetImpl.hxx index 5c5c42b73a15..2f7bb0f34708 100644 --- a/writerfilter/source/doctok/WW8PropertySetImpl.hxx +++ b/writerfilter/source/doctok/WW8PropertySetImpl.hxx @@ -104,12 +104,13 @@ public: virtual void resolve(Properties & rHandler); /** - Get and distribute information from sprm that is used - internally by the document. + Get and distribute information from sprm that is used + internally by the document. - @param rSprm sprm to process + @param rSprm sprm to process + @param rHandler property handler to resolve huge papx (sprm 0x6646) to */ - virtual void resolveLocal(Sprm & rSprm); + virtual void resolveLocal(Sprm & rSprm, Properties & rHandler); }; class WW8PropertySetIteratorImpl : public WW8PropertySetIterator diff --git a/writerfilter/source/doctok/WW8StructBase.cxx b/writerfilter/source/doctok/WW8StructBase.cxx index e4149ca29874..7d03e8763c69 100644 --- a/writerfilter/source/doctok/WW8StructBase.cxx +++ b/writerfilter/source/doctok/WW8StructBase.cxx @@ -115,16 +115,25 @@ rtl::OUString WW8StructBase::getString(sal_uInt32 nOffset, sal_uInt32 nCount) { rtl::OUString aResult; - Sequence aSeq(mSequence, nOffset, nCount * 2); - - if (nCount > 0) + if (nOffset < getCount()) { - rtl_uString * pNew = 0; - rtl_uString_newFromStr_WithLength - (&pNew, reinterpret_cast(&aSeq[0]), - nCount); + sal_uInt32 nCount1 = nCount; + if (nOffset + nCount * 2 > getCount()) + { + nCount1 = (getCount() - nOffset) / 2; + } - aResult = rtl::OUString(pNew); + if (nCount1 > 0) + { + Sequence aSeq(mSequence, nOffset, nCount1 * 2); + + rtl_uString * pNew = 0; + rtl_uString_newFromStr_WithLength + (&pNew, reinterpret_cast(&aSeq[0]), + nCount1); + + aResult = rtl::OUString(pNew); + } } return aResult; diff --git a/writerfilter/source/doctok/WW8Sttbf.cxx b/writerfilter/source/doctok/WW8Sttbf.cxx index e5d87b9aeaa0..36e2e805436d 100644 --- a/writerfilter/source/doctok/WW8Sttbf.cxx +++ b/writerfilter/source/doctok/WW8Sttbf.cxx @@ -26,6 +26,7 @@ ************************************************************************/ #include +#include namespace writerfilter { namespace doctok @@ -86,4 +87,82 @@ WW8StructBase::Pointer_t WW8Sttbf::getExtraData(sal_uInt32 nPos) (new WW8StructBase(*this, getExtraOffset(nPos), mnExtraDataCount)); } +WW8SttbTableResource::WW8SttbTableResource(WW8Sttbf::Pointer_t pSttbf) +: mpSttbf(pSttbf) +{ +} + +WW8SttbTableResource::~WW8SttbTableResource() +{ +} + +void WW8SttbTableResource::resolve(Table & rTable) +{ + sal_uInt32 nCount = mpSttbf->getEntryCount(); + + for (sal_uInt32 n = 0; n < nCount; n++) + { + WW8StringValue::Pointer_t pVal(new WW8StringValue(mpSttbf->getEntry(n))); + ::writerfilter::Reference::Pointer_t pProps(new WW8StringProperty(0, pVal)); + + rTable.entry(n, pProps); + } +} + +string WW8SttbTableResource::getType() const +{ + return "WW8SttbTableResource"; +} + +WW8StringProperty::WW8StringProperty(sal_uInt32 nId, WW8StringValue::Pointer_t pValue) +: mnId(nId), mpValue(pValue) +{ +} + +WW8StringProperty::~WW8StringProperty() +{ +} + +void WW8StringProperty::resolve(Properties & rProperties) +{ + rProperties.attribute(mnId, *mpValue); +} + +string WW8StringProperty::getType() const +{ + return "WW8StringProperty"; +} + +sal_uInt32 WW8SttbRgtplc::getEntryCount() +{ + return getU16(2); +} + +::writerfilter::Reference::Pointer_t +WW8SttbRgtplc::getEntry(sal_uInt32 nIndex) +{ + ::writerfilter::Reference::Pointer_t pResult; + + sal_uInt32 nOffset = 6; + + while (nIndex > 0) + { + sal_uInt16 nCount = getU16(nOffset); + + nOffset = nOffset + 2 + nCount; + ++nIndex; + } + + sal_uInt16 nCount = getU16(nOffset); + + if (nCount > 0) + { + WW8Tplc * pTplc = new WW8Tplc(*this, nOffset + 2, nCount); + + pResult.reset(pTplc); + } + + return pResult; +} + }} diff --git a/writerfilter/source/doctok/WW8Sttbf.hxx b/writerfilter/source/doctok/WW8Sttbf.hxx index 2cdae76d7e11..5c82d94723a9 100644 --- a/writerfilter/source/doctok/WW8Sttbf.hxx +++ b/writerfilter/source/doctok/WW8Sttbf.hxx @@ -29,6 +29,7 @@ #define INCLUDED_WW8_STTBF_HXX #include +#include #include #include @@ -99,5 +100,33 @@ public: */ WW8StructBase::Pointer_t getExtraData(sal_uInt32 nPos); }; + +class WW8SttbTableResource : public ::writerfilter::Reference
+{ + WW8Sttbf::Pointer_t mpSttbf; + +public: + WW8SttbTableResource(WW8Sttbf::Pointer_t pSttbf); + virtual ~WW8SttbTableResource(); + + void resolve(Table & rTable); + + string getType() const; +}; + +class WW8StringProperty : public ::writerfilter::Reference +{ + sal_uInt32 mnId; + WW8StringValue::Pointer_t mpValue; + +public: + WW8StringProperty(sal_uInt32 nId, WW8StringValue::Pointer_t pValue); + virtual ~WW8StringProperty(); + + void resolve(Properties & rProperties); + + string getType() const; +}; + }} #endif // INCLUDED_WW8_STTBF diff --git a/writerfilter/source/doctok/cleanupresources b/writerfilter/source/doctok/cleanupresources new file mode 100755 index 000000000000..646c1ea4e0a7 --- /dev/null +++ b/writerfilter/source/doctok/cleanupresources @@ -0,0 +1,5 @@ +#!/bin/bash + +TEMP=`mktemp -t cleanupresources` +xsltproc tidyxmi.xsl resources.xmi | xmllint --format - > $TEMP +mv $TEMP resources.xmi diff --git a/writerfilter/source/doctok/compactxmi.xsl b/writerfilter/source/doctok/compactxmi.xsl new file mode 100644 index 000000000000..36ab4f5c5f9a --- /dev/null +++ b/writerfilter/source/doctok/compactxmi.xsl @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + classid + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + 1 + 2 + 2 + 4 + 4 + 0 + + + + + + + + + + + + + + + attrid + + + + + + + + + mask + + + + + offset + + + + + + + + + + + + + arraycount + + + + + + + + + + + + + + + + + + + + + + attrid + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + opid + + + + + + + + + + + + + + + + + + + + + + + + sprmcode + + + + + kind + + + + + sprmid + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index 65b471e280e2..bc3bd81761a5 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -6,7 +6,7 @@ - + Class @@ -73,16 +73,16 @@ Attribute - - + + - - + + @@ -96,9 +96,9 @@ - - - + + + @@ -108,8 +108,8 @@ - - + + @@ -119,8 +119,8 @@ - - + + @@ -130,8 +130,8 @@ - - + + @@ -141,8 +141,8 @@ - - + + @@ -152,8 +152,8 @@ - - + + @@ -174,8 +174,8 @@ - - + + @@ -553,9 +553,9 @@ - - - + + + @@ -576,9 +576,9 @@ - - - + + + @@ -598,7 +598,7 @@ - start at value for this list level + @@ -606,7 +606,7 @@ - 0x00 + 0 @@ -614,7 +614,7 @@ - 0 + @@ -630,7 +630,7 @@ - 4 + @@ -656,7 +656,7 @@ - number format code (see anld.nfc for a list of options) + @@ -664,7 +664,7 @@ - 0x04 + 4 @@ -672,7 +672,7 @@ - 0 + @@ -688,7 +688,7 @@ - 1 + @@ -714,8 +714,7 @@ - alignment (left, right, or centered) of the paragraph - number. + @@ -723,7 +722,7 @@ - 0x05 + 5 @@ -731,7 +730,7 @@ - 0 + 6 @@ -739,7 +738,7 @@ - 0x03 + 0xc0 @@ -747,7 +746,7 @@ - :2 + 2 @@ -770,11 +769,10 @@ - + - true (==1) if the level turns all inherited numbers to arabic, - false if it preserves their number format code (nfc) + @@ -782,7 +780,7 @@ - 0x05 + 5 @@ -790,7 +788,7 @@ - 2 + 5 @@ -798,7 +796,7 @@ - 0x04 + 0x20 @@ -806,7 +804,7 @@ - :1 + 1 @@ -832,8 +830,7 @@ - true if the level's number sequence is not restarted by higher - (more significant) levels in the list + @@ -841,7 +838,7 @@ - 0x05 + 5 @@ -849,7 +846,7 @@ - 3 + 4 @@ -857,7 +854,7 @@ - 0x08 + 0x0 @@ -865,7 +862,7 @@ - :1 + 1 @@ -888,86 +885,26 @@ - + - Word 6 compatibility option: equivalent to anld.fPrev (see - ANLD) + - - - 0x05 - - - - - - - - 4 - - - - - - - - 0x10 - - - - - - - - :1 - - - - - - - - rtf:FPREV - - - - - - - - - - - - - - - - - - Word 6 compatibility option: equivalent to anld.fPrevSpace (see - ANLD) - - - - - - - - 0x05 - - - - - 5 + + + + + + + + 3 @@ -975,7 +912,7 @@ - 0x20 + 0x8 @@ -983,7 +920,7 @@ - :1 + 1 @@ -991,7 +928,7 @@ - rtf:FPREVSPACE + rtf:FIDENTSAV @@ -1006,12 +943,10 @@ - + - true if this level was from a converted Word 6 document. If it - is true, all of the Word 6 compability options become valid; - otherwise they are ignored. + @@ -1019,7 +954,7 @@ - 0x05 + 5 @@ -1027,7 +962,7 @@ - 6 + 2 @@ -1035,7 +970,7 @@ - 0x40 + 0x4 @@ -1043,7 +978,7 @@ - :1 + 1 @@ -1051,7 +986,7 @@ - rtf:FWORD6 + rtf:FCONVERTED @@ -1066,10 +1001,10 @@ - + - unused. + @@ -1077,7 +1012,7 @@ - 0x05 + 5 @@ -1085,7 +1020,7 @@ - 7 + 0 @@ -1093,7 +1028,7 @@ - 0x80 + 0x1 @@ -1101,7 +1036,7 @@ - :1 + 1 @@ -1109,7 +1044,7 @@ - rtf:UNUSED5_7 + rtf:FTENTATIVE @@ -1127,13 +1062,7 @@ - contains the character offsets into the LVL's XST of the - inherited numbers of previous levels. This array should be zero - terminated unless it is full (all 9 levels full). The XST contains - place holders for any paragraph numbers contained in the text of - the number, and the place holder contains the ilvl of the inherited - number, so lvl.xst[lvl.rgbxchNums[0]] == the level of the first - inherited number in this level. + @@ -1141,7 +1070,7 @@ - 0x06 + 6 @@ -1149,7 +1078,7 @@ - 0 + @@ -1165,7 +1094,7 @@ - 9 + @@ -1199,8 +1128,7 @@ - the type of character following the number text for the - paragraph: 0 == tab, 1 == space, 2 == nothing. + @@ -1208,7 +1136,7 @@ - 0x0F + 15 @@ -1216,7 +1144,7 @@ - 0 + @@ -1232,7 +1160,7 @@ - 1 + @@ -1258,8 +1186,7 @@ - Word 6 compatibility option: equivalent to anld.dxaSpace (see - ANLD) + @@ -1267,7 +1194,7 @@ - 0x10 + 16 @@ -1275,7 +1202,7 @@ - 0 + @@ -1291,7 +1218,7 @@ - 4 + @@ -1317,8 +1244,7 @@ - Word 6 compatibility optino: equivalent to anld.dxaIndent (see - ANLD) + @@ -1326,7 +1252,7 @@ - 0x14 + 20 @@ -1334,7 +1260,7 @@ - 0 + @@ -1350,7 +1276,7 @@ - 4 + @@ -1376,7 +1302,7 @@ - length, in bytes, of the LVL's grpprlChpx + @@ -1384,7 +1310,7 @@ - 0x18 + 24 @@ -1392,7 +1318,7 @@ - 0 + @@ -1408,7 +1334,7 @@ - 1 + @@ -1434,7 +1360,7 @@ - length, in bytes, of the LVL's grpprlPapx + @@ -1442,7 +1368,7 @@ - 0x19 + 25 @@ -1450,7 +1376,7 @@ - 0 + @@ -1466,7 +1392,7 @@ - 1 + @@ -1489,10 +1415,10 @@ - + - reserved + @@ -1500,7 +1426,7 @@ - 0X1A + 26 @@ -1508,7 +1434,7 @@ - 0 + @@ -1524,7 +1450,7 @@ - 2 + @@ -1532,20 +1458,100 @@ - rtf:RESERVED + rtf:ilvlRestartLim - + + + + + + + + + + + + + + 27 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:grfhic + + + + + + + + + + + + + + + + + + rtf:xst + + + + + + + + + + + + + + + + + @@ -1555,8 +1561,8 @@ - - + + @@ -1593,10 +1599,12 @@ + + - Unique List ID + @@ -1604,7 +1612,7 @@ - 0x00 + 0 @@ -1612,7 +1620,7 @@ - 0 + @@ -1628,7 +1636,7 @@ - 4 + @@ -1654,7 +1662,7 @@ - Unique template code + @@ -1662,7 +1670,7 @@ - 0x04 + 4 @@ -1670,7 +1678,7 @@ - 0 + @@ -1686,7 +1694,7 @@ - 4 + @@ -1709,11 +1717,10 @@ - + - Array of shorts containing the istd's linked to each level of - the list, or istdNil (4095) if no style is linked. + @@ -1721,7 +1728,123 @@ - 0x08 + 4 + + + + + + + + 31 + + + + + + + + 0x80000000 + + + + + + + + 1 + + + + + + + + rtf:fBuildIn + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + 16 + + + + + + + + 0x7fff0000 + + + + + + + + 15 + + + + + + + + rtf:ilgpdM1 + + + + + + + + + + + + + + + + + + + + + + + + + + 4 @@ -1735,6 +1858,122 @@ + + + 0xffff + + + + + + + + 16 + + + + + + + + rtf:lid + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + 0 + + + + + + + + 0x7fffffff + + + + + + + + 31 + + + + + + + + rtf:random + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + + + + + + + + + + + + + @@ -1745,7 +1984,7 @@ - 18 + @@ -1779,8 +2018,7 @@ - true if this is a simple (one-level) list; false if this is a - multilevel (nine-level) list. + @@ -1788,7 +2026,7 @@ - 0x1A + 14 @@ -1796,7 +2034,7 @@ - 0 + 7 @@ -1804,7 +2042,7 @@ - 0x01 + 0x80 @@ -1812,7 +2050,7 @@ - :1 + 1 @@ -1835,11 +2073,10 @@ - + - Word 6 compatibility option: true if the list should start - numbering over at the beginning of each section + @@ -1847,31 +2084,31 @@ - 0x1A + 14 + + + 5 + + + + + + + + 0x20 + + + + + 1 - - - - - - - - 0x02 - - - - - - - - :1 @@ -1879,7 +2116,7 @@ - rtf:FRESTARTHDN + rtf:fAutoNum @@ -1894,10 +2131,10 @@ - + - reserved + @@ -1905,7 +2142,7 @@ - 0x1A + 14 @@ -1913,7 +2150,7 @@ - 2 + 3 @@ -1921,7 +2158,7 @@ - 0xFC + 0x8 @@ -1929,7 +2166,7 @@ - :6 + 1 @@ -1937,7 +2174,7 @@ - rtf:UNSIGNED26_2 + rtf:fHybrid @@ -1952,10 +2189,10 @@ - + - reserved + @@ -1963,7 +2200,7 @@ - 0x1B + 14 @@ -1977,6 +2214,64 @@ + + + 0x7 + + + + + + + + 3 + + + + + + + + rtf:reserved1 + + + + + + + + + + + + + + + + + + + + + + + + + + 27 + + + + + + + + + + + + + @@ -1987,7 +2282,7 @@ - U8 + @@ -1995,7 +2290,7 @@ - rtf:RESERVED + rtf:grfhic @@ -2018,8 +2313,8 @@ - - + + @@ -2044,8 +2339,8 @@ - - + + @@ -2074,7 +2369,7 @@ - 0 + 0x0 @@ -2132,7 +2427,7 @@ - 4 + 0x4 @@ -2190,7 +2485,7 @@ - 4 + 0x4 @@ -2249,7 +2544,7 @@ - 4 + 0x4 @@ -2307,7 +2602,7 @@ - 4 + 0x4 @@ -2365,7 +2660,7 @@ - 5 + 0x5 @@ -2428,8 +2723,8 @@ - - + + @@ -2439,37 +2734,17 @@ - 16 + 15 - - - - rtf:LFO - - - - - - - - - - - - - - - - - List ID of corresponding LSTF (see LSTF) + @@ -2477,7 +2752,7 @@ - 0x0 + 0 @@ -2485,7 +2760,7 @@ - 0 + @@ -2499,67 +2774,9 @@ - - - 4 - - - - - - - - rtf:LSID - - - - - - - - - - - - - - - - - - reserved - - - - - - - - 0x4 - - - - - - - - 0 - - - - - - - - - - - - - 4 @@ -2567,65 +2784,7 @@ - rtf:UNUSED4 - - - - - - - - - - - - - - - - - - reserved - - - - - - - - 0x8 - - - - - - - - 0 - - - - - - - - - - - - - - - - 4 - - - - - - - - rtf:UNUSED8 + rtf:lsid @@ -2643,7 +2802,7 @@ - count of levels whose format is overridden (see LFOLVL) + @@ -2651,7 +2810,7 @@ - 0xC + 12 @@ -2659,7 +2818,7 @@ - 0 + @@ -2675,7 +2834,7 @@ - 1 + @@ -2683,7 +2842,7 @@ - rtf:CLFOLVL + rtf:clfolvl @@ -2698,10 +2857,10 @@ - + - reserved + @@ -2709,7 +2868,7 @@ - 0xD + 13 @@ -2717,7 +2876,7 @@ - 0 + @@ -2733,7 +2892,7 @@ - 3 + @@ -2741,28 +2900,100 @@ - rtf:RESERVED + rtf:ibstFltAutoNum - - - 3 - - - - - - + + + + + + + + + + + + + + 14 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:grfhic + + + + + + + + + + + + + + + + + + rtf:LFOData + + + + + + + + + + + + + + + + + @@ -2772,8 +3003,112 @@ - - + + + + + + + + + rtf:SttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:cp + + + + + + + + + + + + + + + + + + + + + + + + @@ -2798,8 +3133,8 @@ - - + + @@ -2824,8 +3159,8 @@ - - + + @@ -2927,7 +3262,7 @@ - 0 + 0x0 @@ -2985,7 +3320,7 @@ - 1 + 0x1 @@ -3043,7 +3378,7 @@ - 1 + 0x1 @@ -3101,7 +3436,7 @@ - 1 + 0x1 @@ -3159,7 +3494,7 @@ - 1 + 0x1 @@ -3217,7 +3552,7 @@ - 1 + 0x1 @@ -3275,7 +3610,7 @@ - 2 + 0x2 @@ -3333,7 +3668,7 @@ - 4 + 0x4 @@ -3391,7 +3726,7 @@ - 5 + 0x5 @@ -3449,7 +3784,7 @@ - 6 + 0x6 @@ -3515,7 +3850,7 @@ - 10 + 0x10 @@ -3578,8 +3913,8 @@ - - + + @@ -4440,8 +4775,8 @@ - - + + @@ -4461,7 +4796,7 @@ - 0 + 0x0 @@ -4517,7 +4852,7 @@ - 2 + 0x2 @@ -4575,7 +4910,7 @@ - 4 + 0x4 @@ -4633,7 +4968,7 @@ - 6 + 0x6 @@ -4691,7 +5026,7 @@ - 6 + 0x6 @@ -4749,7 +5084,7 @@ - 8 + 0x8 @@ -4994,8 +5329,8 @@ - - + + @@ -5023,7 +5358,7 @@ - 0000 + 0x0000 @@ -5082,7 +5417,7 @@ - 0002 + 0x0002 @@ -5140,7 +5475,7 @@ - 0004 + 0x0004 @@ -5200,7 +5535,7 @@ - 0006 + 0x0006 @@ -5258,7 +5593,7 @@ - 0008 + 0x0008 @@ -5316,7 +5651,7 @@ - 000A + 0x000A @@ -5374,7 +5709,7 @@ - 000A + 0x000A @@ -5432,7 +5767,7 @@ - 000A + 0x000A @@ -5490,7 +5825,7 @@ - 000A + 0x000A @@ -5548,7 +5883,7 @@ - 000A + 0x000A @@ -5606,7 +5941,7 @@ - 000A + 0x000A @@ -5669,7 +6004,7 @@ - 000A + 0x000A @@ -5727,7 +6062,7 @@ - 000A + 0x000A @@ -5785,7 +6120,7 @@ - 000A + 0x000A @@ -5843,7 +6178,7 @@ - 000A + 0x000A @@ -5901,7 +6236,7 @@ - 000A + 0x000A @@ -5959,7 +6294,7 @@ - 000A + 0x000A @@ -6017,7 +6352,7 @@ - 000A + 0x000A @@ -6076,7 +6411,7 @@ - 000C + 0x000C @@ -6134,7 +6469,7 @@ - 000E + 0x000E @@ -6194,7 +6529,7 @@ - 0012 + 0x0012 @@ -6252,7 +6587,7 @@ - 0013 + 0x0013 @@ -6310,7 +6645,7 @@ - 0013 + 0x0013 @@ -6368,7 +6703,7 @@ - 0013 + 0x0013 @@ -6426,7 +6761,7 @@ - 0013 + 0x0013 @@ -6484,7 +6819,7 @@ - 0013 + 0x0013 @@ -6542,7 +6877,7 @@ - 0013 + 0x0013 @@ -6605,7 +6940,7 @@ - 0014 + 0x0014 @@ -6668,7 +7003,7 @@ - 0016 + 0x0016 @@ -6729,7 +7064,7 @@ - 0018 + 0x0018 @@ -6788,7 +7123,7 @@ - 001C + 0x001C @@ -6846,7 +7181,7 @@ - 0020 + 0x0020 @@ -6907,7 +7242,7 @@ - 0022 + 0x0022 @@ -6965,7 +7300,7 @@ - 0024 + 0x0024 @@ -7023,7 +7358,7 @@ - 0026 + 0x0026 @@ -7081,7 +7416,7 @@ - 0028 + 0x0028 @@ -7139,7 +7474,7 @@ - 002A + 0x002A @@ -7197,7 +7532,7 @@ - 002C + 0x002C @@ -7255,7 +7590,7 @@ - 002E + 0x002E @@ -7313,7 +7648,7 @@ - 0030 + 0x0030 @@ -7371,7 +7706,7 @@ - 0032 + 0x0032 @@ -7429,7 +7764,7 @@ - 0034 + 0x0034 @@ -7487,7 +7822,7 @@ - 0036 + 0x0036 @@ -7545,7 +7880,7 @@ - 0038 + 0x0038 @@ -7603,7 +7938,7 @@ - 003A + 0x003A @@ -7662,7 +7997,7 @@ - 003C + 0x003C @@ -7720,7 +8055,7 @@ - 003E + 0x003E @@ -7779,7 +8114,7 @@ - 0040 + 0x0040 @@ -7838,7 +8173,7 @@ - 0044 + 0x0044 @@ -7896,7 +8231,7 @@ - 0048 + 0x0048 @@ -7954,7 +8289,7 @@ - 004C + 0x004C @@ -8012,7 +8347,7 @@ - 0050 + 0x0050 @@ -8070,7 +8405,7 @@ - 0054 + 0x0054 @@ -8129,7 +8464,7 @@ - 0058 + 0x0058 @@ -8187,7 +8522,7 @@ - 005C + 0x005C @@ -8245,7 +8580,7 @@ - 0060 + 0x0060 @@ -8303,7 +8638,7 @@ - 0064 + 0x0064 @@ -8361,7 +8696,7 @@ - 0068 + 0x0068 @@ -8421,7 +8756,7 @@ - 006C + 0x006C @@ -8480,7 +8815,7 @@ - 0070 + 0x0070 @@ -8540,7 +8875,7 @@ - 0074 + 0x0074 @@ -8600,7 +8935,7 @@ - 0078 + 0x0078 @@ -8659,7 +8994,7 @@ - 007C + 0x007C @@ -8719,7 +9054,7 @@ - 0080 + 0x0080 @@ -8779,7 +9114,7 @@ - 0084 + 0x0084 @@ -8838,7 +9173,7 @@ - 0088 + 0x0088 @@ -8898,7 +9233,7 @@ - 008C + 0x008C @@ -8956,7 +9291,7 @@ - 0090 + 0x0090 @@ -9014,7 +9349,7 @@ - 0094 + 0x0094 @@ -9072,7 +9407,7 @@ - 0098 + 0x0098 @@ -9133,7 +9468,7 @@ - 009A + 0x009A @@ -9191,7 +9526,7 @@ - 009E + 0x009E @@ -9249,7 +9584,7 @@ - 00A2 + 0x00A2 @@ -9307,7 +9642,7 @@ - 00A6 + 0x00A6 @@ -9367,7 +9702,7 @@ - 00AA + 0x00AA @@ -9426,7 +9761,7 @@ - 00AE + 0x00AE @@ -9489,7 +9824,7 @@ - 00B2 + 0x00B2 @@ -9548,7 +9883,7 @@ - 00B6 + 0x00B6 @@ -9608,7 +9943,7 @@ - 00BA + 0x00BA @@ -9666,7 +10001,7 @@ - 00BE + 0x00BE @@ -9729,7 +10064,7 @@ - 00C2 + 0x00C2 @@ -9787,7 +10122,7 @@ - 00C6 + 0x00C6 @@ -9846,7 +10181,7 @@ - 00CA + 0x00CA @@ -9904,7 +10239,7 @@ - 00CE + 0x00CE @@ -9962,7 +10297,7 @@ - 00D2 + 0x00D2 @@ -10020,7 +10355,7 @@ - 00D6 + 0x00D6 @@ -10081,7 +10416,7 @@ - 00DA + 0x00DA @@ -10140,7 +10475,7 @@ - 00DE + 0x00DE @@ -10200,7 +10535,7 @@ - 00E2 + 0x00E2 @@ -10259,7 +10594,7 @@ - 00E6 + 0x00E6 @@ -10321,7 +10656,7 @@ - 00EA + 0x00EA @@ -10380,7 +10715,7 @@ - 00EE + 0x00EE @@ -10442,7 +10777,7 @@ - 00F2 + 0x00F2 @@ -10501,7 +10836,7 @@ - 00F6 + 0x00F6 @@ -10561,7 +10896,7 @@ - 00FA + 0x00FA @@ -10619,7 +10954,7 @@ - 00FE + 0x00FE @@ -10679,7 +11014,7 @@ - 0102 + 0x0102 @@ -10737,7 +11072,7 @@ - 0106 + 0x0106 @@ -10796,7 +11131,7 @@ - 010A + 0x010A @@ -10854,7 +11189,7 @@ - 010E + 0x010E @@ -10916,7 +11251,7 @@ - 0112 + 0x0112 @@ -10974,7 +11309,7 @@ - 0116 + 0x0116 @@ -11036,7 +11371,7 @@ - 011A + 0x011A @@ -11094,7 +11429,7 @@ - 011E + 0x011E @@ -11153,7 +11488,7 @@ - 0122 + 0x0122 @@ -11211,7 +11546,7 @@ - 0126 + 0x0126 @@ -11270,7 +11605,7 @@ - 012A + 0x012A @@ -11328,7 +11663,7 @@ - 012E + 0x012E @@ -11387,7 +11722,7 @@ - 0132 + 0x0132 @@ -11445,7 +11780,7 @@ - 0136 + 0x0136 @@ -11503,7 +11838,7 @@ - 013A + 0x013A @@ -11561,7 +11896,7 @@ - 013E + 0x013E @@ -11620,7 +11955,7 @@ - 0142 + 0x0142 @@ -11678,7 +12013,7 @@ - 0146 + 0x0146 @@ -11738,7 +12073,7 @@ - 014A + 0x014A @@ -11796,7 +12131,7 @@ - 014E + 0x014E @@ -11856,7 +12191,7 @@ - 0152 + 0x0152 @@ -11914,7 +12249,7 @@ - 0156 + 0x0156 @@ -11973,7 +12308,7 @@ - 015A + 0x015A @@ -12032,7 +12367,7 @@ - 015E + 0x015E @@ -12090,7 +12425,7 @@ - 0162 + 0x0162 @@ -12148,7 +12483,7 @@ - 0166 + 0x0166 @@ -12206,7 +12541,7 @@ - 016A + 0x016A @@ -12264,7 +12599,7 @@ - 016E + 0x016E @@ -12323,7 +12658,7 @@ - 0172 + 0x0172 @@ -12382,7 +12717,7 @@ - 0176 + 0x0176 @@ -12441,7 +12776,7 @@ - 017A + 0x017A @@ -12499,7 +12834,7 @@ - 017E + 0x017E @@ -12558,7 +12893,7 @@ - 0182 + 0x0182 @@ -12616,7 +12951,7 @@ - 0186 + 0x0186 @@ -12677,7 +13012,7 @@ - 018A + 0x018A @@ -12736,7 +13071,7 @@ - 018E + 0x018E @@ -12795,7 +13130,7 @@ - 0192 + 0x0192 @@ -12853,7 +13188,7 @@ - 0196 + 0x0196 @@ -12914,7 +13249,7 @@ - 019A + 0x019A @@ -12972,7 +13307,7 @@ - 019E + 0x019E @@ -13033,7 +13368,7 @@ - 01A2 + 0x01A2 @@ -13092,7 +13427,7 @@ - 01A6 + 0x01A6 @@ -13150,7 +13485,7 @@ - 01AA + 0x01AA @@ -13208,7 +13543,7 @@ - 01AE + 0x01AE @@ -13268,7 +13603,7 @@ - 01B2 + 0x01B2 @@ -13326,7 +13661,7 @@ - 01B6 + 0x01B6 @@ -13385,7 +13720,7 @@ - 01BA + 0x01BA @@ -13443,7 +13778,7 @@ - 01BE + 0x01BE @@ -13502,7 +13837,7 @@ - 01C2 + 0x01C2 @@ -13561,7 +13896,7 @@ - 01C6 + 0x01C6 @@ -13619,7 +13954,7 @@ - 01CA + 0x01CA @@ -13677,7 +14012,7 @@ - 01CE + 0x01CE @@ -13735,7 +14070,7 @@ - 01D2 + 0x01D2 @@ -13793,7 +14128,7 @@ - 01D6 + 0x01D6 @@ -13852,7 +14187,7 @@ - 01DA + 0x01DA @@ -13911,7 +14246,7 @@ - 01DE + 0x01DE @@ -13970,7 +14305,7 @@ - 01E2 + 0x01E2 @@ -14029,7 +14364,7 @@ - 01E6 + 0x01E6 @@ -14088,7 +14423,7 @@ - 01EA + 0x01EA @@ -14147,7 +14482,7 @@ - 01EE + 0x01EE @@ -14206,7 +14541,7 @@ - 01F2 + 0x01F2 @@ -14265,7 +14600,7 @@ - 01F6 + 0x01F6 @@ -14325,7 +14660,7 @@ - 01FA + 0x01FA @@ -14384,7 +14719,7 @@ - 01FE + 0x01FE @@ -14443,7 +14778,7 @@ - 0202 + 0x0202 @@ -14501,7 +14836,7 @@ - 0206 + 0x0206 @@ -14561,7 +14896,7 @@ - 020A + 0x020A @@ -14619,7 +14954,7 @@ - 020E + 0x020E @@ -14679,7 +15014,7 @@ - 0212 + 0x0212 @@ -14737,7 +15072,7 @@ - 0216 + 0x0216 @@ -14796,7 +15131,7 @@ - 021A + 0x021A @@ -14854,7 +15189,7 @@ - 021E + 0x021E @@ -14912,7 +15247,7 @@ - 0222 + 0x0222 @@ -14970,7 +15305,7 @@ - 0226 + 0x0226 @@ -15030,7 +15365,7 @@ - 022A + 0x022A @@ -15088,7 +15423,7 @@ - 022E + 0x022E @@ -15148,7 +15483,7 @@ - 0232 + 0x0232 @@ -15206,7 +15541,7 @@ - 0236 + 0x0236 @@ -15265,7 +15600,7 @@ - 023A + 0x023A @@ -15323,7 +15658,7 @@ - 023E + 0x023E @@ -15383,7 +15718,7 @@ - 0242 + 0x0242 @@ -15441,7 +15776,7 @@ - 0246 + 0x0246 @@ -15500,7 +15835,7 @@ - 024A + 0x024A @@ -15558,7 +15893,7 @@ - 024E + 0x024E @@ -15617,7 +15952,7 @@ - 0252 + 0x0252 @@ -15675,7 +16010,7 @@ - 0256 + 0x0256 @@ -15735,7 +16070,7 @@ - 025A + 0x025A @@ -15793,7 +16128,7 @@ - 025E + 0x025E @@ -15852,7 +16187,7 @@ - 0262 + 0x0262 @@ -15910,7 +16245,7 @@ - 0266 + 0x0266 @@ -15970,7 +16305,7 @@ - 026A + 0x026A @@ -16028,7 +16363,7 @@ - 026E + 0x026E @@ -16087,7 +16422,7 @@ - 0272 + 0x0272 @@ -16145,7 +16480,7 @@ - 0276 + 0x0276 @@ -16203,7 +16538,7 @@ - 027A + 0x027A @@ -16261,7 +16596,7 @@ - 027E + 0x027E @@ -16319,7 +16654,7 @@ - 0282 + 0x0282 @@ -16377,7 +16712,7 @@ - 0286 + 0x0286 @@ -16435,7 +16770,7 @@ - 028A + 0x028A @@ -16493,7 +16828,7 @@ - 028E + 0x028E @@ -16554,7 +16889,7 @@ - 0292 + 0x0292 @@ -16612,7 +16947,7 @@ - 0296 + 0x0296 @@ -16671,7 +17006,7 @@ - 029A + 0x029A @@ -16729,7 +17064,7 @@ - 029E + 0x029E @@ -16788,7 +17123,7 @@ - 02A2 + 0x02A2 @@ -16846,7 +17181,7 @@ - 02A6 + 0x02A6 @@ -16905,7 +17240,7 @@ - 02AA + 0x02AA @@ -16963,7 +17298,7 @@ - 02AE + 0x02AE @@ -17022,7 +17357,7 @@ - 02B2 + 0x02B2 @@ -17080,7 +17415,7 @@ - 02B6 + 0x02B6 @@ -17139,7 +17474,7 @@ - 02BA + 0x02BA @@ -17197,7 +17532,7 @@ - 02BE + 0x02BE @@ -17258,7 +17593,7 @@ - 02C2 + 0x02C2 @@ -17316,7 +17651,7 @@ - 02C6 + 0x02C6 @@ -17374,7 +17709,7 @@ - 02CA + 0x02CA @@ -17432,7 +17767,7 @@ - 02CE + 0x02CE @@ -17492,7 +17827,7 @@ - 02D2 + 0x02D2 @@ -17550,7 +17885,7 @@ - 02D6 + 0x02D6 @@ -17609,7 +17944,7 @@ - 02DA + 0x02DA @@ -17667,7 +18002,7 @@ - 02DE + 0x02DE @@ -17725,7 +18060,7 @@ - 02E2 + 0x02E2 @@ -17783,7 +18118,7 @@ - 02E6 + 0x02E6 @@ -17842,7 +18177,7 @@ - 02EA + 0x02EA @@ -17900,7 +18235,7 @@ - 02EE + 0x02EE @@ -17959,7 +18294,7 @@ - 02F2 + 0x02F2 @@ -18017,7 +18352,7 @@ - 02F6 + 0x02F6 @@ -18076,7 +18411,7 @@ - 02FA + 0x02FA @@ -18134,7 +18469,7 @@ - 02FE + 0x02FE @@ -18193,7 +18528,7 @@ - 0302 + 0x0302 @@ -18251,7 +18586,7 @@ - 0306 + 0x0306 @@ -18310,7 +18645,7 @@ - 030A + 0x030A @@ -18368,7 +18703,7 @@ - 030E + 0x030E @@ -18427,7 +18762,7 @@ - 0312 + 0x0312 @@ -18485,7 +18820,7 @@ - 0316 + 0x0316 @@ -18544,7 +18879,7 @@ - 031A + 0x031A @@ -18602,7 +18937,7 @@ - 031E + 0x031E @@ -18661,7 +18996,7 @@ - 0322 + 0x0322 @@ -18719,7 +19054,7 @@ - 0326 + 0x0326 @@ -18778,7 +19113,7 @@ - 032A + 0x032A @@ -18836,7 +19171,7 @@ - 032E + 0x032E @@ -18895,7 +19230,7 @@ - 0332 + 0x0332 @@ -18953,7 +19288,7 @@ - 0336 + 0x0336 @@ -19011,7 +19346,7 @@ - 033A + 0x033A @@ -19069,7 +19404,7 @@ - 033E + 0x033E @@ -19127,7 +19462,7 @@ - 0342 + 0x0342 @@ -19185,7 +19520,7 @@ - 0346 + 0x0346 @@ -19245,7 +19580,7 @@ - 034A + 0x034A @@ -19303,7 +19638,7 @@ - 034E + 0x034E @@ -19361,7 +19696,7 @@ - 0352 + 0x0352 @@ -19419,7 +19754,7 @@ - 0356 + 0x0356 @@ -19477,7 +19812,7 @@ - 035A + 0x035A @@ -19535,7 +19870,7 @@ - 035E + 0x035E @@ -19593,7 +19928,7 @@ - 0362 + 0x0362 @@ -19651,7 +19986,7 @@ - 0366 + 0x0366 @@ -19710,7 +20045,7 @@ - 036A + 0x036A @@ -19768,7 +20103,7 @@ - 036E + 0x036E @@ -19826,7 +20161,7 @@ - 0372 + 0x0372 @@ -19884,7 +20219,7 @@ - 0376 + 0x0376 @@ -19943,7 +20278,7 @@ - 037A + 0x037A @@ -20001,7 +20336,7 @@ - 037E + 0x037E @@ -20056,8 +20391,1655 @@ - - + + + + + + + + + 856 + + + + + + + + + + + + + + + + + + 744 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfTch + + + + + + + + + + + + + + + + + + + + + + + + + + 748 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfTch + + + + + + + + + + + + + + + + + + + + + + + + + + 752 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcRmdThreading + + + + + + + + + + + + + + + + + + + + + + + + + + 756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbRmdThreading + + + + + + + + + + + + + + + + + + + + + + + + + + 760 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcMid + + + + + + + + + + + + + + + + + + + + + + + + + + 764 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbMid + + + + + + + + + + + + + + + + + + + + + + + + + + 768 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcSttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + + + + 772 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbSttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + + + + 776 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcMsoEnvelope + + + + + + + + + + + + + + + + + + + + + + + + + + 780 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:flcbMsoEnvelope + + + + + + + + + + + + + + + + + + + + + + + + + + 784 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfLad + + + + + + + + + + + + + + + + + + + + + + + + + + 788 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfLad + + + + + + + + + + + + + + + + + + + + + + + + + + 792 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcRgDofr + + + + + + + + + + + + + + + + + + + + + + + + + + 796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbRgDofr + + + + + + + + + + + + + + + + + + + + + + + + + + 800 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcosl + + + + + + + + + + + + + + + + + + + + + + + + + + 804 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcosl + + + + + + + + + + + + + + + + + + + + + + + + + + 808 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfCookieOld + + + + + + + + + + + + + + + + + + + + + + + + + + 812 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfCookieOld + + + + + + + + + + + + + + + + + + + + + + + + + + 816 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdMotherOld + + + + + + + + + + + + + + + + + + + + + + + + + + 820 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:flcbPgdMotherOld + + + + + + + + + + + + + + + + + + + + + + + + + + 824 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 828 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPgdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 832 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcBkdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 836 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbBkdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 840 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 844 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPgdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 848 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcBkdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 852 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbBkdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + @@ -20083,7 +22065,7 @@ - 0 + 0x0 @@ -20142,7 +22124,7 @@ - 2 + 0x2 @@ -20201,7 +22183,7 @@ - 2 + 0x2 @@ -20260,7 +22242,7 @@ - 2 + 0x2 @@ -20319,7 +22301,7 @@ - 2 + 0x2 @@ -20374,8 +22356,8 @@ - - + + @@ -20403,7 +22385,7 @@ - 0 + 0x0 @@ -20464,7 +22446,7 @@ - 2 + 0x2 @@ -20522,7 +22504,7 @@ - 6 + 0x6 @@ -20581,7 +22563,7 @@ - 8 + 0x8 @@ -20658,8 +22640,8 @@ - - + + @@ -20684,7 +22666,7 @@ - 0 + 0x0 @@ -20742,7 +22724,7 @@ - 0 + 0x0 @@ -20854,7 +22836,7 @@ - 0 + 0x0 @@ -20909,8 +22891,8 @@ - - + + @@ -20935,7 +22917,7 @@ - 0 + 0x0 @@ -20993,7 +22975,7 @@ - 4 + 0x4 @@ -21051,7 +23033,7 @@ - 8 + 0x8 @@ -21106,8 +23088,8 @@ - - + + @@ -21132,7 +23114,7 @@ - 0 + 0x0 @@ -21217,7 +23199,7 @@ - 0 + 0x0 @@ -21275,7 +23257,7 @@ - 2 + 0x2 @@ -21335,7 +23317,7 @@ - 2 + 0x2 @@ -21394,7 +23376,7 @@ - 2 + 0x2 @@ -21452,7 +23434,7 @@ - 2 + 0x2 @@ -21510,7 +23492,7 @@ - 2 + 0x2 @@ -21565,8 +23547,8 @@ - - + + @@ -21595,7 +23577,7 @@ - 0 + 0x0 @@ -21653,7 +23635,7 @@ - 0 + 0x0 @@ -21711,7 +23693,7 @@ - 0 + 0x0 @@ -21770,7 +23752,7 @@ - 0 + 0x0 @@ -21829,7 +23811,7 @@ - 0 + 0x0 @@ -21895,7 +23877,7 @@ - 0 + 0x0 @@ -21957,7 +23939,7 @@ - 0 + 0x0 @@ -22021,7 +24003,7 @@ - 0 + 0x0 @@ -22079,7 +24061,7 @@ - 0 + 0x0 @@ -22137,7 +24119,7 @@ - 2 + 0x2 @@ -22197,7 +24179,7 @@ - 4 + 0x4 @@ -22255,7 +24237,7 @@ - 8 + 0x8 @@ -22313,7 +24295,7 @@ - c + 0xc @@ -22371,7 +24353,7 @@ - 10 + 0x10 @@ -22426,8 +24408,8 @@ - - + + @@ -22453,7 +24435,7 @@ - 0 + 0x0 @@ -22512,7 +24494,7 @@ - 2 + 0x2 @@ -22571,7 +24553,7 @@ - 2 + 0x2 @@ -22630,7 +24612,7 @@ - 2 + 0x2 @@ -22689,7 +24671,7 @@ - 2 + 0x2 @@ -22744,8 +24726,8 @@ - - + + @@ -22770,7 +24752,7 @@ - 0 + 0x0 @@ -22828,7 +24810,7 @@ - 4 + 0x4 @@ -22886,7 +24868,7 @@ - 5 + 0x5 @@ -22941,8 +24923,8 @@ - - + + @@ -22964,7 +24946,7 @@ - 0 + 0x0 @@ -23027,7 +25009,7 @@ - 0 + 0x0 @@ -23085,7 +25067,7 @@ - 0 + 0x0 @@ -23140,8 +25122,8 @@ - - + + @@ -23158,7 +25140,7 @@ - 0 + 0x0 @@ -23220,7 +25202,7 @@ - 2 + 0x2 @@ -23293,7 +25275,7 @@ - 4 + 0x4 @@ -23351,7 +25333,7 @@ - 6 + 0x6 @@ -23406,8 +25388,8 @@ - - + + @@ -24194,8 +26176,8 @@ - - + + @@ -24219,7 +26201,7 @@ - 0 + 0x0 @@ -24278,7 +26260,7 @@ - 4 + 0x4 @@ -24343,7 +26325,7 @@ - 6 + 0x6 @@ -24404,7 +26386,7 @@ - E + 0xE @@ -24473,7 +26455,7 @@ - 1C + 0x1C @@ -24532,7 +26514,7 @@ - 1E + 0x1E @@ -24591,7 +26573,7 @@ - 20 + 0x20 @@ -24650,7 +26632,7 @@ - 22 + 0x22 @@ -24712,7 +26694,7 @@ - 24 + 0x24 @@ -24771,7 +26753,7 @@ - 26 + 0x26 @@ -24830,7 +26812,7 @@ - 28 + 0x28 @@ -24889,7 +26871,7 @@ - 2A + 0x2A @@ -24952,7 +26934,7 @@ - 2C + 0x2C @@ -25010,7 +26992,7 @@ - 2C + 0x2C @@ -25068,7 +27050,7 @@ - 2C + 0x2C @@ -25126,7 +27108,7 @@ - 2C + 0x2C @@ -25184,7 +27166,7 @@ - 2C + 0x2C @@ -25245,7 +27227,7 @@ - 2C + 0x2C @@ -25303,7 +27285,7 @@ - 2E + 0x2E @@ -25361,7 +27343,7 @@ - 32 + 0x32 @@ -25419,7 +27401,7 @@ - 36 + 0x36 @@ -25477,7 +27459,7 @@ - 3A + 0x3A @@ -25535,7 +27517,7 @@ - 3E + 0x3E @@ -25593,7 +27575,7 @@ - 40 + 0x40 @@ -25651,7 +27633,7 @@ - 42 + 0x42 @@ -25756,8 +27738,8 @@ - - + + @@ -25784,7 +27766,7 @@ - 0 + 0x0 @@ -25843,7 +27825,7 @@ - 4 + 0x4 @@ -25902,7 +27884,7 @@ - 8 + 0x8 @@ -25961,7 +27943,7 @@ - C + 0xC @@ -26020,7 +28002,7 @@ - 10 + 0x10 @@ -26079,7 +28061,7 @@ - 14 + 0x14 @@ -26142,7 +28124,7 @@ - 14 + 0x14 @@ -26204,7 +28186,7 @@ - 14 + 0x14 @@ -26269,7 +28251,7 @@ - 14 + 0x14 @@ -26332,7 +28314,7 @@ - 14 + 0x14 @@ -26391,7 +28373,7 @@ - 14 + 0x14 @@ -26450,7 +28432,7 @@ - 14 + 0x14 @@ -26509,7 +28491,7 @@ - 14 + 0x14 @@ -26567,7 +28549,7 @@ - 16 + 0x16 @@ -26644,8 +28626,8 @@ - - + + @@ -26673,7 +28655,7 @@ - 0 + 0x0 @@ -26731,7 +28713,7 @@ - 0 + 0x0 @@ -26804,7 +28786,7 @@ - 1 + 0x1 @@ -26859,8 +28841,8 @@ - - + + @@ -26885,7 +28867,7 @@ - 0 + 0x0 @@ -27114,8 +29096,8 @@ - - + + @@ -27444,8 +29426,8 @@ - - + + @@ -27699,8 +29681,8 @@ - - + + @@ -27838,8 +29820,8 @@ - - + + @@ -28507,8 +30489,8 @@ - - + + @@ -28588,8 +30570,8 @@ - - + + @@ -28614,7 +30596,7 @@ - 14 + 0x14 @@ -28672,7 +30654,7 @@ - 16 + 0x16 @@ -28730,7 +30712,7 @@ - 16 + 0x16 @@ -28788,7 +30770,7 @@ - 18 + 0x18 @@ -28848,7 +30830,7 @@ - 1A + 0x1A @@ -28933,8 +30915,8 @@ - - + + @@ -28960,7 +30942,7 @@ - 0 + 0x0 @@ -29019,7 +31001,7 @@ - 0 + 0x0 @@ -29078,7 +31060,7 @@ - 4 + 0x4 @@ -29136,7 +31118,7 @@ - 8 + 0x8 @@ -29194,7 +31176,7 @@ - A + 0xA @@ -29253,7 +31235,7 @@ - E + 0xE @@ -29311,7 +31293,7 @@ - 12 + 0x12 @@ -29366,8 +31348,8 @@ - - + + @@ -29497,10 +31479,207 @@ - - - - + + + + + + + + + 4 + + + + + + + + + + + + + + + + + + 0 + + + + + + + + 15 + + + + + + + + 0x8000 + + + + + + + + 1 + + + + + + + + rtf:fBuildIn + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + 0 + + + + + + + + 0x7fff + + + + + + + + 15 + + + + + + + + rtf:ilgbdM1 + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lid + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -29530,8 +31709,8 @@ - - + + @@ -29561,8 +31740,8 @@ - - + + @@ -29592,8 +31771,8 @@ - - + + @@ -29623,8 +31802,8 @@ - - + + @@ -29654,8 +31833,8 @@ - - + + @@ -29685,8 +31864,8 @@ - - + + @@ -29716,8 +31895,8 @@ - - + + @@ -29747,8 +31926,8 @@ - - + + @@ -29778,8 +31957,8 @@ - - + + @@ -29809,8 +31988,8 @@ - - + + @@ -29840,8 +32019,8 @@ - - + + @@ -29871,8 +32050,8 @@ - - + + @@ -29902,8 +32081,8 @@ - - + + @@ -29933,8 +32112,8 @@ - - + + @@ -29964,8 +32143,8 @@ - - + + @@ -29995,8 +32174,8 @@ - - + + @@ -30026,8 +32205,8 @@ - - + + @@ -30154,8 +32333,8 @@ - - + + @@ -30185,8 +32364,8 @@ - - + + @@ -30216,8 +32395,8 @@ - - + + @@ -30247,9 +32426,9 @@ - - - + + + @@ -30278,8 +32457,8 @@ - - + + @@ -30309,8 +32488,8 @@ - - + + @@ -30340,8 +32519,8 @@ - - + + @@ -30371,8 +32550,8 @@ - - + + @@ -30402,8 +32581,8 @@ - - + + @@ -30433,8 +32612,8 @@ - - + + @@ -30464,8 +32643,8 @@ - - + + @@ -30495,8 +32674,8 @@ - - + + @@ -30526,8 +32705,8 @@ - - + + @@ -30557,8 +32736,8 @@ - - + + @@ -30588,8 +32767,8 @@ - - + + @@ -30619,8 +32798,8 @@ - - + + @@ -30650,8 +32829,8 @@ - - + + @@ -30681,8 +32860,8 @@ - - + + @@ -30712,8 +32891,8 @@ - - + + @@ -30743,8 +32922,8 @@ - - + + @@ -30774,8 +32953,8 @@ - - + + @@ -30805,8 +32984,8 @@ - - + + @@ -30836,8 +33015,8 @@ - - + + @@ -30867,8 +33046,8 @@ - - + + @@ -30898,8 +33077,8 @@ - - + + @@ -30937,8 +33116,8 @@ - - + + @@ -30968,8 +33147,8 @@ - - + + @@ -30999,8 +33178,8 @@ - - + + @@ -31030,8 +33209,8 @@ - - + + @@ -31061,8 +33240,8 @@ - - + + @@ -31092,8 +33271,8 @@ - - + + @@ -31123,8 +33302,8 @@ - - + + @@ -31154,8 +33333,8 @@ - - + + @@ -31185,8 +33364,8 @@ - - + + @@ -31216,8 +33395,8 @@ - - + + @@ -31247,8 +33426,8 @@ - - + + @@ -31278,8 +33457,8 @@ - - + + @@ -31309,8 +33488,8 @@ - - + + @@ -31340,8 +33519,8 @@ - - + + @@ -31371,8 +33550,8 @@ - - + + @@ -31402,8 +33581,8 @@ - - + + @@ -31433,8 +33612,8 @@ - - + + @@ -31464,8 +33643,8 @@ - - + + @@ -31495,8 +33674,8 @@ - - + + @@ -31526,8 +33705,8 @@ - - + + @@ -31557,8 +33736,8 @@ - - + + @@ -31588,8 +33767,8 @@ - - + + @@ -31619,8 +33798,8 @@ - - + + @@ -31650,8 +33829,8 @@ - - + + @@ -31681,8 +33860,8 @@ - - + + @@ -31712,8 +33891,8 @@ - - + + @@ -31743,8 +33922,8 @@ - - + + @@ -31774,8 +33953,8 @@ - - + + @@ -31805,8 +33984,8 @@ - - + + @@ -31836,8 +34015,8 @@ - - + + @@ -31867,8 +34046,8 @@ - - + + @@ -31898,8 +34077,8 @@ - - + + @@ -31998,8 +34177,8 @@ - - + + @@ -32029,8 +34208,8 @@ - - + + @@ -32060,8 +34239,8 @@ - - + + @@ -32091,8 +34270,8 @@ - - + + @@ -32122,8 +34301,8 @@ - - + + @@ -32153,8 +34332,8 @@ - - + + @@ -32311,8 +34490,8 @@ - - + + @@ -32342,8 +34521,8 @@ - - + + @@ -32373,8 +34552,8 @@ - - + + @@ -32404,8 +34583,8 @@ - - + + @@ -32435,8 +34614,8 @@ - - + + @@ -32466,8 +34645,8 @@ - - + + @@ -32497,8 +34676,8 @@ - - + + @@ -32528,8 +34707,8 @@ - - + + @@ -32559,8 +34738,8 @@ - - + + @@ -32590,8 +34769,8 @@ - - + + @@ -32621,8 +34800,8 @@ - - + + @@ -32652,8 +34831,8 @@ - - + + @@ -32683,8 +34862,8 @@ - - + + @@ -32714,8 +34893,8 @@ - - + + @@ -32745,8 +34924,8 @@ - - + + @@ -32776,8 +34955,8 @@ - - + + @@ -32807,8 +34986,8 @@ - - + + @@ -32838,8 +35017,8 @@ - - + + @@ -32869,8 +35048,8 @@ - - + + @@ -32900,8 +35079,8 @@ - - + + @@ -32931,8 +35110,8 @@ - - + + @@ -32962,8 +35141,8 @@ - - + + @@ -32993,8 +35172,8 @@ - - + + @@ -33024,8 +35203,8 @@ - - + + @@ -33055,8 +35234,8 @@ - - + + @@ -33086,8 +35265,8 @@ - - + + @@ -33117,8 +35296,8 @@ - - + + @@ -33148,8 +35327,8 @@ - - + + @@ -33179,8 +35358,8 @@ - - + + @@ -33210,8 +35389,8 @@ - - + + @@ -33241,8 +35420,8 @@ - - + + @@ -33272,8 +35451,8 @@ - - + + @@ -33303,8 +35482,8 @@ - - + + @@ -33334,8 +35513,8 @@ - - + + @@ -33365,8 +35544,8 @@ - - + + @@ -33396,8 +35575,8 @@ - - + + @@ -33427,8 +35606,8 @@ - - + + @@ -33458,8 +35637,8 @@ - - + + @@ -33489,8 +35668,8 @@ - - + + @@ -33520,8 +35699,8 @@ - - + + @@ -33551,8 +35730,8 @@ - - + + @@ -33582,8 +35761,8 @@ - - + + @@ -33613,8 +35792,8 @@ - - + + @@ -33644,8 +35823,8 @@ - - + + @@ -33675,8 +35854,8 @@ - - + + @@ -33706,8 +35885,8 @@ - - + + @@ -33737,8 +35916,8 @@ - - + + @@ -33768,8 +35947,8 @@ - - + + @@ -33799,8 +35978,8 @@ - - + + @@ -33830,8 +36009,8 @@ - - + + @@ -33861,8 +36040,8 @@ - - + + @@ -33892,8 +36071,8 @@ - - + + @@ -33923,8 +36102,8 @@ - - + + @@ -33954,8 +36133,8 @@ - - + + @@ -33985,8 +36164,8 @@ - - + + @@ -34016,8 +36195,8 @@ - - + + @@ -34047,8 +36226,8 @@ - - + + @@ -34078,8 +36257,8 @@ - - + + @@ -34109,8 +36288,8 @@ - - + + @@ -34140,8 +36319,8 @@ - - + + @@ -34171,8 +36350,8 @@ - - + + @@ -34202,8 +36381,8 @@ - - + + @@ -34233,8 +36412,8 @@ - - + + @@ -34264,8 +36443,8 @@ - - + + @@ -34295,8 +36474,8 @@ - - + + @@ -34326,8 +36505,8 @@ - - + + @@ -34357,8 +36536,8 @@ - - + + @@ -34388,8 +36567,8 @@ - - + + @@ -34419,9 +36598,9 @@ - - - + + + @@ -34435,7 +36614,7 @@ - rtf:sprmCRgLid0 + rtf:sprmCRgLid0_80 @@ -34450,8 +36629,8 @@ - - + + @@ -34481,8 +36660,8 @@ - - + + @@ -34512,8 +36691,8 @@ - - + + @@ -34543,8 +36722,8 @@ - - + + @@ -34574,8 +36753,8 @@ - - + + @@ -34605,8 +36784,8 @@ - - + + @@ -34636,8 +36815,8 @@ - - + + @@ -34667,8 +36846,8 @@ - - + + @@ -34698,8 +36877,8 @@ - - + + @@ -34729,8 +36908,8 @@ - - + + @@ -34760,8 +36939,8 @@ - - + + @@ -34791,8 +36970,8 @@ - - + + @@ -34822,8 +37001,8 @@ - - + + @@ -34853,8 +37032,8 @@ - - + + @@ -34884,8 +37063,8 @@ - - + + @@ -34915,8 +37094,8 @@ - - + + @@ -34946,8 +37125,8 @@ - - + + @@ -34977,8 +37156,8 @@ - - + + @@ -35008,8 +37187,8 @@ - - + + @@ -35039,8 +37218,8 @@ - - + + @@ -35070,8 +37249,8 @@ - - + + @@ -35101,8 +37280,8 @@ - - + + @@ -35132,8 +37311,8 @@ - - + + @@ -35163,8 +37342,8 @@ - - + + @@ -35194,8 +37373,8 @@ - - + + @@ -35225,8 +37404,8 @@ - - + + @@ -35256,8 +37435,8 @@ - - + + @@ -35287,8 +37466,8 @@ - - + + @@ -35318,8 +37497,8 @@ - - + + @@ -35349,8 +37528,8 @@ - - + + @@ -35380,8 +37559,8 @@ - - + + @@ -35411,8 +37590,8 @@ - - + + @@ -35442,8 +37621,8 @@ - - + + @@ -35473,8 +37652,8 @@ - - + + @@ -35504,8 +37683,8 @@ - - + + @@ -35535,8 +37714,8 @@ - - + + @@ -35566,8 +37745,8 @@ - - + + @@ -35597,8 +37776,8 @@ - - + + @@ -35628,8 +37807,8 @@ - - + + @@ -35659,8 +37838,8 @@ - - + + @@ -35690,8 +37869,8 @@ - - + + @@ -35721,8 +37900,8 @@ - - + + @@ -35752,8 +37931,8 @@ - - + + @@ -35783,8 +37962,8 @@ - - + + @@ -35814,8 +37993,8 @@ - - + + @@ -35845,8 +38024,8 @@ - - + + @@ -35876,8 +38055,8 @@ - - + + @@ -35907,8 +38086,8 @@ - - + + @@ -35938,8 +38117,8 @@ - - + + @@ -35969,8 +38148,8 @@ - - + + @@ -36000,8 +38179,8 @@ - - + + @@ -36031,8 +38210,8 @@ - - + + @@ -36062,8 +38241,8 @@ - - + + @@ -36093,8 +38272,8 @@ - - + + @@ -36124,8 +38303,8 @@ - - + + @@ -36155,8 +38334,8 @@ - - + + @@ -36186,8 +38365,8 @@ - - + + @@ -36217,8 +38396,8 @@ - - + + @@ -36248,8 +38427,8 @@ - - + + @@ -36279,8 +38458,8 @@ - - + + @@ -36310,8 +38489,8 @@ - - + + @@ -36341,8 +38520,8 @@ - - + + @@ -36372,8 +38551,8 @@ - - + + @@ -36403,8 +38582,8 @@ - - + + @@ -36434,8 +38613,8 @@ - - + + @@ -36465,8 +38644,8 @@ - - + + @@ -36529,8 +38708,8 @@ - - + + @@ -36560,8 +38739,8 @@ - - + + @@ -36591,8 +38770,8 @@ - - + + @@ -36675,8 +38854,8 @@ - - + + @@ -36739,8 +38918,8 @@ - - + + @@ -36803,8 +38982,8 @@ - - + + @@ -36833,9 +39012,716 @@ + + + + + + + + + + + + + + + + 0x2 + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + rtf:itl + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x1 + + + + + + + + 0 + + + + + + + + rtf:fatlBorders + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x2 + + + + + + + + 1 + + + + + + + + rtf:fatlShading + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x4 + + + + + + + + 2 + + + + + + + + rtf:fatlFont + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x8 + + + + + + + + 3 + + + + + + + + rtf:fatlColor + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x10 + + + + + + + + 4 + + + + + + + + rtf:fatlBestFit + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x20 + + + + + + + + 5 + + + + + + + + rtf:fatlHdrRows + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x40 + + + + + + + + 6 + + + + + + + + rtf:fatlLastRow + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x80 + + + + + + + + 7 + + + + + + + + rtf:fatlHdrCols + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x100 + + + + + + + + 8 + + + + + + + + rtf:fatlLastCol + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x200 + + + + + + + + 9 + + + + + + + + rtf:fatlNoRowBands + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 16 + + + + + + + + 0x400 + + + + + + + + 10 + + + + + + + + rtf:fatlNoColBands + + + + + + + + + + + + + - - + + + + + + + + + + @@ -36865,8 +39751,8 @@ - - + + @@ -36896,8 +39782,8 @@ - - + + @@ -36927,8 +39813,8 @@ - - + + @@ -36958,8 +39844,8 @@ - - + + @@ -36989,8 +39875,8 @@ - - + + @@ -37020,8 +39906,8 @@ - - + + @@ -37051,8 +39937,8 @@ - - + + @@ -37082,8 +39968,8 @@ - - + + @@ -37113,8 +39999,8 @@ - - + + @@ -37144,8 +40030,8 @@ - - + + @@ -37175,8 +40061,8 @@ - - + + @@ -37206,8 +40092,8 @@ - - + + @@ -37237,8 +40123,8 @@ - - + + @@ -37268,8 +40154,8 @@ - - + + @@ -37299,8 +40185,8 @@ - - + + @@ -37363,8 +40249,8 @@ - - + + @@ -37427,8 +40313,8 @@ - - + + @@ -37491,8 +40377,8 @@ - - + + @@ -37555,8 +40441,8 @@ - - + + @@ -37589,7 +40475,7 @@ - - + + @@ -38006,8 +40892,8 @@ - - + + @@ -38037,8 +40923,8 @@ - - + + @@ -38068,8 +40954,8 @@ - - + + @@ -38132,8 +41018,8 @@ - - + + @@ -38232,8 +41118,8 @@ - - + + @@ -38332,8 +41218,8 @@ - - + + @@ -38432,8 +41318,8 @@ - - + + @@ -38532,8 +41418,8 @@ - - + + @@ -38632,8 +41518,8 @@ - - + + @@ -38732,8 +41618,8 @@ - - + + @@ -38832,8 +41718,8 @@ - - + + @@ -38932,8 +41818,8 @@ - - + + @@ -39032,8 +41918,8 @@ - - + + @@ -39132,8 +42018,8 @@ - - + + @@ -39232,8 +42118,8 @@ - - + + @@ -39398,8 +42284,8 @@ - - + + @@ -39564,8 +42450,8 @@ - - + + @@ -39664,10 +42550,786 @@ - - - - + + + + + + + + + + + + 0xF617 + + + + + + + + rtf:sprmTWidthBefore + + + + + + + + table + + + + + + + + + + + + + + + + + + 0x0 + + + + + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + rtf:ftsWidth + + + + + + + + + + + + + + + + + + + + + + + + + + 0x1 + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + rtf:wWidth + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0xF618 + + + + + + + + rtf:sprmTWidthAfter + + + + + + + + table + + + + + + + + + + + + + + + + + + 0x0 + + + + + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + rtf:ftsWidth + + + + + + + + + + + + + + + + + + + + + + + + + + 0x1 + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + rtf:wWidth + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0x8460 + + + + + + + + rtf:sprmPDxaLeft1 + + + + + + + + paragraph + + + + + + + + + + + + + + + 0x6467 + + + + + + + + rtf:sprmPRsid + + + + + + + + paragraph + + + + + + + + + + + + + + + 0x6815 + + + + + + + + rtf:sprmCRsidProp + + + + + + + + paragraph + + + + + + + + + + + + + + + 0x4873 + + + + + + + + rtf:sprmCRgLid0 + + + + + + + + character + + + + + + + + + + + + + + + + + + 0xD634 + + + + + + + + rtf:sprmTCellPaddingDefault + + + + + + + + table + + + + + + + + + + + + + + + + + + 0x2 + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + rtf:itc + + + + + + + + + + + + + + + + + + + + + + + + + + 0x4 + + + + + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + rtf:grfbrc + + + + + + + + + + + + + + + + + + + + + + + + + + 0x5 + + + + + + + + 8 + + + + + + + + + + + + + + + + + + + + + + + + rtf:ftsWidth + + + + + + + + + + + + + + + + + + + + + + + + + + 0x6 + + + + + + + + 16 + + + + + + + + + + + + + + + + + + + + + + + + rtf:wWidth + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0x7479 + + + + + + + + rtf:sprmTRsid + + + + + + + + table + + + + + + + + + + + + + + + 0x3615 + + + + + + + + rtf:sprmTFAutofit + + + + + + + + table + + + + + + + + + + @@ -39692,8 +43354,8 @@ - - + + @@ -39773,8 +43435,8 @@ - - + + @@ -39841,8 +43503,8 @@ - - + + @@ -40756,8 +44418,8 @@ - - + + @@ -40859,8 +44521,8 @@ - - + + @@ -40955,7 +44617,7 @@ rtf:blip g - - + + @@ -41048,8 +44710,8 @@ - - + + @@ -41108,8 +44770,8 @@ - - + + @@ -41175,8 +44837,8 @@ - - + + @@ -41256,10 +44918,10 @@ - - - - + + + + @@ -41306,8 +44968,8 @@ - - + + @@ -41361,8 +45023,8 @@ - - + + @@ -41417,8 +45079,8 @@ - - + + @@ -41473,8 +45135,8 @@ - - + + @@ -41529,8 +45191,8 @@ - - + + @@ -41585,8 +45247,8 @@ - - + + @@ -41641,8 +45303,8 @@ - - + + @@ -41697,8 +45359,8 @@ - - + + @@ -41752,8 +45414,8 @@ - - + + @@ -41808,8 +45470,8 @@ - - + + @@ -41856,8 +45518,8 @@ - - + + @@ -41904,8 +45566,8 @@ - - + + @@ -41951,8 +45613,8 @@ - - + + @@ -41998,8 +45660,8 @@ - - + + @@ -42045,8 +45707,8 @@ - - + + @@ -42093,8 +45755,8 @@ - - + + @@ -42141,8 +45803,8 @@ - - + + @@ -42189,8 +45851,8 @@ - - + + @@ -42236,8 +45898,8 @@ - - + + @@ -42283,8 +45945,8 @@ - - + + @@ -42331,8 +45993,8 @@ - - + + @@ -42379,8 +46041,8 @@ - - + + @@ -42435,8 +46097,8 @@ - - + + @@ -42491,8 +46153,8 @@ - - + + @@ -42547,8 +46209,8 @@ - - + + @@ -42603,8 +46265,8 @@ - - + + @@ -42659,8 +46321,8 @@ - - + + @@ -42707,8 +46369,8 @@ - - + + @@ -42755,8 +46417,8 @@ - - + + @@ -42803,8 +46465,8 @@ - - + + @@ -42851,8 +46513,8 @@ - - + + @@ -42899,8 +46561,8 @@ - - + + @@ -42947,8 +46609,8 @@ - - + + @@ -43003,8 +46665,8 @@ - - + + @@ -43059,8 +46721,8 @@ - - + + @@ -43115,8 +46777,8 @@ - - + + @@ -43171,8 +46833,8 @@ - - + + @@ -43227,8 +46889,8 @@ - - + + @@ -43283,8 +46945,8 @@ - - + + @@ -43339,8 +47001,8 @@ - - + + @@ -43395,8 +47057,8 @@ - - + + @@ -43451,8 +47113,8 @@ - - + + @@ -43507,8 +47169,8 @@ - - + + @@ -43562,8 +47224,8 @@ - - + + @@ -43617,8 +47279,8 @@ - - + + @@ -43673,8 +47335,8 @@ - - + + @@ -43728,8 +47390,8 @@ - - + + @@ -43784,8 +47446,8 @@ - - + + @@ -43840,8 +47502,8 @@ - - + + @@ -43889,8 +47551,8 @@ - - + + @@ -43936,8 +47598,8 @@ - - + + @@ -43983,8 +47645,8 @@ - - + + @@ -44030,8 +47692,8 @@ - - + + @@ -44078,8 +47740,8 @@ - - + + @@ -44126,8 +47788,8 @@ - - + + @@ -44174,8 +47836,8 @@ - - + + @@ -44222,8 +47884,8 @@ - - + + @@ -44270,8 +47932,8 @@ - - + + @@ -44318,8 +47980,8 @@ - - + + @@ -44366,8 +48028,8 @@ - - + + @@ -44414,8 +48076,8 @@ - - + + @@ -44462,8 +48124,8 @@ - - + + @@ -44509,8 +48171,8 @@ - - + + @@ -44556,8 +48218,8 @@ - - + + @@ -44604,8 +48266,8 @@ - - + + @@ -44652,8 +48314,8 @@ - - + + @@ -44700,8 +48362,8 @@ - - + + @@ -44756,8 +48418,8 @@ - - + + @@ -44812,8 +48474,8 @@ - - + + @@ -44868,8 +48530,8 @@ - - + + @@ -44924,8 +48586,8 @@ - - + + @@ -44972,8 +48634,8 @@ - - + + @@ -45019,8 +48681,8 @@ - - + + @@ -45066,8 +48728,8 @@ - - + + @@ -45113,8 +48775,8 @@ - - + + @@ -45160,8 +48822,8 @@ - - + + @@ -45208,8 +48870,8 @@ - - + + @@ -45255,8 +48917,8 @@ - - + + @@ -45305,8 +48967,8 @@ - - + + @@ -45352,8 +49014,8 @@ - - + + @@ -45399,8 +49061,8 @@ - - + + @@ -45446,8 +49108,8 @@ - - + + @@ -45493,8 +49155,8 @@ - - + + @@ -45540,8 +49202,8 @@ - - + + @@ -45587,8 +49249,8 @@ - - + + @@ -45634,8 +49296,8 @@ - - + + @@ -45681,8 +49343,8 @@ - - + + @@ -45728,8 +49390,8 @@ - - + + @@ -45784,8 +49446,8 @@ - - + + @@ -45839,8 +49501,8 @@ - - + + @@ -45895,8 +49557,8 @@ - - + + @@ -45951,8 +49613,8 @@ - - + + @@ -46006,8 +49668,8 @@ - - + + @@ -46062,8 +49724,8 @@ - - + + @@ -46110,8 +49772,8 @@ - - + + @@ -46158,8 +49820,8 @@ - - + + @@ -46206,8 +49868,8 @@ - - + + @@ -46254,8 +49916,8 @@ - - + + @@ -46302,8 +49964,8 @@ - - + + @@ -46350,8 +50012,8 @@ - - + + @@ -46397,8 +50059,8 @@ - - + + @@ -46445,8 +50107,8 @@ - - + + @@ -46493,8 +50155,8 @@ - - + + @@ -46541,8 +50203,8 @@ - - + + @@ -46588,8 +50250,8 @@ - - + + @@ -46636,8 +50298,8 @@ - - + + @@ -46684,8 +50346,8 @@ - - + + @@ -46732,8 +50394,8 @@ - - + + @@ -46780,8 +50442,8 @@ - - + + @@ -46828,8 +50490,8 @@ - - + + @@ -46876,8 +50538,8 @@ - - + + @@ -46925,8 +50587,8 @@ - - + + @@ -46972,8 +50634,8 @@ - - + + @@ -47019,8 +50681,8 @@ - - + + @@ -47066,8 +50728,8 @@ - - + + @@ -47113,8 +50775,8 @@ - - + + @@ -47161,8 +50823,8 @@ - - + + @@ -47209,8 +50871,8 @@ - - + + @@ -47256,8 +50918,8 @@ - - + + @@ -47303,8 +50965,8 @@ - - + + @@ -47350,8 +51012,8 @@ - - + + @@ -47397,8 +51059,8 @@ - - + + @@ -47445,8 +51107,8 @@ - - + + @@ -47501,8 +51163,8 @@ - - + + @@ -47557,8 +51219,8 @@ - - + + @@ -47613,8 +51275,8 @@ - - + + @@ -47669,8 +51331,8 @@ - - + + @@ -47725,8 +51387,8 @@ - - + + @@ -47772,8 +51434,8 @@ - - + + @@ -47820,8 +51482,8 @@ - - + + @@ -47868,8 +51530,8 @@ - - + + @@ -47916,8 +51578,8 @@ - - + + @@ -47963,8 +51625,8 @@ - - + + @@ -48010,8 +51672,8 @@ - - + + @@ -48058,8 +51720,8 @@ - - + + @@ -48105,8 +51767,8 @@ - - + + @@ -48153,8 +51815,8 @@ - - + + @@ -48200,8 +51862,8 @@ - - + + @@ -48248,8 +51910,8 @@ - - + + @@ -48296,8 +51958,8 @@ - - + + @@ -48344,8 +52006,8 @@ - - + + @@ -48392,8 +52054,8 @@ - - + + @@ -48440,8 +52102,8 @@ - - + + @@ -48488,8 +52150,8 @@ - - + + @@ -48536,8 +52198,8 @@ - - + + @@ -48583,8 +52245,8 @@ - - + + @@ -48631,8 +52293,8 @@ - - + + @@ -48678,8 +52340,8 @@ - - + + @@ -48726,8 +52388,8 @@ - - + + @@ -48773,8 +52435,8 @@ - - + + @@ -48821,8 +52483,8 @@ - - + + @@ -48869,8 +52531,8 @@ - - + + @@ -48925,8 +52587,8 @@ - - + + @@ -48980,8 +52642,8 @@ - - + + @@ -49036,8 +52698,8 @@ - - + + @@ -49092,8 +52754,8 @@ - - + + @@ -49148,8 +52810,8 @@ - - + + @@ -49196,8 +52858,8 @@ - - + + @@ -49244,8 +52906,8 @@ - - + + @@ -49292,8 +52954,8 @@ - - + + @@ -49340,8 +53002,8 @@ - - + + @@ -49387,8 +53049,8 @@ - - + + @@ -49434,8 +53096,8 @@ - - + + @@ -49481,8 +53143,8 @@ - - + + @@ -49529,8 +53191,8 @@ - - + + @@ -49577,8 +53239,8 @@ - - + + @@ -49624,8 +53286,8 @@ - - + + @@ -49671,8 +53333,8 @@ - - + + @@ -49718,8 +53380,8 @@ - - + + @@ -49765,8 +53427,8 @@ - - + + @@ -49813,8 +53475,8 @@ - - + + @@ -49861,8 +53523,8 @@ - - + + @@ -49909,8 +53571,8 @@ - - + + @@ -49956,8 +53618,8 @@ - - + + @@ -50003,8 +53665,8 @@ - - + + @@ -50058,8 +53720,8 @@ - - + + @@ -50114,8 +53776,8 @@ - - + + @@ -50162,8 +53824,8 @@ - - + + @@ -50211,8 +53873,8 @@ - - + + @@ -50258,8 +53920,8 @@ - - + + @@ -50305,8 +53967,8 @@ - - + + @@ -50352,8 +54014,8 @@ - - + + @@ -50399,8 +54061,8 @@ - - + + @@ -50446,8 +54108,8 @@ - - + + @@ -50493,8 +54155,8 @@ - - + + @@ -50540,8 +54202,8 @@ - - + + @@ -50588,8 +54250,8 @@ - - + + @@ -50635,8 +54297,8 @@ - - + + @@ -50682,8 +54344,8 @@ - - + + @@ -50737,8 +54399,8 @@ - - + + @@ -50785,8 +54447,8 @@ - - + + @@ -50833,8 +54495,8 @@ - - + + @@ -50881,8 +54543,8 @@ - - + + @@ -50929,8 +54591,8 @@ - - + + @@ -50977,8 +54639,8 @@ - - + + @@ -51024,8 +54686,8 @@ - - + + @@ -51072,8 +54734,8 @@ - - + + @@ -51121,8 +54783,8 @@ - - + + @@ -51169,8 +54831,8 @@ - - + + @@ -51225,8 +54887,8 @@ - - + + @@ -51281,8 +54943,8 @@ - - + + @@ -51336,8 +54998,8 @@ - - + + @@ -51391,8 +55053,8 @@ - - + + @@ -51439,8 +55101,8 @@ - - + + @@ -51487,8 +55149,8 @@ - - + + @@ -51535,8 +55197,8 @@ - - + + @@ -51582,8 +55244,8 @@ - - + + @@ -51629,8 +55291,8 @@ - - + + @@ -51677,8 +55339,8 @@ - - + + @@ -51725,8 +55387,8 @@ - - + + @@ -51773,8 +55435,8 @@ - - + + @@ -51821,8 +55483,8 @@ - - + + @@ -51869,8 +55531,8 @@ - - + + @@ -51917,8 +55579,8 @@ - - + + @@ -51965,8 +55627,8 @@ - - + + @@ -52013,8 +55675,8 @@ - - + + @@ -52061,8 +55723,8 @@ - - + + @@ -52108,8 +55770,8 @@ - - + + @@ -52155,8 +55817,8 @@ - - + + @@ -52203,8 +55865,8 @@ - - + + @@ -52251,8 +55913,8 @@ - - + + @@ -52299,8 +55961,8 @@ - - + + @@ -52347,8 +56009,8 @@ - - + + @@ -52395,8 +56057,8 @@ - - + + @@ -52443,8 +56105,8 @@ - - + + @@ -52491,8 +56153,8 @@ - - + + @@ -52539,8 +56201,8 @@ - - + + @@ -52587,8 +56249,8 @@ - - + + @@ -52635,8 +56297,8 @@ - - + + @@ -52683,8 +56345,8 @@ - - + + @@ -52738,8 +56400,8 @@ - - + + @@ -52793,8 +56455,8 @@ - - + + @@ -52849,8 +56511,8 @@ - - + + @@ -52905,8 +56567,8 @@ - - + + @@ -52961,8 +56623,8 @@ - - + + @@ -53009,8 +56671,8 @@ - - + + @@ -53057,8 +56719,8 @@ - - + + @@ -53106,8 +56768,8 @@ - - + + @@ -53153,8 +56815,8 @@ - - + + @@ -53200,8 +56862,8 @@ - - + + @@ -53256,8 +56918,8 @@ - - + + @@ -53312,8 +56974,8 @@ - - + + @@ -53368,8 +57030,8 @@ - - + + @@ -53423,8 +57085,8 @@ - - + + @@ -53479,8 +57141,8 @@ - - + + @@ -53526,8 +57188,8 @@ - - + + @@ -53574,8 +57236,8 @@ - - + + @@ -53621,8 +57283,8 @@ - - + + @@ -53669,8 +57331,8 @@ - - + + @@ -53717,8 +57379,8 @@ - - + + @@ -53765,8 +57427,8 @@ - - + + @@ -53821,8 +57483,8 @@ - - + + @@ -53877,8 +57539,8 @@ - - + + @@ -53933,8 +57595,8 @@ - - + + @@ -53988,8 +57650,8 @@ - - + + @@ -54043,8 +57705,8 @@ - - + + @@ -54099,8 +57761,8 @@ - - + + @@ -54155,8 +57817,8 @@ - - + + @@ -54203,8 +57865,8 @@ - - + + @@ -54251,8 +57913,8 @@ - - + + @@ -54299,8 +57961,8 @@ - - + + @@ -54347,8 +58009,8 @@ - - + + @@ -54395,8 +58057,8 @@ - - + + @@ -54443,8 +58105,8 @@ - - + + @@ -54491,8 +58153,8 @@ - - + + @@ -54539,8 +58201,8 @@ - - + + @@ -54586,8 +58248,8 @@ - - + + @@ -54642,8 +58304,8 @@ - - + + @@ -54698,8 +58360,8 @@ - - + + @@ -54754,8 +58416,8 @@ - - + + @@ -54811,8 +58473,8 @@ - - + + @@ -54866,8 +58528,8 @@ - - + + @@ -54922,8 +58584,8 @@ - - + + @@ -54978,8 +58640,8 @@ - - + + diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl index 1ef78a79dd76..e1fc68ba5323 100644 --- a/writerfilter/source/doctok/resources.xsl +++ b/writerfilter/source/doctok/resources.xsl @@ -480,7 +480,6 @@ class - 0x diff --git a/writerfilter/source/doctok/xmigen.el b/writerfilter/source/doctok/xmigen.el index 6f0f35524d76..c85299604374 100644 --- a/writerfilter/source/doctok/xmigen.el +++ b/writerfilter/source/doctok/xmigen.el @@ -123,5 +123,4 @@ (insert-uml-stereotype "ww8sprm") (insert-uml-taggedvalue sprmcode "sprmcode") (insert-uml-taggedvalue (concat "rtf:" name) "sprmid") - (insert-uml-taggedvalue kind "kind") - (insert-uml-class-end)) + (insert-uml-taggedvalue kind "kind")) \ No newline at end of file diff --git a/writerfilter/source/doctok/xmigen.xsl b/writerfilter/source/doctok/xmigen.xsl new file mode 100644 index 000000000000..d6eab5846fd4 --- /dev/null +++ b/writerfilter/source/doctok/xmigen.xsl @@ -0,0 +1,507 @@ + + + + + + + + + + + + 0 + + + + + + 1 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + comment + + + + offset + + + + + + shift + + + + mask + + + + bits + + + + attrid + + + + + + + rtf: + + + + + + + + arraycount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0x + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + opid + + + + + + + rtf: + + + + + + + + arraycount + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index 46b5563f3b80..911689996b07 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -127,10 +127,10 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes } #ifdef DEBUG_ELEMENT - writerfilter::TagLogger::dump("DEBUG"); - debugLogger->endDocument(); writerfilter::TagLogger::dump("DOMAINMAPPER"); dmapperLogger->endDocument(); + writerfilter::TagLogger::dump("DEBUG"); + debugLogger->endDocument(); #endif return sal_True; diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 50c32b758d44..90c878e3b8e2 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -27,6 +27,7 @@ #include +#include #include #include #include "OOXMLDocumentImpl.hxx" @@ -37,6 +38,7 @@ #include +using ::com::sun::star::xml::sax::SAXException; namespace writerfilter { namespace ooxml { @@ -302,6 +304,10 @@ void OOXMLDocumentImpl::resolveFooter(Stream & rStream, void OOXMLDocumentImpl::resolve(Stream & rStream) { +#ifdef DEBUG_RESOLVE + debug_logger->startElement("OOXMLDocumentImpl.resolve"); +#endif + uno::Reference< xml::sax::XFastParser > xParser (mpStream->getFastParser()); @@ -330,8 +336,20 @@ void OOXMLDocumentImpl::resolve(Stream & rStream) xml::sax::InputSource aParserInput; aParserInput.aInputStream = mpStream->getDocumentStream(); - xParser->parseStream(aParserInput); + try + { + xParser->parseStream(aParserInput); + } + catch (...) { +#ifdef DEBUG_ELEMENT + debug_logger->element("exception"); +#endif + } } + +#ifdef DEBUG_RESOLVE + debug_logger->endElement("OOXMLDocumentImpl.resolve"); +#endif } uno::Reference OOXMLDocumentImpl::getInputStreamForId(const ::rtl::OUString & rId) diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx new file mode 100755 index 000000000000..6fac03898e42 --- /dev/null +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -0,0 +1,333 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include +#include +#include "OOXMLFactory.hxx" +#include "OOXMLFastHelper.hxx" + +namespace writerfilter { +namespace ooxml { + +AttributeInfo::AttributeInfo() +:m_nResource(RT_NoResource), m_nRef(0) +{ +} + +AttributeInfo::AttributeInfo(ResourceType_t nResource, Id nRef) + :m_nResource(nResource), m_nRef(nRef) +{ +} + +CreateElement::CreateElement() +:m_nResource(RT_NoResource), m_nId(0) +{ +} + +CreateElement::CreateElement(ResourceType_t nResource, Id nId) +: m_nResource(nResource), m_nId(nId) +{ +} + +// class OOXMLFactory_ns + +OOXMLFactory_ns::~OOXMLFactory_ns() +{ +} + +AttributeToResourceMapPointer OOXMLFactory_ns::getAttributeToResourceMap(Id nId) +{ + if (m_AttributesMap.find(nId) == m_AttributesMap.end()) + m_AttributesMap[nId] = createAttributeToResourceMap(nId); + + return m_AttributesMap[nId]; +} + +ListValueMapPointer OOXMLFactory_ns::getListValueMap(Id nId) +{ + if (m_ListValuesMap.find(nId) == m_ListValuesMap.end()) + m_ListValuesMap[nId] = createListValueMap(nId); + + return m_ListValuesMap[nId]; +} + +CreateElementMapPointer OOXMLFactory_ns::getCreateElementMap(Id nId) +{ + if (m_CreateElementsMap.find(nId) == m_CreateElementsMap.end()) + m_CreateElementsMap[nId] = createCreateElementMap(nId); + + return m_CreateElementsMap[nId]; +} + +TokenToIdMapPointer OOXMLFactory_ns::getTokenToIdMap(Id nId) +{ + if (m_TokenToIdsMap.find(nId) == m_TokenToIdsMap.end()) + m_TokenToIdsMap[nId] = createTokenToIdMap(nId); + + return m_TokenToIdsMap[nId]; +} + +string OOXMLFactory_ns::getDefineName(Id /*nId*/) const +{ + return ""; +} + +// class OOXMLFactory + +typedef rtl::Static< osl::Mutex, OOXMLFactory > OOXMLFactory_Mutex; + +OOXMLFactory::Pointer_t OOXMLFactory::m_Instance; + +OOXMLFactory::OOXMLFactory() +{ + // multi-thread-safe mutex for all platforms + + osl::MutexGuard aGuard(OOXMLFactory_Mutex::get()); +} + +OOXMLFactory::~OOXMLFactory() +{ +} + +OOXMLFactory::Pointer_t OOXMLFactory::getInstance() +{ + if (m_Instance.get() == NULL) + m_Instance.reset(new OOXMLFactory()); + + return m_Instance; +} + +void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler, + const uno::Reference< xml::sax::XFastAttributeList > & Attribs) +{ + Id nDefine = pHandler->getDefine(); + OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); + + if (pFactory.get() != NULL) + { +#ifdef DEBUG_ATTRIBUTES + debug_logger->startElement("attributes"); + debug_logger->attribute("define", pFactory->getDefineName(nDefine)); + char sBuffer[256]; + snprintf(sBuffer, sizeof(sBuffer), "%08" SAL_PRIxUINT32, nDefine); + debug_logger->attribute("define-num", sBuffer); +#endif + + TokenToIdMapPointer pTokenToIdMap = pFactory->getTokenToIdMap(nDefine); + AttributeToResourceMapPointer pMap = pFactory->getAttributeToResourceMap(nDefine); + + AttributeToResourceMap::const_iterator aIt; + AttributeToResourceMap::const_iterator aEndIt = pMap->end(); + + for (aIt = pMap->begin(); aIt != aEndIt; aIt++) + { + Id nId = (*pTokenToIdMap)[aIt->first]; +#ifdef DEBUG_ATTRIBUTES + debug_logger->startElement("attribute"); + debug_logger->attribute("name", fastTokenToId(aIt->first)); + debug_logger->attribute("tokenid", (*QNameToString::Instance())(nId)); + snprintf(sBuffer, sizeof(sBuffer), "%08" SAL_PRIxUINT32, nId); + debug_logger->attribute("tokenid-num", sBuffer); +#endif + if (Attribs->hasAttribute(aIt->first)) + { + switch (aIt->second.m_nResource) + { + case RT_Boolean: + { +#ifdef DEBUG_ATTRIBUTES + debug_logger->element("boolean"); +#endif + ::rtl::OUString aValue(Attribs->getValue(aIt->first)); + OOXMLFastHelper::newProperty(pHandler, nId, aValue); + + OOXMLValue::Pointer_t pValue(new OOXMLBooleanValue(aValue)); + pFactory->attributeAction(pHandler, aIt->first, pValue); + } + break; + case RT_String: + { +#ifdef DEBUG_ATTRIBUTES + debug_logger->element("string"); +#endif + ::rtl::OUString aValue(Attribs->getValue(aIt->first)); + OOXMLFastHelper::newProperty + (pHandler, nId, aValue); + + OOXMLValue::Pointer_t pValue(new OOXMLStringValue(aValue)); + pFactory->attributeAction(pHandler, aIt->first, pValue); + } + break; + case RT_Integer: + { +#ifdef DEBUG_ATTRIBUTES + debug_logger->element("integer"); +#endif + ::rtl::OUString aValue(Attribs->getValue(aIt->first)); + OOXMLFastHelper::newProperty + (pHandler, nId, aValue); + + OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue(aValue)); + pFactory->attributeAction(pHandler, aIt->first, pValue); + } + break; + case RT_Hex: + { +#ifdef DEBUG_ATTRIBUTES + debug_logger->element("hex"); +#endif + ::rtl::OUString aValue(Attribs->getValue(aIt->first)); + OOXMLFastHelper::newProperty + (pHandler, nId, aValue); + + OOXMLValue::Pointer_t pValue(new OOXMLHexValue(aValue)); + pFactory->attributeAction(pHandler, aIt->first, pValue); + } + break; + case RT_List: + { +#ifdef DEBUG_ATTRIBUTES + debug_logger->startElement("list"); +#endif + ListValueMapPointer pListValueMap = + pFactory->getListValueMap(aIt->second.m_nRef); + + if (pListValueMap.get() != NULL) + { + ::rtl::OUString aValue(Attribs->getValue(aIt->first)); + sal_uInt32 nValue = (*pListValueMap)[aValue]; + +#ifdef DEBUG_ATTRIBUTES + debug_logger->attribute("value", aValue); + debug_logger->attribute("value-num", nValue); +#endif + + OOXMLFastHelper::newProperty + (pHandler, nId, nValue); + + OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue(nValue)); + pFactory->attributeAction(pHandler, aIt->first, pValue); + } +#ifdef DEBUG_ATTRIBUTES + debug_logger->endElement("list"); +#endif + } + break; + default: +#ifdef DEBUG_ATTRIBUTES + debug_logger->element("unknown-attribute-type"); +#endif + break; + } + } +#ifdef DEBUG_ATTRIBUTES + debug_logger->endElement("attribute"); +#endif + } + +#ifdef DEBUG_ATTRIBUTES + debug_logger->endElement("attributes"); +#endif + } +} + +uno::Reference< xml::sax::XFastContextHandler> +OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, + Token_t Element) +{ + Id nDefine = pHandler->getDefine(); + + OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); + + return createFastChildContextFromFactory(pHandler, pFactory, Element); +} + +void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, + const ::rtl::OUString & rString) +{ + Id nDefine = pHandler->getDefine(); + OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); + + if (pFactory.get() != NULL) + { + pFactory->charactersAction(pHandler, rString); + } +} + +void OOXMLFactory::startAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/) +{ + Id nDefine = pHandler->getDefine(); + OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); + + if (pFactory.get() != NULL) + { +#ifdef DEBUG_ELEMENT + debug_logger->startElement("factory-startAction"); +#endif + pFactory->startAction(pHandler); +#ifdef DEBUG_ELEMENT + debug_logger->endElement("factory-startAction"); +#endif + } +} + +void OOXMLFactory::endAction(OOXMLFastContextHandler * pHandler, Token_t /*nToken*/) +{ + Id nDefine = pHandler->getDefine(); + OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); + + if (pFactory.get() != NULL) + { +#ifdef DEBUG_ELEMENT + debug_logger->startElement("factory-endAction"); +#endif + pFactory->endAction(pHandler); +#ifdef DEBUG_ELEMENT + debug_logger->endElement("factory-endAction"); +#endif + } +} + +void OOXMLFactory_ns::startAction(OOXMLFastContextHandler *) +{ +} + +void OOXMLFactory_ns::endAction(OOXMLFastContextHandler *) +{ +} + +void OOXMLFactory_ns::charactersAction(OOXMLFastContextHandler *, const ::rtl::OUString &) +{ +} + +void OOXMLFactory_ns::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t) +{ +} + +} +} + diff --git a/writerfilter/source/ooxml/OOXMLFactory.hxx b/writerfilter/source/ooxml/OOXMLFactory.hxx new file mode 100755 index 000000000000..0558436ab793 --- /dev/null +++ b/writerfilter/source/ooxml/OOXMLFactory.hxx @@ -0,0 +1,176 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef INCLUDED_OOXML_FACTORY_HXX +#define INCLUDED_OOXML_FACTORY_HXX + +#include +#include + +#ifndef INCLUDED_WW8_RESOURCE_MODEL_HXX +#include +#endif + +#ifndef INCLUDED_OOXML_FAST_TOKENS_HXX +#include +#endif + +#ifndef INCLUDED_OOXML_FAST_CONTEXT_HANDLER_HXX +#include "OOXMLFastContextHandler.hxx" +#endif + +namespace writerfilter { +namespace ooxml { + +using namespace std; + +enum ResourceType_t { + RT_NoResource, + RT_Table, + RT_Stream, + RT_List, + RT_Integer, + RT_Properties, + RT_Hex, + RT_String, + RT_Shape, + RT_Boolean, + RT_HexValue, + RT_Value, + RT_XNote, + RT_TextTableCell, + RT_TextTableRow, + RT_TextTable, + RT_PropertyTable, + RT_Any +}; + +struct AttributeInfo +{ + ResourceType_t m_nResource; + Id m_nRef; + + AttributeInfo(ResourceType_t nResource, Id nRef); + AttributeInfo(); +}; + +typedef hash_map AttributeToResourceMap; +typedef boost::shared_ptr AttributeToResourceMapPointer; +typedef hash_map AttributesMap; + +typedef hash_map ListValueMap; +typedef boost::shared_ptr ListValueMapPointer; +typedef hash_map ListValuesMap; + +struct CreateElement +{ + ResourceType_t m_nResource; + Id m_nId; + + CreateElement(ResourceType_t nResource, Id nId); + CreateElement(); +}; + +typedef hash_map CreateElementMap; +typedef boost::shared_ptr CreateElementMapPointer; +typedef hash_map CreateElementsMap; +typedef hash_map IdToStringMap; +typedef boost::shared_ptr IdToStringMapPointer; + +typedef hash_map TokenToIdMap; +typedef boost::shared_ptr TokenToIdMapPointer; +typedef hash_map TokenToIdsMap; + +class OOXMLFactory_ns { +public: + typedef boost::shared_ptr Pointer_t; + + virtual void startAction(OOXMLFastContextHandler * pHandler); + virtual void charactersAction(OOXMLFastContextHandler * pHandler, const ::rtl::OUString & rString); + virtual void endAction(OOXMLFastContextHandler * pHandler); + virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); + virtual string getDefineName(Id nId) const; + + AttributeToResourceMapPointer getAttributeToResourceMap(Id nId); + ListValueMapPointer getListValueMap(Id nId); + CreateElementMapPointer getCreateElementMap(Id nId); + TokenToIdMapPointer getTokenToIdMap(Id nId); + +protected: + virtual ~OOXMLFactory_ns(); + + AttributesMap m_AttributesMap; + ListValuesMap m_ListValuesMap; + CreateElementsMap m_CreateElementsMap; + TokenToIdsMap m_TokenToIdsMap; + + virtual AttributeToResourceMapPointer createAttributeToResourceMap(Id nId) = 0; + virtual ListValueMapPointer createListValueMap(Id nId) = 0; + virtual CreateElementMapPointer createCreateElementMap(Id nId) = 0; + virtual TokenToIdMapPointer createTokenToIdMap(Id nId) = 0; +}; + +class OOXMLFactory +{ +public: + typedef boost::shared_ptr Pointer_t; + + static Pointer_t getInstance(); + + uno::Reference< xml::sax::XFastContextHandler> createFastChildContext + (OOXMLFastContextHandler * pHandler, Token_t Element); + + uno::Reference< xml::sax::XFastContextHandler> createFastChildContextFromStart + (OOXMLFastContextHandler * pHandler, Token_t Element); + + void attributes(OOXMLFastContextHandler * pHandler, + const uno::Reference< xml::sax::XFastAttributeList > & Attribs); + + void characters(OOXMLFastContextHandler * pHandler, + const ::rtl::OUString & rString); + + void startAction(OOXMLFastContextHandler * pHandler, Token_t nToken); + void endAction(OOXMLFastContextHandler * pHandler, Token_t nToken); + + virtual ~OOXMLFactory(); + +private: + static Pointer_t m_Instance; + + OOXMLFactory(); + OOXMLFactory_ns::Pointer_t getFactoryForNamespace(Id id); + + uno::Reference< xml::sax::XFastContextHandler> + createFastChildContextFromFactory(OOXMLFastContextHandler * pHandler, + OOXMLFactory_ns::Pointer_t pFactory, + Token_t Element); +}; + +} +} + +#endif // INCLUDED_OOXML_FACTORY_HXX diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 6b52563887ee..51960959d185 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -9,7 +9,7 @@ * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 + * it under the terms of the GNU Lesser General Public License version 3sen * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, @@ -33,11 +33,15 @@ #include #include #include +#include #include #include "OOXMLFastContextHandler.hxx" +#include "OOXMLFactory.hxx" #include "Handler.hxx" #include "ooxmlLoggers.hxx" +static const ::rtl::OUString aEmptyStr; + static const sal_uInt8 s0x7[] = { 0x7, 0x0 }; static const sal_uInt8 s0xd[] = { 0xd, 0x0 }; static const sal_uInt8 sCR[] = { 0xd, 0x0 }; @@ -105,10 +109,12 @@ public: virtual string toString(const Id & rId) const { - string s(fastTokenToId(rId)); + string s((*QNameToString::Instance())(rId)); if (s.size() == 0) - s = (*QNameToString::Instance())(rId); + s = "(fasttoken)" + fastTokenToId(rId); + else + s = "(qname)" + s; return s; } @@ -124,6 +130,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler (uno::Reference< uno::XComponentContext > const & context) : mpParent(NULL), mId(0), + mnDefine(0), mnToken(OOXML_FAST_TOKENS_END), mpStream(NULL), mnTableDepth(0), @@ -295,7 +302,7 @@ void OOXMLFastContextHandler::lcl_startFastElement const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { - startAction(Element); + OOXMLFactory::getInstance()->startAction(this, Element); } void OOXMLFastContextHandler::lcl_endFastElement @@ -310,7 +317,7 @@ void OOXMLFastContextHandler::lcl_endFastElement debug_logger->endElement("token"); #endif - endAction(Element); + OOXMLFactory::getInstance()->endAction(this, Element); } void SAL_CALL OOXMLFastContextHandler::endUnknownElement @@ -347,14 +354,11 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL uno::Reference< xml::sax::XFastContextHandler > OOXMLFastContextHandler::lcl_createFastChildContext -(Token_t /*Element*/, +(Token_t Element, const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { - OOXMLFastContextHandler * pResult = new OOXMLFastContextHandler(this); - pResult->setFallback(true); - - return uno::Reference< xml::sax::XFastContextHandler > (pResult); + return OOXMLFactory::getInstance()->createFastChildContext(this, Element); } uno::Reference< xml::sax::XFastContextHandler > SAL_CALL @@ -386,9 +390,10 @@ void SAL_CALL OOXMLFastContextHandler::characters } void OOXMLFastContextHandler::lcl_characters -(const ::rtl::OUString & /*aChars*/) +(const ::rtl::OUString & rString) throw (uno::RuntimeException, xml::sax::SAXException) { + OOXMLFactory::getInstance()->characters(this, rString); } const uno::Sequence< sal_Int8 > & OOXMLFastContextHandler::getUnoTunnelId() @@ -422,9 +427,10 @@ OOXMLValue::Pointer_t OOXMLFastContextHandler::getValue() const } void OOXMLFastContextHandler::attributes -(const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) +(const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException) { + OOXMLFactory::getInstance()->attributes(this, Attribs); } void OOXMLFastContextHandler::startAction(Token_t Element) @@ -438,8 +444,9 @@ void OOXMLFastContextHandler::startAction(Token_t Element) #endif } -void OOXMLFastContextHandler::lcl_startAction(Token_t /* Element */) +void OOXMLFastContextHandler::lcl_startAction(Token_t Element) { + OOXMLFactory::getInstance()->startAction(this, Element); } void OOXMLFastContextHandler::endAction(Token_t Element) @@ -453,8 +460,9 @@ void OOXMLFastContextHandler::endAction(Token_t Element) #endif } -void OOXMLFastContextHandler::lcl_endAction(Token_t /* Element */) +void OOXMLFastContextHandler::lcl_endAction(Token_t Element) { + OOXMLFactory::getInstance()->endAction(this, Element); } XMLTag::Pointer_t OOXMLFastContextHandler::toPropertiesTag @@ -518,7 +526,7 @@ void OOXMLFastContextHandler::setId(Id rId) debug_logger->startElement("setId"); static char sBuffer[256]; - snprintf(sBuffer, sizeof(sBuffer), "%ld", rId); + snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIuUINT32, rId); debug_logger->attribute("id", sBuffer); debug_logger->chars((*QNameToString::Instance())(rId)); @@ -533,6 +541,16 @@ Id OOXMLFastContextHandler::getId() const return mId; } +void OOXMLFastContextHandler::setDefine(Id nDefine) +{ + mnDefine = nDefine; +} + +Id OOXMLFastContextHandler::getDefine() const +{ + return mnDefine; +} + void OOXMLFastContextHandler::setFallback(bool bFallback) { mbFallback = bFallback; @@ -603,14 +621,14 @@ void OOXMLFastContextHandler::sendTableDepth() const OOXMLValue::Pointer_t pVal (new OOXMLIntegerValue(mnTableDepth)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x6649, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PTableDepth, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } { OOXMLValue::Pointer_t pVal (new OOXMLIntegerValue(1)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x2416, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PFInTable, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } @@ -620,10 +638,10 @@ void OOXMLFastContextHandler::sendTableDepth() const debug_logger->endElement("props"); #endif mpStream->props(writerfilter::Reference::Pointer_t(pProps)); -#ifdef DEBUG_PROPERTIES - debug_logger->endElement("sendTableDepth"); -#endif } +#ifdef DEBUG_ELEMENT + debug_logger->endElement("sendTableDepth"); +#endif } void OOXMLFastContextHandler::setHandle() @@ -945,13 +963,103 @@ bool OOXMLFastContextHandler::propagatesProperties() const return false; } -void OOXMLFastContextHandler::propagateTableProperties() +void OOXMLFastContextHandler::propagateCellProperties() { #ifdef DEBUG_ELEMENT - debug_logger->element("propagateTableProperties"); + debug_logger->element("propagateCellProperties"); #endif - mpParserState->setTableProperties(getPropertySet()); + mpParserState->setCellProperties(getPropertySet()); +} + +void OOXMLFastContextHandler::propagateRowProperties() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("propagateRowProperties"); +#endif + + mpParserState->setRowProperties(getPropertySet()); +} + +void OOXMLFastContextHandler::propagateTableProperties() +{ + OOXMLPropertySet::Pointer_t pProps = getPropertySet(); +#ifdef DEBUG_ELEMENT + debug_logger->startElement("propagateTableProperties"); + debug_logger->addTag(toPropertiesTag(pProps)); + debug_logger->endElement("propagateTableProperties"); +#endif + + mpParserState->setTableProperties(pProps); +} + +void OOXMLFastContextHandler::sendCellProperties() +{ +#ifdef DEBUG_ELEMENT + debug_logger->startElement("sendCellProperties"); +#endif + + mpParserState->resolveCellProperties(*mpStream); + +#ifdef DEBUG_ELEMENT + debug_logger->endElement("sendCellProperties"); +#endif +} + +void OOXMLFastContextHandler::sendRowProperties() +{ +#ifdef DEBUG_ELEMENT + debug_logger->startElement("sendRowProperties"); +#endif + + mpParserState->resolveRowProperties(*mpStream); + +#ifdef DEBUG_ELEMENT + debug_logger->endElement("sendRowProperties"); +#endif +} + +void OOXMLFastContextHandler::sendTableProperties() +{ +#ifdef DEBUG_ELEMENT + debug_logger->startElement("sendTableProperties"); +#endif + + mpParserState->resolveTableProperties(*mpStream); + +#ifdef DEBUG_ELEMENT + debug_logger->endElement("sendTableProperties"); +#endif +} + +void OOXMLFastContextHandler::clearCellProps() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("clearCellProps"); +#endif + + mpParserState->setCellProperties(OOXMLPropertySet::Pointer_t + (new OOXMLPropertySetImpl())); +} + +void OOXMLFastContextHandler::clearRowProps() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("clearRowProps"); +#endif + + mpParserState->setRowProperties(OOXMLPropertySet::Pointer_t + (new OOXMLPropertySetImpl())); +} + +void OOXMLFastContextHandler::clearTableProps() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("clearTableProps"); +#endif + + mpParserState->setTableProperties(OOXMLPropertySet::Pointer_t + (new OOXMLPropertySetImpl())); } void OOXMLFastContextHandler::sendPropertiesWithId(const Id & rId) @@ -985,6 +1093,27 @@ void OOXMLFastContextHandler::clearProps() setPropertySet(OOXMLPropertySet::Pointer_t(new OOXMLPropertySetImpl())); } +void OOXMLFastContextHandler::setDefaultBooleanValue() +{ +} + +void OOXMLFastContextHandler::setDefaultIntegerValue() +{ +} + +void OOXMLFastContextHandler::setDefaultHexValue() +{ +} + +void OOXMLFastContextHandler::setDefaultStringValue() +{ +} + +const ::rtl::OUString & OOXMLFastContextHandler::getText() const +{ + return aEmptyStr; +} + void OOXMLFastContextHandler::setDocument(OOXMLDocument * pDocument) { mpParserState->setDocument(pDocument); @@ -1021,6 +1150,11 @@ void OOXMLFastContextHandler::setXNoteId(const ::rtl::OUString & rId) mpParserState->setXNoteId(rId); } +void OOXMLFastContextHandler::setXNoteId(OOXMLValue::Pointer_t pValue) +{ + mpParserState->setXNoteId(pValue->getString()); +} + const rtl::OUString & OOXMLFastContextHandler::getXNoteId() const { return mpParserState->getXNoteId(); @@ -1083,6 +1217,10 @@ void OOXMLFastContextHandler::resolvePropertySetAttrs() void OOXMLFastContextHandler::sendPropertyToParent() { +#ifdef DEBUG_ELEMENT + debug_logger->startElement("sendPropertyToParent"); +#endif + if (mpParent != NULL) { OOXMLPropertySet::Pointer_t pProps(mpParent->getPropertySet()); @@ -1093,8 +1231,64 @@ void OOXMLFastContextHandler::sendPropertyToParent() pProp(new OOXMLPropertyImpl(mId, getValue(), OOXMLPropertyImpl::SPRM)); pProps->add(pProp); + +#ifdef DEBUG_ELEMENT + debug_logger->addTag(toPropertiesTag(pProps)); +#endif } } + +#ifdef DEBUG_ELEMENT + debug_logger->endElement("sendPropertyToParent"); +#endif +} + +void OOXMLFastContextHandler::sendPropertiesToParent() +{ +#ifdef DEBUG_ELEMENT + debug_logger->startElement("sendPropertiesToParent"); +#endif + if (mpParent != NULL) + { + OOXMLPropertySet::Pointer_t pParentProps(mpParent->getPropertySet()); + + if (pParentProps.get() != NULL) + { + OOXMLPropertySet::Pointer_t pProps(getPropertySet()); + +#ifdef DEBUG_ELEMENT + debug_logger->startElement("me"); + debug_logger->addTag(toPropertiesTag(pProps)); + debug_logger->endElement("me"); +#endif + + if (pProps.get() != NULL) + { + OOXMLValue::Pointer_t pValue + (new OOXMLPropertySetValue(getPropertySet())); + + OOXMLProperty::Pointer_t pProp + (new OOXMLPropertyImpl(getId(), pValue, OOXMLPropertyImpl::SPRM)); + +#ifdef DEBUG_ELEMENT + debug_logger->startElement("propertyForSet"); + debug_logger->chars(pProp->toString()); + debug_logger->endElement("propertyForSet"); +#endif + + pParentProps->add(pProp); + +#ifdef DEBUG_ELEMENT + debug_logger->startElement("parent"); + debug_logger->addTag(toPropertiesTag(pParentProps)); + debug_logger->endElement("parent"); +#endif + } + } + } +#ifdef DEBUG_ELEMENT + debug_logger->endElement("sendPropertiesToParent"); +#endif } uno::Reference< uno::XComponentContext > @@ -1229,39 +1423,16 @@ void OOXMLFastContextHandlerProperties::lcl_endFastElement { #ifdef DEBUG_PROPERTIES debug_logger->startElement("sendproperties"); - debug_logger->addTag(toPropertiesTag(getPropertySet())); - debug_logger->endElement("sendproperties"); #endif mpStream->props(mpPropertySet); +#ifdef DEBUG_PROPERTIES + debug_logger->endElement("sendproperties"); +#endif } } else { - OOXMLValue::Pointer_t pVal - (new OOXMLPropertySetValue(mpPropertySet)); - - OOXMLPropertyImpl::Pointer_t pProperty - (new OOXMLPropertyImpl(mId, pVal, OOXMLPropertyImpl::SPRM)); - - OOXMLPropertySet::Pointer_t pProperties = (*mpParent).getPropertySet(); - - if (pProperties.get() != NULL) - { -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("property"); - debug_logger->chars(xmlify(pProperty->toString())); - debug_logger->endElement("property"); -#endif - pProperties->add(pProperty); - } -#ifdef DEBUG_PROPERTIES - else if (! propagatesProperties()) - { - debug_logger->startElement("warning"); - debug_logger->chars("properties lost"); - debug_logger->endElement("warning"); - } -#endif + sendPropertiesToParent(); } } @@ -1425,197 +1596,102 @@ void OOXMLFastContextHandlerPropertyTable::lcl_endFastElement mTable.add(pTmpVal); writerfilter::Reference
::Pointer_t pTable(mTable.clone()); + +#ifdef DEBUG_PROPERTIES + debug_logger->startElement("table"); + debug_logger->attribute("id", (*QNameToString::Instance())(mId)); + debug_logger->endElement("table"); +#endif + mpStream->table(mId, pTable); endAction(Element); } /* - class OOXMLFastContextHandlerBooleanValue - */ + class OOXMLFastContextHandlerValue +*/ -OOXMLFastContextHandlerBooleanValue::OOXMLFastContextHandlerBooleanValue -(OOXMLFastContextHandler * pContext) -: OOXMLFastContextHandler(pContext), mbValue(true) -{ -} - -OOXMLFastContextHandlerBooleanValue::~OOXMLFastContextHandlerBooleanValue() -{ -} - -void OOXMLFastContextHandlerBooleanValue::attributes -(const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - if (Attribs->hasAttribute(NS_wordprocessingml|OOXML_val)) - mbValue = Attribs->getValue(NS_wordprocessingml|OOXML_val).toBoolean(); -} - -OOXMLValue::Pointer_t OOXMLFastContextHandlerBooleanValue::getValue() const -{ - return OOXMLValue::Pointer_t(new OOXMLBooleanValue(mbValue)); -} - -void OOXMLFastContextHandlerBooleanValue::setValue -(const ::rtl::OUString & rString) -{ - static rtl::OUString sOn(RTL_CONSTASCII_USTRINGPARAM("on")); - static rtl::OUString sOff(RTL_CONSTASCII_USTRINGPARAM("off")); - static rtl::OUString sTrue(RTL_CONSTASCII_USTRINGPARAM("true")); - static rtl::OUString sFalse(RTL_CONSTASCII_USTRINGPARAM("false")); - - if (rString == sOn || rString == sTrue) - mbValue = true; - else if (rString == sOff || rString == sFalse) - mbValue = false; -} - -void OOXMLFastContextHandlerBooleanValue::lcl_endFastElement -(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - sendPropertyToParent(); - - endAction(Element); -} - -/* - class OOXMLFastContextHandlerIntegerValue - */ - -OOXMLFastContextHandlerIntegerValue::OOXMLFastContextHandlerIntegerValue -(OOXMLFastContextHandler * pContext) -: OOXMLFastContextHandler(pContext), mnValue(0) -{ -} - -OOXMLFastContextHandlerIntegerValue::~OOXMLFastContextHandlerIntegerValue() -{ -} - -void OOXMLFastContextHandlerIntegerValue::attributes -(const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - if (Attribs->hasAttribute(NS_wordprocessingml|OOXML_val)) - mnValue = Attribs->getValue(NS_wordprocessingml|OOXML_val).toInt32(); -} - -void OOXMLFastContextHandlerIntegerValue::lcl_endFastElement -(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - sendPropertyToParent(); - - endAction(Element); -} - -OOXMLValue::Pointer_t OOXMLFastContextHandlerIntegerValue::getValue() const -{ - return OOXMLValue::Pointer_t(new OOXMLIntegerValue(mnValue)); -} - -/* - class OOXMLFastContextHandlerStringValue - */ - -OOXMLFastContextHandlerStringValue::OOXMLFastContextHandlerStringValue +OOXMLFastContextHandlerValue::OOXMLFastContextHandlerValue (OOXMLFastContextHandler * pContext) : OOXMLFastContextHandler(pContext) { } -OOXMLFastContextHandlerStringValue::~OOXMLFastContextHandlerStringValue() +OOXMLFastContextHandlerValue::~OOXMLFastContextHandlerValue() { } -void OOXMLFastContextHandlerStringValue::attributes -(const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException) +void OOXMLFastContextHandlerValue::setValue(OOXMLValue::Pointer_t pValue) { - if (Attribs->hasAttribute(NS_wordprocessingml|OOXML_val)) - msValue = Attribs->getValue(NS_wordprocessingml|OOXML_val); + mpValue = pValue; } -void OOXMLFastContextHandlerStringValue::lcl_endFastElement -(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - sendPropertyToParent(); - - endAction(Element); -} - -OOXMLValue::Pointer_t OOXMLFastContextHandlerStringValue::getValue() const -{ - return OOXMLValue::Pointer_t(new OOXMLStringValue(msValue)); -} - -/* - class OOXMLFastContextHandlerHexValue - */ - -OOXMLFastContextHandlerHexValue::OOXMLFastContextHandlerHexValue -(OOXMLFastContextHandler * pContext) -: OOXMLFastContextHandler(pContext), mnValue(0) -{ -} - -OOXMLFastContextHandlerHexValue::~OOXMLFastContextHandlerHexValue() -{ -} - -void OOXMLFastContextHandlerHexValue::attributes -(const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - if (Attribs->hasAttribute(NS_wordprocessingml|OOXML_val)) - mnValue = Attribs->getValue(NS_wordprocessingml|OOXML_val).toInt32(16); -} - -void OOXMLFastContextHandlerHexValue::lcl_endFastElement -(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - sendPropertyToParent(); - - endAction(Element); -} - -OOXMLValue::Pointer_t OOXMLFastContextHandlerHexValue::getValue() const -{ - return OOXMLValue::Pointer_t(new OOXMLIntegerValue(mnValue)); -} - -/* - class OOXMLFastContextHandlerListValue - */ - -OOXMLFastContextHandlerListValue::OOXMLFastContextHandlerListValue -(OOXMLFastContextHandler * pContext) -: OOXMLFastContextHandler(pContext) -{ -} - -OOXMLFastContextHandlerListValue::~OOXMLFastContextHandlerListValue() -{ -} - -void OOXMLFastContextHandlerListValue::lcl_endFastElement -(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - sendPropertyToParent(); - - endAction(Element); -} - -OOXMLValue::Pointer_t OOXMLFastContextHandlerListValue::getValue() const +OOXMLValue::Pointer_t OOXMLFastContextHandlerValue::getValue() const { return mpValue; } +void OOXMLFastContextHandlerValue::lcl_endFastElement +(Token_t Element) +throw (uno::RuntimeException, xml::sax::SAXException) +{ + sendPropertyToParent(); + + endAction(Element); +} + +void OOXMLFastContextHandlerValue::setDefaultBooleanValue() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("setDefaultBooleanValue"); +#endif + + if (mpValue.get() == NULL) + { + OOXMLValue::Pointer_t pValue(new OOXMLBooleanValue(true)); + setValue(pValue); + } +} + +void OOXMLFastContextHandlerValue::setDefaultIntegerValue() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("setDefaultIntegerValue"); +#endif + + if (mpValue.get() == NULL) + { + OOXMLValue::Pointer_t pValue(new OOXMLIntegerValue(0)); + setValue(pValue); + } +} + +void OOXMLFastContextHandlerValue::setDefaultHexValue() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("setDefaultHexValue"); +#endif + + if (mpValue.get() == NULL) + { + OOXMLValue::Pointer_t pValue(new OOXMLHexValue(0)); + setValue(pValue); + } +} + +void OOXMLFastContextHandlerValue::setDefaultStringValue() +{ +#ifdef DEBUG_ELEMENT + debug_logger->element("setDefaultStringValue"); +#endif + + if (mpValue.get() == NULL) + { + OOXMLValue::Pointer_t pValue(new OOXMLStringValue(::rtl::OUString())); + setValue(pValue); + } +} /* class OOXMLFastContextHandlerTable */ @@ -1652,7 +1728,16 @@ void OOXMLFastContextHandlerTable::lcl_endFastElement writerfilter::Reference
::Pointer_t pTable(mTable.clone()); if (isForwardEvents() && mId != 0x0) + { +#ifdef DEBUG_PROPERTIES + debug_logger->startElement("table"); + string str = (*QNameToString::Instance())(mId); + debug_logger->attribute("id", str); + debug_logger->endElement("table"); +#endif + mpStream->table(mId, pTable); + } } void OOXMLFastContextHandlerTable::addCurrentChild() @@ -1714,16 +1799,16 @@ void OOXMLFastContextHandlerXNote::lcl_endFastElement setForwardEvents(mbForwardEventsSaved); } -void OOXMLFastContextHandlerXNote::checkId(const rtl::OUString & rId) +void OOXMLFastContextHandlerXNote::checkId(OOXMLValue::Pointer_t pValue) { #ifdef DEBUG_ELEMENT debug_logger->startElement("checkId"); - debug_logger->attribute("myId", rId); + debug_logger->attribute("myId", pValue->getString()); debug_logger->attribute("id", getXNoteId()); debug_logger->endElement("checkId"); #endif - msMyXNoteId = rId; + msMyXNoteId = pValue->getString(); } /* @@ -1753,21 +1838,21 @@ void OOXMLFastContextHandlerTextTableCell::endCell() OOXMLValue::Pointer_t pVal (new OOXMLIntegerValue(mnTableDepth)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x6649, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PTableDepth, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } { OOXMLValue::Pointer_t pVal (new OOXMLIntegerValue(1)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x2416, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PFInTable, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } { OOXMLValue::Pointer_t pVal - (new OOXMLIntegerValue(mnTableDepth)); + (new OOXMLBooleanValue(mnTableDepth > 0)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x244b, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PCell, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } @@ -1789,12 +1874,10 @@ OOXMLFastContextHandlerTextTableRow::OOXMLFastContextHandlerTextTableRow (OOXMLFastContextHandler * pContext) : OOXMLFastContextHandler(pContext) { - startRow(); } OOXMLFastContextHandlerTextTableRow::~OOXMLFastContextHandlerTextTableRow() { - endRow(); } void OOXMLFastContextHandlerTextTableRow::startRow() @@ -1812,21 +1895,21 @@ void OOXMLFastContextHandlerTextTableRow::endRow() OOXMLValue::Pointer_t pVal (new OOXMLIntegerValue(mnTableDepth)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x6649, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PTableDepth, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } { OOXMLValue::Pointer_t pVal (new OOXMLIntegerValue(1)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x2416, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PFInTable, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } { OOXMLValue::Pointer_t pVal (new OOXMLIntegerValue(1)); OOXMLProperty::Pointer_t pProp - (new OOXMLPropertyImpl(0x244c, pVal, OOXMLPropertyImpl::SPRM)); + (new OOXMLPropertyImpl(NS_sprm::LN_PRow, pVal, OOXMLPropertyImpl::SPRM)); pProps->add(pProp); } @@ -1838,7 +1921,6 @@ void OOXMLFastContextHandlerTextTableRow::endRow() #endif mpStream->props(writerfilter::Reference::Pointer_t(pProps)); - mpParserState->resolveTableProperties(*mpStream); } startCharacterGroup(); @@ -1846,6 +1928,7 @@ void OOXMLFastContextHandlerTextTableRow::endRow() if (isForwardEvents()) mpStream->utext(s0xd, 1); + endCharacterGroup(); endParagraphGroup(); } @@ -1861,6 +1944,7 @@ OOXMLFastContextHandlerTextTable::OOXMLFastContextHandlerTextTable OOXMLFastContextHandlerTextTable::~OOXMLFastContextHandlerTextTable() { + clearTableProps(); } void OOXMLFastContextHandlerTextTable::lcl_startFastElement @@ -1868,6 +1952,7 @@ void OOXMLFastContextHandlerTextTable::lcl_startFastElement const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { + mpParserState->startTable(); mnTableDepth++; boost::shared_ptr pProps( new OOXMLPropertySetImpl ); @@ -1890,6 +1975,7 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement endAction(Element); mnTableDepth--; + mpParserState->endTable(); } /* @@ -1964,7 +2050,8 @@ void SAL_CALL ShapesNoAdd::remove(const uno::Reference< drawing::XShape > & xSha OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape (OOXMLFastContextHandler * pContext) -: OOXMLFastContextHandlerProperties(pContext), m_bShapeSent( false ) +: OOXMLFastContextHandlerProperties(pContext), m_bShapeSent( false ), + m_bShapeStarted(false) { uno::Reference xContext(getComponentContext()); if (xContext.is()) @@ -2056,7 +2143,10 @@ void OOXMLFastContextHandlerShape::sendShape( Token_t Element ) // Notify the dmapper that the shape is ready to use if ( !bIsPicture ) + { mpStream->startShape( xShape ); + m_bShapeStarted = true; + } } } } @@ -2075,7 +2165,7 @@ void OOXMLFastContextHandlerShape::lcl_endFastElement // Ending the shape should be the last thing to do bool bIsPicture = Element == ( NS_picture | OOXML_pic ); - if ( !bIsPicture ) + if ( !bIsPicture && m_bShapeStarted) mpStream->endShape( ); } @@ -2103,7 +2193,7 @@ OOXMLFastContextHandlerShape::lcl_createFastChildContext case NS_wordprocessingml: case NS_vml_wordprocessingDrawing: case NS_office: - xContextHandler.set(createFromStart(Element, Attribs)); + xContextHandler.set(OOXMLFactory::getInstance()->createFastChildContextFromStart(this, Element)); break; default: if (mrShapeContext.is()) @@ -2287,7 +2377,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext bool bInNamespaces = mMyNamespaces.find(nNameSpace) != mMyNamespaces.end(); bool bInTokens = mMyTokens.find( Element ) != mMyTokens.end( ); if ( bInNamespaces ) - xResult.set(createFromStart(Element, Attribs)); + xResult.set(OOXMLFactory::getInstance()->createFastChildContextFromStart(this, Element)); else if (mxContext.is()) { OOXMLFastContextHandlerWrapper * pWrapper = diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index 26e040182f57..b67f86fda3e7 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -130,7 +130,7 @@ public: */ virtual string getType() const { return "??"; } - virtual ResourceEnum_t getResource() const { return UNKNOWN; } + virtual ResourceEnum_t getResource() const { return STREAM; } static XMLTag::Pointer_t toPropertiesTag(OOXMLPropertySet::Pointer_t); virtual XMLTag::Pointer_t toTag() const; @@ -168,6 +168,7 @@ public: void setDocument(OOXMLDocument * pDocument); OOXMLDocument * getDocument(); + void setXNoteId(OOXMLValue::Pointer_t pValue); void setXNoteId(const ::rtl::OUString & rId); const rtl::OUString & getXNoteId() const; void setForwardEvents(bool bForwardEvents); @@ -176,6 +177,8 @@ public: virtual void setId(Id nId); virtual Id getId() const; + void setDefine(Id nDefine); + Id getDefine() const; void setFallback(bool bFallbac); bool isFallback() const; @@ -188,11 +191,61 @@ public: sal_uInt32 getInstanceNumber() const; + void sendTableDepth() const; + void setHandle(); + + void startSectionGroup(); + void setLastParagraphInSection(); + void endSectionGroup(); + void startParagraphGroup(); + void endParagraphGroup(); + void startCharacterGroup(); + void endCharacterGroup(); + + void startField(); + void fieldSeparator(); + void endField(); + void ftnednref(); + void ftnedncont(); + void ftnednsep(); + void pgNum(); + void tab(); + void cr(); + void noBreakHyphen(); + void softHyphen(); + void handleLastParagraphInSection(); + void endOfParagraph(); + void text(const ::rtl::OUString & sText); + virtual void propagateCharacterProperties(); + virtual void propagateCharacterPropertiesAsSet(const Id & rId); + virtual void propagateTableProperties(); + virtual void propagateRowProperties(); + virtual void propagateCellProperties(); + virtual bool propagatesProperties() const; + void sendPropertiesWithId(const Id & rId); + void sendPropertiesToParent(); + void sendCellProperties(); + void sendRowProperties(); + void sendTableProperties(); + void clearCellProps(); + void clearRowProps(); + void clearTableProps(); + void clearProps(); + + virtual void setDefaultBooleanValue(); + virtual void setDefaultIntegerValue(); + virtual void setDefaultHexValue(); + virtual void setDefaultStringValue(); + + const ::rtl::OUString & getText() const; + + void sendPropertyToParent(); static void dumpOpenContexts(); protected: OOXMLFastContextHandler * mpParent; Id mId; + Id mnDefine; Token_t mnToken; #ifdef DEBUG_CONTEXT_STACK @@ -238,40 +291,6 @@ protected: (const ::rtl::OUString & rId); virtual void resolvePropertySetAttrs(); - void sendTableDepth() const; - void setHandle(); - - void startSectionGroup(); - void setLastParagraphInSection(); - void endSectionGroup(); - void startParagraphGroup(); - void endParagraphGroup(); - void startCharacterGroup(); - void endCharacterGroup(); - - void startField(); - void fieldSeparator(); - void endField(); - void ftnednref(); - void ftnedncont(); - void ftnednsep(); - void pgNum(); - void tab(); - void cr(); - void noBreakHyphen(); - void softHyphen(); - void handleLastParagraphInSection(); - void endOfParagraph(); - void text(const ::rtl::OUString & sText); - virtual void propagateCharacterProperties(); - virtual void propagateCharacterPropertiesAsSet(const Id & rId); - virtual bool propagatesProperties() const; - void sendPropertiesWithId(const Id & rId); - void propagateTableProperties(); - void clearProps(); - - void sendPropertyToParent(); - uno::Reference< uno::XComponentContext > getComponentContext(); sal_uInt32 mnInstanceNumber; @@ -368,101 +387,29 @@ protected: throw (uno::RuntimeException, xml::sax::SAXException); }; -class OOXMLFastContextHandlerBooleanValue : +class OOXMLFastContextHandlerValue : public OOXMLFastContextHandler { public: - OOXMLFastContextHandlerBooleanValue + OOXMLFastContextHandlerValue (OOXMLFastContextHandler * pContext); - virtual ~OOXMLFastContextHandlerBooleanValue(); - -protected: - bool mbValue; - - virtual void attributes - (const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException); + virtual ~OOXMLFastContextHandlerValue(); + virtual void setValue(OOXMLValue::Pointer_t pValue); virtual OOXMLValue::Pointer_t getValue() const; - void setValue(const ::rtl::OUString & rString); -}; - -class OOXMLFastContextHandlerIntegerValue : - public OOXMLFastContextHandler -{ -public: - OOXMLFastContextHandlerIntegerValue - (OOXMLFastContextHandler * pContext); - virtual ~OOXMLFastContextHandlerIntegerValue(); - -protected: - sal_Int32 mnValue; - - void attributes - (const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException); - - virtual OOXMLValue::Pointer_t getValue() const; -}; - -class OOXMLFastContextHandlerStringValue : - public OOXMLFastContextHandler -{ -public: - OOXMLFastContextHandlerStringValue - (OOXMLFastContextHandler * pContext); - virtual ~OOXMLFastContextHandlerStringValue(); - -protected: - ::rtl::OUString msValue; - - void attributes - (const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException); - - virtual OOXMLValue::Pointer_t getValue() const; -}; - -class OOXMLFastContextHandlerHexValue : - public OOXMLFastContextHandler -{ -public: - OOXMLFastContextHandlerHexValue - (OOXMLFastContextHandler * pContext); - virtual ~OOXMLFastContextHandlerHexValue(); - -protected: - sal_Int32 mnValue; - - void attributes - (const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException); - virtual void lcl_endFastElement(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException); - - virtual OOXMLValue::Pointer_t getValue() const; -}; - -class OOXMLFastContextHandlerListValue : - public OOXMLFastContextHandler -{ -public: - OOXMLFastContextHandlerListValue - (OOXMLFastContextHandler * pContext); - virtual ~OOXMLFastContextHandlerListValue(); - -protected: - mutable OOXMLValue::Pointer_t mpValue; virtual void lcl_endFastElement(Token_t Element) - throw (uno::RuntimeException, xml::sax::SAXException); - virtual OOXMLValue::Pointer_t getValue() const; + throw (uno::RuntimeException, xml::sax::SAXException); + + virtual string getType() const { return "Value"; } + + virtual void setDefaultBooleanValue(); + virtual void setDefaultIntegerValue(); + virtual void setDefaultHexValue(); + virtual void setDefaultStringValue(); + +protected: + OOXMLValue::Pointer_t mpValue; }; class OOXMLFastContextHandlerTable : public OOXMLFastContextHandler @@ -488,6 +435,8 @@ protected: virtual ResourceEnum_t getResource() const { return TABLE; } + virtual string getType() const { return "Table"; } + void addCurrentChild(); }; @@ -497,7 +446,10 @@ public: OOXMLFastContextHandlerXNote(OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerXNote(); - void checkId(const rtl::OUString & rId); + void checkId(OOXMLValue::Pointer_t pValue); + + virtual string getType() const { return "XNote"; } + private: bool mbForwardEventsSaved; ::rtl::OUString msMyXNoteId; @@ -520,6 +472,8 @@ public: (OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerTextTableCell(); + virtual string getType() const { return "TextTableCell"; } + void startCell(); void endCell(); }; @@ -531,6 +485,8 @@ public: (OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerTextTableRow(); + virtual string getType() const { return "TextTableRow"; } + void startRow(); void endRow(); }; @@ -543,6 +499,8 @@ public: virtual ~OOXMLFastContextHandlerTextTable(); + virtual string getType() const { return "TextTable"; } + protected: virtual void lcl_startFastElement (Token_t Element, @@ -557,12 +515,15 @@ class OOXMLFastContextHandlerShape: public OOXMLFastContextHandlerProperties { private: bool m_bShapeSent; + bool m_bShapeStarted; public: explicit OOXMLFastContextHandlerShape (OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerShape(); + virtual string getType() const { return "Shape"; } + // ::com::sun::star::xml::sax::XFastContextHandler: virtual void SAL_CALL startUnknownElement (const ::rtl::OUString & Namespace, diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx index e9a7ece6a487..f4feddf341ac 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -27,9 +27,14 @@ #include #include +#ifdef DEBUG_ELEMENT +#include "ooxmlLoggers.hxx" +#include +#endif #include "OOXMLFastDocumentHandler.hxx" #include "OOXMLFastContextHandler.hxx" #include "OOXMLFastTokens.hxx" +#include "OOXMLFactory.hxx" namespace writerfilter { namespace ooxml @@ -135,7 +140,7 @@ OOXMLFastDocumentHandler::getContextHandler() const uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLFastDocumentHandler::createFastChildContext (::sal_Int32 Element, - const uno::Reference< xml::sax::XFastAttributeList > & Attribs) + const uno::Reference< xml::sax::XFastAttributeList > & /*Attribs*/) throw (uno::RuntimeException, xml::sax::SAXException) { #ifdef DEBUG_CONTEXT_STACK @@ -144,7 +149,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL << endl; #endif - return getContextHandler()->createFromStart(Element, Attribs); + return OOXMLFactory::getInstance()->createFastChildContextFromStart(getContextHandler().get(), Element); } OOXMLParserState::Pointer_t OOXMLFastDocumentHandler::getParserState() const @@ -209,7 +214,12 @@ void SAL_CALL OOXMLFastDocumentHandler::setDocumentLocator void OOXMLFastDocumentHandler::setStream(Stream * pStream) { +#ifdef DEBUG_PROTOCOL + mpTmpStream.reset(new StreamProtocol(pStream, debug_logger)); + mpStream = mpTmpStream.get(); +#else mpStream = pStream; +#endif } void OOXMLFastDocumentHandler::setDocument(OOXMLDocument * pDocument) diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx index a95fd3306d3a..86f835c5c0a4 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx @@ -104,6 +104,9 @@ private: uno::Reference< uno::XComponentContext > m_xContext; Stream * mpStream; +#ifdef DEBUG_ELEMENT + Stream::Pointer_t mpTmpStream; +#endif OOXMLDocument * mpDocument; ::rtl::OUString msXNoteId; mutable boost::shared_ptr mpContextHandler; diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx index ff0e30e4da0f..2d21083487ff 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -46,6 +46,9 @@ public: static uno::Reference createAndSetParent (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId); + static uno::Reference createAndSetParentAndDefine + (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine); + static uno::Reference createAndSetParentRef (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, const uno::Reference < xml::sax::XFastAttributeList > & Attribs); @@ -72,7 +75,6 @@ OOXMLFastHelper::createAndSetParent (OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId) { OOXMLFastContextHandler * pTmp = new T(pHandler); - OOXMLFastContextHandler::RefAndPointer_t aResult(pTmp); pTmp->setToken(nToken); pTmp->setId(nId); @@ -91,6 +93,43 @@ OOXMLFastHelper::createAndSetParent debug_logger->endElement("createAndSetParent"); #endif + uno::Reference aResult(pTmp); + + return aResult; +} + +template +uno::Reference +OOXMLFastHelper::createAndSetParentAndDefine +(OOXMLFastContextHandler * pHandler, sal_uInt32 nToken, Id nId, Id nDefine) +{ + OOXMLFastContextHandler * pTmp = new T(pHandler); + + pTmp->setToken(nToken); + pTmp->setId(nId); + pTmp->setDefine(nDefine); + +#ifdef DEBUG_CREATE + debug_logger->startElement("createAndSetParentAndDefine"); + debug_logger->attribute("context", pHandler->getType()); + debug_logger->attribute("token", fastTokenToId(pTmp->getToken())); + debug_logger->attribute("id", (*QNameToString::Instance())(nId)); + + static char buffer[16]; + snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIxUINT32, nId); + + debug_logger->attribute("idnum", buffer); + if (pTmp->isFallback()) + debug_logger->attribute("fallback", "yes"); + + debug_logger->startElement("created"); + debug_logger->addTag(pTmp->toTag()); + debug_logger->endElement("created"); + debug_logger->endElement("createAndSetParentAndDefine"); +#endif + + uno::Reference aResult(pTmp); + return aResult; } @@ -138,10 +177,10 @@ void OOXMLFastHelper::newProperty(OOXMLFastContextHandler * pHandler, { OOXMLValue::Pointer_t pVal(new T(rValue)); +#ifdef DEBUG_PROPERTIES string aStr = (*QNameToString::Instance())(nId); -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("newProperty"); + debug_logger->startElement("newProperty-from-string"); debug_logger->attribute("name", aStr); debug_logger->attribute ("value", @@ -151,7 +190,7 @@ void OOXMLFastHelper::newProperty(OOXMLFastContextHandler * pHandler, if (aStr.size() == 0) debug_logger->addTag(XMLTag::Pointer_t(new XMLTag("unknown-qname"))); - debug_logger->endElement("newProperty"); + debug_logger->endElement("newProperty-from-string"); #endif pHandler->newProperty(nId, pVal); @@ -164,17 +203,17 @@ void OOXMLFastHelper::newProperty(OOXMLFastContextHandler * pHandler, { OOXMLValue::Pointer_t pVal(new T(nVal)); +#ifdef DEBUG_PROPERTIES string aStr = (*QNameToString::Instance())(nId); -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("newProperty"); + debug_logger->startElement("newProperty-from-int"); debug_logger->attribute("name", aStr); debug_logger->attribute("value", pVal->toString()); if (aStr.size() == 0) debug_logger->addTag(XMLTag::Pointer_t(new XMLTag("unknown-qname"))); - debug_logger->endElement("newProperty"); + debug_logger->endElement("newProperty-from-int"); #endif pHandler->newProperty(nId, pVal); diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index 255f97558cb3..e38593777a55 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -191,11 +191,14 @@ void OOXMLParserState::resolveCharacterProperties(Stream & rStream) { #ifdef DEBUG_PROPERTIES debug_logger->startElement("resolveCharacterProperties"); - debug_logger->chars(mpCharacterProps->toString()); - debug_logger->endElement("resolveCharacterProperties"); #endif + rStream.props(mpCharacterProps); mpCharacterProps.reset(new OOXMLPropertySetImpl()); + +#ifdef DEBUG_PROPERTIES + debug_logger->endElement("resolveCharacterProperties"); +#endif } } @@ -213,22 +216,105 @@ void OOXMLParserState::setCharacterProperties mpCharacterProps->add(pProps); } +void OOXMLParserState::setCellProperties +(OOXMLPropertySet::Pointer_t pProps) +{ + if (mCellProps.size() > 0) + { + OOXMLPropertySet::Pointer_t & rCellProps = mCellProps.top(); + + if (rCellProps.get() == NULL) + rCellProps = pProps; + else + rCellProps->add(pProps); + } +} + +void OOXMLParserState::setRowProperties +(OOXMLPropertySet::Pointer_t pProps) +{ + if (mRowProps.size() > 0) + { + OOXMLPropertySet::Pointer_t & rRowProps = mRowProps.top(); + + if (rRowProps.get() == NULL) + rRowProps = pProps; + else + rRowProps->add(pProps); + } +} + +void OOXMLParserState::resolveCellProperties(Stream & rStream) +{ + if (mCellProps.size() > 0) + { + OOXMLPropertySet::Pointer_t & rCellProps = mCellProps.top(); + + if (rCellProps.get() != NULL) + { + rStream.props(rCellProps); + rCellProps.reset(new OOXMLPropertySetImpl()); + } + } +} + +void OOXMLParserState::resolveRowProperties(Stream & rStream) +{ + if (mRowProps.size() > 0) + { + OOXMLPropertySet::Pointer_t & rRowProps = mRowProps.top(); + + if (rRowProps.get() != NULL) + { + rStream.props(rRowProps); + rRowProps.reset(new OOXMLPropertySetImpl()); + } + } +} + void OOXMLParserState::resolveTableProperties(Stream & rStream) { - if (mpTableProps.get() != NULL) + if (mTableProps.size() > 0) { - rStream.props(mpTableProps); - mpTableProps.reset(new OOXMLPropertySetImpl()); + OOXMLPropertySet::Pointer_t & rTableProps = mTableProps.top(); + + if (rTableProps.get() != NULL) + { + rStream.props(rTableProps); + rTableProps.reset(new OOXMLPropertySetImpl()); + } } } void OOXMLParserState::setTableProperties (OOXMLPropertySet::Pointer_t pProps) { - if (mpTableProps.get() == NULL) - mpTableProps = pProps; - else - mpTableProps->add(pProps); + if (mTableProps.size() > 0) + { + OOXMLPropertySet::Pointer_t & rTableProps = mTableProps.top(); + if (rTableProps.get() == NULL) + rTableProps = pProps; + else + rTableProps->add(pProps); + } +} + +void OOXMLParserState::startTable() +{ + OOXMLPropertySet::Pointer_t pCellProps; + OOXMLPropertySet::Pointer_t pRowProps; + OOXMLPropertySet::Pointer_t pTableProps; + + mCellProps.push(pCellProps); + mRowProps.push(pRowProps); + mTableProps.push(pTableProps); +} + +void OOXMLParserState::endTable() +{ + mCellProps.pop(); + mRowProps.pop(); + mTableProps.pop(); } XMLTag::Pointer_t OOXMLParserState::toTag() const diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index 2953e00a499f..affdd7dbe61c 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -27,6 +27,7 @@ #ifndef INCLUDE_OOXML_PARSER_STATE_HXX #define INCLUDE_OOXML_PARSER_STATE_HXX +#include #include #include #include "OOXMLPropertySetImpl.hxx" @@ -35,6 +36,8 @@ namespace writerfilter { namespace ooxml { +using ::std::stack; + class OOXMLParserState { bool mbInSectionGroup; @@ -48,7 +51,9 @@ class OOXMLParserState rtl::OUString msXNoteId; rtl::OUString msTarget; OOXMLPropertySet::Pointer_t mpCharacterProps; - OOXMLPropertySet::Pointer_t mpTableProps; + stack mCellProps; + stack mRowProps; + stack mTableProps; public: typedef boost::shared_ptr Pointer_t; @@ -90,9 +95,16 @@ public: void resolveCharacterProperties(Stream & rStream); OOXMLPropertySet::Pointer_t getCharacterProperties() const; void setCharacterProperties(OOXMLPropertySet::Pointer_t pProps); + void resolveCellProperties(Stream & rStream); + void setCellProperties(OOXMLPropertySet::Pointer_t pProps); + void resolveRowProperties(Stream & rStream); + void setRowProperties(OOXMLPropertySet::Pointer_t pProps); void resolveTableProperties(Stream & rStream); void setTableProperties(OOXMLPropertySet::Pointer_t pProps); + void startTable(); + void endTable(); + string toString() const; XMLTag::Pointer_t toTag() const; }; diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index 6f9bf9a3480d..2f8844f1af01 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -29,7 +29,10 @@ #include #include #include +#include #include +#include +#include "ooxmlLoggers.hxx" //#define DEBUG_RESOLVE @@ -125,6 +128,17 @@ string OOXMLPropertyImpl::getName() const if (sResult.length() == 0) sResult = (*SprmIdToString::Instance())(mId); + if (sResult.length() == 0) + sResult = fastTokenToId(mId); + + if (sResult.length() == 0) + { + static char sBuffer[256]; + + snprintf(sBuffer, sizeof(sBuffer), "%" SAL_PRIxUINT32, mId); + sResult = sBuffer; + } + return sResult; } @@ -155,14 +169,23 @@ Sprm * OOXMLPropertyImpl::clone() void OOXMLPropertyImpl::resolve(writerfilter::Properties & rProperties) { + writerfilter::Properties * pProperties = NULL; +#ifdef DEBUG_PROTOCOL + writerfilter::PropertiesProtocol::Pointer_t pProtocol + (new writerfilter::PropertiesProtocol(&rProperties, debug_logger)); + pProperties = pProtocol.get(); +#else + pProperties = &rProperties; +#endif + switch (meType) { case SPRM: if (mId != 0x0) - rProperties.sprm(*this); + pProperties->sprm(*this); break; case ATTRIBUTE: - rProperties.attribute(mId, *getValue()); + pProperties->attribute(mId, *getValue()); break; } } @@ -456,7 +479,15 @@ string OOXMLPropertySetImpl::getType() const void OOXMLPropertySetImpl::add(OOXMLProperty::Pointer_t pProperty) { if (pProperty.get() != NULL && pProperty->getId() != 0x0) + { mProperties.push_back(pProperty); + } +#ifdef DEBUG_PROPERTIES + else + { + debug_logger->element("warning.property_not_added"); + } +#endif } void OOXMLPropertySetImpl::add(OOXMLPropertySet::Pointer_t pPropertySet) @@ -688,6 +719,12 @@ OOXMLTableImpl::~OOXMLTableImpl() void OOXMLTableImpl::resolve(Table & rTable) { +#ifdef DEBUG_PROTOCOL + Table::Pointer_t pTable(new TableProtocol(&rTable, debug_logger)); +#else + Table * pTable = &rTable; +#endif + int nPos = 0; PropertySets_t::iterator it = mPropertySets.begin(); @@ -699,7 +736,7 @@ void OOXMLTableImpl::resolve(Table & rTable) ((*it)->getProperties()); if (pProperties.get() != NULL) - rTable.entry(nPos, pProperties); + pTable->entry(nPos, pProperties); ++nPos; it++; diff --git a/writerfilter/source/ooxml/README.efforts b/writerfilter/source/ooxml/README.efforts new file mode 100644 index 000000000000..03570a80ec5a --- /dev/null +++ b/writerfilter/source/ooxml/README.efforts @@ -0,0 +1,131 @@ +This file describes how the remaining efforts for writerfilter can be +extracted from the source code. + +1. Marking up the efforts in the code. + +Efforts are marked up in the code with comments like this: + +/* WRITERFILTERSTATUS: done: , planned: , spent: */ + +The comments have to follow a case-label immediately. Consecutive +case-labels can be marked up, too. In the latter case the efforts are +counted for the preceeding case-labels as a whole. + +2. Extraction process + +2.1. Stage 1: + +This stage is handled in status.sh. An XML-file is generated that +contains a top level element . contains an element + and several and elements. + +2.1.1. Use analyzemodel.xsl to extract necessary data from model.xml. + +- Namespaces can be flagged with attribute @todo="ignore" to prevent + the namespace being considered. + +- For every / an entry in an according element in is genereated. These elements look like this: + + + +Important for the extraction of efforts: @qname is the identifier used +in case-labels in .cxx files and thus links the status mark up +comments with elements/attributes in the model.xml. + +2.1.2. Extract status information + +The variable SEARCHIN in status.sh determines in what directory the script will search for case labels and status comments. Only .cxx files are searched. Lines like this + +case NS_rtf::LN_UNUSED4: + +result in elements like this + +. + +Lines like this + +/* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + +result in elements like this + + + +The and elements are children of the +element. The are inserted in the same order as found in the +code. Therefore a element corresponds to the group of +consecutive preceding elements. + +2.2. Stage 2 + +In this stage analyzestage2.xsl is used on the result of stage 1 to +group the and elements from stage 1. For each + element a element is generated that contains the + elements that the element refers to, plus the + element. + +2.3. Stage 3 + +This stage associates the and elements in +model.xml with the extracted data. It uses analyzestage3.xsl on the +result of stage 2 to do this. + +E.g. for given elements from stage 2: + + + +and + + + + + + + + + +the result of stage 3 will be + + + + + + + + + +@qname-count is the number of case-labels that the according mark-up comment refers to. + +3. Collect efforts + +This is done by the script efforts.sh. It uses status.sh to extract the status and determines the efforts in two steps. + +3.1. Choose which / elements need effort + +This stage uses todo.xsl on the result of 2.3. + +There are two criteria that imply effort: + +- The / is not handled in any file. + +- The status for the / declares that work is + planned for it and less than 100 percent of this work is done. + +3.2. Generate table of efforts in CSV format + +This stage uses effort.xsl on the results of 3.1. and produces the +table of efforts. If there is no status defined for an +/ it is assumed that the planned effort is 0.5 +hours and no work has been done. diff --git a/writerfilter/source/ooxml/analyzemodel.xsl b/writerfilter/source/ooxml/analyzemodel.xsl new file mode 100644 index 000000000000..d887a9a178a6 --- /dev/null +++ b/writerfilter/source/ooxml/analyzemodel.xsl @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/analyzer.xsl b/writerfilter/source/ooxml/analyzer.xsl deleted file mode 100644 index 155de88d954a..000000000000 --- a/writerfilter/source/ooxml/analyzer.xsl +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/writerfilter/source/ooxml/analyzestage2.xsl b/writerfilter/source/ooxml/analyzestage2.xsl new file mode 100644 index 000000000000..9c7dc247b5ab --- /dev/null +++ b/writerfilter/source/ooxml/analyzestage2.xsl @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/analyzestage3.xsl b/writerfilter/source/ooxml/analyzestage3.xsl new file mode 100644 index 000000000000..103782c1a11a --- /dev/null +++ b/writerfilter/source/ooxml/analyzestage3.xsl @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/effort.xsl b/writerfilter/source/ooxml/effort.xsl new file mode 100644 index 000000000000..47f278a63f4f --- /dev/null +++ b/writerfilter/source/ooxml/effort.xsl @@ -0,0 +1,39 @@ + + + + + + + + Namespace,Define,Name,Done,Planned,qname-count + + + + + , + + , + + , + + + , + + , + + + + + + , + + , + + ,0,0.5,1 + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/efforts.sh b/writerfilter/source/ooxml/efforts.sh new file mode 100755 index 000000000000..f42a30d5b2fd --- /dev/null +++ b/writerfilter/source/ooxml/efforts.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +./status.sh | xmllint --format - | xsltproc todo.xsl - | xsltproc effort.xsl - diff --git a/writerfilter/source/ooxml/values.xsl b/writerfilter/source/ooxml/factory.xsl similarity index 85% rename from writerfilter/source/ooxml/values.xsl rename to writerfilter/source/ooxml/factory.xsl index cee50f39ff61..544c150021c8 100644 --- a/writerfilter/source/ooxml/values.xsl +++ b/writerfilter/source/ooxml/factory.xsl @@ -3,10 +3,14 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2000, 2010 Oracle and/or its affiliates. + Copyright 2008 by Sun Microsystems, Inc. OpenOffice.org - a multi-platform office productivity suite + $RCSfile: fastresources_wml.xsl,v $ + + $Revision: 1.3 $ + This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -23,7 +27,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -61,28 +65,25 @@ - + - - - -#ifndef INCLUDED_OOXML_VALUES_HXX -#define INCLUDED_OOXML_VALUES_HXX - -#include <rtl/ustring.hxx> -#include "OOXMLPropertySetImpl.hxx" - + +#include "OOXMLFactory.hxx" + + namespace writerfilter { namespace ooxml { +using namespace ::std; +using namespace ::com::sun::star; /// @cond GENERATED - - - + + + /// @endcond }} -#endif //INCLUDED_OOXML_VALUES_HXX + + - - + \ No newline at end of file diff --git a/writerfilter/source/ooxml/fastresources_dml-shape3DScene.xsl b/writerfilter/source/ooxml/factory_ns.xsl similarity index 52% rename from writerfilter/source/ooxml/fastresources_dml-shape3DScene.xsl rename to writerfilter/source/ooxml/factory_ns.xsl index aec93f875597..44b5c824859f 100644 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DScene.xsl +++ b/writerfilter/source/ooxml/factory_ns.xsl @@ -3,10 +3,14 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2000, 2010 Oracle and/or its affiliates. + Copyright 2008 by Sun Microsystems, Inc. OpenOffice.org - a multi-platform office productivity suite + $RCSfile: fastresources_wml.xsl,v $ + + $Revision: 1.3 $ + This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -23,7 +27,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -61,38 +65,97 @@ - + + + + + + + + + void + + Action(OOXMLFastContextHandler * pHandler + + , const ::rtl::OUString & sText + + ); + + + + + + + + + + +class + + : public OOXMLFactory_ns +{ +public: + typedef boost::shared_ptr < OOXMLFactory_ns > Pointer_t; + + static Pointer_t getInstance(); + + virtual AttributeToResourceMapPointer createAttributeToResourceMap(Id nId); + virtual ListValueMapPointer createListValueMap(Id nId); + virtual CreateElementMapPointer createCreateElementMap(Id nId); + virtual TokenToIdMapPointer createTokenToIdMap(Id nId); + virtual string getDefineName(Id nId) const; + + virtual void attributeAction(OOXMLFastContextHandler * pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue); + + + virtual ~ + + (); + +protected: + static Pointer_t m_pInstance; + + + + (); +}; + + + + + INCLUDED_OOXML_FACTORY_ + + _HXX + -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSCENE_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSCENE_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" +#ifndef + + +#define + + +#include "OOXMLFactory.hxx" +#include "OOXMLFactory_generated.hxx" +#include "OOXMLnamespaceids.hxx" +#include "resourceids.hxx" namespace writerfilter { namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; /// @cond GENERATED - - dml-shape3DScene - + + + /// @endcond }} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSCENE_HXX - +#endif // + + + - - + \ No newline at end of file diff --git a/writerfilter/source/ooxml/fastresources_dml-chartDrawing.xsl b/writerfilter/source/ooxml/factory_values.xsl similarity index 76% rename from writerfilter/source/ooxml/fastresources_dml-chartDrawing.xsl rename to writerfilter/source/ooxml/factory_values.xsl index 3a0869ebe826..4960f58e6b67 100644 --- a/writerfilter/source/ooxml/fastresources_dml-chartDrawing.xsl +++ b/writerfilter/source/ooxml/factory_values.xsl @@ -3,10 +3,14 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2000, 2010 Oracle and/or its affiliates. + Copyright 2008 by Sun Microsystems, Inc. OpenOffice.org - a multi-platform office productivity suite + $RCSfile: fastresources_wml.xsl,v $ + + $Revision: 1.3 $ + This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -23,7 +27,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -61,38 +65,36 @@ - + - - + + -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_CHARTDRAWING_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_CHARTDRAWING_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED +extern rtl::OUString - - dml-chartDrawing + + - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_CHARTDRAWING_HXX + ; + + +extern rtl::OUString + + + + ; + - + + +#ifndef INCLUDED_FACTORY_VALUES +#include <rtl/ustring.hxx> + + + +#endif // INCLUDED_FACTORY_VALUES + diff --git a/writerfilter/source/ooxml/factoryimpl.xsl b/writerfilter/source/ooxml/factoryimpl.xsl new file mode 100644 index 000000000000..8eecf4aba813 --- /dev/null +++ b/writerfilter/source/ooxml/factoryimpl.xsl @@ -0,0 +1,386 @@ + + + + + + + + + + + + +uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastChildContextFromFactory +(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element) +{ + uno::Reference < xml::sax::XFastContextHandler > aResult; + Id nDefine = pHandler->getDefine(); + + if (pFactory.get() != NULL) + { + CreateElementMapPointer pMap = pFactory->getCreateElementMap(nDefine); + TokenToIdMapPointer pTokenMap = pFactory->getTokenToIdMap(nDefine); + + if (pMap.get() != NULL) + { + Id nId = (*pTokenMap)[Element]; +#ifdef DEBUG_CREATE + string sDefine(pFactory->getDefineName(nDefine)); + string sElement(fastTokenToId(Element)); + string sQName((*QNameToString::Instance())(nId)); + + debug_logger->startElement("createFastChildContextFromFactory"); + debug_logger->attribute("define", sDefine); + debug_logger->attribute("element", sElement); + debug_logger->attribute("qname", sQName); + + static char buffer[16]; + snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIuUINT32, nId); + debug_logger->attribute("idnum", buffer); + + snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIuUINT32, nDefine); + debug_logger->attribute("definenum", buffer); +#endif + + CreateElement aCreateElement = (*pMap)[Element]; + + switch (aCreateElement.m_nResource) + { + + + + + case RT_ + + : + aResult.set(OOXMLFastHelper<OOXMLFastContextHandler + + >::createAndSetParentAndDefine(pHandler, Element, nId, aCreateElement.m_nId)); + break; + + + + + case RT_Any: + aResult.set(createFastChildContextFromStart(pHandler, Element)); + break; + default: + break; + } + +#ifdef DEBUG_CREATE + debug_logger->endElement("createFastChildContextFromFactory"); +#endif + } + } + + return aResult; +} + + + + + +OOXMLFactory_ns::Pointer_t OOXMLFactory::getFactoryForNamespace(Id nId) +{ + OOXMLFactory_ns::Pointer_t pResult; + + switch (nId & 0xffff0000) + { + + + case + + : + pResult = + + ::getInstance(); + break; + + + default: + break; + } + + return pResult; +} + + + + + +uno::Reference< xml::sax::XFastContextHandler > OOXMLFactory::createFastChildContextFromStart +(OOXMLFastContextHandler * pHandler, Token_t Element) +{ +#ifdef DEBUG_CREATE + debug_logger->startElement("createFastChildContextFromStart"); +#endif + + uno::Reference < xml::sax::XFastContextHandler > aResult; + OOXMLFactory_ns::Pointer_t pFactory; + + + + + if (! aResult.is()) + { + pFactory = getFactoryForNamespace( + + ); + aResult.set(createFastChildContextFromFactory(pHandler, pFactory, Element)); + } + + + +#ifdef DEBUG_CREATE + debug_logger->endElement("createFastChildContextFromStart"); +#endif + return aResult; +} + + + + + +namespace tokenmap { +struct token { const char * name; Token_t nToken; }; +class Perfect_Hash +{ +private: + static inline unsigned int hash (const char *str, unsigned int len); +public: + static struct token *in_word_set (const char *str, unsigned int len); +}; +} + +string fastTokenToId(sal_uInt32 nToken) +{ + + + string sResult; + + switch (nToken & 0xffff0000) + { + + + case NS_ + + : + sResult += " + + :"; + break; + + + } + + switch (nToken & 0xffff) + { + + + + + case + + : + sResult += " + + "; + break; + + + + } + + return sResult; +} + + + + + + + + + + + case + + + + : // + + , + + + + + + + + +Sprm::Kind SprmKind(sal_uInt32 nSprmCode) +{ + Sprm::Kind nResult = Sprm::UNKNOWN; + + switch (nSprmCode) + { + + paragraph + + + nResult = Sprm::PARAGRAPH; + break; + + character + + + nResult = Sprm::CHARACTER; + break; + + table + + + nResult = Sprm::TABLE; + break; + + default: + break; + } + + return nResult; +} + + + + +uno::Reference < xml::sax::XFastParser > OOXMLStreamImpl::getFastParser() +{ + if (! mxFastParser.is()) + { + uno::Reference < lang::XMultiComponentFactory > xFactory = + uno::Reference < lang::XMultiComponentFactory > + (mxContext->getServiceManager()); + + mxFastParser.set(xFactory->createInstanceWithContext + ( ::rtl::OUString::createFromAscii + ( "com.sun.star.xml.sax.FastParser" ), + mxContext ), uno::UNO_QUERY_THROW); + + + + mxFastParser->registerNamespace(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" + + ")), + + ); + + + } + + return mxFastParser; +} + + + + + +#include "OOXMLFactory.hxx" +#include "OOXMLFastHelper.hxx" +#include "OOXMLStreamImpl.hxx" +#include "doctok/sprmids.hxx" +#include "doctok/resourceids.hxx" + + + +namespace writerfilter { +namespace ooxml { + +/// @cond GENERATED + + + + + + + + +/// @endcond +}} + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl new file mode 100644 index 000000000000..55d986932aec --- /dev/null +++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl @@ -0,0 +1,824 @@ + + + + + + + + + + _Mutex + + + + + + + +typedef rtl::Static < osl::Mutex, + + > + + _Mutex; + + + + + + + + + + + :: + + () +{ + // multi-thread-safe mutex for all platforms + + osl::MutexGuard aGuard( + + ::get()); +} + + + + + + + + + + + ::~ + + () +{ +} + + + + + + + + +OOXMLFactory_ns::Pointer_t + + ::m_pInstance; + +OOXMLFactory_ns::Pointer_t + + ::getInstance() +{ + if (m_pInstance.get() == NULL) + m_pInstance.reset(new + + ()); + + return m_pInstance; +} + + + + + + + + + + + + + + + String + + + + + + + + + + + + + + + + + + 0 + + + + + + + + (*pMap)[ + + ] = AttributeInfo(RT_ + + , + + ); + + + + // empty resource: + + + + + + + + + + + + + + + + + +AttributeToResourceMapPointer + + ::createAttributeToResourceMap(Id nId) +{ + AttributeToResourceMapPointer pMap(new AttributeToResourceMap()); + + switch (nId) + { + + + + + + + + + + + break; + + + default: + break; + } + + return pMap; +} + + + + + +ListValueMapPointer + + ::createListValueMap(Id nId) +{ + ListValueMapPointer pMap(new ListValueMap()); + + switch (nId) + { + + + + + + + (*pMap)[ + + + + ] = + + + + ; + + + break; + + + default: + break; + } + + return pMap; +} + + + + + + + + + + + + + (*pMap)[ + + ] = CreateElement(RT_ + + , + + + + ); + + + + + + + + + + + + + + + + + + + + + + + + /* ref: + + */ + + + + + + + + + + + + + + + + /* start: + + */ + + + + + + + + + +CreateElementMapPointer + + ::createCreateElementMap(Id nId) +{ + CreateElementMapPointer pMap(new CreateElementMap()); + + switch (nId) + { + + + + + + + + + + + break; + + + + default: + + + break; + } + + return pMap; +} + + + + + + + if (sal::static_int_cast<Id>(pHandler->getId()) == + + + + ) + { + + + + { + OOXMLPropertySetEntryToInteger aHandler( + + + + ); + dynamic_cast<OOXMLFastContextHandlerStream*>(pHandler)->getPropertySetAttrs()->resolve(aHandler); + + if (sal::static_int_cast<Id>(aHandler.getValue()) == + + + + ) + { + + + + + dynamic_cast<OOXMLFastContextHandlerProperties*>(pHandler)-> + + (); + + + + pHandler->propagateCharacterPropertiesAsSet( + + + + ); + + + + dynamic_cast<OOXMLFastContextHandlerTextTableCell*>(pHandler)-> + + (); + + + + dynamic_cast<OOXMLFastContextHandlerTextTableRow*>(pHandler)-> + + (); + + + + dynamic_cast<OOXMLFastContextHandlerStream*>(pHandler)-> + + (); + + + + pHandler->startField(); + + + + pHandler->fieldSeparator(); + + + + pHandler->endField(); + + + + dynamic_cast<OOXMLFastContextHandlerStream*>(pHandler)->sendProperty( + + + + ); + + + + pHandler->sendPropertiesWithId( + + + + ); + + + pHandler->text(sText); + + + + OOXMLFastHelper<OOXMLIntegerValue>::newProperty(pHandler, + + + + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" + + "))); + + + + OOXMLFastHelper<OOXMLIntegerValue>::mark(pHandler, + + + + , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" + + "))); + + + + OOXMLFastHelper<OOXMLIntegerValue>::newProperty(pHandler, + + ooxml:token + + , pHandler->getToken()); + + + + pHandler-> + + (); + + + + + } + } + + + + } + + + + + + + +void + + :: + + Action(OOXMLFastContextHandler * pHandler + + , const ::rtl::OUString & sText + + ) +{ + switch (pHandler->getDefine()) + { + + + + + + + + + break; + + + default: + break; + } +} + + + + + + + + + + + + + + + + + + + + + +string + + ::getDefineName(Id nId) const +{ + static IdToStringMapPointer pMap; + + if (pMap.get() == NULL) + { + pMap = IdToStringMapPointer(new IdToStringMap()); + + + + + (*pMap)[ + + ] = " + + "; + + } + + return (*pMap)[nId]; +} + + + + + + + + + + (*pMap)[ + + ] = + + + + ; + + + + + + // + + + + + + + + + + + + + + + + + + + + + + + + + +TokenToIdMapPointer + + ::createTokenToIdMap(Id nId) +{ + TokenToIdMapPointer pMap(new TokenToIdMap()); + + switch (nId) + { + + + + + + + + + + + break; + + + + default: + + + + // + + + + + + + break; + } + + return pMap; +} + + + + + + + + + + case + + : + pHandler-> + + (pValue); + break; + + + + + + OOXMLFastContextHandler + + + + + + { + + + * pHandler = dynamic_cast< + + * >(_pHandler); + + switch(nToken) + { + + + default: + break; + } + } + + + + + + + + + + + + + + + break; + + + + + + + + + + + +void + +::attributeAction(OOXMLFastContextHandler * _pHandler, Token_t nToken, OOXMLValue::Pointer_t pValue) +{ + switch(_pHandler->getDefine()) + { + + + default: + break; + } +} + + + + +void + +::attributeAction(OOXMLFastContextHandler *, Token_t, OOXMLValue::Pointer_t) +{ +} + + + + + + + + +#include "doctok/sprmids.hxx" +#include "doctok/resourceids.hxx" +#include "ooxml/resourceids.hxx" +#include "OOXMLFactory_values.hxx" +#include "OOXMLFactory_ + + .hxx" +#include "OOXMLFastHelper.hxx" + +namespace writerfilter { +namespace ooxml { + +/// @cond GENERATED + + + + + + + + + + + + + + + +/// @endcond +}} + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/fastresources_.xsl b/writerfilter/source/ooxml/factoryimpl_values.xsl similarity index 75% rename from writerfilter/source/ooxml/fastresources_.xsl rename to writerfilter/source/ooxml/factoryimpl_values.xsl index 6141bb7f02bc..465923d41769 100644 --- a/writerfilter/source/ooxml/fastresources_.xsl +++ b/writerfilter/source/ooxml/factoryimpl_values.xsl @@ -3,10 +3,14 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2000, 2010 Oracle and/or its affiliates. + Copyright 2008 by Sun Microsystems, Inc. OpenOffice.org - a multi-platform office productivity suite + $RCSfile: fastresources_wml.xsl,v $ + + $Revision: 1.3 $ + This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -23,7 +27,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -61,39 +65,34 @@ - + - - + + -#ifndef INCLUDED_OOXML_FASTRESOURCES_WML_HXX -#define INCLUDED_OOXML_FASTRESOURCES_WML_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; -using namespace doctok; - -/// @cond GENERATED - - - wml - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_WML_HXX +rtl::OUString + + + +(RTL_CONSTASCII_USTRINGPARAM("")); + + +rtl::OUString + + + +(RTL_CONSTASCII_USTRINGPARAM(" + +")); + - + + +#include "OOXMLFactory_values.hxx" + + + diff --git a/writerfilter/source/ooxml/fastresources_dml-shape3DCamera.xsl b/writerfilter/source/ooxml/factoryinc.xsl similarity index 75% rename from writerfilter/source/ooxml/fastresources_dml-shape3DCamera.xsl rename to writerfilter/source/ooxml/factoryinc.xsl index 8ff2260a76c4..aa54a5c297ca 100644 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DCamera.xsl +++ b/writerfilter/source/ooxml/factoryinc.xsl @@ -3,10 +3,14 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2000, 2010 Oracle and/or its affiliates. + Copyright 2008 by Sun Microsystems, Inc. OpenOffice.org - a multi-platform office productivity suite + $RCSfile: fastresources_wml.xsl,v $ + + $Revision: 1.3 $ + This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -23,7 +27,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -61,38 +65,48 @@ - + + + + + + +extern const Id + +; + + + + + + + +const Id + + = + + << 16; + + - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DCAMERA_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DCAMERA_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" +#ifndef OOXML_FACTORY_GENERATED_HXX +#define OOXML_FACTORY_GENERATED_HXX namespace writerfilter { namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; /// @cond GENERATED - - dml-shape3DCamera - + + /// @endcond }} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DCAMERA_HXX - - - +#endif // OOXML_FACTORY_GENERATED_HXX + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/factorytools.xsl b/writerfilter/source/ooxml/factorytools.xsl new file mode 100644 index 000000000000..a7b0af5f9dea --- /dev/null +++ b/writerfilter/source/ooxml/factorytools.xsl @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + +/* + + THIS FILE IS GENERATED AUTOMATICALLY! DO NOT EDIT! + +*/ + + + + + + + + + NS_ + + + + + + + OOXML_ + + + + + + + + + + + | + + + + + + + NN_ + + + + + + DEFINE_ + + + + + + + + + | + + + + + + case + + : + + + + + + OOXMLValueString_ + + + + + + + + + NS_ + + ::LN_ + + + + + + + + + + + NS_ + + + + + + + + + + + + + + + + + Any + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + OOXMLFactory_ + + + + + + +#include "OOXMLFactory_ + + .hxx" + + + + + + + + +extern const Id + + ; + + + + + + + + + +const Id + + = + + ; + + + + + + + + RT_ + + , + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/fastresources.xsl b/writerfilter/source/ooxml/fastresources.xsl deleted file mode 100644 index bf68234a37bb..000000000000 --- a/writerfilter/source/ooxml/fastresources.xsl +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_RESOURCES_HXX -#define INCLUDED_OOXML_RESOURCES_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include <resourcemodel/TagLogger.hxx> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include <ooxml/OOXMLnamespaceids.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - - -#include "OOXMLfastresources_ - -.hxx" - - - -namespace writerfilter { -namespace ooxml { - -extern TagLogger::Pointer_t debug_logger; - -using namespace ::std; -using namespace ::com::sun::star; - -uno::Reference < xml::sax::XFastContextHandler > -createFromStart(::sal_Int32 Element); -void dumpAttribs -(const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException); - - -/// @cond GENERATED - - - -/// @endcond -}} -#endif //INCLUDED_OOXML_RESOURCES_HXX - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-baseStylesheet.xsl b/writerfilter/source/ooxml/fastresources_dml-baseStylesheet.xsl deleted file mode 100644 index b16443e1021a..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-baseStylesheet.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_BASESTYLESHEET_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_BASESTYLESHEET_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-baseStylesheet - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_BASESTYLESHEET_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-baseTypes.xsl b/writerfilter/source/ooxml/fastresources_dml-baseTypes.xsl deleted file mode 100644 index 1311c8593b8f..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-baseTypes.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_BASETYPES_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_BASETYPES_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-baseTypes - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_BASETYPES_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-documentProperties.xsl b/writerfilter/source/ooxml/fastresources_dml-documentProperties.xsl deleted file mode 100644 index 4a5aab2e3012..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-documentProperties.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_DOCUMENTPROPERTIES_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_DOCUMENTPROPERTIES_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-documentProperties - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_DOCUMENTPROPERTIES_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-graphicalObject.xsl b/writerfilter/source/ooxml/fastresources_dml-graphicalObject.xsl deleted file mode 100644 index 731fe6dd7712..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-graphicalObject.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_GRAPHICALOBJECT_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_GRAPHICALOBJECT_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-graphicalObject - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_GRAPHICALOBJECT_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shape3DLighting.xsl b/writerfilter/source/ooxml/fastresources_dml-shape3DLighting.xsl deleted file mode 100644 index 374668a8b7e3..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DLighting.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DLIGHTING_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DLIGHTING_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shape3DLighting - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DLIGHTING_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shape3DStyles.xsl b/writerfilter/source/ooxml/fastresources_dml-shape3DStyles.xsl deleted file mode 100644 index 8769fdc93f88..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DStyles.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSTYLES_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSTYLES_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shape3DStyles - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSTYLES_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shapeEffects.xsl b/writerfilter/source/ooxml/fastresources_dml-shapeEffects.xsl deleted file mode 100644 index 3925aa2c2f34..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeEffects.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEEFFECTS_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEEFFECTS_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shapeEffects - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEEFFECTS_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shapeGeometry.xsl b/writerfilter/source/ooxml/fastresources_dml-shapeGeometry.xsl deleted file mode 100644 index d500a94d7137..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeGeometry.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEGEOMETRY_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEGEOMETRY_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shapeGeometry - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEGEOMETRY_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shapeLineProperties.xsl b/writerfilter/source/ooxml/fastresources_dml-shapeLineProperties.xsl deleted file mode 100644 index cc7e47ba3e27..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeLineProperties.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPELINEPROPERTIES_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPELINEPROPERTIES_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shapeLineProperties - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPELINEPROPERTIES_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shapeProperties.xsl b/writerfilter/source/ooxml/fastresources_dml-shapeProperties.xsl deleted file mode 100644 index 7fbfef66b033..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeProperties.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEPROPERTIES_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEPROPERTIES_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shapeProperties - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPEPROPERTIES_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-styleDefaults.xsl b/writerfilter/source/ooxml/fastresources_dml-styleDefaults.xsl deleted file mode 100644 index 35d20409e2f0..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-styleDefaults.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_STYLEDEFAULTS_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_STYLEDEFAULTS_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-styleDefaults - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_STYLEDEFAULTS_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-stylesheet.xsl b/writerfilter/source/ooxml/fastresources_dml-stylesheet.xsl deleted file mode 100644 index 182052eb117b..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-stylesheet.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_STYLESHEET_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_STYLESHEET_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-stylesheet - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_STYLESHEET_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-textCharacter.xsl b/writerfilter/source/ooxml/fastresources_dml-textCharacter.xsl deleted file mode 100644 index 8b276f25d4ad..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-textCharacter.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_TEXTCHARACTER_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_TEXTCHARACTER_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-textCharacter - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_TEXTCHARACTER_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-wordprocessingDrawing.xsl b/writerfilter/source/ooxml/fastresources_dml-wordprocessingDrawing.xsl deleted file mode 100644 index d158513e3240..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_DML_WORDPROCESSINGDRAWING_HXX -#define INCLUDED_OOXML_FASTRESOURCES_DML_WORDPROCESSINGDRAWING_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-wordprocessingDrawing - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_WORDPROCESSINGDRAWING_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_shared-math.xsl b/writerfilter/source/ooxml/fastresources_shared-math.xsl deleted file mode 100644 index c80d616f8f50..000000000000 --- a/writerfilter/source/ooxml/fastresources_shared-math.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_SHARED_MATH_HXX -#define INCLUDED_OOXML_FASTRESOURCES_SHARED_MATH_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - shared-math - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_SHARED_MATH_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_shared-relationshipReference.xsl b/writerfilter/source/ooxml/fastresources_shared-relationshipReference.xsl deleted file mode 100644 index d4abaf92680c..000000000000 --- a/writerfilter/source/ooxml/fastresources_shared-relationshipReference.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_SHARED_RELATIONSHIPREFERENCE_HXX -#define INCLUDED_OOXML_FASTRESOURCES_SHARED_RELATIONSHIPREFERENCE_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - shared-relationshipReference - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_SHARED_RELATIONSHIPREFERENCE_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_sml-customXmlMappings.xsl b/writerfilter/source/ooxml/fastresources_sml-customXmlMappings.xsl deleted file mode 100644 index 33238578d449..000000000000 --- a/writerfilter/source/ooxml/fastresources_sml-customXmlMappings.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_SML_CUSTOMXMLMAPPINGS_HXX -#define INCLUDED_OOXML_FASTRESOURCES_SML_CUSTOMXMLMAPPINGS_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - sml-customXmlMappings - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_SML_CUSTOMXMLMAPPINGS_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_vml-main.xsl b/writerfilter/source/ooxml/fastresources_vml-main.xsl deleted file mode 100644 index cd9512ecd7d8..000000000000 --- a/writerfilter/source/ooxml/fastresources_vml-main.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_VML_MAIN_HXX -#define INCLUDED_OOXML_FASTRESOURCES_VML_MAIN_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - vml-main - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_VML_MAIN_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_vml-officeDrawing.xsl b/writerfilter/source/ooxml/fastresources_vml-officeDrawing.xsl deleted file mode 100644 index 039a2a2f608c..000000000000 --- a/writerfilter/source/ooxml/fastresources_vml-officeDrawing.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_VML_OFFICE_DRAWING_HXX -#define INCLUDED_OOXML_FASTRESOURCES_VML_OFFICE_DRAWING_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - vml-officeDrawing - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_VML_OFFICE_DRAWING_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_vml-wordprocessingDrawing.xsl b/writerfilter/source/ooxml/fastresources_vml-wordprocessingDrawing.xsl deleted file mode 100644 index fa5adb933284..000000000000 --- a/writerfilter/source/ooxml/fastresources_vml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_VML_WORDPROCESSION_DRAWING_HXX -#define INCLUDED_OOXML_FASTRESOURCES_VML_WORDPROCESSION_DRAWING_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - vml-wordprocessingDrawing - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_VML_WORDPROCESSION_DRAWING_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_wml.xsl b/writerfilter/source/ooxml/fastresources_wml.xsl deleted file mode 100644 index c21ab6ef2cdd..000000000000 --- a/writerfilter/source/ooxml/fastresources_wml.xsl +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - -#ifndef INCLUDED_OOXML_FASTRESOURCES_WML_HXX -#define INCLUDED_OOXML_FASTRESOURCES_WML_HXX - -#include <vector> -#include <boost/shared_ptr.hpp> -#include <string> - -#include <resourcemodel/WW8ResourceModel.hxx> -#include "OOXMLFastContextHandler.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLStreamImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - wml - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_WML_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl.xsl b/writerfilter/source/ooxml/fastresourcesimpl.xsl deleted file mode 100644 index ac0558236cd4..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl.xsl +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - - - -#include <string> -#include <doctok/sprmids.hxx> -#include "OOXMLFastHelper.hxx" -#include "OOXMLfastresources.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - - - - - - - - - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-baseStylesheet.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-baseStylesheet.xsl deleted file mode 100644 index 79c4f46a51ee..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-baseStylesheet.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-baseStylesheet - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-baseTypes.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-baseTypes.xsl deleted file mode 100644 index cf7de4f5427a..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-baseTypes.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-baseTypes - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-chartDrawing.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-chartDrawing.xsl deleted file mode 100644 index 6f14f1399d9c..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-chartDrawing.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-chartDrawing - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-documentProperties.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-documentProperties.xsl deleted file mode 100644 index 19c6cc30c9d8..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-documentProperties.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-documentProperties - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-graphicalObject.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-graphicalObject.xsl deleted file mode 100644 index c3854540c818..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-graphicalObject.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-graphicalObject - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DCamera.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DCamera.xsl deleted file mode 100644 index b0b3c5ed0c35..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DCamera.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shape3DCamera - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DLighting.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DLighting.xsl deleted file mode 100644 index 42c99380ea3b..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DLighting.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shape3DLighting - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DScene.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DScene.xsl deleted file mode 100644 index caa362a3e0a7..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DScene.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shape3DScene - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DStyles.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DStyles.xsl deleted file mode 100644 index 5c07fc034714..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DStyles.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shape3DStyles - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeEffects.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeEffects.xsl deleted file mode 100644 index 285518d3908d..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeEffects.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shapeEffects - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeGeometry.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeGeometry.xsl deleted file mode 100644 index 063ab2c4aae9..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeGeometry.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shapeGeometry - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeLineProperties.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeLineProperties.xsl deleted file mode 100644 index 41127751ff2d..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeLineProperties.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shapeLineProperties - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-styleDefaults.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-styleDefaults.xsl deleted file mode 100644 index 604652d664c2..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-styleDefaults.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-styleDefaults - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-stylesheet.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-stylesheet.xsl deleted file mode 100644 index 940363e355f2..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-stylesheet.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-stylesheet - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-textCharacter.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-textCharacter.xsl deleted file mode 100644 index d3d486196825..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-textCharacter.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-textCharacter - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-wordprocessingDrawing.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-wordprocessingDrawing.xsl deleted file mode 100644 index 6433812e6c2f..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-wordprocessingDrawing - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_shared-math.xsl b/writerfilter/source/ooxml/fastresourcesimpl_shared-math.xsl deleted file mode 100644 index 65af7e93fa0a..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_shared-math.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - shared-math - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_shared-relationshipReference.xsl b/writerfilter/source/ooxml/fastresourcesimpl_shared-relationshipReference.xsl deleted file mode 100644 index ff0e8416d23a..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_shared-relationshipReference.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - shared-relationshipReference - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_sml-customXmlMappings.xsl b/writerfilter/source/ooxml/fastresourcesimpl_sml-customXmlMappings.xsl deleted file mode 100644 index 21dc37d4dec4..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_sml-customXmlMappings.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - sml-customXmlMappings - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_vml-main.xsl b/writerfilter/source/ooxml/fastresourcesimpl_vml-main.xsl deleted file mode 100644 index 080e31ed69cd..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_vml-main.xsl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include <doctok/sprmids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - vml-main - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_vml-officeDrawing.xsl b/writerfilter/source/ooxml/fastresourcesimpl_vml-officeDrawing.xsl deleted file mode 100644 index d4716325726d..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_vml-officeDrawing.xsl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include <doctok/sprmids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - vml-officeDrawing - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_vml-wordprocessingDrawing.xsl b/writerfilter/source/ooxml/fastresourcesimpl_vml-wordprocessingDrawing.xsl deleted file mode 100644 index 09500c745444..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_vml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include <doctok/sprmids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - vml-wordprocessingDrawing - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_wml.xsl b/writerfilter/source/ooxml/fastresourcesimpl_wml.xsl deleted file mode 100644 index 1b0b41debcff..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_wml.xsl +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include <doctok/sprmids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - wml - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/fasttokens.xsl b/writerfilter/source/ooxml/fasttokens.xsl index 151e2f1cda0c..4014df0eec91 100644 --- a/writerfilter/source/ooxml/fasttokens.xsl +++ b/writerfilter/source/ooxml/fasttokens.xsl @@ -61,7 +61,25 @@ - + + + + +typedef sal_Int32 Token_t; + + + +const Token_t OOXML_ + + = + +; + + +const Token_t OOXML_FAST_TOKENS_END = + +; + diff --git a/writerfilter/source/ooxml/fasttokensimpl.xsl b/writerfilter/source/ooxml/fasttokensimpl.xsl deleted file mode 100644 index 1bafce1978e2..000000000000 --- a/writerfilter/source/ooxml/fasttokensimpl.xsl +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - - - -}} - - - diff --git a/writerfilter/source/ooxml/gperffasttokenhandler.xsl b/writerfilter/source/ooxml/gperffasttokenhandler.xsl index 9ecd15f8c744..d14db0486b5d 100644 --- a/writerfilter/source/ooxml/gperffasttokenhandler.xsl +++ b/writerfilter/source/ooxml/gperffasttokenhandler.xsl @@ -63,7 +63,31 @@ xml:space="default"> - + + + + + +%{ +#include "OOXMLFastTokens.hxx" + +namespace writerfilter { namespace ooxml { namespace tokenmap { +%} +struct token { const char * name; Token_t nToken; }; +%% + + + + + , + + + + +%% +}}} diff --git a/writerfilter/source/ooxml/makefile.mk b/writerfilter/source/ooxml/makefile.mk index ac8e7ea9b05c..c6a40b4cc5d1 100644 --- a/writerfilter/source/ooxml/makefile.mk +++ b/writerfilter/source/ooxml/makefile.mk @@ -68,14 +68,16 @@ NAMESPACES= \ # --- Files -------------------------------------------------------- -SLOFASTNAMESPACES= \ - $(SLO)$/OOXMLfastresources_{$(NAMESPACES)}.obj +SLOFACTORIESNAMESPACES= \ + $(SLO)$/OOXMLFactory_{$(NAMESPACES)}.obj SLOFILES= \ + $(SLOFACTORIESNAMESPACES) \ $(SLOFASTNAMESPACES) \ + $(SLO)$/OOXMLFactory_generated.obj \ + $(SLO)$/OOXMLFactory.obj \ $(SLO)$/OOXMLBinaryObjectReference.obj\ - $(SLO)$/OOXMLfastresources.obj \ - $(SLO)$/OOXMLvalues.obj \ + $(SLO)$/OOXMLFactory_values.obj \ $(SLO)$/OOXMLPropertySetImpl.obj \ $(SLO)$/OOXMLParserState.obj \ $(SLO)$/Handler.obj \ @@ -85,7 +87,6 @@ SLOFILES= \ $(SLO)$/OOXMLFastContextHandler.obj \ $(SLO)$/OOXMLFastTokenHandler.obj - SHL1TARGET=$(TARGET) .IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC" @@ -127,55 +128,49 @@ OOXMLCXXOUTDIR=$(MISC) OOXMLHXXOUTDIR=$(INCCOM)/ooxml OOXMLHXXOUTDIRCREATED=$(OOXMLHXXOUTDIR)/created -OOXMLFASTRESOURCECXXS=$(OOXMLCXXOUTDIR)$/OOXMLfastresources_{$(NAMESPACES)}.cxx -OOXMLFASTRESOURCEHXXS=$(OOXMLHXXOUTDIR)$/OOXMLfastresources_{$(NAMESPACES)}.hxx +OOXMLFACTORYCXXS=$(OOXMLCXXOUTDIR)$/OOXMLFactory_{$(NAMESPACES)}.cxx +OOXMLFACTORYHXXS=$(OOXMLHXXOUTDIR)$/OOXMLFactory_{$(NAMESPACES)}.hxx OOXMLMODEL=model.xml OOXMLPREPROCESSXSL=modelpreprocess.xsl -OOXMLRESOURCESTOOLSXSL=resourcestools.xsl +OOXMLFACTORYTOOLSXSL=factorytools.xsl OOXMLRESORUCETOKENSXSL=resourcestokens.xsl OOXMLFASTTOKENSXSL=fasttokens.xsl -OOXMLFASTTOKENSIMPLXSL=fasttokensimpl.xsl -OOXMLFASTRESOURCESXSL=fastresources.xsl OOXMLRESOURCESIMPLXSL=resourcesimpl.xsl -OOXMLFASTRESOURCESIMPLXSL=fastresourcesimpl.xsl OOXMLNAMESPACEIDSXSL=namespaceids.xsl -OOXMLVALUESXSL=values.xsl -OOXMLVALUESIMPLXSL=valuesimpl.xsl +OOXMLFACTORYVALUESXSL=factory_values.xsl +OOXMLFACTORYVALUESIMPLXSL=factoryimpl_values.xsl OOXMLRESOURCEIDSXSL=resourceids.xsl OOXMLGPERFFASTTOKENXSL=gperffasttokenhandler.xsl OOXMLRESOURCEIDSHXX=$(OOXMLHXXOUTDIR)$/resourceids.hxx -NSPROCESS=namespace_preprocess.pl - TOKENXML=$(OOXMLCXXOUTDIR)$/token.xml TOKENXMLTMP=$(OOXMLCXXOUTDIR)$/token.tmp +OOXMLFACTORYGENERATEDHXX=$(OOXMLHXXOUTDIR)$/OOXMLFactory_generated.hxx +OOXMLFACTORYGENERATEDCXX=$(OOXMLCXXOUTDIR)$/OOXMLFactory_generated.cxx OOXMLFASTTOKENSHXX=$(OOXMLHXXOUTDIR)$/OOXMLFastTokens.hxx -OOXMLFASTRESOURCESHXX=$(OOXMLHXXOUTDIR)$/OOXMLfastresources.hxx OOXMLNAMESPACEIDSHXX=$(OOXMLHXXOUTDIR)$/OOXMLnamespaceids.hxx -OOXMLFASTRESOURCESCXX=$(OOXMLCXXOUTDIR)$/OOXMLfastresources.cxx -OOXMLVALUESHXX=$(OOXMLCXXOUTDIR)$/OOXMLvalues.hxx -OOXMLVALUESCXX=$(OOXMLCXXOUTDIR)$/OOXMLvalues.cxx +OOXMLFACTORYVALUESHXX=$(OOXMLCXXOUTDIR)$/OOXMLFactory_values.hxx +OOXMLFACTORYVALUESCXX=$(OOXMLCXXOUTDIR)$/OOXMLFactory_values.cxx GPERFFASTTOKENHXX=$(OOXMLHXXOUTDIR)$/gperffasttoken.hxx MODELPROCESSED=$(MISC)$/model_preprocessed.xml -NSXSL=$(MISC)$/namespacesmap.xsl OOXMLGENHEADERS= \ - $(OOXMLFASTRESOURCESHXX) \ + $(OOXMLFACTORYGENERATEDHXX) \ + $(OOXMLFACTORYHXXS) \ $(OOXMLFASTTOKENSHXX) \ - $(OOXMLVALUESHXX) \ - $(OOXMLFASTRESOURCEHXXS) \ + $(OOXMLFACTORYVALUESHXX) \ $(GPERFFASTTOKENHXX) \ $(OOXMLRESOURCEIDSHXX) \ $(OOXMLNAMESPACEIDSHXX) GENERATEDFILES= \ $(OOXMLGENHEADERS) \ - $(MODELPROCESSED) \ - $(OOXMLFASTRESOURCECXXS) \ - $(OOXMLVALUESCXX) \ + $(OOXMLFACTORYGENERATEDCXX) \ + $(OOXMLFACTORYCXXS) \ + $(OOXMLFACTORYVALUESCXX) \ $(TOKENXMLTMP) \ $(TOKENXML) @@ -185,87 +180,77 @@ $(TOKENXMLTMP): $(SOLARVER)$/$(INPATH)$/inc$(UPDMINOREXT)$/oox$/token.txt $(TOKENXML): tokenxmlheader $(TOKENXMLTMP) tokenxmlfooter @$(TYPE) tokenxmlheader $(TOKENXMLTMP) tokenxmlfooter > $@ -$(MISC)$/$(OOXMLPREPROCESSXSL): $(OOXMLPREPROCESSXSL) - @$(COPY) $(PWD)$/$(OOXMLPREPROCESSXSL) $(MISC) - -$(NSXSL) : $(OOXMLMODEL) $(SOLARVER)$/$(INPATH)$/inc$(UPDMINOREXT)$/oox$/namespaces.txt $(NSPROCESS) - @$(PERL) $(NSPROCESS) $(SOLARVER)$/$(INPATH)$/inc$(UPDMINOREXT)$/oox$/namespaces.txt > $@ - -$(MODELPROCESSED): $(NSXSL) $(MISC)$/$(OOXMLPREPROCESSXSL) $(OOXMLMODEL) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(NSXSL) $(OOXMLMODEL) > $@ - $(OOXMLHXXOUTDIRCREATED): - @$(MKDIRHIER) $(OOXMLHXXOUTDIR) + $(MKDIRHIER) $(OOXMLHXXOUTDIR) @$(TOUCH) $@ $(OOXMLGENHEADERS): $(OOXMLHXXOUTDIRCREATED) $(OOXMLFASTTOKENSHXX): $(OOXMLFASTTOKENSXSL) $(TOKENXML) - @echo "Making: " $(@:f) + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLFASTTOKENSXSL) $(TOKENXML) > $@ -$(OOXMLFASTRESOURCESHXX): $(OOXMLFASTRESOURCESXSL) $(MODELPROCESSED) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLFASTRESOURCESXSL) $(MODELPROCESSED) > $@ - -$(OOXMLFASTRESOURCESCXX): $(OOXMLFASTRESOURCEHXXS) \ - $(OOXMLFASTRESOURCESIMPLXSL) $(MODELPROCESSED) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLFASTRESOURCESIMPLXSL) $(MODELPROCESSED) > $@ - -$(OOXMLFASTRESOURCECXXS): $(MODELPROCESSED) - -$(OOXMLFASTRESOURCEHXXS): $(MODELPROCESSED) - -$(OOXMLCXXOUTDIR)$/OOXMLfastresources%.cxx: fastresourcesimpl%.xsl - @echo "Making: " $(@:f) +$(OOXMLFACTORYGENERATEDHXX): factoryinc.xsl + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $< $(MODELPROCESSED) > $@ -$(OOXMLHXXOUTDIR)$/OOXMLfastresources%.hxx: fastresources%.xsl - @echo "Making: " $(@:f) +$(OOXMLFACTORYGENERATEDCXX): factoryimpl.xsl + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $< $(MODELPROCESSED) > $@ -$(OOXMLVALUESHXX): $(OOXMLVALUESXSL) $(MODELPROCESSED) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLVALUESXSL) $(MODELPROCESSED) > $@ +$(OOXMLFACTORYGENERATEDCXX): $(MODELPROCESSED) -$(OOXMLVALUESCXX): $(OOXMLVALUESIMPLXSL) $(MODELPROCESSED) \ - $(OOXMLFASTRESOURCESHXX) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLVALUESIMPLXSL) $(MODELPROCESSED) > $@ +$(OOXMLFACTORYGENERATEDHXX): $(MODELPROCESSED) + +$(OOXMLFACTORYCXXS): $(MODELPROCESSED) + +$(OOXMLFACTORYHXXS): $(MODELPROCESSED) + +$(OOXMLCXXOUTDIR)$/OOXMLFactory%.cxx: factoryimpl_ns.xsl + @echo "Making: " $(@:f) + $(COMMAND_ECHO)$(XSLTPROC) --stringparam file $@ $< $(MODELPROCESSED) > $@ + +$(OOXMLHXXOUTDIR)$/OOXMLFactory%.hxx: factory_ns.xsl + @echo "Making: " $(@:f) + $(COMMAND_ECHO)$(XSLTPROC) --stringparam file $@ $< $(MODELPROCESSED) > $@ + +$(OOXMLFACTORYVALUESHXX): $(OOXMLFACTORYVALUESXSL) $(MODELPROCESSED) + @echo "Making: " $(@:f) + $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLFACTORYVALUESXSL) $(MODELPROCESSED) > $@ + +$(OOXMLFACTORYVALUESCXX): $(OOXMLFACTORYVALUESIMPLXSL) $(MODELPROCESSED) + @echo "Making: " $(@:f) + $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLFACTORYVALUESIMPLXSL) $(MODELPROCESSED) > $@ $(OOXMLRESOURCEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLRESOURCEIDSXSL) \ $(MODELPROCESSED) - @echo "Making: " $(@:f) + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED) > $@ $(OOXMLNAMESPACEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLNAMESPACEIDSXSL) \ $(MODELPROCESSED) - @echo "Making: " $(@:f) + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLNAMESPACEIDSXSL) $(MODELPROCESSED) > $@ $(GPERFFASTTOKENHXX): $(OOXMLGPERFFASTTOKENXSL) $(MODELPROCESSED) - @echo "Making: " $(@:f) + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLGPERFFASTTOKENXSL) $(MODELPROCESSED) | tr -d '\r' | gperf -I -t -E -S1 -c -G -LC++ > $@ -$(SLOFASTNAMESPACES): $(OOXMLFASTRESOURCESCXX) $(OOXMLGENHEADERS) +$(SLOFACTORIESNAMESPACES): $(OOXMLFACTORYSCXXS) $(OOXMLGENHEADERS) -$(GENERATEDFILES): $(OOXMLRESOURCESTOOLSXSL) +$(GENERATEDFILES): $(OOXMLFACTORYTOOLSXSL) $(SLOFILES): $(OOXMLGENHEADERS) -$(SLO)/OOXMLfastresources.obj: $(OOXMLFASTRESOURCESCXX) $(OOXMLGENHEADERS) +$(SLO)/OOXMLFactory_values.obj: $(OOXMLFACTORYVALUESCXX) $(OOXMLFACTORYVALUESHXX) -$(SLO)/OOXMLvalues.obj: $(OOXMLVALUESCXX) $(OOXMLVALUESHXX) - -$(SLOFASTNAMESPACES): OOXMLFastHelper.hxx +$(SLO)$/OOXMLFactory_generated.obj: $(OOXMLFACTORYGENERATEDCXX) $(OOXMLGENHEADERS) .PHONY: genclean genmake genheaders genclean: - @rm -f $(GENERATEDFILES) + rm -f $(GENERATEDFILES) genmake: $(GENERATEDFILES) -genheaders: $(OOXMLFASTRESOURCEHXXS) +genheaders: $(GENHEADERS) diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index add4a80b551e..f571a50a9407 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -1,4 +1,4 @@ - + @@ -24,10 +24,10 @@ - + - + @@ -190,12 +190,15 @@ + + + - + @@ -246,27 +249,27 @@ - + Light Rig Direction - + tl - + t - + tr - + l - + r - + bl - + b - + br @@ -275,59 +278,59 @@ Light Rig Type - + legacyFlat1 - + legacyFlat2 - + legacyFlat3 - + legacyFlat4 - + legacyNormal1 - + legacyNormal2 - + legacyNormal3 - + legacyNormal4 - + legacyHarsh1 - + legacyHarsh2 - + legacyHarsh3 - + legacyHarsh4 - + threePt - + balanced - + soft - + harsh - + flood - + contrasting - + morning - + sunrise - + sunset - + chilly - + freezing - + flat - + twoPt - + glow - + brightRoom @@ -390,7 +393,7 @@ - + @@ -416,35 +419,35 @@ - + Bevel Presets - + relaxedInset - + circle - + slope - + cross - + angle - + softRound - + convex - + coolSlant - + divot - + riblet - + hardEdge - + artDeco @@ -473,35 +476,35 @@ Preset Material Type - + legacyMatte - + legacyPlastic - + legacyMetal - + legacyWireframe - + matte - + plastic - + metal - + warmMatte - + translucentPowder - + powder - + dkEdge - + softEdge - + clear - + flat - + softmetal @@ -612,135 +615,135 @@ - + Preset Camera Type - + legacyObliqueTopLeft - + legacyObliqueTop - + legacyObliqueTopRight - + legacyObliqueLeft - + legacyObliqueFront - + legacyObliqueRight - + legacyObliqueBottomLeft - + legacyObliqueBottom - + legacyObliqueBottomRight - + legacyPerspectiveTopLeft - + legacyPerspectiveTop - + legacyPerspectiveTopRight - + legacyPerspectiveLeft - + legacyPerspectiveFront - + legacyPerspectiveRight - + legacyPerspectiveBottomLeft - + legacyPerspectiveBottom - + legacyPerspectiveBottomRight - + orthographicFront - + isometricTopUp - + isometricTopDown - + isometricBottomUp - + isometricBottomDown - + isometricLeftUp - + isometricLeftDown - + isometricRightUp - + isometricRightDown - + isometricOffAxis1Left - + isometricOffAxis1Right - + isometricOffAxis1Top - + isometricOffAxis2Left - + isometricOffAxis2Right - + isometricOffAxis2Top - + isometricOffAxis3Left - + isometricOffAxis3Right - + isometricOffAxis3Bottom - + isometricOffAxis4Left - + isometricOffAxis4Right - + isometricOffAxis4Bottom - + obliqueTopLeft - + obliqueTop - + obliqueTopRight - + obliqueLeft - + obliqueRight - + obliqueBottomLeft - + obliqueBottom - + obliqueBottomRight - + perspectiveFront - + perspectiveLeft - + perspectiveRight - + perspectiveAbove - + perspectiveBelow - + perspectiveAboveLeftFacing - + perspectiveAboveRightFacing - + perspectiveContrastingLeftFacing - + perspectiveContrastingRightFacing - + perspectiveHeroicLeftFacing - + perspectiveHeroicRightFacing - + perspectiveHeroicExtremeLeftFacing - + perspectiveHeroicExtremeRightFacing - + perspectiveRelaxed - + perspectiveRelaxedModerately @@ -837,9 +840,9 @@ perspectiveRelaxedModerately - + - + Style Matrix Column Index @@ -849,11 +852,11 @@ Font Collection Index - + major - + minor - + none @@ -862,29 +865,29 @@ Theme Color Reference - + dk1 - + lt1 - + dk2 - + lt2 - + accent1 - + accent2 - + accent3 - + accent4 - + accent5 - + accent6 - + hlink - + folHlink @@ -1165,9 +1168,9 @@ - + - + @@ -1240,41 +1243,41 @@ Text Underline Types - + none - + words - + sng - + dbl - + heavy - + dotted - + dottedHeavy - + dash - + dashHeavy - + dashLong - + dashLongHeavy - + dotDash - + dotDashHeavy - + dotDotDash - + dotDotDashHeavy - + wavy - + wavyHeavy - + wavyDbl @@ -1314,11 +1317,11 @@ Text Strike Type - + noStrike - + sngStrike - + dblStrike @@ -1327,11 +1330,11 @@ Text Cap Types - + none - + small - + all @@ -1575,11 +1578,11 @@ all - + - + - + @@ -1797,45 +1800,45 @@ Preset Shadow Type - + shdw1 - + shdw2 - + shdw3 - + shdw4 - + shdw5 - + shdw6 - + shdw7 - + shdw8 - + shdw9 - + shdw10 - + shdw11 - + shdw12 - + shdw13 - + shdw14 - + shdw15 - + shdw16 - + shdw17 - + shdw18 - + shdw19 - + shdw20 @@ -2047,11 +2050,11 @@ Path Shade Type - + shape - + circle - + rect @@ -2083,13 +2086,13 @@ Tile Flip Mode - + none - + x - + y - + xy @@ -2198,15 +2201,15 @@ Blip Compression Type - + email - + screen - + print - + hqprint - + none @@ -2319,113 +2322,113 @@ Preset Pattern Value - + pct5 - + pct10 - + pct20 - + pct25 - + pct30 - + pct40 - + pct50 - + pct60 - + pct70 - + pct75 - + pct80 - + pct90 - + horz - + vert - + ltHorz - + ltVert - + dkHorz - + dkVert - + narHorz - + narVert - + dashHorz - + dashVert - + cross - + dnDiag - + upDiag - + ltDnDiag - + ltUpDiag - + dkDnDiag - + dkUpDiag - + wdDnDiag - + wdUpDiag - + dashDnDiag - + dashUpDiag - + diagCross - + smCheck - + lgCheck - + smGrid - + lgGrid - + dotGrid - + smConfetti - + lgConfetti - + horzBrick - + diagBrick - + solidDmnd - + openDmnd - + dotDmnd - + plaid - + sphere - + weave - + divot - + shingle - + wave - + trellis - + zigZag @@ -2485,15 +2488,15 @@ Blend Mode - + over - + mult - + screen - + darken - + lighten @@ -2611,9 +2614,9 @@ Effect Container Type - + sib - + tree @@ -2902,25 +2905,25 @@ - + - + Line End Type - + none - + triangle - + stealth - + diamond - + oval - + arrow @@ -2929,11 +2932,11 @@ Line End Width - + sm - + med - + lg @@ -2942,11 +2945,11 @@ Line End Length - + sm - + med - + lg @@ -3018,27 +3021,27 @@ Preset Line Dash Value - + solid - + dot - + dash - + lgDash - + dashDot - + lgDashDot - + lgDashDotDot - + sysDash - + sysDot - + sysDashDot - + sysDashDotDot @@ -3082,11 +3085,11 @@ End Line Cap - + rnd - + sq - + flat @@ -3098,9 +3101,9 @@ Alignment Type - + ctr - + in @@ -3109,15 +3112,15 @@ Compound Line Type - + sng - + dbl - + thickThin - + thinThick - + tri @@ -3243,9 +3246,9 @@ - + - + @@ -3338,7 +3341,7 @@ - + @@ -3625,65 +3628,65 @@ System Color Value - + scrollBar - + background - + activeCaption - + inactiveCaption - + menu - + window - + windowFrame - + menuText - + windowText - + captionText - + activeBorder - + inactiveBorder - + appWorkspace - + highlight - + highlightText - + btnFace - + btnShadow - + grayText - + btnText - + inactiveCaptionText - + btnHighlight - + 3dDkShadow - + 3dLight - + infoText - + infoBk - + hotLight - + gradientActiveCaption - + gradientInactiveCaption - + menuHighlight - + menuBar @@ -3707,39 +3710,39 @@ Scheme Color - + bg1 - + tx1 - + bg2 - + tx2 - + accent1 - + accent2 - + accent3 - + accent4 - + accent5 - + accent6 - + hlink - + folHlink - + phClr - + dk1 - + lt1 - + dk2 - + lt2 @@ -3757,285 +3760,285 @@ Preset Color Value - + aliceBlue - + antiqueWhite - + aqua - + aquamarine - + azure - + beige - + bisque - + black - + blanchedAlmond - + blue - + blueViolet - + brown - + burlyWood - + cadetBlue - + chartreuse - + chocolate - + coral - + cornflowerBlue - + cornsilk - + crimson - + cyan - + dkBlue - + dkCyan - + dkGoldenrod - + dkGray - + dkGreen - + dkKhaki - + dkMagenta - + dkOliveGreen - + dkOrange - + dkOrchid - + dkRed - + dkSalmon - + dkSeaGreen - + dkSlateBlue - + dkSlateGray - + dkTurquoise - + dkViolet - + deepPink - + deepSkyBlue - + dimGray - + dodgerBlue - + firebrick - + floralWhite - + forestGreen - + fuchsia - + gainsboro - + ghostWhite - + gold - + goldenrod - + gray - + green - + greenYellow - + honeydew - + hotPink - + indianRed - + indigo - + ivory - + khaki - + lavender - + lavenderBlush - + lawnGreen - + lemonChiffon - + ltBlue - + ltCoral - + ltCyan - + ltGoldenrodYellow - + ltGray - + ltGreen - + ltPink - + ltSalmon - + ltSeaGreen - + ltSkyBlue - + ltSlateGray - + ltSteelBlue - + ltYellow - + lime - + limeGreen - + linen - + magenta - + maroon - + medAquamarine - + medBlue - + medOrchid - + medPurple - + medSeaGreen - + medSlateBlue - + medSpringGreen - + medTurquoise - + medVioletRed - + midnightBlue - + mintCream - + mistyRose - + moccasin - + navajoWhite - + navy - + oldLace - + olive - + oliveDrab - + orange - + orangeRed - + orchid - + paleGoldenrod - + paleGreen - + paleTurquoise - + paleVioletRed - + papayaWhip - + peachPuff - + peru - + pink - + plum - + powderBlue - + purple - + red - + rosyBrown - + royalBlue - + saddleBrown - + salmon - + sandyBrown - + seaGreen - + seaShell - + sienna - + silver - + skyBlue - + slateBlue - + slateGray - + snow - + springGreen - + steelBlue - + tan - + teal - + thistle - + tomato - + turquoise - + violet - + wheat - + white - + whiteSmoke - + yellow - + yellowGreen @@ -4221,23 +4224,23 @@ Rectangle Alignments - + tl - + t - + tr - + l - + ctr - + r - + bl - + b - + br @@ -4282,27 +4285,27 @@ Black and White Mode - + clr - + auto - + gray - + ltGray - + invGray - + grayWhite - + blackGray - + blackWhite - + black - + white - + hidden @@ -4421,7 +4424,27 @@ + + + + + + + + + + + + + + + + + + + + @@ -4695,9 +4718,9 @@ - + - + @@ -5107,8 +5130,8 @@ - - + + @@ -5146,387 +5169,387 @@ - + - + Preset Shape Types - + line - + lineInv - + triangle - + rtTriangle - + rect - + diamond - + parallelogram - + trapezoid - + nonIsoscelesTrapezoid - + pentagon - + hexagon - + heptagon - + octagon - + decagon - + dodecagon - + star4 - + star5 - + star6 - + star7 - + star8 - + star10 - + star12 - + star16 - + star24 - + star32 - + roundRect - + round1Rect - + round2SameRect - + round2DiagRect - + snipRoundRect - + snip1Rect - + snip2SameRect - + snip2DiagRect - + plaque - + ellipse - + teardrop - + homePlate - + chevron - + pieWedge - + pie - + blockArc - + donut - + noSmoking - + rightArrow - + leftArrow - + upArrow - + downArrow - + stripedRightArrow - + notchedRightArrow - + bentUpArrow - + leftRightArrow - + upDownArrow - + leftUpArrow - + leftRightUpArrow - + quadArrow - + leftArrowCallout - + rightArrowCallout - + upArrowCallout - + downArrowCallout - + leftRightArrowCallout - + upDownArrowCallout - + quadArrowCallout - + bentArrow - + uturnArrow - + circularArrow - + leftCircularArrow - + leftRightCircularArrow - + curvedRightArrow - + curvedLeftArrow - + curvedUpArrow - + curvedDownArrow - + swooshArrow - + cube - + can - + lightningBolt - + heart - + sun - + moon - + smileyFace - + irregularSeal1 - + irregularSeal2 - + foldedCorner - + bevel - + frame - + halfFrame - + corner - + diagStripe - + chord - + arc - + leftBracket - + rightBracket - + leftBrace - + rightBrace - + bracketPair - + bracePair - + straightConnector1 - + bentConnector2 - + bentConnector3 - + bentConnector4 - + bentConnector5 - + curvedConnector2 - + curvedConnector3 - + curvedConnector4 - + curvedConnector5 - + callout1 - + callout2 - + callout3 - + accentCallout1 - + accentCallout2 - + accentCallout3 - + borderCallout1 - + borderCallout2 - + borderCallout3 - + accentBorderCallout1 - + accentBorderCallout2 - + accentBorderCallout3 - + wedgeRectCallout - + wedgeRoundRectCallout - + wedgeEllipseCallout - + cloudCallout - + cloud - + ribbon - + ribbon2 - + ellipseRibbon - + ellipseRibbon2 - + leftRightRibbon - + verticalScroll - + horizontalScroll - + wave - + doubleWave - + plus - + flowChartProcess - + flowChartDecision - + flowChartInputOutput - + flowChartPredefinedProcess - + flowChartInternalStorage - + flowChartDocument - + flowChartMultidocument - + flowChartTerminator - + flowChartPreparation - + flowChartManualInput - + flowChartManualOperation - + flowChartConnector - + flowChartPunchedCard - + flowChartPunchedTape - + flowChartSummingJunction - + flowChartOr - + flowChartCollate - + flowChartSort - + flowChartExtract - + flowChartMerge - + flowChartOfflineStorage - + flowChartOnlineStorage - + flowChartMagneticTape - + flowChartMagneticDisk - + flowChartMagneticDrum - + flowChartDisplay - + flowChartDelay - + flowChartAlternateProcess - + flowChartOffpageConnector - + actionButtonBlank - + actionButtonHome - + actionButtonHelp - + actionButtonInformation - + actionButtonForwardNext - + actionButtonBackPrevious - + actionButtonEnd - + actionButtonBeginning - + actionButtonReturn - + actionButtonDocument - + actionButtonSound - + actionButtonMovie - + gear6 - + gear9 - + funnel - + mathPlus - + mathMinus - + mathMultiply - + mathDivide - + mathEqual - + mathNotEqual - + cornerTabs - + squareTabs - + plaqueTabs - + chartX - + chartStar - + chartPlus @@ -5535,87 +5558,87 @@ Preset Text Shape Types - + textNoShape - + textPlain - + textStop - + textTriangle - + textTriangleInverted - + textChevron - + textChevronInverted - + textRingInside - + textRingOutside - + textArchUp - + textArchDown - + textCircle - + textButton - + textArchUpPour - + textArchDownPour - + textCirclePour - + textButtonPour - + textCurveUp - + textCurveDown - + textCanUp - + textCanDown - + textWave1 - + textWave2 - + textDoubleWave1 - + textWave4 - + textInflate - + textDeflate - + textInflateBottom - + textDeflateBottom - + textInflateTop - + textDeflateTop - + textDeflateInflate - + textDeflateInflateDeflate - + textFadeRight - + textFadeLeft - + textFadeUp - + textFadeDown - + textSlantUp - + textSlantDown - + textCascadeUp - + textCascadeDown @@ -5653,14 +5676,14 @@ - + - + @@ -5860,17 +5883,17 @@ Path Fill Mode - + none - + norm - + lighten - + lightenLess - + darken - + darkenLess @@ -6279,10 +6302,10 @@ - + - + @@ -6357,13 +6380,13 @@ Text Wrapping Location - + bothSides - + left - + right - + largest @@ -6521,15 +6544,15 @@ Relative Horizontal Alignment Positions - + left - + right - + center - + inside - + outside @@ -6538,21 +6561,21 @@ Horizontal Relative Positioning - + margin - + page - + column - + character - + leftMargin - + rightMargin - + insideMargin - + outsideMargin @@ -6578,15 +6601,15 @@ Vertical Alignment Definition - + top - + bottom - + center - + inside - + outside @@ -6595,21 +6618,21 @@ Vertical Relative Positioning - + margin - + page - + paragraph - + line - + topMargin - + bottomMargin - + insideMargin - + outsideMargin @@ -6802,8 +6825,9 @@ + - + left right @@ -6811,7 +6835,6 @@ inside outside - margin page @@ -6827,7 +6850,7 @@ - + top bottom @@ -6881,8 +6904,8 @@ - - + + @@ -6922,9 +6945,9 @@ - + - + Integer value (1 to 255) @@ -6991,9 +7014,9 @@ On Off - + on - + off @@ -7019,11 +7042,11 @@ Horizontal Alignment - + left - + center - + right @@ -7038,11 +7061,11 @@ Vertical Alignment - + top - + center - + bot @@ -7057,9 +7080,9 @@ Shape (Delimiters) - + centered - + match @@ -7074,13 +7097,13 @@ Fraction Type - + bar - + skw - + lin - + noBar @@ -7095,9 +7118,9 @@ Limit Location - + undOvr - + subSup @@ -7112,9 +7135,9 @@ Top-Bottom - + top - + bot @@ -7129,17 +7152,17 @@ Script - + roman - + script - + fraktur - + double-struck - + sans-serif - + monospace @@ -7154,13 +7177,13 @@ Style - + p - + b - + i - + bi @@ -7989,13 +8012,13 @@ Justification - + left - + right - + center - + centerGroup @@ -8028,11 +8051,11 @@ Break Binary Operators - + before - + after - + repeat @@ -8047,11 +8070,11 @@ Break on Binary Subtraction - + -- - + -+ - + +- @@ -8178,44 +8201,89 @@ + + + + + + + + + + + + + + + + + + + + on off - + + + + + + + + left center right + + + top center bot + + + centered match + + + bar skw lin noBar + + + undOvr subSup + + + top bot + + + roman script @@ -8224,34 +8292,52 @@ sans-serif monospace + + + b bi i p - + + + left right center centerGroup + + + + + + + before after repeat + + + -- -+ +- + + + - + Explicit Relationship ID @@ -8302,10 +8388,10 @@ - + - + @@ -8344,7 +8430,7 @@ - + @@ -8366,15 +8452,15 @@ - - + + - + - + - + @@ -9739,11 +9825,11 @@ VML Extension Handling Behaviors - + view - + edit - + backwardCompatible @@ -9752,13 +9838,13 @@ Boolean Value - + t - + f - + true - + false @@ -9772,17 +9858,17 @@ Shape Fill Type - + solid - + gradient - + gradientRadial - + tile - + pattern - + frame @@ -9791,15 +9877,15 @@ Gradient Fill Computation Type - + none - + linear - + sigma - + any - + linear sigma @@ -9808,13 +9894,13 @@ Shadow Type - + single - + double - + emboss - + perspective @@ -9823,15 +9909,15 @@ Stroke Line Style - + single - + thinThin - + thinThick - + thickThin - + thickBetweenThin @@ -9840,11 +9926,11 @@ Line Join Type - + round - + bevel - + miter @@ -9853,11 +9939,11 @@ Stroke End Cap Type - + flat - + square - + round @@ -9866,11 +9952,11 @@ Stroke Arrowhead Length - + short - + medium - + long @@ -9879,11 +9965,11 @@ Stroke Arrowhead Width - + narrow - + medium - + wide @@ -9892,17 +9978,17 @@ Stroke Arrowhead Type - + none - + block - + classic - + oval - + diamond - + open @@ -9911,11 +9997,11 @@ Image Scaling Behavior - + ignore - + atMost - + atLeast @@ -9924,15 +10010,15 @@ Boolean Value with Blank [False] State - + t - + f - + true - + false - + @@ -9941,19 +10027,19 @@ Shape Grouping Types - + canvas - + orgchart - + radial - + cycle - + stacked - + venn - + bullseye @@ -10082,11 +10168,11 @@ - - + + - - + + @@ -11497,13 +11583,13 @@ Rule Type - + arc - + callout - + connector - + align @@ -11512,17 +11598,17 @@ Alignment Type - + top - + middle - + bottom - + left - + center - + right @@ -11531,29 +11617,29 @@ Black And White Modes - + color - + auto - + grayScale - + lightGrayscale - + inverseGray - + grayOutline - + highContrast - + black - + white - + hide - + undrawn - + blackTextAndLines @@ -11562,17 +11648,17 @@ Screen Sizes Type - + 544,376 - + 640,480 - + 720,512 - + 800,600 - + 1024,768 - + 1152,862 @@ -11581,9 +11667,9 @@ Inset Margin Type - + auto - + custom @@ -11592,9 +11678,9 @@ Extrusion Color Types - + auto - + custom @@ -11608,9 +11694,9 @@ Extrusion Type - + perspective - + parallel @@ -11619,11 +11705,11 @@ Extrusion Rendering Types - + solid - + wireFrame - + boundingCube @@ -11632,11 +11718,11 @@ Extrusion Planes - + XY - + ZX - + YZ @@ -11645,17 +11731,17 @@ Callout Angles - + any - + 30 - + 45 - + 60 - + 90 - + auto @@ -11669,13 +11755,13 @@ Callout Placement - + top - + center - + bottom - + user @@ -11684,13 +11770,13 @@ Connector Type - + none - + straight - + elbow - + curved @@ -11699,11 +11785,11 @@ Alignment Type - + left - + right - + center @@ -11712,13 +11798,13 @@ Connection Locations Type - + none - + rect - + segments - + custom @@ -11727,11 +11813,11 @@ Embedded Object Alternate Image Request Types - + Picture - + Bitmap - + EnhancedMetaFile @@ -11740,9 +11826,9 @@ OLE Connection Type - + Embed - + Link @@ -11751,9 +11837,9 @@ OLE Object Representations - + Content - + Icon @@ -11762,9 +11848,9 @@ OLE Update Method Type - + Always - + OnCall @@ -11784,13 +11870,13 @@ Boolean Value - + t - + f - + true - + false @@ -11799,15 +11885,15 @@ Boolean Value with Blank [False] State - + - + t - + f - + true - + false @@ -11816,23 +11902,23 @@ Shape Fill Type - + gradientCenter - + solid - + pattern - + tile - + frame - + gradientUnscaled - + gradientRadial - + gradient - + background @@ -12010,9 +12096,9 @@ - - - + + + @@ -12098,59 +12184,59 @@ Border Type - + none - + single - + thick - + double - + hairline - + dot - + dash - + dotDash - + dashDotDot - + triple - + thinThickSmall - + thickThinSmall - + thickBetweenThinSmall - + thinThick - + thickThin - + thickBetweenThin - + thinThickLarge - + thickThinLarge - + thickBetweenThinLarge - + wave - + doubleWave - + dashedSmall - + dashDotStroked - + threeDEmboss - + threeDEngrave - + HTMLOutset - + HTMLInset @@ -12159,13 +12245,13 @@ Border Shadow Type - + t - + true - + f - + false @@ -12174,15 +12260,15 @@ Text Wrapping Type - + topAndBottom - + square - + none - + tight - + through @@ -12191,13 +12277,13 @@ Text Wrapping Side - + both - + left - + right - + largest @@ -12206,13 +12292,13 @@ Horizontal Anchor Type - + margin - + page - + text - + char @@ -12221,13 +12307,13 @@ Vertical Anchor Type - + margin - + page - + text - + line @@ -12319,12 +12405,12 @@ - + - + @@ -12332,17 +12418,17 @@ On/Off Value - + true - + false - + on - + off - + 0 - + 1 @@ -12515,39 +12601,39 @@ Text Highlight Colors - + black - + blue - + cyan - + green - + magenta - + red - + yellow - + white - + darkBlue - + darkCyan - + darkGreen - + darkMagenta - + darkRed - + darkYellow - + darkGray - + lightGray - + none @@ -12560,8 +12646,8 @@ - ‘Automatic’ Color Value - + ‘Automatic’ Color Value + auto @@ -12577,7 +12663,7 @@ - + @@ -12614,7 +12700,7 @@ - + @@ -12637,41 +12723,41 @@ Underline Patterns - + single - + words - + double - + thick - + dotted - + dottedHeavy - + dash - + dashedHeavy - + dashLong - + dashLongHeavy - + dotDash - + dashDotHeavy - + dotDotDash - + dashDotDotHeavy - + wave - + wavyHeavy - + wavyDouble - + none @@ -12708,19 +12794,19 @@ Animated Text Effects - + blinkBackground - + lights - + antsBlack - + antsRed - + shimmer - + sparkle - + none @@ -12735,387 +12821,387 @@ Border Styles - + nil - + none - + single - + thick - + double - + dotted - + dashed - + dotDash - + dotDotDash - + triple - + thinThickSmallGap - + thickThinSmallGap - + thinThickThinSmallGap - + thinThickMediumGap - + thickThinMediumGap - + thinThickThinMediumGap - + thinThickLargeGap - + thickThinLargeGap - + thinThickThinLargeGap - + wave - + doubleWave - + dashSmallGap - + dashDotStroked - + threeDEmboss - + threeDEngrave - + outset - + inset - + apples - + archedScallops - + babyPacifier - + babyRattle - + balloons3Colors - + balloonsHotAir - + basicBlackDashes - + basicBlackDots - + basicBlackSquares - + basicThinLines - + basicWhiteDashes - + basicWhiteDots - + basicWhiteSquares - + basicWideInline - + basicWideMidline - + basicWideOutline - + bats - + birds - + birdsFlight - + cabins - + cakeSlice - + candyCorn - + celticKnotwork - + certificateBanner - + chainLink - + champagneBottle - + checkedBarBlack - + checkedBarColor - + checkered - + christmasTree - + circlesLines - + circlesRectangles - + classicalWave - + clocks - + compass - + confetti - + confettiGrays - + confettiOutline - + confettiStreamers - + confettiWhite - + cornerTriangles - + couponCutoutDashes - + couponCutoutDots - + crazyMaze - + creaturesButterfly - + creaturesFish - + creaturesInsects - + creaturesLadyBug - + crossStitch - + cup - + decoArch - + decoArchColor - + decoBlocks - + diamondsGray - + doubleD - + doubleDiamonds - + earth1 - + earth2 - + eclipsingSquares1 - + eclipsingSquares2 - + eggsBlack - + fans - + film - + firecrackers - + flowersBlockPrint - + flowersDaisies - + flowersModern1 - + flowersModern2 - + flowersPansy - + flowersRedRose - + flowersRoses - + flowersTeacup - + flowersTiny - + gems - + gingerbreadMan - + gradient - + handmade1 - + handmade2 - + heartBalloon - + heartGray - + hearts - + heebieJeebies - + holly - + houseFunky - + hypnotic - + iceCreamCones - + lightBulb - + lightning1 - + lightning2 - + mapPins - + mapleLeaf - + mapleMuffins - + marquee - + marqueeToothed - + moons - + mosaic - + musicNotes - + northwest - + ovals - + packages - + palmsBlack - + palmsColor - + paperClips - + papyrus - + partyFavor - + partyGlass - + pencils - + people - + peopleWaving - + peopleHats - + poinsettias - + postageStamp - + pumpkin1 - + pushPinNote2 - + pushPinNote1 - + pyramids - + pyramidsAbove - + quadrants - + rings - + safari - + sawtooth - + sawtoothGray - + scaredCat - + seattle - + shadowedSquares - + sharksTeeth - + shorebirdTracks - + skyrocket - + snowflakeFancy - + snowflakes - + sombrero - + southwest - + stars - + starsTop - + stars3d - + starsBlack - + starsShadowed - + sun - + swirligig - + tornPaper - + tornPaperBlack - + trees - + triangleParty - + triangles - + tribal1 - + tribal2 - + tribal3 - + tribal4 - + tribal5 - + tribal6 - + twistedLines1 - + twistedLines2 - + vine - + waveline - + weavingAngles - + weavingBraid - + weavingRibbon - + weavingStrips - + whiteFlowers - + woodwork - + xIllusions - + zanyTriangles - + zigZag - + zigZagStitch @@ -13178,81 +13264,81 @@ Shading Patterns - + nil - + clear - + solid - + horzStripe - + vertStripe - + reverseDiagStripe - + diagStripe - + horzCross - + diagCross - + thinHorzStripe - + thinVertStripe - + thinReverseDiagStripe - + thinDiagStripe - + thinHorzCross - + thinDiagCross - + pct5 - + pct10 - + pct12 - + pct15 - + pct20 - + pct25 - + pct30 - + pct35 - + pct37 - + pct40 - + pct45 - + pct50 - + pct55 - + pct60 - + pct62 - + pct65 - + pct70 - + pct75 - + pct80 - + pct85 - + pct87 - + pct90 - + pct95 @@ -13315,11 +13401,11 @@ Vertical Positioning Location - + baseline - + superscript - + subscript @@ -13346,15 +13432,15 @@ Emphasis Mark Type - + none - + dot - + comma - + circle - + underDot @@ -13389,15 +13475,15 @@ Two Lines in One Enclosing Character Type - + none - + round - + square - + angle - + curly @@ -13438,15 +13524,15 @@ Horizontal Alignment Location - + left - + center - + right - + inside - + outside @@ -13455,17 +13541,17 @@ Vertical Alignment Location - + inline - + top - + center - + bottom - + inside - + outside @@ -13474,11 +13560,11 @@ Height Rule - + auto - + exact - + atLeast @@ -13487,17 +13573,17 @@ Text Wrapping around Text Frame Type - + auto - + notBeside - + around - + tight - + through - + none @@ -13506,11 +13592,11 @@ Vertical Anchor Location - + text - + margin - + page @@ -13519,11 +13605,11 @@ Horizontal Anchor Location - + text - + margin - + page @@ -13532,11 +13618,11 @@ Text Frame Drop Cap Location - + none - + drop - + margin @@ -13637,19 +13723,19 @@ Custom Tab Stop Type - + clear - + left - + center - + right - + decimal - + bar - + num @@ -13658,17 +13744,17 @@ Custom Tab Stop Leader Character - + none - + dot - + hyphen - + underscore - + heavy - + middleDot @@ -13693,11 +13779,11 @@ Line Spacing Rule - + auto - + exact - + atLeast @@ -13806,25 +13892,25 @@ Horizontal Alignment Type - + left - + center - + right - + both - + mediumKashida - + distribute - + numTab - + highKashida - + lowKashida - + thaiDistribute @@ -13839,17 +13925,17 @@ Document View Values - + none - + print - + outline - + masterPages - + normal - + web @@ -13864,13 +13950,13 @@ Magnification Preset Values - + none - + fullPage - + bestFit - + textFit @@ -13919,9 +14005,9 @@ Proofing State Values - + clean - + dirty @@ -13944,11 +14030,11 @@ Document Classification Values - + notSpecified - + letter - + eMail @@ -13963,15 +14049,15 @@ Document Protection Types - + none - + readOnly - + comments - + trackedChanges - + forms @@ -13980,9 +14066,9 @@ Cryptographic Provider Types - + rsaAES - + rsaFull @@ -13990,14 +14076,14 @@ Cryptographic Algorithm Classes - + hash Cryptographic Algorithm Types - + typeAny @@ -14078,17 +14164,17 @@ Source Document Types - + catalog - + envelopes - + mailingLabels - + formLetters - + email - + fax @@ -14103,17 +14189,17 @@ Mail Merge Data Source Type Values - + textFile - + database - + spreadsheet - + query - + odbc - + native @@ -14128,13 +14214,13 @@ Merged Document Destination Types - + newDocument - + printer - + email - + fax @@ -14149,9 +14235,9 @@ Merge Field Mapping Types - + null - + dbColumn @@ -14208,17 +14294,17 @@ Text Flow Direction - + lrTb - + tbRl - + btLr - + lrTbV - + tbRlV - + tbLrV @@ -14233,15 +14319,15 @@ Vertical Text Alignment Types - + top - + center - + baseline - + bottom - + auto @@ -14256,9 +14342,9 @@ Location of Custom XML Markup Displacing an Annotation - + next - + prev @@ -14267,9 +14353,9 @@ Table Cell Vertical Merge Revision Type - + cont - + rest @@ -14592,15 +14678,15 @@ Lines To Tight Wrap Within Text Box - + none - + allLines - + firstAndLastLine - + firstLineOnly - + lastLineOnly @@ -14934,11 +15020,11 @@ Complex Field Character Type - + begin - + separate - + end @@ -14947,9 +15033,9 @@ Help or Status Text Type - + text - + autoText @@ -14976,17 +15062,17 @@ Text Box Form Field Type Values - + regular - + number - + date - + currentTime - + currentDate - + calculated @@ -15201,15 +15287,15 @@ Section Type - + nextPage - + nextColumn - + continuous - + evenPage - + oddPage @@ -15234,125 +15320,125 @@ Numbering Format - + decimal - + upperRoman - + lowerRoman - + upperLetter - + lowerLetter - + ordinal - + cardinalText - + ordinalText - + hex - + chicago - + ideographDigital - + japaneseCounting - + aiueo - + iroha - + decimalFullWidth - + decimalHalfWidth - + japaneseLegal - + japaneseDigitalTenThousand - + decimalEnclosedCircle - + decimalFullWidth2 - + aiueoFullWidth - + irohaFullWidth - + decimalZero - + bullet - + ganada - + chosung - + decimalEnclosedFullstop - + decimalEnclosedParen - + decimalEnclosedCircleChinese - + ideographEnclosedCircle - + ideographTraditional - + ideographZodiac - + ideographZodiacTraditional - + taiwaneseCounting - + ideographLegalTraditional - + taiwaneseCountingThousand - + taiwaneseDigital - + chineseCounting - + chineseLegalSimplified - + chineseCountingThousand - + koreanDigital - + koreanCounting - + koreanLegal - + koreanDigital2 - + vietnameseCounting - + russianLower - + russianUpper - + none - + numberInDash - + hebrew1 - + hebrew2 - + arabicAlpha - + arabicAbjad - + hindiVowels - + hindiConsonants - + hindiNumbers - + hindiCounting - + thaiLetters - + thaiNumbers - + thaiCounting @@ -15361,9 +15447,9 @@ Page Orientation - + portrait - + landscape @@ -15426,9 +15512,9 @@ Page Border Z-Order - + front - + back @@ -15437,11 +15523,11 @@ Page Border Display Options - + allPages - + firstPage - + notFirstPage @@ -15450,9 +15536,9 @@ Page Border Positioning Base - + page - + text @@ -15503,15 +15589,15 @@ Chapter Separator Types - + hyphen - + period - + colon - + emDash - + enDash @@ -15520,11 +15606,11 @@ Line Numbering Restart Position - + newPage - + newSection - + continuous @@ -15630,13 +15716,13 @@ Vertical Alignment Type - + top - + center - + both - + bottom @@ -15651,13 +15737,13 @@ Document Grid Types - + default - + lines - + linesAndChars - + snapToChars @@ -15680,11 +15766,11 @@ Header or Footer Type - + even - + default - + first @@ -15693,19 +15779,18 @@ Footnote or Endnote Type - + normal - + separator - + continuationSeparator - + continuationNotice - Header or Footer Type @@ -15876,11 +15961,11 @@ Break Types - + page - + column - + textWrapping @@ -15889,13 +15974,13 @@ Line Break Text Wrapping Restart Location - + none - + left - + right - + all @@ -15918,11 +16003,11 @@ Absolute Position Tab Alignment - + left - + center - + right @@ -15931,9 +16016,9 @@ Absolute Position Tab Positioning Base - + margin - + indent @@ -15942,15 +16027,15 @@ Absolute Position Tab Leader Character - + none - + dot - + hyphen - + underscore - + middleDot @@ -15983,13 +16068,13 @@ Proofing Error Type - + spellStart - + spellEnd - + gramStart - + gramEnd @@ -16004,19 +16089,19 @@ Range Permision Editing Group - + none - + everyone - + administrators - + contributors - + editors - + owners - + current @@ -16248,11 +16333,11 @@ Font Type Hint - + default - + eastAsia - + cs @@ -16261,21 +16346,21 @@ Theme Font - + majorEastAsia - + majorBidi - + majorAscii - + majorHAnsi - + minorEastAsia - + minorBidi - + minorAscii - + minorHAnsi @@ -16622,17 +16707,17 @@ Phonetic Guide Text Alignment - + center - + distributeLetter - + distributeSpace - + left - + right - + rightVertical @@ -16695,13 +16780,13 @@ Locking Types - + sdtLocked - + contentLocked - + unlocked - + sdtContentLocked @@ -16726,11 +16811,11 @@ Date Storage Format Types - + text - + date - + dateTime @@ -16745,25 +16830,25 @@ Calendar Types - + gregorian - + hijri - + hebrew - + taiwan - + japan - + thai - + korea - + saka - + gregorianXlitEnglish - + gregorianXlitFrench @@ -17325,13 +17410,13 @@ Table Width Units - + nil - + pct - + dxa - + auto @@ -17358,7 +17443,7 @@ - + Grid Column Width @@ -17445,9 +17530,9 @@ Merged Cell Type - + continue - + restart @@ -17691,9 +17776,9 @@ Table Layout Type - + fixed - + autofit @@ -17708,9 +17793,9 @@ Table Overlap Setting - + never - + overlap @@ -17975,13 +18060,13 @@ Footnote Positioning Location - + pageBottom - + beneathText - + sectEnd - + docEnd @@ -17996,9 +18081,9 @@ Endnote Positioning Location - + sectEnd - + docEnd @@ -18019,11 +18104,11 @@ Footnote/Endnote Numbering Restart Locations - + continuous - + eachSect - + eachPage @@ -18191,23 +18276,23 @@ Mail Merge ODSO Data Source Types - + database - + addressBook - + document1 - + document2 - + text - + email - + native - + legacy - + master @@ -18342,27 +18427,27 @@ Target Screen Sizes for Generated Web Pages - + 544x376 - + 640x480 - + 720x512 - + 800x600 - + 1024x768 - + 1152x882 - + 1152x900 - + 1280x1024 - + 1600x1200 - + 1800x1440 - + 1920x1200 @@ -18733,11 +18818,11 @@ Character-Level Whitespace Compression Settings - + doNotCompress - + compressPunctuation - + compressPunctuationAndJapaneseKana @@ -18791,29 +18876,29 @@ Theme Color Reference - + dark1 - + light1 - + dark2 - + light2 - + accent1 - + accent2 - + accent3 - + accent4 - + accent5 - + accent6 - + hyperlink - + followedHyperlink @@ -19459,11 +19544,11 @@ Frame Scrollbar Visibility - + on - + off - + auto @@ -19520,11 +19605,11 @@ Frameset Layout Order - + rows - + cols - + none @@ -19601,11 +19686,11 @@ Content Between Numbering Symbol and Paragraph Text - + tab - + space - + nothing @@ -19734,11 +19819,11 @@ Numbering Definition Type - + singleLevel - + multilevel - + hybridMultilevel @@ -19852,31 +19937,31 @@ Conditional Table Style Formatting Types - + wholeTable - + firstRow - + lastRow - + firstCol - + lastCol - + band1Vert - + band2Vert - + band1Horz - + band2Horz - + neCell - + nwCell - + seCell - + swCell @@ -19927,13 +20012,13 @@ Style Types - + paragraph - + character - + table - + numbering @@ -20166,17 +20251,17 @@ Font Family Value - + decorative - + modern - + roman - + script - + swiss - + auto @@ -20191,11 +20276,11 @@ Font Pitch Value - + fixed - + variable - + default @@ -20540,39 +20625,39 @@ Theme Color - + dark1 - + light1 - + dark2 - + light2 - + accent1 - + accent2 - + accent3 - + accent4 - + accent5 - + accent6 - + hyperlink - + followedHyperlink - + none - + background1 - + text1 - + background2 - + text2 @@ -20581,11 +20666,11 @@ Insertion Behavior Types - + content - + p - + pg @@ -20607,19 +20692,19 @@ Entry Types - + none - + normal - + autoExp - + toolbar - + speller - + formFld - + bbPlcHdr @@ -20647,81 +20732,81 @@ Entry Gallery Types - + placeholder - + any - + default - + docParts - + coverPg - + eq - + ftrs - + hdrs - + pgNum - + tbls - + watermarks - + autoTxt - + txtBox - + pgNumT - + pgNumB - + pgNumMargins - + tblOfContents - + bib - + custQuickParts - + custCoverPg - + custEq - + custFtrs - + custHdrs - + custPgNum - + custTbls - + custWatermarks - + custAutoTxt - + custTxtBox - + custPgNumT - + custPgNumB - + custPgNumMargins - + custTblOfContents - + custBib - + custom1 - + custom2 - + custom3 - + custom4 - + custom5 @@ -20827,13 +20912,13 @@ Automatic Caption Positioning Values - + above - + below - + left - + right @@ -20963,35 +21048,74 @@ - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + - + + + + black blue @@ -21011,8 +21135,8 @@ lightGray none - - + + auto @@ -21027,12 +21151,14 @@ - - + + + - - + + + single @@ -21070,8 +21196,8 @@ antsRed shimmer - - + + nil @@ -21333,8 +21459,14 @@ superscript subscript - - + + + + + + + + none dot @@ -21342,8 +21474,8 @@ circle underDot - - + + @@ -21484,8 +21616,8 @@ lowKashida thaiDistribute - - + + none @@ -21576,7 +21708,10 @@ email fax - + + + + textFile database @@ -21585,19 +21720,28 @@ odbc native - + + + + newDocument printer email fax - + + + + null dbColumn - + + + + @@ -21617,7 +21761,9 @@ tbRlV tbLrV - + + + top center @@ -21625,6 +21771,9 @@ bottom auto + + + next prev @@ -21640,11 +21789,6 @@ - - - - - @@ -21737,7 +21881,10 @@ firstLineOnly lastLineOnly - + + + + @@ -21842,8 +21989,14 @@ currentDate calculated - - + + + + + + + + @@ -21873,8 +22026,26 @@ - - + + + + + + + + + + + + + + + + + + + + continuous nextColumn @@ -21882,7 +22053,9 @@ evenPage oddPage - + + + decimal upperRoman @@ -22027,7 +22200,9 @@ both bottom - + + + default lines @@ -22282,6 +22457,11 @@ + + + + + center distributeLetter @@ -22290,20 +22470,29 @@ right rightVertical - + + + + sdtLocked contentLocked unlocked sdtContentLocked - + + + + text date dateTime - + + + + gregorian hijri @@ -22316,9 +22505,16 @@ gregorianXlitEnglish gregorianXlitFrench - + + + + - + + + + + @@ -22355,13 +22551,16 @@ - + + + + - + @@ -22387,11 +22586,11 @@ restart - - + + - - + + @@ -22411,17 +22610,21 @@ - + + - + + + + @@ -22442,9 +22645,15 @@ - + + + + + + + + - fixed autofit @@ -22453,7 +22662,9 @@ never overlap - + + + @@ -22490,7 +22701,7 @@ - + @@ -22500,34 +22711,37 @@ sectEnd docEnd - - + + sectEnd docEnd - - + + - - + + continuous eachSect eachPage - - + + + + + - + @@ -22564,7 +22778,10 @@ legacy master - + + + + @@ -22596,7 +22813,10 @@ 1800x1440 1920x1200 - + + + + @@ -22664,7 +22884,10 @@ - + + + + @@ -22674,7 +22897,10 @@ compressPunctuation compressPunctuationAndJapaneseKana - + + + + @@ -22816,19 +23042,28 @@ off auto - + + + + rows cols none - + + + + tab space nothing - + + + + @@ -22848,7 +23083,7 @@ - + @@ -22861,7 +23096,9 @@ multilevel hybridMultilevel - + + + @@ -22907,12 +23144,6 @@ seCell swCell - - paragraph - character - table - numbering - @@ -22921,6 +23152,12 @@ + + paragraph + character + table + numbering + @@ -22951,7 +23188,10 @@ - + + + + decorative modern @@ -22960,13 +23200,17 @@ swiss auto - + + + fixed variable default - + + + @@ -23008,7 +23252,7 @@ - - @@ -100,7 +98,7 @@ - + @@ -110,7 +108,7 @@ - + @@ -140,6 +138,9 @@ + + FAST_TOKENS_END + diff --git a/writerfilter/source/ooxml/namespaceids.xsl b/writerfilter/source/ooxml/namespaceids.xsl index 318155c47fdc..45828761da0c 100644 --- a/writerfilter/source/ooxml/namespaceids.xsl +++ b/writerfilter/source/ooxml/namespaceids.xsl @@ -58,7 +58,18 @@ - + + + + + +const sal_uInt32 + + = + + << 16; + + diff --git a/writerfilter/source/ooxml/nostatus.xsl b/writerfilter/source/ooxml/nostatus.xsl new file mode 100644 index 000000000000..e2e113c6a602 --- /dev/null +++ b/writerfilter/source/ooxml/nostatus.xsl @@ -0,0 +1,20 @@ + + + + + + + + + + + : + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/qnametostr.xsl b/writerfilter/source/ooxml/qnametostr.xsl index 888eb36325e8..1c0a706df56d 100644 --- a/writerfilter/source/ooxml/qnametostr.xsl +++ b/writerfilter/source/ooxml/qnametostr.xsl @@ -63,7 +63,66 @@ xml:space="default"> - + + + + + +void QNameToString::init_ooxml() +{ + /* ooxml */ + + + + + mMap[ + + + + ] = " + + "; + + + +} + + + + + +void ooxmlsprmidsToXML(::std::ostream & out) +{ + + + + out << "<theid name=\" + + \"> + + </theid>" << endl; + + + +} + +void ooxmlidsToXML(::std::ostream & out) +{ + + + + out << "<theid name=\" + + \"> + + </theid>" << endl; + + + +} + diff --git a/writerfilter/source/ooxml/resourceids.xsl b/writerfilter/source/ooxml/resourceids.xsl index 33eea88691ac..23ee6ffaad60 100644 --- a/writerfilter/source/ooxml/resourceids.xsl +++ b/writerfilter/source/ooxml/resourceids.xsl @@ -64,7 +64,27 @@ xml:space="default"> - + + + + + +namespace NS_ooxml +{ + + + + const Id LN_ + + = + + ; + + +} + diff --git a/writerfilter/source/ooxml/resourcestools.xsl b/writerfilter/source/ooxml/resourcestools.xsl deleted file mode 100644 index f7039aca5321..000000000000 --- a/writerfilter/source/ooxml/resourcestools.xsl +++ /dev/null @@ -1,2338 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - /* - - - / - - - [@name= - - ] - */ - - - - -/* - - THIS FILE IS GENERATED AUTOMATICALLY! DO NOT EDIT! - -*/ - - - - - - - 1 - - - 0 - - - - - - - - - - - - - - - - - - - - - : - - - - - - - - NS_ - - - - - - OOXML_ - - - - - - - - - - , - - - - - - -typedef sal_Int32 Token_t; - - - -const Token_t OOXML_ - - = - -; - - -const Token_t OOXML_FAST_TOKENS_END = - -; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OOXMLFastContextHandler_ - - _ - - - - - - - - - - - - - - - - - - - - - - - OOXMLValue_ - - _ - - - - - - - - - - - - - - - - - OOXML - - Value - - - - - - - - - - - -class - - : public - - -{ -public: - - - - - ( - const rtl::OUString & rValue - ); - - - - (const rtl::OUString & rValue) : - - (rValue) {} - - - - virtual ~ - - () {} -}; - - - - - - - - - - - - - 1 - 0 - - - - - - - - - - - - - - - - - - - - - - - - xContextHandler.set( - - ); - - - - break; - - - - - - - - - - - - - - - - - OOXMLFastHelper < - - >::createAndSetParentRef(this, Element, Attribs) - - - - - - - - - - - - - if (! xContextHandler.is() || dynamic_cast<OOXMLFastContextHandler *>(xContextHandler.get())->isFallback()) - { - xContextHandler.set( - - ); - } - - - - - - - - - - if (! xContextHandler.is() || dynamic_cast<OOXMLFastContextHandler *>(xContextHandler.get())->isFallback()) - { - xContextHandler.set( - - ); - } - - - - - - - - - - - - - - - - - - - -uno::Reference < xml::sax::XFastContextHandler > - - -::lcl_createFastChildContext -(::sal_Int32 Element, - const uno::Reference < xml::sax::XFastAttributeList > & - - Attribs - -) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - uno::Reference < xml::sax::XFastContextHandler > xContextHandler; - - - - switch (Element) - { - - - - default: - break; - } - - - - - - - - return xContextHandler; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - nResult = - - ; - break; - - - - - - - - - - OOXMLPropertyImpl::SPRM - - - OOXMLPropertyImpl::ATTRIBUTE - - - - - - - - - 1 - 0 - - - - - - - - if (sal::static_int_cast<Id>(getId()) == - - - - ) - { - - - - { - OOXMLPropertySetEntryToInteger aHandler( - - - - ); - getPropertySetAttrs()->resolve(aHandler); - - if (sal::static_int_cast<Id>(aHandler.getValue()) == - - - - ) - { - - - - - sendTableDepth(); - - - - startCell(); - - - - startParagraphGroup(); - - - - startCharacterGroup(); - - - - startSectionGroup(); - - - - startField(); - - - - fieldSeparator(); - - - - endField(); - - - - ftnednref(); - - - - ftnednsep(); - - - - ftnedncont(); - - - - pgNum(); - - - - tab(); - - - - cr(); - - - - noBreakHyphen(); - - - - softHyphen(); - - - - endOfParagraph(); - - - - handleLastParagraphInSection(); - - - - setLastParagraphInSection(); - - - - endCell(); - - - - endParagraphGroup(); - - - - endCharacterGroup(); - - - - endSectionGroup(); - - - handleXNotes(); - - handleHdrFtr(); - - handleComment(); - - handlePicture(); - - handleHyperlink(); - - handleBreak(); - - handleOLE(); - - - sendProperty( - - - - ); - - - propagateCharacterProperties(); - - - - propagateCharacterPropertiesAsSet( - - - - ); - - - propagateTableProperties(); - - - - sendPropertiesWithId( - - - - ); - - - clearProps(); - - - text(sText); - - - setHandle(); - - - - footnoteSeparator(); - - - footnoteCont(); - - - endnoteSeparator(); - - - endnoteCont(); - - - - OOXMLFastHelper<OOXMLIntegerValue>::newProperty(this, - - - - , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - - "))); - - - - OOXMLFastHelper<OOXMLIntegerValue>::mark(this, - - - - , ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - - "))); - - - - OOXMLFastHelper<OOXMLIntegerValue>::newProperty(this, - - ooxml:token - - , getToken()); - - - - - } - } - - - - } - - - - - - - - - - - - - - - - - - -/* - class: - - -*/ - - - - - - - - - - - - - - - - - - - - OOXMLValueString_ - - - - - - -rtl::OUString - - - -(RTL_CONSTASCII_USTRINGPARAM("")); - - -rtl::OUString - - - -(RTL_CONSTASCII_USTRINGPARAM(" - -")); - - - - - - -extern rtl::OUString - - - - - ; - - -extern rtl::OUString - - - - ; - - - - - - - - - - - - - - - - - :: - - (const rtl::OUString & - - - rValue - - - /* rValue */ - - - ) -: OOXMLListValue() -{ - - - - mnValue = - - - - - - - - - - - ; - - - - if (rValue.compareTo( - - - - ) == 0) - { - mnValue = - - - - ; - return; - } - - - -} - - - - - - - - - - - - - ::~ - - () -{ -} - - - - - - - - - - - - - - -/* - class: - - -*/ - - - - - - - - - - - -namespace NS_ooxml -{ - - - - const Id LN_ - - = - - ; - - -} - - - - -void ooxmlsprmidsToXML(::std::ostream & out) -{ - - - - out << "<theid name=\" - - \"> - - </theid>" << endl; - - - -} - -void ooxmlidsToXML(::std::ostream & out) -{ - - - - out << "<theid name=\" - - \"> - - </theid>" << endl; - - - -} - - - - - -void QNameToString::init_ooxml() -{ - /* ooxml */ - - - - - mMap[ - - - - ] = " - - "; - - - -} - - - - - -string qnameToString(sal_uInt32 nToken) -{ - string sResult; - - switch (nToken) - { - - - - - - case - - - - : - sResult = " - - "; - break; - - - - - default: - ; - } - - return sResult; -} - - - - - - - - - - - - - case - - - - : // - - , - - - - - - - - -Sprm::Kind SprmKind(sal_uInt32 nSprmCode) -{ - Sprm::Kind nResult = Sprm::UNKNOWN; - - switch (nSprmCode) - { - - paragraph - - - nResult = Sprm::PARAGRAPH; - break; - - character - - - nResult = Sprm::CHARACTER; - break; - - table - - - nResult = Sprm::TABLE; - break; - - default: - break; - } - - return nResult; -} - - - - - - - - NS_ - - ::LN_ - - - - - - - - - - - - - -%{ -#include "OOXMLFastTokens.hxx" - -namespace writerfilter { namespace ooxml { namespace tokenmap { -%} -struct token { const char * name; Token_t nToken; }; -%% - - - - - , - - - - -%% -}}} - - - NS_ - - - - - - -const sal_uInt32 - - = - - << 16; - - - - - - - - - - | - - - - - - - F_Attribute| - - - - - - case - - : - - - - - - -namespace tokenmap { -struct token { const char * name; Token_t nToken; }; -class Perfect_Hash -{ -private: - static inline unsigned int hash (const char *str, unsigned int len); -public: - static struct token *in_word_set (const char *str, unsigned int len); -}; -} - -string fastTokenToId(sal_uInt32 nToken) -{ - - - string sResult; - - switch (nToken & 0xffff0000) - { - - - case NS_ - - : - sResult += " - - :"; - break; - - - } - - switch (nToken & 0xffff) - { - - - - - case - - : - sResult += " - - "; - break; - - - - } - - return sResult; -} - - - - - -uno::Reference < xml::sax::XFastParser > OOXMLStreamImpl::getFastParser() -{ - if (! mxFastParser.is()) - { - uno::Reference < lang::XMultiComponentFactory > xFactory = - uno::Reference < lang::XMultiComponentFactory > - (mxContext->getServiceManager()); - - mxFastParser.set(xFactory->createInstanceWithContext - ( ::rtl::OUString::createFromAscii - ( "com.sun.star.xml.sax.FastParser" ), - mxContext ), uno::UNO_QUERY_THROW); - - - - mxFastParser->registerNamespace(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" - - ")), - - ); - - - } - - return mxFastParser; -} - - - - - - - - - - - - - - - - - - - - : - - - - - - - - - - - - - - - : - - - - - - - - - - - - - - - - - - - - - - if (Attribs->hasAttribute( - - )) - - - - if (Attribs->hasAttribute( - - )) - - - - - - - - - - - OOXMLBooleanValue - - - OOXMLIntegerValue - - - OOXMLStringValue - - - - - - - - - - - - - - - - - - - - { - ::rtl::OUString aValue(Attribs->getValue( - - )); - OOXMLFastHelper < - - >::newProperty(this, - - , aValue); - - - - - - checkId(aValue); - - - - - - setXNoteId(aValue); - - - - - - } - - - - - - - - msValue = sText; - - - - - - - - - msValue = Attribs->getValue( - - ); - - - - - - - mnValue = sText.toInt32(); - - - - - - - - - mnValue = Attribs->getValue( - - ).toInt32(); - - - - - - - mnValue = sText.toInt32(16); - - - - - - - - - mnValue = Attribs->getValue( - - ).toInt32(16); - - - - - - - setValue( sText ); - - - - - - - - - setValue(Attribs->getValue( - - )); - - - - - - - - - - - - - - - - - - - - - mpValue = OOXMLValue::Pointer_t (new - - ( sText ) ); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - mpValue = OOXMLValue::Pointer_t (new - - (Attribs->getValue( - - ))); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - OOXMLFastHelper < - - >::attributes(this, Attribs); - - - - - - - - - - - - - - - - - - -void - -::attributes -(const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException) -{ -#ifdef DEBUG_DUMP_ATTRIBUTES - dumpAttribs(Attribs); -#endif - - - - -} - - - - - - - - - - createFromStart(Element, Attribs) - - - - - - - OOXMLFastHelper < - - >::createAndSetParent(this, Element, - - - - - - - - - - 0 - - - - ) - - - - - - - - - OOXMLFastContextHandler - - - - - - - - - -class WRITERFILTER_DLLPRIVATE - -: public - - -{ -public: - explicit - - - (OOXMLFastContextHandler * context); - virtual ~ - - (); - - - - - - virtual uno::Reference < xml::sax::XFastContextHandler > - lcl_createFastChildContext - (::sal_Int32 Element, - const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException); - - - - - - virtual void attributes - (const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException); - - - - - - virtual void lcl_startAction(Token_t nElement); - - - - - - virtual void lcl_endAction(Token_t nElement); - - - - - - virtual void lcl_characters(const ::rtl::OUString & aChars) - throw (uno::RuntimeException, xml::sax::SAXException); - - - virtual string getType() const { return " - - "; } - - - - - - virtual bool propagatesProperties() const; - - -}; - - - - - - - - - - - -/* - - - : - - -*/ - - - - - - - - - - - - - :: - - -(OOXMLFastContextHandler * pContext) -: - -(pContext) -{} - - - - - - - - - ::~ - - -() -{} - - - - - - - setId( - - - - ); - - - - - - - - - - - - - - - - - - - - - - - - - - - -void - -::lcl_startAction(Token_t - - - nElement - - -) -{ - - -} - - - - - - - - - - - - - - - - - - - - - - - -void - -::lcl_endAction(Token_t - - - nElement - - -) -{ - - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void - -::lcl_characters(const ::rtl::OUString & sText) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - - -} - - - - - - - - - - - - return true; - - - - return true; - - - - - - - - - - - - - - - -bool - -::propagatesProperties() const -{ - - -} - - - - - - -uno::Reference < xml::sax::XFastContextHandler > -OOXMLFastContextHandler::createFromStart -(::sal_Int32 Element, - const uno::Reference < xml::sax::XFastAttributeList > & Attribs) -{ -#ifdef DEBUG_CREATE - debug_logger->startElement("createfromstart"); - debug_logger->attribute("element", fastTokenToId(Element)); -#endif - uno::Reference < xml::sax::XFastContextHandler > xResult; - - - - - - if (! xResult.is() || dynamic_cast<OOXMLFastContextHandler *>(xResult.get())->isFallback()) - { - xResult = OOXMLFastHelper < - - >::createAndSetParentRef(this, Element, Attribs); - } - - - - -#ifdef DEBUG_CREATE - debug_logger->endElement("createfromstart"); -#endif - - return xResult; -} - - - - - - - -void dumpAttrib(const char * sToken, sal_uInt32 nToken, - const uno::Reference < xml::sax::XFastAttributeList - > & Attribs) -{ - try - { - if (Attribs->hasAttribute(nToken)) - { - debug_logger->startElement("attrib"); - debug_logger->attribute("id", sToken); - debug_logger->chars(Attribs->getValue(nToken)); - debug_logger->endElement("attrib"); - } - } - catch (...) - { - debug_logger->startElement("error"); - debug_logger->chars(sToken); - debug_logger->endElement("error"); - } -} - -void dumpAttribs -(const uno::Reference < xml::sax::XFastAttributeList > & Attribs) - throw (uno::RuntimeException, xml::sax::SAXException) -{ - debug_logger->startElement("attribs"); - - - - - dumpAttrib(" - - ", - - , Attribs); - - dumpAttrib(" - - ", - - , Attribs); - - - - debug_logger->endElement("attribs"); -} - - - - createFastContextHandler_ - - - - - case CLASS_ - - _ - - : - - - - - - - - - - - - - - - - - - - - - - xResult.set( - - ); - break; - - - - - - - - - - - - - switch(Element) - { - - - default: - ; - } - - - - - -uno::Reference<XFastContextHandler> - -(Id parent, Token_t Element) -{ - uno::Reference<XFastContextHandler> xResult; - switch (parent) - { - - - - - - - - - - - - - - - break; - - - - - default: - ; - } - - return xResult; -} - - - - diff --git a/writerfilter/source/ooxml/status.sh b/writerfilter/source/ooxml/status.sh new file mode 100755 index 000000000000..e06382b13aa1 --- /dev/null +++ b/writerfilter/source/ooxml/status.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +SEARCHIN=$SRC_ROOT/writerfilter/source/dmapper + +( +echo '' +echo "" + +xsltproc analyzemodel.xsl model.xml | tail -n +2 + +mdfind -onlyin $SEARCHIN "case NS_" | +xargs -J % grep -A 1 -n "case NS_" % | +grep "cxx" | +grep -v "//.*case NS_" | +sed 's#'$SEARCHIN'##' | +sed 's#\(^[^:]*\):\([0-9]*\):##' | +sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*##' | +grep -v "WRITERFILTERSTATUS:" | +sed 's#^.*-[0-9][0-9]*-.*$##' | +grep -v "^--" + +echo "" +) | +xsltproc analyzestage2.xsl - | +xsltproc analyzestage3.xsl - diff --git a/writerfilter/source/ooxml/todo.xsl b/writerfilter/source/ooxml/todo.xsl new file mode 100644 index 000000000000..80431ea90487 --- /dev/null +++ b/writerfilter/source/ooxml/todo.xsl @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/valuesimpl.xsl b/writerfilter/source/ooxml/valuesimpl.xsl deleted file mode 100644 index 64be68700ad5..000000000000 --- a/writerfilter/source/ooxml/valuesimpl.xsl +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLvalues.hxx" -#include "OOXMLPropertySetImpl.hxx" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - - -}} - - \ No newline at end of file diff --git a/writerfilter/source/resourcemodel/Protocol.cxx b/writerfilter/source/resourcemodel/Protocol.cxx new file mode 100644 index 000000000000..7ae3c06f2675 --- /dev/null +++ b/writerfilter/source/resourcemodel/Protocol.cxx @@ -0,0 +1,216 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: WW8ResourceModel.hxx,v $ + * $Revision: 1.4 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include +#include +#include +#include +#include +namespace writerfilter +{ + +/* + StreamProtocol +*/ + +StreamProtocol::StreamProtocol(Stream * pStream, + TagLogger::Pointer_t pTagLogger) + : m_pStream(pStream), m_pTagLogger(pTagLogger) +{ +} + +StreamProtocol::~StreamProtocol() +{ +} + +void StreamProtocol::startSectionGroup() +{ + m_pTagLogger->element("protocol-startSectionGroup"); + m_pStream->startSectionGroup(); +} + +void StreamProtocol::endSectionGroup() +{ + m_pTagLogger->element("protocol-endSectionGroup"); + m_pStream->endSectionGroup(); +} + +void StreamProtocol::startParagraphGroup() +{ + m_pTagLogger->element("protocol-startParagraphGroup"); + m_pStream->startParagraphGroup(); +} + +void StreamProtocol::endParagraphGroup() +{ + m_pTagLogger->element("protocol-endParagraphGroup"); + m_pStream->endParagraphGroup(); +} + +void StreamProtocol::startCharacterGroup() +{ + m_pTagLogger->element("protocol-startCharacterGroup"); + m_pStream->startCharacterGroup(); +} + +void StreamProtocol::endCharacterGroup() +{ + m_pTagLogger->element("protocol-endCharacterGroup"); + m_pStream->endCharacterGroup(); +} + +void StreamProtocol::text(const sal_uInt8 * data, size_t len) +{ + ::rtl::OUString sText((const sal_Char*) data, len, + RTL_TEXTENCODING_MS_1252); + m_pTagLogger->startElement("protocol-text"); + m_pTagLogger->chars(sText); + m_pTagLogger->endElement("protocol-text"); + + m_pStream->text(data, len); +} + +void StreamProtocol::utext(const sal_uInt8 * data, size_t len) +{ + ::rtl::OUString sText; + ::rtl::OUStringBuffer aBuffer = ::rtl::OUStringBuffer(len); + aBuffer.append( (const sal_Unicode *) data, len); + sText = aBuffer.makeStringAndClear(); + + m_pTagLogger->startElement("protocol-utext"); + m_pTagLogger->chars(sText); + m_pTagLogger->endElement("protocol-utext"); + + m_pStream->utext(data, len); +} + +void StreamProtocol::props(writerfilter::Reference::Pointer_t ref) +{ + m_pTagLogger->startElement("protocol-props"); + m_pStream->props(ref); + m_pTagLogger->endElement("protocol-props"); +} + +void StreamProtocol::table(Id name, + writerfilter::Reference
::Pointer_t ref) +{ + m_pTagLogger->startElement("protocol-table"); + m_pTagLogger->attribute("name", (*QNameToString::Instance())(name)); + m_pStream->table(name, ref); + m_pTagLogger->endElement("protocol-table"); +} + +void StreamProtocol::substream(Id name, + writerfilter::Reference::Pointer_t ref) +{ + m_pTagLogger->startElement("protocol-substream"); + m_pTagLogger->attribute("name", (*QNameToString::Instance())(name)); + + m_pStream->substream(name, ref); + m_pTagLogger->endElement("protocol-substream"); +} + +void StreamProtocol::info(const string & rInfo) +{ + m_pStream->info(rInfo); +} + +void StreamProtocol::startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ) +{ + m_pTagLogger->element("protocol-startShape"); + + m_pStream->startShape(xShape); +} + +void StreamProtocol::endShape() +{ + m_pTagLogger->element("protocol-endShape"); + + m_pStream->endShape(); +} + +/* + PropertiesProtocol +*/ + +PropertiesProtocol::PropertiesProtocol(Properties * pProperties, + TagLogger::Pointer_t pTagLogger) +: m_pProperties(pProperties), m_pTagLogger(pTagLogger) +{ +} + +PropertiesProtocol::~PropertiesProtocol() +{ +} + +void PropertiesProtocol::attribute(Id name, Value & val) +{ + m_pTagLogger->startElement("protocol-attribute"); + m_pTagLogger->attribute("name", (*QNameToString::Instance())(name)); + m_pTagLogger->attribute("value", val.toString()); + m_pProperties->attribute(name, val); + m_pTagLogger->endElement("protocol-attribute"); +} + +void PropertiesProtocol::sprm(Sprm & _sprm) +{ + m_pTagLogger->startElement("protocol-sprm"); + static char sBuffer[256]; + snprintf(sBuffer, sizeof(sBuffer), "%04" SAL_PRIxUINT32, _sprm.getId()); + m_pTagLogger->attribute("id", sBuffer); + m_pTagLogger->attribute("name", _sprm.getName()); + m_pTagLogger->chars(_sprm.toString()); + m_pProperties->sprm(_sprm); + m_pTagLogger->endElement("protocol-sprm"); +} + +/* + TableProtocol + */ + +TableProtocol::TableProtocol(Table * pTable, TagLogger::Pointer_t pTagLogger) +: m_pTable(pTable), m_pTagLogger(pTagLogger) +{ +} + +TableProtocol::~TableProtocol() +{ +} + +void TableProtocol::entry(int pos, + writerfilter::Reference::Pointer_t ref) +{ + m_pTagLogger->startElement("protocol-entry"); + m_pTagLogger->attribute("pos", pos); + m_pTable->entry(pos, ref); + m_pTagLogger->endElement("protocol-entry"); +} + +} diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index a4baf718a5d7..1d9b23623e56 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -42,6 +42,20 @@ namespace writerfilter mAttrs.push_back(aAttr); } + void XMLTag::addAttr(string sName, const ::rtl::OUString & sValue) + { + addAttr(sName, + OUStringToOString + (sValue, RTL_TEXTENCODING_ASCII_US).getStr()); + } + + void XMLTag::addAttr(string sName, sal_uInt32 nValue) + { + char buffer[256]; + snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, nValue); + addAttr(sName, buffer); + } + void XMLTag::addTag(XMLTag::Pointer_t pTag) { if (pTag != XMLTag::Pointer_t()) @@ -188,6 +202,7 @@ namespace writerfilter { XMLTag::Pointer_t pTag(new XMLTag("root")); mTags.push(pTag); + mpRoot = pTag; } void TagLogger::element(const string & name) @@ -210,7 +225,12 @@ namespace writerfilter void TagLogger::attribute(const string & name, const ::rtl::OUString & value) { - attribute(name, OUStringToOString(value, RTL_TEXTENCODING_ASCII_US).getStr()); + currentTag()->addAttr(name, value); + } + + void TagLogger::attribute(const string & name, sal_uInt32 value) + { + currentTag()->addAttr(name, value); } void TagLogger::addTag(XMLTag::Pointer_t pTag) @@ -230,19 +250,18 @@ namespace writerfilter void TagLogger::endElement(const string & name) { - string nameRemoved; - bool found = false; - do - { - nameRemoved = currentTag()->getTag(); - mTags.pop(); + string nameRemoved = currentTag()->getTag(); - if (name == nameRemoved) - found = true; - else - found = false; // for debugging + if (name == nameRemoved) + mTags.pop(); + else { + XMLTag::Pointer_t pTag(new XMLTag("end.mismatch")); + pTag->addAttr("name", name); + pTag->addAttr("top", nameRemoved); + + currentTag()->addTag(pTag); } - while (! found && ! mTags.empty()); + } void TagLogger::endDocument() @@ -252,7 +271,7 @@ namespace writerfilter ostream & TagLogger::output(ostream & o) const { - return currentTag()->output(o); + return mpRoot->output(o); } void TagLogger::dump(const char * name) @@ -270,7 +289,7 @@ namespace writerfilter fileName += "/writerfilter."; fileName += name; - fileName += ".tmp"; + fileName += ".xml"; ofstream dumpStream(fileName.c_str()); aIt->second->output(dumpStream); diff --git a/writerfilter/source/resourcemodel/makefile.mk b/writerfilter/source/resourcemodel/makefile.mk index 52f89cf2dc7f..f3869f30611b 100644 --- a/writerfilter/source/resourcemodel/makefile.mk +++ b/writerfilter/source/resourcemodel/makefile.mk @@ -54,7 +54,8 @@ SLOFILES= \ $(SLO)$/resourcemodel.obj \ $(SLO)$/util.obj \ $(SLO)$/TagLogger.obj \ - $(SLO)$/WW8Analyzer.obj + $(SLO)$/WW8Analyzer.obj \ + $(SLO)$/Protocol.obj # linux 64 bit: compiler (gcc 4.2.3) fails with 'out of memory' .IF "$(OUTPATH)"=="unxlngx6" @@ -101,10 +102,11 @@ OOXMLHXXOUTDIRCREATED=$(OOXMLHXXOUTDIR)$/created OOXMLMODEL=..$/ooxml$/model.xml OOXMLPREPROCESSXSL=..$/ooxml$/modelpreprocess.xsl +OOXMLPREPROCESSXSLCOPIED=$(MISC)$/modelpreprocess.xsl OOXMLQNAMETOSTRXSL=..$/ooxml$/qnametostr.xsl OOXMLANALYZERXSL=..$/ooxml$/analyzer.xsl OOXMLRESOURCEIDSXSL=..$/ooxml$/resourceids.xsl -OOXMLRESOURCESTOOLSXSL=..$/ooxml$/resourcestools.xsl +OOXMLFACTORYTOOLSXSL=..$/ooxml$/factorytools.xsl DOCTOKMODEL=..$/doctok$/resources.xmi DOCTOKQNAMETOSTRXSL=..$/doctok$/qnametostr.xsl DOCTOKANALYZERXSL=..$/doctok$/analyzer.xsl @@ -113,6 +115,8 @@ DOCTOKRESOURCEIDSXSL=..$/doctok$/resourceids.xsl DOCTOKSPRMIDSXSL=..$/doctok$/sprmids.xsl DOCTOKRESOURCETOOLS=..$/doctok$/resourcetools.xsl +NSPROCESS=namespace_preprocess.pl + MODELPROCESSED=$(MISC)$/model_preprocessed.xml QNAMETOSTRCXX=$(RESOURCEMODELCXXOUTDIR)$/qnametostr.cxx @@ -124,6 +128,9 @@ DOCTOKRESOURCEIDSHXX=$(DOCTOKHXXOUTDIR)$/resourceids.hxx SPRMIDSHXX=$(DOCTOKHXXOUTDIR)$/sprmids.hxx OOXMLRESOURCEIDSHXX=$(OOXMLHXXOUTDIR)$/resourceids.hxx +NSXSL=$(MISC)$/namespacesmap.xsl +NAMESPACESTXT=$(SOLARVER)$/$(INPATH)$/inc$(UPDMINOREXT)$/oox$/namespaces.txt + GENERATEDHEADERS=$(DOCTOKRESOURCEIDSHXX) $(OOXMLRESOURCEIDSHXX) $(SPRMIDSHXX) GENERATEDFILES= \ $(GENERATEDHEADERS) \ @@ -135,18 +142,19 @@ GENERATEDFILES= \ $(SPRMCODETOSTRTMP) $(OOXMLQNAMETOSTRTMP): $(OOXMLQNAMETOSTRXSL) $(MODELPROCESSED) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLQNAMETOSTRXSL:s!\!/!) $(MODELPROCESSED) > $@ + @echo "Making: " $(@:f) + $(XSLTPROC) $(OOXMLQNAMETOSTRXSL:s!\!/!) $(MODELPROCESSED) > $@ $(DOCTOKQNAMETOSTRTMP): $(DOCTOKQNAMETOSTRXSL) $(DOCTOKMODEL) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKQNAMETOSTRXSL:s!\!/!) $(DOCTOKMODEL) > $@ + @echo "Making: " $(@:f) + $(XSLTPROC) $(DOCTOKQNAMETOSTRXSL:s!\!/!) $(DOCTOKMODEL) > $@ -$(QNAMETOSTRCXX): $(OOXMLQNAMETOSTRTMP) $(DOCTOKQNAMETOSTRTMP) qnametostrheader qnametostrfooter $(OOXMLRESOURCESTOOLSXSL) $(DOCTOKRESOURCETOOLS) +$(QNAMETOSTRCXX): $(OOXMLQNAMETOSTRTMP) $(DOCTOKQNAMETOSTRTMP) qnametostrheader qnametostrfooter $(OOXMLFACTORYTOOLSXSL) $(DOCTOKRESOURCETOOLS) @$(TYPE) qnametostrheader $(OOXMLQNAMETOSTRTMP) $(DOCTOKQNAMETOSTRTMP) qnametostrfooter > $@ + $(SPRMCODETOSTRTMP): $(DOCTOKSPRMCODETOSTRXSL) $(DOCTOKMODEL) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKSPRMCODETOSTRXSL:s!\!/!) $(DOCTOKMODEL) > $@ + @echo "Making: " $(@:f) + $(XSLTPROC) $(DOCTOKSPRMCODETOSTRXSL:s!\!/!) $(DOCTOKMODEL) > $@ $(SPRMCODETOSTRCXX): sprmcodetostrheader $(SPRMCODETOSTRTMP) sprmcodetostrfooter @$(TYPE) $< > $@ @@ -160,30 +168,36 @@ $(DOCTOKHXXOUTDIRCREATED): @$(MKDIRHIER) $(DOCTOKHXXOUTDIR) @$(TOUCH) $@ -$(DOCTOKRESOURCEIDSHXX): $(DOCTOKHXXOUTDIRCREATED) $(DOCTOKRESOURCETOOLS) $(DOCTOKRESOURCEIDSXSL) - @echo "Making: " $(@:f) +$(DOCTOKRESOURCEIDSHXX): $(DOCTOKHXXOUTDIRCREATED) $(DOCTOKRESOURCETOOLS) $(DOCTOKRESOURCEIDSXSL) $(DOCTOKMODEL) + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKRESOURCEIDSXSL:s!\!/!) $(DOCTOKMODEL) > $@ $(OOXMLHXXOUTDIRCREATED): @$(MKDIRHIER) $(OOXMLHXXOUTDIR) @$(TOUCH) $@ -$(MODELPROCESSED): $(OOXMLMODEL) $(OOXMLRESOURCESTOOLSXSL) $(OOXMLPREPROCESSXSL) - @echo "Making: " $(@:f) - $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLPREPROCESSXSL:s!\!/!) $(OOXMLMODEL) > $@ +$(OOXMLPREPROCESSXSLCOPIED): $(OOXMLPREPROCESSXSL) + @$(COPY) $(OOXMLPREPROCESSXSL) $@ -$(OOXMLRESOURCEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLRESOURCESTOOLSXSL) $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED) +$(NSXSL) : $(OOXMLMODEL) $(NAMESPACESTXT) $(NSPROCESS) + @$(PERL) $(NSPROCESS) $(NAMESPACESTXT) > $@ + +$(MODELPROCESSED): $(NSXSL) $(OOXMLPREPROCESSXSLCOPIED) $(OOXMLMODEL) @echo "Making: " $(@:f) + $(COMMAND_ECHO)$(XSLTPROC) $(NSXSL) $(OOXMLMODEL) > $@ + +$(OOXMLRESOURCEIDSHXX): $(OOXMLHXXOUTDIRCREATED) $(OOXMLFACTORYTOOLSXSL) $(OOXMLRESOURCEIDSXSL) $(MODELPROCESSED) + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $(OOXMLRESOURCEIDSXSL:s!\!/!) $(MODELPROCESSED) > $@ $(SPRMIDSHXX): $(DOCTOKHXXOUTDIRCREATED) $(DOCTOKSPRMIDSXSL) $(DOCTOKMODEL) - @echo "Making: " $(@:f) + @echo "Making: " $(@:f) $(COMMAND_ECHO)$(XSLTPROC) $(DOCTOKSPRMIDSXSL:s!\!/!) $(DOCTOKMODEL) > $@ .PHONY: genclean genmake gendirs genclean: - @rm -f $(GENERATEDFILES) + rm -f $(GENERATEDFILES) genmake: $(GENERATEDFILES) diff --git a/writerfilter/source/ooxml/namespace_preprocess.pl b/writerfilter/source/resourcemodel/namespace_preprocess.pl similarity index 100% rename from writerfilter/source/ooxml/namespace_preprocess.pl rename to writerfilter/source/resourcemodel/namespace_preprocess.pl diff --git a/writerfilter/source/resourcemodel/setdebugflags b/writerfilter/source/resourcemodel/setdebugflags new file mode 100755 index 000000000000..dafa563d7a7d --- /dev/null +++ b/writerfilter/source/resourcemodel/setdebugflags @@ -0,0 +1,3 @@ +#!/bin/tcsh + +setenv ENFCLAGS "-DDEBUG_ELEMENT -DDEBUG_ATTRIBUTES -DDEBUG_PROPERTIES -DDEBUG_CONTEXT_STACK -DDEBUG_CREATE -DDEBUG_DOMAINMAPPER" diff --git a/writerfilter/source/resourcemodel/util.cxx b/writerfilter/source/resourcemodel/util.cxx index b7966f6957ea..47d325654d5b 100644 --- a/writerfilter/source/resourcemodel/util.cxx +++ b/writerfilter/source/resourcemodel/util.cxx @@ -37,6 +37,7 @@ #include #include #include +#include namespace writerfilter { @@ -397,4 +398,27 @@ string propertysetToString(uno::Reference const & xPropSet) return result; } + string toString(uno::Reference< text::XTextRange > textRange) + { + string result; + + if (textRange.get()) + { + rtl::OUString aOUStr = textRange->getString(); + rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US ); + + result = aOStr.getStr(); + } + else + { + result="(nil)"; + } + + return result; + } + + string toString(const string & rString) + { + return rString; + } } diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx index 8fa44b224aa5..7a3f80ea22d9 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx +++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx @@ -64,6 +64,7 @@ #include #include #include +#include #include @@ -91,6 +92,12 @@ sal_Int32 SAL_CALL ScannerTestService::run( const uno::Sequence< rtl::OUString > uno::Reference xFactory(xContext->getServiceManager(), uno::UNO_QUERY_THROW ); if (::ucbhelper::ContentBroker::initialize(xServiceFactory, aUcbInitSequence)) { +#ifdef DEBUG_ELEMENT + writerfilter::TagLogger::Pointer_t debugLogger + (writerfilter::TagLogger::getInstance("DEBUG")); + debugLogger->startDocument(); +#endif + rtl::OUString arg=aArguments[0]; ::comphelper::setProcessServiceFactory(xServiceFactory); @@ -136,6 +143,11 @@ sal_Int32 SAL_CALL ScannerTestService::run( const uno::Sequence< rtl::OUString > Stream::Pointer_t pStream = createStreamHandler(); pDocument->resolve(*pStream); +#ifdef DEBUG_ELEMENT + writerfilter::TagLogger::dump("DEBUG"); + debugLogger->endDocument(); +#endif + ::ucbhelper::ContentBroker::deinitialize(); } else diff --git a/writerfilter/util/exports.map b/writerfilter/util/exports.map deleted file mode 100644 index be4802aef7ab..000000000000 --- a/writerfilter/util/exports.map +++ /dev/null @@ -1,9 +0,0 @@ -WFT_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -}; - diff --git a/writerfilter/util/makefile.mk b/writerfilter/util/makefile.mk index c9736f4167d7..f5981222743c 100644 --- a/writerfilter/util/makefile.mk +++ b/writerfilter/util/makefile.mk @@ -66,7 +66,7 @@ SHL1STDLIBS=\ SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) diff --git a/writerperfect/util/makefile.mk b/writerperfect/util/makefile.mk index 4da935247054..dca29e005287 100644 --- a/writerperfect/util/makefile.mk +++ b/writerperfect/util/makefile.mk @@ -39,7 +39,7 @@ SHL1STDLIBS+= \ SHL1TARGET = wpft$(DLLPOSTFIX) SHL1IMPLIB = i$(SHL1TARGET) SHL1LIBS = $(LIB1TARGET) -SHL1VERSIONMAP=wpft.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map DEF1NAME=$(SHL1TARGET) .INCLUDE : target.mk diff --git a/writerperfect/util/wpft.map b/writerperfect/util/wpft.map deleted file mode 100644 index 7152f7ebd013..000000000000 --- a/writerperfect/util/wpft.map +++ /dev/null @@ -1,8 +0,0 @@ -WPFT_1_0 { - global: - component_getImplementationEnvironment; - component_writeInfo; - component_getFactory; - local: - *; -};