diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-05-11 20:59:39 +0200 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-05-11 20:59:39 +0200 |
commit | cce3c8de94bdf5bdbd1781c8d54b7bb717b6f8a3 (patch) | |
tree | a81637d549e9c279995129b712763a00312ac8c2 /filter | |
parent | 28d10a27cf288cb8c963e2ba0c0707aedd4f4719 (diff) | |
parent | 17e7675fe6fccf5a0f084bb9f7bceb4f663f8e3b (diff) |
rebased to DEV300_m77.
Diffstat (limited to 'filter')
63 files changed, 474 insertions, 351 deletions
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 <memory> #include <vector> +#include <boost/shared_ptr.hpp> #include <tools/solar.h> #include <tools/gen.hxx> #include <tools/list.hxx> @@ -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. + + 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. (!) - // 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 + @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 @@ <node oor:name="HTML (StarCalc)" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN</value></prop> - <prop oor:name="UIComponent"/> + <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN USEOPTIONS</value></prop> + <prop oor:name="UIComponent"><value>com.sun.star.comp.Calc.FilterOptionsDialog</value></prop> <prop oor:name="FilterService"/> <prop oor:name="UserData"><value></value></prop> <prop oor:name="FileFormatVersion"><value>0</value></prop> 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 @@ <node oor:name="calc_HTML_WebQuery" oor:op="replace"> - <prop oor:name="Flags"><value>IMPORT ALIEN</value></prop> - <prop oor:name="UIComponent"/> + <prop oor:name="Flags"><value>IMPORT ALIEN USEOPTIONS</value></prop> + <prop oor:name="UIComponent"><value>com.sun.star.comp.Calc.FilterOptionsDialog</value></prop> <prop oor:name="FilterService"/> <prop oor:name="UserData"><value></value></prop> <prop oor:name="FileFormatVersion"><value>0</value></prop> 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 @@ <node oor:name="writerglobal8_writer" oor:op="replace"> - <prop oor:name="Flags"><value>EXPORT TEMPLATE</value></prop> + <prop oor:name="Flags"><value>EXPORT TEMPLATE DEFAULT</value></prop> <prop oor:name="UIComponent"/> <prop oor:name="FilterService"/> <prop oor:name="UserData"><value>CXML</value></prop> 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 @@ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop> <prop oor:name="URLPattern"/> <prop oor:name="Extensions"><value>pcd</value></prop> - <prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>> + <prop oor:name="MediaType"><value>image/x-photo-cd</value></prop> <prop oor:name="Preferred"><value>false</value></prop> <prop oor:name="PreferredFilter"><value>draw_PCD_Photo_CD_Base</value></prop> <prop oor:name="UIName"> 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 @@ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop> <prop oor:name="URLPattern"/> <prop oor:name="Extensions"><value>pcd</value></prop> - <prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>> + <prop oor:name="MediaType"><value>image/x-photo-cd</value></prop> <prop oor:name="Preferred"><value>false</value></prop> <prop oor:name="PreferredFilter"><value>draw_PCD_Photo_CD_Base16</value></prop> <prop oor:name="UIName"> 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 @@ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop> <prop oor:name="URLPattern"/> <prop oor:name="Extensions"><value>pcd</value></prop> - <prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>> + <prop oor:name="MediaType"><value>image/x-photo-cd</value></prop> <prop oor:name="Preferred"><value>false</value></prop> <prop oor:name="PreferredFilter"><value>draw_PCD_Photo_CD_Base4</value></prop> <prop oor:name="UIName"> 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 @@ <prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop> <prop oor:name="URLPattern"/> <prop oor:name="Extensions"><value>svm</value></prop> - <prop oor:name="MediaType"><value>image/x-svm</value></prop>> + <prop oor:name="MediaType"><value>image/x-svm</value></prop> <prop oor:name="Preferred"><value>false</value></prop> <prop oor:name="PreferredFilter"><value>SVM - StarView Metafile</value></prop> <prop oor:name="UIName"> 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 += "<!DOCTYPE oor:component-data SYSTEM \"../../../../component-update.dtd\">\n" sHeader += "<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:package=\"" sHeader += sPath sHeader += "\" oor:name=\"" diff --git a/filter/source/flash/exports.map b/filter/source/flash/exports.map deleted file mode 100644 index ebfdcf95c118..000000000000 --- a/filter/source/flash/exports.map +++ /dev/null @@ -1,9 +0,0 @@ -FLASH_1_0 { - global: - component_getImplementationEnvironment; - component_getFactory; - component_writeInfo; - - local: - *; -}; diff --git a/filter/source/flash/makefile.mk b/filter/source/flash/makefile.mk index 171f7901cbaa..e5ff1bf21c5e 100644 --- a/filter/source/flash/makefile.mk +++ b/filter/source/flash/makefile.mk @@ -86,7 +86,7 @@ SHL1STDLIBS+=\ SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) -SHL1VERSIONMAP=exports.map +SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1LIBS= $(SLB)$/$(TARGET).lib SHL1DEF= $(MISC)$/$(SHL1TARGET).def diff --git a/filter/source/graphicfilter/egif/exports.map b/filter/source/graphicfilter/egif/exports.map index 10820132c0ce..61e4682c6551 100644 --- a/filter/source/graphicfilter/egif/exports.map +++ b/filter/source/graphicfilter/egif/exports.map @@ -1,4 +1,4 @@ -GIFEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/filter/source/graphicfilter/eos2met/exports.map b/filter/source/graphicfilter/eos2met/exports.map index ce76d3850094..61e4682c6551 100644 --- a/filter/source/graphicfilter/eos2met/exports.map +++ b/filter/source/graphicfilter/eos2met/exports.map @@ -1,4 +1,4 @@ -METEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/filter/source/graphicfilter/epbm/exports.map b/filter/source/graphicfilter/epbm/exports.map index 2d09b0bdb752..61e4682c6551 100644 --- a/filter/source/graphicfilter/epbm/exports.map +++ b/filter/source/graphicfilter/epbm/exports.map @@ -1,4 +1,4 @@ -PBMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/filter/source/graphicfilter/epgm/exports.map b/filter/source/graphicfilter/epgm/exports.map index 3967c4684f05..61e4682c6551 100644 --- a/filter/source/graphicfilter/epgm/exports.map +++ b/filter/source/graphicfilter/epgm/exports.map @@ -1,4 +1,4 @@ -PGMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/filter/source/graphicfilter/epict/exports.map b/filter/source/graphicfilter/epict/exports.map index 2f21c5c04b53..61e4682c6551 100644 --- a/filter/source/graphicfilter/epict/exports.map +++ b/filter/source/graphicfilter/epict/exports.map @@ -1,4 +1,4 @@ -PICTEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/filter/source/graphicfilter/eppm/exports.map b/filter/source/graphicfilter/eppm/exports.map index 0462b75b7b43..61e4682c6551 100644 --- a/filter/source/graphicfilter/eppm/exports.map +++ b/filter/source/graphicfilter/eppm/exports.map @@ -1,4 +1,4 @@ -PPMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/filter/source/graphicfilter/eps/exports.map b/filter/source/graphicfilter/eps/exports.map index 1b61354c2869..61e4682c6551 100644 --- a/filter/source/graphicfilter/eps/exports.map +++ b/filter/source/graphicfilter/eps/exports.map @@ -1,4 +1,4 @@ -EPSEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; DoExportDialog; diff --git a/filter/source/graphicfilter/eras/exports.map b/filter/source/graphicfilter/eras/exports.map index 4a78a96ee951..d4e28c44700c 100644 --- a/filter/source/graphicfilter/eras/exports.map +++ b/filter/source/graphicfilter/eras/exports.map @@ -1,4 +1,4 @@ -RASEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; diff --git a/filter/source/graphicfilter/etiff/exports.map b/filter/source/graphicfilter/etiff/exports.map index 094e72c0f5fb..d4e28c44700c 100644 --- a/filter/source/graphicfilter/etiff/exports.map +++ b/filter/source/graphicfilter/etiff/exports.map @@ -1,4 +1,4 @@ -TIFEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; diff --git a/filter/source/graphicfilter/expm/exports.map b/filter/source/graphicfilter/expm/exports.map index f1f42312c802..d4e28c44700c 100644 --- a/filter/source/graphicfilter/expm/exports.map +++ b/filter/source/graphicfilter/expm/exports.map @@ -1,4 +1,4 @@ -XPMEXPORTER_1_0 { +UDK_3_0_0 { global: GraphicExport; diff --git a/filter/source/graphicfilter/icgm/exports.map b/filter/source/graphicfilter/icgm/exports.map index eaa1db885d5e..cc7f07dd1112 100644 --- a/filter/source/graphicfilter/icgm/exports.map +++ b/filter/source/graphicfilter/icgm/exports.map @@ -1,4 +1,4 @@ -CGMIMPORTER_1_0 { +UDK_3_0_0 { global: ImportCGM; diff --git a/filter/source/graphicfilter/idxf/exports.map b/filter/source/graphicfilter/idxf/exports.map index d107435568e5..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/idxf/exports.map +++ b/filter/source/graphicfilter/idxf/exports.map @@ -1,4 +1,4 @@ -DXFIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/ieps/exports.map b/filter/source/graphicfilter/ieps/exports.map index 59406d7255ef..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/ieps/exports.map +++ b/filter/source/graphicfilter/ieps/exports.map @@ -1,4 +1,4 @@ -EPSIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/ios2met/exports.map b/filter/source/graphicfilter/ios2met/exports.map index 440afa9245d8..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/ios2met/exports.map +++ b/filter/source/graphicfilter/ios2met/exports.map @@ -1,4 +1,4 @@ -METIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/ipbm/exports.map b/filter/source/graphicfilter/ipbm/exports.map index 0e2a1bcdec9d..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/ipbm/exports.map +++ b/filter/source/graphicfilter/ipbm/exports.map @@ -1,4 +1,4 @@ -PBMIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/ipcd/exports.map b/filter/source/graphicfilter/ipcd/exports.map index a0719af28be2..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/ipcd/exports.map +++ b/filter/source/graphicfilter/ipcd/exports.map @@ -1,4 +1,4 @@ -PCDIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/ipcx/exports.map b/filter/source/graphicfilter/ipcx/exports.map index d44f79111a96..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/ipcx/exports.map +++ b/filter/source/graphicfilter/ipcx/exports.map @@ -1,4 +1,4 @@ -PCXIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/ipict/exports.map b/filter/source/graphicfilter/ipict/exports.map index 2576cecdca91..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/ipict/exports.map +++ b/filter/source/graphicfilter/ipict/exports.map @@ -1,4 +1,4 @@ -PICTIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/ipsd/exports.map b/filter/source/graphicfilter/ipsd/exports.map index b2cda91bec78..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/ipsd/exports.map +++ b/filter/source/graphicfilter/ipsd/exports.map @@ -1,4 +1,4 @@ -PSDIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/iras/exports.map b/filter/source/graphicfilter/iras/exports.map index ebd8464837fa..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/iras/exports.map +++ b/filter/source/graphicfilter/iras/exports.map @@ -1,4 +1,4 @@ -RASIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/itga/exports.map b/filter/source/graphicfilter/itga/exports.map index cb127f330e5d..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/itga/exports.map +++ b/filter/source/graphicfilter/itga/exports.map @@ -1,4 +1,4 @@ -TGAIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/graphicfilter/itiff/exports.map b/filter/source/graphicfilter/itiff/exports.map index 983df223406e..941e4ab9bde8 100644 --- a/filter/source/graphicfilter/itiff/exports.map +++ b/filter/source/graphicfilter/itiff/exports.map @@ -1,4 +1,4 @@ -TIFIMPORTER_1_0 { +UDK_3_0_0 { global: GraphicImport; diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 10e1051eba2a..ff5be3476da7 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -3669,13 +3669,13 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM // record type *pMergePicStreamBSE >> 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 ) { @@ -4290,63 +4290,189 @@ 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 <svtools/filter.hxx> #include <svl/solar.hrc> #include <comphelper/string.hxx> +#include "basegfx/polygon/b2dpolygon.hxx" +#include "basegfx/polygon/b2dpolypolygon.hxx" +#include "basegfx/polygon/b2dpolygontools.hxx" #include <unotools/saveopt.hxx> // 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 |