diff --git a/filter/inc/filter.hrc b/filter/inc/filter.hrc index 60d626379b1b..4bea3330f617 100644 --- a/filter/inc/filter.hrc +++ b/filter/inc/filter.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filter.hrc,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -33,10 +30,7 @@ // include --------------------------------------------------------------- - -#ifndef _SOLAR_HRC #include -#endif // Help-Ids -------------------------------------------------------------- @@ -46,8 +40,20 @@ #define RID_XSLT_DIALOG_END (RID_FILTER_START + 69) #define RID_PDF_OLD_EXPORT_DLG (RID_FILTER_START + 70) -// warning, next range is RID_FILTER_START + 100 ! +#define DLG_EXPORT_EPCT (RID_GOODIES_START+ 0) +#define DLG_EXPORT_GIF (RID_GOODIES_START+ 1) +#define DLG_EXPORT_EMET (RID_GOODIES_START+ 2) +#define DLG_EXPORT_JPG (RID_GOODIES_START+ 3) +#define DLG_IMPORT_PCD (RID_GOODIES_START+ 4) +#define DLG_EXPORT_EPNG (RID_GOODIES_START+ 5) +#define DLG_EXPORT_EPS (RID_GOODIES_START+ 8) +#define DLG_EXPORT_EPBM (RID_GOODIES_START+ 9) +#define DLG_EXPORT_EPGM (RID_GOODIES_START+ 10) +#define DLG_EXPORT_EPPM (RID_GOODIES_START+ 11) +#define DLG_SSL_NEWCERT (RID_GOODIES_START+ 12) +#define DLG_SSL_INFCERT (RID_GOODIES_START+ 13) +// warning, next range is RID_FILTER_START + 100 ! #define HID_FILTER_XSLT_START (HID_FILTER_START + 0) // see source/xsltdialog/xmlfilterhelpids.hrc for range #define HID_FILTER_XSLT_END (HID_FILTER_START + 99) diff --git a/filter/inc/filter/msfilter/countryid.hxx b/filter/inc/filter/msfilter/countryid.hxx index 0c66f1bf546c..f33b2fe6b5ac 100644 --- a/filter/inc/filter/msfilter/countryid.hxx +++ b/filter/inc/filter/msfilter/countryid.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: countryid.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/filter/msfilter/escherex.hxx b/filter/inc/filter/msfilter/escherex.hxx index fc36208d1207..b98f5dc85147 100644 --- a/filter/inc/filter/msfilter/escherex.hxx +++ b/filter/inc/filter/msfilter/escherex.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: escherex.hxx,v $ - * $Revision: 1.6.146.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -31,13 +28,15 @@ #ifndef _SVX_ESCHEREX_HXX #define _SVX_ESCHEREX_HXX +#include #include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -948,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 { @@ -964,6 +963,7 @@ namespace com { namespace sun { namespace star { namespace drawing { struct EnhancedCustomShapeAdjustmentValue; class XShape; + class XShapes; } }}} @@ -1033,13 +1033,11 @@ struct EscherPersistEntry // --------------------------------------------------------------------------------------------- -class SvMemoryStream; class EscherBlibEntry { friend class EscherGraphicProvider; friend class EscherEx; - friend class _EscherEx; protected: @@ -1347,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. @@ -1401,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 @@ -1443,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 ); @@ -1470,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. @@ -1494,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 @@ -1507,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/inc/filter/msfilter/mscodec.hxx b/filter/inc/filter/msfilter/mscodec.hxx index a42e360d0f96..7bad8af6b788 100644 --- a/filter/inc/filter/msfilter/mscodec.hxx +++ b/filter/inc/filter/msfilter/mscodec.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mscodec.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/filter/msfilter/msdffimp.hxx b/filter/inc/filter/msfilter/msdffimp.hxx index eadb6328b1de..4f11a4c2fab9 100644 --- a/filter/inc/filter/msfilter/msdffimp.hxx +++ b/filter/inc/filter/msfilter/msdffimp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msdffimp.hxx,v $ - * $Revision: 1.4.214.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/filter/msfilter/msfilterdllapi.h b/filter/inc/filter/msfilter/msfilterdllapi.h index ada4c8e853a9..28985f0c500f 100644 --- a/filter/inc/filter/msfilter/msfilterdllapi.h +++ b/filter/inc/filter/msfilter/msfilterdllapi.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: dllapi.h,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/filter/msfilter/msfiltertracer.hxx b/filter/inc/filter/msfilter/msfiltertracer.hxx index 13417175dc52..3b103e5be422 100644 --- a/filter/inc/filter/msfilter/msfiltertracer.hxx +++ b/filter/inc/filter/msfilter/msfiltertracer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msfiltertracer.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/filter/msfilter/msocximex.hxx b/filter/inc/filter/msfilter/msocximex.hxx index cf06e8378541..173835495b12 100644 --- a/filter/inc/filter/msfilter/msocximex.hxx +++ b/filter/inc/filter/msfilter/msocximex.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msocximex.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/filter/msfilter/msoleexp.hxx b/filter/inc/filter/msfilter/msoleexp.hxx index 8053928780f4..3cdbab6a9235 100644 --- a/filter/inc/filter/msfilter/msoleexp.hxx +++ b/filter/inc/filter/msfilter/msoleexp.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msoleexp.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/filter/msfilter/msvbahelper.hxx b/filter/inc/filter/msfilter/msvbahelper.hxx deleted file mode 100644 index 93f2de413291..000000000000 --- a/filter/inc/filter/msfilter/msvbahelper.hxx +++ /dev/null @@ -1,58 +0,0 @@ -/************************************************************************* - * - * 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 _MSVBAHELPER_HXX -#define _MSVBAHELPER_HXX - -#include -#include "filter/msfilter/msfilterdllapi.h" - -namespace ooo { namespace vba -{ - class MSFILTER_DLLPUBLIC VBAMacroResolvedInfo - { - SfxObjectShell* mpDocContext; - bool mbFound; - String msResolvedMacro; - public: - VBAMacroResolvedInfo() : mpDocContext(NULL), mbFound( false ){} - void SetResolved( bool bRes ) { mbFound = bRes; } - bool IsResolved() { return mbFound; } - void SetMacroDocContext(SfxObjectShell* pShell ) { mpDocContext = pShell; } - SfxObjectShell* MacroDocContext() { return mpDocContext; } - String ResolvedMacro() { return msResolvedMacro; } - void SetResolvedMacro(const String& sMacro ) { msResolvedMacro = sMacro; } - }; - - MSFILTER_DLLPUBLIC String makeMacroURL( const String& sMacroName ); - MSFILTER_DLLPUBLIC VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& sMod, bool bSearchGlobalTemplates = false ); - MSFILTER_DLLPUBLIC sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArgs, com::sun::star::uno::Any& aRet, const com::sun::star::uno::Any& aCaller ); -} } - -#endif diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx index 8d9b85c7301f..796ecc18cd3a 100644 --- a/filter/inc/filter/msfilter/svdfppt.hxx +++ b/filter/inc/filter/msfilter/svdfppt.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svdfppt.hxx,v $ - * $Revision: 1.7.6.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -39,14 +36,14 @@ #include #include #include -#include -#include +#include +#include #include // Escher-Grafikimport #include #include -#include +#include #define ITEMID_FIELD EE_FEATURE_FIELD -#include +#include #undef ITEMID_FIELD #include "filter/msfilter/msfilterdllapi.h" #include diff --git a/filter/inc/filter/msfilter/svxmsbas.hxx b/filter/inc/filter/msfilter/svxmsbas.hxx index 641d71e3ac2d..f488017e4804 100644 --- a/filter/inc/filter/msfilter/svxmsbas.hxx +++ b/filter/inc/filter/msfilter/svxmsbas.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxmsbas.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/makefile.mk b/filter/inc/makefile.mk index ccb616d8e94c..ae44f91ba667 100644 --- a/filter/inc/makefile.mk +++ b/filter/inc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/pch/precompiled_filter.cxx b/filter/inc/pch/precompiled_filter.cxx index a118d543d0bb..c2c7f32127b9 100644 --- a/filter/inc/pch/precompiled_filter.cxx +++ b/filter/inc/pch/precompiled_filter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_filter.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/inc/pch/precompiled_filter.hxx b/filter/inc/pch/precompiled_filter.hxx index c68e8c3a32e5..3220aa3f6e4c 100644 --- a/filter/inc/pch/precompiled_filter.hxx +++ b/filter/inc/pch/precompiled_filter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: precompiled_filter.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/prj/build.lst b/filter/prj/build.lst index a497bf4c3715..b4be1c83e63e 100644 --- a/filter/prj/build.lst +++ b/filter/prj/build.lst @@ -1,4 +1,4 @@ -fl filter : l10n svtools unotools goodies xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt NULL +fl filter : vbahelper l10n svtools unotools xmloff cppu tools cppuhelper sal svx javaunohelper XPDF:xpdf jvmaccess canvas SAXON:saxon LIBXSLT:libxslt NULL fl filter usr1 - all fl_mkout NULL fl filter\prj get - all fl_prj NULL fl filter\inc nmake - all fl_inc NULL @@ -16,6 +16,28 @@ fl filter\source\xsltvalidate nmake - all fl_xsltvalidate fl_xsltfilter fl_in fl filter\source\xsltdialog nmake - all fl_xsltdialog fl_flash fl_inc NULL fl filter\source\docbook nmake - all fl_docbook fl_inc NULL fl filter\source\t602 nmake - all fl_t602 fl_inc NULL +fl filter\source\graphicfilter\eos2met nmake - all g_vfeom fl_inc NULL +fl filter\source\graphicfilter\ios2met nmake - all g_vfiom fl_inc NULL +fl filter\source\graphicfilter\epict nmake - all g_vfept fl_inc NULL +fl filter\source\graphicfilter\egif nmake - all g_vfegf fl_inc NULL +fl filter\source\graphicfilter\ipcd nmake - all g_vfipc fl_inc NULL +fl filter\source\graphicfilter\ipcx nmake - all g_vfipx fl_inc NULL +fl filter\source\graphicfilter\ipict nmake - all g_vfipt fl_inc NULL +fl filter\source\graphicfilter\idxf nmake - all g_vfidx fl_inc NULL +fl filter\source\graphicfilter\itiff nmake - all g_vfitf fl_inc NULL +fl filter\source\graphicfilter\ipbm nmake - all g_vfpbm fl_inc NULL +fl filter\source\graphicfilter\epbm nmake - all g_epbm fl_inc NULL +fl filter\source\graphicfilter\epgm nmake - all g_epgm fl_inc NULL +fl filter\source\graphicfilter\eppm nmake - all g_eppm fl_inc NULL +fl filter\source\graphicfilter\iras nmake - all g_iras fl_inc NULL +fl filter\source\graphicfilter\expm nmake - all g_expm fl_inc NULL +fl filter\source\graphicfilter\eras nmake - all g_eras fl_inc NULL +fl filter\source\graphicfilter\etiff nmake - all g_etiff fl_inc NULL +fl filter\source\graphicfilter\eps nmake - all g_eps fl_inc NULL +fl filter\source\graphicfilter\itga nmake - all g_itga fl_inc NULL +fl filter\source\graphicfilter\ipsd nmake - all g_ipsd fl_inc NULL +fl filter\source\graphicfilter\ieps nmake - all g_ieps fl_inc NULL +fl filter\source\graphicfilter\icgm nmake - all g_icgm fl_inc NULL fl filter\source\config\cache nmake - all fl_config fl_inc NULL fl filter\source\config\fragments\types nmake - all fl_fcfg_fragments_types fl_inc NULL fl filter\source\config\fragments\filters nmake - all fl_fcfg_fragments_filters fl_inc NULL diff --git a/filter/qa/complex/filter/detection/typeDetection/Helper.java b/filter/qa/complex/filter/detection/typeDetection/Helper.java index 713d0befe98c..4c282f55182e 100644 --- a/filter/qa/complex/filter/detection/typeDetection/Helper.java +++ b/filter/qa/complex/filter/detection/typeDetection/Helper.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Helper.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java index 423d6fe166d1..f706c4136118 100644 --- a/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java +++ b/filter/qa/complex/filter/detection/typeDetection/TypeDetection.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TypeDetection.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/qa/complex/filter/detection/typeDetection/makefile.mk b/filter/qa/complex/filter/detection/typeDetection/makefile.mk index dea5044fb60c..942c40372de4 100644 --- a/filter/qa/complex/filter/detection/typeDetection/makefile.mk +++ b/filter/qa/complex/filter/detection/typeDetection/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.9.102.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -85,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 @@ -113,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/qa/complex/filter/misc/FinalizedMandatoryTest.java b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java index 9c2384887a80..e32b81caa85b 100644 --- a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java +++ b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FinalizedMandatoryTest.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/qa/complex/filter/misc/makefile.mk b/filter/qa/complex/filter/misc/makefile.mk index 0dd1c433b28c..2792b2438b6e 100755 --- a/filter/qa/complex/filter/misc/makefile.mk +++ b/filter/qa/complex/filter/misc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7.102.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index c1f61eb6948b..800876ce1abd 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: basecontainer.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/basecontainer.hxx b/filter/source/config/cache/basecontainer.hxx index 66d2ba4873ff..e3730ce662e4 100644 --- a/filter/source/config/cache/basecontainer.hxx +++ b/filter/source/config/cache/basecontainer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: basecontainer.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/cacheitem.cxx b/filter/source/config/cache/cacheitem.cxx index c06bb3c53cc1..c752516df10f 100644 --- a/filter/source/config/cache/cacheitem.cxx +++ b/filter/source/config/cache/cacheitem.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cacheitem.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/cacheitem.hxx b/filter/source/config/cache/cacheitem.hxx index 3a24fcfa02ce..793a5f370cf9 100644 --- a/filter/source/config/cache/cacheitem.hxx +++ b/filter/source/config/cache/cacheitem.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cacheitem.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/cacheupdatelistener.cxx b/filter/source/config/cache/cacheupdatelistener.cxx index fe262661912c..90bd89c9d864 100644 --- a/filter/source/config/cache/cacheupdatelistener.cxx +++ b/filter/source/config/cache/cacheupdatelistener.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cacheupdatelistener.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/cacheupdatelistener.hxx b/filter/source/config/cache/cacheupdatelistener.hxx index 8cec199718e9..8e75e4304bf2 100644 --- a/filter/source/config/cache/cacheupdatelistener.hxx +++ b/filter/source/config/cache/cacheupdatelistener.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: cacheupdatelistener.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/configflush.cxx b/filter/source/config/cache/configflush.cxx index 6efc0912386f..e97df2a7f40d 100644 --- a/filter/source/config/cache/configflush.cxx +++ b/filter/source/config/cache/configflush.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: configflush.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/configflush.hxx b/filter/source/config/cache/configflush.hxx index b8cc0f7ae07c..477d7017ca35 100644 --- a/filter/source/config/cache/configflush.hxx +++ b/filter/source/config/cache/configflush.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: configflush.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/constant.hxx b/filter/source/config/cache/constant.hxx index 719cc620a579..827682e09cd9 100644 --- a/filter/source/config/cache/constant.hxx +++ b/filter/source/config/cache/constant.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: constant.hxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx index 32152a5d311d..3863658d9abb 100644 --- a/filter/source/config/cache/contenthandlerfactory.cxx +++ b/filter/source/config/cache/contenthandlerfactory.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: contenthandlerfactory.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/contenthandlerfactory.hxx b/filter/source/config/cache/contenthandlerfactory.hxx index 8b91f9892bf8..a50f91c0b61e 100644 --- a/filter/source/config/cache/contenthandlerfactory.hxx +++ b/filter/source/config/cache/contenthandlerfactory.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: contenthandlerfactory.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 61790685a14b..43886258abcd 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filtercache.cxx,v $ - * $Revision: 1.26 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -2456,6 +2453,7 @@ OUStringList FilterCache::impl_tokenizeString(const ::rtl::OUString& sData , return lData; } +#if OSL_DEBUG_LEVEL > 0 /*-----------------------------------------------*/ ::rtl::OUString FilterCache::impl_searchFrameLoaderForType(const ::rtl::OUString& sType) const { @@ -2493,6 +2491,7 @@ OUStringList FilterCache::impl_tokenizeString(const ::rtl::OUString& sData , return ::rtl::OUString(); } +#endif /*-----------------------------------------------*/ sal_Bool FilterCache::impl_isModuleInstalled(const ::rtl::OUString& sModule) diff --git a/filter/source/config/cache/filtercache.hxx b/filter/source/config/cache/filtercache.hxx index 90973c13a31b..0c0e34b2783b 100644 --- a/filter/source/config/cache/filtercache.hxx +++ b/filter/source/config/cache/filtercache.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filtercache.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -1022,9 +1019,11 @@ class FilterCache : public BaseLock //--------------------------------------- +#if OSL_DEBUG_LEVEL > 0 /** TODO */ ::rtl::OUString impl_searchFrameLoaderForType(const ::rtl::OUString& sType) const; ::rtl::OUString impl_searchContentHandlerForType(const ::rtl::OUString& sType) const; +#endif //--------------------------------------- /** @short check if the specified OOo module is installed. diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index 9d98a8078b04..dc7869be27ca 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filterfactory.cxx,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/filterfactory.hxx b/filter/source/config/cache/filterfactory.hxx index 5f553f8b40d7..2f0ba31f942b 100644 --- a/filter/source/config/cache/filterfactory.hxx +++ b/filter/source/config/cache/filterfactory.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filterfactory.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx index f178264da65b..3c9163899a97 100644 --- a/filter/source/config/cache/frameloaderfactory.cxx +++ b/filter/source/config/cache/frameloaderfactory.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frameloaderfactory.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/frameloaderfactory.hxx b/filter/source/config/cache/frameloaderfactory.hxx index e5ef80bfceaa..7741f0011f38 100644 --- a/filter/source/config/cache/frameloaderfactory.hxx +++ b/filter/source/config/cache/frameloaderfactory.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: frameloaderfactory.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/lateinitlistener.cxx b/filter/source/config/cache/lateinitlistener.cxx index c1999cb4a72e..b9b090025227 100644 --- a/filter/source/config/cache/lateinitlistener.cxx +++ b/filter/source/config/cache/lateinitlistener.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: lateinitlistener.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -59,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")), @@ -67,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 ); } /*----------------------------------------------- @@ -95,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/lateinitlistener.hxx b/filter/source/config/cache/lateinitlistener.hxx index 889f6146ca6a..0ed1abf1e679 100644 --- a/filter/source/config/cache/lateinitlistener.hxx +++ b/filter/source/config/cache/lateinitlistener.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: lateinitlistener.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/lateinitthread.cxx b/filter/source/config/cache/lateinitthread.cxx index e7bee1882487..13432c30ad0f 100644 --- a/filter/source/config/cache/lateinitthread.cxx +++ b/filter/source/config/cache/lateinitthread.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: lateinitthread.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/lateinitthread.hxx b/filter/source/config/cache/lateinitthread.hxx index 43f4f18d5c9f..c330394d434d 100644 --- a/filter/source/config/cache/lateinitthread.hxx +++ b/filter/source/config/cache/lateinitthread.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: lateinitthread.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/macros.hxx b/filter/source/config/cache/macros.hxx index d78969b0fbde..485029ead5a8 100644 --- a/filter/source/config/cache/macros.hxx +++ b/filter/source/config/cache/macros.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: macros.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/makefile.mk b/filter/source/config/cache/makefile.mk index 50ef0c73a03a..fbc4806b0a32 100644 --- a/filter/source/config/cache/makefile.mk +++ b/filter/source/config/cache/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -76,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/cache/querytokenizer.cxx b/filter/source/config/cache/querytokenizer.cxx index dfbad37ba3a0..a07a95e37d23 100644 --- a/filter/source/config/cache/querytokenizer.cxx +++ b/filter/source/config/cache/querytokenizer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: querytokenizer.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/querytokenizer.hxx b/filter/source/config/cache/querytokenizer.hxx index 01c8d9a2657d..0823e49f5616 100644 --- a/filter/source/config/cache/querytokenizer.hxx +++ b/filter/source/config/cache/querytokenizer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: querytokenizer.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/registration.cxx b/filter/source/config/cache/registration.cxx index 31aa67abfc4a..a65f5c42fea8 100644 --- a/filter/source/config/cache/registration.cxx +++ b/filter/source/config/cache/registration.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: registration.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/registration.hxx b/filter/source/config/cache/registration.hxx index 9a925727fa5d..38e5980c967a 100644 --- a/filter/source/config/cache/registration.hxx +++ b/filter/source/config/cache/registration.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: registration.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 0f094634766c..4fe9a1df64e6 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: typedetection.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/typedetection.hxx b/filter/source/config/cache/typedetection.hxx index 381f3cf4802a..4dbf6f07d33e 100644 --- a/filter/source/config/cache/typedetection.hxx +++ b/filter/source/config/cache/typedetection.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: typedetection.hxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/cache/versions.hxx b/filter/source/config/cache/versions.hxx index fcf6fd079ed0..fbd92604170f 100644 --- a/filter/source/config/cache/versions.hxx +++ b/filter/source/config/cache/versions.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: versions.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/makefile.mk b/filter/source/config/fragments/filters/makefile.mk index e3696c0d9d24..2c557906df29 100644 --- a/filter/source/config/fragments/filters/makefile.mk +++ b/filter/source/config/fragments/filters/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.9 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify 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 6503062bc654..d827b3496359 100644 --- a/filter/source/config/fragments/makefile.mk +++ b/filter/source/config/fragments/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.22 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -191,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/packagedef.mk b/filter/source/config/fragments/packagedef.mk index 75600489d4da..fda7b4a6cc60 100644 --- a/filter/source/config/fragments/packagedef.mk +++ b/filter/source/config/fragments/packagedef.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: packagedef.mk,v $ -# -# $Revision: 1.9 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/config/fragments/types/makefile.mk b/filter/source/config/fragments/types/makefile.mk index 371a777537b8..67ad14b038a2 100644 --- a/filter/source/config/fragments/types/makefile.mk +++ b/filter/source/config/fragments/types/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify 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 += " for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/docbook/makefile.mk b/filter/source/docbook/makefile.mk index 319a6d97d951..b3b43d5cbd02 100644 --- a/filter/source/docbook/makefile.mk +++ b/filter/source/docbook/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/docbook/sofftodocbookheadings.xsl b/filter/source/docbook/sofftodocbookheadings.xsl index b91a7d3e3011..bc9b67a9a340 100644 --- a/filter/source/docbook/sofftodocbookheadings.xsl +++ b/filter/source/docbook/sofftodocbookheadings.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: sofftodocbookheadings.xsl,v $ - - $Revision: 1.11 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/filtertracer/filtertracer.cxx b/filter/source/filtertracer/filtertracer.cxx index b8f7de0b3096..328917c24036 100644 --- a/filter/source/filtertracer/filtertracer.cxx +++ b/filter/source/filtertracer/filtertracer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filtertracer.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/filtertracer/filtertracer.hxx b/filter/source/filtertracer/filtertracer.hxx index 3ba5b4dbfda5..65e5677f2478 100644 --- a/filter/source/filtertracer/filtertracer.hxx +++ b/filter/source/filtertracer/filtertracer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filtertracer.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/filtertracer/filtertraceruno.cxx b/filter/source/filtertracer/filtertraceruno.cxx index 1a4f51216004..f2254c8256f9 100644 --- a/filter/source/filtertracer/filtertraceruno.cxx +++ b/filter/source/filtertracer/filtertraceruno.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filtertraceruno.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/filtertracer/makefile.mk b/filter/source/filtertracer/makefile.mk index 6643171b5722..4a4c143c4a4a 100644 --- a/filter/source/filtertracer/makefile.mk +++ b/filter/source/filtertracer/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify 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/impswfdialog.cxx b/filter/source/flash/impswfdialog.cxx index 196b866f427e..0efde8182448 100644 --- a/filter/source/flash/impswfdialog.cxx +++ b/filter/source/flash/impswfdialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impswfdialog.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/impswfdialog.hrc b/filter/source/flash/impswfdialog.hrc index 1fc0dff0a6f9..7683af33a4c4 100644 --- a/filter/source/flash/impswfdialog.hrc +++ b/filter/source/flash/impswfdialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impswfdialog.hrc,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/impswfdialog.hxx b/filter/source/flash/impswfdialog.hxx index bb857c18b906..2b32bb935863 100644 --- a/filter/source/flash/impswfdialog.hxx +++ b/filter/source/flash/impswfdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impswfdialog.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/impswfdialog.src b/filter/source/flash/impswfdialog.src index 0be7fb594bae..3e38dde68441 100644 --- a/filter/source/flash/impswfdialog.src +++ b/filter/source/flash/impswfdialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impswfdialog.src,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/makefile.mk b/filter/source/flash/makefile.mk index d544921f40cd..e5ff1bf21c5e 100644 --- a/filter/source/flash/makefile.mk +++ b/filter/source/flash/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.16 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -90,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/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx index 5e036df696e6..20a541564445 100644 --- a/filter/source/flash/swfdialog.cxx +++ b/filter/source/flash/swfdialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfdialog.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/swfdialog.hxx b/filter/source/flash/swfdialog.hxx index 88136001b94e..fd0ead0a58c2 100644 --- a/filter/source/flash/swfdialog.hxx +++ b/filter/source/flash/swfdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfdialog.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/swfexporter.cxx b/filter/source/flash/swfexporter.cxx index e597f4a2fdf8..7157a9c85c06 100644 --- a/filter/source/flash/swfexporter.cxx +++ b/filter/source/flash/swfexporter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfexporter.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -94,13 +91,14 @@ PageInfo::~PageInfo() } } +#ifdef THEFUTURE // ----------------------------------------------------------------------------- void PageInfo::addShape( ShapeInfo* pShapeInfo ) { maShapesVector.push_back( pShapeInfo ); } - +#endif // ----------------------------------------------------------------------------- diff --git a/filter/source/flash/swfexporter.hxx b/filter/source/flash/swfexporter.hxx index f2be52a3133b..356eaa1954e1 100644 --- a/filter/source/flash/swfexporter.hxx +++ b/filter/source/flash/swfexporter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfexporter.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -147,7 +144,9 @@ struct PageInfo PageInfo(); ~PageInfo(); +#ifdef THEFUTURE void addShape( ShapeInfo* pShapeInfo ); +#endif }; diff --git a/filter/source/flash/swffilter.cxx b/filter/source/flash/swffilter.cxx index c13aef97a560..03d9d003c30d 100644 --- a/filter/source/flash/swffilter.cxx +++ b/filter/source/flash/swffilter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swffilter.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/swfuno.cxx b/filter/source/flash/swfuno.cxx index 9771c7daeb3c..d4a11ebb921b 100644 --- a/filter/source/flash/swfuno.cxx +++ b/filter/source/flash/swfuno.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfuno.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 968c7b513ea5..dcb6ff76721d 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfwriter.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -264,6 +261,7 @@ void Writer::placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int endTag(); } +#ifdef THEFUTURE // ----------------------------------------------------------------------------- void Writer::moveShape( sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y ) @@ -291,6 +289,7 @@ void Writer::moveShape( sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y ) endTag(); } +#endif // ----------------------------------------------------------------------------- diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index e8c75b8095b6..b3a5621b54e2 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfwriter.hxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -321,8 +318,10 @@ public: /** inserts a place shape tag into the movie stream or the current sprite */ void placeShape( sal_uInt16 nID, sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y, sal_uInt16 nClipDepth = 0, const char* pName = NULL ); +#ifdef THEFUTURE /** inserts a move shape tag into the movie stream or the current sprite */ void moveShape( sal_uInt16 nDepth, sal_Int32 x, sal_Int32 y ); +#endif /** inserts a remove shape tag into the movie stream or the current sprite */ void removeShape( sal_uInt16 nDepth ); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index ffe26c35699b..cce0314436f8 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfwriter1.cxx,v $ - * $Revision: 1.28 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index 891439668c91..a2638b13e629 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: swfwriter2.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/graphicfilter/egif/dlgegif.cxx b/filter/source/graphicfilter/egif/dlgegif.cxx new file mode 100644 index 000000000000..a9f1e60708b2 --- /dev/null +++ b/filter/source/graphicfilter/egif/dlgegif.cxx @@ -0,0 +1,108 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#ifndef GCC +#endif +#include +#include +#include +#include "dlgegif.hxx" +#include "dlgegif.hrc" +#include "strings.hrc" + +/************************************************************************* +|* +|* Ctor +|* +\************************************************************************/ + +DlgExportEGIF::DlgExportEGIF( FltCallDialogParameter& rPara ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_GIF, *rPara.pResMgr ) ), + rFltCallPara ( rPara ), + aCbxInterlaced ( this, ResId( CBX_INTERLACED, *rPara.pResMgr ) ), + aCbxTranslucent ( this, ResId( CBX_TRANSLUCENT, *rPara.pResMgr ) ), + aGrpMode ( this, ResId( GRP_MODE, *rPara.pResMgr ) ), + aGrpDraw ( this, ResId( GRP_DRAW, *rPara.pResMgr ) ), + aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + pMgr ( rPara.pResMgr ) +{ + FreeResource(); + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/GIF" ) ); + pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + + String aInterlaceStr( ResId( KEY_INTER, *pMgr ) ); + String aTranslucentStr( ResId( KEY_TRANS, *pMgr ) ); + // Config-Parameter lesen + sal_Bool bInterlaced = pConfigItem->ReadInt32( aInterlaceStr, 1 ) != 0; + sal_Bool bTranslucent = pConfigItem->ReadInt32( aTranslucentStr, 1 ) != 0; + + aCbxInterlaced.Check( bInterlaced ); + aCbxTranslucent.Check( bTranslucent ); + + aBtnOK.SetClickHdl( LINK( this, DlgExportEGIF, OK ) ); +} + +DlgExportEGIF::~DlgExportEGIF() +{ + delete pConfigItem; +} + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEGIF, OK, void *, EMPTYARG ) +{ + + // Config-Parameter schreiben + String aInterlaceStr( ResId( KEY_INTER, *pMgr ) ); + String aTranslucentStr( ResId( KEY_TRANS, *pMgr ) ); + + sal_Int32 nValue = 0; + if ( aCbxInterlaced.IsChecked() ) + nValue++; + pConfigItem->WriteInt32( aInterlaceStr, nValue ); + + nValue = 0; + if ( aCbxTranslucent.IsChecked() ) + nValue++; + pConfigItem->WriteInt32( aTranslucentStr, nValue ); + rFltCallPara.aFilterData = pConfigItem->GetFilterData(); + EndDialog( RET_OK ); + + return 0; +} + + + diff --git a/filter/source/graphicfilter/egif/dlgegif.hrc b/filter/source/graphicfilter/egif/dlgegif.hrc new file mode 100644 index 000000000000..a2f9f4feb488 --- /dev/null +++ b/filter/source/graphicfilter/egif/dlgegif.hrc @@ -0,0 +1,36 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "filter.hrc" + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define FI_DESCR 1 +#define GRP_MODE 1 +#define GRP_DRAW 2 +#define CBX_INTERLACED 1 +#define CBX_TRANSLUCENT 2 diff --git a/filter/source/graphicfilter/egif/dlgegif.hxx b/filter/source/graphicfilter/egif/dlgegif.hxx new file mode 100644 index 000000000000..0dbe48a065a3 --- /dev/null +++ b/filter/source/graphicfilter/egif/dlgegif.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DLGEGIF_HXX_ +#define _DLGEGIF_HXX_ + +#include +#include +#include +#include + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen +|* +\************************************************************************/ + +class FilterConfigItem; +class ResMgr; + +class DlgExportEGIF : public ModalDialog +{ +private: + + FltCallDialogParameter& rFltCallPara; + + CheckBox aCbxInterlaced; + CheckBox aCbxTranslucent; + FixedLine aGrpMode; + FixedLine aGrpDraw; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + FilterConfigItem* pConfigItem; + ResMgr* pMgr; + + DECL_LINK( OK, void * ); + +public: + DlgExportEGIF( FltCallDialogParameter& rPara ); + ~DlgExportEGIF(); +}; + +#endif // _DLGEGIF_HXX_ + diff --git a/filter/source/graphicfilter/egif/dlgegif.src b/filter/source/graphicfilter/egif/dlgegif.src new file mode 100644 index 000000000000..39f96bb7ac7a --- /dev/null +++ b/filter/source/graphicfilter/egif/dlgegif.src @@ -0,0 +1,118 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "dlgegif.hrc" +ModalDialog DLG_EXPORT_GIF +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 169 , 70 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + Text [ en-US ] = "GIF Options" ; + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 113 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 113 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 113 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + FixedLine GRP_MODE + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 100 , 8 ) ; + Text [ en-US ] = "Mode" ; + }; + CheckBox CBX_INTERLACED + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 86 , 12 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Interlaced" ; + }; + FixedLine GRP_DRAW + { + Pos = MAP_APPFONT ( 6 , 32 ) ; + Size = MAP_APPFONT ( 100 , 8 ) ; + Text [ en-US ] = "Drawing objects" ; + }; + CheckBox CBX_TRANSLUCENT + { + Pos = MAP_APPFONT ( 12 , 43 ) ; + Size = MAP_APPFONT ( 86 , 12 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Save ~transparency" ; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx new file mode 100644 index 000000000000..93f9f5ec0b15 --- /dev/null +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -0,0 +1,629 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include "giflzwc.hxx" +#include "strings.hrc" +#include "dlgegif.hrc" +#include "dlgegif.hxx" + +// ------------- +// - GIFWriter - +// ------------- + +class GIFWriter +{ + Bitmap aAccBmp; + BitmapReadAccess* pAcc; + SvStream* pGIF; + ULONG nMinPercent; + ULONG nMaxPercent; + ULONG nLastPercent; + long nActX; + long nActY; + sal_Int32 nInterlaced; + BOOL bStatus; + BOOL bTransparent; + + void MayCallback( ULONG nPercent ); + void WriteSignature( BOOL bGIF89a ); + void WriteGlobalHeader( const Size& rSize ); + void WriteLoopExtension( const Animation& rAnimation ); + void WriteLogSizeExtension( const Size& rSize100 ); + void WriteImageExtension( long nTimer, Disposal eDisposal ); + void WriteLocalHeader(); + void WritePalette(); + void WriteAccess(); + void WriteTerminator(); + + BOOL CreateAccess( const BitmapEx& rBmpEx ); + void DestroyAccess(); + + void WriteAnimation( const Animation& rAnimation ); + void WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint, BOOL bExtended, + long nTimer = 0, Disposal eDisposal = DISPOSE_NOT ); + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + +public: + + GIFWriter() {} + ~GIFWriter() {} + + BOOL WriteGIF( const Graphic& rGraphic, SvStream& rGIF, + FilterConfigItem* pConfigItem ); +}; + +// ------------------------------------------------------------------------ + +BOOL GIFWriter::WriteGIF( const Graphic& rGraphic, SvStream& rGIF, + FilterConfigItem* pFilterConfigItem ) +{ + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + Size aSize100; + const MapMode aMap( rGraphic.GetPrefMapMode() ); + BOOL bLogSize = ( aMap.GetMapUnit() != MAP_PIXEL ); + + if( bLogSize ) + aSize100 = Application::GetDefaultDevice()->LogicToLogic( rGraphic.GetPrefSize(), aMap, MAP_100TH_MM ); + + pGIF = &rGIF; + bStatus = TRUE; + nLastPercent = 0; + nInterlaced = 0; + pAcc = NULL; + + if ( pFilterConfigItem ) + nInterlaced = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Interlaced" ) ), 0 ); + + pGIF->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + + if( rGraphic.IsAnimated() ) + { + const Animation& rAnimation = rGraphic.GetAnimation(); + + WriteSignature( TRUE ); + + if ( bStatus ) + { + WriteGlobalHeader( rAnimation.GetDisplaySizePixel() ); + + if( bStatus ) + { + WriteLoopExtension( rAnimation ); + + if( bStatus ) + WriteAnimation( rAnimation ); + } + } + } + else + { + const BOOL bGrafTrans = rGraphic.IsTransparent(); + + BitmapEx aBmpEx; + + if( bGrafTrans ) + aBmpEx = rGraphic.GetBitmapEx(); + else + aBmpEx = BitmapEx( rGraphic.GetBitmap() ); + + nMinPercent = 0; + nMaxPercent = 100; + + WriteSignature( bGrafTrans || bLogSize ); + + if( bStatus ) + { + WriteGlobalHeader( aBmpEx.GetSizePixel() ); + + if( bStatus ) + WriteBitmapEx( aBmpEx, Point(), bGrafTrans ); + } + } + + if( bStatus ) + { + if( bLogSize ) + WriteLogSizeExtension( aSize100 ); + + WriteTerminator(); + } + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return bStatus; +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteBitmapEx( const BitmapEx& rBmpEx, const Point& rPoint, + BOOL bExtended, long nTimer, Disposal eDisposal ) +{ + if( CreateAccess( rBmpEx ) ) + { + nActX = rPoint.X(); + nActY = rPoint.Y(); + + if( bExtended ) + WriteImageExtension( nTimer, eDisposal ); + + if( bStatus ) + { + WriteLocalHeader(); + + if( bStatus ) + { + WritePalette(); + + if( bStatus ) + WriteAccess(); + } + } + + DestroyAccess(); + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteAnimation( const Animation& rAnimation ) +{ + const USHORT nCount = rAnimation.Count(); + + if( nCount ) + { + const double fStep = 100. / nCount; + + nMinPercent = 0L; + nMaxPercent = (ULONG) fStep; + + for( USHORT i = 0; i < nCount; i++ ) + { + const AnimationBitmap& rAnimBmp = rAnimation.Get( i ); + + WriteBitmapEx( rAnimBmp.aBmpEx, rAnimBmp.aPosPix, TRUE, + rAnimBmp.nWait, rAnimBmp.eDisposal ); + nMinPercent = nMaxPercent; + nMaxPercent = (ULONG) ( nMaxPercent + fStep ); + } + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::MayCallback( ULONG nPercent ) +{ + if ( xStatusIndicator.is() ) + { + if( nPercent >= nLastPercent + 3 ) + { + nLastPercent = nPercent; + if ( nPercent <= 100 ) + xStatusIndicator->setValue( nPercent ); + } + } +} + +// ------------------------------------------------------------------------ + +BOOL GIFWriter::CreateAccess( const BitmapEx& rBmpEx ) +{ + if( bStatus ) + { + Bitmap aMask( rBmpEx.GetMask() ); + + aAccBmp = rBmpEx.GetBitmap(); + bTransparent = FALSE; + + if( !!aMask ) + { + if( aAccBmp.Convert( BMP_CONVERSION_8BIT_TRANS ) ) + { + aMask.Convert( BMP_CONVERSION_1BIT_THRESHOLD ); + aAccBmp.Replace( aMask, BMP_COL_TRANS ); + bTransparent = TRUE; + } + else + aAccBmp.Convert( BMP_CONVERSION_8BIT_COLORS ); + } + else + aAccBmp.Convert( BMP_CONVERSION_8BIT_COLORS ); + + pAcc = aAccBmp.AcquireReadAccess(); + + if( !pAcc ) + bStatus = FALSE; + } + + return bStatus; +} + +// ------------------------------------------------------------------------ + +void GIFWriter::DestroyAccess() +{ + aAccBmp.ReleaseAccess( pAcc ); + pAcc = NULL; +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteSignature( BOOL bGIF89a ) +{ + if( bStatus ) + { + pGIF->Write( bGIF89a ? "GIF89a" : "GIF87a" , 6 ); + + if( pGIF->GetError() ) + bStatus = FALSE; + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteGlobalHeader( const Size& rSize ) +{ + if( bStatus ) + { + // 256 Farben + const UINT16 nWidth = (UINT16) rSize.Width(); + const UINT16 nHeight = (UINT16) rSize.Height(); + const BYTE cFlags = 128 | ( 7 << 4 ); + + // Werte rausschreiben + *pGIF << nWidth; + *pGIF << nHeight; + *pGIF << cFlags; + *pGIF << (BYTE) 0x00; + *pGIF << (BYTE) 0x00; + + // Dummy-Palette mit zwei Eintraegen (Schwarz/Weiss) schreiben; + // dieses nur wegen Photoshop-Bug, da die keine Bilder ohne + // globale Farbpalette lesen koennen + *pGIF << (UINT16) 0; + *pGIF << (UINT16) 255; + *pGIF << (UINT16) 65535; + + if( pGIF->GetError() ) + bStatus = FALSE; + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteLoopExtension( const Animation& rAnimation ) +{ + DBG_ASSERT( rAnimation.Count() > 0, "Animation has no bitmaps!" ); + + USHORT nLoopCount = (USHORT) rAnimation.GetLoopCount(); + + // falls nur ein Durchlauf stattfinden soll, + // wird keine LoopExtension geschrieben; + // Default ist dann immer ein Durchlauf + if( nLoopCount != 1 ) + { + // Netscape interpretiert den LoopCount + // als reine Anzahl der _Wiederholungen_ + if( nLoopCount ) + nLoopCount--; + + const BYTE cLoByte = (const BYTE) nLoopCount; + const BYTE cHiByte = (const BYTE) ( nLoopCount >> 8 ); + + *pGIF << (BYTE) 0x21; + *pGIF << (BYTE) 0xff; + *pGIF << (BYTE) 0x0b; + pGIF->Write( "NETSCAPE2.0", 11 ); + *pGIF << (BYTE) 0x03; + *pGIF << (BYTE) 0x01; + *pGIF << cLoByte; + *pGIF << cHiByte; + *pGIF << (BYTE) 0x00; + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteLogSizeExtension( const Size& rSize100 ) +{ + // PrefSize in 100th-mm als ApplicationExtension schreiben + if( rSize100.Width() && rSize100.Height() ) + { + *pGIF << (BYTE) 0x21; + *pGIF << (BYTE) 0xff; + *pGIF << (BYTE) 0x0b; + pGIF->Write( "STARDIV 5.0", 11 ); + *pGIF << (BYTE) 0x09; + *pGIF << (BYTE) 0x01; + *pGIF << (UINT32) rSize100.Width(); + *pGIF << (UINT32) rSize100.Height(); + *pGIF << (BYTE) 0x00; + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteImageExtension( long nTimer, Disposal eDisposal ) +{ + if( bStatus ) + { + const UINT16 nDelay = (UINT16) nTimer; + BYTE cFlags = 0; + + // Transparent-Flag setzen + if( bTransparent ) + cFlags |= 1; + + // Disposal-Wert setzen + if( eDisposal == DISPOSE_BACK ) + cFlags |= ( 2 << 2 ); + else if( eDisposal == DISPOSE_PREVIOUS ) + cFlags |= ( 3 << 2 ); + + *pGIF << (BYTE) 0x21; + *pGIF << (BYTE) 0xf9; + *pGIF << (BYTE) 0x04; + *pGIF << cFlags; + *pGIF << nDelay; + *pGIF << (BYTE) pAcc->GetBestPaletteIndex( BMP_COL_TRANS ); + *pGIF << (BYTE) 0x00; + + if( pGIF->GetError() ) + bStatus = FALSE; + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteLocalHeader() +{ + if( bStatus ) + { + const UINT16 nPosX = (UINT16) nActX; + const UINT16 nPosY = (UINT16) nActY; + const UINT16 nWidth = (UINT16) pAcc->Width(); + const UINT16 nHeight = (UINT16) pAcc->Height(); + BYTE cFlags = (BYTE) ( pAcc->GetBitCount() - 1 ); + + // Interlaced-Flag setzen + if( nInterlaced ) + cFlags |= 0x40; + + // Flag fuer lokale Farbpalette setzen + cFlags |= 0x80; + + // alles rausschreiben + *pGIF << (BYTE) 0x2c; + *pGIF << nPosX; + *pGIF << nPosY; + *pGIF << nWidth; + *pGIF << nHeight; + *pGIF << cFlags; + + if( pGIF->GetError() ) + bStatus = FALSE; + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WritePalette() +{ + if( bStatus && pAcc->HasPalette() ) + { + const USHORT nCount = pAcc->GetPaletteEntryCount(); + const USHORT nMaxCount = ( 1 << pAcc->GetBitCount() ); + + for ( USHORT i = 0; i < nCount; i++ ) + { + const BitmapColor& rColor = pAcc->GetPaletteColor( i ); + + *pGIF << rColor.GetRed(); + *pGIF << rColor.GetGreen(); + *pGIF << rColor.GetBlue(); + } + + // Rest mit 0 auffuellen + if( nCount < nMaxCount ) + pGIF->SeekRel( ( nMaxCount - nCount ) * 3 ); + + if( pGIF->GetError() ) + bStatus = FALSE; + } +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteAccess() +{ + GIFLZWCompressor aCompressor; + const long nWidth = pAcc->Width(); + const long nHeight = pAcc->Height(); + BYTE* pBuffer = NULL; + const ULONG nFormat = pAcc->GetScanlineFormat(); + long nY; + long nT; + long i; + BOOL bNative = ( BMP_FORMAT_8BIT_PAL == nFormat ); + + if( !bNative ) + pBuffer = new BYTE[ nWidth ]; + + if( bStatus && ( 8 == pAcc->GetBitCount() ) && pAcc->HasPalette() ) + { + aCompressor.StartCompression( *pGIF, pAcc->GetBitCount() ); + + for( i = 0; i < nHeight; i++ ) + { + if( nInterlaced ) + { + nY = i << 3; + + if( nY >= nHeight ) + { + nT = i - ( ( nHeight + 7 ) >> 3 ); + nY= ( nT << 3 ) + 4; + + if( nY >= nHeight ) + { + nT -= ( nHeight + 3 ) >> 3; + nY = ( nT << 2 ) + 2; + + if ( nY >= nHeight ) + { + nT -= ( ( nHeight + 1 ) >> 2 ); + nY = ( nT << 1 ) + 1; + } + } + } + } + else + nY = i; + + if( bNative ) + aCompressor.Compress( pAcc->GetScanline( nY ), nWidth ); + else + { + for( long nX = 0L; nX < nWidth; nX++ ) + pBuffer[ nX ] = (BYTE) pAcc->GetPixel( nY, nX ); + + aCompressor.Compress( pBuffer, nWidth ); + } + + if ( pGIF->GetError() ) + bStatus = FALSE; + + MayCallback( nMinPercent + ( nMaxPercent - nMinPercent ) * i / nHeight ); + + if( !bStatus ) + break; + } + + aCompressor.EndCompression(); + + if ( pGIF->GetError() ) + bStatus = FALSE; + } + + delete[] pBuffer; +} + +// ------------------------------------------------------------------------ + +void GIFWriter::WriteTerminator() +{ + if( bStatus ) + { + *pGIF << (BYTE) 0x3b; + + if( pGIF->GetError() ) + bStatus = FALSE; + } +} + +// ------------------------------------------------------------------------ + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, + FilterConfigItem* pConfigItem, BOOL ) +{ + return GIFWriter().WriteGIF( rGraphic, rStream, pConfigItem ); +} + +// ------------------------------------------------------------------------ + +extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara ) +{ + BOOL bRet = FALSE; + + if ( rPara.pWindow ) + { + ByteString aResMgrName( "egi" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + rPara.pResMgr = pResMgr; + bRet = ( DlgExportEGIF( rPara ).Execute() == RET_OK ); + delete pResMgr; + } + else + bRet = TRUE; + } + + return bRet; +} + +// ------------------------------------------------------------------------ +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/egif/egifstr.src b/filter/source/graphicfilter/egif/egifstr.src new file mode 100644 index 000000000000..ea258019d543 --- /dev/null +++ b/filter/source/graphicfilter/egif/egifstr.src @@ -0,0 +1,39 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "strings.hrc" + +// Key fuer den Dialog +String KEY_INTER +{ + Text = "Interlaced"; +}; +String KEY_TRANS +{ + Text = "Translucent"; +}; diff --git a/filter/source/graphicfilter/egif/exports.map b/filter/source/graphicfilter/egif/exports.map new file mode 100644 index 000000000000..61e4682c6551 --- /dev/null +++ b/filter/source/graphicfilter/egif/exports.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + GraphicExport; + DoExportDialog; + + local: + *; +}; diff --git a/filter/source/graphicfilter/egif/giflzwc.cxx b/filter/source/graphicfilter/egif/giflzwc.cxx new file mode 100644 index 000000000000..5438aa46017b --- /dev/null +++ b/filter/source/graphicfilter/egif/giflzwc.cxx @@ -0,0 +1,256 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include "giflzwc.hxx" + +// ---------------------------- +// - GIFImageDataOutputStream - +// ---------------------------- + +class GIFImageDataOutputStream +{ +private: + + void FlushBlockBuf(); + inline void FlushBitsBufsFullBytes(); + + SvStream& rStream; + BYTE* pBlockBuf; + BYTE nBlockBufSize; + ULONG nBitsBuf; + USHORT nBitsBufSize; + +public: + + GIFImageDataOutputStream( SvStream & rGIF, BYTE nLZWDataSize ); + ~GIFImageDataOutputStream(); + + inline void WriteBits( USHORT nCode, USHORT nCodeLen ); +}; + +// ------------------------------------------------------------------------ + +inline void GIFImageDataOutputStream::FlushBitsBufsFullBytes() +{ + while (nBitsBufSize>=8) + { + if( nBlockBufSize==255 ) + FlushBlockBuf(); + + pBlockBuf[nBlockBufSize++] = (BYTE) nBitsBuf; + nBitsBuf >>= 8; + nBitsBufSize -= 8; + } +} + +// ------------------------------------------------------------------------ + +inline void GIFImageDataOutputStream::WriteBits( USHORT nCode, USHORT nCodeLen ) +{ + if( nBitsBufSize+nCodeLen>32 ) + FlushBitsBufsFullBytes(); + + nBitsBuf |= (ULONG) nCode << nBitsBufSize; + nBitsBufSize = nBitsBufSize + nCodeLen; +} + +// ------------------------------------------------------------------------ + +GIFImageDataOutputStream::GIFImageDataOutputStream( SvStream & rGIF, BYTE nLZWDataSize ) : + rStream(rGIF) +{ + pBlockBuf = new BYTE[ 255 ]; + nBlockBufSize = 0; + nBitsBufSize = 0; + nBitsBuf = 0; + rStream << nLZWDataSize; +} + +// ------------------------------------------------------------------------ + + +GIFImageDataOutputStream::~GIFImageDataOutputStream() +{ + WriteBits(0,7); + FlushBitsBufsFullBytes(); + FlushBlockBuf(); + rStream << (BYTE)0; + delete[] pBlockBuf; +} + +// ------------------------------------------------------------------------ + +void GIFImageDataOutputStream::FlushBlockBuf() +{ + if( nBlockBufSize ) + { + rStream << (BYTE) nBlockBufSize; + rStream.Write( pBlockBuf,nBlockBufSize ); + nBlockBufSize = 0; + } +} + +// ------------------- +// - GIFLZWCTreeNode - +// ------------------- + +struct GIFLZWCTreeNode +{ + + GIFLZWCTreeNode* pBrother; // naechster Knoten, der den selben Vater hat + GIFLZWCTreeNode* pFirstChild; // erster Sohn + USHORT nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn + USHORT nValue; // Der Pixelwert +}; + +// -------------------- +// - GIFLZWCompressor - +// -------------------- + +GIFLZWCompressor::GIFLZWCompressor() +{ + pIDOS=NULL; +} + +// ------------------------------------------------------------------------ + +GIFLZWCompressor::~GIFLZWCompressor() +{ + if (pIDOS!=NULL) EndCompression(); +} + +// ------------------------------------------------------------------------ + +void GIFLZWCompressor::StartCompression( SvStream& rGIF, USHORT nPixelSize ) +{ + if( !pIDOS ) + { + USHORT i; + + nDataSize = nPixelSize; + + if( nDataSize < 2 ) + nDataSize=2; + + nClearCode=1<WriteBits( nClearCode,nCodeSize ); + } +} + +// ------------------------------------------------------------------------ + +void GIFLZWCompressor::Compress( HPBYTE pSrc, ULONG nSize ) +{ + if( pIDOS ) + { + GIFLZWCTreeNode* p; + USHORT i; + BYTE nV; + + if( !pPrefix && nSize ) + { + pPrefix=pTable+(*pSrc++); + nSize--; + } + + while( nSize ) + { + nSize--; + nV=*pSrc++; + for( p=pPrefix->pFirstChild; p!=NULL; p=p->pBrother ) + { + if (p->nValue==nV) + break; + } + + if( p) + pPrefix=p; + else + { + pIDOS->WriteBits(pPrefix->nCode,nCodeSize); + + if (nTableSize==4096) + { + pIDOS->WriteBits(nClearCode,nCodeSize); + + for (i=0; ipBrother=pPrefix->pFirstChild; + pPrefix->pFirstChild=p; + p->nValue=nV; + p->pFirstChild=NULL; + } + + pPrefix=pTable+nV; + } + } + } +} + +// ------------------------------------------------------------------------ + +void GIFLZWCompressor::EndCompression() +{ + if( pIDOS ) + { + if( pPrefix ) + pIDOS->WriteBits(pPrefix->nCode,nCodeSize); + + pIDOS->WriteBits( nEOICode,nCodeSize ); + delete[] pTable; + delete pIDOS; + pIDOS=NULL; + } +} diff --git a/filter/source/graphicfilter/egif/giflzwc.hxx b/filter/source/graphicfilter/egif/giflzwc.hxx new file mode 100644 index 000000000000..75048b0f8ff5 --- /dev/null +++ b/filter/source/graphicfilter/egif/giflzwc.hxx @@ -0,0 +1,65 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _GIFLZWC_HXX +#define _GIFLZWC_HXX + +#ifndef _BMPACC_HXX +#include +#endif + +// -------------------- +// - GIFLZWCompressor - +// -------------------- + +class GIFImageDataOutputStream; +struct GIFLZWCTreeNode; + +class GIFLZWCompressor +{ +private: + + GIFImageDataOutputStream* pIDOS; + GIFLZWCTreeNode* pTable; + GIFLZWCTreeNode* pPrefix; + USHORT nDataSize; + USHORT nClearCode; + USHORT nEOICode; + USHORT nTableSize; + USHORT nCodeSize; + +public: + + GIFLZWCompressor(); + ~GIFLZWCompressor(); + + void StartCompression( SvStream& rGIF, USHORT nPixelSize ); + void Compress( HPBYTE pSrc, ULONG nSize ); + void EndCompression(); +}; + +#endif // _GIFLZWC_HXX diff --git a/filter/source/graphicfilter/egif/makefile.mk b/filter/source/graphicfilter/egif/makefile.mk new file mode 100644 index 000000000000..27dae4906046 --- /dev/null +++ b/filter/source/graphicfilter/egif/makefile.mk @@ -0,0 +1,78 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=egif +TARGET2=egi +DEPTARGET=vegif + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SRS1NAME=$(TARGET) +SRC1FILES = dlgegif.src \ + egifstr.src +.IF "$(L10N_framework)"=="" +SLOFILES= $(SLO)$/egif.obj \ + $(SLO)$/dlgegif.obj \ + $(SLO)$/giflzwc.obj +.ENDIF + +# ========================================================================== + +RESLIB1NAME=$(TARGET2) +RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs + +.IF "$(L10N_framework)"=="" +SHL1TARGET= egi$(DLLPOSTFIX) +SHL1IMPLIB= egif +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(CPPULIB) $(SVTOOLLIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/egif.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/egif.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/egif/strings.hrc b/filter/source/graphicfilter/egif/strings.hrc new file mode 100644 index 000000000000..1566c0dfee81 --- /dev/null +++ b/filter/source/graphicfilter/egif/strings.hrc @@ -0,0 +1,28 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ +#define KEY_INTER 256 +#define KEY_TRANS 257 diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.cxx b/filter/source/graphicfilter/eos2met/dlgeos2.cxx new file mode 100644 index 000000000000..4c5bf1b0a429 --- /dev/null +++ b/filter/source/graphicfilter/eos2met/dlgeos2.cxx @@ -0,0 +1,179 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#ifndef GCC +#endif +#include +#include +#include +#include "dlgeos2.hxx" +#include "dlgeos2.hrc" +#include "strings.hrc" + +/************************************************************************* +|* +|* Ctor +|* +\************************************************************************/ + +DlgExportEMET::DlgExportEMET( FltCallDialogParameter& rPara ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EMET, *rPara.pResMgr ) ), + rFltCallPara ( rPara ), + aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + aRbOriginal ( this, ResId( RB_ORIGINAL, *rPara.pResMgr ) ), + aRbSize ( this, ResId( RB_SIZE, *rPara.pResMgr ) ), + aGrpMode ( this, ResId( GRP_MODE, *rPara.pResMgr ) ), + aFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ), + aMtfSizeX ( this, ResId( MTF_SIZEX, *rPara.pResMgr ) ), + aFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ), + aMtfSizeY ( this, ResId( MTF_SIZEY, *rPara.pResMgr ) ), + aGrpSize ( this, ResId( GRP_SIZE, *rPara.pResMgr ) ), + pMgr ( rPara.pResMgr ) +{ + FreeResource(); + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/MET" ) ); + pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + + aBtnOK.SetClickHdl( LINK( this, DlgExportEMET, OK ) ); + aRbOriginal.SetClickHdl( LINK( this, DlgExportEMET, ClickRbOriginal ) ); + aRbSize.SetClickHdl( LINK( this, DlgExportEMET, ClickRbSize ) ); + + // Config-Parameter lesen + sal_Int32 nMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 ); + ::com::sun::star::awt::Size aDefault( 10000, 10000 ); + ::com::sun::star::awt::Size aSize; + aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault ); + + aMtfSizeX.SetDefaultUnit( FUNIT_MM ); + aMtfSizeY.SetDefaultUnit( FUNIT_MM ); + + aMtfSizeX.SetValue( aSize.Width ); + aMtfSizeY.SetValue( aSize.Height ); + + switch ( rPara.eFieldUnit ) + { +// case FUNIT_NONE : +// case FUNIT_KM : +// case FUNIT_PERCENT : +// case FUNIT_CUSTOM : +// case FUNIT_MILE : +// case FUNIT_FOOT : +// case FUNIT_M : + case FUNIT_MM : + case FUNIT_CM : + case FUNIT_TWIP : + case FUNIT_POINT : + case FUNIT_PICA : + case FUNIT_INCH : + case FUNIT_100TH_MM : + { + aMtfSizeX.SetUnit( rPara.eFieldUnit ); + aMtfSizeY.SetUnit( rPara.eFieldUnit ); + } + break; + default: + break; // multiple other value not handled -Wall + } + if ( nMode == 1 ) + { + aRbSize.Check( TRUE ); + ClickRbSize( NULL ); + } + else + { + aRbOriginal.Check( TRUE ); + ClickRbOriginal( NULL ); + } +} + +DlgExportEMET::~DlgExportEMET() +{ + delete pConfigItem; +} + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEMET, OK, void *, EMPTYARG ) +{ + // Config-Parameter schreiben + ::com::sun::star::awt::Size aSize( + (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeX.GetValue(), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM ), + (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeY.GetValue(), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM ) ); + sal_Int32 nStrMode = ( aRbSize.IsChecked() ) ? 1 : 0; + + pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nStrMode ); + pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize ); + rFltCallPara.aFilterData = pConfigItem->GetFilterData(); + EndDialog( RET_OK ); + + return 0; +} + +/************************************************************************* +|* +|* Enabled/Disabled Controls +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEMET, ClickRbOriginal, void*, EMPTYARG ) +{ + aGrpSize.Disable(); + aFtSizeX.Disable(); + aMtfSizeX.Disable(); + aFtSizeY.Disable(); + aMtfSizeY.Disable(); + + return 0; +} + + +/************************************************************************* +|* +|* Enabled/Disabled Controls +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEMET, ClickRbSize, void*, EMPTYARG ) +{ + aGrpSize.Enable(); + aFtSizeX.Enable(); + aMtfSizeX.Enable(); + aFtSizeY.Enable(); + aMtfSizeY.Enable(); + + return 0; +} + diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.hrc b/filter/source/graphicfilter/eos2met/dlgeos2.hrc new file mode 100644 index 000000000000..5e4ec5b160fc --- /dev/null +++ b/filter/source/graphicfilter/eos2met/dlgeos2.hrc @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "filter.hrc" + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define CBX_SIZE 2 +#define MTF_SIZEX 1 +#define MTF_SIZEY 2 +#define FT_SIZEX 1 +#define FT_SIZEY 2 +#define GRP_SIZE 1 +#define GRP_MODE 2 +#define RB_ORIGINAL 1 +#define RB_SIZE 2 + diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.hxx b/filter/source/graphicfilter/eos2met/dlgeos2.hxx new file mode 100644 index 000000000000..6387be453494 --- /dev/null +++ b/filter/source/graphicfilter/eos2met/dlgeos2.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DLGEOS2_HXX_ +#define _DLGEOS2_HXX_ +#include +#include +#include +#include +#include + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen bei Vektorformaten +|* +\************************************************************************/ + +class FilterConfigItem; +class ResMgr; + +class DlgExportEMET : public ModalDialog +{ +private: + + FltCallDialogParameter& rFltCallPara; + + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + RadioButton aRbOriginal; + RadioButton aRbSize; + FixedLine aGrpMode; + + FixedText aFtSizeX; + MetricField aMtfSizeX; + FixedText aFtSizeY; + MetricField aMtfSizeY; + FixedLine aGrpSize; + + FilterConfigItem* pConfigItem; + ResMgr* pMgr; + + DECL_LINK( OK, void* p ); + DECL_LINK( ClickRbOriginal,void* p ); + DECL_LINK( ClickRbSize,void* p ); + +public: + DlgExportEMET( FltCallDialogParameter& rPara ); + ~DlgExportEMET(); +}; + + +#endif // _DLGEMET_HXX_ + diff --git a/filter/source/graphicfilter/eos2met/dlgeos2.src b/filter/source/graphicfilter/eos2met/dlgeos2.src new file mode 100644 index 000000000000..6c9e474e25db --- /dev/null +++ b/filter/source/graphicfilter/eos2met/dlgeos2.src @@ -0,0 +1,162 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "dlgeos2.hrc" + +ModalDialog DLG_EXPORT_EMET +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 178 , 89 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + Text [ en-US ] = "MET Options" ; + MetricField MTF_SIZEX + { + Border = TRUE ; + Pos = MAP_APPFONT ( 60 , 55 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 100 ; + Maximum = 99999 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + First = 100 ; + Last = 99999 ; + SpinSize = 100 ; + }; + MetricField MTF_SIZEY + { + Border = TRUE ; + Pos = MAP_APPFONT ( 60 , 71 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 100 ; + Maximum = 99999 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + First = 100 ; + Last = 99999 ; + SpinSize = 100 ; + }; + FixedLine GRP_SIZE + { + Pos = MAP_APPFONT ( 6 , 44 ) ; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Size" ; + }; + FixedText FT_SIZEX + { + Pos = MAP_APPFONT ( 12 , 56 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + Text [ en-US ] = "Width" ; + }; + FixedText FT_SIZEY + { + Pos = MAP_APPFONT ( 12 , 72 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + Text [ en-US ] = "Height" ; + }; + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 122 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 122 , 24 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 122 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + RadioButton RB_ORIGINAL + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Original" ; + }; + RadioButton RB_SIZE + { + Pos = MAP_APPFONT ( 12 , 28 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Size" ; + }; + FixedLine GRP_MODE + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Mode" ; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx new file mode 100644 index 000000000000..5ef86b9c1b98 --- /dev/null +++ b/filter/source/graphicfilter/eos2met/eos2met.cxx @@ -0,0 +1,2648 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "strings.hrc" +#include "dlgeos2.hxx" + +// -----------------------------Feld-Typen------------------------------- + +#define BegDocumnMagic 0xA8A8 /* Begin Document */ +#define EndDocumnMagic 0xA8A9 /* End Document */ + +#define BegResGrpMagic 0xC6A8 /* Begin Resource Group */ +#define EndResGrpMagic 0xC6A9 /* End Resource Group */ + +#define BegColAtrMagic 0x77A8 /* Begin Color Attribute Table */ +#define EndColAtrMagic 0x77A9 /* End Color Attribute Table */ +#define BlkColAtrMagic 0x77B0 /* Color Attribute Table */ +#define MapColAtrMagic 0x77AB /* Map Color Attribute Table */ + +#define BegImgObjMagic 0xFBA8 /* Begin Image Object */ +#define EndImgObjMagic 0xFBA9 /* End Image Object */ +#define DscImgObjMagic 0xFBA6 /* Image Data Descriptor */ +#define DatImgObjMagic 0xFBEE /* Image Picture Data */ + +#define BegObjEnvMagic 0xC7A8 /* Begin Object Environment Group */ +#define EndObjEnvMagic 0xC7A9 /* End Object Environment Group */ + +#define BegGrfObjMagic 0xBBA8 /* Begin Graphics Object */ +#define EndGrfObjMagic 0xBBA9 /* End Graphics Object */ +#define DscGrfObjMagic 0xBBA6 /* Graphics Data Descritor */ +#define DatGrfObjMagic 0xBBEE /* Graphics Data */ + +#define MapCodFntMagic 0x8AAB /* Map Coded Font */ +#define MapDatResMagic 0xC3AB /* Map Data Resource */ + +// Struktur des Metafiles +// BegDocumn +// BegResGrp +// BegColAtr +// BlkColAtr +// EndColAtr +// BegImgObj[0..n] +// BegResGrp[] +// BegColAtr[] +// BlkColAtr +// EndColAtr +// EndResGrp +// BegObjEnv[] +// MapColAtr +// EndObjEnv +// DscImgObj +// DatImgOb1 +// DatImgOb2[1..n] +// EndImgObj +// BegGrfObj +// BegObjEnv[] +// MapColAtr +// MapCodFnt1 +// MapCodFnt2[0..n] +// MapDatRes[0..n] +// EndObjEnv +// DscGrfObj +// DatGrfObj[0..n] +// EndGrfObj +// EndResGrp +// EndDocumn + +//============================== METWriter =================================== + +struct METChrSet +{ + struct METChrSet * pSucc; + BYTE nSet; + String aName; + FontWeight eWeight; +}; + +struct METGDIStackMember +{ + struct METGDIStackMember * pSucc; + Color aLineColor; + Color aFillColor; + RasterOp eRasterOp; + Font aFont; + MapMode aMapMode; + Rectangle aClipRect; +}; + +class METWriter +{ +private: + + BOOL bStatus; + ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. + SvStream* pMET; + Rectangle aPictureRect; + MapMode aPictureMapMode; + MapMode aTargetMapMode; + ULONG nActualFieldStartPos; // Anfangs-Position des aktuellen 'Field' + ULONG nNumberOfDataFields; // Anzahl der angefangenen 'Graphcis Data Fields' + Color aGDILineColor; + Color aGDIFillColor; + RasterOp eGDIRasterOp; + Font aGDIFont; + MapMode aGDIMapMode; // derzeit unbenutzt! + Rectangle aGDIClipRect; // derzeit unbenutzt! + METGDIStackMember* pGDIStack; + Color aMETColor; + Color aMETBackgroundColor; + Color aMETPatternSymbol; + RasterOp eMETMix ; + long nMETStrokeLineWidth; + Size aMETChrCellSize; + short nMETChrAngle; + BYTE nMETChrSet; + METChrSet* pChrSetList; // Liste der Character-Sets + BYTE nNextChrSetId; // die erste unbenutzte ChrSet-Id + ULONG nActBitmapId; // Field-Id der naechsten Bitmap + ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile + ULONG nNumberOfBitmaps; // Anzahl der Bitmaps + ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Orders + ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps + ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + void MayCallback(); + // Berechnet anhand der obigen 5 Parameter eine Prozentzahl + // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen + // moechte. + + void CountActionsAndBitmaps(const GDIMetaFile * pMTF); + // Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen + // zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist) + + void WriteBigEndianShort(USHORT nWord); + void WriteBigEndianLong(ULONG nLong); + + void WritePoint(Point aPt); + void WriteClipRect( const Rectangle& rRect ); + void WriteFieldIntroducer(USHORT nFieldSize, USHORT nFieldType, + BYTE nFlags, USHORT nSegSeqNum); + void UpdateFieldSize(); + + void WriteFieldId(ULONG nId); + + void CreateChrSets(const GDIMetaFile * pMTF); + void CreateChrSet(const Font & rFont); + void WriteChrSets(); + BYTE FindChrSet(const Font & rFont); + + void WriteColorAttributeTable(ULONG nFieldId=4, BitmapPalette* pPalette=NULL, + BYTE nBasePartFlags=0x40, BYTE nBasePartLCTID=0); + + void WriteImageObject(const Bitmap & rBitmap); + void WriteImageObjects(const GDIMetaFile * pMTF); + + void WriteDataDescriptor(const GDIMetaFile * pMTF); + + void WillWriteOrder(ULONG nNextOrderMaximumLength); + + void METSetAndPushLineInfo( const LineInfo& rLineInfo ); + void METPopLineInfo( const LineInfo& rLineInfo ); + void METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap); + void METBeginArea(BOOL bBoundaryLine); + void METEndArea(); + void METBeginPath(sal_uInt32 nPathId); + void METEndPath(); + void METFillPath(sal_uInt32 nPathId); + void METOutlinePath(sal_uInt32 nPathId); + void METCloseFigure(); + void METMove(Point aPt); + void METLine(Point aPt1, Point aPt2); + void METLine(const Polygon & rPolygon); + void METLine(const PolyPolygon & rPolyPolygon); + void METLineAtCurPos(Point aPt); + void METBox(BOOL bFill, BOOL bBoundary, + Rectangle aRect, sal_uInt32 nHAxis, sal_uInt32 nVAxis); + void METFullArc(Point aCenter, double fMultiplier); + void METPartialArcAtCurPos(Point aCenter, double fMultiplier, + double fStartAngle, double fSweepAngle); + void METChrStr(Point aPt, String aStr); + void METSetArcParams(long nP, long nQ, long nR, long nS); + void METSetColor(Color aColor); + void METSetBackgroundColor(Color aColor); + void METSetMix(RasterOp eROP); + void METSetChrCellSize(Size aSize); + void METSetChrAngle(short nAngle); + void METSetChrSet(BYTE nSet); + + void WriteOrders(const GDIMetaFile * pMTF); + + void WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF); + + void WriteGraphicsObject(const GDIMetaFile * pMTF); + + void WriteResourceGroup(const GDIMetaFile * pMTF); + + void WriteDocument(const GDIMetaFile * pMTF); + +public: + + METWriter() {} + + BOOL WriteMET( const GDIMetaFile & rMTF, SvStream & rTargetStream, + FilterConfigItem* pConfigItem ); +}; + + +//========================== Methoden von METWriter ========================== + +void METWriter::MayCallback() +{ + if ( xStatusIndicator.is() ) + { + ULONG nPercent; + nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions) + *100/((nNumberOfBitmaps<<14)+nNumberOfActions); + + if (nPercent>=nLastPercent+3) + { + nLastPercent = nPercent; + if ( nPercent <= 100 ) + xStatusIndicator->setValue( nPercent ); + } + } +} + +void METWriter::WriteClipRect( const Rectangle& rRect ) +{ + aGDIClipRect = rRect; + sal_uInt32 nPathId = ( rRect.IsEmpty() ) ? 0 : 1; + if ( nPathId ) + { + Polygon aPoly( rRect ); + METBeginPath( nPathId ); + METLine( aPoly ); + METEndPath(); + } + WillWriteOrder(8); + *pMET << (BYTE)0xb4 << (BYTE)6 + << (BYTE)0x00 << (BYTE)0 << nPathId; +} + +void METWriter::CountActionsAndBitmaps(const GDIMetaFile * pMTF) +{ + const MetaAction* pMA; + + for( ULONG nAction = 0, nActionCount=pMTF->GetActionCount(); nAction < nActionCount; nAction++ ) + { + pMA = pMTF->GetAction(nAction); + + switch (pMA->GetType()) + { + case META_EPS_ACTION : + { + const GDIMetaFile aGDIMetaFile( ((const MetaEPSAction*)pMA)->GetSubstitute() ); + INT32 nCount = aGDIMetaFile.GetActionCount(); + INT32 i; + for ( i = 0; i < nCount; i++ ) + if ( ((const MetaAction*)aGDIMetaFile.GetAction( i ))->GetType() == META_BMPSCALE_ACTION ) + break; + if ( i == nCount) + break; + } + case META_BMP_ACTION: + case META_BMPSCALE_ACTION: + case META_BMPSCALEPART_ACTION: + case META_BMPEX_ACTION: + case META_BMPEXSCALE_ACTION: + case META_BMPEXSCALEPART_ACTION: + nNumberOfBitmaps++; + break; + } + nNumberOfActions++; + } +} + + +void METWriter::WriteBigEndianShort(USHORT nWord) +{ + *pMET << ((BYTE)(nWord>>8)) << ((BYTE)(nWord&0x00ff)); +} + + +void METWriter::WriteBigEndianLong(ULONG nLong) +{ + WriteBigEndianShort((USHORT)(nLong>>16)); + WriteBigEndianShort((USHORT)(nLong&0x0000ffff)); +} + + +void METWriter::WritePoint(Point aPt) +{ + Point aNewPt = OutputDevice::LogicToLogic( aPt, aPictureMapMode, aTargetMapMode ); + + *pMET << (long) ( aNewPt.X() - aPictureRect.Left() ) + << (long) ( aPictureRect.Bottom() - aNewPt.Y() ); +} + + +void METWriter::WriteFieldIntroducer(USHORT nFieldSize, USHORT nFieldType, + BYTE nFlags, USHORT nSegSeqNum) +{ + nActualFieldStartPos=pMET->Tell(); + WriteBigEndianShort(nFieldSize); + *pMET << (BYTE)0xd3 << nFieldType << nFlags << nSegSeqNum; +} + + +void METWriter::UpdateFieldSize() +{ + ULONG nPos; + + nPos=pMET->Tell(); + pMET->Seek(nActualFieldStartPos); + WriteBigEndianShort((USHORT)(nPos-nActualFieldStartPos)); + pMET->Seek(nPos); +} + + +void METWriter::WriteFieldId(ULONG nId) +{ + BYTE nbyte; + short i; + + for (i=1; i<=8; i++) { + nbyte= '0' + (BYTE)((nId >> (32-i*4)) & 0x0f); + *pMET << nbyte; + } +} + + +void METWriter::CreateChrSets(const GDIMetaFile * pMTF) +{ + ULONG nAction, nActionCount; + const MetaAction * pMA; + + if (bStatus==FALSE) + return; + + nActionCount=pMTF->GetActionCount(); + + for (nAction=0; nActionGetAction(nAction); + + switch (pMA->GetType()) + { + case META_FONT_ACTION: + { + const MetaFontAction* pA = (const MetaFontAction*) pMA; + CreateChrSet( pA->GetFont() ); + } + break; + } + } +} + + +void METWriter::CreateChrSet(const Font & rFont) +{ + METChrSet * pCS; + + if ( FindChrSet( rFont ) == 0 ) + { + pCS = new METChrSet; + pCS->pSucc = pChrSetList; pChrSetList=pCS; + pCS->nSet = nNextChrSetId++; + pCS->aName = rFont.GetName(); + pCS->eWeight = rFont.GetWeight(); + } +} + + +BYTE METWriter::FindChrSet(const Font & rFont) +{ + METChrSet* pCS; + + for (pCS=pChrSetList; pCS!=NULL; pCS=pCS->pSucc) + { + if (pCS->aName==rFont.GetName() && pCS->eWeight==rFont.GetWeight() ) + return pCS->nSet; + } + + return 0; +} + + +void METWriter::WriteChrSets() +{ + USHORT i; + char c = 0; + METChrSet * pCS; + BYTE nbyte; + + for (pCS=pChrSetList; pCS!=NULL; pCS=pCS->pSucc) + { + + WriteFieldIntroducer(0x58,MapCodFntMagic,0,0); + + WriteBigEndianShort(0x0050); + + *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00; + *pMET << (BYTE)0xa4 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x01; + *pMET << (BYTE)0x01 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00; + + *pMET << (BYTE)0x04 << (BYTE)0x24 << (BYTE)0x05 << (BYTE)pCS->nSet; + + *pMET << (BYTE)0x14 << (BYTE)0x1f; + switch (pCS->eWeight) + { + case WEIGHT_THIN: nbyte=1; break; + case WEIGHT_ULTRALIGHT: nbyte=2; break; + case WEIGHT_LIGHT: nbyte=3; break; + case WEIGHT_SEMILIGHT: nbyte=4; break; + case WEIGHT_NORMAL: nbyte=5; break; + case WEIGHT_SEMIBOLD: nbyte=6; break; + case WEIGHT_BOLD: nbyte=7; break; + case WEIGHT_ULTRABOLD: nbyte=8; break; + case WEIGHT_BLACK: nbyte=9; break; + default: nbyte=5; + } + *pMET << nbyte; + *pMET << (BYTE)0x05; + *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00; + *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00; + *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00; + *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x0c; + + *pMET << (BYTE)0x06 << (BYTE)0x20 << (BYTE)0x03 << (BYTE)0xd4; + *pMET << (BYTE)0x03 << (BYTE)0x52; + + *pMET << (BYTE)0x24 << (BYTE)0x02 << (BYTE)0x08 << (BYTE)0x00; + ByteString n(pCS->aName, gsl_getSystemTextEncoding()); + for (i=0; i<32; i++) + { + if ( i == 0 || c != 0 ) + c = n.GetChar( i ); + *pMET << c; + } + } +} + + +void METWriter::WriteColorAttributeTable(ULONG nFieldId, BitmapPalette* pPalette, BYTE nBasePartFlags, BYTE nBasePartLCTID) +{ + USHORT nIndex,nNumI,i; + + if (bStatus==FALSE) return; + + //--- Das Feld 'Begin Color Attribute Table': + WriteFieldIntroducer(16,BegColAtrMagic,0,0); + WriteFieldId(nFieldId); + + //--- Das Feld 'Color Attribute Table': + WriteFieldIntroducer(0,BlkColAtrMagic,0,0); + *pMET << nBasePartFlags << (BYTE)0x00 << nBasePartLCTID; // 'Base Part' + if (pPalette!=NULL) + { + nIndex=0; + while (nIndexGetEntryCount()) + { + nNumI=pPalette->GetEntryCount()-nIndex; + if (nNumI>81) nNumI=81; + *pMET << (BYTE)(11+nNumI*3); // Laenge des Parameters + *pMET << (BYTE)1 << (BYTE)0 << (BYTE)1; // typ: element list, Reserved, Format: RGB + *pMET << (BYTE)0; WriteBigEndianShort(nIndex); // Start-Index (3 Bytes) + *pMET << (BYTE)8 << (BYTE)8 << (BYTE)8; // Bits je Komponente R,G,B + *pMET << (BYTE)3; // Anzahl Bytes je Eintrag + for (i=0; iGetError()) + bStatus=FALSE; +} + + +void METWriter::WriteImageObject(const Bitmap & rBitmap) +{ + SvMemoryStream aTemp(0x00010000,0x00010000); + sal_uInt32 nWidth,nHeight,nResX,nResY; + ULONG nBytesPerLine,i,j,nNumColors,ny,nLines; + ULONG nActColMapId; + USHORT nBitsPerPixel; + BYTE nbyte, * pBuf; + + if (bStatus==FALSE) + return; + + nActColMapId=((nActBitmapId>>24)&0x000000ff) | ((nActBitmapId>> 8)&0x0000ff00) | + ((nActBitmapId<< 8)&0x00ff0000) | ((nActBitmapId<<24)&0xff000000); + + //--- Das Feld 'Begin Image Object': + WriteFieldIntroducer(16,BegImgObjMagic,0,0); + WriteFieldId(nActBitmapId); + + // Windows-BMP-Datei erzeugen: + aTemp << rBitmap; + + // Header der Windows-BMP-Datei einlesen: + aTemp.SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + aTemp.Seek(18); + aTemp >> nWidth >> nHeight; + aTemp.SeekRel(2); + aTemp >> nBitsPerPixel; + aTemp.SeekRel(8); + aTemp >> nResX >> nResY; + aTemp.SeekRel(8); + + nNumColors=1<> 3; + + // ggf. Farbpalette einlesen und in die MET-Datei schreiben: + if (nBitsPerPixel<=8) + { + BitmapPalette aPal( (USHORT) nNumColors ); + BYTE nr,ng,nb; + + for (i=0; i> nb >> ng >> nr; aTemp.SeekRel(1); + aPal[ (USHORT) i ] = BitmapColor( nr, ng, nb ); + } + + //--- Das Feld 'Begin Resource Group': + WriteFieldIntroducer(16,BegResGrpMagic,0,0); + WriteFieldId(nActColMapId); + + //--- Farbtabelle schreiben: + WriteColorAttributeTable(nActColMapId,&aPal,0,1); + + //--- Das Feld 'End Resource Group': + WriteFieldIntroducer(16,EndResGrpMagic,0,0); + WriteFieldId(nActColMapId); + + //--- Das Feld 'Begin Object Environment Group': + WriteFieldIntroducer(16,BegObjEnvMagic,0,0); + WriteFieldId(nActBitmapId); + + //--- Das Feld 'Map Color Attribute Table': + WriteFieldIntroducer(26,MapColAtrMagic,0,0); + WriteBigEndianShort(0x0012); + *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00; + WriteFieldId(nActColMapId); + *pMET << (BYTE)0x04 << (BYTE)0x24 << (BYTE)0x07 << (BYTE)0x01; + + //--- Das Feld 'End Object Environment Group': + WriteFieldIntroducer(16,EndObjEnvMagic,0,0); + WriteFieldId(nActBitmapId); + } + + //--- Das Feld 'Image Data Descriptor': + WriteFieldIntroducer(17,DscImgObjMagic,0,0); + *pMET << (BYTE)0x01; // Unit of measure: tens of centimeters + WriteBigEndianShort((USHORT)nResX); + WriteBigEndianShort((USHORT)nResY); + WriteBigEndianShort((USHORT)nWidth); + WriteBigEndianShort((USHORT)nHeight); + + //--- Das erste Feld 'Image Picture Data': + WriteFieldIntroducer(0,DatImgObjMagic,0,0); + + // Begin Segment: + *pMET << (BYTE)0x70 << (BYTE)0x00; + + // Begin Image Content: + *pMET << (BYTE)0x91 << (BYTE)0x01 << (BYTE)0xff; + + // Image Size: + *pMET << (BYTE)0x94 << (BYTE)0x09 << (BYTE)0x02; + *pMET << (USHORT) 0 << (USHORT) 0; + WriteBigEndianShort((USHORT)nHeight); + WriteBigEndianShort((USHORT)nWidth); + + // Image Encoding: + *pMET << (BYTE)0x95 << (BYTE)0x02 << (BYTE)0x03 << (BYTE)0x03; + + // Image IDE-Size: + *pMET << (BYTE)0x96 << (BYTE)0x01 << (BYTE)nBitsPerPixel; + + if (nBitsPerPixel<=8) { + // Image LUT-ID + *pMET << (BYTE)0x97 << (BYTE)0x01 << (BYTE)0x01; + } + else { + // IDE Structure + *pMET << (BYTE)0x9b << (BYTE)0x08 << (BYTE)0x00 << (BYTE)0x01; + *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x08; + *pMET << (BYTE)0x08 << (BYTE)0x08; + } + + pBuf=new BYTE[nBytesPerLine]; + ny=0; + while (ny30000) nLines=30000/nBytesPerLine; + if (nLines<1) nLines=1; + WriteBigEndianShort(0xfe92); + WriteBigEndianShort((USHORT)(nLines*nBytesPerLine)); + for (i=0; iWrite(pBuf,nBytesPerLine); + ny++; + } + if (aTemp.GetError() || pMET->GetError()) bStatus=FALSE; + nActBitmapPercent=(ny+1)*100/nHeight; + MayCallback(); + if (bStatus==FALSE) { delete[] pBuf; return; } + } + delete[] pBuf; + + // End Image Content: + *pMET << (BYTE)0x93 << (BYTE)0x00; + + // End Segment: + *pMET << (BYTE)0x71 << (BYTE)0x00; + + // Abschliessen des letzten Feldes 'Image Picture Data': + UpdateFieldSize(); + + //--- Das Feld 'End Image Object': + WriteFieldIntroducer(16,EndImgObjMagic,0,0); + WriteFieldId(nActBitmapId); + + // Ids erhoehen: + nActBitmapId++; + + // Bitmaps zaehlen: + nWrittenBitmaps++; + nActBitmapPercent=0; + + if (pMET->GetError()) bStatus=FALSE; +} + + +void METWriter::WriteImageObjects(const GDIMetaFile * pMTF) +{ + const MetaAction* pMA; + + if (bStatus==FALSE) + return; + + for ( ULONG nAction = 0, nActionCount = pMTF->GetActionCount(); nAction < nActionCount; nAction++) + { + pMA = pMTF->GetAction(nAction); + + switch (pMA->GetType()) + { + case META_BMP_ACTION: + { + METSetMix( eGDIRasterOp ); + WriteImageObject( ( (MetaBmpAction*) pMA )->GetBitmap() ); + } + break; + + case META_BMPSCALE_ACTION: + { + METSetMix( eGDIRasterOp ); + WriteImageObject( ( (MetaBmpScaleAction*) pMA )->GetBitmap() ); + } + break; + + case META_BMPSCALEPART_ACTION: + { + METSetMix( eGDIRasterOp ); + WriteImageObject( ( (MetaBmpScalePartAction*) pMA )->GetBitmap() ); + } + break; + + case META_BMPEX_ACTION: + { + METSetMix( eGDIRasterOp ); + WriteImageObject( Graphic( ( (MetaBmpExAction*) pMA )->GetBitmapEx() ).GetBitmap() ); + } + break; + + case META_BMPEXSCALE_ACTION: + { + METSetMix( eGDIRasterOp ); + WriteImageObject( Graphic( ( (MetaBmpExScaleAction*) pMA )->GetBitmapEx() ).GetBitmap() ); + } + break; + + case META_BMPEXSCALEPART_ACTION: + { + METSetMix( eGDIRasterOp ); + WriteImageObject( Graphic( ( (MetaBmpExScalePartAction*) pMA )->GetBitmapEx() ).GetBitmap() ); + } + break; + + case META_EPS_ACTION : + { + const MetaEPSAction* pA = (const MetaEPSAction*)pMA; + const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); + + INT32 nCount = aGDIMetaFile.GetActionCount(); + for ( INT32 i = 0; i < nCount; i++ ) + { + const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i ); + if ( pMetaAct->GetType() == META_BMPSCALE_ACTION ) + { + const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*)pMetaAct; + METSetMix( eGDIRasterOp ); + WriteImageObject( pBmpScaleAction->GetBitmap() ); + break; + } + } + } + break; + } + + if (bStatus==FALSE) + break; + } + + if (pMET->GetError()) + bStatus=FALSE; +} + +void METWriter::WriteDataDescriptor(const GDIMetaFile *) +{ + if (bStatus==FALSE) + return; + + WriteFieldIntroducer(0,DscGrfObjMagic,0,0); + + //------------------------------------------------------------------------------ + // Im Folgenden die OS2-Orginal-Dokumentation und die Implementation dazu (uff) + //------------------------------------------------------------------------------ + + // Parameters (all required and in this order) + + // 0 0xF7 Specify GVM Subset + // 1 Length of following data 0x07 + // 2 0xB0 drawing order subset + // 3-4 0x0000 + // 5 0x23 Level 3.2 + // 6 0x01 Version 1 + // 7 Length of following field 0x01 + // 8 Coordinate types in data + // 0x04Intel16 + // 0x05Intel32 + *pMET << (BYTE)0xf7 << (BYTE)0x07 << (BYTE)0xb0 << (BYTE)0x00 + << (BYTE)0x00 << (BYTE)0x23 << (BYTE)0x01 << (BYTE)0x01 + << (BYTE)0x05; + + // 0 0xF6 Set Picture Descriptor + // 1 Length of following data + // 2 Flags + // 0 B'0' Picture in 2D + // 1 Picture Dimensions + // B'0' Not absolute (PU_ARBITRARY PS) + // B'1' Absolute (example: PU_TWIPS PS) + // 2 Picture Elements + // B'0' Not pels + // B'1' Pels (PU_PELS PS) + // (Bit 1 must also be set) + // 3-7 B'00000' + // 3 0x00 Reserved + // 4 Picture frame size coordinate type + // 0x04 Intel16 + // 0x05 Intel32 + // 5 UnitsOfMeasure + // 0x00 Ten inches + // 0x01 Decimeter + // 6-11 or 6-17(2 or 4 bytes) Resolution. + // GPS Units / UOM on x axis + // GPS Units / UOM on y axis + // GPS Units / UOM on z axis + // 12-23 or 18-41(2 or 4 bytes) Window Size. + // GPS X left, X right + // GPS Y bottom, Y top + // GPS Z near, Z far + Size aUnitsPerDecimeter=OutputDevice::LogicToLogic(Size(10,10),MapMode(MAP_CM),aPictureMapMode); + *pMET << (BYTE)0xf6 << (BYTE)0x28 << (BYTE)0x40 << (BYTE)0x00 + << (BYTE)0x05 << (BYTE)0x01 + << (sal_uInt32)(aUnitsPerDecimeter.Width()) + << (sal_uInt32)(aUnitsPerDecimeter.Height()) + << (sal_uInt32)0 + << (sal_uInt32)0 << (sal_uInt32)aPictureRect.GetWidth() + << (sal_uInt32)0 << (sal_uInt32)aPictureRect.GetHeight() + << (sal_uInt32)0 << (sal_uInt32)0; + + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Parameter Format 0x08 + // 3-4 Mask 0xE000 + // 5 Names 0x8F + // 6 Coordinates + // 0x00 Picture in 2D + // 7 Transforms + // 0x04 Intel16 + // 0x05 Intel32 + // 8 Geometrics + // 0x04 Intel16 + // 0x05 Intel32 + *pMET << (BYTE)0x21 << (BYTE)0x07 << (BYTE)0x08 << (BYTE)0xe0 + << (BYTE)0x00 << (BYTE)0x8f << (BYTE)0x00 << (BYTE)0x05 + << (BYTE)0x05; + + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set default viewing transform 0x07 + // 3-4 Mask 0xCC0C + // 5 Names 0x8F + // 6-n M11, M12, M21, M22, M41, M42 Matrix elements + *pMET << (BYTE)0x21 << (BYTE)0x1c << (BYTE)0x07 << (BYTE)0xcc + << (BYTE)0x0c << (BYTE)0x8f + << (sal_uInt32)0x00010000 << (sal_uInt32)0x00000000 << (sal_uInt32)0x00000000 + << (sal_uInt32)0x00010000 << (sal_uInt32)0x00000000 << (sal_uInt32)0x00000000; + + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set default line attributes 0x01 + // 3-4 Mask - OR of as many of the following bits as are required: + // 0x8000 Line type + // 0x4000 Line width + // 0x2000 Line end + // 0x1000 Line join + // 0x0800 Stroke width + // 0x0008 Line color + // 0x0002 Line mix + // 5 Flags + // + // 0x0F Set indicated default attributes to initial values. (Data field is not present in this + // instance). + // 0x8F Set indicated default attributes to specified values. + // 6-n Data - data values as required, in the following order if present. + // No space is reserved for attributes for which the corresponding mask flag was not + // set. + // + // (1 byte) - Line type + // (1 byte) - Line width + // (1 byte) - Line end + // (1 byte) - Line join + // (G bytes) - Stroke width + // (4 bytes) - Line color + // (1 byte) - Line mix (G=2 or 4 depending on the Geometrics parameter of Set Default + // Parameter Format) + // Nanu! witziger-weise fehlt obiger Abschnitt in den Metadateien. Also lassen wir ihn auch weg + + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Character Attributes 0x02 + // 3-4 Mask - OR of as many of the following bits as are required: + // + // 0x8000 Character angle + // 0x4000 Character box + // 0x2000 Character direction + // 0x1000 Character precision + // 0x0800 Character set + // 0x0400 Character shear + // 0x0040 Character break extra + // 0x0020 Character extra + // 0x0008 Character color + // 0x0004 Character background color + // 0x0002 Character mix + // 0x0001 Character background mix + // 5 Flags + // 0x0FSet indicated default attributes to initial values. (Data field is not present in this + // case). + // 0x8FSet indicated default attributes to specified values. + // 6-n Data - data values as required, in the following order if present. + // No space is reserved for attributes for which the corresponding Mask flag was not + // set. + // (2*G bytes) - Character angle + // (2*G + 4 bytes)- Character box + // (1 byte) - Character direction + // (1 byte) - Character precision + // (1 byte) - Character set + // (2*G bytes) - Character shear + // (4 bytes) - Character break extra + // (4 bytes) - Character extra + // (4 bytes) - Character color + // (4 bytes) - Character background color + // (1 byte) - Character mix + // (1 byte) - Character background mix (G=2 or 4 depending on the Geometrics + // parameter of Set Default Parameter Format) + *pMET << (BYTE)0x21 << (BYTE)0x10 << (BYTE)0x02 << (BYTE)0x40 + << (BYTE)0x00 << (BYTE)0x8f + << (BYTE)0xaa << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00 + << (BYTE)0x44 << (BYTE)0x04 << (BYTE)0x00 << (BYTE)0x00 + << (BYTE)0xa8 << (BYTE)0xaa << (BYTE)0x40 << (BYTE)0x44; + + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Marker Attributes 0x03 + // 3-4 Mask - OR of as many of the following bits as are required: + // 0x4000 Marker box + // 0x1000 Marker precision + // 0x0800 Marker set + // 0x0100 Marker symbol + // 0x0008 Marker color + // 0x0004 Marker background color + // 0x0002 Marker mix + // 0x0001 Marker background mix + // 5 Flags + // 0x0F Set indicated default attributes to initial values. + // (Data field is not present in this instance) + // 0x8F Set indicated default attributes to specified values. + // 6-n Data - data values as required, in this order if present. + // No space is reserved for attributes for which the corresponding Mask flag was not + // set. + // (2*G bytes) - Marker box + // (1 byte) - Marker precision + // (1 byte) - Marker set + // (1 byte) - Marker symbol + // (4 bytes) - Marker color + // (4 bytes) - Marker background color + // (1 byte) - Marker mix + // (1 byte) - Marker background mix (G=2 or 4 depending on the Geometrics + // parameter of Set Default Parameter Format) + *pMET << (BYTE)0x21 << (BYTE)0x0c << (BYTE)0x03 << (BYTE)0x40 + << (BYTE)0x00 << (BYTE)0x8f + << (BYTE)0x66 << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00 + << (BYTE)0x66 << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00; + + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Pattern Attributes 0x04 + // 3-4 Mask - OR of as many of the following bits as are required: + // 0x0800 Pattern set + // 0x0100 Pattern symbol + // 0x0080 Pattern reference point + // 0x0008 Pattern color + // 0x0004 Pattern background color + // 0x0002 Pattern mix + // 0x0001 Pattern background mix + // 5 Flags + // + // 0x0F Set indicated default attributes to initial values. + // (Data field is not present in this instance) + // 0x8F Set indicated default attributes to specified values. + // 6-n Data - data values as required, in this order if present. + // No space is reserved for attributes for which the corresponding Mask flag was + // not set. + // + // (1 byte) - Pattern set + // (1 byte) - Pattern symbol + // (2*G bytes) - Pattern reference point + // (4 bytes) - Pattern color + // (4 bytes) - Pattern background color + // (1 byte) - Pattern mix + // (1 byte) - Pattern background mix (G=2 or 4 depending on the Geometrics + // parameter of Set Default Parameter Format) + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Image Attributes 0x06 + // 3-4 Mask - OR of as many of these bits as are required: + // 0x0008 Image color + // 0x0004 Image background color + // 0x0002 Image mix + // 0x0001 Image background mix + // 5 Flags + // 0x0F Set indicated default attributes to initial values. (Data field is not present in + // this instance) + // 0x8F Set indicated default attributes to specified values. + // 6-n Data - data values as required, in this order if present. + // No space is reserved for attributes for which the corresponding Mask flag was + // not set. + // (4 bytes) - Image color + // (4 bytes) - Image background color + // (1 byte) - Image mix + // (1 byte) - Image background mix + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Viewing Window 0x05 + // 3-4 Mask - OR of as many of the following bits as are required: + // 0x8000 x left limit + // 0x4000 x right limit + // 0x2000 y bottom limit + // 0x1000 y top limit + // 5 Flags + // 0x0F Set indicated default attributes to initial values. + // (Data field is not present in this case). + // 0x8F Set indicated default attributes to specified values. + // 6-n Data - data values as required, in the following order if present. + // No space is reserved for attributes for which the corresponding Mask flag was + // not set. + // (2*G bytes) - x left limit + // (2*G bytes) - x right limit + // (2*G bytes) - y bottom limit + // (2*G bytes) - y top limit (G=2 or 4 depending on the Geometrics parameter of Set + // Default Parameter Format) + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Arc Parameters 0x0B + // 3-4 Mask - OR of as many of the following bits as are required: + // 0x8000 P value + // 0x4000 Q value + // 0x2000 R value + // 0x1000 S value + // 5 Flags + // 0x0F Set indicated default attributes to initial values. + // (Data field is not present in this case). + // 0x8F Set indicated default attributes to specified values. + // 6-n Data - data values as required, in the following order if present. + // No space is reserved for attributes for which the corresponding Mask flag was + // not set. + // (G bytes) - P value + // (G bytes) - Q value + // (G bytes) - R value + // (G bytes) - S value (G=2 or 4 depending on the Geometrics parameter of Set + // Default Parameter Format) + // 0 0x21 Set Current Defaults + // 1 Length of following data + // 2 Set Default Pick Identifier 0x0C + // 3-4 Mask - OR of as many of the following bits as are required: + // 0x8000 Pick identifier + // 5 Flags + // 0x0F Set indicated default attributes to initial values. + // (Data field is not present in this case). + // 0x8F Set indicated default attributes to specified values. + // 6-n Data - data values as required, in the following order if present. + // No space is reserved for attributes for which the corresponding Mask flag was + // not set. + // (4 bytes) - Pick identifier + + // 0 0xE7 Set Bit-map Identifier + // 1 Length of following data 0x07 + // 2-3 Usage Flags 0x8000 + // 4-7 Bit-map handle + // 8 Lcid + if (nNumberOfBitmaps>0) { + *pMET << (BYTE)0xe7 << (BYTE)0x07 << (BYTE)0x80 << (BYTE)0x00; + WriteBigEndianLong(nActBitmapId); + *pMET << (BYTE)0xfe; + } + + UpdateFieldSize(); + + if (pMET->GetError()) bStatus=FALSE; +} + + +void METWriter::WillWriteOrder(ULONG nNextOrderMaximumLength) +{ + // Die Parameter eines 'Graphics Data Fields' duerfen (laut OS2-Doku) + // hoechstens 32759 Bytes umfassen. Gemeint ist die Laenge des Feldes minus + // dem 'Structured Field Introducer' (groesse: 8). Also darf die Groesse + // des ganzen Fields hoechstens 8+32759=32767=0x7fff sein. + // Zur Sicherheit nehmen wir lieber 30000 als Grenze. + + if (pMET->Tell()-nActualFieldStartPos+nNextOrderMaximumLength>30000) + { + UpdateFieldSize(); + WriteFieldIntroducer(0,DatGrfObjMagic,0,0); + nNumberOfDataFields++; + } +} + + + +void METWriter::METBitBlt(Point aPt, Size aSize, const Bitmap & rBitmap) +{ + WillWriteOrder(46); + *pMET << (BYTE)0xd6 << (BYTE)44 << (USHORT)0 << (USHORT) 0x00cc; + WriteBigEndianLong(nActBitmapId++); + *pMET << (BYTE)0x02 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00; + WritePoint(Point(aPt.X(),aPt.Y()+aSize.Height())); + WritePoint(Point(aPt.X()+aSize.Width(),aPt.Y())); + *pMET << (sal_uInt32)0 << (sal_uInt32)0 + << (sal_uInt32)(rBitmap.GetSizePixel().Width()) + << (sal_uInt32)(rBitmap.GetSizePixel().Height()); +} + +void METWriter::METSetAndPushLineInfo( const LineInfo& rLineInfo ) +{ + INT32 nWidth = OutputDevice::LogicToLogic( Size( rLineInfo.GetWidth(),0 ), aPictureMapMode, aTargetMapMode ).Width(); + + WillWriteOrder( 8 ); // set stroke linewidth + *pMET << (BYTE)0x15 + << (BYTE)6 + << (BYTE)0 // Flags + << (BYTE)0 + << nWidth; + + if ( rLineInfo.GetStyle() != LINE_SOLID ) + { + BYTE nStyle = 0; // LineDefault; + + switch ( rLineInfo.GetStyle() ) + { + case LINE_NONE : + nStyle = 8; + break; + + case LINE_DASH : + { + if ( rLineInfo.GetDotCount() ) + { + if ( !rLineInfo.GetDashCount() ) + nStyle = 1; // LINE_DOT + else + nStyle = 3; // LINE_DASH_DOT + } + else + nStyle = 2; // LINE_DASH + } + break; + case LineStyle_SOLID: + case LineStyle_FORCE_EQUAL_SIZE: + break; // not handled -Wall + } + WillWriteOrder( 2 ); + *pMET << (BYTE)0x18 << nStyle; // set LineType + } +} + +void METWriter::METPopLineInfo( const LineInfo& rLineInfo ) +{ + WillWriteOrder( 8 ); // set stroke linewidth + *pMET << (BYTE)0x15 + << (BYTE)6 + << (BYTE)0 // Flags + << (BYTE)0 + << (UINT32)1; + + if ( rLineInfo.GetStyle() != LINE_SOLID ) + { + WillWriteOrder( 2 ); + *pMET << (BYTE)0x18 << (BYTE)0; // set LineType + } +} + +void METWriter::METBeginArea(BOOL bBoundaryLine) +{ + WillWriteOrder(2); + *pMET << (BYTE)0x68; + if (bBoundaryLine) *pMET << (BYTE)0xc0; + else *pMET << (BYTE)0x80; +} + + +void METWriter::METEndArea() +{ + WillWriteOrder(2); + *pMET << (BYTE)0x60 << (BYTE)0; +} + + +void METWriter::METBeginPath(sal_uInt32 nPathId) +{ + WillWriteOrder(8); + *pMET << (BYTE)0xd0 << (BYTE)6 << (USHORT) 0 << nPathId; +} + + +void METWriter::METEndPath() +{ + WillWriteOrder(2); + *pMET << (BYTE)0x7f << (BYTE)0; +} + + +void METWriter::METFillPath(sal_uInt32 nPathId) +{ + WillWriteOrder(8); + *pMET << (BYTE)0xd7 << (BYTE)6 + << (BYTE)0x00 << (BYTE)0 << nPathId; +} + + +void METWriter::METOutlinePath(sal_uInt32 nPathId) +{ + WillWriteOrder(8); + *pMET << (BYTE)0xd4 << (BYTE)6 + << (BYTE)0 << (BYTE)0 << nPathId; +} + + +void METWriter::METCloseFigure() +{ + WillWriteOrder(2); + *pMET << (BYTE)0x7d << (BYTE)0; +} + + +void METWriter::METMove(Point aPt) +{ + WillWriteOrder(10); + *pMET << (BYTE)0x21 << (BYTE)8; + WritePoint(aPt); +} + + +void METWriter::METLine(Point aPt1, Point aPt2) +{ + WillWriteOrder(18); + *pMET << (BYTE)0xc1 << (BYTE)16; + WritePoint(aPt1); WritePoint(aPt2); +} + + +void METWriter::METLine(const Polygon & rPolygon) +{ + USHORT nNumPoints,i,j,nOrderPoints; + BOOL bFirstOrder; + + bFirstOrder=TRUE; + i=0; nNumPoints=rPolygon.GetSize(); + while (i30) nOrderPoints=30; + WillWriteOrder(nOrderPoints*8+2); + if (bFirstOrder==TRUE) { + *pMET << (BYTE)0xc1; // Line at given pos + bFirstOrder=FALSE; + } + else { + *pMET << (BYTE)0x81; // Line at current pos + } + *pMET << (BYTE)(nOrderPoints*8); + for (j=0; j360.0) fStartAngle-=360.0; + while (fStartAngle<0.0) fStartAngle+=360.0; + fSweepAngle*=180.0/3.14159265359; + while (fSweepAngle>360.0) fSweepAngle-=360.0; + while (fSweepAngle<.00) fSweepAngle+=360.0; + WillWriteOrder(22); + *pMET << (BYTE)0xa3 << (BYTE)20; + WritePoint(aCenter); + *pMET << (long)(fMultiplier*65536.0+0.5); + *pMET << (long)(fStartAngle*65536.0+0.5); + *pMET << (long)(fSweepAngle*65536.0+0.5); +} + + +void METWriter::METChrStr( Point aPt, String aUniStr ) +{ + USHORT nLen,i; + ByteString aStr( aUniStr, gsl_getSystemTextEncoding() ); + nLen = aStr.Len(); + WillWriteOrder( 11 + nLen ); + *pMET << (BYTE)0xc3 << (BYTE)( 9 + nLen ); + WritePoint(aPt); + for ( i = 0; i < nLen; i++ ) + *pMET << aStr.GetChar( i ); + *pMET << (BYTE)0; +} + + +void METWriter::METSetArcParams(long nP, long nQ, long nR, long nS) +{ + WillWriteOrder(18); + *pMET << (BYTE)0x22 << (BYTE)16 << nP << nQ << nR << nS; +} + + +void METWriter::METSetColor(Color aColor) +{ + if (aColor==aMETColor) return; + aMETColor=aColor; + + WillWriteOrder(6); + *pMET << (BYTE)0xa6 << (BYTE)4 << (BYTE)0 + << (BYTE)(aColor.GetBlue()) + << (BYTE)(aColor.GetGreen()) + << (BYTE)(aColor.GetRed()); +} + + +void METWriter::METSetBackgroundColor(Color aColor) +{ + if (aColor==aMETBackgroundColor) return; + aMETBackgroundColor=aColor; + + WillWriteOrder(6); + *pMET << (BYTE)0xa7 << (BYTE)4 << (BYTE)0 + << (BYTE)(aColor.GetBlue()) + << (BYTE)(aColor.GetGreen()) + << (BYTE)(aColor.GetRed()); +} + +void METWriter::METSetMix(RasterOp eROP) +{ + BYTE nMix; + + if (eMETMix==eROP) + return; + + eMETMix=eROP; + + switch (eROP) + { + case ROP_INVERT: nMix=0x0c; break; + case ROP_XOR: nMix=0x04; break; + default: nMix=0x02; + } + + WillWriteOrder(2); + *pMET << (BYTE)0x0c << nMix; +} + + +void METWriter::METSetChrCellSize(Size aSize) +{ + if (aMETChrCellSize==aSize) + return; + + aMETChrCellSize=aSize; + WillWriteOrder(10); + if (aSize.Width()==0) aSize.Width()=aSize.Height(); + *pMET << (BYTE)0x33 << (BYTE)8 << (long)aSize.Width() << (long)aSize.Height(); +} + + +void METWriter::METSetChrAngle(short nAngle) +{ + double fa; + long nax,nay; + + if (nMETChrAngle==nAngle) return; + nMETChrAngle=nAngle; + + if (nAngle==0) + { + nax=256; + nay=0; + } + else + { + fa=((double)nAngle)/1800.0*3.14159265359; + nax=(long)(256.0*cos(fa)+0.5); + nay=(long)(256.0*sin(fa)+0.5); + } + + WillWriteOrder(10); + *pMET << (BYTE)0x34 << (BYTE)8 << nax << nay; +} + + +void METWriter::METSetChrSet(BYTE nSet) +{ + if (nMETChrSet==nSet) + return; + + nMETChrSet=nSet; + WillWriteOrder(2); + *pMET << (BYTE)0x38 << nSet; +} + + +void METWriter::WriteOrders( const GDIMetaFile* pMTF ) +{ + if(bStatus==FALSE) + return; + + for( ULONG nA = 0, nACount = pMTF->GetActionCount(); nA < nACount; nA++ ) + { + const MetaAction* pMA = pMTF->GetAction( nA ); + + switch (pMA->GetType()) + { + case META_PIXEL_ACTION: + { + const MetaPixelAction* pA = (const MetaPixelAction*) pMA; + METSetMix( eGDIRasterOp ); + METSetColor( pA->GetColor() ); + METLine( pA->GetPoint(),pA->GetPoint() ); + } + break; + + case META_POINT_ACTION: + { + const MetaPointAction* pA = (const MetaPointAction*) pMA; + + METSetArcParams(1,1,0,0); + METSetMix(eGDIRasterOp); + METSetColor(aGDILineColor); + METBeginArea(FALSE); + METFullArc(pA->GetPoint(),0.5); + METEndArea(); + } + break; + + case META_LINE_ACTION: + { + const MetaLineAction* pA = (const MetaLineAction*) pMA; + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + LineInfo aLineInfo( pA->GetLineInfo() ); + if ( ! ( aLineInfo.IsDefault() ) ) + METSetAndPushLineInfo( aLineInfo ); + + METSetMix( eGDIRasterOp ); + METSetColor(aGDILineColor); + METBeginPath( 1 ); + METLine( pA->GetStartPoint(), pA->GetEndPoint() ); + METEndPath(); + METOutlinePath( 1 ); + + if ( ! ( aLineInfo.IsDefault() ) ) + METPopLineInfo( aLineInfo ); + } + } + break; + + case META_RECT_ACTION: + { + const MetaRectAction* pA = (const MetaRectAction*) pMA; + + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDIFillColor ); + METSetBackgroundColor( aGDIFillColor ); + METBox( TRUE, FALSE, pA->GetRect(), 0, 0 ); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDILineColor ); + METBox( FALSE, TRUE, pA->GetRect(), 0, 0 ); + } + } + break; + + case META_ROUNDRECT_ACTION: + { + const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pMA; + + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDIFillColor ); + METSetBackgroundColor( aGDIFillColor ); + METBox( TRUE, FALSE, pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() ); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDILineColor ); + METBox( FALSE, TRUE, pA->GetRect(), pA->GetHorzRound(), pA->GetVertRound() ); + } + } + break; + + case META_ELLIPSE_ACTION: + { + const MetaEllipseAction* pA = (const MetaEllipseAction*) pMA; + Point aCenter; + + aCenter.X()=(pA->GetRect().Left()+pA->GetRect().Right())/2; + aCenter.Y()=(pA->GetRect().Top()+pA->GetRect().Bottom())/2; + + METSetArcParams(pA->GetRect().GetWidth(), pA->GetRect().GetHeight(),0,0); + + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDIFillColor ); + METSetBackgroundColor( aGDIFillColor ); + METBeginArea(FALSE); + METFullArc(aCenter,0.5); + METEndArea(); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDILineColor ); + METFullArc( aCenter,0.5 ); + } + } + break; + + case META_ARC_ACTION: + { + const MetaArcAction* pA = (const MetaArcAction*) pMA; + Point aStartPos,aCenter; + double fdx,fdy,fa1,fa2; + + aCenter.X()=(pA->GetRect().Left()+pA->GetRect().Right())/2; + aCenter.Y()=(pA->GetRect().Top()+pA->GetRect().Bottom())/2; + fdx=(double)(pA->GetStartPoint().X()-aCenter.X()); + fdy=(double)(pA->GetStartPoint().Y()-aCenter.Y()); + fdx*=(double)pA->GetRect().GetHeight(); + fdy*=(double)pA->GetRect().GetWidth(); + if (fdx==0.0 && fdy==0.0) fdx=1.0; + fa1=atan2(-fdy,fdx); + fdx=(double)(pA->GetEndPoint().X()-aCenter.X()); + fdy=(double)(pA->GetEndPoint().Y()-aCenter.Y()); + fdx*=(double)pA->GetRect().GetHeight(); + fdy*=(double)pA->GetRect().GetWidth(); + if (fdx==0.0 && fdy==0.0) fdx=1.0; + fa2=atan2(-fdy,fdx); + aStartPos.X()=aCenter.X()+(long)(((double)pA->GetRect().GetWidth())*cos(fa1)/2.0+0.5); + aStartPos.Y()=aCenter.Y()-(long)(((double)pA->GetRect().GetHeight())*sin(fa1)/2.0+0.5); + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDILineColor ); + METSetArcParams(pA->GetRect().GetWidth(), pA->GetRect().GetHeight(),0,0); + METBeginPath(1); + METMove(aStartPos); + METPartialArcAtCurPos(aCenter,0.5,fa1,fa2-fa1); + METEndPath(); + METOutlinePath(1); + } + } + break; + + case META_PIE_ACTION: + { + const MetaPieAction* pA = (const MetaPieAction*) pMA; + Point aCenter; + double fdx,fdy,fa1,fa2; + + aCenter.X()=(pA->GetRect().Left()+pA->GetRect().Right())/2; + aCenter.Y()=(pA->GetRect().Top()+pA->GetRect().Bottom())/2; + fdx=(double)(pA->GetStartPoint().X()-aCenter.X()); + fdy=(double)(pA->GetStartPoint().Y()-aCenter.Y()); + fdx*=(double)pA->GetRect().GetHeight(); + fdy*=(double)pA->GetRect().GetWidth(); + if (fdx==0.0 && fdy==0.0) fdx=1.0; + fa1=atan2(-fdy,fdx); + fdx=(double)(pA->GetEndPoint().X()-aCenter.X()); + fdy=(double)(pA->GetEndPoint().Y()-aCenter.Y()); + fdx*=(double)pA->GetRect().GetHeight(); + fdy*=(double)pA->GetRect().GetWidth(); + if (fdx==0.0 && fdy==0.0) fdx=1.0; + fa2=atan2(-fdy,fdx); + + METSetArcParams(pA->GetRect().GetWidth(), pA->GetRect().GetHeight(),0,0); + + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDIFillColor ); + METSetBackgroundColor( aGDIFillColor ); + METBeginPath(1); + METMove(aCenter); + METPartialArcAtCurPos(aCenter,0.5,fa1,fa2-fa1); + METLineAtCurPos(aCenter); + METEndPath(); + METFillPath(1); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDILineColor ); + METBeginPath(1); + METMove(aCenter); + METPartialArcAtCurPos(aCenter,0.5,fa1,fa2-fa1); + METLineAtCurPos(aCenter); + METEndPath(); + METOutlinePath(1); + } + } + break; + + case META_CHORD_ACTION: + { + const MetaChordAction* pA = (const MetaChordAction*) pMA; + Point aStartPos,aCenter; + double fdx,fdy,fa1,fa2; + + aCenter.X()=(pA->GetRect().Left()+pA->GetRect().Right())/2; + aCenter.Y()=(pA->GetRect().Top()+pA->GetRect().Bottom())/2; + fdx=(double)(pA->GetStartPoint().X()-aCenter.X()); + fdy=(double)(pA->GetStartPoint().Y()-aCenter.Y()); + fdx*=(double)pA->GetRect().GetHeight(); + fdy*=(double)pA->GetRect().GetWidth(); + if (fdx==0.0 && fdy==0.0) fdx=1.0; + fa1=atan2(-fdy,fdx); + fdx=(double)(pA->GetEndPoint().X()-aCenter.X()); + fdy=(double)(pA->GetEndPoint().Y()-aCenter.Y()); + fdx*=(double)pA->GetRect().GetHeight(); + fdy*=(double)pA->GetRect().GetWidth(); + if (fdx==0.0 && fdy==0.0) fdx=1.0; + fa2=atan2(-fdy,fdx); + aStartPos.X()=aCenter.X()+(long)(((double)pA->GetRect().GetWidth())*cos(fa1)/2.0+0.5); + aStartPos.Y()=aCenter.Y()-(long)(((double)pA->GetRect().GetHeight())*sin(fa1)/2.0+0.5); + + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDIFillColor ); + METSetBackgroundColor( aGDIFillColor ); + METBeginPath(1); + METMove(aStartPos); + METPartialArcAtCurPos(aCenter,0.5,fa1,fa2-fa1); + METLineAtCurPos(aStartPos); + METEndPath(); + METFillPath(1); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix( eGDIRasterOp ); + METSetColor( aGDILineColor ); + METBeginPath(1); + METMove(aStartPos); + METPartialArcAtCurPos(aCenter,0.5,fa1,fa2-fa1); + METLineAtCurPos(aStartPos); + METEndPath(); + METOutlinePath(1); + } + } + break; + + case META_POLYLINE_ACTION: + { + const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA; + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + LineInfo aLineInfo( pA->GetLineInfo() ); + if ( ! ( aLineInfo.IsDefault() ) ) + METSetAndPushLineInfo( aLineInfo ); + + METSetMix(eGDIRasterOp); + METSetColor(aGDILineColor); + METBeginPath(1); + Polygon aSimplePoly; + const Polygon& rPoly = pA->GetPolygon(); + if ( rPoly.HasFlags() ) + rPoly.AdaptiveSubdivide( aSimplePoly ); + else + aSimplePoly = rPoly; + METLine( aSimplePoly ); + METEndPath(); + METOutlinePath(1); + + if ( ! ( aLineInfo.IsDefault() ) ) + METPopLineInfo( aLineInfo ); + } + } + break; + + case META_POLYGON_ACTION: + { + const MetaPolygonAction* pA = (const MetaPolygonAction*) pMA; + Polygon aSimplePoly; + const Polygon& rPoly = pA->GetPolygon(); + if ( rPoly.HasFlags() ) + rPoly.AdaptiveSubdivide( aSimplePoly ); + else + aSimplePoly = rPoly; + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix(eGDIRasterOp); + METSetColor(aGDIFillColor ); + METSetBackgroundColor(aGDIFillColor ); + METBeginPath(1); + METLine( aSimplePoly ); + METEndPath(); + METFillPath(1); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix(eGDIRasterOp); + METSetColor(aGDILineColor ); + METBeginPath(1); + METLine( aSimplePoly ); + METEndPath(); + METOutlinePath(1); + } + } + break; + + case META_POLYPOLYGON_ACTION: + { + const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pMA; + + PolyPolygon aSimplePolyPoly( pA->GetPolyPolygon() ); + sal_uInt16 i, nCount = aSimplePolyPoly.Count(); + for ( i = 0; i < nCount; i++ ) + { + if ( aSimplePolyPoly[ i ].HasFlags() ) + { + Polygon aSimplePoly; + aSimplePolyPoly[ i ].AdaptiveSubdivide( aSimplePoly ); + aSimplePolyPoly[ i ] = aSimplePoly; + } + } + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix(eGDIRasterOp); + METSetColor(aGDIFillColor); + METSetBackgroundColor(aGDIFillColor); + METBeginPath(1); + METLine( aSimplePolyPoly ); + METEndPath(); + METFillPath(1); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix(eGDIRasterOp); + METSetColor(aGDILineColor); + METBeginPath(1); + METLine( aSimplePolyPoly ); + METEndPath(); + METOutlinePath(1); + } + } + break; + + case META_TEXT_ACTION: + { + const MetaTextAction* pA = (const MetaTextAction*) pMA; + Point aPt( pA->GetPoint() ); + + if( aGDIFont.GetAlign() != ALIGN_BASELINE) + { + VirtualDevice aVDev; + + if( aGDIFont.GetAlign()==ALIGN_TOP ) + aPt.Y()+=(long)aVDev.GetFontMetric( aGDIFont ).GetAscent(); + else + aPt.Y()-=(long)aVDev.GetFontMetric( aGDIFont ).GetDescent(); + } + + METSetMix(eGDIRasterOp); + METSetColor(aGDIFont.GetColor()); + METSetBackgroundColor(aGDIFont.GetFillColor()); + METSetChrCellSize(aGDIFont.GetSize()); + METSetChrAngle(aGDIFont.GetOrientation()); + METSetChrSet(FindChrSet(aGDIFont)); + METChrStr(aPt, String(pA->GetText(),pA->GetIndex(),pA->GetLen())); + } + break; + + case META_TEXTARRAY_ACTION: + { + const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA; + USHORT i; + String aStr; + Polygon aPolyDummy(1); + short nOrientation; + Point aPt( pA->GetPoint() ); + + if( aGDIFont.GetAlign() != ALIGN_BASELINE ) + { + VirtualDevice aVDev; + if( aGDIFont.GetAlign() == ALIGN_TOP ) + aPt.Y()+=(long)aVDev.GetFontMetric(aGDIFont).GetAscent(); + else + aPt.Y()-=(long)aVDev.GetFontMetric(aGDIFont).GetDescent(); + } + + METSetMix(eGDIRasterOp); + METSetColor(aGDIFont.GetColor()); + METSetBackgroundColor(aGDIFont.GetFillColor()); + METSetChrCellSize(aGDIFont.GetSize()); + METSetChrAngle( nOrientation = aGDIFont.GetOrientation() ); + METSetChrSet(FindChrSet(aGDIFont)); + aStr=String(pA->GetText(),pA->GetIndex(),pA->GetLen()); + + if( pA->GetDXArray()!=NULL ) + { + Point aPt2; + + for( i=0; i < aStr.Len(); i++ ) + { + aPt2 = aPt; + if ( i > 0 ) + { + aPt2.X() += pA->GetDXArray()[i-1]; + if ( nOrientation ) + { + aPolyDummy.SetPoint( aPt2, 0 ); + aPolyDummy.Rotate( aPt, nOrientation ); + aPt2 = aPolyDummy.GetPoint( 0 ); + } + } + METChrStr( aPt2, String( aStr.GetChar( i ) ) ); + } + } + else + METChrStr( aPt, aStr ); + } + break; + + case META_STRETCHTEXT_ACTION: + { + const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pMA; + VirtualDevice aVDev; + USHORT i; + sal_Int32* pDXAry; + sal_Int32 nNormSize; + String aStr; + Polygon aPolyDummy(1); + short nOrientation; + Point aPt( pA->GetPoint() ); + Point aPt2; + + aVDev.SetFont( aGDIFont ); + + if( aGDIFont.GetAlign() != ALIGN_BASELINE) + { + if( aGDIFont.GetAlign() == ALIGN_TOP ) + aPt.Y()+=(long)aVDev.GetFontMetric().GetAscent(); + else + aPt.Y()-=(long)aVDev.GetFontMetric().GetDescent(); + } + + METSetMix(eGDIRasterOp); + METSetColor(aGDIFont.GetColor()); + METSetBackgroundColor(aGDIFont.GetFillColor()); + METSetChrCellSize(aGDIFont.GetSize()); + METSetChrAngle( nOrientation = aGDIFont.GetOrientation() ); + METSetChrSet(FindChrSet(aGDIFont)); + aStr=String(pA->GetText(),pA->GetIndex(),pA->GetLen()); + pDXAry=new sal_Int32[aStr.Len()]; + nNormSize = aVDev.GetTextArray( aStr, pDXAry ); + + for ( i = 0; i < aStr.Len(); i++ ) + { + aPt2 = aPt; + if ( i > 0 ) + { + aPt2.X() += pDXAry[i-1]*((long)pA->GetWidth())/ nNormSize; + if ( nOrientation ) + { + aPolyDummy.SetPoint( aPt2, 0 ); + aPolyDummy.Rotate( aPt, nOrientation ); + aPt2 = aPolyDummy.GetPoint( 0 ); + } + } + METChrStr( aPt2, String( aStr.GetChar( i ) ) ); + } + + delete[] pDXAry; + } + break; + + case META_TEXTRECT_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_TEXTRECT_ACTION!" ); + } + break; + + case META_BMP_ACTION: + { + const MetaBmpAction* pA = (const MetaBmpAction*) pMA; + + METSetMix(eGDIRasterOp); + METBitBlt( pA->GetPoint(), pA->GetBitmap().GetSizePixel(), pA->GetBitmap() ); + } + break; + + case META_BMPSCALE_ACTION: + { + const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA; + + METSetMix(eGDIRasterOp); + METBitBlt( pA->GetPoint(), pA->GetSize(), pA->GetBitmap() ); + } + break; + + case META_BMPSCALEPART_ACTION: + { + const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA; + Bitmap aTmp( pA->GetBitmap() ); + + aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + METSetMix( eGDIRasterOp ); + METBitBlt( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); + } + break; + + case META_BMPEX_ACTION: + { + const MetaBmpExAction* pA = (const MetaBmpExAction*) pMA; + Bitmap aTmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + + METSetMix(eGDIRasterOp); + METBitBlt( pA->GetPoint(), aTmp.GetSizePixel(), aTmp ); + } + break; + + case META_BMPEXSCALE_ACTION: + { + const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA; + Bitmap aTmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + + METSetMix(eGDIRasterOp); + METBitBlt( pA->GetPoint(), pA->GetSize(), aTmp ); + } + break; + + case META_BMPEXSCALEPART_ACTION: + { + const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA; + Bitmap aTmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + + aTmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + METSetMix(eGDIRasterOp); + METBitBlt( pA->GetDestPoint(), pA->GetDestSize(), aTmp ); + } + break; + + case META_EPS_ACTION : + { + const MetaEPSAction* pA = (const MetaEPSAction*)pMA; + const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); + + INT32 nCount = aGDIMetaFile.GetActionCount(); + for ( INT32 i = 0; i < nCount; i++ ) + { + const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i ); + if ( pMetaAct->GetType() == META_BMPSCALE_ACTION ) + { + const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*)pMetaAct; + METSetMix(eGDIRasterOp); + METBitBlt( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() ); + break; + } + } + } + break; + + case META_MASK_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_MASK_ACTION!" ); + } + break; + + case META_MASKSCALE_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_MASKSCALE_ACTION!" ); + } + break; + + case META_MASKSCALEPART_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_MASKSCALEPART_ACTION!" ); + } + break; + + case META_GRADIENT_ACTION: + { + VirtualDevice aVDev; + GDIMetaFile aTmpMtf; + const MetaGradientAction* pA = (const MetaGradientAction*) pMA; + + aVDev.SetMapMode( aTargetMapMode ); + aVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); + WriteOrders( &aTmpMtf ); + } + break; + + case META_HATCH_ACTION: + { + VirtualDevice aVDev; + GDIMetaFile aTmpMtf; + const MetaHatchAction* pA = (const MetaHatchAction*) pMA; + + aVDev.SetMapMode( aTargetMapMode ); + aVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); + WriteOrders( &aTmpMtf ); + } + break; + + case META_WALLPAPER_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_WALLPAPER_ACTION!" ); + } + break; + + case META_CLIPREGION_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_CLIPREGION_ACTION!" ); + } + break; + + case META_ISECTRECTCLIPREGION_ACTION: + { + const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA; + WriteClipRect( pA->GetRect() ); + } + break; + + case META_ISECTREGIONCLIPREGION_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_ISECTREGIONCLIPREGION_ACTION!" ); + } + break; + + case META_MOVECLIPREGION_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_MOVECLIPREGION_ACTION!" ); + } + break; + + case META_LINECOLOR_ACTION: + { + const MetaLineColorAction* pA = (const MetaLineColorAction*) pMA; + + if( pA->IsSetting() ) + aGDILineColor = pA->GetColor(); + else + aGDILineColor = Color( COL_TRANSPARENT ); + } + break; + + case META_FILLCOLOR_ACTION: + { + const MetaFillColorAction* pA = (const MetaFillColorAction*) pMA; + + if( pA->IsSetting() ) + aGDIFillColor = pA->GetColor(); + else + aGDIFillColor = Color( COL_TRANSPARENT ); + } + break; + + case META_TEXTCOLOR_ACTION: + { + const MetaTextColorAction* pA = (const MetaTextColorAction*) pMA; + aGDIFont.SetColor( pA->GetColor() ); + } + break; + + case META_TEXTFILLCOLOR_ACTION: + { + const MetaTextFillColorAction* pA = (const MetaTextFillColorAction*) pMA; + + if( pA->IsSetting() ) + aGDIFont.SetFillColor( pA->GetColor() ); + else + aGDIFont.SetFillColor( Color( COL_TRANSPARENT ) ); + } + break; + + case META_TEXTALIGN_ACTION: + { +// DBG_ERROR( "Unsupported MET-Action: META_TEXTALIGN_ACTION!" ); + } + break; + + case META_MAPMODE_ACTION: + { + const MetaMapModeAction* pA = (const MetaMapModeAction*) pMA; + + if( aPictureMapMode != pA->GetMapMode() ) + { + if ( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) + { + MapMode aMM = pA->GetMapMode(); + Fraction aScaleX = aMM.GetScaleX(); + Fraction aScaleY = aMM.GetScaleY(); + + Point aOrigin = aPictureMapMode.GetOrigin(); + BigInt aX( aOrigin.X() ); + aX *= BigInt( aScaleX.GetDenominator() ); + + if( aOrigin.X() >= 0 ) + { + if( aScaleX.GetNumerator() >= 0 ) + aX += BigInt( aScaleX.GetNumerator()/2 ); + else + aX -= BigInt( (aScaleX.GetNumerator()+1)/2 ); + } + else + { + if( aScaleX.GetNumerator() >= 0 ) + aX -= BigInt( (aScaleX.GetNumerator()-1)/2 ); + else + aX += BigInt( aScaleX.GetNumerator()/2 ); + } + + aX /= BigInt( aScaleX.GetNumerator() ); + aOrigin.X() = (long) aX + aMM.GetOrigin().X(); + + BigInt aY( aOrigin.Y() ); + aY *= BigInt( aScaleY.GetDenominator() ); + + if( aOrigin.Y() >= 0 ) + { + if( aScaleY.GetNumerator() >= 0 ) + aY += BigInt( aScaleY.GetNumerator()/2 ); + else + aY -= BigInt( (aScaleY.GetNumerator()+1)/2 ); + } + else + { + if( aScaleY.GetNumerator() >= 0 ) + aY -= BigInt( (aScaleY.GetNumerator()-1)/2 ); + else + aY += BigInt( aScaleY.GetNumerator()/2 ); + } + + aY /= BigInt( aScaleY.GetNumerator() ); + aOrigin.Y() = (long)aY + aMM.GetOrigin().Y(); + aPictureMapMode.SetOrigin( aOrigin ); + + aScaleX *= aPictureMapMode.GetScaleX(); + aScaleY *= aPictureMapMode.GetScaleY(); + aPictureMapMode.SetScaleX( aScaleX ); + aPictureMapMode.SetScaleY( aScaleY ); + } + else + aPictureMapMode=pA->GetMapMode(); + } + } + break; + + case META_FONT_ACTION: + { + aGDIFont = ( (const MetaFontAction*) pMA )->GetFont(); + } + break; + + case META_PUSH_ACTION: + { + METGDIStackMember* pGS = new METGDIStackMember; + + pGS->pSucc=pGDIStack; pGDIStack=pGS; + pGS->aLineColor=aGDILineColor; + pGS->aFillColor=aGDIFillColor; + pGS->eRasterOp=eGDIRasterOp; + pGS->aFont=aGDIFont; + pGS->aMapMode=aPictureMapMode; + pGS->aClipRect=aGDIClipRect; + } + break; + + case META_POP_ACTION: + { + METGDIStackMember* pGS; + + if( pGDIStack ) + { + pGS=pGDIStack; pGDIStack=pGS->pSucc; + aGDILineColor=pGS->aLineColor; + aGDIFillColor=pGS->aFillColor; + eGDIRasterOp=pGS->eRasterOp; + aGDIFont=pGS->aFont; + if ( pGS->aClipRect != aGDIClipRect ) + WriteClipRect( pGS->aClipRect ); + aPictureMapMode=pGS->aMapMode; + delete pGS; + } + } + break; + + case META_RASTEROP_ACTION: + { + eGDIRasterOp = ( (const MetaRasterOpAction*) pMA )->GetRasterOp(); + } + break; + + case META_TRANSPARENT_ACTION: + { + if( aGDIFillColor != Color( COL_TRANSPARENT ) ) + { + METSetMix(eGDIRasterOp); + METSetColor(aGDIFillColor); + METSetBackgroundColor(aGDIFillColor); + METBeginPath(1); + METLine(( (const MetaTransparentAction*) pMA )->GetPolyPolygon()); + METEndPath(); + METFillPath(1); + } + + if( aGDILineColor != Color( COL_TRANSPARENT ) ) + { + METSetMix(eGDIRasterOp); + METSetColor(aGDILineColor); + METBeginPath(1); + METLine(( (const MetaTransparentAction*) pMA )->GetPolyPolygon()); + METEndPath(); + METOutlinePath(1); + } + } + break; + + case META_FLOATTRANSPARENT_ACTION: + { + const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA; + + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; + + if( fScaleX != 1.0 || fScaleY != 1.0 ) + { + aTmpMtf.Scale( fScaleX, fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + } + + nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); + + if( nMoveX || nMoveY ) + aTmpMtf.Move( nMoveX, nMoveY ); + + WriteOrders( &aTmpMtf ); + } + break; + } + + nWrittenActions++; + MayCallback(); + + if( pMET->GetError() ) + bStatus=FALSE; + + if( bStatus == FALSE ) + break; + } +} + +void METWriter::WriteObjectEnvironmentGroup(const GDIMetaFile * pMTF) +{ + ULONG i, nId; + + //--- Das Feld 'Begin Object Environment Group': + WriteFieldIntroducer(16,BegObjEnvMagic,0,0); + WriteFieldId(7); + + //--- Das Feld 'Map Color Attribute Table': + WriteFieldIntroducer(22,MapColAtrMagic,0,0); + WriteBigEndianShort(0x000e); + *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00; + WriteFieldId(4); + + //--- Das erste Feld 'Map Coded Font': + WriteFieldIntroducer(32,MapCodFntMagic,0,0); + WriteBigEndianShort(0x0018); + *pMET << (BYTE)0x0c << (BYTE)0x02 << (BYTE)0x84 << (BYTE)0x00; + *pMET << (BYTE)0xff << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00; + *pMET << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00 << (BYTE)0x00; + *pMET << (BYTE)0x04 << (BYTE)0x24 << (BYTE)0x05 << (BYTE)0x00; + *pMET << (BYTE)0x06 << (BYTE)0x20; + *pMET << (BYTE)0x03 << (BYTE)0x97 << (BYTE)0x01 << (BYTE)0xb5; + + //--- Die weiteren Felder 'Map Coded Font': + CreateChrSets(pMTF); + WriteChrSets(); + + //--- Die Felder 'Map Data Resource': + nId=nActBitmapId; + for (i=0; iTell(); + + //--- Anfang des ersten Feldes 'Graphics Data' + WriteFieldIntroducer(0,DatGrfObjMagic,0,0); + nNumberOfDataFields++; + + // Nun schreiben wir zunaechst den Kopf des Segments: + *pMET << (BYTE)0x70 << (BYTE)0x0e << (sal_uInt32)0; + *pMET << (BYTE)0x70 << (BYTE)0x10; // Flags + *pMET << (USHORT)0; // Lo-Wort der Laenge der Segementdaten (Big Endian) + *pMET << (sal_uInt32)0; // Reserved + *pMET << (USHORT)0; // Hi-Wort der Laenge der Segementdaten (Big Endian) (Ohh Ohh OS2) + // Anmerkung: die richtige Daten-Laenge schreiben wir weiter unten nochmal + + // Jetzt werden alle Orders rausgeschrieben: + // (wobei die Sache ggf. in mehrere 'Graphics Data Fields' aufgeteilt + // wird, per Methode WillWriteOrder(..)) + WriteOrders(pMTF); + + //--- Das letzte Feld 'Graphic Data' beenden: + UpdateFieldSize(); + + //--- Und schliesslich die Segmentgroesse richtigstellen: + nPos=pMET->Tell(); + nSegmentSize=nPos-nDataFieldsStartPos; + nSegmentSize-=nNumberOfDataFields*8; // Structured Field Introducers zaehlen nicht mit + pMET->Seek(nDataFieldsStartPos+16); // Zum Lo-Wort der Segmentgroesse seeken + WriteBigEndianShort((USHORT)(nSegmentSize&0x0000ffff)); // Und schreiben + pMET->Seek(nDataFieldsStartPos+22); // Zum Hi-Wort der Segmentgroesse seeken + WriteBigEndianShort((USHORT)(nSegmentSize>>16)); // Und schreiben + pMET->Seek(nPos); // Zurueck zur Tagesordnung + + //--- Das Feld 'End Graphic Objects': + WriteFieldIntroducer(16,EndGrfObjMagic,0,0); + WriteFieldId(7); + + if( pMET->GetError() ) + bStatus=FALSE; +} + + +void METWriter::WriteResourceGroup(const GDIMetaFile * pMTF) +{ + if( bStatus==FALSE ) + return; + + //--- Das Feld 'Begin Resource Group': + WriteFieldIntroducer(16,BegResGrpMagic,0,0); + WriteFieldId(2); + + //--- Der Inhalt: + WriteColorAttributeTable(); + nActBitmapId=0x77777700; + WriteImageObjects(pMTF); + nActBitmapId=0x77777700; + WriteGraphicsObject(pMTF); + + //--- Das Feld 'End Resource Group': + WriteFieldIntroducer(16,EndResGrpMagic,0,0); + WriteFieldId(2); + + if( pMET->GetError() ) + bStatus=FALSE; +} + + +void METWriter::WriteDocument(const GDIMetaFile * pMTF) +{ + if( bStatus==FALSE ) + return; + + //--- Das Feld 'Begin Document': + WriteFieldIntroducer(0,BegDocumnMagic,0,0); + WriteFieldId(1); + *pMET << (BYTE)0x00 << (BYTE)0x00; + *pMET << (BYTE)0x05 << (BYTE)0x18 << (BYTE)0x03 << (BYTE)0x0c << (BYTE)0x00; + *pMET << (BYTE)0x06 << (BYTE)0x01 << (BYTE)0x03 << (BYTE)0xd4 << (BYTE)0x03 << (BYTE)0x52; + *pMET << (BYTE)0x03 << (BYTE)0x65 << (BYTE)0x00; + UpdateFieldSize(); + + //--- Der Inhalt: + WriteResourceGroup(pMTF); + + //--- Das Feld 'End Document': + WriteFieldIntroducer(16,EndDocumnMagic,0,0); + WriteFieldId(1); + + if( pMET->GetError() ) + bStatus=FALSE; +} + +BOOL METWriter::WriteMET( const GDIMetaFile& rMTF, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem ) +{ + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + METChrSet* pCS; + METGDIStackMember* pGS; + + bStatus=TRUE; + nLastPercent=0; + + pMET=&rTargetStream; + pMET->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + + aPictureRect = Rectangle( Point(), rMTF.GetPrefSize() ); + aTargetMapMode = aPictureMapMode = rMTF.GetPrefMapMode(); + + aGDILineColor=Color( COL_BLACK ); + aGDIFillColor=Color( COL_WHITE ); + eGDIRasterOp=ROP_OVERPAINT; + aGDIFont=Font(); + aGDIMapMode=MapMode(); + aGDIClipRect=Rectangle(); + pGDIStack=NULL; + aMETColor=Color(COL_BLACK); + aMETBackgroundColor=Color(COL_WHITE); + eMETMix=ROP_OVERPAINT; + nMETStrokeLineWidth=1; + aMETChrCellSize=Size(0,0); + nMETChrAngle=0; + nMETChrSet=0x00; + pChrSetList=NULL; + nNextChrSetId=1; + nNumberOfActions=0; + nNumberOfBitmaps=0; + nWrittenActions=0; + nWrittenBitmaps=0; + nActBitmapPercent=0; + + CountActionsAndBitmaps(&rMTF); + + WriteDocument(&rMTF); + + while( pChrSetList ) + { + pCS=pChrSetList; + pChrSetList=pCS->pSucc; + delete pCS; + } + + while( pGDIStack ) + { + pGS=pGDIStack; + pGDIStack=pGS->pSucc; + delete pGS; + } + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return bStatus; +} + +//================== GraphicExport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, BOOL ) +{ METWriter aMETWriter; + + if ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE ) + return aMETWriter.WriteMET( rGraphic.GetGDIMetaFile(), rStream, pFilterConfigItem ); + else + { + Bitmap aBmp=rGraphic.GetBitmap(); + GDIMetaFile aMTF; + VirtualDevice aVirDev; + + aMTF.Record(&aVirDev); + aVirDev.DrawBitmap(Point(),aBmp); + aMTF.Stop(); + aMTF.SetPrefSize(aBmp.GetSizePixel()); + return aMETWriter.WriteMET( aMTF, rStream, pFilterConfigItem ); + } +} + +//================== GraphicDialog - die exportierte Funktion ================ + +extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara ) +{ + BOOL bRet = FALSE; + + if ( rPara.pWindow ) + { + ByteString aResMgrName( "eme" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + rPara.pResMgr = pResMgr; + bRet = ( DlgExportEMET( rPara ).Execute() == RET_OK ); + delete pResMgr; + } + else + bRet = TRUE; + } + + return bRet; +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/eos2met/eos2mstr.src b/filter/source/graphicfilter/eos2met/eos2mstr.src new file mode 100644 index 000000000000..8afebcb7564c --- /dev/null +++ b/filter/source/graphicfilter/eos2met/eos2mstr.src @@ -0,0 +1,38 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "strings.hrc" + +String KEY_MODE +{ + Text = "ExportMode"; +}; + +String KEY_SIZE +{ + Text = "Size"; +}; diff --git a/filter/source/graphicfilter/eos2met/exports.map b/filter/source/graphicfilter/eos2met/exports.map new file mode 100644 index 000000000000..61e4682c6551 --- /dev/null +++ b/filter/source/graphicfilter/eos2met/exports.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + GraphicExport; + DoExportDialog; + + local: + *; +}; diff --git a/filter/source/graphicfilter/eos2met/makefile.mk b/filter/source/graphicfilter/eos2met/makefile.mk new file mode 100644 index 000000000000..9f8deb74c7ca --- /dev/null +++ b/filter/source/graphicfilter/eos2met/makefile.mk @@ -0,0 +1,74 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=eos2met +TARGET2=eme +DEPTARGET=veos2met + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SRS1NAME=$(TARGET) +SRC1FILES= dlgeos2.src \ + eos2mstr.src +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/eos2met.obj \ + $(SLO)$/dlgeos2.obj +.ENDIF +# ========================================================================== + +RESLIB1NAME=$(TARGET2) +RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs +.IF "$(L10N_framework)"=="" +SHL1TARGET= eme$(DLLPOSTFIX) +SHL1IMPLIB= eos2met +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/eos2met.lib +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/eos2met.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/eos2met/strings.hrc b/filter/source/graphicfilter/eos2met/strings.hrc new file mode 100644 index 000000000000..7834e3ea2bc0 --- /dev/null +++ b/filter/source/graphicfilter/eos2met/strings.hrc @@ -0,0 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ +#define KEY_MODE 260 +#define KEY_SIZE 261 + diff --git a/filter/source/graphicfilter/epbm/dlgepbm.cxx b/filter/source/graphicfilter/epbm/dlgepbm.cxx new file mode 100644 index 000000000000..932fb7ff5bb9 --- /dev/null +++ b/filter/source/graphicfilter/epbm/dlgepbm.cxx @@ -0,0 +1,99 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#ifndef GCC +#endif + +#include +#include +#include +#include "dlgepbm.hxx" +#include "dlgepbm.hrc" +#include "strings.hrc" + +/************************************************************************* +|* +|* Ctor +|* +\************************************************************************/ + +DlgExportEPBM::DlgExportEPBM( FltCallDialogParameter& rPara ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPBM, *rPara.pResMgr ) ), + rFltCallPara ( rPara ), + aGrpFormat ( this, ResId( GRP_FORMAT, *rPara.pResMgr ) ), + aRBRaw ( this, ResId( RB_RAW, *rPara.pResMgr ) ), + aRBASCII ( this, ResId( RB_ASCII, *rPara.pResMgr ) ), + aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + pMgr ( rPara.pResMgr ) +{ + FreeResource(); + + // Config-Parameter lesen + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PBM" ) ); + pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + sal_Int32 nFormat = pConfigItem->ReadInt32( String( ResId( KEY_FORMAT, *pMgr ) ), 1 ); + + BOOL bCheck = FALSE; + if ( !nFormat ) + bCheck ^= TRUE; + + aRBRaw.Check( bCheck ); + bCheck ^= TRUE; + aRBASCII.Check( bCheck ); + + aBtnOK.SetClickHdl( LINK( this, DlgExportEPBM, OK ) ); +} + +DlgExportEPBM::~DlgExportEPBM() +{ + delete pConfigItem; +} + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEPBM, OK, void *, EMPTYARG ) +{ + + // Config-Parameter schreiben + sal_Int32 nFormat = 0; + if ( aRBASCII.IsChecked() ) + nFormat++; + pConfigItem->WriteInt32( String( ResId( KEY_FORMAT, *pMgr ) ), nFormat ); + rFltCallPara.aFilterData = pConfigItem->GetFilterData(); + EndDialog( RET_OK ); + + return 0; +} diff --git a/filter/source/graphicfilter/epbm/dlgepbm.hrc b/filter/source/graphicfilter/epbm/dlgepbm.hrc new file mode 100644 index 000000000000..876dfa840997 --- /dev/null +++ b/filter/source/graphicfilter/epbm/dlgepbm.hrc @@ -0,0 +1,34 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "filter.hrc" + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define GRP_FORMAT 1 +#define RB_RAW 1 +#define RB_ASCII 2 diff --git a/filter/source/graphicfilter/epbm/dlgepbm.hxx b/filter/source/graphicfilter/epbm/dlgepbm.hxx new file mode 100644 index 000000000000..780eac366020 --- /dev/null +++ b/filter/source/graphicfilter/epbm/dlgepbm.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DLGEPBM_HXX_ +#define _DLGEPBM_HXX_ +#include +#include +#include +#include +#include +#include + + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen +|* +\************************************************************************/ + +class ResMgr; + +class FilterConfigItem; +class DlgExportEPBM : public ModalDialog +{ +private: + + FltCallDialogParameter& rFltCallPara; + + FixedLine aGrpFormat; + RadioButton aRBRaw; + RadioButton aRBASCII; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + FilterConfigItem* pConfigItem; + ResMgr* pMgr; + + DECL_LINK( OK, void * ); + +public: + DlgExportEPBM( FltCallDialogParameter& rPara ); + ~DlgExportEPBM(); +}; + +#endif // _DLGEPBM_HXX_ diff --git a/filter/source/graphicfilter/epbm/dlgepbm.src b/filter/source/graphicfilter/epbm/dlgepbm.src new file mode 100644 index 000000000000..b4e6eb2decf2 --- /dev/null +++ b/filter/source/graphicfilter/epbm/dlgepbm.src @@ -0,0 +1,106 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "dlgepbm.hrc" +ModalDialog DLG_EXPORT_EPBM +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 133 , 63 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + Text [ en-US ] = "PBM Options" ; + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 73 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 73 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 73 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + FixedLine GRP_FORMAT + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 60 , 8 ) ; + Text [ en-US ] = "File format"; + }; + RadioButton RB_RAW + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Binary"; + }; + RadioButton RB_ASCII + { + Pos = MAP_APPFONT ( 12 , 28 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Text"; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/epbm/epbm.cxx b/filter/source/graphicfilter/epbm/epbm.cxx new file mode 100644 index 000000000000..fe8dc77fc704 --- /dev/null +++ b/filter/source/graphicfilter/epbm/epbm.cxx @@ -0,0 +1,272 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include "strings.hrc" +#include "dlgepbm.hrc" +#include "dlgepbm.hxx" + +//============================ PBMWriter ================================== + +class PBMWriter { + +private: + + SvStream* mpOStm; // Die auszugebende PBM-Datei + USHORT mpOStmOldModus; + + BOOL mbStatus; + sal_Int32 mnMode; // 0 -> raw, 1-> ascii + BitmapReadAccess* mpAcc; + ULONG mnWidth, mnHeight; // Bildausmass in Pixeln + + BOOL ImplWriteHeader(); + void ImplWriteBody(); + void ImplWriteNumber( sal_Int32 ); + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + +public: + PBMWriter(); + ~PBMWriter(); + + BOOL WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigItem* pFilterConfigItem ); +}; + +//=================== Methoden von PBMWriter ============================== + +PBMWriter::PBMWriter() : + mbStatus ( TRUE ), + mpAcc ( NULL ) +{ +} + +// ------------------------------------------------------------------------ + +PBMWriter::~PBMWriter() +{ +} + +// ------------------------------------------------------------------------ + +BOOL PBMWriter::WritePBM( const Graphic& rGraphic, SvStream& rPBM, FilterConfigItem* pFilterConfigItem ) +{ + + mpOStm = &rPBM; + + if ( pFilterConfigItem ) + { + mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); + + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp = aBmpEx.GetBitmap(); + aBmp.Convert( BMP_CONVERSION_1BIT_THRESHOLD ); + + mpOStmOldModus = mpOStm->GetNumberFormatInt(); + mpOStm->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + + mpAcc = aBmp.AcquireReadAccess(); + if( mpAcc ) + { + if ( ImplWriteHeader() ) + ImplWriteBody(); + + aBmp.ReleaseAccess( mpAcc ); + } + else + mbStatus = FALSE; + + mpOStm->SetNumberFormatInt( mpOStmOldModus ); + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +BOOL PBMWriter::ImplWriteHeader() +{ + mnWidth = mpAcc->Width(); + mnHeight = mpAcc->Height(); + if ( mnWidth && mnHeight ) + { + if ( mnMode == 0 ) + *mpOStm << "P4\x0a"; + else + *mpOStm << "P1\x0a"; + + ImplWriteNumber( mnWidth ); + *mpOStm << (BYTE)32; + ImplWriteNumber( mnHeight ); + *mpOStm << (BYTE)10; + } + else mbStatus = FALSE; + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void PBMWriter::ImplWriteBody() +{ + if ( mnMode == 0 ) + { + BYTE nBYTE = 0; + for ( ULONG y = 0; y < mnHeight; y++ ) + { + ULONG x; + for ( x = 0; x < mnWidth; x++ ) + { + nBYTE <<= 1; + if (!(mpAcc->GetPixel( y, x ) & 1 ) ) + nBYTE++; + if ( ( x & 7 ) == 7 ) + *mpOStm << nBYTE; + } + if ( ( x & 7 ) != 0 ) + *mpOStm << (BYTE)( nBYTE << ( ( x ^ 7 ) + 1 ) ); + } + } + else + { + int nxCount; + for ( ULONG y = 0; y < mnHeight; y++ ) + { + nxCount = 70; + for ( ULONG x = 0; x < mnWidth; x++ ) + { + if (!( --nxCount ) ) + { + nxCount = 69; + *mpOStm << (BYTE)10; + } + *mpOStm << (BYTE)( ( mpAcc->GetPixel( y, x ) ^ 1 ) + '0' ) ; + } + *mpOStm << (BYTE)10; + } + } +} + +// ------------------------------------------------------------------------ +// eine Dezimalzahl im ASCII format wird in den Stream geschrieben + +void PBMWriter::ImplWriteNumber( sal_Int32 nNumber ) +{ + const ByteString aNum( ByteString::CreateFromInt32( nNumber ) ); + + for( sal_Int16 n = 0, nLen = aNum.Len(); n < nLen; n++ ) + *mpOStm << aNum.GetChar( n ); + +} + +// ------------------------------------------------------------------------ + +// --------------------- +// - exported function - +// --------------------- + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL ) +{ + PBMWriter aPBMWriter; + + return aPBMWriter.WritePBM( rGraphic, rStream, pFilterConfigItem ); +} + +// ------------------------------------------------------------------------ + +extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara ) +{ + BOOL bRet = FALSE; + + if ( rPara.pWindow ) + { + ByteString aResMgrName( "epb" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + rPara.pResMgr = pResMgr; + bRet = ( DlgExportEPBM( rPara ).Execute() == RET_OK ); + delete pResMgr; + } + else + bRet = TRUE; + } + + return bRet; +} + +// ------------------------------------------------------------------------ +#ifndef GCC +#endif + +// --------------- +// - Win16 trash - +// --------------- + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ + if ( nHeap ) + UnlockData( 0 ); + + hDLLInst = hDLL; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/epbm/epbmstr.src b/filter/source/graphicfilter/epbm/epbmstr.src new file mode 100644 index 000000000000..8424505dbcd1 --- /dev/null +++ b/filter/source/graphicfilter/epbm/epbmstr.src @@ -0,0 +1,35 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "strings.hrc" + +// Key fuer den Dialog +String KEY_FORMAT +{ + Text = "FileFormat"; +}; diff --git a/filter/source/graphicfilter/epbm/exports.map b/filter/source/graphicfilter/epbm/exports.map new file mode 100644 index 000000000000..61e4682c6551 --- /dev/null +++ b/filter/source/graphicfilter/epbm/exports.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + GraphicExport; + DoExportDialog; + + local: + *; +}; diff --git a/filter/source/graphicfilter/epbm/makefile.mk b/filter/source/graphicfilter/epbm/makefile.mk new file mode 100644 index 000000000000..3b248222cda1 --- /dev/null +++ b/filter/source/graphicfilter/epbm/makefile.mk @@ -0,0 +1,75 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=epbm +TARGET2=epb +DEPTARGET=vepbm + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SRS1NAME=$(TARGET) +SRC1FILES= dlgepbm.src \ + epbmstr.src +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/epbm.obj \ + $(SLO)$/dlgepbm.obj +.ENDIF +# ========================================================================== + +RESLIB1NAME=$(TARGET2) +RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs +.IF "$(L10N_framework)"=="" +SHL1TARGET= epb$(DLLPOSTFIX) +SHL1IMPLIB= epbm +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(CPPULIB) $(SVTOOLLIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/epbm.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/epbm.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/epbm/strings.hrc b/filter/source/graphicfilter/epbm/strings.hrc new file mode 100644 index 000000000000..122719e87d4b --- /dev/null +++ b/filter/source/graphicfilter/epbm/strings.hrc @@ -0,0 +1,27 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ +#define KEY_FORMAT 256 diff --git a/filter/source/graphicfilter/epgm/dlgepgm.cxx b/filter/source/graphicfilter/epgm/dlgepgm.cxx new file mode 100644 index 000000000000..3aa960b25a26 --- /dev/null +++ b/filter/source/graphicfilter/epgm/dlgepgm.cxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#ifndef GCC +#endif + +#include +#include +#include +#include "dlgepgm.hxx" +#include "dlgepgm.hrc" +#include "strings.hrc" + +/************************************************************************* +|* +|* Ctor +|* +\************************************************************************/ + +DlgExportEPGM::DlgExportEPGM( FltCallDialogParameter& rPara ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPGM, *rPara.pResMgr ) ), + rFltCallPara ( rPara ), + aGrpFormat ( this, ResId( GRP_FORMAT, *rPara.pResMgr ) ), + aRBRaw ( this, ResId( RB_RAW, *rPara.pResMgr ) ), + aRBASCII ( this, ResId( RB_ASCII, *rPara.pResMgr ) ), + aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + pMgr ( rPara.pResMgr ) +{ + FreeResource(); + + // Config-Parameter lesen + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PGM" ) ); + pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + sal_Int32 nFormat = pConfigItem->ReadInt32( String( ResId( KEY_FORMAT, *pMgr ) ), 0 ); + + BOOL bCheck = FALSE; + if ( !nFormat ) + bCheck ^= TRUE; + aRBRaw.Check( bCheck ); + bCheck ^= TRUE; + aRBASCII.Check( bCheck ); + + aBtnOK.SetClickHdl( LINK( this, DlgExportEPGM, OK ) ); +} + +DlgExportEPGM::~DlgExportEPGM() +{ + delete pConfigItem; +} + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEPGM, OK, void *, EMPTYARG ) +{ + // Config-Parameter schreiben + sal_Int32 nFormat = 0; + if ( aRBASCII.IsChecked() ) + nFormat++; + pConfigItem->WriteInt32( String( ResId( KEY_FORMAT, *pMgr ) ), nFormat ); + rFltCallPara.aFilterData = pConfigItem->GetFilterData(); + EndDialog( RET_OK ); + + return 0; +} diff --git a/filter/source/graphicfilter/epgm/dlgepgm.hrc b/filter/source/graphicfilter/epgm/dlgepgm.hrc new file mode 100644 index 000000000000..876dfa840997 --- /dev/null +++ b/filter/source/graphicfilter/epgm/dlgepgm.hrc @@ -0,0 +1,34 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "filter.hrc" + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define GRP_FORMAT 1 +#define RB_RAW 1 +#define RB_ASCII 2 diff --git a/filter/source/graphicfilter/epgm/dlgepgm.hxx b/filter/source/graphicfilter/epgm/dlgepgm.hxx new file mode 100644 index 000000000000..3eb91bdb5fc6 --- /dev/null +++ b/filter/source/graphicfilter/epgm/dlgepgm.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DLGEPGM_HXX_ +#define _DLGEPGM_HXX_ +#include +#include +#include +#include +#include +#include + + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen +|* +\************************************************************************/ + +class FilterConfigItem; +class ResMgr; + +class DlgExportEPGM : public ModalDialog +{ +private: + + FltCallDialogParameter& rFltCallPara; + + FixedLine aGrpFormat; + RadioButton aRBRaw; + RadioButton aRBASCII; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + FilterConfigItem* pConfigItem; + ResMgr* pMgr; + + DECL_LINK( OK, void * ); + +public: + DlgExportEPGM( FltCallDialogParameter& rPara ); + ~DlgExportEPGM(); +}; + +#endif // _DLGEPGM_HXX_ diff --git a/filter/source/graphicfilter/epgm/dlgepgm.src b/filter/source/graphicfilter/epgm/dlgepgm.src new file mode 100644 index 000000000000..39e91d29fdf5 --- /dev/null +++ b/filter/source/graphicfilter/epgm/dlgepgm.src @@ -0,0 +1,105 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "dlgepgm.hrc" +ModalDialog DLG_EXPORT_EPGM +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 133 , 63 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + Text [ en-US ] = "PGM Options" ; + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 73 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 73 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 73 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + FixedLine GRP_FORMAT + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 60 , 8 ) ; + Text [ en-US ] = "File format"; + }; + RadioButton RB_RAW + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Binary"; + }; + RadioButton RB_ASCII + { + Pos = MAP_APPFONT ( 12 , 28 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Text"; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/epgm/epgm.cxx b/filter/source/graphicfilter/epgm/epgm.cxx new file mode 100644 index 000000000000..89fbc9929ab0 --- /dev/null +++ b/filter/source/graphicfilter/epgm/epgm.cxx @@ -0,0 +1,297 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include "strings.hrc" +#include "dlgepgm.hrc" +#include "dlgepgm.hxx" + +//============================ PGMWriter ================================== + +class PGMWriter { + +private: + + SvStream* mpOStm; // Die auszugebende PGM-Datei + USHORT mpOStmOldModus; + + BOOL mbStatus; + UINT32 mnMode; + BitmapReadAccess* mpAcc; + ULONG mnWidth, mnHeight; // Bildausmass in Pixeln + + BOOL ImplWriteHeader(); + void ImplWriteBody(); + void ImplWriteNumber( sal_Int32 ); + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + +public: + PGMWriter(); + ~PGMWriter(); + + BOOL WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigItem* pFilterConfigItem ); +}; + +//=================== Methoden von PGMWriter ============================== + +PGMWriter::PGMWriter() : + mbStatus ( TRUE ), + mpAcc ( NULL ) +{ +} + +// ------------------------------------------------------------------------ + +PGMWriter::~PGMWriter() +{ +} + +// ------------------------------------------------------------------------ + +BOOL PGMWriter::WritePGM( const Graphic& rGraphic, SvStream& rPGM, FilterConfigItem* pFilterConfigItem ) +{ + + mpOStm = &rPGM; + + if ( pFilterConfigItem ) + { + mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); + + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp = aBmpEx.GetBitmap(); + aBmp.Convert( BMP_CONVERSION_8BIT_GREYS ); + + mpOStmOldModus = mpOStm->GetNumberFormatInt(); + mpOStm->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + + mpAcc = aBmp.AcquireReadAccess(); + if( mpAcc ) + { + if ( ImplWriteHeader() ) + { + ImplWriteBody(); + } + aBmp.ReleaseAccess( mpAcc ); + } + else + mbStatus = FALSE; + + mpOStm->SetNumberFormatInt( mpOStmOldModus ); + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +BOOL PGMWriter::ImplWriteHeader() +{ + mnWidth = mpAcc->Width(); + mnHeight = mpAcc->Height(); + if ( mnWidth && mnHeight ) + { + if ( mnMode == 0 ) + *mpOStm << "P5\x0a"; + else + *mpOStm << "P2\x0a"; + + ImplWriteNumber( mnWidth ); + *mpOStm << (BYTE)32; + ImplWriteNumber( mnHeight ); + *mpOStm << (BYTE)32; + ImplWriteNumber( 255 ); // max. gray value + *mpOStm << (BYTE)10; + } + else + mbStatus = FALSE; + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void PGMWriter::ImplWriteBody() +{ + if ( mnMode == 0 ) + { + for ( ULONG y = 0; y < mnHeight; y++ ) + { + for ( ULONG x = 0; x < mnWidth; x++ ) + { + *mpOStm << (BYTE)( mpAcc->GetPixel( y, x ) ); + } + } + } + else + { + for ( ULONG y = 0; y < mnHeight; y++ ) + { + int nCount = 70; + for ( ULONG x = 0; x < mnWidth; x++ ) + { + BYTE nDat, nNumb; + if ( nCount < 0 ) + { + nCount = 69; + *mpOStm << (BYTE)10; + } + nDat = (BYTE)mpAcc->GetPixel( y, x ); + nNumb = nDat / 100; + if ( nNumb ) + { + *mpOStm << (BYTE)( nNumb + '0' ); + nDat -= ( nNumb * 100 ); + nNumb = nDat / 10; + *mpOStm << (BYTE)( nNumb + '0' ); + nDat -= ( nNumb * 10 ); + *mpOStm << (BYTE)( nDat + '0' ); + nCount -= 4; + } + else + { + nNumb = nDat / 10; + if ( nNumb ) + { + *mpOStm << (BYTE)( nNumb + '0' ); + nDat -= ( nNumb * 10 ); + *mpOStm << (BYTE)( nDat + '0' ); + nCount -= 3; + } + else + { + *mpOStm << (BYTE)( nDat + '0' ); + nCount -= 2; + } + } + *mpOStm << (BYTE)' '; + } + *mpOStm << (BYTE)10; + } + } +} + +// ------------------------------------------------------------------------ +// eine Dezimalzahl im ASCII format wird in den Stream geschrieben + +void PGMWriter::ImplWriteNumber( sal_Int32 nNumber ) +{ + const ByteString aNum( ByteString::CreateFromInt32( nNumber ) ); + + for( sal_Int16 n = 0UL, nLen = aNum.Len(); n < nLen; n++ ) + *mpOStm << aNum.GetChar( n ); + +} + +// ------------------------------------------------------------------------ + +// --------------------- +// - exported function - +// --------------------- + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL ) +{ + PGMWriter aPGMWriter; + + return aPGMWriter.WritePGM( rGraphic, rStream, pFilterConfigItem ); +} + +// ------------------------------------------------------------------------ + +extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara ) +{ + BOOL bRet = FALSE; + + if ( rPara.pWindow ) + { + ByteString aResMgrName( "epg" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + rPara.pResMgr = pResMgr; + bRet = ( DlgExportEPGM( rPara ).Execute() == RET_OK ); + delete pResMgr; + } + else + bRet = TRUE; + } + + return bRet; +} + +// ------------------------------------------------------------------------ +#ifndef GCC +#endif + +// --------------- +// - Win16 trash - +// --------------- + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ + if ( nHeap ) + UnlockData( 0 ); + + hDLLInst = hDLL; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/epgm/epgmstr.src b/filter/source/graphicfilter/epgm/epgmstr.src new file mode 100644 index 000000000000..8424505dbcd1 --- /dev/null +++ b/filter/source/graphicfilter/epgm/epgmstr.src @@ -0,0 +1,35 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "strings.hrc" + +// Key fuer den Dialog +String KEY_FORMAT +{ + Text = "FileFormat"; +}; diff --git a/filter/source/graphicfilter/epgm/exports.map b/filter/source/graphicfilter/epgm/exports.map new file mode 100644 index 000000000000..61e4682c6551 --- /dev/null +++ b/filter/source/graphicfilter/epgm/exports.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + GraphicExport; + DoExportDialog; + + local: + *; +}; diff --git a/filter/source/graphicfilter/epgm/makefile.mk b/filter/source/graphicfilter/epgm/makefile.mk new file mode 100644 index 000000000000..70ab5ec93c68 --- /dev/null +++ b/filter/source/graphicfilter/epgm/makefile.mk @@ -0,0 +1,76 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=epgm +TARGET2=epg +DEPTARGET=vepgm + + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SRS1NAME=$(TARGET) +SRC1FILES= dlgepgm.src \ + epgmstr.src +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/epgm.obj \ + $(SLO)$/dlgepgm.obj +.ENDIF +# ========================================================================== + +RESLIB1NAME=$(TARGET2) +RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs +.IF "$(L10N_framework)"=="" +SHL1TARGET= epg$(DLLPOSTFIX) +SHL1IMPLIB= epgm +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(CPPULIB) $(SVTOOLLIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/epgm.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/epgm.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/epgm/strings.hrc b/filter/source/graphicfilter/epgm/strings.hrc new file mode 100644 index 000000000000..122719e87d4b --- /dev/null +++ b/filter/source/graphicfilter/epgm/strings.hrc @@ -0,0 +1,27 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ +#define KEY_FORMAT 256 diff --git a/filter/source/graphicfilter/epict/dlgepct.cxx b/filter/source/graphicfilter/epict/dlgepct.cxx new file mode 100644 index 000000000000..c274dc873560 --- /dev/null +++ b/filter/source/graphicfilter/epict/dlgepct.cxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#ifndef GCC +#endif + +#include +#include +#include +#include "dlgepct.hxx" +#include "dlgepct.hrc" +#include "strings.hrc" + +/************************************************************************* +|* +|* Ctor +|* +\************************************************************************/ + +DlgExportEPCT::DlgExportEPCT( FltCallDialogParameter& rPara ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPCT, *rPara.pResMgr ) ), + rFltCallPara ( rPara ), + aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + aRbOriginal ( this, ResId( RB_ORIGINAL, *rPara.pResMgr ) ), + aRbSize ( this, ResId( RB_SIZE, *rPara.pResMgr ) ), + aGrpMode ( this, ResId( GRP_MODE, *rPara.pResMgr ) ), + aFtSizeX ( this, ResId( FT_SIZEX, *rPara.pResMgr ) ), + aMtfSizeX ( this, ResId( MTF_SIZEX, *rPara.pResMgr ) ), + aFtSizeY ( this, ResId( FT_SIZEY, *rPara.pResMgr ) ), + aMtfSizeY ( this, ResId( MTF_SIZEY, *rPara.pResMgr ) ), + aGrpSize ( this, ResId( GRP_SIZE, *rPara.pResMgr ) ), + pMgr ( rPara.pResMgr ) +{ + FreeResource(); + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PCT" ) ); + pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + + aBtnOK.SetClickHdl( LINK( this, DlgExportEPCT, OK ) ); + aRbOriginal.SetClickHdl( LINK( this, DlgExportEPCT, ClickRbOriginal ) ); + aRbSize.SetClickHdl( LINK( this, DlgExportEPCT, ClickRbSize ) ); + + // Config-Parameter lesen + sal_Int32 nStrMode = pConfigItem->ReadInt32( String( ResId( KEY_MODE, *pMgr ) ), 0 ); + ::com::sun::star::awt::Size aDefault( 10000, 10000 ); + ::com::sun::star::awt::Size aSize; + aSize = pConfigItem->ReadSize( String( ResId( KEY_SIZE, *pMgr ) ), aDefault ); + + aMtfSizeX.SetDefaultUnit( FUNIT_MM ); + aMtfSizeY.SetDefaultUnit( FUNIT_MM ); + aMtfSizeX.SetValue( aSize.Width ); + aMtfSizeY.SetValue( aSize.Height ); + + switch ( rPara.eFieldUnit ) + { + case FUNIT_NONE : + case FUNIT_KM : + case FUNIT_PERCENT : + case FUNIT_CUSTOM : + case FUNIT_MILE : + case FUNIT_FOOT : + case FUNIT_M : + break; // -Wall not handled. + case FUNIT_MM : + case FUNIT_CM : + case FUNIT_TWIP : + case FUNIT_POINT : + case FUNIT_PICA : + case FUNIT_INCH : + case FUNIT_100TH_MM : + { + aMtfSizeX.SetUnit( rPara.eFieldUnit ); + aMtfSizeY.SetUnit( rPara.eFieldUnit ); + } + break; + } + if ( nStrMode == 1 ) + { + aRbSize.Check( TRUE ); + ClickRbSize( NULL ); + } + else + { + aRbOriginal.Check( TRUE ); + ClickRbOriginal( NULL ); + } +} + +DlgExportEPCT::~DlgExportEPCT() +{ + delete pConfigItem; +} + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\**************************************** ********************************/ + +IMPL_LINK( DlgExportEPCT, OK, void *, EMPTYARG ) +{ + // Config-Parameter schreiben + ::com::sun::star::awt::Size aSize( + (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeX.GetValue(), 2, aMtfSizeX.GetUnit(), MAP_100TH_MM ), + (sal_Int32)MetricField::ConvertDoubleValue( aMtfSizeY.GetValue(), 2, aMtfSizeY.GetUnit(), MAP_100TH_MM ) ); + + sal_Int32 nStrMode = 0; + if ( aRbSize.IsChecked() ) + nStrMode++; + + pConfigItem->WriteInt32( String( ResId( KEY_MODE, *pMgr ) ), nStrMode ); + pConfigItem->WriteSize( String( ResId( KEY_SIZE, *pMgr ) ), aSize ); + rFltCallPara.aFilterData = pConfigItem->GetFilterData(); + EndDialog( RET_OK ); + + return 0; +} + +/************************************************************************* +|* +|* Enabled/Disabled Controls +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEPCT, ClickRbOriginal, void*, EMPTYARG ) +{ + aGrpSize.Disable(); + aFtSizeX.Disable(); + aMtfSizeX.Disable(); + aFtSizeY.Disable(); + aMtfSizeY.Disable(); + + return 0; +} + + +/************************************************************************* +|* +|* Enabled/Disabled Controls +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEPCT, ClickRbSize, void*, EMPTYARG ) +{ + aGrpSize.Enable(); + aFtSizeX.Enable(); + aMtfSizeX.Enable(); + aFtSizeY.Enable(); + aMtfSizeY.Enable(); + + return 0; +} + + + diff --git a/filter/source/graphicfilter/epict/dlgepct.hrc b/filter/source/graphicfilter/epict/dlgepct.hrc new file mode 100644 index 000000000000..0f92aa9bda3c --- /dev/null +++ b/filter/source/graphicfilter/epict/dlgepct.hrc @@ -0,0 +1,41 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define CBX_SIZE 2 +#define MTF_SIZEX 1 +#define MTF_SIZEY 2 +#define FT_SIZEX 1 +#define FT_SIZEY 2 +#define GRP_SIZE 1 +#define GRP_MODE 2 +#define RB_ORIGINAL 1 +#define RB_SIZE 2 + diff --git a/filter/source/graphicfilter/epict/dlgepct.hxx b/filter/source/graphicfilter/epict/dlgepct.hxx new file mode 100644 index 000000000000..e879822ab1f5 --- /dev/null +++ b/filter/source/graphicfilter/epict/dlgepct.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DLGEPCT_HXX_ +#define _DLGEPCT_HXX_ + +#include +#include +#include +#include +#include + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen bei Vektorformaten +|* +\************************************************************************/ + +class FilterConfigItem; +class ResMgr; + +class DlgExportEPCT : public ModalDialog +{ +private: + + FltCallDialogParameter& rFltCallPara; + + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + RadioButton aRbOriginal; + RadioButton aRbSize; + FixedLine aGrpMode; + + FixedText aFtSizeX; + MetricField aMtfSizeX; + FixedText aFtSizeY; + MetricField aMtfSizeY; + FixedLine aGrpSize; + + FilterConfigItem* pConfigItem; + ResMgr* pMgr; + + DECL_LINK( OK, void* p ); + DECL_LINK( ClickRbOriginal,void* p ); + DECL_LINK( ClickRbSize,void* p ); + +public: + DlgExportEPCT( FltCallDialogParameter& rPara ); + ~DlgExportEPCT(); +}; + +#endif // _DLGEPCT_HXX_ + diff --git a/filter/source/graphicfilter/epict/dlgepct.src b/filter/source/graphicfilter/epict/dlgepct.src new file mode 100644 index 000000000000..d503c53cf89c --- /dev/null +++ b/filter/source/graphicfilter/epict/dlgepct.src @@ -0,0 +1,163 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "dlgepct.hrc" + +ModalDialog DLG_EXPORT_EPCT +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 178 , 89 ) ; + Text [ en-US ] = "PICT Options" ; + Moveable = TRUE ; + Closeable = TRUE ; + MetricField MTF_SIZEX + { + Border = TRUE ; + Pos = MAP_APPFONT ( 60 , 55 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 100 ; + Maximum = 99999 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + First = 100 ; + Last = 99999 ; + SpinSize = 100 ; + }; + MetricField MTF_SIZEY + { + Border = TRUE ; + Pos = MAP_APPFONT ( 60 , 71 ) ; + Size = MAP_APPFONT ( 50 , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 100 ; + Maximum = 99999 ; + StrictFormat = TRUE ; + DecimalDigits = 2 ; + Unit = FUNIT_MM ; + First = 100 ; + Last = 99999 ; + SpinSize = 100 ; + }; + FixedLine GRP_SIZE + { + Pos = MAP_APPFONT ( 6 , 44 ) ; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Size" ; + }; + FixedText FT_SIZEX + { + Pos = MAP_APPFONT ( 12 , 57 ) ; + Size = MAP_APPFONT ( 45 , 8 ) ; + Text [ en-US ] = "Width" ; + }; + FixedText FT_SIZEY + { + Pos = MAP_APPFONT ( 12 , 73 ) ; + Size = MAP_APPFONT ( 45 , 8 ) ; + Text [ en-US ] = "Height" ; + }; + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 122 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 122 , 24 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 122 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + RadioButton RB_ORIGINAL + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Original" ; + }; + RadioButton RB_SIZE + { + Pos = MAP_APPFONT ( 12 , 28 ) ; + Size = MAP_APPFONT ( 98 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Size" ; + }; + FixedLine GRP_MODE + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 110 , 8 ) ; + Text [ en-US ] = "Mode" ; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx new file mode 100644 index 000000000000..7e81077e3810 --- /dev/null +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -0,0 +1,2387 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include "strings.hrc" +#include "dlgepct.hrc" +#include "dlgepct.hxx" + +#include +#include + +//============================== PictWriter =================================== + +struct PictWriterAttrStackMember { + struct PictWriterAttrStackMember * pSucc; + Color aLineColor; + Color aFillColor; + RasterOp eRasterOp; + Font aFont; + MapMode aMapMode; + Rectangle aClipRect; +}; + + +enum PictDrawingMethod { + PDM_FRAME, PDM_PAINT, PDM_ERASE, PDM_INVERT, PDM_FILL +}; + + +struct PictPattern { + sal_uInt32 nLo, nHi; +}; + +class PictWriter { + +private: + + BOOL bStatus; + ULONG nLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + SvStream * pPict; + + // Aktuelle Attribute im Quell-Metafile: + Color aLineColor; + Color aFillColor; + RasterOp eSrcRasterOp; + Font aSrcFont; + MapMode aSrcMapMode; + MapMode aTargetMapMode; + Rectangle aClipRect; + PictWriterAttrStackMember * pAttrStack; + + // Aktuelle Attribute im Ziel-Metafile, und ob sie gueltig sind + BOOL bDstBkPatVisible; BOOL bDstBkPatValid; + BYTE nDstTxFace; BOOL bDstTxFaceValid; + RasterOp eDstTxMode; BOOL bDstTxModeValid; + USHORT nDstPnSize; BOOL bDstPnSizeValid; + RasterOp eDstPnMode; BOOL bDstPnModeValid; + PictPattern aDstPnPat; BOOL bDstPnPatValid; + BOOL bDstFillPatVisible; BOOL bDstFillPatValid; + USHORT nDstTxSize; BOOL bDstTxSizeValid; + Color aDstFgCol; BOOL bDstFgColValid; + Color aDstBkCol; BOOL bDstBkColValid; + Point aDstPenPosition; BOOL bDstPenPositionValid; + Point aDstTextPosition; BOOL bDstTextPositionValid; + String aDstFontName; USHORT nDstFontNameId; BOOL bDstFontNameValid; + + ULONG nNumberOfActions; // Anzahl der Actions im GDIMetafile + ULONG nNumberOfBitmaps; // Anzahl der Bitmaps + ULONG nWrittenActions; // Anzahl der bereits verarbeiteten Actions beim Schreiben der Opcodes + ULONG nWrittenBitmaps; // Anzahl der bereits geschriebenen Bitmaps + ULONG nActBitmapPercent; // Wieviel Prozent die naechste Bitmap schon geschrieben ist. + + void MayCallback(); + // Berechnet anhand der obigen 5 Parameter eine Prozentzahl + // und macht dann ggf. einen Callback. Setzt bStatus auf FALSE wenn User abbrechen + // moechte. + + void CountActionsAndBitmaps(const GDIMetaFile & rMTF); + // Zaehlt die Bitmaps und Actions (nNumberOfActions und nNumberOfBitmaps muessen + // zu Anfang auf 0 gesetzt werden, weil diese Methode rekursiv ist) + + Polygon PolyPolygonToPolygon(const PolyPolygon & rPoly); + // Macht aus einem PolyPolygon ein halbwegs vernuenftiges Polygon + + Rectangle MapRectangle( const Rectangle& rRect ); + void WritePoint(const Point & rPoint); + void WriteSize(const Size & rSize); + void WriteRGBColor(const Color & rColor); + void WriteString( const String & rString ); + void WriteRectangle(const Rectangle & rRect); + void WritePolygon(const Polygon & rPoly); + void WriteArcAngles(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); + + void ConvertLinePattern(PictPattern & rPat, BOOL bVisible); + void ConvertFillPattern(PictPattern & rPat, BOOL bVisible); + + void WriteOpcode_TxFace(const Font & rFont); + void WriteOpcode_TxMode(RasterOp eMode); + void WriteOpcode_PnSize(USHORT nSize); + void WriteOpcode_PnMode(RasterOp eMode); + void WriteOpcode_PnLinePat(BOOL bVisible); + void WriteOpcode_PnFillPat(BOOL bVisible); + void WriteOpcode_OvSize(const Size & rSize); + void WriteOpcode_TxSize(USHORT nSize); + void WriteOpcode_RGBFgCol(const Color & rColor); + void WriteOpcode_RGBBkCol(const Color & rColor); + void WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt); + void WriteOpcode_LineFrom(const Point & rNewPt); + void WriteOpcode_Text(const Point & rPoint, const String& rString, BOOL bDelta); + void WriteOpcode_FontName(const Font & rFont); + void WriteOpcode_ClipRect( const Rectangle& rRect ); + void WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect); + void WriteOpcode_SameRect(PictDrawingMethod eMethod); + void WriteOpcode_RRect(PictDrawingMethod eMethod, const Rectangle & rRect); + void WriteOpcode_SameRRect(PictDrawingMethod eMethod); + void WriteOpcode_Oval(PictDrawingMethod eMethod, const Rectangle & rRect); + void WriteOpcode_SameOval(PictDrawingMethod eMethod); + void WriteOpcode_Arc(PictDrawingMethod eMethod, const Rectangle & rRect, + const Point & rStartPt, const Point & rEndPt); + void WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle & rRect, + const Point & rStartPt, const Point & rEndPt); + void WriteOpcode_Poly(PictDrawingMethod eMethod, const Polygon & rPoly); + void WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap); + void WriteOpcode_EndOfFile(); + + void SetAttrForPaint(); + void SetAttrForFrame(); + void SetAttrForText(); + + void WriteTextArray(Point & rPoint, const String& rString, const sal_Int32 * pDXAry); + + void HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon); + void WriteOpcodes(const GDIMetaFile & rMTF); + + void WriteHeader(const GDIMetaFile & rMTF); + void UpdateHeader(); + +public: + + BOOL WritePict( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem ); +}; + + +//========================== Methoden von PictWriter ========================== + + +void PictWriter::MayCallback() +{ + if ( xStatusIndicator.is() ) + { + ULONG nPercent; + nPercent=((nWrittenBitmaps<<14)+(nActBitmapPercent<<14)/100+nWrittenActions) + *100 + /((nNumberOfBitmaps<<14)+nNumberOfActions); + + if (nPercent>=nLastPercent+3) + { + nLastPercent=nPercent; + if( nPercent<=100 ) + xStatusIndicator->setValue( nPercent ); + } + } +} + +void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF) +{ + ULONG nAction, nActionCount; + const MetaAction* pMA; + + nActionCount = rMTF.GetActionCount(); + + for (nAction=0; nActionGetType() ) + { + case META_BMP_ACTION: + case META_BMPSCALE_ACTION: + case META_BMPSCALEPART_ACTION: + case META_BMPEX_ACTION: + case META_BMPEXSCALE_ACTION: + case META_BMPEXSCALEPART_ACTION: + nNumberOfBitmaps++; + break; + } + + nNumberOfActions++; + } +} + + +Polygon PictWriter::PolyPolygonToPolygon(const PolyPolygon & rPolyPoly) +{ + USHORT nCount,nSize1,nSize2,np,i1,i2,i3,nBestIdx1,nBestIdx2; + long nDistSqr,nBestDistSqr, nCountdownTests; + Point aP1,aPRel; + Polygon aPoly1, aPoly2, aPoly3; + + nCount=rPolyPoly.Count(); + if (nCount==0) return Polygon(0); + + aPoly1=rPolyPoly.GetObject(0); + for (np=1; np 255 ) + nLen = 255; + *pPict << ( (BYTE)nLen ); + for ( i = 0; i < nLen; i++ ) + *pPict << aByteString.GetChar( i ); +} + +Rectangle PictWriter::MapRectangle( const Rectangle& rRect ) +{ + Point aPoint = OutputDevice::LogicToLogic( rRect.TopLeft(), aSrcMapMode, aTargetMapMode ); + Size aSize = OutputDevice::LogicToLogic( rRect.GetSize(), aSrcMapMode, aTargetMapMode ); + Rectangle aRect( aPoint, aSize ); + aRect.Justify(); + aRect.nBottom++; + aRect.nRight++; + return aRect; +} + +void PictWriter::WriteRectangle(const Rectangle & rRect) +{ + Rectangle aRect( MapRectangle( rRect ) ); + *pPict << (sal_Int16)aRect.Top() << (sal_Int16)aRect.Left() + << (sal_Int16)aRect.Bottom() << (sal_Int16)aRect.Right(); +} + +void PictWriter::WritePolygon(const Polygon & rPoly) +{ + USHORT nDataSize,i,nSize; + short nMinX = 0, nMinY = 0, nMaxX = 0, nMaxY = 0; + short nx,ny; + Polygon aPoly(rPoly); + + nSize=aPoly.GetSize(); + + if (aPoly.GetPoint(0) != aPoly.GetPoint(nSize-1)) + { + nSize++; + aPoly.SetSize(nSize); + aPoly.SetPoint(aPoly.GetPoint(0),nSize-1); + } + + nDataSize=nSize*4+10; + for (i=0; inx ) + nMinX=nx; + if ( i==0 || nMinY>ny ) + nMinY=ny; + if ( i==0 || nMaxX> 1, + ( aRect.Top() + aRect.Bottom() ) >> 1 ); + + fdx=(double)(aStartPt.X()-aCenter.X()); + fdy=(double)(aStartPt.Y()-aCenter.Y()); + if ( fdx==0.0 && fdy==0.0 ) + fdx=1.0; + fAngE=atan2(fdx,-fdy); + + fdx=(double)(aEndPt.X()-aCenter.X()); + fdy=(double)(aEndPt.Y()-aCenter.Y()); + if ( fdx==0.0 && fdy==0.0 ) + fdx=1.0; + fAngS=atan2(fdx,-fdy); + + nStartAngle=(short)(fAngS*180.0/3.14159265359); + nArcAngle=((short)(fAngE*180.0/3.14159265359))-nStartAngle; + if (nArcAngle<0) + nArcAngle += 360; + *pPict << nStartAngle << nArcAngle; +} + + +void PictWriter::ConvertLinePattern(PictPattern & rPat, BOOL bVisible) +{ + if( bVisible ) + { + rPat.nHi=0xffffffff; + rPat.nLo=0xffffffff; + } + else + { + rPat.nHi=0x00000000; + rPat.nLo=0x00000000; + } +} + +void PictWriter::ConvertFillPattern(PictPattern & rPat, BOOL bVisible) +{ + if( bVisible ) + { + rPat.nHi=0xffffffff; + rPat.nLo=0xffffffff; + } + else + { + rPat.nHi=0x00000000; + rPat.nLo=0x00000000; + } +} + + +void PictWriter::WriteOpcode_TxFace(const Font & rFont) +{ + BYTE nFace; + FontWeight eWeight; + + nFace=0; + eWeight=rFont.GetWeight(); + if (eWeight==WEIGHT_BOLD || + eWeight==WEIGHT_SEMIBOLD || + eWeight==WEIGHT_ULTRABOLD || + eWeight==WEIGHT_BLACK) nFace|=0x01; + if (rFont.GetItalic()!=ITALIC_NONE) nFace|=0x02; + if (rFont.GetUnderline()!=UNDERLINE_NONE) nFace|=0x04; + if (rFont.IsOutline()==TRUE) nFace|=0x08; + if (rFont.IsShadow()==TRUE) nFace|=0x10; + + if (bDstTxFaceValid==FALSE || nDstTxFace!=nFace) { + *pPict << (USHORT)0x0004 << nFace << (BYTE)0; + nDstTxFace=nFace; + bDstTxFaceValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_TxMode(RasterOp eMode) +{ + USHORT nVal; + + if (bDstTxModeValid==FALSE || eDstTxMode!=eMode) { + switch (eMode) { + case ROP_INVERT: nVal=0x000c; break; + case ROP_XOR: nVal=0x000a; break; + default: nVal=0x0008; + } + *pPict << (USHORT)0x0005 << nVal; + eDstTxMode=eMode; + bDstTxModeValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_PnSize(USHORT nSize) +{ + if (nSize==0) nSize=1; + if (bDstPnSizeValid==FALSE || nDstPnSize!=nSize) { + *pPict << (USHORT)0x0007 << nSize << nSize; + nDstPnSize=nSize; + bDstPnSizeValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_PnMode(RasterOp eMode) +{ + USHORT nVal; + + if (bDstPnModeValid==FALSE || eDstPnMode!=eMode) { + switch (eMode) + { + case ROP_INVERT: nVal=0x000c; break; + case ROP_XOR: nVal=0x000a; break; + default: nVal=0x0008; + } + *pPict << (USHORT)0x0008 << nVal; + eDstPnMode=eMode; + bDstPnModeValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_PnLinePat(BOOL bVisible) +{ + PictPattern aPat; + + ConvertLinePattern(aPat,bVisible); + if (bDstPnPatValid==FALSE || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { + *pPict << (USHORT)0x0009 << aPat.nHi << aPat.nLo; + aDstPnPat=aPat; + bDstPnPatValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_PnFillPat(BOOL bVisible) +{ + PictPattern aPat; + + ConvertFillPattern(aPat,bVisible); + if (bDstPnPatValid==FALSE || aDstPnPat.nHi!=aPat.nHi || aDstPnPat.nLo!=aPat.nLo) { + *pPict << (USHORT)0x0009 << aPat.nHi << aPat.nLo; + aDstPnPat=aPat; + bDstPnPatValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_OvSize(const Size & rSize) +{ + *pPict << (USHORT)0x000b; + WriteSize(rSize); +} + + +void PictWriter::WriteOpcode_TxSize(USHORT nSize) +{ + if (bDstTxSizeValid==FALSE || nDstTxSize!=nSize) { + + nDstTxSize = (USHORT) OutputDevice::LogicToLogic( Size( 0, nSize ), + aSrcMapMode, aTargetMapMode ).Height(); + + *pPict << (USHORT)0x000d << nDstTxSize; + bDstTxSizeValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_RGBFgCol(const Color & rColor) +{ + if (bDstFgColValid==FALSE || aDstFgCol!=rColor) { + *pPict << (USHORT)0x001a; + WriteRGBColor(rColor); + aDstFgCol=rColor; + bDstFgColValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_RGBBkCol(const Color & rColor) +{ + if (bDstBkColValid==FALSE || aDstBkCol!=rColor) { + *pPict << (USHORT)0x001b; + WriteRGBColor(rColor); + aDstBkCol=rColor; + bDstBkColValid=TRUE; + } +} + + +void PictWriter::WriteOpcode_Line(const Point & rLocPt, const Point & rNewPt) +{ + Point aLocPt = OutputDevice::LogicToLogic( rLocPt, + aSrcMapMode, + aTargetMapMode ); + Point aNewPt = OutputDevice::LogicToLogic( rNewPt, + aSrcMapMode, + aTargetMapMode ); + long dh,dv; + + dh=aNewPt.X()-aLocPt.X(); + dv=aNewPt.Y()-aLocPt.Y(); + if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128) + { // ShortLine + *pPict << (USHORT)0x0022; + WritePoint(rLocPt); + *pPict << (char)dh << (char)dv; + } + else + { + *pPict << (USHORT)0x0020; + WritePoint(rLocPt); + WritePoint(rNewPt); + } + aDstPenPosition=rNewPt; + bDstPenPositionValid=TRUE; +} + + +void PictWriter::WriteOpcode_LineFrom(const Point & rNewPt) +{ + Point aNewPt = OutputDevice::LogicToLogic( rNewPt, + aSrcMapMode, + aTargetMapMode ); + long dh,dv; + + dh = aNewPt.X()-aDstPenPosition.X(); + dv = aNewPt.Y()-aDstPenPosition.Y(); + + if (dh<=127 && dh>=-128 && dv<=127 && dv>=-128) + { // ShortLine + *pPict << (USHORT)0x0023; + *pPict << (char)dh << (char)dv; + } + else + { + *pPict << (USHORT)0x0021; + WritePoint(rNewPt); + } + aDstPenPosition=rNewPt; + bDstPenPositionValid=TRUE; +} + + +void PictWriter::WriteOpcode_Text(const Point & rPoint, const String& rString, BOOL bDelta) +{ + Point aPoint = OutputDevice::LogicToLogic( rPoint, + aSrcMapMode, + aTargetMapMode ); + long dh,dv; + ULONG nPos; + + nPos = pPict->Tell(); + dh = aPoint.X()-aDstTextPosition.X(); + dv = aPoint.Y()-aDstTextPosition.Y(); + + if (bDstTextPositionValid==FALSE || dh<0 || dh>255 || dv<0 || dv>0 || bDelta==FALSE) + { + *pPict << (USHORT)0x0028; + WritePoint(rPoint); + } + else if (dv==0) + { + *pPict << (USHORT)0x0029 << (BYTE)dh; + } + else if (dh==0) + { + *pPict << (USHORT)0x002a << (BYTE)dv; + } + else + { + *pPict << (USHORT)0x002b << (BYTE)dh << (BYTE)dv; + } + + WriteString( rString ); + if (((pPict->Tell()-nPos)&1)!=0) + *pPict << (BYTE)0; + + aDstTextPosition = aPoint; + bDstTextPositionValid=TRUE; +} + + +void PictWriter::WriteOpcode_FontName(const Font & rFont) +{ + USHORT nDataLen,nFontId; + + switch (rFont.GetFamily()) { + case FAMILY_MODERN: nFontId=22; break; + case FAMILY_ROMAN: nFontId=20; break; + case FAMILY_SWISS: nFontId=21; break; + default: nFontId=1; + } + + if (bDstFontNameValid==FALSE || nDstFontNameId!=nFontId || aDstFontName!=rFont.GetName()) + { + ByteString aByteString( rFont.GetName(), gsl_getSystemTextEncoding() ); + sal_uInt16 nFontNameLen = aByteString.Len(); + if ( nFontNameLen ) + { + nDataLen = 3 + nFontNameLen; + *pPict << (USHORT)0x002c << nDataLen << nFontId; + WriteString( rFont.GetName() ); + if ( ( nFontNameLen & 1 ) == 0 ) + *pPict << (BYTE)0; + } + *pPict << (USHORT)0x0003 << nFontId; + aDstFontName=rFont.GetName(); + nDstFontNameId=nFontId; + bDstFontNameValid=TRUE; + } +} + +void PictWriter::WriteOpcode_ClipRect( const Rectangle& rRect ) +{ + Rectangle aRect( MapRectangle( rRect ) ); + aRect.nBottom++; + aRect.nRight++; + *pPict << (sal_uInt16)1 // opcode 1 + << (sal_uInt16)10 // data size + << (sal_Int16)aRect.Top() << (sal_Int16)aRect.Left() + << (sal_Int16)aRect.Bottom() << (sal_Int16)aRect.Right(); + aClipRect = aRect; +} + +void PictWriter::WriteOpcode_Rect(PictDrawingMethod eMethod, const Rectangle & rRect) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0030; break; + case PDM_PAINT: oc=0x0031; break; + case PDM_ERASE: oc=0x0032; break; + case PDM_INVERT: oc=0x0033; break; + case PDM_FILL: oc=0x0034; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; + WriteRectangle(rRect); +} + + +void PictWriter::WriteOpcode_SameRect(PictDrawingMethod eMethod) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0038; break; + case PDM_PAINT: oc=0x0039; break; + case PDM_ERASE: oc=0x003a; break; + case PDM_INVERT: oc=0x003b; break; + case PDM_FILL: oc=0x003c; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; +} + + +void PictWriter::WriteOpcode_RRect(PictDrawingMethod eMethod, const Rectangle & rRect) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0040; break; + case PDM_PAINT: oc=0x0041; break; + case PDM_ERASE: oc=0x0042; break; + case PDM_INVERT: oc=0x0043; break; + case PDM_FILL: oc=0x0044; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; + WriteRectangle(rRect); +} + + +void PictWriter::WriteOpcode_SameRRect(PictDrawingMethod eMethod) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0048; break; + case PDM_PAINT: oc=0x0049; break; + case PDM_ERASE: oc=0x004a; break; + case PDM_INVERT: oc=0x004b; break; + case PDM_FILL: oc=0x004c; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; +} + + +void PictWriter::WriteOpcode_Oval(PictDrawingMethod eMethod, const Rectangle & rRect) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0050; break; + case PDM_PAINT: oc=0x0051; break; + case PDM_ERASE: oc=0x0052; break; + case PDM_INVERT: oc=0x0053; break; + case PDM_FILL: oc=0x0054; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; + WriteRectangle(rRect); +} + + +void PictWriter::WriteOpcode_SameOval(PictDrawingMethod eMethod) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0058; break; + case PDM_PAINT: oc=0x0059; break; + case PDM_ERASE: oc=0x005a; break; + case PDM_INVERT: oc=0x005b; break; + case PDM_FILL: oc=0x005c; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; +} + + +void PictWriter::WriteOpcode_Arc(PictDrawingMethod eMethod, const Rectangle & rRect, + const Point & rStartPt, const Point & rEndPt) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0060; break; + case PDM_PAINT: oc=0x0061; break; + case PDM_ERASE: oc=0x0062; break; + case PDM_INVERT: oc=0x0063; break; + case PDM_FILL: oc=0x0064; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; + WriteRectangle(rRect); + WriteArcAngles(rRect,rStartPt,rEndPt); +} + + +void PictWriter::WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle & rRect, + const Point & rStartPt, const Point & rEndPt) +{ + USHORT oc; + switch (eMethod) { + case PDM_FRAME: oc=0x0068; break; + case PDM_PAINT: oc=0x0069; break; + case PDM_ERASE: oc=0x006a; break; + case PDM_INVERT: oc=0x006b; break; + case PDM_FILL: oc=0x006c; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; + WriteArcAngles(rRect,rStartPt,rEndPt); +} + + +void PictWriter::WriteOpcode_Poly(PictDrawingMethod eMethod, const Polygon & rPoly) +{ + USHORT oc; + + if (rPoly.GetSize()<3) return; + switch (eMethod) { + case PDM_FRAME: oc=0x0070; break; + case PDM_PAINT: oc=0x0071; break; + case PDM_ERASE: oc=0x0072; break; + case PDM_INVERT: oc=0x0073; break; + case PDM_FILL: oc=0x0074; break; + default: oc=0; break; // -Wall a default for oc... + } + *pPict << oc; + WritePolygon(rPoly); +} + + +void PictWriter::WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap) +{ + BitmapReadAccess* pAcc = NULL; + Bitmap aBitmap( rBitmap ); + + ULONG nWidth, nHeight, nDstRowBytes, nx, nc, ny, nCount, nColTabSize, i; + ULONG nDstRowPos, nSrcRowBytes, nEqu3, nPos, nDstMapPos; + USHORT nBitsPerPixel, nPackType; + BYTE *pComp[4], *pPix, *pTemp; + BYTE nEquData = 0; + BYTE nFlagCounterByte, nRed, nGreen, nBlue; + + SetAttrForPaint(); + + // temopraere Windows-BMP-Datei erzeugen: + nActBitmapPercent=30; + MayCallback(); + + if ( bStatus == FALSE ) + return; + if ( ( pAcc = aBitmap.AcquireReadAccess() ) == NULL ) + return; + + nBitsPerPixel = aBitmap.GetBitCount(); + + // export code below only handles four discrete cases + nBitsPerPixel = + nBitsPerPixel <= 1 ? 1 : nBitsPerPixel <= 4 ? 4 : nBitsPerPixel <= 8 ? 8 : 24; + + nWidth = pAcc->Width(); + nHeight = pAcc->Height(); + + // Wenn 24-Bit, dann den Opcode 'DirectBitsRect' erzeugen: + if ( nBitsPerPixel == 24 ) + { + + // Anzahl Bytes einer (ungepackten) Zeile in Quelle und Ziel berechnen: + nSrcRowBytes =( ( 3 * nWidth ) + 0x0003 ) & 0xfffc; + nDstRowBytes = nWidth * 4; + + // Opcode und BaseAddr (?) schreiben: + *pPict << (USHORT)0x009a << (sal_uInt32)0x000000ff; + + // Normalerweise wollen wir den Packing-Type 4 (Run length encoding + // for 32-Bit Pixels) erzeugen. Wenn aber RowBytes<8 gilt, sind die Daten + // grundsaetzlich ungepackt, auch wenn der Packing-Type 4 angegeben ist, + // was etwas komisch erscheint. Daher wollen wir in so einem Fall lieber + // gleich den Packing-Type 1 (ungepackt) angeben: + + if ( nDstRowBytes < 8 ) + nPackType = 1; + else + nPackType = 4; + + // PixMap-Struktur schreiben: + *pPict << (USHORT)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist + << (USHORT)0x0000 // Y1-Position der Bitmap in der Quelle + << (USHORT)0x0000 // X1-Position der Bitmap in der Quelle + << (USHORT)nHeight // Y2-Position der Bitmap in der Quelle + << (USHORT)nWidth // X2-Position der Bitmap in der Quelle + << (USHORT)0x0000 // Version + << (USHORT)nPackType // Packing type + << (sal_uInt32) 0x00000000 // Packing size (?) + << (sal_uInt32) 0x00480000 // H-Res + << (sal_uInt32) 0x00480000 // V-Res + << (USHORT)0x0010 // Pixel type (?) + << (USHORT)0x0020 // Pixel size: 32 bit + << (USHORT)0x0004 // CmpCount: 4 Komponenten + << (USHORT)0x0008 // CmpSize: 8 Bits + << (sal_uInt32) 0x00000000 // PlaneBytes (?) + << (sal_uInt32) 0x00000000 // (?) + << (sal_uInt32) 0x00000000; // (?) + + // Source-Rectangle schreiben: + *pPict << (USHORT)0x0000 // Y1-Position auf der Bitmap + << (USHORT)0x0000 // X1-Position auf der Bitmap + << (USHORT)nHeight // Y2-Position auf der Bitmap + << (USHORT)nWidth; // X2-Position auf der Bitmap + + // Destination-Rectangle schreiben: + WritePoint( rPoint ); + WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) ); + + // Transfer mode schreiben: + *pPict << (USHORT)0x0000; // (?) + + // Position der Map-Daten in Ziel merken: + nDstMapPos=pPict->Tell(); + + if ( nPackType == 1 ) // bei 24 bits nWidth == 1 !! + { // nicht packen + for ( ny = 0; ny < nHeight; ny++ ) + { + *pPict << (BYTE)0; + *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetRed(); + *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetGreen(); + *pPict << (BYTE)pAcc->GetPixel( ny, 0 ).GetBlue(); + // Prozente zaehlen, Callback, Fehler pruefen: + nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus) + MayCallback(); + } + } + else // packen ( PackType == 4 ) + { + // Speicher fuer Zeilen-Zwischen-Datenstruktur allozieren: + for ( nc = 0; nc < 4; nc++ ) + pComp[ nc ] = new BYTE[ nWidth ]; + + // Schleife ueber Zeilen: + for ( ny = 0; ny < nHeight; ny++ ) + { + // Zeil ny der Quelle in die Zwischen-Datenstrktur einlesen: + + for ( nx = 0; nx < nWidth; nx++ ) + { + pComp[ 1 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetRed(); + pComp[ 2 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetGreen(); + pComp[ 3 ][ nx ] = (BYTE)pAcc->GetPixel( ny, nx ) .GetBlue(); + pComp[ 0 ][ nx ] = 0; + } + + // Anfang der Zeile im Ziel merken: + nDstRowPos = pPict->Tell(); + + // ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt): + if ( nDstRowBytes > 250 ) + *pPict << (USHORT)0; + else + *pPict << (BYTE)0; + + // Schleife ueber Componenten: + for ( nc = 0; nc < 4; nc++ ) + { + // Schleife ueber x: + nx = 0; + while ( nx < nWidth ) + { + // Die Position von 3 gleichen Bytes suchen und in nEqu3 merken. + // wenn nicht gefunden, dann nEqu3=nWidth setzten. + // Wenn doch gefunden, dann in nEquData den Wert der Bytes merken. + nEqu3 = nx; + for (;;) + { + if ( nEqu3 + 2 >= nWidth ) + { + nEqu3 = nWidth; + break; + } + nEquData = pComp[nc][nEqu3]; + if ( nEquData == pComp[nc][nEqu3+1] && nEquData==pComp[nc][nEqu3+2] ) + break; + nEqu3++; + } + + // Die Daten von nx bis nEqu3 unkomprimiert schreiben (ggf. in mehreren Records): + while ( nEqu3 > nx ) + { + nCount = nEqu3 - nx; + if ( nCount > 128 ) + nCount=128; + nFlagCounterByte = (BYTE)(nCount-1); + *pPict << nFlagCounterByte; + do + { + *pPict << pComp[nc][nx++]; + nCount--; + } + while ( nCount > 0 ); + } + + // Jetzt einen Komprimierungs-Record erzeugen (falls oben mindestens 3 + // gleiche Bytes gefunden): + if ( nx < nWidth ) + { // Hinweis: es gilt nx==nEqu3 (hoffentlich) + nCount=3; // Drei Bytes sind gleich, wie weiter oben herausgefunden. + // Pruefen, ob es weitere gleiche Bytes gibts (dabei Max.-Record-Groesse beachten): + while ( nx + nCount < nWidth && nCount < 128 ) + { + if ( nEquData != pComp[ nc ][ nx + nCount ] ) + break; + nCount++; + } + // nCount gleiche Bytes komprimiert schreiben: + nFlagCounterByte = (BYTE)( 1 - (long)nCount ); + *pPict << nFlagCounterByte << nEquData; + nx += nCount; + } + } + } + // ByteCount berichtigen: + nPos = pPict->Tell(); + pPict->Seek( nDstRowPos ); + if ( nDstRowBytes > 250 ) + *pPict << ( (USHORT)( nPos - nDstRowPos - 2 ) ); + else + *pPict << ( (BYTE)( nPos - nDstRowPos - 1 ) ); + pPict->Seek( nPos ); + + // Prozente zaehlen, Callback, Fehler pruefen: + nActBitmapPercent = ( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus) + MayCallback(); + } + // Aufraeumen: + for ( nc = 0; nc < 4; nc++ ) + delete pComp[ nc ]; + } + } + else + { // nicht 24-Bit also Opcode 'PackBitsRect' erzeugen: + + // Bei 1-Bit-Bildern ignorieren manche Import-Filter die Palette und nehmen statt + // dessen die Vorder- und Hintergrundfarbe: + if ( nBitsPerPixel == 1 ) + { + WriteOpcode_RGBBkCol( pAcc->GetPaletteColor( 0 ) ); + WriteOpcode_RGBFgCol( pAcc->GetPaletteColor( 1 ) ); + } + else + { + WriteOpcode_RGBBkCol( Color( COL_BLACK ) ); + WriteOpcode_RGBFgCol( Color( COL_WHITE ) ); + } + + // Anzahl Bytes einer (ungepackten) Zeile in Ziel und Quelle berechnen: + nDstRowBytes = ( nWidth * nBitsPerPixel + 7 ) >> 3; + nSrcRowBytes = ( nDstRowBytes + 3 ) & 0xfffffffc; + + // Opcode schreiben: + *pPict << (USHORT)0x0098; + + // Normalerweise wollen wir den Packing-Type 0 (default Packing) erzeugen. + // Wenn aber RowBytes<8 gilt, sind die Daten grundsaetzlich ungepackt, + // auch wenn der Packing-Type 0 angegeben ist, was etwas komisch erscheint. + // Daher wollen wir in so einem Fall lieber gleich den Packing-Type 1 (ungepackt) + // angeben: + if ( nDstRowBytes < 8 ) + nPackType = 1; + else + nPackType = 0; + + // PixMap-Struktur schreiben: + *pPict << (USHORT)(nDstRowBytes|0x8000) // Bytes pro Zeile und dass es eine 'PixMap' ist + << (USHORT)0x0000 // Y1-Position der Bitmap in der Quelle + << (USHORT)0x0000 // X1-Position der Bitmap in der Quelle + << (USHORT)nHeight // Y2-Position der Bitmap in der Quelle + << (USHORT)nWidth // X2-Position der Bitmap in der Quelle + << (USHORT)0x0000 // Version + << (USHORT)nPackType // Packing type + << (sal_uInt32) 0x00000000 // Packing size (?) + << (sal_uInt32) 0x00480000 // H-Res + << (sal_uInt32) 0x00480000 // V-Res + << (USHORT)0x0000 // Pixel type (?) + << (USHORT)nBitsPerPixel // Pixel size + << (USHORT)0x0001 // CmpCount: 1 Komponente + << (USHORT)nBitsPerPixel // CmpSize + << (sal_uInt32) 0x00000000 // PlaneBytes (?) + << (sal_uInt32) 0x00000000 // (?) + << (sal_uInt32) 0x00000000; // (?) + + // Palette lesen und schreiben: + nColTabSize = pAcc->GetPaletteEntryCount(); + *pPict << (sal_uInt32)0 << (USHORT)0x8000 << (USHORT)( nColTabSize - 1 ); + + for ( i = 0; i < nColTabSize; i++ ) + { + nRed = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetRed(); + nGreen = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetGreen(); + nBlue = (BYTE)pAcc->GetPaletteColor( (USHORT)i ).GetBlue(); + *pPict << (UINT16)0 << nRed << nRed << nGreen << nGreen << nBlue << nBlue; + } + + // Source-Rectangle schreiben: + *pPict << (USHORT)0 << (USHORT)0 << (USHORT)nHeight << (USHORT)nWidth; + + // Destination-Rectangle schreiben: + WritePoint( rPoint ); + WritePoint( Point( rPoint.X() + rSize.Width(), rPoint.Y() + rSize.Height() ) ); + + // Transfer mode schreiben: + *pPict << (USHORT)0; // (?) + + // Speicher fuer eine Zeile allozieren: + pPix = new BYTE[ nSrcRowBytes ]; + + // Position der Map-Daten in Ziel merken: + nDstMapPos=pPict->Tell(); + + // Schleife ueber Zeilen: + for ( ny = 0; ny < nHeight; ny++ ) + { + + // Zeile ny der Quelle in den Zwischenspeicher einlesen: + + switch ( nBitsPerPixel ) + { + case 1 : + for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ ) + *pTemp++ = (BYTE)0; + for ( i = 0; i < nWidth; i++ ) + pPix[ ( i >> 3 ) ] |= (BYTE)( pAcc->GetPixel( ny, i ) & 1 ) << ( ( i & 7 ) ^ 7 ); + break; + case 4 : + for ( pTemp = pPix, i = 0; i < nSrcRowBytes; i++ ) + *pTemp++ = (BYTE)0; + for ( i = 0; i < nWidth; i++ ) + pPix[ ( i >> 1 ) ] |= (BYTE)( pAcc->GetPixel( ny, i ) & 15 ) << ( ( i & 1 ) << 2 ) ; + break; + case 8 : + for ( i = 0; i < nWidth; i++ ) + pPix[ i ] = (BYTE)pAcc->GetPixel( ny, i ); + break; + } + + if ( nPackType == 1 ) + { // nicht packen + pPict->Write( pPix, nDstRowBytes ); + } + else + { // Packen (nPackType==0) + + // Anfang der Zeile im Ziel merken: + nDstRowPos = pPict->Tell(); + + // ByteCount (das ist die Groesse der gepackten Zeile) zunaechst 0 (wird spaeter berichtigt): + if ( nDstRowBytes > 250 ) + *pPict << (USHORT)0; + else + *pPict << (BYTE)0; + + // Schleife ueber Bytes der Zeile: + nx=0; + while ( nx < nDstRowBytes && bStatus ) + { + // Die Position von 3 gleichen Bytes suchen und in nEqu3 merken. + // wenn nicht gefunden, dann nEqu3=nDstRowBytes setzten. + // Wenn doch gefunden, dann in nEquData den Wert der Bytes merken. + nEqu3 = nx; + for (;;) + { + if ( nEqu3 + 2 >= nDstRowBytes ) + { + nEqu3 = nDstRowBytes; + break; + } + nEquData = pPix[ nEqu3 ]; + if ( nEquData == pPix[ nEqu3 + 1 ] && nEquData == pPix[ nEqu3 + 2 ] ) + break; + nEqu3++; + } + + // Die Daten von nx bis nEqu3 unkomprimiert schreiben (ggf. in mehreren Records): + while ( nEqu3 > nx ) + { + nCount = nEqu3 - nx; + if ( nCount > 128 ) + nCount = 128; + nFlagCounterByte = (BYTE)( nCount - 1 ); + *pPict << nFlagCounterByte; + do + { + *pPict << pPix[ nx++ ]; + nCount--; + } while ( nCount > 0 ); + } + + // Jetzt einen Komprimierungs-Record erzeugen (falls oben mindestens 3 + // gleiche Bytes gefunden): + if ( nx < nDstRowBytes ) + { // Hinweis: es gilt nx==nEqu3 (hoffentlich) + nCount = 3; // Drei Bytes sind gleich, wie weiter oben herausgefunden. + // Pruefen, ob es weitere gleiche Bytes gibts (dabei Max.-Record-Groesse beachten): + while ( nx + nCount < nDstRowBytes && nCount < 128 ) + { + if ( nEquData != pPix[ nx + nCount ] ) + break; + nCount++; + } + // nCount gleiche Bytes komprimiert schreiben: + nFlagCounterByte = (BYTE)( 1 - (long)nCount ); + *pPict << nFlagCounterByte << nEquData; + nx += nCount; + } + } + + // ByteCount berichtigen: + nPos = pPict->Tell(); + pPict->Seek( nDstRowPos ); + if ( nDstRowBytes > 250 ) + *pPict << ( (USHORT)( nPos - nDstRowPos - 2 ) ); + else + *pPict << ( (BYTE)( nPos - nDstRowPos - 1 ) ); + pPict->Seek( nPos ); + } + + // Prozente zaehlen, Callback, Fehler pruefen: + nActBitmapPercent =( ny * 70 / nHeight ) + 30; // (30% machten schon das Schreiben der Win-BMP-Datei aus) + MayCallback(); + if ( pPict->GetError() ) + bStatus = FALSE; + } + // Aufraeumen: + delete[] pPix; + } + + // Map-Daten muessen gerade Anzahl von Bytes sein: + if ( ( ( pPict->Tell() - nDstMapPos ) & 1 ) != 0 ) + *pPict << (BYTE)0; + + // Bitmaps zaehlen: + nWrittenBitmaps++; + nActBitmapPercent = 0; + if ( pAcc ) + aBitmap.ReleaseAccess( pAcc ); +} + +void PictWriter::WriteOpcode_EndOfFile() +{ + *pPict << (USHORT)0x00ff; +} + + +void PictWriter::SetAttrForPaint() +{ + WriteOpcode_PnMode(eSrcRasterOp); + WriteOpcode_RGBFgCol(aFillColor); + WriteOpcode_RGBBkCol(aFillColor); + WriteOpcode_PnFillPat(aFillColor!=Color( COL_TRANSPARENT )); +} + + +void PictWriter::SetAttrForFrame() +{ + WriteOpcode_PnMode(eSrcRasterOp); + WriteOpcode_PnSize(0); + WriteOpcode_RGBFgCol(aLineColor); + WriteOpcode_PnLinePat(aLineColor!=Color( COL_TRANSPARENT )); +} + + +void PictWriter::SetAttrForText() +{ + WriteOpcode_RGBFgCol(aSrcFont.GetColor()); + WriteOpcode_RGBBkCol(aSrcFont.GetFillColor()); + WriteOpcode_PnLinePat(TRUE); + WriteOpcode_FontName(aSrcFont); + WriteOpcode_TxSize((USHORT)(aSrcFont.GetSize().Height())); + WriteOpcode_TxMode(eSrcRasterOp); + WriteOpcode_TxFace(aSrcFont); +} + + +void PictWriter::WriteTextArray(Point & rPoint, const String& rString, const sal_Int32 * pDXAry) +{ + USHORT i,nLen; + sal_Unicode c; + BOOL bDelta; + Point aPt; + + if ( pDXAry == NULL ) + WriteOpcode_Text( rPoint, rString, FALSE ); + else + { + bDelta = FALSE; + nLen = rString.Len(); + for ( i = 0; i < nLen; i++ ) + { + c = rString.GetChar( i ); + if ( c && ( c != 0x20 ) ) + { + aPt = rPoint; + if ( i > 0 ) + aPt.X() += pDXAry[ i - 1 ]; + + WriteOpcode_Text( aPt, String( c ), bDelta ); + bDelta = TRUE; + } + } + } +} + +void PictWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon) +{ + if(rLinePolygon.count()) + { + basegfx::B2DPolyPolygon aLinePolyPolygon(rLinePolygon); + basegfx::B2DPolyPolygon aFillPolyPolygon; + + rInfo.applyToB2DPolyPolygon(aLinePolyPolygon, aFillPolyPolygon); + + if(aLinePolyPolygon.count()) + { + aLinePolyPolygon = aLinePolyPolygon.getDefaultAdaptiveSubdivision(); + const sal_uInt32 nPolyCount(aLinePolyPolygon.count()); + SetAttrForFrame(); + + for(sal_uInt32 a(0); a < nPolyCount; a++) + { + const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); + const sal_uInt32 nPointCount(aCandidate.count()); + + if(nPointCount) + { + const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount + 1 : nPointCount); + const basegfx::B2DPoint aCurr(aCandidate.getB2DPoint(0)); + Point nCurr(basegfx::fround(aCurr.getX()), basegfx::fround(aCurr.getY())); + + for(sal_uInt32 b(0); b < nEdgeCount; b++) + { + const sal_uInt32 nNextIndex((b + 1) % nPointCount); + const basegfx::B2DPoint aNext(aCandidate.getB2DPoint(nNextIndex)); + const Point nNext(basegfx::fround(aNext.getX()), basegfx::fround(aNext.getY())); + + WriteOpcode_Line(nCurr, nNext); + nCurr = nNext; + } + } + } + } + + if(aFillPolyPolygon.count()) + { + const Color aOldLineColor(aLineColor); + const Color aOldFillColor(aFillColor); + + aLineColor = Color( COL_TRANSPARENT ); + aFillColor = aOldLineColor; + SetAttrForPaint(); + + for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) + { + const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a).getDefaultAdaptiveSubdivision()); + WriteOpcode_Poly(PDM_PAINT, aPolygon); + } + + aLineColor = aOldLineColor; + aFillColor = aOldFillColor; + } + } +} + +void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF ) +{ + ULONG nA, nACount; + const MetaAction* pMA; + + if( !bStatus) + return; + + nACount=rMTF.GetActionCount(); + + for (nA=0; nAGetType()) + { + case META_PIXEL_ACTION: + { + const MetaPixelAction* pA = (const MetaPixelAction*) pMA; + WriteOpcode_PnMode(eSrcRasterOp); + WriteOpcode_PnSize(1); + WriteOpcode_RGBFgCol(pA->GetColor()); + WriteOpcode_PnLinePat(TRUE); + WriteOpcode_Line(pA->GetPoint(),pA->GetPoint()); + } + break; + + case META_POINT_ACTION: + { + const MetaPointAction* pA = (const MetaPointAction*) pMA; + + if( aLineColor != Color( COL_TRANSPARENT ) ) + { + SetAttrForFrame(); + WriteOpcode_Line( pA->GetPoint(),pA->GetPoint() ); + } + } + break; + + case META_LINE_ACTION: + { + const MetaLineAction* pA = (const MetaLineAction*) pMA; + + if( aLineColor != Color( COL_TRANSPARENT ) ) + { + if(pA->GetLineInfo().IsDefault()) + { + SetAttrForFrame(); + WriteOpcode_Line( pA->GetStartPoint(),pA->GetEndPoint() ); + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + basegfx::B2DPolygon aPolygon; + aPolygon.append(basegfx::B2DPoint(pA->GetStartPoint().X(), pA->GetStartPoint().Y())); + aPolygon.append(basegfx::B2DPoint(pA->GetEndPoint().X(), pA->GetEndPoint().Y())); + HandleLineInfoPolyPolygons(pA->GetLineInfo(), aPolygon); + } + } + break; + } + + case META_RECT_ACTION: + { + const MetaRectAction* pA = (const MetaRectAction*) pMA; + + if (aFillColor!=Color( COL_TRANSPARENT )) + { + SetAttrForPaint(); + WriteOpcode_Rect(PDM_PAINT,pA->GetRect()); + if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_SameRect(PDM_FRAME); + } + } + else if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_Rect(PDM_FRAME,pA->GetRect()); + } + } + break; + + case META_ROUNDRECT_ACTION: + { + const MetaRoundRectAction* pA = (const MetaRoundRectAction*) pMA; + + WriteOpcode_OvSize( Size( pA->GetHorzRound(), pA->GetVertRound() ) ); + + if (aFillColor!=Color( COL_TRANSPARENT )) + { + SetAttrForPaint(); + WriteOpcode_RRect(PDM_PAINT,pA->GetRect()); + if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_SameRRect(PDM_FRAME); + } + } + else if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_RRect(PDM_FRAME,pA->GetRect()); + } + } + break; + + case META_ELLIPSE_ACTION: + { + const MetaEllipseAction* pA = (const MetaEllipseAction*) pMA; + + if (aFillColor!=Color( COL_TRANSPARENT )) + { + SetAttrForPaint(); + WriteOpcode_Oval(PDM_PAINT,pA->GetRect()); + if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_SameOval(PDM_FRAME); + } + } + else if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_Oval(PDM_FRAME,pA->GetRect()); + } + } + break; + + case META_ARC_ACTION: + { + const MetaArcAction* pA = (const MetaArcAction*) pMA; + + if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_Arc(PDM_FRAME,pA->GetRect(),pA->GetStartPoint(),pA->GetEndPoint()); + } + } + break; + + case META_PIE_ACTION: + { + const MetaPieAction* pA = (const MetaPieAction *) pMA; + + if (aFillColor!=Color( COL_TRANSPARENT )) + { + SetAttrForPaint(); + WriteOpcode_Arc(PDM_PAINT,pA->GetRect(),pA->GetStartPoint(),pA->GetEndPoint()); + + if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_SameArc(PDM_FRAME,pA->GetRect(),pA->GetStartPoint(),pA->GetEndPoint()); + } + } + else if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_Arc(PDM_FRAME,pA->GetRect(),pA->GetStartPoint(),pA->GetEndPoint()); + } + + if (aLineColor!=Color( COL_TRANSPARENT )) + { + double fxc,fyc,fxr,fyr,fx1,fy1,fx2,fy2,l1,l2; + + fxc=((double)(pA->GetRect().Left()+pA->GetRect().Right()))/2.0; + fyc=((double)(pA->GetRect().Top()+pA->GetRect().Bottom()))/2.0; + fxr=((double)pA->GetRect().GetWidth())/2.0; + fyr=((double)pA->GetRect().GetHeight())/2.0; + fx1=((double)pA->GetStartPoint().X())-fxc; + fy1=((double)pA->GetStartPoint().Y())-fyc; + fx2=((double)pA->GetEndPoint().X())-fxc; + fy2=((double)pA->GetEndPoint().Y())-fyc; + l1=sqrt(fx1*fx1+fy1*fy1); + l2=sqrt(fx2*fx2+fy2*fy2); + + if (l1>0) + { + fx1=fx1/l1*fxr; + fy1=fy1/l1*fyr; + } + + if (l2>0) + { + fx2=fx2/l2*fxr; + fy2=fy2/l2*fyr; + } + fx1+=fxc; fy1+=fyc; fx2+=fxc; fy2+=fyc; + WriteOpcode_Line(Point((long)(fx1+0.5),(long)(fy1+0.5)), Point((long)(fxc+0.5),(long)(fyc+0.5))); + WriteOpcode_LineFrom(Point((long)(fx2+0.5),(long)(fy2+0.5))); + } + } + break; + + case META_CHORD_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_CHORD_ACTION!" ); + } + break; + + case META_POLYLINE_ACTION: + { + const MetaPolyLineAction* pA = (const MetaPolyLineAction*) pMA; + + if( aLineColor!=Color( COL_TRANSPARENT ) ) + { + const Polygon& rPoly = pA->GetPolygon(); + + if( rPoly.GetSize() ) + { + if(pA->GetLineInfo().IsDefault()) + { + Polygon aSimplePoly; + if ( rPoly.HasFlags() ) + rPoly.AdaptiveSubdivide( aSimplePoly ); + else + aSimplePoly = rPoly; + + const USHORT nSize = aSimplePoly.GetSize(); + Point aLast; + + if ( nSize ) + { + SetAttrForFrame(); + aLast = aSimplePoly[0]; + + for ( USHORT i = 1; i < nSize; i++ ) + { + WriteOpcode_Line( aLast, aSimplePoly[i] ); + aLast = aSimplePoly[i]; + } + } + } + else + { + // LineInfo used; handle Dash/Dot and fat lines + HandleLineInfoPolyPolygons(pA->GetLineInfo(), rPoly.getB2DPolygon()); + } + } + } + } + break; + + case META_POLYGON_ACTION: + { + const MetaPolygonAction* pA = (const MetaPolygonAction*) pMA; + + const Polygon& rPoly = pA->GetPolygon(); + + Polygon aSimplePoly; + if ( rPoly.HasFlags() ) + rPoly.AdaptiveSubdivide( aSimplePoly ); + else + aSimplePoly = rPoly; + + if (aFillColor!=Color( COL_TRANSPARENT )) + { + SetAttrForPaint(); + WriteOpcode_Poly( PDM_PAINT, aSimplePoly ); + } + if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + WriteOpcode_Poly( PDM_FRAME, aSimplePoly ); + } + } + break; + + case META_POLYPOLYGON_ACTION: + { + const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pMA; + + const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); + sal_uInt16 nPolyCount = rPolyPoly.Count(); + PolyPolygon aSimplePolyPoly( rPolyPoly ); + for ( sal_uInt16 i = 0; i < nPolyCount; i++ ) + { + if ( aSimplePolyPoly[ i ].HasFlags() ) + { + Polygon aSimplePoly; + aSimplePolyPoly[ i ].AdaptiveSubdivide( aSimplePoly ); + aSimplePolyPoly[ i ] = aSimplePoly; + } + } + if (aFillColor!=Color( COL_TRANSPARENT )) + { + SetAttrForPaint(); + WriteOpcode_Poly( PDM_PAINT, PolyPolygonToPolygon( aSimplePolyPoly )); + } + + if (aLineColor!=Color( COL_TRANSPARENT )) + { + USHORT nCount,i; + SetAttrForFrame(); + nCount = aSimplePolyPoly.Count(); + for ( i = 0; i < nCount; i++ ) + WriteOpcode_Poly( PDM_FRAME, aSimplePolyPoly.GetObject( i ) ); + } + } + break; + + case META_TEXT_ACTION: + { + const MetaTextAction* pA = (const MetaTextAction*) pMA; + Point aPt( pA->GetPoint() ); + + if ( aSrcFont.GetAlign() != ALIGN_BASELINE ) + { + VirtualDevice aVirDev; + + if (aSrcFont.GetAlign()==ALIGN_TOP) + aPt.Y()+=(long)aVirDev.GetFontMetric(aSrcFont).GetAscent(); + else + aPt.Y()-=(long)aVirDev.GetFontMetric(aSrcFont).GetDescent(); + } + + SetAttrForText(); + String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() ); + WriteOpcode_Text( aPt, aStr, FALSE ); + } + break; + + case META_TEXTARRAY_ACTION: + { + const MetaTextArrayAction* pA = (const MetaTextArrayAction*) pMA; + Point aPt( pA->GetPoint() ); + + if (aSrcFont.GetAlign()!=ALIGN_BASELINE) + { + VirtualDevice aVirDev; + + if (aSrcFont.GetAlign()==ALIGN_TOP) + aPt.Y()+=(long)aVirDev.GetFontMetric(aSrcFont).GetAscent(); + else + aPt.Y()-=(long)aVirDev.GetFontMetric(aSrcFont).GetDescent(); + } + SetAttrForText(); + String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() ); + WriteTextArray( aPt, aStr, pA->GetDXArray() ); + break; + } + + case META_STRETCHTEXT_ACTION: + { + const MetaStretchTextAction* pA = (const MetaStretchTextAction*) pMA; + Point aPt( pA->GetPoint() ); + String aStr( pA->GetText(),pA->GetIndex(),pA->GetLen() ); + VirtualDevice aVirDev; + sal_Int32* pDXAry = new sal_Int32[ aStr.Len() ]; + sal_Int32 nNormSize( aVirDev.GetTextArray( aStr,pDXAry ) ); + USHORT i; + + if (aSrcFont.GetAlign()!=ALIGN_BASELINE) + { + if (aSrcFont.GetAlign()==ALIGN_TOP) + aPt.Y()+=(long)aVirDev.GetFontMetric(aSrcFont).GetAscent(); + else + aPt.Y()-=(long)aVirDev.GetFontMetric(aSrcFont).GetDescent(); + } + + for ( i = 0; i < aStr.Len() - 1; i++ ) + pDXAry[ i ] = pDXAry[ i ] * ( (long)pA->GetWidth() ) / nNormSize; + + SetAttrForText(); + WriteTextArray( aPt, aStr, pDXAry ); + delete[] pDXAry; + } + break; + + case META_TEXTRECT_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_TEXTRECT_ACTION!" ); + } + break; + + case META_BMP_ACTION: + { + const MetaBmpAction* pA = (const MetaBmpAction*) pMA; + WriteOpcode_BitsRect( pA->GetPoint(),pA->GetBitmap().GetSizePixel(), pA->GetBitmap() ); + } + break; + + case META_BMPSCALE_ACTION: + { + const MetaBmpScaleAction* pA = (const MetaBmpScaleAction*) pMA; + WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), pA->GetBitmap() ); + } + break; + + case META_BMPSCALEPART_ACTION: + { + const MetaBmpScalePartAction* pA = (const MetaBmpScalePartAction*) pMA; + Bitmap aBmp( pA->GetBitmap() ); + + aBmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + WriteOpcode_BitsRect( pA->GetDestPoint(), pA->GetDestSize(), aBmp ); + } + break; + + case META_BMPEX_ACTION: + { + const MetaBmpExAction* pA = (const MetaBmpExAction*) pMA; + const Bitmap aBmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + + WriteOpcode_BitsRect( pA->GetPoint(), aBmp.GetSizePixel(), aBmp ); + } + break; + + case META_BMPEXSCALE_ACTION: + { + const MetaBmpExScaleAction* pA = (const MetaBmpExScaleAction*) pMA; + const Bitmap aBmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + + WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), aBmp ); + } + break; + + case META_BMPEXSCALEPART_ACTION: + { + const MetaBmpExScalePartAction* pA = (const MetaBmpExScalePartAction*) pMA; + Bitmap aBmp( Graphic( pA->GetBitmapEx() ).GetBitmap() ); + + aBmp.Crop( Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); + WriteOpcode_BitsRect( pA->GetDestPoint(), pA->GetDestSize(), aBmp ); + } + break; + + case META_EPS_ACTION : + { + const MetaEPSAction* pA = (const MetaEPSAction*)pMA; + const GDIMetaFile aGDIMetaFile( pA->GetSubstitute() ); + + INT32 nCount = aGDIMetaFile.GetActionCount(); + for ( INT32 i = 0; i < nCount; i++ ) + { + const MetaAction* pMetaAct = aGDIMetaFile.GetAction( i ); + if ( pMetaAct->GetType() == META_BMPSCALE_ACTION ) + { + const MetaBmpScaleAction* pBmpScaleAction = (const MetaBmpScaleAction*)pMetaAct; + WriteOpcode_BitsRect( pA->GetPoint(), pA->GetSize(), pBmpScaleAction->GetBitmap() ); + break; + } + } + } + break; + + case META_MASK_ACTION: + case META_MASKSCALE_ACTION: + case META_MASKSCALEPART_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_MASK..._ACTION!" ); + } + break; + + case META_GRADIENT_ACTION: + { + VirtualDevice aVDev; + GDIMetaFile aTmpMtf; + const MetaGradientAction* pA = (const MetaGradientAction*) pMA; + + aVDev.SetMapMode( aTargetMapMode ); + aVDev.AddGradientActions( pA->GetRect(), pA->GetGradient(), aTmpMtf ); + WriteOpcodes( aTmpMtf ); + } + break; + + case META_HATCH_ACTION: + { + VirtualDevice aVDev; + GDIMetaFile aTmpMtf; + const MetaHatchAction* pA = (const MetaHatchAction*) pMA; + + aVDev.SetMapMode( aTargetMapMode ); + aVDev.AddHatchActions( pA->GetPolyPolygon(), pA->GetHatch(), aTmpMtf ); + WriteOpcodes( aTmpMtf ); + } + break; + + case META_WALLPAPER_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_WALLPAPER_ACTION!" ); + } + break; + + case META_CLIPREGION_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_CLIPREGION_ACTION!" ); + } + break; + + case META_ISECTRECTCLIPREGION_ACTION: + { + const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA; + WriteOpcode_ClipRect( pA->GetRect() ); + } + break; + + case META_ISECTREGIONCLIPREGION_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_ISECTREGIONCLIPREGION_ACTION!" ); + } + break; + + case META_MOVECLIPREGION_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_MOVECLIPREGION_ACTION!" ); + } + break; + + case META_LINECOLOR_ACTION: + { + const MetaLineColorAction* pA = (const MetaLineColorAction*) pMA; + + if( pA->IsSetting() ) + aLineColor = pA->GetColor(); + else + aLineColor = Color( COL_TRANSPARENT ); + } + break; + + case META_FILLCOLOR_ACTION: + { + const MetaFillColorAction* pA = (const MetaFillColorAction*) pMA; + + if( pA->IsSetting() ) + aFillColor = pA->GetColor(); + else + aFillColor = Color( COL_TRANSPARENT ); + } + break; + + case META_TEXTCOLOR_ACTION: + { + const MetaTextColorAction* pA = (const MetaTextColorAction*) pMA; + aSrcFont.SetColor( pA->GetColor() ); + } + break; + + case META_TEXTFILLCOLOR_ACTION: + { + const MetaTextFillColorAction* pA = (const MetaTextFillColorAction*) pMA; + + if( pA->IsSetting() ) + aSrcFont.SetFillColor( pA->GetColor() ); + else + aSrcFont.SetFillColor( Color( COL_TRANSPARENT ) ); + } + break; + + case META_TEXTALIGN_ACTION: + { +// DBG_ERROR( "Unsupported PICT-Action: META_TEXTALIGN_ACTION!" ); + } + break; + + case META_MAPMODE_ACTION: + { + const MetaMapModeAction* pA = (const MetaMapModeAction*) pMA; + + if (aSrcMapMode!=pA->GetMapMode()) + { + if( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) + { + MapMode aMM = pA->GetMapMode(); + Fraction aScaleX = aMM.GetScaleX(); + Fraction aScaleY = aMM.GetScaleY(); + + Point aOrigin = aSrcMapMode.GetOrigin(); + BigInt aX( aOrigin.X() ); + aX *= BigInt( aScaleX.GetDenominator() ); + if( aOrigin.X() >= 0 ) + { + if( aScaleX.GetNumerator() >= 0 ) + aX += BigInt( aScaleX.GetNumerator()/2 ); + else + aX -= BigInt( (aScaleX.GetNumerator()+1)/2 ); + } + else + { + if( aScaleX.GetNumerator() >= 0 ) + aX -= BigInt( (aScaleX.GetNumerator()-1)/2 ); + else + aX += BigInt( aScaleX.GetNumerator()/2 ); + } + + aX /= BigInt( aScaleX.GetNumerator() ); + aOrigin.X() = (long)aX + aMM.GetOrigin().X(); + BigInt aY( aOrigin.Y() ); + aY *= BigInt( aScaleY.GetDenominator() ); + + if( aOrigin.Y() >= 0 ) + { + if( aScaleY.GetNumerator() >= 0 ) + aY += BigInt( aScaleY.GetNumerator()/2 ); + else + aY -= BigInt( (aScaleY.GetNumerator()+1)/2 ); + } + else + { + if( aScaleY.GetNumerator() >= 0 ) + aY -= BigInt( (aScaleY.GetNumerator()-1)/2 ); + else + aY += BigInt( aScaleY.GetNumerator()/2 ); + } + + aY /= BigInt( aScaleY.GetNumerator() ); + aOrigin.Y() = (long)aY + aMM.GetOrigin().Y(); + aSrcMapMode.SetOrigin( aOrigin ); + + aScaleX *= aSrcMapMode.GetScaleX(); + aScaleY *= aSrcMapMode.GetScaleY(); + aSrcMapMode.SetScaleX( aScaleX ); + aSrcMapMode.SetScaleY( aScaleY ); + } + else + aSrcMapMode = pA->GetMapMode(); + } + } + break; + + case META_FONT_ACTION: + { + const MetaFontAction* pA = (const MetaFontAction*) pMA; + aSrcFont=pA->GetFont(); + } + break; + + case META_PUSH_ACTION: + { + PictWriterAttrStackMember * pAt = new PictWriterAttrStackMember; + pAt->aLineColor=aLineColor; + pAt->aFillColor=aFillColor; + pAt->eRasterOp=eSrcRasterOp; + pAt->aFont=aSrcFont; + pAt->aMapMode=aSrcMapMode; + pAt->aClipRect=aClipRect; + pAt->pSucc=pAttrStack; + pAttrStack=pAt; + } + break; + + case META_POP_ACTION: + { + PictWriterAttrStackMember* pAt=pAttrStack; + + if( pAt ) + { + aLineColor=pAt->aLineColor; + aFillColor=pAt->aFillColor; + eSrcRasterOp=pAt->eRasterOp; + aSrcFont=pAt->aFont; + aSrcMapMode=pAt->aMapMode; + if ( pAt->aClipRect != aClipRect ) + { + Rectangle aRect( pAt->aClipRect ); + *pPict << (sal_uInt16)1 // opcode 1 + << (sal_uInt16)10 // data size + << (sal_Int16)aRect.Top() << (sal_Int16)aRect.Left() + << (sal_Int16)aRect.Bottom() << (sal_Int16)aRect.Right(); + } + aClipRect=pAt->aClipRect; + pAttrStack=pAt->pSucc; + delete pAt; + } + } + break; + + case META_RASTEROP_ACTION: + { + const MetaRasterOpAction* pA = (const MetaRasterOpAction*) pMA; + eSrcRasterOp=pA->GetRasterOp(); + } + break; + + case META_TRANSPARENT_ACTION: + { + const PolyPolygon& rPolyPoly = ( (const MetaTransparentAction*) pMA )->GetPolyPolygon(); + + if (aFillColor!=Color( COL_TRANSPARENT )) + { + SetAttrForPaint(); + WriteOpcode_Poly( PDM_PAINT, PolyPolygonToPolygon( rPolyPoly ) ); + } + + if (aLineColor!=Color( COL_TRANSPARENT )) + { + SetAttrForFrame(); + for( USHORT i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ ) + WriteOpcode_Poly( PDM_FRAME, rPolyPoly.GetObject( i ) ); + } + } + break; + + case META_FLOATTRANSPARENT_ACTION: + { + const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA; + + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; + + if( fScaleX != 1.0 || fScaleY != 1.0 ) + { + aTmpMtf.Scale( fScaleX, fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + } + + nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); + + if( nMoveX || nMoveY ) + aTmpMtf.Move( nMoveX, nMoveY ); + + WriteOpcodes( aTmpMtf ); + } + break; + } + + nWrittenActions++; + MayCallback(); + + if (pPict->GetError()) + bStatus=FALSE; + + if (bStatus==FALSE) + break; + } +} + + +void PictWriter::WriteHeader(const GDIMetaFile & rMTF) +{ + USHORT i; + Size aSize( rMTF.GetPrefSize() ); + Point aPoint; + Rectangle aRect( aPoint, aSize ); + + // 512 Bytes "Muell" am Anfang: + for (i=0;i<128;i++) *pPict << (sal_uInt32)0; + + // Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell: + *pPict << (USHORT)0; // wird spaeter durch UpdateHeader() berichtigt + + // Das Bounding-Rectangle (y1,x1,y2,x2 !): + WriteRectangle( aRect ); + + // Version 2: + *pPict << (sal_uInt32)0x001102ff; + + // Extended-Version-2-Header: + *pPict << (USHORT)0x0c00 // Opcode + << (USHORT)0xfffe // Version (?) + << (USHORT)0x0000 // Reserved + << (sal_uInt32) 0x00480000 // hRes + << (sal_uInt32) 0x00480000; + WriteRectangle( aRect ); + *pPict << (sal_uInt32)0x00000000; // Reserved + + // viele Import-Filter verlangen die Angabe eines + // Clipping-Bereichs am Anfang + + WriteOpcode_ClipRect( aRect ); +} + + +void PictWriter::UpdateHeader() +{ + ULONG nPos; + + // Lo-16-Bits der Groesse der Datei ohne die 512 Bytes Muell berichtigen: + nPos=pPict->Tell(); + pPict->Seek(512); + *pPict << (USHORT)((nPos-512)&0x0000ffff); + pPict->Seek(nPos); +} + + +BOOL PictWriter::WritePict(const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pFilterConfigItem ) +{ + PictWriterAttrStackMember* pAt; + MapMode aMap72( MAP_INCH ); + Fraction aDPIFrac( 1, 72 ); + + bStatus=TRUE; + nLastPercent=0; + + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + pPict=&rTargetStream; + pPict->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); + + aLineColor=Color( COL_BLACK ); + aFillColor=Color( COL_WHITE ); + eSrcRasterOp=ROP_OVERPAINT; + aSrcFont=Font(); + aSrcMapMode = rMTF.GetPrefMapMode(); + + aMap72.SetScaleX( aDPIFrac ); + aMap72.SetScaleY( aDPIFrac ); + aTargetMapMode = aMap72; + + pAttrStack=NULL; + + bDstBkPatValid=FALSE; + bDstTxFaceValid=FALSE; + bDstTxModeValid=FALSE; + bDstPnSizeValid=FALSE; + bDstPnModeValid=FALSE; + bDstPnPatValid=FALSE; + bDstFillPatValid=FALSE; + bDstTxSizeValid=FALSE; + bDstFgColValid=FALSE; + bDstBkColValid=FALSE; + bDstPenPositionValid=FALSE; + bDstTextPositionValid=FALSE; + bDstFontNameValid=FALSE; + + nNumberOfActions=0; + nNumberOfBitmaps=0; + nWrittenActions=0; + nWrittenBitmaps=0; + nActBitmapPercent=0; + + CountActionsAndBitmaps(rMTF); + + WriteHeader(rMTF); + WriteOpcodes(rMTF); + WriteOpcode_EndOfFile(); + UpdateHeader(); + + while (pAttrStack!=NULL) { + pAt=pAttrStack; + pAttrStack=pAt->pSucc; + delete pAt; + } + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return bStatus; +} + +//================== GraphicExport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicExport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, BOOL) +{ + PictWriter aPictWriter; + + if (rGraphic.GetType()==GRAPHIC_GDIMETAFILE) + { + GDIMetaFile aScaledMtf( rGraphic.GetGDIMetaFile() ); + +/* + MapMode aMap72( MAP_INCH ); + Fraction aDPIFrac( 1, 72 ); + Size aOldSize = aScaledMtf.GetPrefSize(); + + aMap72.SetScaleX( aDPIFrac ); + aMap72.SetScaleY( aDPIFrac ); + + Size aNewSize = OutputDevice::LogicToLogic( aOldSize, + aScaledMtf.GetPrefMapMode(), + aMap72 ); + + aScaledMtf.Scale( Fraction( aNewSize.Width(), aOldSize.Width() ), + Fraction( aNewSize.Height(), aOldSize.Height() ) ); + aScaledMtf.SetPrefMapMode( aMap72 ); + aScaledMtf.SetPrefSize( aNewSize ); +*/ + + return aPictWriter.WritePict( aScaledMtf, rStream, pFilterConfigItem ); + } + else + { + Bitmap aBmp=rGraphic.GetBitmap(); + GDIMetaFile aMTF; + VirtualDevice aVirDev; + + aMTF.Record(&aVirDev); + aVirDev.DrawBitmap(Point(),aBmp); + aMTF.Stop(); + aMTF.SetPrefSize(aBmp.GetSizePixel()); + return aPictWriter.WritePict( aMTF, rStream, pFilterConfigItem ); + } +} + +//================== GraphicDialog - die exportierte Funktion ================ + +extern "C" BOOL SAL_CALL DoExportDialog( FltCallDialogParameter& rPara ) +{ + BOOL bRet = FALSE; + + if ( rPara.pWindow ) + { + ByteString aResMgrName( "ept" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + rPara.pResMgr = pResMgr; + bRet = ( DlgExportEPCT( rPara ).Execute() == RET_OK ); + delete pResMgr; + } + else + bRet = TRUE; + } + + return bRet; +} + + +//=============================== fuer Windows ============================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/epict/epictstr.src b/filter/source/graphicfilter/epict/epictstr.src new file mode 100644 index 000000000000..8afebcb7564c --- /dev/null +++ b/filter/source/graphicfilter/epict/epictstr.src @@ -0,0 +1,38 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "strings.hrc" + +String KEY_MODE +{ + Text = "ExportMode"; +}; + +String KEY_SIZE +{ + Text = "Size"; +}; diff --git a/filter/source/graphicfilter/epict/exports.map b/filter/source/graphicfilter/epict/exports.map new file mode 100644 index 000000000000..61e4682c6551 --- /dev/null +++ b/filter/source/graphicfilter/epict/exports.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + GraphicExport; + DoExportDialog; + + local: + *; +}; diff --git a/filter/source/graphicfilter/epict/makefile.mk b/filter/source/graphicfilter/epict/makefile.mk new file mode 100644 index 000000000000..a7c99eb3f732 --- /dev/null +++ b/filter/source/graphicfilter/epict/makefile.mk @@ -0,0 +1,76 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=epict +TARGET2=ept +DEPTARGET=vepict + + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SRS1NAME=$(TARGET) +SRC1FILES = dlgepct.src \ + epictstr.src +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/epict.obj \ + $(SLO)$/dlgepct.obj +.ENDIF +# ========================================================================== + +RESLIB1NAME=$(TARGET2) +RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs +.IF "$(L10N_framework)"=="" +SHL1TARGET= ept$(DLLPOSTFIX) +SHL1IMPLIB= epict +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB) $(BASEGFXLIB) + +SHL1LIBS= $(SLB)$/epict.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/epict.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/epict/strings.hrc b/filter/source/graphicfilter/epict/strings.hrc new file mode 100644 index 000000000000..7834e3ea2bc0 --- /dev/null +++ b/filter/source/graphicfilter/epict/strings.hrc @@ -0,0 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ +#define KEY_MODE 260 +#define KEY_SIZE 261 + diff --git a/filter/source/graphicfilter/eppm/dlgeppm.cxx b/filter/source/graphicfilter/eppm/dlgeppm.cxx new file mode 100644 index 000000000000..23822bfebf7c --- /dev/null +++ b/filter/source/graphicfilter/eppm/dlgeppm.cxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#ifndef GCC +#endif +#include +#include +#include +#include "dlgeppm.hxx" +#include "dlgeppm.hrc" +#include "strings.hrc" + +/************************************************************************* +|* +|* Ctor +|* +\************************************************************************/ + +DlgExportEPPM::DlgExportEPPM( FltCallDialogParameter& rPara ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPPM, *rPara.pResMgr ) ), + rFltCallPara ( rPara ), + aGrpFormat ( this, ResId( GRP_FORMAT, *rPara.pResMgr ) ), + aRBRaw ( this, ResId( RB_RAW, *rPara.pResMgr ) ), + aRBASCII ( this, ResId( RB_ASCII, *rPara.pResMgr ) ), + aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + pMgr ( rPara.pResMgr ) +{ + FreeResource(); + + // Config-Parameter lesen + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/PPM" ) ); + pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + sal_Int32 nFormat = pConfigItem->ReadInt32( String( ResId( KEY_FORMAT, *pMgr ) ), 0 ); + + BOOL bCheck = FALSE; + if ( !nFormat ) + bCheck ^= TRUE; + aRBRaw.Check( bCheck ); + bCheck ^= TRUE; + aRBASCII.Check( bCheck ); + + aBtnOK.SetClickHdl( LINK( this, DlgExportEPPM, OK ) ); +} + +DlgExportEPPM::~DlgExportEPPM() +{ + delete pConfigItem; +} + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEPPM, OK, void *, EMPTYARG ) +{ + // Config-Parameter schreiben + sal_Int32 nFormat = 0; + if ( aRBASCII.IsChecked() ) + nFormat++; + pConfigItem->WriteInt32( String( ResId( KEY_FORMAT, *pMgr ) ), nFormat ); + rFltCallPara.aFilterData = pConfigItem->GetFilterData(); + EndDialog( RET_OK ); + + return 0; +} diff --git a/filter/source/graphicfilter/eppm/dlgeppm.hrc b/filter/source/graphicfilter/eppm/dlgeppm.hrc new file mode 100644 index 000000000000..876dfa840997 --- /dev/null +++ b/filter/source/graphicfilter/eppm/dlgeppm.hrc @@ -0,0 +1,34 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "filter.hrc" + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define GRP_FORMAT 1 +#define RB_RAW 1 +#define RB_ASCII 2 diff --git a/filter/source/graphicfilter/eppm/dlgeppm.hxx b/filter/source/graphicfilter/eppm/dlgeppm.hxx new file mode 100644 index 000000000000..a03ca3ad24f0 --- /dev/null +++ b/filter/source/graphicfilter/eppm/dlgeppm.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DLGEPPM_HXX_ +#define _DLGEPPM_HXX_ +#include +#include +#include +#include +#include +#include + + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen +|* +\************************************************************************/ + +class FilterConfigItem; +class ResMgr; + +class DlgExportEPPM : public ModalDialog +{ +private: + + FltCallDialogParameter& rFltCallPara; + + FixedLine aGrpFormat; + RadioButton aRBRaw; + RadioButton aRBASCII; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + FilterConfigItem* pConfigItem; + ResMgr* pMgr; + + DECL_LINK( OK, void * ); + +public: + DlgExportEPPM( FltCallDialogParameter& rPara ); + ~DlgExportEPPM(); +}; + +#endif // _DLGEPPM_HXX_ diff --git a/filter/source/graphicfilter/eppm/dlgeppm.src b/filter/source/graphicfilter/eppm/dlgeppm.src new file mode 100644 index 000000000000..bf6c6ec653cb --- /dev/null +++ b/filter/source/graphicfilter/eppm/dlgeppm.src @@ -0,0 +1,106 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "dlgeppm.hrc" +ModalDialog DLG_EXPORT_EPPM +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 133 , 63 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + Text [ en-US ] = "PPM Options" ; + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 73 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 73 , 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 73 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + FixedLine GRP_FORMAT + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 60 , 8 ) ; + Text [ en-US ] = "File format"; + }; + RadioButton RB_RAW + { + Pos = MAP_APPFONT ( 12 , 14 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Binary"; + }; + RadioButton RB_ASCII + { + Pos = MAP_APPFONT ( 12 , 28 ) ; + Size = MAP_APPFONT ( 45 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Text"; + }; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/eppm/eppm.cxx b/filter/source/graphicfilter/eppm/eppm.cxx new file mode 100644 index 000000000000..bef9ce9d3077 --- /dev/null +++ b/filter/source/graphicfilter/eppm/eppm.cxx @@ -0,0 +1,305 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include "strings.hrc" +#include "dlgeppm.hrc" +#include "dlgeppm.hxx" + +//============================ PPMWriter ================================== + +class PPMWriter { + +private: + + SvStream* mpOStm; // Die auszugebende PPM-Datei + USHORT mpOStmOldModus; + + BOOL mbStatus; + sal_Int32 mnMode; + BitmapReadAccess* mpAcc; + ULONG mnWidth, mnHeight; // Bildausmass in Pixeln + + BOOL ImplWriteHeader(); + void ImplWriteBody(); + void ImplWriteNumber( sal_Int32 ); + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + +public: + PPMWriter(); + ~PPMWriter(); + + BOOL WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigItem* pFilterConfigItem ); +}; + +//=================== Methoden von PPMWriter ============================== + +PPMWriter::PPMWriter() : + mbStatus ( TRUE ), + mpAcc ( NULL ) +{ +} + +// ------------------------------------------------------------------------ + +PPMWriter::~PPMWriter() +{ +} + +// ------------------------------------------------------------------------ + +BOOL PPMWriter::WritePPM( const Graphic& rGraphic, SvStream& rPPM, FilterConfigItem* pFilterConfigItem ) +{ + + mpOStm = &rPPM; + + if ( pFilterConfigItem ) + { + mnMode = pFilterConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "FileFormat" ) ), 0 ); + + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + Bitmap aBmp = aBmpEx.GetBitmap(); + aBmp.Convert( BMP_CONVERSION_24BIT ); + + mpOStmOldModus = mpOStm->GetNumberFormatInt(); + mpOStm->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + + mpAcc = aBmp.AcquireReadAccess(); + if( mpAcc ) + { + if ( ImplWriteHeader() ) + { + ImplWriteBody(); + } + aBmp.ReleaseAccess( mpAcc ); + } + else + mbStatus = FALSE; + + mpOStm->SetNumberFormatInt( mpOStmOldModus ); + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +BOOL PPMWriter::ImplWriteHeader() +{ + mnWidth = mpAcc->Width(); + mnHeight = mpAcc->Height(); + if ( mnWidth && mnHeight ) + { + if ( mnMode == 0 ) + *mpOStm << "P6\x0a"; + else + *mpOStm << "P3\x0a"; + + ImplWriteNumber( mnWidth ); + *mpOStm << (BYTE)32; + ImplWriteNumber( mnHeight ); + *mpOStm << (BYTE)32; + ImplWriteNumber( 255 ); // max. col. + *mpOStm << (BYTE)10; + } + else + mbStatus = FALSE; + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void PPMWriter::ImplWriteBody() +{ + if ( mnMode == 0 ) + { + for ( ULONG y = 0; y < mnHeight; y++ ) + { + for ( ULONG x = 0; x < mnWidth; x++ ) + { + const BitmapColor& rColor = mpAcc->GetPixel( y, x ); + *mpOStm << rColor.GetRed(); + *mpOStm << rColor.GetGreen(); + *mpOStm << rColor.GetBlue(); + } + } + } + else + { + for ( ULONG y = 0; y < mnHeight; y++ ) + { + int nCount = 70; + for ( ULONG x = 0; x < mnWidth; x++ ) + { + BYTE i, nDat[3], nNumb; + if ( nCount < 0 ) + { + nCount = 69; + *mpOStm << (BYTE)10; + } + nDat[0] = mpAcc->GetPixel( y, x ).GetRed(); + nDat[1] = mpAcc->GetPixel( y, x ).GetGreen(); + nDat[2] = mpAcc->GetPixel( y, x ).GetBlue(); + for ( i = 0; i < 3; i++ ) + { + nNumb = nDat[ i ] / 100; + if ( nNumb ) + { + *mpOStm << (BYTE)( nNumb + '0' ); + nDat[ i ] -= ( nNumb * 100 ); + nNumb = nDat[ i ] / 10; + *mpOStm << (BYTE)( nNumb + '0' ); + nDat[ i ] -= ( nNumb * 10 ); + *mpOStm << (BYTE)( nDat[ i ] + '0' ); + nCount -= 4; + } + else + { + nNumb = nDat[ i ] / 10; + if ( nNumb ) + { + *mpOStm << (BYTE)( nNumb + '0' ); + nDat[ i ] -= ( nNumb * 10 ); + *mpOStm << (BYTE)( nDat[ i ] + '0' ); + nCount -= 3; + } + else + { + *mpOStm << (BYTE)( nDat[ i ] + '0' ); + nCount -= 2; + } + } + *mpOStm << (BYTE)' '; + } + } + *mpOStm << (BYTE)10; + } + } +} + +// ------------------------------------------------------------------------ +// eine Dezimalzahl im ASCII format wird in den Stream geschrieben + +void PPMWriter::ImplWriteNumber( sal_Int32 nNumber ) +{ + const ByteString aNum( ByteString::CreateFromInt32( nNumber ) ); + + for( sal_Int16 n = 0, nLen = aNum.Len(); n < nLen; n++ ) + *mpOStm << aNum.GetChar( n ); + +} + +// ------------------------------------------------------------------------ + +// --------------------- +// - exported function - +// --------------------- + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL ) +{ + PPMWriter aPPMWriter; + return aPPMWriter.WritePPM( rGraphic, rStream, pFilterConfigItem ); +} + +// ------------------------------------------------------------------------ + +extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara ) +{ + BOOL bRet = FALSE; + + if ( rPara.pWindow ) + { + ByteString aResMgrName( "epp" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + rPara.pResMgr = pResMgr; + bRet = ( DlgExportEPPM( rPara ).Execute() == RET_OK ); + delete pResMgr; + } + else + bRet = TRUE; + } + + return bRet; +} + +#ifndef GCC +#endif + +// ------------------------------------------------------------------------ + +// --------------- +// - Win16 trash - +// --------------- + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ + if ( nHeap ) + UnlockData( 0 ); + + hDLLInst = hDLL; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/eppm/eppmstr.src b/filter/source/graphicfilter/eppm/eppmstr.src new file mode 100644 index 000000000000..8424505dbcd1 --- /dev/null +++ b/filter/source/graphicfilter/eppm/eppmstr.src @@ -0,0 +1,35 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "strings.hrc" + +// Key fuer den Dialog +String KEY_FORMAT +{ + Text = "FileFormat"; +}; diff --git a/filter/source/graphicfilter/eppm/exports.map b/filter/source/graphicfilter/eppm/exports.map new file mode 100644 index 000000000000..61e4682c6551 --- /dev/null +++ b/filter/source/graphicfilter/eppm/exports.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + GraphicExport; + DoExportDialog; + + local: + *; +}; diff --git a/filter/source/graphicfilter/eppm/makefile.mk b/filter/source/graphicfilter/eppm/makefile.mk new file mode 100644 index 000000000000..44e6ca11d34a --- /dev/null +++ b/filter/source/graphicfilter/eppm/makefile.mk @@ -0,0 +1,76 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=eppm +TARGET2=epp +DEPTARGET=veppm + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SRS1NAME=$(TARGET) +SRC1FILES= dlgeppm.src \ + eppmstr.src +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/eppm.obj \ + $(SLO)$/dlgeppm.obj +.ENDIF +# ========================================================================== + +RESLIB1NAME=$(TARGET2) +RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs +.IF "$(L10N_framework)"=="" +SHL1TARGET= epp$(DLLPOSTFIX) +SHL1IMPLIB= eppm +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(CPPULIB) $(SVTOOLLIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/eppm.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/eppm.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/eppm/strings.hrc b/filter/source/graphicfilter/eppm/strings.hrc new file mode 100644 index 000000000000..122719e87d4b --- /dev/null +++ b/filter/source/graphicfilter/eppm/strings.hrc @@ -0,0 +1,27 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ +#define KEY_FORMAT 256 diff --git a/filter/source/graphicfilter/eps/dlgeps.cxx b/filter/source/graphicfilter/eps/dlgeps.cxx new file mode 100644 index 000000000000..c6f2abba5912 --- /dev/null +++ b/filter/source/graphicfilter/eps/dlgeps.cxx @@ -0,0 +1,206 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#ifndef GCC +#endif + +#include +#include +#include +#include "dlgeps.hxx" +#include "dlgeps.hrc" +#include "strings.hrc" + +/************************************************************************* +|* +|* Ctor +|* +\************************************************************************/ + +DlgExportEPS::DlgExportEPS( FltCallDialogParameter& rPara ) : + ModalDialog ( rPara.pWindow, ResId( DLG_EXPORT_EPS, *rPara.pResMgr ) ), + rFltCallPara ( rPara ), + aGrpPreview ( this, ResId( GRP_PREVIEW, *rPara.pResMgr ) ), + aCBPreviewTiff ( this, ResId( CB_PREVIEW_TIFF, *rPara.pResMgr ) ), + aCBPreviewEPSI ( this, ResId( CB_PREVIEW_EPSI, *rPara.pResMgr ) ), + aGrpVersion ( this, ResId( GRP_VERSION, *rPara.pResMgr ) ), + aRBLevel1 ( this, ResId( RB_LEVEL1, *rPara.pResMgr ) ), + aRBLevel2 ( this, ResId( RB_LEVEL2, *rPara.pResMgr ) ), + aGrpColor ( this, ResId( GRP_COLOR, *rPara.pResMgr ) ), + aRBColor ( this, ResId( RB_COLOR, *rPara.pResMgr ) ), + aRBGrayscale ( this, ResId( RB_GRAYSCALE, *rPara.pResMgr ) ), + aGrpCompression ( this, ResId( GRP_COMPRESSION, *rPara.pResMgr ) ), + aRBCompressionLZW ( this, ResId( RB_COMPRESSION_LZW, *rPara.pResMgr ) ), + aRBCompressionNone ( this, ResId( RB_COMPRESSION_NONE, *rPara.pResMgr ) ), + aBtnOK ( this, ResId( BTN_OK, *rPara.pResMgr ) ), + aBtnCancel ( this, ResId( BTN_CANCEL, *rPara.pResMgr ) ), + aBtnHelp ( this, ResId( BTN_HELP, *rPara.pResMgr ) ), + pMgr ( rPara.pResMgr ) +{ + FreeResource(); + + String aFilterConfigPath( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/EPS" ) ); + pConfigItem = new FilterConfigItem( aFilterConfigPath, &rPara.aFilterData ); + + // Config-Parameter lesen + String sPreview( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ); + String sVersion( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ); + String sColorFormat( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ); + String sCompressionMode( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ); + String sTextMode( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ); + + sal_Int32 nPreview = pConfigItem->ReadInt32( sPreview, 0 ); + sal_Int32 nVersion = pConfigItem->ReadInt32( sVersion, 2 ); + sal_Int32 nColor = pConfigItem->ReadInt32( sColorFormat, 0 ); + sal_Int32 nCompr = pConfigItem->ReadInt32( sCompressionMode, 2 ); + + /* SJ: The following line is not superfluous, reading the item will also #106652# + create the corresponding FilterData Property. Since all filter + are no longer accessing the configuration itself, we have fill the + FilterData sequence with all available configuration items */ + pConfigItem->ReadInt32( sTextMode, 0 ); + + BOOL bCheck = FALSE; + if ( nPreview & 1 ) + bCheck = TRUE; + aCBPreviewTiff.Check( bCheck ); + if ( nPreview & 2 ) + bCheck = TRUE; + aCBPreviewEPSI.Check( bCheck ); + + bCheck = FALSE; + if ( nVersion == 1 ) + bCheck ^= TRUE; + aRBLevel1.Check( bCheck ); + bCheck ^= TRUE; + aRBLevel2.Check( bCheck ); + + bCheck = FALSE; + if ( nColor == 1 ) + bCheck ^= TRUE; + aRBColor.Check( bCheck ); + bCheck ^= TRUE; + aRBGrayscale.Check( bCheck ); + + bCheck = FALSE; + if ( nCompr == 1 ) + bCheck ^= TRUE; + aRBCompressionLZW.Check( bCheck ); + bCheck ^= TRUE; + aRBCompressionNone.Check( bCheck ); + + if ( aRBLevel1.IsChecked() ) + { + aRBColor.Disable(); + aRBGrayscale.Disable(); + aRBCompressionNone.Disable(); + aRBCompressionLZW.Disable(); + aRBCompressionNone.Disable(); + } + + aBtnOK.SetClickHdl( LINK( this, DlgExportEPS, OK ) ); + aRBLevel1.SetClickHdl( LINK( this, DlgExportEPS, LEVEL1 ) ); + aRBLevel2.SetClickHdl( LINK( this, DlgExportEPS, LEVEL2 ) ); +} + +DlgExportEPS::~DlgExportEPS() +{ + delete pConfigItem; +} + +/************************************************************************* +|* +|* Speichert eingestellte Werte in ini-Datei +|* +\************************************************************************/ + +IMPL_LINK( DlgExportEPS, OK, void *, EMPTYARG ) +{ + + // Config-Parameter schreiben + sal_Int32 nCheck = 0; + if ( aCBPreviewTiff.IsChecked() ) + nCheck++; + if ( aCBPreviewEPSI.IsChecked() ) + nCheck += 2; + + String sPreview( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ); + pConfigItem->WriteInt32( sPreview, nCheck ); + + nCheck = 1; + if ( aRBLevel2.IsChecked() ) + nCheck++; + String sVersion( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ); + pConfigItem->WriteInt32( sVersion, nCheck ); + + nCheck = 1; + if ( aRBGrayscale.IsChecked() ) + nCheck++; + String sColorFormat( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ); + pConfigItem->WriteInt32( sColorFormat, nCheck ); + + nCheck = 1; + if ( aRBCompressionNone.IsChecked() ) + nCheck++; + String sCompressionMode( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ); + pConfigItem->WriteInt32( sCompressionMode, nCheck ); + + rFltCallPara.aFilterData = pConfigItem->GetFilterData(); + EndDialog( RET_OK ); + + return 0; +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DlgExportEPS, LEVEL1, void*, EMPTYARG ) +{ + if ( aRBLevel1.IsChecked() ) + { + aRBColor.Disable(); + aRBGrayscale.Disable(); + aRBCompressionLZW.Disable(); + aRBCompressionNone.Disable(); + } + return 0; +} + +//------------------------------------------------------------------------ + +IMPL_LINK( DlgExportEPS, LEVEL2, void*, EMPTYARG ) +{ + if ( aRBLevel2.IsChecked() ) + { + aRBColor.Enable(); + aRBGrayscale.Enable(); + aRBCompressionLZW.Enable(); + aRBCompressionNone.Enable(); + } + return 0; +} diff --git a/filter/source/graphicfilter/eps/dlgeps.hrc b/filter/source/graphicfilter/eps/dlgeps.hrc new file mode 100644 index 000000000000..061c8b2db6cb --- /dev/null +++ b/filter/source/graphicfilter/eps/dlgeps.hrc @@ -0,0 +1,43 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "filter.hrc" + +#define BTN_OK 1 +#define BTN_CANCEL 1 +#define BTN_HELP 1 +#define GRP_PREVIEW 1 +#define GRP_VERSION 2 +#define GRP_COLOR 3 +#define GRP_COMPRESSION 4 +#define CB_PREVIEW_TIFF 1 +#define CB_PREVIEW_EPSI 2 +#define RB_LEVEL1 1 +#define RB_LEVEL2 2 +#define RB_COLOR 3 +#define RB_GRAYSCALE 4 +#define RB_COMPRESSION_LZW 5 +#define RB_COMPRESSION_NONE 6 diff --git a/filter/source/graphicfilter/eps/dlgeps.hxx b/filter/source/graphicfilter/eps/dlgeps.hxx new file mode 100644 index 000000000000..ada390b44e87 --- /dev/null +++ b/filter/source/graphicfilter/eps/dlgeps.hxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DLGEPS_HXX_ +#define _DLGEPS_HXX_ +#include +#include +#include +#include +#include +#include +#include + + +/************************************************************************* +|* +|* Dialog zum Einstellen von Filteroptionen +|* +\************************************************************************/ + +class FilterConfigItem; +class ResMgr; + +class DlgExportEPS : public ModalDialog +{ +private: + + FltCallDialogParameter& rFltCallPara; + + FixedLine aGrpPreview; + CheckBox aCBPreviewTiff; + CheckBox aCBPreviewEPSI; + FixedLine aGrpVersion; + RadioButton aRBLevel1; + RadioButton aRBLevel2; + FixedLine aGrpColor; + RadioButton aRBColor; + RadioButton aRBGrayscale; + FixedLine aGrpCompression; + RadioButton aRBCompressionLZW; + RadioButton aRBCompressionNone; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + FilterConfigItem* pConfigItem; + ResMgr* pMgr; + + DECL_LINK( OK, void * ); + DECL_LINK( LEVEL1, void* ); + DECL_LINK( LEVEL2, void* ); + +public: + DlgExportEPS( FltCallDialogParameter& rPara ); + ~DlgExportEPS(); +}; + +#endif // _DLGEPS_HXX_ diff --git a/filter/source/graphicfilter/eps/dlgeps.src b/filter/source/graphicfilter/eps/dlgeps.src new file mode 100644 index 000000000000..31ddccd5be4f --- /dev/null +++ b/filter/source/graphicfilter/eps/dlgeps.src @@ -0,0 +1,160 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "dlgeps.hrc" +ModalDialog DLG_EXPORT_EPS +{ + OutputSize = TRUE ; + SVLook = TRUE ; + Size = MAP_APPFONT ( 230, 161 ) ; + Moveable = TRUE ; + Closeable = TRUE ; + Text [ en-US ] = "EPS Export Options"; + OKButton BTN_OK + { + Pos = MAP_APPFONT ( 174 , 6 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + DefButton = TRUE ; + }; + CancelButton BTN_CANCEL + { + Pos = MAP_APPFONT ( 174, 23 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + HelpButton BTN_HELP + { + Pos = MAP_APPFONT ( 174 , 43 ) ; + Size = MAP_APPFONT ( 50 , 14 ) ; + TabStop = TRUE ; + }; + + FixedLine GRP_PREVIEW + { + Pos = MAP_APPFONT ( 6 , 3 ) ; + Size = MAP_APPFONT ( 162 , 8 ) ; + Text [ en-US ] = "Preview"; + }; + CheckBox CB_PREVIEW_TIFF + { + Pos = MAP_APPFONT ( 12, 14 ) ; + Size = MAP_APPFONT ( 150 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Image ~preview (TIFF)"; + }; + CheckBox CB_PREVIEW_EPSI + { + Pos = MAP_APPFONT ( 12 , 28 ) ; + Size = MAP_APPFONT ( 150, 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Interchange (EPSI)"; + }; + FixedLine GRP_VERSION + { + Pos = MAP_APPFONT ( 6, 41 ) ; + Size = MAP_APPFONT ( 162 , 8 ) ; + Text [ en-US ] = "Version"; + }; + RadioButton RB_LEVEL1 + { + Pos = MAP_APPFONT ( 12 , 52 ) ; + Size = MAP_APPFONT ( 150 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Level ~1"; + }; + RadioButton RB_LEVEL2 + { + Pos = MAP_APPFONT ( 12 , 66 ) ; + Size = MAP_APPFONT ( 150, 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Level ~2"; + }; + + FixedLine GRP_COLOR + { + Pos = MAP_APPFONT ( 6 , 79 ) ; + Size = MAP_APPFONT ( 162 , 8 ) ; + Text [ en-US ] = "Color format"; + }; + RadioButton RB_COLOR + { + Pos = MAP_APPFONT ( 12 , 90 ) ; + Size = MAP_APPFONT ( 150, 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Color"; + }; + RadioButton RB_GRAYSCALE + { + Pos = MAP_APPFONT ( 12 , 104 ) ; + Size = MAP_APPFONT ( 150, 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Grayscale"; + }; + + FixedLine GRP_COMPRESSION + { + Pos = MAP_APPFONT ( 6 , 117 ) ; + Size = MAP_APPFONT ( 162 , 8 ) ; + Text [ en-US ] = "Compression"; + }; + RadioButton RB_COMPRESSION_LZW + { + Pos = MAP_APPFONT ( 12, 128 ); + Size = MAP_APPFONT ( 150, 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "LZW encoding"; + }; + RadioButton RB_COMPRESSION_NONE + { + Pos = MAP_APPFONT ( 12, 141 ) ; + Size = MAP_APPFONT ( 150, 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "None"; + }; +}; + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx new file mode 100644 index 000000000000..5e221b58c72e --- /dev/null +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -0,0 +1,2793 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "strings.hrc" +#include "dlgeps.hrc" +#include "dlgeps.hxx" + +#include + +#define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox + // in the first 4096 bytes + +#define EPS_PREVIEW_TIFF 1 +#define EPS_PREVIEW_EPSI 2 + +#define PS_LINESIZE 70 // maximum number of characters a line in the output + +#define PS_NONE 0 // formating mode: action which is inserted behind the output +#define PS_SPACE 1 +#define PS_RET 2 +#define PS_WRAP 4 + +// -----------------------------Feld-Typen------------------------------- + +struct ChrSet +{ + struct ChrSet * pSucc; + BYTE nSet; + String aName; + FontWeight eWeight; +}; + +struct StackMember +{ + struct StackMember * pSucc; + Color aGlobalCol; + BOOL bLineCol; + Color aLineCol; + BOOL bFillCol; + Color aFillCol; + Color aTextCol; + BOOL bTextFillCol; + Color aTextFillCol; + Color aBackgroundCol; + Font aFont; + TextAlign eTextAlign; + + double fLineWidth; + double fMiterLimit; + SvtGraphicStroke::CapType eLineCap; + SvtGraphicStroke::JoinType eJoinType; + SvtGraphicStroke::DashArray aDashArray; +}; + +struct PSLZWCTreeNode +{ + + PSLZWCTreeNode* pBrother; // naechster Knoten, der den selben Vater hat + PSLZWCTreeNode* pFirstChild; // erster Sohn + USHORT nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn + USHORT nValue; // Der Pixelwert +}; + +class PSWriter +{ +private: + BOOL mbStatus; + ULONG mnLevelWarning; // number of embedded eps files which was not exported + ULONG mnLastPercent; // Mit welcher Zahl pCallback zuletzt aufgerufen wurde. + UINT32 mnLatestPush; // offset auf streamposition, an der zuletzt gepusht wurde + + long mnLevel; // dialog options + sal_Bool mbGrayScale; + sal_Bool mbCompression; + sal_Int32 mnPreview; + sal_Int32 mnTextMode; + + SvStream* mpPS; + const GDIMetaFile* pMTF; + GDIMetaFile* pAMTF; // only created if Graphics is not a Metafile + VirtualDevice aVDev; + + double nBoundingX1; // this represents the bounding box + double nBoundingY1; + double nBoundingX2; + double nBoundingY2; + // + StackMember* pGDIStack; + ULONG mnCursorPos; // aktuelle Cursorposition im Output + Color aColor; // aktuelle Farbe die fuer den Output benutzt wird + BOOL bLineColor; + Color aLineColor; // aktuelle GDIMetafile Farbeinstellungen + BOOL bFillColor; // + Color aFillColor; // + Color aTextColor; // + BOOL bTextFillColor; // + Color aTextFillColor; // + Color aBackgroundColor; // + BOOL bRegionChanged; + TextAlign eTextAlign; // + + double fLineWidth; + double fMiterLimit; + SvtGraphicStroke::CapType eLineCap; + SvtGraphicStroke::JoinType eJoinType; + SvtGraphicStroke::DashArray aDashArray; + + Font maFont; + Font maLastFont; + BYTE nChrSet; + ChrSet* pChrSetList; // Liste der Character-Sets + BYTE nNextChrSetId; // die erste unbenutzte ChrSet-Id + + PSLZWCTreeNode* pTable; // LZW compression data + PSLZWCTreeNode* pPrefix; // the compression is as same as the TIFF compression + USHORT nDataSize; + USHORT nClearCode; + USHORT nEOICode; + USHORT nTableSize; + USHORT nCodeSize; + ULONG nOffset; + ULONG dwShift; + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + void ImplWriteProlog( const Graphic* pPreviewEPSI = NULL ); + void ImplWriteEpilog(); + void ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ); + + // this method makes LF's, space inserting and word wrapping as used in all nMode + // parameters + inline void ImplExecMode( ULONG nMode ); + + // writes char[] + LF to stream + inline void ImplWriteLine( const char*, ULONG nMode = PS_RET ); + + // writes ( nNumb / 10^nCount ) in ASCII format to stream + void ImplWriteF( sal_Int32 nNumb, ULONG nCount = 3, ULONG nMode = PS_SPACE ); + + // writes a double in ASCII format to stream + void ImplWriteDouble( double, ULONG nMode = PS_SPACE ); + + // writes a long in ASCII format to stream + void ImplWriteLong( sal_Int32 nNumb, ULONG nMode = PS_SPACE ); + + // writes a byte in ASCII format to stream + void ImplWriteByte( BYTE nNumb, ULONG nMode = PS_SPACE ); + + // writes a byte in ASCII (hex) format to stream + void ImplWriteHexByte( BYTE nNumb, ULONG nMode = PS_WRAP ); + + // writes nNumb as number from 0.000 till 1.000 in ASCII format to stream + void ImplWriteB1( BYTE nNumb, ULONG nMode = PS_SPACE ); + + inline void ImplWritePoint( const Point&, sal_uInt32 nMode = PS_SPACE ); + void ImplMoveTo( const Point&, sal_uInt32 nMode = PS_SPACE ); + void ImplLineTo( const Point&, sal_uInt32 nMode = PS_SPACE ); + void ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3, sal_uInt32 nMode = PS_SPACE ); + void ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET ); + void ImplScale( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET ); + + void ImplWriteLine( const Polygon & rPolygon ); + void ImplAddPath( const Polygon & rPolygon ); + void ImplWriteLineInfo( double fLineWidth, double fMiterLimit, SvtGraphicStroke::CapType eLineCap, + SvtGraphicStroke::JoinType eJoinType, SvtGraphicStroke::DashArray& rDashArray ); + void ImplWriteLineInfo( const LineInfo& rLineInfo ); + void ImplRect( const Rectangle & rRectangle ); + void ImplRectFill ( const Rectangle & rRectangle ); + void ImplWriteGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev ); + void ImplIntersect( const PolyPolygon& rPolyPoly ); + void ImplPolyPoly( const PolyPolygon & rPolyPolygon, sal_Bool bTextOutline = sal_False ); + void ImplPolyLine( const Polygon & rPolygon ); + + void ImplSetClipRegion( Region& rRegion ); + void ImplBmp( Bitmap*, Bitmap*, const Point &, double nWidth, double nHeight ); + void ImplText( const String& rUniString, const Point& rPos, const INT32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev ); + void ImplSetAttrForText( const Point & rPoint ); + void ImplWriteCharacter( sal_Char ); + void ImplWriteString( const ByteString&, VirtualDevice& rVDev, const INT32* pDXArry = NULL, BOOL bStretch = FALSE ); + void ImplDefineFont( const char*, const char* ); + + void ImplClosePathDraw( ULONG nMode = PS_RET ); + void ImplPathDraw(); + + inline void ImplWriteLineColor( ULONG nMode = PS_RET ); + inline void ImplWriteFillColor( ULONG nMode = PS_RET ); + inline void ImplWriteTextColor( ULONG nMode = PS_RET ); + inline void ImplWriteTextFillColor( ULONG nMode = PS_RET ); + void ImplWriteColor( ULONG nMode ); + + double ImplGetScaling( const MapMode& ); + void ImplGetMapMode( const MapMode& ); + BOOL ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize ); + BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ); + // LZW methods + void StartCompression(); + void Compress( BYTE nSrc ); + void EndCompression(); + inline void WriteBits( USHORT nCode, USHORT nCodeLen ); + +public: + BOOL WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* ); + PSWriter(); + ~PSWriter(); +}; + +//========================== Methoden von PSWriter ========================== + +//--------------------------------------------------------------------------------- + +PSWriter::PSWriter() +{ + pAMTF = NULL; +} + + +PSWriter::~PSWriter() +{ + delete pAMTF; +} + +//--------------------------------------------------------------------------------- + +BOOL PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, FilterConfigItem* pFilterConfigItem ) +{ + UINT32 nStreamPosition = 0, nPSPosition = 0; // -Wall warning, unset, check + + mbStatus = TRUE; + mnPreview = 0; + mnLevelWarning = 0; + mnLastPercent = 0; + mnLatestPush = 0xEFFFFFFE; + + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + mpPS = &rTargetStream; + mpPS->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + + // default values for the dialog options + mnLevel = 2; + mbGrayScale = FALSE; + mbCompression = TRUE; + mnTextMode = 0; // default0 : export glyph outlines + + // try to get the dialog selection + if ( pFilterConfigItem ) + { + ByteString aResMgrName( "eps" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + String aPreviewStr( RTL_CONSTASCII_USTRINGPARAM( "Preview" ) ); + String aVersionStr( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ); + String aColorStr( RTL_CONSTASCII_USTRINGPARAM( "ColorFormat" ) ); + String aComprStr( RTL_CONSTASCII_USTRINGPARAM( "CompressionMode" ) ); + mnPreview = pFilterConfigItem->ReadInt32( aPreviewStr, 1 ); + mnLevel = pFilterConfigItem->ReadInt32( aVersionStr, 2 ); + if ( mnLevel != 1 ) + mnLevel = 2; + mbGrayScale = pFilterConfigItem->ReadInt32( aColorStr, 1 ) == 2; + mbCompression = pFilterConfigItem->ReadInt32( aComprStr, 1 ) == 1; + String sTextMode( RTL_CONSTASCII_USTRINGPARAM( "TextMode" ) ); + mnTextMode = pFilterConfigItem->ReadInt32( sTextMode, 0 ); + if ( mnTextMode > 2 ) + mnTextMode = 0; + delete pResMgr; + } + } + + // compression is not available for Level 1 + if ( mnLevel == 1 ) + { + mbGrayScale = TRUE; + mbCompression = FALSE; + } + + if ( mnPreview & EPS_PREVIEW_TIFF ) + { + rTargetStream << (UINT32)0xC6D3D0C5; + nStreamPosition = rTargetStream.Tell(); + rTargetStream << (UINT32)0 << (UINT32)0 << (UINT32)0 << (UINT32)0 + << nStreamPosition + 26 << (UINT32)0 << (UINT16)0xffff; + + UINT32 nErrCode; + if ( mbGrayScale ) + { + BitmapEx aTempBitmapEx( rGraphic.GetBitmapEx() ); + aTempBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS ); + nErrCode = GraphicConverter::Export( rTargetStream, aTempBitmapEx, CVT_TIF ) ; + } + else + nErrCode = GraphicConverter::Export( rTargetStream, rGraphic, CVT_TIF ) ; + + if ( nErrCode == ERRCODE_NONE ) + { + rTargetStream.Seek( STREAM_SEEK_TO_END ); + nPSPosition = rTargetStream.Tell(); + rTargetStream.Seek( nStreamPosition + 20 ); + rTargetStream << nPSPosition - 30; // size of tiff gfx + rTargetStream.Seek( nPSPosition ); + } + else + { + mnPreview &=~ EPS_PREVIEW_TIFF; + rTargetStream.Seek( nStreamPosition - 4 ); + } + } + + // global default value setting + ChrSet* pCS; + StackMember* pGS; + + if ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE ) + pMTF = &rGraphic.GetGDIMetaFile(); + else + pMTF = pAMTF = new GDIMetaFile( rGraphic.GetGDIMetaFile() ); + aVDev.SetMapMode( pMTF->GetPrefMapMode() ); + nBoundingX1 = nBoundingY1 = 0; + nBoundingX2 = pMTF->GetPrefSize().Width(); + nBoundingY2 = pMTF->GetPrefSize().Height(); + + pGDIStack = NULL; + aColor = Color( COL_TRANSPARENT ); + bLineColor = TRUE; + aLineColor = Color( COL_BLACK ); + bFillColor = TRUE; + aFillColor = Color( COL_WHITE ); + bTextFillColor = TRUE; + aTextFillColor = Color( COL_BLACK ); + fLineWidth = 1; + fMiterLimit = 15; // use same limit as most graphic systems and basegfx + eLineCap = SvtGraphicStroke::capButt; + eJoinType = SvtGraphicStroke::joinMiter; + aBackgroundColor = Color( COL_WHITE ); + eTextAlign = ALIGN_BASELINE; + bRegionChanged = FALSE; + + nChrSet = 0x00; + pChrSetList = NULL; + nNextChrSetId = 1; + + if( pMTF->GetActionCount() ) + { + ImplWriteProlog( ( mnPreview & EPS_PREVIEW_EPSI ) ? &rGraphic : NULL ); + mnCursorPos = 0; + ImplWriteActions( *pMTF, aVDev ); + ImplWriteEpilog(); + if ( mnPreview & EPS_PREVIEW_TIFF ) + { + UINT32 nPosition = rTargetStream.Tell(); + rTargetStream.Seek( nStreamPosition ); + rTargetStream << nPSPosition; + rTargetStream << nPosition - nPSPosition; + rTargetStream.Seek( nPosition ); + } + while( pChrSetList ) + { + pCS=pChrSetList; + pChrSetList=pCS->pSucc; + delete pCS; + } + while( pGDIStack ) + { + pGS=pGDIStack; + pGDIStack=pGS->pSucc; + delete pGS; + } + } + else + mbStatus = FALSE; + + if ( mbStatus && mnLevelWarning && pFilterConfigItem ) + { + ByteString aResMgrName( "eps" ); + ResMgr* pResMgr; + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + if( pResMgr ) + { + InfoBox aInfoBox( NULL, String( ResId( KEY_VERSION_CHECK, *pResMgr ) ) ); + aInfoBox.Execute(); + delete pResMgr; + } + } + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return mbStatus; +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteProlog( const Graphic* pPreview ) +{ + ImplWriteLine( "%!PS-Adobe-3.0 EPSF-3.0 " ); + *mpPS << "%%BoundingBox: "; // BoundingBox + ImplWriteLong( 0 ); + ImplWriteLong( 0 ); + Size aSizePoint = Application::GetDefaultDevice()->LogicToLogic( pMTF->GetPrefSize(), + pMTF->GetPrefMapMode(), MAP_POINT ); + ImplWriteLong( aSizePoint.Width() ); + ImplWriteLong( aSizePoint.Height() ,PS_RET ); + ImplWriteLine( "%%Pages: 0" ); + ImplWriteLine( "%%Creator: Sun Microsystems, Inc." ); + ImplWriteLine( "%%Title: none" ); + ImplWriteLine( "%%CreationDate: none" ); + +// defaults + + *mpPS << "%%LanguageLevel: "; // Language level + ImplWriteLong( mnLevel, PS_RET ); + if ( !mbGrayScale && mnLevel == 1 ) + ImplWriteLine( "%%Extensions: CMYK" ); // CMYK extension is to set in color mode in level 1 + ImplWriteLine( "%%EndComments" ); + if ( pPreview && aSizePoint.Width() && aSizePoint.Height() ) + { + Size aSizeBitmap( ( aSizePoint.Width() + 7 ) & ~7, aSizePoint.Height() ); + Bitmap aTmpBitmap( pPreview->GetBitmap() ); + aTmpBitmap.Scale( aSizeBitmap, BMP_SCALE_INTERPOLATE ); + aTmpBitmap.Convert( BMP_CONVERSION_1BIT_THRESHOLD ); + BitmapReadAccess* pAcc = aTmpBitmap.AcquireReadAccess(); + if ( pAcc ) + { + *mpPS << "%%BeginPreview: "; // BoundingBox + ImplWriteLong( aSizeBitmap.Width() ); + ImplWriteLong( aSizeBitmap.Height() ); + *mpPS << "1 "; + INT32 nLines = aSizeBitmap.Width() / 312; + if ( ( nLines * 312 ) != aSizeBitmap.Width() ) + nLines++; + nLines *= aSizeBitmap.Height(); + ImplWriteLong( nLines ); + char nVal; + INT32 nX, nY, nCount2, nCount = 4; + const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) ); + for ( nY = 0; nY < aSizeBitmap.Height(); nY++ ) + { + nCount2 = 0; + nVal = 0; + for ( nX = 0; nX < aSizeBitmap.Width(); nX++ ) + { + if ( !nCount2 ) + { + ImplExecMode( PS_RET ); + *mpPS << "%"; + nCount2 = 312; + } + nVal <<= 1; + if ( pAcc->GetPixel( nY, nX ) == aBlack ) + nVal |= 1; + if ( ! ( --nCount ) ) + { + if ( nVal > 9 ) + nVal += 'A' - 10; + else + nVal += '0'; + *mpPS << nVal; + nVal = 0; + nCount += 4; + } + nCount2--; + } + } + aTmpBitmap.ReleaseAccess( pAcc ); + ImplExecMode( PS_RET ); + ImplWriteLine( "%%EndPreview" ); + } + } + ImplWriteLine( "%%BeginProlog" ); + ImplWriteLine( "%%BeginResource: procset SDRes-Prolog 1.0 0" ); + +// BEGIN EPSF + ImplWriteLine( "/b4_inc_state save def\n/dict_count countdictstack def\n/op_count count 1 sub def\nuserdict begin" ); + ImplWriteLine( "0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit[] 0 setdash newpath" ); + ImplWriteLine( "/languagelevel where {pop languagelevel 1 ne {false setstrokeadjust false setoverprint} if} if" ); + + ImplWriteLine( "/bdef {bind def} bind def" ); // der neue operator bdef wird erzeugt + if ( mbGrayScale ) + ImplWriteLine( "/c {setgray} bdef" ); + else + ImplWriteLine( "/c {setrgbcolor} bdef" ); + ImplWriteLine( "/l {neg lineto} bdef" ); + ImplWriteLine( "/rl {neg rlineto} bdef" ); + ImplWriteLine( "/lc {setlinecap} bdef" ); + ImplWriteLine( "/lj {setlinejoin} bdef" ); + ImplWriteLine( "/lw {setlinewidth} bdef" ); + ImplWriteLine( "/ml {setmiterlimit} bdef" ); + ImplWriteLine( "/ld {setdash} bdef" ); + ImplWriteLine( "/m {neg moveto} bdef" ); + ImplWriteLine( "/ct {6 2 roll neg 6 2 roll neg 6 2 roll neg curveto} bdef" ); + ImplWriteLine( "/r {rotate} bdef" ); + ImplWriteLine( "/t {neg translate} bdef" ); + ImplWriteLine( "/s {scale} bdef" ); + ImplWriteLine( "/sw {show} bdef" ); + ImplWriteLine( "/gs {gsave} bdef" ); + ImplWriteLine( "/gr {grestore} bdef" ); + + ImplWriteLine( "/f {findfont dup length dict begin" ); // Setfont + ImplWriteLine( "{1 index /FID ne {def} {pop pop} ifelse} forall /Encoding ISOLatin1Encoding def" ); + ImplWriteLine( "currentdict end /NFont exch definefont pop /NFont findfont} bdef" ); + + ImplWriteLine( "/p {closepath} bdef" ); + ImplWriteLine( "/sf {scalefont setfont} bdef" ); + + ImplWriteLine( "/ef {eofill}bdef" ); // close path and fill + ImplWriteLine( "/pc {closepath stroke}bdef" ); // close path and draw + ImplWriteLine( "/ps {stroke}bdef" ); // draw current path + ImplWriteLine( "/pum {matrix currentmatrix}bdef" ); // pushes the current matrix + ImplWriteLine( "/pom {setmatrix}bdef" ); // pops the matrix + ImplWriteLine( "/bs {/aString exch def /nXOfs exch def /nWidth exch def currentpoint nXOfs 0 rmoveto pum nWidth aString stringwidth pop div 1 scale aString show pom moveto} bdef" ); + ImplWriteLine( "%%EndResource" ); + ImplWriteLine( "%%EndProlog" ); + ImplWriteLine( "%%BeginSetup" ); + ImplWriteLine( "%%EndSetup" ); + ImplWriteLine( "%%Page: 1 1" ); + ImplWriteLine( "%%BeginPageSetup" ); + ImplWriteLine( "%%EndPageSetup" ); + ImplWriteLine( "pum" ); + ImplScale( (double)aSizePoint.Width() / (double)pMTF->GetPrefSize().Width(), (double)aSizePoint.Height() / (double)pMTF->GetPrefSize().Height() ); + ImplWriteDouble( 0 ); + ImplWriteDouble( -pMTF->GetPrefSize().Height() ); + ImplWriteLine( "t" ); + ImplWriteLine( "/tm matrix currentmatrix def" ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteEpilog() +{ + ImplTranslate( 0, nBoundingY2 ); + ImplWriteLine( "pom" ); + ImplWriteLine( "count op_count sub {pop} repeat countdictstack dict_count sub {end} repeat b4_inc_state restore" ); + + ImplWriteLine( "%%PageTrailer" ); + ImplWriteLine( "%%Trailer" ); + + ImplWriteLine( "%%EOF" ); +} + +//--------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) +{ + PolyPolygon aFillPath; + + for( ULONG nCurAction = 0, nCount = rMtf.GetActionCount(); nCurAction < nCount; nCurAction++ ) + { + MetaAction* pMA = rMtf.GetAction( nCurAction ); + + switch( pMA->GetType() ) + { + case META_NULL_ACTION : + break; + + case META_PIXEL_ACTION : + { + Color aOldLineColor( aLineColor ); + aLineColor = ( (const MetaPixelAction*) pMA )->GetColor(); + ImplWriteLineColor( PS_SPACE ); + ImplMoveTo( ( (const MetaPixelAction*)pMA )->GetPoint() ); + ImplLineTo( ( (const MetaPixelAction*)pMA )->GetPoint() ); + ImplPathDraw(); + aLineColor = aOldLineColor; + } + break; + + case META_POINT_ACTION : + { + ImplWriteLineColor( PS_SPACE ); + ImplMoveTo( ( (const MetaPointAction*)pMA )->GetPoint() ); + ImplLineTo( ( (const MetaPointAction*)pMA )->GetPoint() ); + ImplPathDraw(); + } + break; + + case META_LINE_ACTION : + { + const LineInfo& rLineInfo = ( ( const MetaLineAction*)pMA )->GetLineInfo(); + ImplWriteLineInfo( rLineInfo ); + if ( bLineColor ) + { + ImplWriteLineColor( PS_SPACE ); + ImplMoveTo( ( (const MetaLineAction*) pMA )->GetStartPoint() ); + ImplLineTo( ( (const MetaLineAction*) pMA )->GetEndPoint() ); + ImplPathDraw(); + } + } + break; + + case META_RECT_ACTION : + { + ImplRect( ( (const MetaRectAction*) pMA )->GetRect() ); + } + break; + + case META_ROUNDRECT_ACTION : + ImplRect( ( (const MetaRoundRectAction*) pMA )->GetRect() ); + break; + + case META_ELLIPSE_ACTION : + { + Rectangle aRect = ( ( (const MetaEllipseAction*) pMA )->GetRect() ); + Point aCenter = aRect.Center(); + Polygon aPoly( aCenter, aRect.GetWidth() / 2, aRect.GetHeight() / 2 ); + PolyPolygon aPolyPoly( aPoly ); + ImplPolyPoly( aPolyPoly ); + } + break; + + case META_ARC_ACTION : + { + Polygon aPoly( ( (const MetaArcAction*)pMA )->GetRect(), ( (const MetaArcAction*)pMA )->GetStartPoint(), + ( (const MetaArcAction*)pMA )->GetEndPoint(), POLY_ARC ); + PolyPolygon aPolyPoly( aPoly ); + ImplPolyPoly( aPolyPoly ); + } + break; + + case META_PIE_ACTION : + { + Polygon aPoly( ( (const MetaPieAction*)pMA )->GetRect(), ( (const MetaPieAction*)pMA )->GetStartPoint(), + ( (const MetaPieAction*)pMA )->GetEndPoint(), POLY_PIE ); + PolyPolygon aPolyPoly( aPoly ); + ImplPolyPoly( aPolyPoly ); + } + break; + + case META_CHORD_ACTION : + { + Polygon aPoly( ( (const MetaChordAction*)pMA )->GetRect(), ( (const MetaChordAction*)pMA )->GetStartPoint(), + ( (const MetaChordAction*)pMA )->GetEndPoint(), POLY_CHORD ); + PolyPolygon aPolyPoly( aPoly ); + ImplPolyPoly( aPolyPoly ); + } + break; + + case META_POLYLINE_ACTION : + { + Polygon aPoly( ( (const MetaPolyLineAction*) pMA )->GetPolygon() ); + const LineInfo& rLineInfo = ( ( const MetaPolyLineAction*)pMA )->GetLineInfo(); + ImplWriteLineInfo( rLineInfo ); + + if(basegfx::B2DLINEJOIN_NONE == rLineInfo.GetLineJoin() + && rLineInfo.GetWidth() > 1) + { + // emulate B2DLINEJOIN_NONE by creating single edges + const sal_uInt16 nPoints(aPoly.GetSize()); + const bool bCurve(aPoly.HasFlags()); + + for(sal_uInt16 a(0); a + 1 < nPoints; a++) + { + if(bCurve + && POLY_NORMAL != aPoly.GetFlags(a + 1) + && a + 2 < nPoints + && POLY_NORMAL != aPoly.GetFlags(a + 2) + && a + 3 < nPoints) + { + const Polygon aSnippet(4, + aPoly.GetConstPointAry() + a, + aPoly.GetConstFlagAry() + a); + ImplPolyLine(aSnippet); + a += 2; + } + else + { + const Polygon aSnippet(2, + aPoly.GetConstPointAry() + a); + ImplPolyLine(aSnippet); + } + } + } + else + { + ImplPolyLine( aPoly ); + } + } + break; + + case META_POLYGON_ACTION : + { + PolyPolygon aPolyPoly( ( (const MetaPolygonAction*) pMA )->GetPolygon() ); + ImplPolyPoly( aPolyPoly ); + } + break; + + case META_POLYPOLYGON_ACTION : + { + ImplPolyPoly( ( (const MetaPolyPolygonAction*) pMA )->GetPolyPolygon() ); + } + break; + + case META_TEXT_ACTION: + { + const MetaTextAction * pA = (const MetaTextAction*) pMA; + + String aUniStr( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + Point aPoint( pA->GetPoint() ); + + ImplText( aUniStr, aPoint, NULL, 0, rVDev ); + } + break; + + case META_TEXTRECT_ACTION: + { + DBG_ERROR( "Unsupported action: TextRect...Action!" ); + } + break; + + case META_STRETCHTEXT_ACTION : + { + const MetaStretchTextAction* pA = (const MetaStretchTextAction*)pMA; + String aUniStr( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + Point aPoint( pA->GetPoint() ); + + ImplText( aUniStr, aPoint, NULL, pA->GetWidth(), rVDev ); + } + break; + + case META_TEXTARRAY_ACTION: + { + const MetaTextArrayAction* pA = (const MetaTextArrayAction*)pMA; + String aUniStr( pA->GetText(), pA->GetIndex(), pA->GetLen() ); + Point aPoint( pA->GetPoint() ); + + ImplText( aUniStr, aPoint, pA->GetDXArray(), 0, rVDev ); + } + break; + + case META_BMP_ACTION : + { + Bitmap aBitmap = ( (const MetaBmpAction*)pMA )->GetBitmap(); + if ( mbGrayScale ) + aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); + Point aPoint = ( (const MetaBmpAction*) pMA )->GetPoint(); + Size aSize = aBitmap.GetSizePixel(); + ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() ); + } + break; + + case META_BMPSCALE_ACTION : + { + Bitmap aBitmap = ( (const MetaBmpScaleAction*)pMA )->GetBitmap(); + if ( mbGrayScale ) + aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); + Point aPoint = ( (const MetaBmpScaleAction*) pMA )->GetPoint(); + Size aSize = ( (const MetaBmpScaleAction*)pMA )->GetSize(); + ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() ); + } + break; + + case META_BMPSCALEPART_ACTION : + { + Bitmap aBitmap( ( (const MetaBmpScalePartAction*)pMA )->GetBitmap() ); + aBitmap.Crop( Rectangle( ( (const MetaBmpScalePartAction*)pMA )->GetSrcPoint(), + ( (const MetaBmpScalePartAction*)pMA )->GetSrcSize() ) ); + if ( mbGrayScale ) + aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); + Point aPoint = ( (const MetaBmpScalePartAction*) pMA)->GetDestPoint(); + Size aSize = ( (const MetaBmpScalePartAction*)pMA )->GetDestSize(); + ImplBmp( &aBitmap, NULL, aPoint, aSize.Width(), aSize.Height() ); + } + break; + + case META_BMPEX_ACTION : + { + BitmapEx aBitmapEx( ( (MetaBmpExAction*)pMA)->GetBitmapEx() ); + Bitmap aBitmap( aBitmapEx.GetBitmap() ); + if ( mbGrayScale ) + aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); + Bitmap aMask( aBitmapEx.GetMask() ); + Point aPoint = ( (const MetaBmpExAction*) pMA)->GetPoint(); + Size aSize = ( aBitmap.GetSizePixel() ); + ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); + } + break; + + case META_BMPEXSCALE_ACTION : + { + BitmapEx aBitmapEx( ( (MetaBmpExScaleAction*)pMA)->GetBitmapEx() ); + Bitmap aBitmap( aBitmapEx.GetBitmap() ); + if ( mbGrayScale ) + aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); + Bitmap aMask( aBitmapEx.GetMask() ); + Point aPoint = ( (const MetaBmpExScaleAction*) pMA)->GetPoint(); + Size aSize( ( (const MetaBmpExScaleAction*)pMA )->GetSize() ); + ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); + } + break; + + case META_BMPEXSCALEPART_ACTION : + { + BitmapEx aBitmapEx( ( (const MetaBmpExScalePartAction*)pMA )->GetBitmapEx() ); + aBitmapEx.Crop( Rectangle( ( (const MetaBmpExScalePartAction*)pMA )->GetSrcPoint(), + ( (const MetaBmpExScalePartAction*)pMA )->GetSrcSize() ) ); + Bitmap aBitmap( aBitmapEx.GetBitmap() ); + if ( mbGrayScale ) + aBitmap.Convert( BMP_CONVERSION_8BIT_GREYS ); + Bitmap aMask( aBitmapEx.GetMask() ); + Point aPoint = ( (const MetaBmpExScalePartAction*) pMA)->GetDestPoint(); + Size aSize = ( (const MetaBmpExScalePartAction*)pMA )->GetDestSize(); + ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); + } + break; + + // Unsupported Actions + case META_MASK_ACTION: + case META_MASKSCALE_ACTION: + case META_MASKSCALEPART_ACTION: + { + DBG_ERROR( "Unsupported action: MetaMask...Action!" ); + } + break; + + case META_GRADIENT_ACTION : + { + PolyPolygon aPolyPoly( ( (const MetaGradientAction*)pMA)->GetRect() ); + ImplWriteGradient( aPolyPoly, ( (const MetaGradientAction*) pMA )->GetGradient(), rVDev ); + } + break; + + case META_GRADIENTEX_ACTION : + { + PolyPolygon aPolyPoly( ( (const MetaGradientExAction*)pMA)->GetPolyPolygon() ); + ImplWriteGradient( aPolyPoly, ( (const MetaGradientExAction*) pMA )->GetGradient(), rVDev ); + } + break; + + case META_HATCH_ACTION : + { + VirtualDevice l_aVDev; + GDIMetaFile aTmpMtf; + + l_aVDev.SetMapMode( rVDev.GetMapMode() ); + l_aVDev.AddHatchActions( ( (const MetaHatchAction*)pMA)->GetPolyPolygon(), + ( (const MetaHatchAction*)pMA )->GetHatch(), aTmpMtf ); + ImplWriteActions( aTmpMtf, rVDev ); + } + break; + + case META_WALLPAPER_ACTION : + { + const MetaWallpaperAction* pA = (const MetaWallpaperAction*)pMA; + Rectangle aRect = pA->GetRect(); + Wallpaper aWallpaper = pA->GetWallpaper(); + + if ( aWallpaper.IsBitmap() ) + { + BitmapEx aBitmapEx = aWallpaper.GetBitmap(); + Bitmap aBitmap( aBitmapEx.GetBitmap() ); + if ( aBitmapEx.IsTransparent() ) + { + if ( aWallpaper.IsGradient() ) + { + + // gradient action + + } + Bitmap aMask( aBitmapEx.GetMask() ); + ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() ); + } + else + ImplBmp( &aBitmap, NULL, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() ); + + // wallpaper Style + + } + else if ( aWallpaper.IsGradient() ) + { + + // gradient action + + } + else + { + aColor = aWallpaper.GetColor(); + ImplRectFill( aRect ); + } + } + break; + + case META_ISECTRECTCLIPREGION_ACTION: + { + const MetaISectRectClipRegionAction* pA = (const MetaISectRectClipRegionAction*) pMA; + Region aRegion( pA->GetRect() ); + ImplSetClipRegion( aRegion ); + } + break; + + case META_CLIPREGION_ACTION: + { + const MetaClipRegionAction* pA = (const MetaClipRegionAction*) pMA; + Region aRegion( pA->GetRegion() ); + ImplSetClipRegion( aRegion ); + } + break; + + case META_ISECTREGIONCLIPREGION_ACTION: + { + const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pMA; + Region aRegion( pA->GetRegion() ); + ImplSetClipRegion( aRegion ); + } + break; + + case META_MOVECLIPREGION_ACTION: + { +/* + if ( !aClipRegion.IsEmpty() ) + { + const MetaMoveClipRegionAction* pA = (const MetaMoveClipRegionAction*) pMA; + aClipRegion.Move( pA->GetHorzMove(), pA->GetVertMove() ); + ImplSetClipRegion(); + } +*/ + } + break; + + case META_LINECOLOR_ACTION : + { + if ( ( (const MetaLineColorAction*) pMA)->IsSetting() ) + { + bLineColor = TRUE; + aLineColor = ( (const MetaLineColorAction*) pMA )->GetColor(); + } + else + bLineColor = FALSE; + } + break; + + case META_FILLCOLOR_ACTION : + { + if ( ( (const MetaFillColorAction*) pMA )->IsSetting() ) + { + bFillColor = TRUE; + aFillColor = ( (const MetaFillColorAction*) pMA )->GetColor(); + } + else + bFillColor = FALSE; + } + break; + + case META_TEXTCOLOR_ACTION : + { + aTextColor = ( (const MetaTextColorAction*) pMA )->GetColor(); + } + break; + + case META_TEXTFILLCOLOR_ACTION : + { + if ( ( (const MetaTextFillColorAction*) pMA )->IsSetting() ) + { + bTextFillColor = TRUE; + aTextFillColor = ( (const MetaTextFillColorAction*) pMA )->GetColor(); + } + else + bTextFillColor = FALSE; + } + break; + + case META_TEXTALIGN_ACTION : + { + eTextAlign = ( (const MetaTextAlignAction*) pMA )->GetTextAlign(); + } + break; + + case META_MAPMODE_ACTION : + { + pMA->Execute( &rVDev ); + ImplGetMapMode( rVDev.GetMapMode() ); + } + break; + + case META_FONT_ACTION : + { + maFont = ((const MetaFontAction*)pMA)->GetFont(); + rVDev.SetFont( maFont ); + } + break; + + case META_PUSH_ACTION : + { + rVDev.Push(((const MetaPushAction*)pMA)->GetFlags() ); + StackMember* pGS = new StackMember; + pGS->pSucc = pGDIStack; + pGDIStack = pGS; + pGS->aDashArray = aDashArray; + pGS->eJoinType = eJoinType; + pGS->eLineCap = eLineCap; + pGS->fLineWidth = fLineWidth; + pGS->fMiterLimit = fMiterLimit; + pGS->eTextAlign = eTextAlign; + pGS->aGlobalCol = aColor; + pGS->bLineCol = bLineColor; + pGS->aLineCol = aLineColor; + pGS->bFillCol = bFillColor; + pGS->aFillCol = aFillColor; + pGS->aTextCol = aTextColor; + pGS->bTextFillCol = bTextFillColor; + pGS->aTextFillCol = aTextFillColor; + pGS->aBackgroundCol = aBackgroundColor; + bRegionChanged = FALSE; + pGS->aFont = maFont; + mnLatestPush = mpPS->Tell(); + ImplWriteLine( "gs" ); + } + break; + + case META_POP_ACTION : + { + rVDev.Pop(); + StackMember* pGS; + if( pGDIStack ) + { + pGS = pGDIStack; + pGDIStack = pGS->pSucc; + aDashArray = pGS->aDashArray; + eJoinType = pGS->eJoinType; + eLineCap = pGS->eLineCap; + fLineWidth = pGS->fLineWidth; + fMiterLimit = pGS->fMiterLimit; + eTextAlign = pGS->eTextAlign; + aColor = pGS->aGlobalCol; + bLineColor = pGS->bLineCol; + aLineColor = pGS->aLineCol; + bFillColor = pGS->bFillCol; + aFillColor = pGS->aFillCol; + aTextColor = pGS->aTextCol; + bTextFillColor = pGS->bTextFillCol; + aTextFillColor = pGS->aTextFillCol; + aBackgroundColor = pGS->aBackgroundCol; + maFont = pGS->aFont; + maLastFont = Font(); // set maLastFont != maFont -> so that + delete pGS; + sal_uInt32 nCurrentPos = mpPS->Tell(); + if ( nCurrentPos - 3 == mnLatestPush ) + { + mpPS->Seek( mnLatestPush ); + ImplWriteLine( " " ); + mpPS->Seek( mnLatestPush ); + } + else + ImplWriteLine( "gr" ); + } + } + break; + + case META_EPS_ACTION : + { + GfxLink aGfxLink = ( (const MetaEPSAction*) pMA )->GetLink(); + const GDIMetaFile aSubstitute( ( ( const MetaEPSAction*) pMA )->GetSubstitute() ); + + BOOL bLevelConflict = FALSE; + BYTE* pSource = (BYTE*) aGfxLink.GetData(); + ULONG nSize = aGfxLink.GetDataSize(); + ULONG nParseThis = POSTSCRIPT_BOUNDINGSEARCH; + if ( nSize < 64 ) // assuming eps is larger than 64 bytes + pSource = NULL; + if ( nParseThis > nSize ) + nParseThis = nSize; + + if ( pSource && ( mnLevel == 1 ) ) + { + BYTE* pFound = ImplSearchEntry( pSource, (BYTE*)"%%LanguageLevel:", nParseThis - 10, 16 ); + if ( pFound ) + { + BYTE k, i = 10; + pFound += 16; + while ( --i ) + { + k = *pFound++; + if ( ( k > '0' ) && ( k <= '9' ) ) + { + if ( k != '1' ) + { + bLevelConflict = TRUE; + mnLevelWarning++; + } + break; + } + } + } + } + if ( !bLevelConflict ) + { + double nBoundingBox[4]; + if ( pSource && ImplGetBoundingBox( nBoundingBox, pSource, nParseThis ) ) + { + Point aPoint = ( (const MetaEPSAction*) pMA )->GetPoint(); + Size aSize = ( (const MetaEPSAction*) pMA )->GetSize(); + + MapMode aMapMode( aSubstitute.GetPrefMapMode() ); + Size aOutSize( rVDev.LogicToLogic( aSize, rVDev.GetMapMode(), aMapMode ) ); + Point aOrigin( rVDev.LogicToLogic( aPoint, rVDev.GetMapMode(), aMapMode ) ); + aOrigin.Y() += aOutSize.Height(); + aMapMode.SetOrigin( aOrigin ); + aMapMode.SetScaleX( aOutSize.Width() / ( nBoundingBox[ 2 ] - nBoundingBox[ 0 ] ) ); + aMapMode.SetScaleY( aOutSize.Height() / ( nBoundingBox[ 3 ] - nBoundingBox[ 1 ] ) ); + ImplWriteLine( "gs" ); + ImplGetMapMode( aMapMode ); + ImplWriteLine( "%%BeginDocument:" ); + mpPS->Write( pSource, aGfxLink.GetDataSize() ); + ImplWriteLine( "%%EndDocument\ngr" ); + } + } + } + break; + + case META_TRANSPARENT_ACTION: + { +// ImplLine( ( (const MetaTransparentAction*) pMA )->GetPolyPolygon() ); + } + break; + + case META_RASTEROP_ACTION: + { + pMA->Execute( &rVDev ); + } + break; + + case META_FLOATTRANSPARENT_ACTION: + { + const MetaFloatTransparentAction* pA = (const MetaFloatTransparentAction*) pMA; + + GDIMetaFile aTmpMtf( pA->GetGDIMetaFile() ); + Point aSrcPt( aTmpMtf.GetPrefMapMode().GetOrigin() ); + const Size aSrcSize( aTmpMtf.GetPrefSize() ); + const Point aDestPt( pA->GetPoint() ); + const Size aDestSize( pA->GetSize() ); + const double fScaleX = aSrcSize.Width() ? (double) aDestSize.Width() / aSrcSize.Width() : 1.0; + const double fScaleY = aSrcSize.Height() ? (double) aDestSize.Height() / aSrcSize.Height() : 1.0; + long nMoveX, nMoveY; + + if( fScaleX != 1.0 || fScaleY != 1.0 ) + { + aTmpMtf.Scale( fScaleX, fScaleY ); + aSrcPt.X() = FRound( aSrcPt.X() * fScaleX ), aSrcPt.Y() = FRound( aSrcPt.Y() * fScaleY ); + } + + nMoveX = aDestPt.X() - aSrcPt.X(), nMoveY = aDestPt.Y() - aSrcPt.Y(); + + if( nMoveX || nMoveY ) + aTmpMtf.Move( nMoveX, nMoveY ); + + ImplWriteActions( aTmpMtf, rVDev ); + } + break; + + case META_COMMENT_ACTION: + { + const MetaCommentAction* pA = (const MetaCommentAction*) pMA; + if ( pA->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_BEGIN" ) == COMPARE_EQUAL ) + { + const MetaGradientExAction* pGradAction = NULL; + while( ++nCurAction < nCount ) + { + MetaAction* pAction = rMtf.GetAction( nCurAction ); + if( pAction->GetType() == META_GRADIENTEX_ACTION ) + pGradAction = (const MetaGradientExAction*) pAction; + else if( ( pAction->GetType() == META_COMMENT_ACTION ) && + ( ( (const MetaCommentAction*) pAction )->GetComment().CompareIgnoreCaseToAscii( "XGRAD_SEQ_END" ) == COMPARE_EQUAL ) ) + { + break; + } + } + if( pGradAction ) + ImplWriteGradient( pGradAction->GetPolyPolygon(), pGradAction->GetGradient(), rVDev ); + } + else if ( pA->GetComment().Equals( "XPATHFILL_SEQ_END" ) ) + { + if ( aFillPath.Count() ) + { + aFillPath = PolyPolygon(); + ImplWriteLine( "gr" ); + } + } + else + { + const BYTE* pData = pA->GetData(); + if ( pData ) + { + SvMemoryStream aMemStm( (void*)pData, pA->GetDataSize(), STREAM_READ ); + sal_Bool bSkipSequence = sal_False; + ByteString sSeqEnd; + + if( pA->GetComment().Equals( "XPATHSTROKE_SEQ_BEGIN" ) ) + { + sSeqEnd = ByteString( "XPATHSTROKE_SEQ_END" ); + SvtGraphicStroke aStroke; + aMemStm >> aStroke; + + Polygon aPath; + aStroke.getPath( aPath ); + + PolyPolygon aStartArrow; + PolyPolygon aEndArrow; +// double fTransparency( aStroke.getTransparency() ); + double fStrokeWidth( aStroke.getStrokeWidth() ); + SvtGraphicStroke::JoinType eJT( aStroke.getJoinType() ); + SvtGraphicStroke::DashArray l_aDashArray; + + aStroke.getStartArrow( aStartArrow ); + aStroke.getEndArrow( aEndArrow ); + aStroke.getDashArray( l_aDashArray ); + + bSkipSequence = sal_True; + if ( l_aDashArray.size() > 11 ) // ps dasharray limit is 11 + bSkipSequence = sal_False; + if ( aStartArrow.Count() || aEndArrow.Count() ) + bSkipSequence = sal_False; + if ( (sal_uInt32)eJT > 2 ) + bSkipSequence = sal_False; + if ( l_aDashArray.size() && ( fStrokeWidth != 0.0 ) ) + bSkipSequence = sal_False; + if ( bSkipSequence ) + { + ImplWriteLineInfo( fStrokeWidth, aStroke.getMiterLimit(), + aStroke.getCapType(), eJT, l_aDashArray ); + ImplPolyLine( aPath ); + } + } + else if( pA->GetComment().Equals( "XPATHFILL_SEQ_BEGIN" ) ) + { + sSeqEnd = ByteString( "XPATHFILL_SEQ_END" ); + SvtGraphicFill aFill; + aMemStm >> aFill; + switch( aFill.getFillType() ) + { + case SvtGraphicFill::fillSolid : + { + bSkipSequence = sal_True; + PolyPolygon aPolyPoly; + aFill.getPath( aPolyPoly ); + sal_uInt16 i, nPolyCount = aPolyPoly.Count(); + if ( nPolyCount ) + { + aFillColor = aFill.getFillColor(); + ImplWriteFillColor( PS_SPACE ); + for ( i = 0; i < nPolyCount; ) + { + ImplAddPath( aPolyPoly.GetObject( i ) ); + if ( ++i < nPolyCount ) + { + *mpPS << "p"; + mnCursorPos += 2; + ImplExecMode( PS_RET ); + } + } + *mpPS << "p ef"; + mnCursorPos += 4; + ImplExecMode( PS_RET ); + } + } + break; + + case SvtGraphicFill::fillTexture : + { + aFill.getPath( aFillPath ); + + /* normally an object filling is consisting of three MetaActions: + MetaBitmapAction using RasterOp xor, + MetaPolyPolygonAction using RasterOp rop_0 + MetaBitmapAction using RasterOp xor + + Because RasterOps cannot been used in Postscript, we have to + replace these actions. The MetaComment "XPATHFILL_SEQ_BEGIN" is + providing the clippath of the object. The following loop is + trying to find the bitmap that is matching the clippath, so that + only one bitmap is exported, otherwise if the bitmap is not + locatable, all metaactions are played normally. + */ + sal_uInt32 nCommentStartAction = nCurAction; + sal_uInt32 nBitmapCount = 0; + sal_uInt32 nBitmapAction = 0; + + sal_Bool bOk = sal_True; + while( bOk && ( ++nCurAction < nCount ) ) + { + MetaAction* pAction = rMtf.GetAction( nCurAction ); + switch( pAction->GetType() ) + { + case META_BMPSCALE_ACTION : + case META_BMPSCALEPART_ACTION : + case META_BMPEXSCALE_ACTION : + case META_BMPEXSCALEPART_ACTION : + { + nBitmapCount++; + nBitmapAction = nCurAction; + } + break; + case META_COMMENT_ACTION : + { + if (((const MetaCommentAction*)pAction)->GetComment().Equals( "XPATHFILL_SEQ_END" )) + bOk = sal_False; + } + break; + } + } + if( nBitmapCount == 2 ) + { + ImplWriteLine( "gs" ); + ImplIntersect( aFillPath ); + GDIMetaFile aTempMtf; + aTempMtf.AddAction( rMtf.GetAction( nBitmapAction )->Clone() ); + ImplWriteActions( aTempMtf, rVDev ); + ImplWriteLine( "gr" ); + aFillPath = PolyPolygon(); + } + else + nCurAction = nCommentStartAction + 1; + } + break; + + case SvtGraphicFill::fillGradient : + aFill.getPath( aFillPath ); + break; + + case SvtGraphicFill::fillHatch : + break; + } + if ( aFillPath.Count() ) + { + ImplWriteLine( "gs" ); + ImplIntersect( aFillPath ); + } + } + if ( bSkipSequence ) + { + while( ++nCurAction < nCount ) + { + pMA = rMtf.GetAction( nCurAction ); + if ( pMA->GetType() == META_COMMENT_ACTION ) + { + ByteString sComment( ((MetaCommentAction*)pMA)->GetComment() ); + if ( sComment.Equals( sSeqEnd ) ) + break; + } + } + } + } + } + } + break; + } + } +} + + + +//--------------------------------------------------------------------------------- + +inline void PSWriter::ImplWritePoint( const Point& rPoint, sal_uInt32 nMode ) +{ + ImplWriteDouble( rPoint.X() ); + ImplWriteDouble( rPoint.Y(), nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplMoveTo( const Point& rPoint, sal_uInt32 nMode ) +{ + ImplWritePoint( rPoint ); + ImplWriteByte( 'm' ); + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplLineTo( const Point& rPoint, sal_uInt32 nMode ) +{ + ImplWritePoint( rPoint ); + ImplWriteByte( 'l' ); + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplCurveTo( const Point& rP1, const Point& rP2, const Point& rP3, sal_uInt32 nMode ) +{ + ImplWritePoint( rP1 ); + ImplWritePoint( rP2 ); + ImplWritePoint( rP3 ); + *mpPS << "ct "; + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode ) +{ + ImplWriteDouble( fX ); + ImplWriteDouble( fY ); + ImplWriteByte( 't' ); + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplScale( const double& fX, const double& fY, sal_uInt32 nMode ) +{ + ImplWriteDouble( fX ); + ImplWriteDouble( fY ); + ImplWriteByte( 's' ); + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplRect( const Rectangle & rRect ) +{ + if ( bFillColor ) + ImplRectFill( rRect ); + if ( bLineColor ) + { + double nWidth = rRect.GetWidth(); + double nHeight = rRect.GetHeight(); + + ImplWriteLineColor( PS_SPACE ); + ImplMoveTo( rRect.TopLeft() ); + ImplWriteDouble( nWidth ); + *mpPS << "0 rl 0 "; + ImplWriteDouble( nHeight ); + *mpPS << "rl "; + ImplWriteDouble( nWidth ); + *mpPS << "neg 0 rl "; + ImplClosePathDraw(); + } + *mpPS << (BYTE)10; + mnCursorPos = 0; +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplRectFill( const Rectangle & rRect ) +{ + double nWidth = rRect.GetWidth(); + double nHeight = rRect.GetHeight(); + + ImplWriteFillColor( PS_SPACE ); + ImplMoveTo( rRect.TopLeft() ); + ImplWriteDouble( nWidth ); + *mpPS << "0 rl 0 "; + ImplWriteDouble( nHeight ); + *mpPS << "rl "; + ImplWriteDouble( nWidth ); + *mpPS << "neg 0 rl ef "; + *mpPS << "p ef"; + mnCursorPos += 2; + ImplExecMode( PS_RET ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplAddPath( const Polygon & rPolygon ) +{ + USHORT i = 1; + USHORT nPointCount = rPolygon.GetSize(); + if ( nPointCount > 1 ) + { + ImplMoveTo( rPolygon.GetPoint( 0 ) ); + while ( i < nPointCount ) + { + if ( ( rPolygon.GetFlags( i ) == POLY_CONTROL ) + && ( ( i + 2 ) < nPointCount ) + && ( rPolygon.GetFlags( i + 1 ) == POLY_CONTROL ) + && ( rPolygon.GetFlags( i + 2 ) != POLY_CONTROL ) ) + { + ImplCurveTo( rPolygon[ i ], rPolygon[ i + 1 ], rPolygon[ i + 2 ], PS_WRAP ); + i += 3; + } + else + ImplLineTo( rPolygon.GetPoint( i++ ), PS_SPACE | PS_WRAP ); + } + } +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplIntersect( const PolyPolygon& rPolyPoly ) +{ + sal_uInt16 i, nPolyCount = rPolyPoly.Count(); + for ( i = 0; i < nPolyCount; ) + { + ImplAddPath( rPolyPoly.GetObject( i ) ); + if ( ++i < nPolyCount ) + { + *mpPS << "p"; + mnCursorPos += 2; + ImplExecMode( PS_RET ); + } + } + ImplWriteLine( "eoclip newpath" ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev ) +{ + VirtualDevice l_aVDev; + GDIMetaFile aTmpMtf; + l_aVDev.SetMapMode( rVDev.GetMapMode() ); + l_aVDev.AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf ); + ImplWriteActions( aTmpMtf, rVDev ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplPolyPoly( const PolyPolygon & rPolyPoly, sal_Bool bTextOutline ) +{ + sal_uInt16 i, nPolyCount = rPolyPoly.Count(); + if ( nPolyCount ) + { + if ( bFillColor || bTextOutline ) + { + if ( bTextOutline ) + ImplWriteTextColor( PS_SPACE ); + else + ImplWriteFillColor( PS_SPACE ); + for ( i = 0; i < nPolyCount; ) + { + ImplAddPath( rPolyPoly.GetObject( i ) ); + if ( ++i < nPolyCount ) + { + *mpPS << "p"; + mnCursorPos += 2; + ImplExecMode( PS_RET ); + } + } + *mpPS << "p ef"; + mnCursorPos += 4; + ImplExecMode( PS_RET ); + } + if ( bLineColor ) + { + ImplWriteLineColor( PS_SPACE ); + for ( i = 0; i < nPolyCount; i++ ) + ImplAddPath( rPolyPoly.GetObject( i ) ); + ImplClosePathDraw( PS_RET ); + } + } +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplPolyLine( const Polygon & rPoly ) +{ + if ( bLineColor ) + { + ImplWriteLineColor( PS_SPACE ); + sal_uInt16 i, nPointCount = rPoly.GetSize(); + if ( nPointCount ) + { + if ( nPointCount > 1 ) + { + ImplMoveTo( rPoly.GetPoint( 0 ) ); + i = 1; + while ( i < nPointCount ) + { + if ( ( rPoly.GetFlags( i ) == POLY_CONTROL ) + && ( ( i + 2 ) < nPointCount ) + && ( rPoly.GetFlags( i + 1 ) == POLY_CONTROL ) + && ( rPoly.GetFlags( i + 2 ) != POLY_CONTROL ) ) + { + ImplCurveTo( rPoly[ i ], rPoly[ i + 1 ], rPoly[ i + 2 ], PS_WRAP ); + i += 3; + } + else + ImplLineTo( rPoly.GetPoint( i++ ), PS_SPACE | PS_WRAP ); + } + } + + // #104645# explicitely close path if polygon is closed + if( rPoly[ 0 ] == rPoly[ nPointCount-1 ] ) + ImplClosePathDraw( PS_RET ); + else + ImplPathDraw(); + } + } +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplSetClipRegion( Region& rClipRegion ) +{ + if ( !rClipRegion.IsEmpty() ) + { + Rectangle aRect; + RegionHandle hRegionHandle = rClipRegion.BeginEnumRects(); + + while ( rClipRegion.GetNextEnumRect( hRegionHandle, aRect ) ) + { + double nX1 = aRect.Left(); + double nY1 = aRect.Top(); + double nX2 = aRect.Right(); + double nY2 = aRect.Bottom(); + ImplWriteDouble( nX1 ); + ImplWriteDouble( nY1 ); + ImplWriteByte( 'm' ); + ImplWriteDouble( nX2 ); + ImplWriteDouble( nY1 ); + ImplWriteByte( 'l' ); + ImplWriteDouble( nX2 ); + ImplWriteDouble( nY2 ); + ImplWriteByte( 'l' ); + ImplWriteDouble( nX1 ); + ImplWriteDouble( nY2 ); + ImplWriteByte( 'l' ); + ImplWriteDouble( nX1 ); + ImplWriteDouble( nY1 ); + ImplWriteByte( 'l', PS_SPACE | PS_WRAP ); + }; + rClipRegion.EndEnumRects( hRegionHandle ); + ImplWriteLine( "eoclip newpath" ); + } +} + +//--------------------------------------------------------------------------------- +// possible gfx formats: +// +// level 1: grayscale 8 bit +// color 24 bit +// +// level 2: grayscale 8 bit +// color 1(pal), 4(pal), 8(pal), 24 Bit +// + +void PSWriter::ImplBmp( Bitmap* pBitmap, Bitmap* pMaskBitmap, const Point & rPoint, double nXWidth, double nYHeightOrg ) +{ + if ( !pBitmap ) + return; + + INT32 nHeightOrg = pBitmap->GetSizePixel().Height(); + INT32 nHeightLeft = nHeightOrg; + long nWidth = pBitmap->GetSizePixel().Width(); + Point aSourcePos( rPoint ); + + while ( nHeightLeft ) + { + Bitmap aTileBitmap( *pBitmap ); + long nHeight = nHeightLeft; + double nYHeight = nYHeightOrg; + + BOOL bDoTrans = FALSE; + + Rectangle aRect; + Region aRegion; + + if ( pMaskBitmap ) + { + bDoTrans = TRUE; + while (TRUE) + { + if ( mnLevel == 1 ) + { + if ( nHeight > 10 ) + nHeight = 8; + } + aRect = Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( (long)nWidth, (long)nHeight ) ); + aRegion = Region( pMaskBitmap->CreateRegion( COL_BLACK, aRect ) ); + + if ( ( mnLevel == 1 ) && ( aRegion.GetRectCount() * 5 > 1000 ) ) + { + nHeight >>= 1; + if ( nHeight < 2 ) + return; + continue; + } + break; + } + } + if ( nHeight != nHeightOrg ) + { + nYHeight = nYHeightOrg * nHeight / nHeightOrg; + aTileBitmap.Crop( Rectangle( Point( 0, nHeightOrg - nHeightLeft ), Size( nWidth, nHeight ) ) ); + } + if ( bDoTrans ) + { + ImplWriteLine( "gs\npum" ); + ImplTranslate( aSourcePos.X(), aSourcePos.Y() ); + ImplScale( nXWidth / nWidth, nYHeight / nHeight ); + RegionHandle hRegionHandle = aRegion.BeginEnumRects(); + + while ( aRegion.GetNextEnumRect( hRegionHandle, aRect ) ) + { + aRect.Move( 0, - ( nHeightOrg - nHeightLeft ) ); + ImplWriteLong( aRect.Left() ); + ImplWriteLong( aRect.Top() ); + ImplWriteByte( 'm' ); + ImplWriteLong( aRect.Right() + 1 ); + ImplWriteLong( aRect.Top() ); + ImplWriteByte( 'l' ); + ImplWriteLong( aRect.Right() + 1 ); + ImplWriteLong( aRect.Bottom() + 1 ); + ImplWriteByte( 'l' ); + ImplWriteLong( aRect.Left() ); + ImplWriteLong( aRect.Bottom() + 1 ); + ImplWriteByte( 'l' ); + ImplWriteByte( 'p', PS_SPACE | PS_WRAP ); + }; + aRegion.EndEnumRects( hRegionHandle ); + ImplWriteLine( "eoclip newpath" ); + ImplWriteLine( "pom" ); + } + BitmapReadAccess* pAcc = aTileBitmap.AcquireReadAccess(); + + if (!bDoTrans ) + ImplWriteLine( "pum" ); + + ImplTranslate( aSourcePos.X(), aSourcePos.Y() + nYHeight ); + ImplScale( nXWidth, nYHeight ); + if ( mnLevel == 1 ) // level 1 is always grayscale !!! + { + ImplWriteLong( nWidth ); + ImplWriteLong( nHeight ); + *mpPS << "8 ["; + ImplWriteLong( nWidth ); + *mpPS << "0 0 "; + ImplWriteLong( -nHeight ); + ImplWriteLong( 0 ); + ImplWriteLong( nHeight ); + ImplWriteLine( "]" ); + *mpPS << "{currentfile "; + ImplWriteLong( nWidth ); + ImplWriteLine( "string readhexstring pop}" ); + ImplWriteLine( "image" ); + for ( long y = 0; y < nHeight; y++ ) + { + for ( long x = 0; x < nWidth; x++ ) + { + ImplWriteHexByte( (BYTE)pAcc->GetPixel( y, x ) ); + } + } + *mpPS << (BYTE)10; + } + else // Level 2 + { + if ( mbGrayScale ) + { + ImplWriteLine( "/DeviceGray setcolorspace" ); + ImplWriteLine( "<<" ); + ImplWriteLine( "/ImageType 1" ); + *mpPS << "/Width "; + ImplWriteLong( nWidth, PS_RET ); + *mpPS << "/Height "; + ImplWriteLong( nHeight, PS_RET ); + ImplWriteLine( "/BitsPerComponent 8" ); + ImplWriteLine( "/Decode[0 1]" ); + *mpPS << "/ImageMatrix["; + ImplWriteLong( nWidth ); + *mpPS << "0 0 "; + ImplWriteLong( -nHeight ); + ImplWriteLong( 0 ); + ImplWriteLong( nHeight, PS_NONE ); + ImplWriteByte( ']', PS_RET ); + ImplWriteLine( "/DataSource currentfile" ); + ImplWriteLine( "/ASCIIHexDecode filter" ); + if ( mbCompression ) + ImplWriteLine( "/LZWDecode filter" ); + ImplWriteLine( ">>" ); + ImplWriteLine( "image" ); + if ( mbCompression ) + { + StartCompression(); + for ( long y = 0; y < nHeight; y++ ) + { + for ( long x = 0; x < nWidth; x++ ) + { + Compress( (BYTE)pAcc->GetPixel( y, x ) ); + } + } + EndCompression(); + } + else + { + for ( long y = 0; y < nHeight; y++ ) + { + for ( long x = 0; x < nWidth; x++ ) + { + ImplWriteHexByte( (BYTE)pAcc->GetPixel( y, x ) ); + } + } + } + } + else + { + // have we to write a palette ? + + if ( pAcc->HasPalette() ) + { + ImplWriteLine( "[/Indexed /DeviceRGB " ); + ImplWriteLong( pAcc->GetPaletteEntryCount() - 1, PS_RET ); + ImplWriteByte( '<', PS_NONE ); + for ( USHORT i = 0; i < pAcc->GetPaletteEntryCount(); i++ ) + { + BitmapColor aBitmapColor = pAcc->GetPaletteColor( i ); + ImplWriteHexByte( aBitmapColor.GetRed(), PS_NONE ); + ImplWriteHexByte( aBitmapColor.GetGreen(), PS_NONE ); + ImplWriteHexByte( aBitmapColor.GetBlue(), PS_SPACE | PS_WRAP ); + } + ImplWriteByte( '>', PS_RET ); + + ImplWriteLine( "] setcolorspace" ); + ImplWriteLine( "<<" ); + ImplWriteLine( "/ImageType 1" ); + *mpPS << "/Width "; + ImplWriteLong( nWidth, PS_RET ); + *mpPS << "/Height "; + ImplWriteLong( nHeight, PS_RET ); + ImplWriteLine( "/BitsPerComponent 8" ); + ImplWriteLine( "/Decode[0 255]" ); + *mpPS << "/ImageMatrix["; + ImplWriteLong( nWidth ); + *mpPS << "0 0 "; + ImplWriteLong( -nHeight ); + ImplWriteLong( 0); + ImplWriteLong( nHeight, PS_NONE ); + ImplWriteByte( ']', PS_RET ); + ImplWriteLine( "/DataSource currentfile" ); + ImplWriteLine( "/ASCIIHexDecode filter" ); + if ( mbCompression ) + ImplWriteLine( "/LZWDecode filter" ); + ImplWriteLine( ">>" ); + ImplWriteLine( "image" ); + if ( mbCompression ) + { + StartCompression(); + for ( long y = 0; y < nHeight; y++ ) + { + for ( long x = 0; x < nWidth; x++ ) + { + Compress( (BYTE)pAcc->GetPixel( y, x ) ); + } + } + EndCompression(); + } + else + { + for ( long y = 0; y < nHeight; y++ ) + { + for ( long x = 0; x < nWidth; x++ ) + { + ImplWriteHexByte( (BYTE)pAcc->GetPixel( y, x ) ); + } + } + } + } + else // 24 bit color + { + ImplWriteLine( "/DeviceRGB setcolorspace" ); + ImplWriteLine( "<<" ); + ImplWriteLine( "/ImageType 1" ); + *mpPS << "/Width "; + ImplWriteLong( nWidth, PS_RET ); + *mpPS << "/Height "; + ImplWriteLong( nHeight, PS_RET ); + ImplWriteLine( "/BitsPerComponent 8" ); + ImplWriteLine( "/Decode[0 1 0 1 0 1]" ); + *mpPS << "/ImageMatrix["; + ImplWriteLong( nWidth ); + *mpPS << "0 0 "; + ImplWriteLong( -nHeight ); + ImplWriteLong( 0 ); + ImplWriteLong( nHeight, PS_NONE ); + ImplWriteByte( ']', PS_RET ); + ImplWriteLine( "/DataSource currentfile" ); + ImplWriteLine( "/ASCIIHexDecode filter" ); + if ( mbCompression ) + ImplWriteLine( "/LZWDecode filter" ); + ImplWriteLine( ">>" ); + ImplWriteLine( "image" ); + if ( mbCompression ) + { + StartCompression(); + for ( long y = 0; y < nHeight; y++ ) + { + for ( long x = 0; x < nWidth; x++ ) + { + const BitmapColor aBitmapColor( pAcc->GetPixel( y, x ) ); + Compress( aBitmapColor.GetRed() ); + Compress( aBitmapColor.GetGreen() ); + Compress( aBitmapColor.GetBlue() ); + } + } + EndCompression(); + } + else + { + for ( long y = 0; y < nHeight; y++ ) + { + for ( long x = 0; x < nWidth; x++ ) + { + const BitmapColor aBitmapColor( pAcc->GetPixel( y, x ) ); + ImplWriteHexByte( aBitmapColor.GetRed() ); + ImplWriteHexByte( aBitmapColor.GetGreen() ); + ImplWriteHexByte( aBitmapColor.GetBlue() ); + } + } + } + } + } + ImplWriteLine( ">" ); // in Level 2 the dictionary needs to be closed (eod) + } + if ( bDoTrans ) + ImplWriteLine( "gr" ); + else + ImplWriteLine( "pom" ); + + aTileBitmap.ReleaseAccess( pAcc ); + nHeightLeft -= nHeight; + if ( nHeightLeft ) + { + nHeightLeft++; + aSourcePos.Y() = (long) ( rPoint.Y() + ( nYHeightOrg * ( nHeightOrg - nHeightLeft ) ) / nHeightOrg ); + } + } +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteCharacter( sal_Char nChar ) +{ + switch( nChar ) + { + case '(' : + case ')' : + case '\\' : + ImplWriteByte( (BYTE)'\\', PS_NONE ); + } + ImplWriteByte( (BYTE)nChar, PS_NONE ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteString( const ByteString& rString, VirtualDevice& rVDev, const INT32* pDXArry, BOOL bStretch ) +{ + USHORT nLen = rString.Len(); + if ( nLen ) + { + USHORT i; + if ( pDXArry ) + { + double nx = 0; + + for( i = 0; i < nLen; i++ ) + { + if ( i > 0 ) + nx = pDXArry[ i - 1 ]; + ImplWriteDouble( ( bStretch ) ? nx : rVDev.GetTextWidth( rString.GetChar( i ) ) ); + ImplWriteDouble( nx ); + ImplWriteLine( "(", PS_NONE ); + ImplWriteCharacter( rString.GetChar( i ) ); + ImplWriteLine( ") bs" ); + } + } + else + { + ImplWriteByte( '(', PS_NONE ); + for ( i = 0; i < nLen; i++ ) + ImplWriteCharacter( rString.GetChar( i ) ); + ImplWriteLine( ") sw" ); + } + } +} + +// ------------------------------------------------------------------------ + +void PSWriter::ImplText( const String& rUniString, const Point& rPos, const INT32* pDXArry, sal_Int32 nWidth, VirtualDevice& rVDev ) +{ + sal_uInt16 nLen = rUniString.Len(); + if ( !nLen ) + return; + if ( mnTextMode == 0 ) // using glpyh outlines + { + Font aNotRotatedFont( maFont ); + aNotRotatedFont.SetOrientation( 0 ); + + VirtualDevice aVirDev( 1 ); + aVirDev.SetMapMode( rVDev.GetMapMode() ); + aVirDev.SetFont( aNotRotatedFont ); + aVirDev.SetTextAlign( eTextAlign ); + + sal_Int16 nRotation = maFont.GetOrientation(); + Polygon aPolyDummy( 1 ); + + PolyPolygon aPolyPoly; + Point aPos( rPos ); + if ( nRotation ) + { + aPolyDummy.SetPoint( aPos, 0 ); + aPolyDummy.Rotate( rPos, nRotation ); + aPos = aPolyDummy.GetPoint( 0 ); + } + sal_Bool bOldLineColor = bLineColor; + bLineColor = sal_False; + std::vector aPolyPolyVec; + if ( aVirDev.GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, STRING_LEN, TRUE, nWidth, pDXArry ) ) + { + // always adjust text position to match baseline alignment + ImplWriteLine( "pum" ); + ImplWriteDouble( aPos.X() ); + ImplWriteDouble( aPos.Y() ); + ImplWriteLine( "t" ); + if ( nRotation ) + { + ImplWriteF( nRotation, 1 ); + *mpPS << "r "; + } + std::vector::iterator aIter( aPolyPolyVec.begin() ); + while ( aIter != aPolyPolyVec.end() ) + ImplPolyPoly( *aIter++, sal_True ); + ImplWriteLine( "pom" ); + } + bLineColor = bOldLineColor; + } + else if ( ( mnTextMode == 1 ) || ( mnTextMode == 2 ) ) // normal text output + { + if ( mnTextMode == 2 ) // forcing output one complete text packet, by + pDXArry = NULL; // ignoring the kerning array + ImplSetAttrForText( rPos ); + ByteString aStr( rUniString, maFont.GetCharSet() ); + ImplWriteString( aStr, rVDev, pDXArry, nWidth != 0 ); + if ( maFont.GetOrientation() ) + ImplWriteLine( "gr" ); + } +} + +// ------------------------------------------------------------------------ + +void PSWriter::ImplSetAttrForText( const Point& rPoint ) +{ + Point aPoint( rPoint ); + + long nRotation = maFont.GetOrientation(); + ImplWriteTextColor(); + + Size aSize = maFont.GetSize(); + + if ( maLastFont != maFont ) + { + if ( maFont.GetPitch() == PITCH_FIXED ) // a little bit font selection + ImplDefineFont( "Courier", "Oblique" ); + else if ( maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL ) + ImplWriteLine( "/Symbol findfont" ); + else if ( maFont.GetFamily() == FAMILY_SWISS ) + ImplDefineFont( "Helvetica", "Oblique" ); + else + ImplDefineFont( "Times", "Italic" ); + + maLastFont = maFont; + aSize = maFont.GetSize(); + ImplWriteDouble( aSize.Height() ); + *mpPS << "sf "; + } + if ( eTextAlign != ALIGN_BASELINE ) + { // PostScript kennt kein FontAlignment + if ( eTextAlign == ALIGN_TOP ) // -> ich gehe daher davon aus, dass + aPoint.Y() += ( aSize.Height() * 4 / 5 ); // der Bereich unter der Baseline + else if ( eTextAlign == ALIGN_BOTTOM ) // in etwa 20% der Fontsize ausmacht + aPoint.Y() -= ( aSize.Height() / 5 ); + } + ImplMoveTo( aPoint ); + if ( nRotation ) + { + *mpPS << "gs "; + ImplWriteF( nRotation, 1 ); + *mpPS << "r "; + } +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplDefineFont( const char* pOriginalName, const char* pItalic ) +{ + *mpPS << (BYTE)'/'; //convert the font pOriginalName using ISOLatin1Encoding + *mpPS << pOriginalName; + switch ( maFont.GetWeight() ) + { + case WEIGHT_SEMIBOLD : + case WEIGHT_BOLD : + case WEIGHT_ULTRABOLD : + case WEIGHT_BLACK : + *mpPS << "-Bold"; + if ( maFont.GetItalic() != ITALIC_NONE ) + *mpPS << pItalic; + break; + default: + if ( maFont.GetItalic() != ITALIC_NONE ) + *mpPS << pItalic; + break; + } + ImplWriteLine( " f" ); +} + +//--------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------- + +void PSWriter::ImplClosePathDraw( ULONG nMode ) +{ + *mpPS << "pc"; + mnCursorPos += 2; + ImplExecMode( nMode ); +} + +void PSWriter::ImplPathDraw() +{ + *mpPS << "ps"; + mnCursorPos += 2; + ImplExecMode( PS_RET ); +} + +//--------------------------------------------------------------------------------- + +inline void PSWriter::ImplWriteLineColor( ULONG nMode ) +{ + if ( aColor != aLineColor ) + { + aColor = aLineColor; + ImplWriteColor( nMode ); + } +} +inline void PSWriter::ImplWriteFillColor( ULONG nMode ) +{ + if ( aColor != aFillColor ) + { + aColor = aFillColor; + ImplWriteColor( nMode ); + } +} +inline void PSWriter::ImplWriteTextColor( ULONG nMode ) +{ + if ( aColor != aTextColor ) + { + aColor = aTextColor; + ImplWriteColor( nMode ); + } +} +inline void PSWriter::ImplWriteTextFillColor( ULONG nMode ) +{ + if ( aColor != aTextFillColor ) + { + aColor = aTextFillColor; + ImplWriteColor( nMode ); + } +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteColor( ULONG nMode ) +{ + if ( mbGrayScale ) + { + // writes the Color (grayscale) as a Number from 0.000 up to 1.000 + + ImplWriteF( 1000 * ( (BYTE)aColor.GetRed() * 77 + (BYTE)aColor.GetGreen() * 151 + + (BYTE)aColor.GetBlue() * 28 + 1 ) / 65536, 3, nMode ); + } + else + { + ImplWriteB1 ( (BYTE)aColor.GetRed() ); + ImplWriteB1 ( (BYTE)aColor.GetGreen() ); + ImplWriteB1 ( (BYTE)aColor.GetBlue() ); + } + *mpPS << "c"; // ( c is defined as setrgbcolor or setgray ) + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +double PSWriter::ImplGetScaling( const MapMode& rMapMode ) +{ + double nMul; + switch ( rMapMode.GetMapUnit() ) + { + case MAP_PIXEL : + case MAP_SYSFONT : + case MAP_APPFONT : + + case MAP_100TH_MM : + nMul = 1; + break; + case MAP_10TH_MM : + nMul = 10; + break; + case MAP_MM : + nMul = 100; + break; + case MAP_CM : + nMul = 1000; + break; + case MAP_1000TH_INCH : + nMul = 2.54; + break; + case MAP_100TH_INCH : + nMul = 25.4; + break; + case MAP_10TH_INCH : + nMul = 254; + break; + case MAP_INCH : + nMul = 2540; + break; + case MAP_TWIP : + nMul = 1.76388889; + break; + case MAP_POINT : + nMul = 35.27777778; + break; + default: + nMul = 1.0; + break; + } + return nMul; +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplGetMapMode( const MapMode& rMapMode ) +{ + ImplWriteLine( "tm setmatrix" ); + double fMul = ImplGetScaling( rMapMode ); + double fScaleX = (double)rMapMode.GetScaleX() * fMul; + double fScaleY = (double)rMapMode.GetScaleY() * fMul; + ImplTranslate( rMapMode.GetOrigin().X() * fScaleX, rMapMode.GetOrigin().Y() * fScaleY ); + ImplScale( fScaleX, fScaleY ); +} + +//--------------------------------------------------------------------------------- + +inline void PSWriter::ImplExecMode( ULONG nMode ) +{ + if ( nMode & PS_WRAP ) + { + if ( mnCursorPos >= PS_LINESIZE ) + { + mnCursorPos = 0; + *mpPS << (BYTE)0xa; + return; + } + } + if ( nMode & PS_SPACE ) + { + *mpPS << (BYTE)32; + mnCursorPos++; + } + if ( nMode & PS_RET ) + { + *mpPS << (BYTE)0xa; + mnCursorPos = 0; + } +} + +//--------------------------------------------------------------------------------- + +inline void PSWriter::ImplWriteLine( const char* pString, ULONG nMode ) +{ + ULONG i = 0; + while ( pString[ i ] ) + { + *mpPS << (BYTE)pString[ i++ ]; + } + mnCursorPos += i; + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteLineInfo( double fLWidth, double fMLimit, + SvtGraphicStroke::CapType eLCap, + SvtGraphicStroke::JoinType eJoin, + SvtGraphicStroke::DashArray& rLDash ) +{ + if ( fLineWidth != fLWidth ) + { + fLineWidth = fLWidth; + ImplWriteDouble( fLineWidth ); + ImplWriteLine( "lw", PS_SPACE ); + } + if ( eLineCap != eLCap ) + { + eLineCap = eLCap; + ImplWriteLong( (sal_Int32)eLineCap, PS_SPACE ); + ImplWriteLine( "lc", PS_SPACE ); + } + if ( eJoinType != eJoin ) + { + eJoinType = eJoin; + ImplWriteLong( (sal_Int32)eJoinType, PS_SPACE ); + ImplWriteLine( "lj", PS_SPACE ); + } + if ( eJoinType == SvtGraphicStroke::joinMiter ) + { + if ( fMiterLimit != fMLimit ) + { + fMiterLimit = fMLimit; + ImplWriteDouble( fMiterLimit ); + ImplWriteLine( "ml", PS_SPACE ); + } + } + if ( aDashArray != rLDash ) + { + aDashArray = rLDash; + sal_uInt32 j, i = aDashArray.size(); + ImplWriteLine( "[", PS_SPACE ); + for ( j = 0; j < i; j++ ) + ImplWriteDouble( aDashArray[ j ] ); + ImplWriteLine( "] 0 ld" ); + } +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteLineInfo( const LineInfo& rLineInfo ) +{ + SvtGraphicStroke::DashArray l_aDashArray; + if ( rLineInfo.GetStyle() == LINE_DASH ) + l_aDashArray.push_back( 2 ); + const double fLWidth(( ( rLineInfo.GetWidth() + 1 ) + ( rLineInfo.GetWidth() + 1 ) ) * 0.5); + SvtGraphicStroke::JoinType aJoinType(SvtGraphicStroke::joinMiter); + + switch(rLineInfo.GetLineJoin()) + { + default: // B2DLINEJOIN_NONE, B2DLINEJOIN_MIDDLE + // do NOT use SvtGraphicStroke::joinNone here + // since it will be written as numerical value directly + // and is NOT a valid EPS value + break; + case basegfx::B2DLINEJOIN_MITER: + aJoinType = SvtGraphicStroke::joinMiter; + break; + case basegfx::B2DLINEJOIN_BEVEL: + aJoinType = SvtGraphicStroke::joinBevel; + break; + case basegfx::B2DLINEJOIN_ROUND: + aJoinType = SvtGraphicStroke::joinRound; + break; + } + + ImplWriteLineInfo( fLWidth, fMiterLimit, SvtGraphicStroke::capButt, aJoinType, l_aDashArray ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteLong( sal_Int32 nNumber, ULONG nMode ) +{ + const ByteString aNumber( ByteString::CreateFromInt32( nNumber ) ); + ULONG nLen = aNumber.Len(); + mnCursorPos += nLen; + for ( USHORT n = 0; n < nLen; n++ ) + *mpPS << aNumber.GetChar( n ); + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteDouble( double fNumber, ULONG nMode ) +{ + sal_Int32 nLength; + + sal_Int32 nPTemp = (sal_Int32)fNumber; + sal_Int32 nATemp = labs( (sal_Int32)( ( fNumber - nPTemp ) * 100000 ) ); + + if ( !nPTemp && nATemp && ( fNumber < 0.0 ) ) + *mpPS << (sal_Char)'-'; + + ByteString aNumber1( ByteString::CreateFromInt32( nPTemp ) ); + nLength = aNumber1.Len(); + mnCursorPos += nLength; + for ( sal_Int32 n = 0; n < nLength; n++ ) + *mpPS << aNumber1.GetChar( (sal_uInt16)n ); + + int zCount = 0; + if ( nATemp ) + { + *mpPS << (BYTE)'.'; + mnCursorPos++; + const ByteString aNumber2( ByteString::CreateFromInt32( nATemp ) ); + + sal_Int16 n, nLen = aNumber2.Len(); + if ( nLen < 8 ) + { + mnCursorPos += 6 - nLen; + for ( n = 0; n < ( 5 - nLen ); n++ ) + { + *mpPS << (BYTE)'0'; + } + } + mnCursorPos += nLen; + for ( n = 0; n < nLen; n++ ) + { + *mpPS << aNumber2.GetChar( n ); + zCount--; + if ( aNumber2.GetChar( n ) != '0' ) + zCount = 0; + } + if ( zCount ) + mpPS->SeekRel( zCount ); + } + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +// writes the number to stream: nNumber / ( 10^nCount ) + +void PSWriter::ImplWriteF( sal_Int32 nNumber, ULONG nCount, ULONG nMode ) +{ + if ( nNumber < 0 ) + { + *mpPS << (BYTE)'-'; + nNumber = -nNumber; + mnCursorPos++; + } + const ByteString aScaleFactor( ByteString::CreateFromInt32( nNumber ) ); + ULONG nLen = aScaleFactor.Len(); + long nStSize = ( nCount + 1 ) - nLen; + if ( nStSize >= 1 ) + { + *mpPS << (BYTE)'0'; + mnCursorPos++; + } + if ( nStSize >= 2 ) + { + *mpPS << (BYTE)'.'; + for ( long i = 1; i < nStSize; i++ ) + { + *mpPS << (BYTE)'0'; + mnCursorPos++; + } + } + mnCursorPos += nLen; + for( USHORT n = 0UL; n < nLen; n++ ) + { + if ( n == nLen - nCount ) + { + *mpPS << (BYTE)'.'; + mnCursorPos++; + } + *mpPS << aScaleFactor.GetChar( n ); + } + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteByte( BYTE nNumb, ULONG nMode ) +{ + *mpPS << ( nNumb ); + mnCursorPos++; + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +void PSWriter::ImplWriteHexByte( BYTE nNumb, ULONG nMode ) +{ + if ( ( nNumb >> 4 ) > 9 ) + *mpPS << (BYTE)( ( nNumb >> 4 ) + 'A' - 10 ); + else + *mpPS << (BYTE)( ( nNumb >> 4 ) + '0' ); + + if ( ( nNumb & 0xf ) > 9 ) + *mpPS << (BYTE)( ( nNumb & 0xf ) + 'A' - 10 ); + else + *mpPS << (BYTE)( ( nNumb & 0xf ) + '0' ); + mnCursorPos += 2; + ImplExecMode( nMode ); +} + +//--------------------------------------------------------------------------------- + +// writes the BYTE nNumb as a Number from 0.000 up to 1.000 + +void PSWriter::ImplWriteB1( BYTE nNumb, ULONG nMode ) +{ + ImplWriteF( 1000 * ( nNumb + 1 ) / 256 , 3, nMode ); +} + + +// ------------------------------------------------------------------------ + +inline void PSWriter::WriteBits( USHORT nCode, USHORT nCodeLen ) +{ + dwShift |= ( nCode << ( nOffset - nCodeLen ) ); + nOffset -= nCodeLen; + while ( nOffset < 24 ) + { + ImplWriteHexByte( (BYTE)( dwShift >> 24 ) ); + dwShift <<= 8; + nOffset += 8; + } + if ( nCode == 257 && nOffset != 32 ) + ImplWriteHexByte( (BYTE)( dwShift >> 24 ) ); +} + +// ------------------------------------------------------------------------ + +void PSWriter::StartCompression() +{ + USHORT i; + nDataSize = 8; + + nClearCode = 1 << nDataSize; + nEOICode = nClearCode + 1; + nTableSize = nEOICode + 1; + nCodeSize = nDataSize + 1; + + nOffset = 32; // anzahl freier bits in dwShift + dwShift = 0; + + pTable = new PSLZWCTreeNode[ 4096 ]; + + for ( i = 0; i < 4096; i++ ) + { + pTable[ i ].pBrother = pTable[ i ].pFirstChild = NULL; + pTable[ i ].nValue = (BYTE)( pTable[ i ].nCode = i ); + } + pPrefix = NULL; + WriteBits( nClearCode, nCodeSize ); +} + +// ------------------------------------------------------------------------ + +void PSWriter::Compress( BYTE nCompThis ) +{ + PSLZWCTreeNode* p; + USHORT i; + BYTE nV; + + if( !pPrefix ) + { + pPrefix = pTable + nCompThis; + } + else + { + nV = nCompThis; + for( p = pPrefix->pFirstChild; p != NULL; p = p->pBrother ) + { + if ( p->nValue == nV ) + break; + } + + if( p ) + pPrefix = p; + else + { + WriteBits( pPrefix->nCode, nCodeSize ); + + if ( nTableSize == 409 ) + { + WriteBits( nClearCode, nCodeSize ); + + for ( i = 0; i < nClearCode; i++ ) + pTable[ i ].pFirstChild = NULL; + + nCodeSize = nDataSize + 1; + nTableSize = nEOICode + 1; + } + else + { + if( nTableSize == (USHORT)( ( 1 << nCodeSize ) - 1 ) ) + nCodeSize++; + + p = pTable + ( nTableSize++ ); + p->pBrother = pPrefix->pFirstChild; + pPrefix->pFirstChild = p; + p->nValue = nV; + p->pFirstChild = NULL; + } + + pPrefix = pTable + nV; + } + } +} + +// ------------------------------------------------------------------------ + +void PSWriter::EndCompression() +{ + if( pPrefix ) + WriteBits( pPrefix->nCode, nCodeSize ); + + WriteBits( nEOICode, nCodeSize ); + delete[] pTable; +} + +// ------------------------------------------------------------------------ + +BYTE* PSWriter::ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ) +{ + while ( nComp-- >= nSize ) + { + ULONG i; + for ( i = 0; i < nSize; i++ ) + { + if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) + break; + } + if ( i == nSize ) + return pSource; + pSource++; + } + return NULL; +} + +// ------------------------------------------------------------------------ + +BOOL PSWriter::ImplGetBoundingBox( double* nNumb, BYTE* pSource, ULONG nSize ) +{ + BOOL bRetValue = FALSE; + ULONG nBytesRead; + + if ( nSize < 256 ) // we assume that the file is greater than 256 bytes + return FALSE; + + if ( nSize < POSTSCRIPT_BOUNDINGSEARCH ) + nBytesRead = nSize; + else + nBytesRead = POSTSCRIPT_BOUNDINGSEARCH; + + BYTE* pDest = ImplSearchEntry( pSource, (BYTE*)"%%BoundingBox:", nBytesRead, 14 ); + if ( pDest ) + { + int nSecurityCount = 100; // only 100 bytes following the bounding box will be checked + nNumb[0] = nNumb[1] = nNumb[2] = nNumb[3] = 0; + pDest += 14; + for ( int i = 0; ( i < 4 ) && nSecurityCount; i++ ) + { + int nDivision = 1; + BOOL bDivision = FALSE; + BOOL bNegative = FALSE; + BOOL bValid = TRUE; + + while ( ( --nSecurityCount ) && ( ( *pDest == ' ' ) || ( *pDest == 0x9 ) ) ) + pDest++; + BYTE nByte = *pDest; + while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) ) + { + switch ( nByte ) + { + case '.' : + if ( bDivision ) + bValid = FALSE; + else + bDivision = TRUE; + break; + case '-' : + bNegative = TRUE; + break; + default : + if ( ( nByte < '0' ) || ( nByte > '9' ) ) + nSecurityCount = 1; // error parsing the bounding box values + else if ( bValid ) + { + if ( bDivision ) + nDivision*=10; + nNumb[i] *= 10; + nNumb[i] += nByte - '0'; + } + break; + } + nSecurityCount--; + nByte = *(++pDest); + } + if ( bNegative ) + nNumb[i] = -nNumb[i]; + if ( bDivision && ( nDivision != 1 ) ) + nNumb[i] /= nDivision; + } + if ( nSecurityCount) + bRetValue = TRUE; + } + return bRetValue; +} + +//================== GraphicExport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pFilterConfigItem, BOOL) +{ + PSWriter aPSWriter; + return aPSWriter.WritePS( rGraphic, rStream, pFilterConfigItem ); +} + +//--------------------------------------------------------------------------------- + +extern "C" BOOL __LOADONCALLAPI DoExportDialog( FltCallDialogParameter& rPara ) +{ + BOOL bRet = FALSE; + + if ( rPara.pWindow ) + { + ByteString aResMgrName( "eps" ); + ResMgr* pResMgr; + + pResMgr = ResMgr::CreateResMgr( aResMgrName.GetBuffer(), Application::GetSettings().GetUILocale() ); + + if( pResMgr ) + { + rPara.pResMgr = pResMgr; + bRet = ( DlgExportEPS( rPara ).Execute() == RET_OK ); + delete pResMgr; + } + else + bRet = TRUE; + } + + return bRet; +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/eps/epsstr.src b/filter/source/graphicfilter/eps/epsstr.src new file mode 100644 index 000000000000..5f456cbf8027 --- /dev/null +++ b/filter/source/graphicfilter/eps/epsstr.src @@ -0,0 +1,70 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 "strings.hrc" + +String KEY_VERSION_CHECK +{ + Text [ en-US ] = "Warning: Not all of the imported EPS graphics could be saved at level1\nas some are at a higher level!"; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/graphicfilter/eps/exports.map b/filter/source/graphicfilter/eps/exports.map new file mode 100644 index 000000000000..61e4682c6551 --- /dev/null +++ b/filter/source/graphicfilter/eps/exports.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + GraphicExport; + DoExportDialog; + + local: + *; +}; diff --git a/filter/source/graphicfilter/eps/makefile.mk b/filter/source/graphicfilter/eps/makefile.mk new file mode 100644 index 000000000000..189972e80e6e --- /dev/null +++ b/filter/source/graphicfilter/eps/makefile.mk @@ -0,0 +1,79 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=eps +DEPTARGET=veps + +#GEN_HID=TRUE + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SRS1NAME=$(TARGET) +SRC1FILES = dlgeps.src \ + epsstr.src +.IF "$(L10N_framework)"=="" +EXCEPTIONSFILES=$(SLO)$/eps.obj +SLOFILES = $(SLO)$/eps.obj \ + $(SLO)$/dlgeps.obj +.ENDIF + +# ========================================================================== + +RESLIB1NAME=$(TARGET) +RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs +.IF "$(L10N_framework)"=="" +SHL1TARGET= eps$(DLLPOSTFIX) +SHL1IMPLIB= eps +SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/eps.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/eps.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/eps/strings.hrc b/filter/source/graphicfilter/eps/strings.hrc new file mode 100644 index 000000000000..8628c16b1e94 --- /dev/null +++ b/filter/source/graphicfilter/eps/strings.hrc @@ -0,0 +1,29 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +#define KEY_VERSION_CHECK 260 + diff --git a/filter/source/graphicfilter/eras/eras.cxx b/filter/source/graphicfilter/eras/eras.cxx new file mode 100644 index 000000000000..845dbf6ff83a --- /dev/null +++ b/filter/source/graphicfilter/eras/eras.cxx @@ -0,0 +1,317 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include + +//============================ RASWriter ================================== + +class RASWriter { + +private: + + SvStream* mpOStm; + USHORT mpOStmOldModus; + + BOOL mbStatus; + BitmapReadAccess* mpAcc; + + ULONG mnWidth, mnHeight; + USHORT mnColors, mnDepth; + + ULONG mnRepCount; + BYTE mnRepVal; + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + void ImplCallback( ULONG nCurrentYPos ); + BOOL ImplWriteHeader(); + void ImplWritePalette(); + void ImplWriteBody(); + void ImplPutByte( BYTE ); // RLE decoding + +public: + RASWriter(); + ~RASWriter(); + + BOOL WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem ); +}; + +//=================== Methoden von RASWriter ============================== + +RASWriter::RASWriter() : + mbStatus ( TRUE ), + mpAcc ( NULL ), + mnRepCount ( 0xffffffff ) +{ +} + +// ------------------------------------------------------------------------ + +RASWriter::~RASWriter() +{ +} + +// ------------------------------------------------------------------------ + +void RASWriter::ImplCallback( ULONG nYPos ) +{ + if ( xStatusIndicator.is() ) + xStatusIndicator->setValue( (USHORT)( ( 100 * nYPos ) / mnHeight ) ); +} + +// ------------------------------------------------------------------------ + +BOOL RASWriter::WriteRAS( const Graphic& rGraphic, SvStream& rRAS, FilterConfigItem* pFilterConfigItem) +{ + Bitmap aBmp; + + mpOStm = &rRAS; + + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + aBmp = aBmpEx.GetBitmap(); + + if ( aBmp.GetBitCount() == 4 ) + aBmp.Convert( BMP_CONVERSION_8BIT_COLORS ); + + mnDepth = aBmp.GetBitCount(); + + // export code below only handles three discrete cases + mnDepth = mnDepth <= 1 ? 1 : mnDepth <= 8 ? 8 : 24; + + mpAcc = aBmp.AcquireReadAccess(); + if ( mpAcc ) + { + mpOStmOldModus = mpOStm->GetNumberFormatInt(); + mpOStm->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + + if ( ImplWriteHeader() ) + { + if ( mnDepth <= 8 ) + ImplWritePalette(); + ImplWriteBody(); + } + aBmp.ReleaseAccess( mpAcc ); + } + else + mbStatus = FALSE; + + mpOStm->SetNumberFormatInt( mpOStmOldModus ); + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +BOOL RASWriter::ImplWriteHeader() +{ + mnWidth = mpAcc->Width(); + mnHeight = mpAcc->Height(); + if ( mnDepth <= 8 ) + { + mnColors = mpAcc->GetPaletteEntryCount(); + if (mnColors == 0) + mbStatus = FALSE; + } + if ( mbStatus && mnWidth && mnHeight && mnDepth ) + { + *mpOStm << (UINT32)0x59a66a95 << (UINT32)mnWidth << (UINT32)mnHeight + << (UINT32)mnDepth + << (UINT32)(( ( ( ( mnWidth * mnDepth ) + 15 ) >> 4 ) << 1 ) * mnHeight) + << (UINT32)2; + + if ( mnDepth > 8 ) + *mpOStm << (UINT32)0 << (UINT32)0; + else + { + + *mpOStm << (UINT32)1 << (UINT32)( mnColors * 3 ); + } + } + else mbStatus = FALSE; + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void RASWriter::ImplWritePalette() +{ + USHORT i; + + for ( i = 0; i < mnColors; *mpOStm << mpAcc->GetPaletteColor( i++ ).GetRed() ) ; + for ( i = 0; i < mnColors; *mpOStm << mpAcc->GetPaletteColor( i++ ).GetGreen() ) ; + for ( i = 0; i < mnColors; *mpOStm << mpAcc->GetPaletteColor( i++ ).GetBlue() ) ; +} + +// ------------------------------------------------------------------------ + +void RASWriter::ImplWriteBody() +{ + ULONG x, y; + + if ( mnDepth == 24 ) + { + for ( y = 0; y < mnHeight; y++ ) + { + ImplCallback( y ); // processing output + for ( x = 0; x < mnWidth; x++ ) + { + BitmapColor aColor( mpAcc->GetPixel( y, x ) ); + ImplPutByte( aColor.GetBlue() ); // Format ist BGR + ImplPutByte( aColor.GetGreen() ); + ImplPutByte( aColor.GetRed() ); + } + if ( x & 1 ) ImplPutByte( 0 ); // WORD ALIGNMENT ??? + } + } + else if ( mnDepth == 8 ) + { + for ( y = 0; y < mnHeight; y++ ) + { + ImplCallback( y ); // processing output + for ( x = 0; x < mnWidth; x++ ) + { + ImplPutByte ( mpAcc->GetPixel( y, x ) ); + } + if ( x & 1 ) ImplPutByte( 0 ); // WORD ALIGNMENT ??? + } + } + else if ( mnDepth == 1 ) + { + BYTE nDat = 0; + + for ( y = 0; y < mnHeight; y++ ) + { + ImplCallback( y ); // processing output + for ( x = 0; x < mnWidth; x++ ) + { + nDat = ( ( nDat << 1 ) | ( mpAcc->GetPixel ( y, x ) & 1 ) ); + if ( ( x & 7 ) == 7 ) + ImplPutByte( nDat ); + } + if ( x & 7 ) + ImplPutByte( sal::static_int_cast< BYTE >(nDat << ( ( ( x & 7 ) ^ 7 ) + 1)) );// write remaining bits + if (!( ( x - 1 ) & 0x8 ) ) + ImplPutByte( 0 ); // WORD ALIGNMENT ??? + } + } + ImplPutByte( mnRepVal + 1 ); // end of RLE decoding +} + +// ------------------------------------------------------------------------ + +void RASWriter::ImplPutByte( BYTE nPutThis ) +{ + if ( mnRepCount == 0xffffffff ) + { + mnRepCount = 0; + mnRepVal = nPutThis; + } + else + { + if ( ( nPutThis == mnRepVal ) && ( mnRepCount != 0xff ) ) + mnRepCount++; + else + { + if ( mnRepCount == 0 ) + { + *mpOStm << (BYTE)mnRepVal; + if ( mnRepVal == 0x80 ) + *mpOStm << (BYTE)0; + } + else + { + *mpOStm << (BYTE)0x80; + *mpOStm << (BYTE)mnRepCount; + *mpOStm << (BYTE)mnRepVal; + } + mnRepVal = nPutThis; + mnRepCount = 0; + } + } +} + +// ------------------------------------------------------------------------ + +// --------------------- +// - exported function - +// --------------------- + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL ) +{ + RASWriter aRASWriter; + + return aRASWriter.WriteRAS( rGraphic, rStream, pFilterConfigItem ); +} +#ifndef GCC +#endif + +// --------------- +// - Win16 trash - +// --------------- + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ + if ( nHeap ) + UnlockData( 0 ); + + hDLLInst = hDLL; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/eras/exports.map b/filter/source/graphicfilter/eras/exports.map new file mode 100644 index 000000000000..d4e28c44700c --- /dev/null +++ b/filter/source/graphicfilter/eras/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicExport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/eras/makefile.mk b/filter/source/graphicfilter/eras/makefile.mk new file mode 100644 index 000000000000..051c70699595 --- /dev/null +++ b/filter/source/graphicfilter/eras/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=eras +DEPTARGET=veras + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- +.IF "$(L10N_framework)"=="" +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF + +SLOFILES = $(SLO)$/eras.obj + +# ========================================================================== + +SHL1TARGET= era$(DLLPOSTFIX) +SHL1IMPLIB= eras +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) $(SVTOOLLIB) +SHL1LIBS= $(SLB)$/eras.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/eras.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk + diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx new file mode 100644 index 000000000000..0e71141eb812 --- /dev/null +++ b/filter/source/graphicfilter/etiff/etiff.cxx @@ -0,0 +1,648 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include +#include +#include + +#define NewSubfileType 254 +#define ImageWidth 256 +#define ImageLength 257 +#define BitsPerSample 258 +#define Compression 259 +#define PhotometricInterpretation 262 +#define StripOffsets 273 +#define SamplesPerPixel 277 +#define RowsPerStrip 278 +#define StripByteCounts 279 +#define XResolution 282 +#define YResolution 283 +#define PlanarConfiguration 284 +#define ResolutionUnit 296 +#define ColorMap 320 +#define ReferenceBlackWhite 532 + +// ------------- +// - TIFFWriter - +// ------------- + +struct TIFFLZWCTreeNode +{ + + TIFFLZWCTreeNode* pBrother; // naechster Knoten, der den selben Vater hat + TIFFLZWCTreeNode* pFirstChild; // erster Sohn + USHORT nCode; // Der Code fuer den String von Pixelwerten, der sich ergibt, wenn + USHORT nValue; // Der Pixelwert +}; + +class TIFFWriter +{ +private: + + SvStream* mpOStm; + UINT32 mnStreamOfs; + + BOOL mbStatus; + BitmapReadAccess* mpAcc; + + UINT32 mnWidth, mnHeight, mnColors; + UINT32 mnCurAllPictHeight; + UINT32 mnSumOfAllPictHeight; + UINT32 mnBitsPerPixel; + UINT32 mnLastPercent; + + UINT32 mnLatestIfdPos; + UINT16 mnTagCount; // number of tags already written + UINT32 mnCurrentTagCountPos; // offset to the position where the current + // tag count is to insert + + UINT32 mnXResPos; // if != 0 this DWORDs stores the + UINT32 mnYResPos; // actual streamposition of the + UINT32 mnPalPos; // Tag Entry + UINT32 mnBitmapPos; + UINT32 mnStripByteCountPos; + + TIFFLZWCTreeNode* pTable; + TIFFLZWCTreeNode* pPrefix; + USHORT nDataSize; + USHORT nClearCode; + USHORT nEOICode; + USHORT nTableSize; + USHORT nCodeSize; + ULONG nOffset; + ULONG dwShift; + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + void ImplCallback( UINT32 nPercent ); + BOOL ImplWriteHeader( BOOL bMultiPage ); + void ImplWritePalette(); + BOOL ImplWriteBody(); + void ImplWriteTag( UINT16 TagID, UINT16 DataType, UINT32 NumberOfItems, UINT32 Value); + void ImplWriteResolution( ULONG nStreamPos, sal_uInt32 nResolutionUnit ); + void StartCompression(); + void Compress( BYTE nSrc ); + void EndCompression(); + inline void WriteBits( USHORT nCode, USHORT nCodeLen ); + +public: + + TIFFWriter(); + ~TIFFWriter(); + + BOOL WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConfigItem* pFilterConfigItem ); +}; + +// ------------------------------------------------------------------------ + +TIFFWriter::TIFFWriter() : + mbStatus ( TRUE ), + mpAcc ( NULL ), + mnCurAllPictHeight ( 0 ), + mnSumOfAllPictHeight( 0 ), + mnLastPercent ( 0 ), + mnXResPos ( 0 ), + mnYResPos ( 0 ), + mnBitmapPos ( 0 ), + mnStripByteCountPos ( 0 ) +{ +} + +// ------------------------------------------------------------------------ + +TIFFWriter::~TIFFWriter() +{ +} + +// ------------------------------------------------------------------------ + +BOOL TIFFWriter::WriteTIFF( const Graphic& rGraphic, SvStream& rTIFF, FilterConfigItem* pFilterConfigItem) +{ + ULONG* pDummy = new ULONG; delete pDummy; // damit unter OS/2 + // das richtige (Tools-)new + // verwendet wird, da es sonst + // in dieser DLL nur Vector-news + // gibt; + + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + // #i69169# copy stream + mpOStm = &rTIFF; + + const UINT16 nOldFormat = mpOStm->GetNumberFormatInt(); + mnStreamOfs = mpOStm->Tell(); + + // we will use the BIG Endian Mode + // TIFF header + mpOStm->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + *mpOStm << (UINT32)0x4d4d002a; // TIFF identifier + mnLatestIfdPos = mpOStm->Tell(); + *mpOStm << (UINT32)0; + + Animation aAnimation; + Bitmap aBmp; + + if( mbStatus ) + { + if ( rGraphic.IsAnimated() ) + aAnimation = rGraphic.GetAnimation(); + else + { + AnimationBitmap aAnimationBitmap( rGraphic.GetBitmap(), Point(), Size() ); + aAnimation.Insert( aAnimationBitmap ); + } + + USHORT i; + for ( i = 0; i < aAnimation.Count(); i++ ) + mnSumOfAllPictHeight += aAnimation.Get( i ).aBmpEx.GetSizePixel().Height(); + + for ( i = 0; mbStatus && ( i < aAnimation.Count() ); i++ ) + { + mnPalPos = 0; + const AnimationBitmap& rAnimationBitmap = aAnimation.Get( i ); + aBmp = rAnimationBitmap.aBmpEx.GetBitmap(); + mpAcc = aBmp.AcquireReadAccess(); + if ( mpAcc ) + { + mnBitsPerPixel = aBmp.GetBitCount(); + + // export code below only handles four discrete cases + mnBitsPerPixel = + mnBitsPerPixel <= 1 ? 1 : mnBitsPerPixel <= 4 ? 4 : mnBitsPerPixel <= 8 ? 8 : 24; + + if ( ImplWriteHeader( ( aAnimation.Count() > 0 ) ) ) + { + Size aDestMapSize( 300, 300 ); + const MapMode aMapMode( aBmp.GetPrefMapMode() ); + if ( aMapMode.GetMapUnit() != MAP_PIXEL ) + { + const Size aPrefSize( rGraphic.GetPrefSize() ); + aDestMapSize = OutputDevice::LogicToLogic( aPrefSize, aMapMode, MAP_INCH ); + } + ImplWriteResolution( mnXResPos, aDestMapSize.Width() ); + ImplWriteResolution( mnYResPos, aDestMapSize.Height() ); + if ( mnPalPos ) + ImplWritePalette(); + ImplWriteBody(); + } + UINT32 nCurPos = mpOStm->Tell(); + mpOStm->Seek( mnCurrentTagCountPos ); + *mpOStm << mnTagCount; + mpOStm->Seek( nCurPos ); + + aBmp.ReleaseAccess( mpAcc ); + } + else + mbStatus = FALSE; + } + } + mpOStm->SetNumberFormatInt( nOldFormat ); + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void TIFFWriter::ImplCallback( UINT32 nPercent ) +{ + if ( xStatusIndicator.is() ) + { + if( nPercent >= mnLastPercent + 3 ) + { + mnLastPercent = nPercent; + if ( nPercent <= 100 ) + xStatusIndicator->setValue( nPercent ); + } + } +} + + +// ------------------------------------------------------------------------ + +BOOL TIFFWriter::ImplWriteHeader( BOOL bMultiPage ) +{ + mnTagCount = 0; + mnWidth = mpAcc->Width(); + mnHeight = mpAcc->Height(); + + if ( mnWidth && mnHeight && mnBitsPerPixel && mbStatus ) + { + UINT32 nCurrentPos = mpOStm->Tell(); + mpOStm->Seek( mnLatestIfdPos ); + *mpOStm << (UINT32)( nCurrentPos - mnStreamOfs ); // offset to the IFD + mpOStm->Seek( nCurrentPos ); + + // (OFS8) TIFF image file directory (IFD) + mnCurrentTagCountPos = mpOStm->Tell(); + *mpOStm << (UINT16)0; // the number of tagentrys is to insert later + + UINT32 nSubFileFlags = 0; + if ( bMultiPage ) + nSubFileFlags |= 2; + ImplWriteTag( NewSubfileType, 4, 1, nSubFileFlags ); + ImplWriteTag( ImageWidth, 4, 1, mnWidth ); + ImplWriteTag( ImageLength, 4, 1, mnHeight); + ImplWriteTag( BitsPerSample, 3, 1, ( mnBitsPerPixel == 24 ) ? 8 : mnBitsPerPixel ); + ImplWriteTag( Compression, 3, 1, 5 ); + BYTE nTemp; + switch ( mnBitsPerPixel ) + { + case 1 : + nTemp = 1; + break; + case 4 : + case 8 : + nTemp = 3; + break; + case 24: + nTemp = 2; + break; + default: + nTemp = 0; // -Wall set a default... + break; + } + ImplWriteTag( PhotometricInterpretation, 3, 1, nTemp ); + mnBitmapPos = mpOStm->Tell(); + ImplWriteTag( StripOffsets, 4, 1, 0 ); + ImplWriteTag( SamplesPerPixel, 3, 1, ( mnBitsPerPixel == 24 ) ? 3 : 1 ); + ImplWriteTag( RowsPerStrip, 4, 1, mnHeight ); //0xffffffff ); + mnStripByteCountPos = mpOStm->Tell(); + ImplWriteTag( StripByteCounts, 4, 1, ( ( mnWidth * mnBitsPerPixel * mnHeight ) + 7 ) >> 3 ); + mnXResPos = mpOStm->Tell(); + ImplWriteTag( XResolution, 5, 1, 0 ); + mnYResPos = mpOStm->Tell(); + ImplWriteTag( YResolution, 5, 1, 0 ); + if ( mnBitsPerPixel != 1 ) + ImplWriteTag( PlanarConfiguration, 3, 1, 1 ); // ( RGB ORDER ) + ImplWriteTag( ResolutionUnit, 3, 1, 2); // Resolution Unit is Inch + if ( ( mnBitsPerPixel == 4 ) || ( mnBitsPerPixel == 8 ) ) + { + mnColors = mpAcc->GetPaletteEntryCount(); + mnPalPos = mpOStm->Tell(); + ImplWriteTag( ColorMap, 3, 3 * mnColors, 0 ); + } + + // and last we write zero to close the num dir entries list + mnLatestIfdPos = mpOStm->Tell(); + *mpOStm << (UINT32)0; // there are no more IFD + } + else + mbStatus = FALSE; + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void TIFFWriter::ImplWritePalette() +{ + USHORT i; + ULONG nCurrentPos = mpOStm->Tell(); + mpOStm->Seek( mnPalPos + 8 ); // the palette tag entry needs the offset + *mpOStm << static_cast(nCurrentPos - mnStreamOfs); // to the palette colors + mpOStm->Seek( nCurrentPos ); + + for ( i = 0; i < mnColors; i++ ) + { + const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); + *mpOStm << (UINT16)( rColor.GetRed() << 8 ); + } + for ( i = 0; i < mnColors; i++ ) + { + const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); + *mpOStm << (UINT16)( rColor.GetGreen() << 8 ); + } + for ( i = 0; i < mnColors; i++ ) + { + const BitmapColor& rColor = mpAcc->GetPaletteColor( i ); + *mpOStm << (UINT16)( rColor.GetBlue() << 8 ); + } +} + +// ------------------------------------------------------------------------ + +BOOL TIFFWriter::ImplWriteBody() +{ + BYTE nTemp = 0; + BYTE nShift; + ULONG j, x, y; + + ULONG nGfxBegin = mpOStm->Tell(); + mpOStm->Seek( mnBitmapPos + 8 ); // the strip offset tag entry needs the offset + *mpOStm << static_cast(nGfxBegin - mnStreamOfs); // to the bitmap data + mpOStm->Seek( nGfxBegin ); + + StartCompression(); + + switch( mnBitsPerPixel ) + { + case 24 : + { + for ( y = 0; y < mnHeight; y++, mnCurAllPictHeight++ ) + { + ImplCallback( 100 * mnCurAllPictHeight / mnSumOfAllPictHeight ); + for ( x = 0; x < mnWidth; x++ ) + { + const BitmapColor& rColor = mpAcc->GetPixel( y, x ); + Compress( rColor.GetRed() ); + Compress( rColor.GetGreen() ); + Compress( rColor.GetBlue() ); + } + } + } + break; + + case 8 : + { + for ( y = 0; y < mnHeight; y++, mnCurAllPictHeight++ ) + { + ImplCallback( 100 * mnCurAllPictHeight / mnSumOfAllPictHeight ); + for ( x = 0; x < mnWidth; x++ ) + { + Compress( mpAcc->GetPixel( y, x ) ); + } + } + } + break; + + case 4 : + { + for ( nShift = 0, y = 0; y < mnHeight; y++, mnCurAllPictHeight++ ) + { + ImplCallback( 100 * mnCurAllPictHeight / mnSumOfAllPictHeight ); + for ( x = 0; x < mnWidth; x++, nShift++ ) + { + if (!( nShift & 1 )) + nTemp = ( (BYTE)mpAcc->GetPixel( y, x ) << 4 ); + else + Compress( (BYTE)( nTemp | ( mpAcc->GetPixel( y, x ) & 0xf ) ) ); + } + if ( nShift & 1 ) + Compress( nTemp ); + } + } + break; + + case 1 : + { + j = 1; + for ( y = 0; y < mnHeight; y++, mnCurAllPictHeight++ ) + { + ImplCallback( 100 * mnCurAllPictHeight / mnSumOfAllPictHeight ); + for ( x = 0; x < mnWidth; x++) + { + j <<= 1; + j |= ( ( ~mpAcc->GetPixel( y, x ) ) & 1 ); + if ( j & 0x100 ) + { + Compress( (BYTE)j ); + j = 1; + } + } + if ( j != 1 ) + { + Compress( (BYTE)(j << ( ( ( x & 7) ^ 7 ) + 1 ) ) ); + j = 1; + } + } + } + break; + + default: + { + mbStatus = FALSE; + } + break; + } + + EndCompression(); + + if ( mnStripByteCountPos && mbStatus ) + { + ULONG nGfxEnd = mpOStm->Tell(); + mpOStm->Seek( mnStripByteCountPos + 8 ); + *mpOStm << static_cast( nGfxEnd - nGfxBegin ); // mnStripByteCountPos needs the size of the compression data + mpOStm->Seek( nGfxEnd ); + } + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void TIFFWriter::ImplWriteResolution( ULONG nStreamPos, sal_uInt32 nResolutionUnit ) +{ + ULONG nCurrentPos = mpOStm->Tell(); + mpOStm->Seek( nStreamPos + 8 ); + *mpOStm << (UINT32)nCurrentPos - mnStreamOfs; + mpOStm->Seek( nCurrentPos ); + *mpOStm << (UINT32)1; + *mpOStm << nResolutionUnit; +} + +// ------------------------------------------------------------------------ + +void TIFFWriter::ImplWriteTag( UINT16 nTagID, UINT16 nDataType, UINT32 nNumberOfItems, UINT32 nValue) +{ + mnTagCount++; + + *mpOStm << nTagID; + *mpOStm << nDataType; + *mpOStm << nNumberOfItems; + if ( nDataType == 3 ) + nValue <<=16; // in Big Endian Mode WORDS needed to be shifted to a DWORD + *mpOStm << nValue; +} + +// ------------------------------------------------------------------------ + +inline void TIFFWriter::WriteBits( USHORT nCode, USHORT nCodeLen ) +{ + dwShift |= ( nCode << ( nOffset - nCodeLen ) ); + nOffset -= nCodeLen; + while ( nOffset < 24 ) + { + *mpOStm << (BYTE)( dwShift >> 24 ); + dwShift <<= 8; + nOffset += 8; + } + if ( nCode == 257 && nOffset != 32 ) + { + *mpOStm << (BYTE)( dwShift >> 24 ); + } +} + +// ------------------------------------------------------------------------ + +void TIFFWriter::StartCompression() +{ + USHORT i; + nDataSize = 8; + + nClearCode = 1 << nDataSize; + nEOICode = nClearCode + 1; + nTableSize = nEOICode + 1; + nCodeSize = nDataSize + 1; + + nOffset = 32; // anzahl freier bits in dwShift + dwShift = 0; + + pTable = new TIFFLZWCTreeNode[ 4096 ]; + + for ( i = 0; i < 4096; i++) + { + pTable[ i ].pBrother = pTable[ i ].pFirstChild = NULL; + pTable[ i ].nValue = (BYTE)( pTable[ i ].nCode = i ); + } + + pPrefix = NULL; + WriteBits( nClearCode, nCodeSize ); +} + +// ------------------------------------------------------------------------ + +void TIFFWriter::Compress( BYTE nCompThis ) +{ + TIFFLZWCTreeNode* p; + USHORT i; + BYTE nV; + + if( !pPrefix ) + { + pPrefix = pTable + nCompThis; + } + else + { + nV = nCompThis; + for( p = pPrefix->pFirstChild; p != NULL; p = p->pBrother ) + { + if ( p->nValue == nV ) + break; + } + + if( p ) + pPrefix = p; + else + { + WriteBits( pPrefix->nCode, nCodeSize ); + + if ( nTableSize == 409 ) + { + WriteBits( nClearCode, nCodeSize ); + + for ( i = 0; i < nClearCode; i++ ) + pTable[ i ].pFirstChild = NULL; + + nCodeSize = nDataSize + 1; + nTableSize = nEOICode + 1; + } + else + { + if( nTableSize == (USHORT)( ( 1 << nCodeSize ) - 1 ) ) + nCodeSize++; + + p = pTable + ( nTableSize++ ); + p->pBrother = pPrefix->pFirstChild; + pPrefix->pFirstChild = p; + p->nValue = nV; + p->pFirstChild = NULL; + } + + pPrefix = pTable + nV; + } + } +} + +// ------------------------------------------------------------------------ + +void TIFFWriter::EndCompression() +{ + if( pPrefix ) + WriteBits( pPrefix->nCode, nCodeSize ); + + WriteBits( nEOICode, nCodeSize ); + delete[] pTable; +} + +// ------------------------------------------------------------------------ + +// --------------------- +// - exported function - +// --------------------- + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL ) +{ + return TIFFWriter().WriteTIFF( rGraphic, rStream, pFilterConfigItem ); +} + +#ifndef GCC +#endif + +// --------------- +// - Win16 trash - +// --------------- + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ + if ( nHeap ) + UnlockData( 0 ); + + hDLLInst = hDLL; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/etiff/exports.map b/filter/source/graphicfilter/etiff/exports.map new file mode 100644 index 000000000000..d4e28c44700c --- /dev/null +++ b/filter/source/graphicfilter/etiff/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicExport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/etiff/makefile.mk b/filter/source/graphicfilter/etiff/makefile.mk new file mode 100644 index 000000000000..a3f52199513d --- /dev/null +++ b/filter/source/graphicfilter/etiff/makefile.mk @@ -0,0 +1,65 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=etiff +DEPTARGET=vetiff + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/etiff.obj + +# ========================================================================== + +SHL1TARGET= eti$(DLLPOSTFIX) +SHL1IMPLIB= etiff +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) $(SVTOOLLIB) +SHL1LIBS= $(SLB)$/etiff.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/etiff.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/expm/expm.cxx b/filter/source/graphicfilter/expm/expm.cxx new file mode 100644 index 000000000000..cd05331e5ade --- /dev/null +++ b/filter/source/graphicfilter/expm/expm.cxx @@ -0,0 +1,302 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include + +//============================ XPMWriter ================================== + +class XPMWriter { + +private: + + SvStream* mpOStm; // Die auszugebende XPM-Datei + USHORT mpOStmOldModus; + + BOOL mbStatus; + BOOL mbTrans; + BitmapReadAccess* mpAcc; + ULONG mnWidth, mnHeight; // Bildausmass in Pixeln + USHORT mnColors; + + com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > xStatusIndicator; + + void ImplCallback( USHORT nPercent ); + BOOL ImplWriteHeader(); + void ImplWritePalette(); + void ImplWriteColor( USHORT ); + void ImplWriteBody(); + void ImplWriteNumber( sal_Int32 ); + void ImplWritePixel( ULONG ); + +public: + XPMWriter(); + ~XPMWriter(); + + BOOL WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigItem* pFilterConfigItem ); +}; + +//=================== Methoden von XPMWriter ============================== + +XPMWriter::XPMWriter() : + mbStatus ( TRUE ), + mbTrans ( FALSE ), + mpAcc ( NULL ) +{ +} + +// ------------------------------------------------------------------------ + +XPMWriter::~XPMWriter() +{ +} + +// ------------------------------------------------------------------------ + +void XPMWriter::ImplCallback( USHORT nPercent ) +{ + if ( xStatusIndicator.is() ) + { + if ( nPercent <= 100 ) + xStatusIndicator->setValue( nPercent ); + } +} + +// ------------------------------------------------------------------------ + +BOOL XPMWriter::WriteXPM( const Graphic& rGraphic, SvStream& rXPM, FilterConfigItem* pFilterConfigItem) +{ + Bitmap aBmp; + + mpOStm = &rXPM; + + if ( pFilterConfigItem ) + { + xStatusIndicator = pFilterConfigItem->GetStatusIndicator(); + if ( xStatusIndicator.is() ) + { + rtl::OUString aMsg; + xStatusIndicator->start( aMsg, 100 ); + } + } + + BitmapEx aBmpEx( rGraphic.GetBitmapEx() ); + aBmp = aBmpEx.GetBitmap(); + + if ( rGraphic.IsTransparent() ) // event. transparente Farbe erzeugen + { + mbTrans = TRUE; + if ( aBmp.GetBitCount() >= 8 ) // wenn noetig Bild auf 8 bit konvertieren + aBmp.Convert( BMP_CONVERSION_8BIT_TRANS ); + else + aBmp.Convert( BMP_CONVERSION_4BIT_TRANS ); + aBmp.Replace( aBmpEx.GetMask(), BMP_COL_TRANS ); + } + else + { + if ( aBmp.GetBitCount() > 8 ) // wenn noetig Bild auf 8 bit konvertieren + aBmp.Convert( BMP_CONVERSION_8BIT_COLORS ); + } + mpAcc = aBmp.AcquireReadAccess(); + if ( mpAcc ) + { + mnColors = mpAcc->GetPaletteEntryCount(); + mpOStmOldModus = mpOStm->GetNumberFormatInt(); + mpOStm->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + + if ( ImplWriteHeader() ) + { + ImplWritePalette(); + ImplWriteBody(); + *mpOStm << "\x22XPMENDEXT\x22\x0a};"; + } + aBmp.ReleaseAccess( mpAcc ); + } + else + mbStatus = FALSE; + + mpOStm->SetNumberFormatInt( mpOStmOldModus ); + + if ( xStatusIndicator.is() ) + xStatusIndicator->end(); + + return mbStatus; +} + +// ------------------------------------------------------------------------ + +BOOL XPMWriter::ImplWriteHeader() +{ + mnWidth = mpAcc->Width(); + mnHeight = mpAcc->Height(); + if ( mnWidth && mnHeight && mnColors ) + { + *mpOStm << "/* XPM */\x0astatic char * image[] = \x0a{\x0a\x22"; + ImplWriteNumber( mnWidth ); + *mpOStm << (BYTE)32; + ImplWriteNumber( mnHeight ); + *mpOStm << (BYTE)32; + ImplWriteNumber( mnColors ); + *mpOStm << (BYTE)32; + ImplWriteNumber( ( mnColors > 26 ) ? 2 : 1 ); + *mpOStm << "\x22,\x0a"; + } + else mbStatus = FALSE; + return mbStatus; +} + +// ------------------------------------------------------------------------ + +void XPMWriter::ImplWritePalette() +{ + USHORT nTransIndex = 0xffff; + + if ( mbTrans ) + nTransIndex = mpAcc->GetBestMatchingColor( BMP_COL_TRANS ); + for ( USHORT i = 0; i < mnColors; i++ ) + { + *mpOStm << "\x22"; + ImplWritePixel( i ); + *mpOStm << (BYTE)32; + if ( nTransIndex != i ) + { + ImplWriteColor( i ); + *mpOStm << "\x22,\x0a"; + } + else + *mpOStm << "c none\x22,\x0a"; + } +} + +// ------------------------------------------------------------------------ + +void XPMWriter::ImplWriteBody() +{ + for ( ULONG y = 0; y < mnHeight; y++ ) + { + ImplCallback( (USHORT)( ( 100 * y ) / mnHeight ) ); // processing output in percent + *mpOStm << (BYTE)0x22; + for ( ULONG x = 0; x < mnWidth; x++ ) + { + ImplWritePixel( (BYTE)(mpAcc->GetPixel( y, x ) ) ); + } + *mpOStm << "\x22,\x0a"; + } +} + +// ------------------------------------------------------------------------ +// eine Dezimalzahl im ASCII format wird in den Stream geschrieben + +void XPMWriter::ImplWriteNumber( sal_Int32 nNumber ) +{ + const ByteString aNum( ByteString::CreateFromInt32( nNumber ) ); + + for( sal_Int16 n = 0UL, nLen = aNum.Len(); n < nLen; n++ ) + *mpOStm << aNum.GetChar( n ); + +} + +// ------------------------------------------------------------------------ + +void XPMWriter::ImplWritePixel( ULONG nCol ) +{ + if ( mnColors > 26 ) + { + BYTE nDiff = (BYTE) ( nCol / 26 ); + *mpOStm << (BYTE)( nDiff + 'A' ); + *mpOStm << (BYTE)( nCol - ( nDiff*26 ) + 'A' ); + } + else + *mpOStm << (BYTE)( nCol + 'A' ); +} + +// ------------------------------------------------------------------------ +// ein Farbwert wird im Hexadezimalzahlformat in den Stream geschrieben +void XPMWriter::ImplWriteColor( USHORT nNumber ) +{ + ULONG nTmp; + BYTE j; + + *mpOStm << "c #"; // # zeigt einen folgenden Hexwert an + const BitmapColor& rColor = mpAcc->GetPaletteColor( nNumber ); + nTmp = ( rColor.GetRed() << 16 ) | ( rColor.GetGreen() << 8 ) | rColor.GetBlue(); + for ( signed char i = 20; i >= 0 ; i-=4 ) + { + if ( ( j = (BYTE)( nTmp >> i ) & 0xf ) > 9 ) + j += 'A' - 10; + else + j += '0'; + *mpOStm << j; + } +} + +// ------------------------------------------------------------------------ + +// --------------------- +// - exported function - +// --------------------- + +extern "C" BOOL __LOADONCALLAPI GraphicExport( SvStream& rStream, Graphic& rGraphic, FilterConfigItem* pFilterConfigItem, BOOL ) +{ + XPMWriter aXPMWriter; + + return aXPMWriter.WriteXPM( rGraphic, rStream, pFilterConfigItem ); +} + +#ifndef GCC +#endif + +// --------------- +// - Win16 trash - +// --------------- + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ + if ( nHeap ) + UnlockData( 0 ); + + hDLLInst = hDLL; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/expm/exports.map b/filter/source/graphicfilter/expm/exports.map new file mode 100644 index 000000000000..d4e28c44700c --- /dev/null +++ b/filter/source/graphicfilter/expm/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicExport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/expm/makefile.mk b/filter/source/graphicfilter/expm/makefile.mk new file mode 100644 index 000000000000..743149712620 --- /dev/null +++ b/filter/source/graphicfilter/expm/makefile.mk @@ -0,0 +1,66 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=expm +DEPTARGET=vexpm + + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/expm.obj + +# ========================================================================== + +SHL1TARGET= exp$(DLLPOSTFIX) +SHL1IMPLIB= expm +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) $(SVTOOLLIB) +SHL1LIBS= $(SLB)$/expm.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/expm.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx new file mode 100644 index 000000000000..ccc9eb8c93d9 --- /dev/null +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -0,0 +1,1134 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//#include + +#include "main.hxx" +#include "outact.hxx" + +using namespace ::com::sun::star; + +// --------------------------------------------------------------- +// --------------------------------------------------------------- +// --------------------------------------------------------------- +// --------------------------------------------------------------- + +CGMImpressOutAct::CGMImpressOutAct( CGM& rCGM, const uno::Reference< frame::XModel > & rModel ) : + CGMOutAct ( rCGM ), + nFinalTextCount ( 0 ) +{ + sal_Bool bStatRet = sal_False; + + if ( mpCGM->mbStatus ) + { + uno::Reference< drawing::XDrawPagesSupplier > aDrawPageSup( rModel, uno::UNO_QUERY ); + if( aDrawPageSup.is() ) + { + maXDrawPages = aDrawPageSup->getDrawPages(); + if ( maXDrawPages.is() ) + { + maXServiceManagerSC = utl::getProcessServiceFactory(); + if ( maXServiceManagerSC.is() ) + { + uno::Any aAny( rModel->queryInterface( ::getCppuType((const uno::Reference< lang::XMultiServiceFactory >*)0) )); + if( aAny >>= maXMultiServiceFactory ) + { + maXDrawPage = *(uno::Reference< drawing::XDrawPage > *)maXDrawPages->getByIndex( 0 ).getValue(); + if ( ImplInitPage() ) + bStatRet = sal_True; + } + } + } + } + mpCGM->mbStatus = bStatRet; + } +}; + +// --------------------------------------------------------------- + +sal_Bool CGMImpressOutAct::ImplInitPage() +{ + sal_Bool bStatRet = sal_False; + if( maXDrawPage.is() ) + { + maXShapes = uno::Reference< drawing::XShapes >( maXDrawPage, uno::UNO_QUERY ); + if ( maXShapes.is() ) + { + bStatRet = sal_True; + } + } + return bStatRet; +} + +// --------------------------------------------------------------- + +sal_Bool CGMImpressOutAct::ImplCreateShape( const ::rtl::OUString& rType ) +{ + uno::Reference< uno::XInterface > xNewShape( maXMultiServiceFactory->createInstance( rType ) ); + maXShape = uno::Reference< drawing::XShape >( xNewShape, uno::UNO_QUERY ); + maXPropSet = uno::Reference< beans::XPropertySet >( xNewShape, uno::UNO_QUERY ); + if ( maXShape.is() && maXPropSet.is() ) + { + maXShapes->add( maXShape ); + return sal_True; + } + return sal_False; +} + +// --------------------------------------------------------------- + +void CGMImpressOutAct::ImplSetOrientation( FloatPoint& rRefPoint, double& rOrientation ) +{ + uno::Any aAny; + aAny <<= (sal_Int32)rRefPoint.X; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointX"), aAny ); + aAny <<= (sal_Int32)rRefPoint.Y; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointY"), aAny ); + aAny <<= (sal_Int32)( rOrientation * 100.0 ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotateAngle"), aAny ); +} + +// --------------------------------------------------------------- + +void CGMImpressOutAct::ImplSetLineBundle() +{ + uno::Any aAny; + drawing::LineStyle eLS; + + sal_uInt32 nLineColor; + LineType eLineType; + double fLineWidth; + + if ( mpCGM->pElement->nAspectSourceFlags & ASF_LINECOLOR ) + nLineColor = mpCGM->pElement->pLineBundle->GetColor(); + else + nLineColor = mpCGM->pElement->aLineBundle.GetColor(); + if ( mpCGM->pElement->nAspectSourceFlags & ASF_LINETYPE ) + eLineType = mpCGM->pElement->pLineBundle->eLineType; + else + eLineType = mpCGM->pElement->aLineBundle.eLineType; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_LINEWIDTH ) + fLineWidth = mpCGM->pElement->pLineBundle->nLineWidth; + else + fLineWidth = mpCGM->pElement->aLineBundle.nLineWidth; + + aAny <<= (sal_Int32)nLineColor; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny ); + + aAny <<= (sal_Int32)fLineWidth; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny ); + + switch( eLineType ) + { + case LT_NONE : + eLS = drawing::LineStyle_NONE; + break; + case LT_DASH : + case LT_DOT : + case LT_DASHDOT : + case LT_DOTDOTSPACE : + case LT_LONGDASH : + case LT_DASHDASHDOT : + eLS = drawing::LineStyle_DASH; + break; + case LT_SOLID : + default: + eLS = drawing::LineStyle_SOLID; + break; + } + aAny <<= eLS; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny ); + if ( eLS == drawing::LineStyle_DASH ) + { + drawing::LineDash aLineDash( drawing::DashStyle_RECTRELATIVE, 1, 50, 3, 33, 100 ); + aAny <<= aLineDash; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineDash"), aAny ); + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::ImplSetFillBundle() +{ + + uno::Any aAny; + drawing::LineStyle eLS; + drawing::FillStyle eFS; + + sal_uInt32 nEdgeColor = 0; + EdgeType eEdgeType; + double fEdgeWidth = 0; + + sal_uInt32 nFillColor; + FillInteriorStyle eFillStyle; + long nPatternIndex; + sal_uInt32 nHatchIndex; + + if ( mpCGM->pElement->eEdgeVisibility == EV_ON ) + { + if ( mpCGM->pElement->nAspectSourceFlags & ASF_EDGETYPE ) + eEdgeType = mpCGM->pElement->pEdgeBundle->eEdgeType; + else + eEdgeType = mpCGM->pElement->aEdgeBundle.eEdgeType; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_EDGEWIDTH ) + fEdgeWidth = mpCGM->pElement->pEdgeBundle->nEdgeWidth; + else + fEdgeWidth = mpCGM->pElement->aEdgeBundle.nEdgeWidth; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_EDGECOLOR ) + nEdgeColor = mpCGM->pElement->pEdgeBundle->GetColor(); + else + nEdgeColor = mpCGM->pElement->aEdgeBundle.GetColor(); + } + else + eEdgeType = ET_NONE; + + if ( mpCGM->pElement->nAspectSourceFlags & ASF_FILLINTERIORSTYLE ) + eFillStyle = mpCGM->pElement->pFillBundle->eFillInteriorStyle; + else + eFillStyle = mpCGM->pElement->aFillBundle.eFillInteriorStyle; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_FILLCOLOR ) + nFillColor = mpCGM->pElement->pFillBundle->GetColor(); + else + nFillColor = mpCGM->pElement->aFillBundle.GetColor(); + if ( mpCGM->pElement->nAspectSourceFlags & ASF_HATCHINDEX ) + nHatchIndex = (sal_uInt32)mpCGM->pElement->pFillBundle->nFillHatchIndex; + else + nHatchIndex = (sal_uInt32)mpCGM->pElement->aFillBundle.nFillHatchIndex; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_PATTERNINDEX ) + nPatternIndex = mpCGM->pElement->pFillBundle->nFillPatternIndex; + else + nPatternIndex = mpCGM->pElement->aFillBundle.nFillPatternIndex; + + aAny <<= (sal_Int32)nFillColor; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillColor"), aAny ); + + switch ( eFillStyle ) + { + case FIS_HATCH : + { + if ( nHatchIndex == 0 ) + eFS = drawing::FillStyle_NONE; + else + eFS = drawing::FillStyle_HATCH; + } + break; + case FIS_PATTERN : + case FIS_SOLID : + { + eFS = drawing::FillStyle_SOLID; + } + break; + + case FIS_GEOPATTERN : + { + if ( mpCGM->pElement->eTransparency == T_ON ) + nFillColor = mpCGM->pElement->nAuxiliaryColor; + eFS = drawing::FillStyle_NONE; + } + break; + + case FIS_INTERPOLATED : + case FIS_GRADIENT : + { + eFS = drawing::FillStyle_GRADIENT; + } + break; + + case FIS_HOLLOW : + case FIS_EMPTY : + default: + { + eFS = drawing::FillStyle_NONE; + } + } + + if ( mpCGM->mnAct4PostReset & ACT4_GRADIENT_ACTION ) + eFS = drawing::FillStyle_GRADIENT; + + if ( eFS == drawing::FillStyle_GRADIENT ) + { + aAny <<= *mpGradient; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillGradient"), aAny ); + } + aAny <<= eFS; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), aAny ); + + eLS = drawing::LineStyle_NONE; + if ( eFillStyle == FIS_HOLLOW ) + { + eLS = drawing::LineStyle_SOLID; + aAny <<= (sal_Int32)nFillColor; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny ); + aAny <<= (sal_Int32)0; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny ); + } + else if ( eEdgeType != ET_NONE ) + { + aAny <<= (sal_Int32)nEdgeColor; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineColor"), aAny ); + + aAny <<= (sal_Int32)fEdgeWidth; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineWidth"), aAny ); + + switch( eEdgeType ) + { + case ET_DASH : + case ET_DOT : + case ET_DASHDOT : + case ET_DASHDOTDOT : + case ET_DOTDOTSPACE : + case ET_LONGDASH : + case ET_DASHDASHDOT : +// { +// eLS = LineStyle_DASH; +// aAny.setValue( &eLS, ::getCppuType((const drawing::LineStyle*)0) ); +// maXPropSet->setPropertyValue( L"LineStyle", aAny ); +// drawing::LineDash aLineDash( DashStyle_RECTRELATIVE, 1, 160, 1, 160, 190 ); +// aAny.setValue( &aLineDash, ::getCppuType((const drawing::LineDash*)0) ); +// maXPropSet->setPropertyValue( L"DashStyle", aAny ); +// } +// break; + default: // case ET_SOLID : + { + eLS = drawing::LineStyle_SOLID; + } + break; + } + } + + aAny <<= eLS; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("LineStyle"), aAny ); + + if ( eFS == drawing::FillStyle_HATCH ) + { + drawing::Hatch aHatch; + + if ( mpCGM->pElement->nAspectSourceFlags & ASF_LINECOLOR ) + aHatch.Color = nFillColor; + else + aHatch.Color = nFillColor; + HatchEntry* pHatchEntry = (HatchEntry*)mpCGM->pElement->aHatchTable.Get( nHatchIndex ); + if ( pHatchEntry ) + { + switch ( pHatchEntry->HatchStyle ) + { + case 0 : aHatch.Style = drawing::HatchStyle_SINGLE; break; + case 1 : aHatch.Style = drawing::HatchStyle_DOUBLE; break; + case 2 : aHatch.Style = drawing::HatchStyle_TRIPLE; break; + } + aHatch.Distance = pHatchEntry->HatchDistance; + aHatch.Angle = pHatchEntry->HatchAngle; + } + else + { + aHatch.Style = drawing::HatchStyle_TRIPLE; + aHatch.Distance = 10 * ( nHatchIndex & 0x1f ) | 100; + aHatch.Angle = 15 * ( ( nHatchIndex & 0x1f ) - 5 ); + } + aAny <<= aHatch; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillHatch"), aAny ); + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XPropertySet > & rProperty ) +{ + uno::Any aAny; + TextPrecision eTextPrecision; + sal_uInt32 nTextFontIndex; + sal_uInt32 nTextColor; + double fCharacterExpansion; + double fCharacterSpacing; + + if ( mpCGM->pElement->nAspectSourceFlags & ASF_TEXTFONTINDEX ) + nTextFontIndex = mpCGM->pElement->pTextBundle->nTextFontIndex; + else + nTextFontIndex = mpCGM->pElement->aTextBundle.nTextFontIndex; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_TEXTPRECISION ) + eTextPrecision = mpCGM->pElement->pTextBundle->eTextPrecision; + else + eTextPrecision = mpCGM->pElement->aTextBundle.eTextPrecision; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_CHARACTEREXPANSION ) + fCharacterExpansion = mpCGM->pElement->pTextBundle->nCharacterExpansion; + else + fCharacterExpansion = mpCGM->pElement->aTextBundle.nCharacterExpansion; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_CHARACTERSPACING ) + fCharacterSpacing = mpCGM->pElement->pTextBundle->nCharacterSpacing; + else + fCharacterSpacing = mpCGM->pElement->aTextBundle.nCharacterSpacing; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_TEXTCOLOR ) + nTextColor = mpCGM->pElement->pTextBundle->GetColor(); + else + nTextColor = mpCGM->pElement->aTextBundle.GetColor(); + + aAny <<= (sal_Int32)nTextColor; + rProperty->setPropertyValue( rtl::OUString::createFromAscii("CharColor"), aAny ); + + sal_uInt32 nFontType = 0; + awt::FontDescriptor aFontDescriptor; + FontEntry* pFontEntry = mpCGM->pElement->aFontList.GetFontEntry( nTextFontIndex ); + if ( pFontEntry ) + { + nFontType = pFontEntry->nFontType; + aFontDescriptor.Name = String::CreateFromAscii( (char*)pFontEntry->pFontName ); + } + aFontDescriptor.Height = ( sal_Int16 )( ( mpCGM->pElement->nCharacterHeight * (double)1.50 ) ); + if ( nFontType & 1 ) + aFontDescriptor.Slant = awt::FontSlant_ITALIC; + if ( nFontType & 2 ) + aFontDescriptor.Weight = awt::FontWeight::BOLD; + else + aFontDescriptor.Weight = awt::FontWeight::NORMAL; + + if ( mpCGM->pElement->eUnderlineMode != UM_OFF ) + { + aFontDescriptor.Underline = awt::FontUnderline::SINGLE; + } + aAny <<= aFontDescriptor; + rProperty->setPropertyValue( rtl::OUString::createFromAscii("FontDescriptor"), aAny ); +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::InsertPage() +{ + if ( mnCurrentPage ) // eine seite ist immer vorhanden, deshalb wird die erste Seite ausgelassen + { + uno::Reference< drawing::XDrawPage > xPage( maXDrawPages->insertNewByIndex( 0xffff ), uno::UNO_QUERY ); + maXDrawPage = xPage; + if ( ImplInitPage() == sal_False ) + mpCGM->mbStatus = sal_False; + } + mnCurrentPage++; +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::BeginGroup() +{ + if ( mnGroupLevel < CGM_OUTACT_MAX_GROUP_LEVEL ) + { + mpGroupLevel[ mnGroupLevel ] = maXShapes->getCount(); + } + mnGroupLevel++; + mnGroupActCount = mpCGM->mnActCount; +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::EndGroup() +{ + if ( mnGroupLevel ) // preserve overflow + mnGroupLevel--; + if ( mnGroupLevel < CGM_OUTACT_MAX_GROUP_LEVEL ) + { + sal_uInt32 mnFirstIndex = mpGroupLevel[ mnGroupLevel ]; + if ( mnFirstIndex == 0xffffffff ) + mnFirstIndex = 0; + sal_uInt32 mnCurrentCount = maXShapes->getCount(); + if ( ( mnCurrentCount - mnFirstIndex ) > 1 ) + { + uno::Reference< drawing::XShapeGrouper > aXShapeGrouper; + uno::Any aAny( maXDrawPage->queryInterface( ::getCppuType(((const uno::Reference< drawing::XShapeGrouper >*)0) ))); + if( aAny >>= aXShapeGrouper ) + { + uno::Reference< drawing::XShapes > aXShapes; +// if ( maXServiceManagerSC->createInstance( L"stardiv.one.drawing.ShapeCollection" )->queryInterface( ::getCppuType((const Reference< drawing::XShapes >*)0), aXShapes ) ) + + uno::Reference< drawing::XShape > aXShapeCollection( maXServiceManagerSC->createInstance( rtl::OUString::createFromAscii("com.sun.star.drawing.ShapeCollection") ), uno::UNO_QUERY ); + if ( aXShapeCollection.is() ) + { + aXShapes = uno::Reference< drawing::XShapes >( aXShapeCollection, uno::UNO_QUERY ); + if( aXShapes.is() ) + { + for ( sal_uInt32 i = mnFirstIndex; i < mnCurrentCount; i++ ) + { + uno::Reference< drawing::XShape > aXShape = *(uno::Reference< drawing::XShape > *)maXShapes->getByIndex( i ).getValue(); + if (aXShape.is() ) + { + aXShapes->add( aXShape ); + } + } + } + } + uno::Reference< drawing::XShapeGroup > aXShapeGroup = aXShapeGrouper->group( aXShapes ); + } + } + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::EndGrouping() +{ + while ( mnGroupLevel ) + { + EndGroup(); + } +} + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawRectangle( FloatRect& rFloatRect ) +{ + if ( mnGroupActCount != ( mpCGM->mnActCount - 1 ) ) // POWERPOINT HACK !!! + { + if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.RectangleShape") ) ) + { + awt::Size aSize( (long)(rFloatRect.Right - rFloatRect.Left ), (long)(rFloatRect.Bottom-rFloatRect.Top ) ); + maXShape->setSize( aSize ); + maXShape->setPosition( awt::Point( (long)rFloatRect.Left, (long)rFloatRect.Top ) ); + ImplSetFillBundle(); + } + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawEllipse( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation ) +{ + if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.EllipseShape") ) ) + { + drawing::CircleKind eCircleKind = drawing::CircleKind_FULL; + uno::Any aAny( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleKind"), aAny ); + + long nXSize = (long)( rSize.X * 2.0 ); // Merkwuerdigkes Verhalten bei einer awt::Size von 0 + long nYSize = (long)( rSize.Y * 2.0 ); + if ( nXSize < 1 ) + nXSize = 1; + if ( nYSize < 1 ) + nYSize = 1; + maXShape->setSize( awt::Size( nXSize, nYSize ) ); + maXShape->setPosition( awt::Point( (long)( rCenter.X - rSize.X ), (long)( rCenter.Y - rSize.Y ) ) ); + + if ( rOrientation != 0 ) + { + ImplSetOrientation( rCenter, rOrientation ); + } + ImplSetFillBundle(); + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawEllipticalArc( FloatPoint& rCenter, FloatPoint& rSize, double& rOrientation, + sal_uInt32 nType, double& fStartAngle, double& fEndAngle ) +{ + if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.EllipseShape") ) ) + { + uno::Any aAny; + drawing::CircleKind eCircleKind; + + + long nXSize = (long)( rSize.X * 2.0 ); // Merkwuerdigkes Verhalten bei einer awt::Size von 0 + long nYSize = (long)( rSize.Y * 2.0 ); + if ( nXSize < 1 ) + nXSize = 1; + if ( nYSize < 1 ) + nYSize = 1; + + maXShape->setSize( awt::Size ( nXSize, nYSize ) ); + + if ( rOrientation != 0 ) + { + fStartAngle += rOrientation; + if ( fStartAngle >= 360 ) + fStartAngle -= 360; + fEndAngle += rOrientation; + if ( fEndAngle >= 360 ) + fEndAngle -= 360; + } + switch( nType ) + { + case 0 : eCircleKind = drawing::CircleKind_SECTION; break; + case 1 : eCircleKind = drawing::CircleKind_CUT; break; + case 2 : eCircleKind = drawing::CircleKind_ARC; break; + default : eCircleKind = drawing::CircleKind_FULL; break; + } + if ( (long)fStartAngle == (long)fEndAngle ) + { + eCircleKind = drawing::CircleKind_FULL; + aAny.setValue( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) ); + } + else + { + aAny.setValue( &eCircleKind, ::getCppuType((const drawing::CircleKind*)0) ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleKind"), aAny ); + aAny <<= (sal_Int32)( (long)( fStartAngle * 100 ) ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleStartAngle"), aAny ); + aAny <<= (sal_Int32)( (long)( fEndAngle * 100 ) ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("CircleEndAngle"), aAny ); + } + maXShape->setPosition( awt::Point( (long)( rCenter.X - rSize.X ), (long)( rCenter.Y - rSize.Y ) ) ); + if ( rOrientation != 0 ) + { + ImplSetOrientation( rCenter, rOrientation ); + } + if ( eCircleKind == drawing::CircleKind_ARC ) + { + ImplSetLineBundle(); + } + else + { + ImplSetFillBundle(); + if ( nType == 2 ) + { + ImplSetLineBundle(); + drawing::FillStyle eFillStyle = drawing::FillStyle_NONE; + aAny.setValue( &eFillStyle, ::getCppuType((const drawing::FillStyle*)0) ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("FillStyle"), aAny ); + } + } + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc ) +{ + if ( pBmpDesc->mbStatus && pBmpDesc->mpBitmap ) + { + FloatPoint aOrigin = pBmpDesc->mnOrigin; + double fdx = pBmpDesc->mndx; + double fdy = pBmpDesc->mndy; + + sal_uInt32 nMirr = BMP_MIRROR_NONE; + if ( pBmpDesc->mbVMirror ) + nMirr |= BMP_MIRROR_VERT; + if ( pBmpDesc->mbHMirror ) + nMirr |= BMP_MIRROR_HORZ; + if ( nMirr != BMP_MIRROR_NONE ) + pBmpDesc->mpBitmap->Mirror( nMirr ); + + mpCGM->ImplMapPoint( aOrigin ); + mpCGM->ImplMapX( fdx ); + mpCGM->ImplMapY( fdy ); + + if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.GraphicObjectShape") ) ) + { + maXShape->setSize( awt::Size( (long)fdx, (long)fdy ) ); + maXShape->setPosition( awt::Point( (long)aOrigin.X, (long)aOrigin.Y ) ); + + if ( pBmpDesc->mnOrientation != 0 ) + { + ImplSetOrientation( aOrigin, pBmpDesc->mnOrientation ); + } + + uno::Reference< awt::XBitmap > xBitmap( VCLUnoHelper::CreateBitmap( BitmapEx( *( pBmpDesc->mpBitmap ) ) ) ); + uno::Any aAny; + aAny <<= xBitmap; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("GraphicObjectFillBitmap"), aAny ); + + } + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawPolygon( Polygon& rPoly ) +{ + sal_uInt16 nPoints = rPoly.GetSize(); + + if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.PolyPolygonShape") ) ) + { + drawing::PointSequenceSequence aRetval; + + // Polygone innerhalb vrobereiten + aRetval.realloc( 1 ); + + // Zeiger auf aeussere Arrays holen + drawing::PointSequence* pOuterSequence = aRetval.getArray(); + + // Platz in Arrays schaffen + pOuterSequence->realloc((sal_Int32)nPoints); + + // Pointer auf arrays holen + awt::Point* pInnerSequence = pOuterSequence->getArray(); + + for( sal_uInt16 n = 0; n < nPoints; n++ ) + *pInnerSequence++ = awt::Point( rPoly[ n ].X(), rPoly[n].Y() ); + + uno::Any aParam; + aParam <<= aRetval; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam ); + ImplSetFillBundle(); + } +}; + + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly ) +{ + sal_uInt16 nPoints = rPoly.GetSize(); + + if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.PolyLineShape") ) ) + { + drawing::PointSequenceSequence aRetval; + + // Polygone innerhalb vrobereiten + aRetval.realloc( 1 ); + + // Zeiger auf aeussere Arrays holen + drawing::PointSequence* pOuterSequence = aRetval.getArray(); + + // Platz in Arrays schaffen + pOuterSequence->realloc((sal_Int32)nPoints); + + // Pointer auf arrays holen + awt::Point* pInnerSequence = pOuterSequence->getArray(); + + for( sal_uInt16 n = 0; n < nPoints; n++ ) + *pInnerSequence++ = awt::Point( rPoly[ n ].X(), rPoly[n].Y() ); + + uno::Any aParam; + aParam <<= aRetval; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygon"), aParam ); + ImplSetLineBundle(); + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon ) +{ + USHORT nPoints = rPolygon.GetSize(); + if ( ( nPoints > 1 ) && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.OpenBezierShape") ) ) + { + drawing::PolyPolygonBezierCoords aRetval; + + aRetval.Coordinates.realloc( 1 ); + aRetval.Flags.realloc( 1 ); + + // Zeiger auf aeussere Arrays holen + drawing::PointSequence* pOuterSequence = aRetval.Coordinates.getArray(); + drawing::FlagSequence* pOuterFlags = aRetval.Flags.getArray(); + + // Platz in Arrays schaffen + pOuterSequence->realloc( nPoints ); + pOuterFlags->realloc( nPoints ); + + awt::Point* pInnerSequence = pOuterSequence->getArray(); + drawing::PolygonFlags* pInnerFlags = pOuterFlags->getArray(); + + for( USHORT i = 0; i < nPoints; i++ ) + { + *pInnerSequence++ = awt::Point( rPolygon[ i ].X(), rPolygon[ i ].Y() ); + *pInnerFlags++ = (drawing::PolygonFlags)rPolygon.GetFlags( i ); + } + uno::Any aParam; + aParam <<= aRetval; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygonBezier"), aParam ); + ImplSetLineBundle(); + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawPolyPolygon( PolyPolygon& rPolyPolygon ) +{ + sal_uInt32 nNumPolys = rPolyPolygon.Count(); + if ( nNumPolys && ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.ClosedBezierShape") ) ) + { + drawing::PolyPolygonBezierCoords aRetval; + + // Polygone innerhalb vrobereiten + aRetval.Coordinates.realloc((sal_Int32)nNumPolys); + aRetval.Flags.realloc((sal_Int32)nNumPolys); + + // Zeiger auf aeussere Arrays holen + drawing::PointSequence* pOuterSequence = aRetval.Coordinates.getArray(); + drawing::FlagSequence* pOuterFlags = aRetval.Flags.getArray(); + + for( sal_uInt16 a = 0; a < nNumPolys; a++ ) + { + Polygon aPolygon( rPolyPolygon.GetObject( a ) ); + sal_uInt32 nNumPoints = aPolygon.GetSize(); + + // Platz in Arrays schaffen + pOuterSequence->realloc((sal_Int32)nNumPoints); + pOuterFlags->realloc((sal_Int32)nNumPoints); + + // Pointer auf arrays holen + awt::Point* pInnerSequence = pOuterSequence->getArray(); + drawing::PolygonFlags* pInnerFlags = pOuterFlags->getArray(); + + for( sal_uInt16 b = 0; b < nNumPoints; b++ ) + { + *pInnerSequence++ = awt::Point( aPolygon.GetPoint( b ).X(), aPolygon.GetPoint( b ).Y() ) ; + *pInnerFlags++ = (drawing::PolygonFlags)aPolygon.GetFlags( b ); + } + pOuterSequence++; + pOuterFlags++; + } + uno::Any aParam; + aParam <<= aRetval; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("PolyPolygonBezier"), aParam); + ImplSetFillBundle(); + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawText( awt::Point& rTextPos, awt::Size& rTextSize, char* pString, sal_uInt32 /*nSize*/, FinalFlag eFlag ) +{ + if ( ImplCreateShape( rtl::OUString::createFromAscii("com.sun.star.drawing.TextShape") ) ) + { + uno::Any aAny; + long nWidth = rTextSize.Width; + long nHeight = rTextSize.Height; + + awt::Point aTextPos( rTextPos ); + switch ( mpCGM->pElement->eTextAlignmentV ) + { + case TAV_HALF : + { + aTextPos.Y -= static_cast( ( mpCGM->pElement->nCharacterHeight * 1.5 ) / 2 ); + } + break; + + case TAV_BASE : + case TAV_BOTTOM : + case TAV_NORMAL : + aTextPos.Y -= static_cast( mpCGM->pElement->nCharacterHeight * 1.5 ); + case TAV_TOP : + break; + case TAV_CAP: + case TAV_CONT: + break; // -Wall these two were not here. + } + + if ( nWidth < 0 ) + { + nWidth = -nWidth; + } + else if ( nWidth == 0 ) + { + nWidth = -1; + } + if ( nHeight < 0 ) + { + nHeight = -nHeight; + } + else if ( nHeight == 0 ) + { + nHeight = -1; + } + maXShape->setPosition( aTextPos ); + maXShape->setSize( awt::Size( nWidth, nHeight ) ); + double nX = mpCGM->pElement->nCharacterOrientation[ 2 ]; + double nY = mpCGM->pElement->nCharacterOrientation[ 3 ]; + double nOrientation = acos( nX / sqrt( nX * nX + nY * nY ) ) * 57.29577951308; + if ( nY < 0 ) + nOrientation = 360 - nOrientation; + + if ( nOrientation ) + { + aAny <<= (sal_Int32)( aTextPos.X ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointX"), aAny ); + aAny <<= (sal_Int32)( aTextPos.Y + nHeight ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotationPointY"), aAny ); + aAny <<= (sal_Int32)( (sal_Int32)( nOrientation * 100 ) ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("RotateAngle"), aAny ); + } + if ( nWidth == -1 ) + { + sal_Bool bTrue( sal_True ); + aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0 )); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextAutoGrowWidth"), aAny ); + + drawing::TextAdjust eTextAdjust; + switch ( mpCGM->pElement->eTextAlignmentH ) + { + case TAH_RIGHT : + eTextAdjust = drawing::TextAdjust_RIGHT; + break; + case TAH_LEFT : + case TAH_CONT : + case TAH_NORMAL : + eTextAdjust = drawing::TextAdjust_LEFT; + break; + case TAH_CENTER : + eTextAdjust = drawing::TextAdjust_CENTER; + break; + } + aAny <<= eTextAdjust; + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextHorizontalAdjust"), aAny ); + } + if ( nHeight == -1 ) + { + sal_Bool bTrue = sal_True; + aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0) ); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextAutoGrowHeight"), aAny ); + } + uno::Reference< text::XText > xText; + uno::Any aFirstQuery( maXShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0) )); + if( aFirstQuery >>= xText ) + { + String aStr( String::CreateFromAscii( pString ) ); + + uno::Reference< text::XTextCursor > aXTextCursor( xText->createTextCursor() ); + { + aXTextCursor->gotoEnd( sal_False ); + uno::Reference< text::XTextRange > aCursorText; + uno::Any aSecondQuery( aXTextCursor->queryInterface( ::getCppuType((const uno::Reference< text::XTextRange >*)0) )); + if ( aSecondQuery >>= aCursorText ) + { + uno::Reference< beans::XPropertySet > aCursorPropSet; + + uno::Any aQuery( aCursorText->queryInterface( ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) )); + if( aQuery >>= aCursorPropSet ) + { + if ( nWidth != -1 ) // paragraph adjusting in a valid textbox ? + { + switch ( mpCGM->pElement->eTextAlignmentH ) + { + case TAH_RIGHT : + aAny <<= (sal_Int16)style::HorizontalAlignment_RIGHT; + break; + case TAH_LEFT : + case TAH_CONT : + case TAH_NORMAL : + aAny <<= (sal_Int16)style::HorizontalAlignment_LEFT; + break; + case TAH_CENTER : + aAny <<= (sal_Int16)style::HorizontalAlignment_CENTER; + break; + } + aCursorPropSet->setPropertyValue( rtl::OUString::createFromAscii("ParaAdjust"), aAny ); + } + if ( nWidth > 0 && nHeight > 0 ) // restricted text + { + sal_Bool bTrue = sal_True; + aAny.setValue( &bTrue, ::getCppuType((const sal_Bool*)0)); + maXPropSet->setPropertyValue( rtl::OUString::createFromAscii("TextFitToSize"), aAny ); + } + aCursorText->setString( aStr ); + aXTextCursor->gotoEnd( sal_True ); + ImplSetTextBundle( aCursorPropSet ); + } + } + } + } + if ( eFlag == FF_NOT_FINAL ) + { + nFinalTextCount = maXShapes->getCount(); + } + } +}; + +// --------------------------------------------------------------- + +void CGMImpressOutAct::AppendText( char* pString, sal_uInt32 /*nSize*/, FinalFlag /*eFlag*/ ) +{ + if ( nFinalTextCount ) + { + uno::Reference< drawing::XShape > aShape = *(uno::Reference< drawing::XShape > *)maXShapes->getByIndex( nFinalTextCount - 1 ).getValue(); + if ( aShape.is() ) + { + uno::Reference< text::XText > xText; + uno::Any aFirstQuery( aShape->queryInterface( ::getCppuType((const uno::Reference< text::XText >*)0)) ); + if( aFirstQuery >>= xText ) + { + String aStr( String::CreateFromAscii( pString ) ); + + uno::Reference< text::XTextCursor > aXTextCursor( xText->createTextCursor() ); + if ( aXTextCursor.is() ) + { + aXTextCursor->gotoEnd( sal_False ); + uno::Reference< text::XTextRange > aCursorText; + uno::Any aSecondQuery(aXTextCursor->queryInterface( ::getCppuType((const uno::Reference< text::XTextRange >*)0) )); + if ( aSecondQuery >>= aCursorText ) + { + uno::Reference< beans::XPropertySet > aPropSet; + uno::Any aQuery(aCursorText->queryInterface( ::getCppuType((const uno::Reference< beans::XPropertySet >*)0) )); + if( aQuery >>= aPropSet ) + { + aCursorText->setString( aStr ); + aXTextCursor->gotoEnd( sal_True ); + ImplSetTextBundle( aPropSet ); + } + } + } + } + } + } +} + +// --------------------------------------------------------------- +// nCount != 0 -> Append Text +sal_uInt32 CGMImpressOutAct::DrawText( TextEntry* /*pTextEntry*/, NodeFrameSet& /*rNodeFrameSet*/, sal_uInt32 /*nObjCount*/ ) +{ + +return 0; + +/* + uno::Reference< drawing::XShape > aShape; + + if ( nObjCount ) + { + aShape = (drawing::XShape*) maXShapes->getElementByIndex( nObjCount - 1 )->queryInterface( ::getCppuType((const Reference< drawing::XShape >*)0) ); + } + else + { + aShape = maXShapes->insertShape( maXShapeFactory->createShape( L"ShapeText", rNodeFrameSet.nSize ), rNodeFrameSet.nTopLeft ); + } + if ( aShape.is() ) + { + uno::Reference< text::XText > xText = (text::XText*)aShape->queryInterface( ::getCppuType((const Reference< text::XText >*)0) ); + if ( xText.is() ) + { + uno::Reference< text::XTextCursor > aXTextCursor = (text::XTextCursor*)xText->createTextCursor()->queryInterface( ::getCppuType((const Reference< text::XTextCursor >*)0) ); + if ( aXTextCursor.is() ) + { + uno::Any aAny; + sal_uInt32 nTextOfs = 0; + TextAttribute* pTAttr = pTextEntry->pAttribute; + do + { + if ( pTAttr->nTextAttribSize > 0.3 ) // is text readable + { + aXTextCursor->gotoEnd( sal_False ); + char nPushedChar = pTextEntry->pText[ nTextOfs + pTAttr->nTextAttribCount ]; + pTextEntry->pText[ nTextOfs + pTAttr->nTextAttribCount ] = 0; + UString aStr( StringToOUString( pTextEntry->pText + nTextOfs, CHARSET_SYSTEM ) ); + + uno::Reference< text::XText > aCursorText = (text::XText*)aXTextCursor->queryInterface( ::getCppuType((const Reference< text::XText >*)0) ); + if ( aCursorText.is() ) + { + uno::Reference< beans::XPropertySet > aPropSet = (beans::XPropertySet*)aCursorText->queryInterface( ::getCppuType((const Reference< beans::XPropertySet >*)0) ); + if ( aPropSet.is() ) + { + if ( pTextEntry->nRowOrLineNum ) + { + uno::Reference< XControlCharacterInsertable > aCRef = (XControlCharacterInsertable*)aXTextCursor->queryInterface( ::getCppuType((const Reference< XControlCharacterInsertable >*)0) ); + if ( aCRef.is() ) + { + aCRef->insertControlCharacter( TEXTCONTROLCHAR_PARAGRAPH_BREAK ); + } + } + aCursorText->setText( aStr ); + aXTextCursor->gotoEnd( sal_True ); + double nSize = mpCGM->mnOutdx; + if ( mpCGM->mnOutdx < mpCGM->mnOutdy ) + nSize = mpCGM->mnOutdy; + nSize = ( nSize * (double)pTAttr->nTextAttribSize * (double)1.5 ) / 100; + + aAny <<= (sal_Int32)( (sal_Int32)nSize ); + aPropSet->setPropertyValue( L"CharHeight", aAny ); + + sal_uInt32 nTextColor = pTAttr->nTextColorIndex; + if ( nTextColor == 0xff ) + { + nTextColor = ( pTAttr->nTextColorBlue << 16 ) + ( pTAttr->nTextColorGreen << 8 ) + pTAttr->nTextColorRed; + } + else + { + nTextColor = mpCGM->pElement->aColorTable[ nTextColor ]; + } + + sal_uInt32 nFontType = 0; + + if ( pTAttr->nTextFontType == 0xff ) + { + FontEntry* pFontEntry = mpCGM->pElement->aFontList.GetFontEntry( pTAttr->nTextFontFamily ); + if ( pFontEntry ) + { + nFontType = pFontEntry->nFontType; + if ( mpCGM->pElement->nAspectSourceFlags & ASF_TEXTCOLOR ) + nTextColor = mpCGM->pElement->pTextBundle->GetColor(); + else + nTextColor = mpCGM->pElement->aTextBundle.GetColor(); + } + FontItalic eFontItalic = ITALIC_NONE; + if ( nFontType & 1 ) + eFontItalic = ITALIC_NORMAL; + aAny.setValue( &eFontItalic, ::getCppuType((const FontItalic*)0) ); + aPropSet->setPropertyValue( L"CharPosture", aAny ); + } + aAny <<= (sal_Int32)( (sal_Int32)nTextColor ); + aPropSet->setPropertyValue( L"CharColor", aAny ); + + awt::FontWeight eFontWeight = WEIGHT_NORMAL; + if ( nFontType & 2 ) + eFontWeight = WEIGHT_BOLD; + aAny.setValue( &eFontWeight, ::getCppuType((const awt::FontWeight*)0) ); + aPropSet->setPropertyValue( L"CharWeight", aAny ); + + if ( pTAttr->nTextAttribBits & 0x4000 ) + { + awt::FontUnderline eUnderline = UNDERLINE_SINGLE; + aAny.setValue( &eUnderline, ::getCppuType((const awt::FontUnderline*)0) ); + aPropSet->setPropertyValue( L"CharUnderline", aAny ); + } + } + } + pTextEntry->pText[ nTextOfs + pTAttr->nTextAttribCount ] = nPushedChar; + } + nTextOfs += pTAttr->nTextAttribCount; + } + while ( ( ( pTAttr = pTAttr->pNextAttribute ) != NULL ) ); + } + } + } + return ( nObjCount ) ? nObjCount : maXShapes->getCount(); +*/ +} + +// --------------------------------------------------------------- + +void CGMImpressOutAct::DrawChart() +{ +} diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx new file mode 100644 index 000000000000..c971c87e54e3 --- /dev/null +++ b/filter/source/graphicfilter/icgm/bitmap.cxx @@ -0,0 +1,410 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "main.hxx" + +// --------------------------------------------------------------- + +CGMBitmap::CGMBitmap( CGM& rCGM ) : + mpCGM ( &rCGM ), + pCGMBitmapDescriptor ( new CGMBitmapDescriptor ) +{ + ImplGetBitmap( *pCGMBitmapDescriptor ); +}; + +// --------------------------------------------------------------- + +CGMBitmap::~CGMBitmap() +{ + delete pCGMBitmapDescriptor; +} + +// --------------------------------------------------------------- + +void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc ) +{ + rDesc.mbStatus = sal_True; + long nx, ny, nxC, nxCount, nyCount; + + if ( ImplGetDimensions( rDesc ) && rDesc.mpBuf ) + { + if ( ( rDesc.mpBitmap = new Bitmap( Size( rDesc.mnX, rDesc.mnY ), (sal_uInt16)rDesc.mnDstBitsPerPixel ) ) != NULL ) + { + if ( ( rDesc.mpAcc = rDesc.mpBitmap->AcquireWriteAccess() ) != NULL ) + { + + // the picture may either be read from left to right or right to left, from top to bottom ... + + nxCount = rDesc.mnX + 1; // +1 because we are using prefix decreasing + nyCount = rDesc.mnY + 1; + + switch ( rDesc.mnDstBitsPerPixel ) + { + case 1 : + { + if ( rDesc.mnLocalColorPrecision == 1 ) + ImplSetCurrentPalette( rDesc ); + else + { + rDesc.mpAcc->SetPaletteEntryCount( 2 ); + rDesc.mpAcc->SetPaletteColor( 0, BMCOL( mpCGM->pElement->nBackGroundColor ) ); + rDesc.mpAcc->SetPaletteColor( 1, + ( mpCGM->pElement->nAspectSourceFlags & ASF_FILLINTERIORSTYLE ) + ? BMCOL( mpCGM->pElement->pFillBundle->GetColor() ) + : BMCOL( mpCGM->pElement->aFillBundle.GetColor() ) ) ; + } + for ( ny = 0; --nyCount ; ny++, rDesc.mpBuf += rDesc.mnScanSize ) + { + nxC = nxCount; + for ( nx = 0; --nxC; nx++ ) + { // this is not fast, but a one bit/pixel format is rarely used + rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( (*( rDesc.mpBuf + ( nx >> 3 ) ) >> ( ( nx & 7 ) ^ 7 ) ) ) & 1 ); + } + } + } + break; + + case 2 : + { + ImplSetCurrentPalette( rDesc ); + for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) + { + nxC = nxCount; + for ( nx = 0; --nxC; nx++ ) + { // this is not fast, but a two bits/pixel format is rarely used + rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( (*( rDesc.mpBuf + ( nx >> 2 ) ) >> ( ( ( nx & 3 ) ^ 3 ) << 1 ) ) ) & 3 ); + } + } + } + break; + + case 4 : + { + ImplSetCurrentPalette( rDesc ); + for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) + { + nxC = nxCount; + sal_Int8 nDat; + sal_uInt8* pTemp = rDesc.mpBuf; + for ( nx = 0; --nxC; nx++ ) + { + nDat = *pTemp++; + rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( nDat >> 4 ) ); + if ( --nxC ) + { + nx ++; + rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( nDat & 15 ) ); + } + else + break; + } + } + } + break; + + case 8 : + { + ImplSetCurrentPalette( rDesc ); + for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) + { + sal_uInt8* pTemp = rDesc.mpBuf; + nxC = nxCount; + for ( nx = 0; --nxC; nx++ ) + { + rDesc.mpAcc->SetPixel( ny, nx, (sal_Int8)( *pTemp++ ) ); + } + } + } + break; + + case 24 : + { + { + BitmapColor aBitmapColor; + for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) + { + sal_uInt8* pTemp = rDesc.mpBuf; + nxC = nxCount; + for ( nx = 0; --nxC; nx++ ) + { + aBitmapColor.SetRed( (sal_Int8)*pTemp++ ); + aBitmapColor.SetGreen( (sal_Int8)*pTemp++ ); + aBitmapColor.SetBlue( (sal_Int8)*pTemp++ ); + rDesc.mpAcc->SetPixel( ny, nx, aBitmapColor ); + } + } + } + } + break; + }; + double nX = rDesc.mnR.X - rDesc.mnQ.X; + double nY = rDesc.mnR.Y - rDesc.mnQ.Y; + + rDesc.mndy = sqrt( nX * nX + nY * nY ); + + nX = rDesc.mnR.X - rDesc.mnP.X; + nY = rDesc.mnR.Y - rDesc.mnP.Y; + + rDesc.mndx = sqrt( nX * nX + nY * nY ); + + nX = rDesc.mnR.X - rDesc.mnP.X; + nY = rDesc.mnR.Y - rDesc.mnP.Y; + + rDesc.mnOrientation = acos( nX / sqrt( nX * nX + nY * nY ) ) * 57.29577951308; + if ( nY > 0 ) + rDesc.mnOrientation = 360 - rDesc.mnOrientation; + + nX = rDesc.mnQ.X - rDesc.mnR.X; + nY = rDesc.mnQ.Y - rDesc.mnR.Y; + + double fAngle = 0.01745329251994 * ( 360 - rDesc.mnOrientation ); + double fSin = sin(fAngle); + double fCos = cos(fAngle); + nX = fCos * nX + fSin * nY; + nY = -( fSin * nX - fCos * nY ); + + fAngle = acos( nX / sqrt( nX * nX + nY * nY ) ) * 57.29577951308; + if ( nY > 0 ) + fAngle = 360 - fAngle; + + if ( fAngle > 180 ) // wird das bild nach oben oder unten aufgebaut ? + { + rDesc.mnOrigin = rDesc.mnP; + } + else + { + rDesc.mbVMirror = sal_True; + rDesc.mnOrigin = rDesc.mnP; + rDesc.mnOrigin.X += rDesc.mnQ.X - rDesc.mnR.X; + rDesc.mnOrigin.Y += rDesc.mnQ.Y - rDesc.mnR.Y; + } + } + else + rDesc.mbStatus = sal_False; + } + else + rDesc.mbStatus = sal_False; + } + else + rDesc.mbStatus = sal_False; + + if ( rDesc.mpAcc ) + { + rDesc.mpBitmap->ReleaseAccess( rDesc.mpAcc ); + rDesc.mpAcc = NULL; + } + if ( rDesc.mbStatus == sal_False ) + { + if ( rDesc.mpBitmap ) + { + delete rDesc.mpBitmap; + rDesc.mpBitmap = NULL; + } + } +} + +// --------------------------------------------------------------- + +void CGMBitmap::ImplSetCurrentPalette( CGMBitmapDescriptor& rDesc ) +{ + sal_uInt16 nColors = sal::static_int_cast< sal_uInt16 >( + 1 << rDesc.mnDstBitsPerPixel); + rDesc.mpAcc->SetPaletteEntryCount( nColors ); + for ( sal_uInt16 i = 0; i < nColors; i++ ) + { + rDesc.mpAcc->SetPaletteColor( i, BMCOL( mpCGM->pElement->aLatestColorTable[ i ] ) ); + } +} + +// --------------------------------------------------------------- + +sal_Bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc ) +{ + mpCGM->ImplGetPoint( rDesc.mnP ); // parallelogram p < - > r + mpCGM->ImplGetPoint( rDesc.mnQ ); // | + mpCGM->ImplGetPoint( rDesc.mnR ); // q + sal_uInt32 nPrecision = mpCGM->pElement->nIntegerPrecision; + rDesc.mnX = mpCGM->ImplGetUI( nPrecision ); + rDesc.mnY = mpCGM->ImplGetUI( nPrecision ); + rDesc.mnLocalColorPrecision = mpCGM->ImplGetI( nPrecision ); + rDesc.mnScanSize = 0; + switch( rDesc.mnLocalColorPrecision ) + { + case 0x80000001 : // monochrome ( bit = 0->backgroundcolor ) + case 0 : // bit = 1->fillcolor + rDesc.mnDstBitsPerPixel = 1; + break; + case 1 : // 2 color indexed ( monochrome ) + case -1 : + rDesc.mnDstBitsPerPixel = 1; + break; + case 2 : // 4 color indexed + case -2 : + rDesc.mnDstBitsPerPixel = 2; + break; + case 4 : // 16 color indexed + case -4 : + rDesc.mnDstBitsPerPixel = 4; + break; + case 8 : // 256 color indexed + case -8 : + rDesc.mnDstBitsPerPixel = 8; + rDesc.mnScanSize = rDesc.mnX; + break; + case 16 : // NS + case -16 : + rDesc.mbStatus = sal_False; + break; + case 24 : // 24 bit directColor ( 8 bits each component ) + case -24 : + rDesc.mnDstBitsPerPixel = 24; + break; + case 32 : // NS + case -32 : + rDesc.mbStatus = sal_False; + break; + + } + // mnCompressionMode == 0 : CCOMP_RUNLENGTH + // == 1 : CCOMP_PACKED ( no compression. each row starts on a 4 byte boundary ) + if ( ( rDesc.mnCompressionMode = mpCGM->ImplGetUI16() ) != 1 ) + rDesc.mbStatus = sal_False; + + if ( ( rDesc.mnX || rDesc.mnY ) == 0 ) + rDesc.mbStatus = sal_False; + + sal_uInt32 nHeaderSize = 2 + 3 * nPrecision + 3 * mpCGM->ImplGetPointSize(); + rDesc.mnScanSize = ( ( rDesc.mnX * rDesc.mnDstBitsPerPixel + 7 ) >> 3 ); + + sal_uInt32 nScanSize; + nScanSize = rDesc.mnScanSize; + if ( ( nScanSize * rDesc.mnY + nHeaderSize ) != mpCGM->mnElementSize ) // try a scansize without dw alignment + { + nScanSize = ( rDesc.mnScanSize + 1 ) & ~1; + if ( ( nScanSize * rDesc.mnY + nHeaderSize ) != mpCGM->mnElementSize ) // then we'll try word alignment + { + nScanSize = ( rDesc.mnScanSize + 3 ) & ~3; + if ( ( nScanSize * rDesc.mnY + nHeaderSize ) != mpCGM->mnElementSize ) // and last we'll try dword alignment + { + nScanSize = ( rDesc.mnScanSize + 1 ) & ~1; // and LAST BUT NOT LEAST we'll try word alignment without aligning the last line + if ( ( nScanSize * ( rDesc.mnY - 1 ) + rDesc.mnScanSize + nHeaderSize ) != mpCGM->mnElementSize ) + { + nScanSize = ( rDesc.mnScanSize + 3 ) & ~3; + if ( ( nScanSize * ( rDesc.mnY - 1 ) + rDesc.mnScanSize + nHeaderSize ) != mpCGM->mnElementSize ) + { + mpCGM->mnParaSize = 0; // this format is corrupt + rDesc.mbStatus = sal_False; + } + } + } + } + } + rDesc.mnScanSize = nScanSize; + if ( rDesc.mbStatus ) + { + rDesc.mpBuf = mpCGM->mpSource + mpCGM->mnParaSize; // mpBuf now points to the first scanline + mpCGM->mnParaSize += rDesc.mnScanSize * rDesc.mnY; + } + return rDesc.mbStatus; +} + +// --------------------------------------------------------------- + +void CGMBitmap::ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& rDest ) +{ + if ( ( rSource.mnR.Y == rDest.mnQ.Y ) && ( rSource.mnR.X == rDest.mnQ.X ) ) + { // Insert on Bottom + if ( mpCGM->mnVDCYmul == -1 ) + rDest.mnOrigin = rSource.mnOrigin; // neuer origin + rDest.mpBitmap->Expand( 0, rSource.mnY ); + rDest.mpBitmap->CopyPixel( Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), + Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap ); + FloatPoint aFloatPoint; + aFloatPoint.X = rSource.mnQ.X - rSource.mnR.X; + aFloatPoint.Y = rSource.mnQ.Y - rSource.mnR.Y; + rDest.mnQ.X += aFloatPoint.X; + rDest.mnQ.Y += aFloatPoint.Y; + rDest.mnP = rSource.mnP; + rDest.mnR = rSource.mnR; + } + else + { // Insert on Top + if ( mpCGM->mnVDCYmul == 1 ) + rDest.mnOrigin = rSource.mnOrigin; // neuer origin + rDest.mpBitmap->Expand( 0, rSource.mnY ); + rDest.mpBitmap->CopyPixel( Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), + Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), rSource.mpBitmap ); + rDest.mnP = rSource.mnP; + rDest.mnR = rSource.mnR; + } + rDest.mnY += rSource.mnY; + rDest.mndy += rSource.mndy; +}; + +// --------------------------------------------------------------- + +CGMBitmap* CGMBitmap::GetNext() +{ + if ( pCGMBitmapDescriptor->mpBitmap && pCGMBitmapDescriptor->mbStatus ) + { + CGMBitmap* pCGMTempBitmap = new CGMBitmap( *mpCGM ); + if ( pCGMTempBitmap ) + { + if ( ( (long)pCGMTempBitmap->pCGMBitmapDescriptor->mnOrientation == (long)pCGMBitmapDescriptor->mnOrientation ) && + ( ( ( pCGMTempBitmap->pCGMBitmapDescriptor->mnR.X == pCGMBitmapDescriptor->mnQ.X ) && + ( pCGMTempBitmap->pCGMBitmapDescriptor->mnR.Y == pCGMBitmapDescriptor->mnQ.Y ) ) || + ( ( pCGMTempBitmap->pCGMBitmapDescriptor->mnQ.X == pCGMBitmapDescriptor->mnR.X ) && + ( pCGMTempBitmap->pCGMBitmapDescriptor->mnQ.Y == pCGMBitmapDescriptor->mnR.Y ) ) ) ) + { + ImplInsert( *(pCGMTempBitmap->pCGMBitmapDescriptor), *(pCGMBitmapDescriptor) ); + delete pCGMTempBitmap; + return NULL; + } + else // we'll replace the pointers and return the old one + { + CGMBitmapDescriptor* pTempBD = pCGMBitmapDescriptor; + pCGMBitmapDescriptor = pCGMTempBitmap->pCGMBitmapDescriptor; + pCGMTempBitmap->pCGMBitmapDescriptor = pTempBD; + return pCGMTempBitmap; + } + } + return NULL; + } + else + return NULL; +} + +// --------------------------------------------------------------- + +CGMBitmapDescriptor* CGMBitmap::GetBitmap() +{ + return pCGMBitmapDescriptor; +} + diff --git a/filter/source/graphicfilter/icgm/bitmap.hxx b/filter/source/graphicfilter/icgm/bitmap.hxx new file mode 100644 index 000000000000..151c668f5d36 --- /dev/null +++ b/filter/source/graphicfilter/icgm/bitmap.hxx @@ -0,0 +1,87 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_BITMAP_HXX_ +#define CGM_BITMAP_HXX_ + +#include "cgm.hxx" +#include + +class CGM; + +class CGMBitmapDescriptor +{ + public: + sal_uInt8* mpBuf; + Bitmap* mpBitmap; + BitmapWriteAccess* mpAcc; + sal_Bool mbStatus; + sal_Bool mbVMirror; + sal_Bool mbHMirror; + sal_uInt32 mnDstBitsPerPixel; + sal_uInt32 mnScanSize; // bytes per line + FloatPoint mnP, mnQ, mnR; + + FloatPoint mnOrigin; + double mndx, mndy; + double mnOrientation; + + sal_uInt32 mnX, mnY; + long mnLocalColorPrecision; + sal_uInt32 mnCompressionMode; + CGMBitmapDescriptor() : + mpBuf ( NULL ), + mpBitmap ( NULL ), + mpAcc ( NULL ), + mbStatus ( sal_False ), + mbVMirror ( sal_False ), + mbHMirror ( sal_False ) { }; + ~CGMBitmapDescriptor() + { + if ( mpAcc ) + mpBitmap->ReleaseAccess( mpAcc ); + if ( mpBitmap ) + delete mpBitmap; + }; +}; + +class CGMBitmap +{ + CGM* mpCGM; + CGMBitmapDescriptor* pCGMBitmapDescriptor; + sal_Bool ImplGetDimensions( CGMBitmapDescriptor& ); + void ImplSetCurrentPalette( CGMBitmapDescriptor& ); + void ImplGetBitmap( CGMBitmapDescriptor& ); + void ImplInsert( CGMBitmapDescriptor& rSource, CGMBitmapDescriptor& rDest ); + public: + CGMBitmap( CGM& rCGM ); + ~CGMBitmap(); + CGMBitmapDescriptor* GetBitmap(); + CGMBitmap* GetNext(); +}; +#endif + diff --git a/filter/source/graphicfilter/icgm/bundles.cxx b/filter/source/graphicfilter/icgm/bundles.cxx new file mode 100644 index 000000000000..f948f6549115 --- /dev/null +++ b/filter/source/graphicfilter/icgm/bundles.cxx @@ -0,0 +1,288 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "bundles.hxx" + +#include +#include +#include + +Bundle& Bundle::operator=( Bundle& rSource ) +{ + mnColor = rSource.mnColor; + mnBundleIndex = rSource.mnBundleIndex; + return *this; +}; + +// --------------------------------------------------------------- + +void Bundle::SetColor( sal_uInt32 nColor ) +{ + mnColor = nColor; +} + +sal_uInt32 Bundle::GetColor() +{ + return mnColor; +} + +// --------------------------------------------------------------- + +LineBundle& LineBundle::operator=( LineBundle& rSource ) +{ + SetIndex( rSource.GetIndex() ); + eLineType = rSource.eLineType; + nLineWidth = rSource.nLineWidth; + return *this; +}; + +MarkerBundle& MarkerBundle::operator=( MarkerBundle& rSource ) +{ + SetIndex( rSource.GetIndex() ); + eMarkerType = rSource.eMarkerType; + nMarkerSize = rSource.nMarkerSize; + return *this; +}; + +EdgeBundle& EdgeBundle::operator=( EdgeBundle& rSource ) +{ + SetIndex( rSource.GetIndex() ); + eEdgeType = rSource.eEdgeType; + nEdgeWidth = rSource.nEdgeWidth; + return *this; +}; + +TextBundle& TextBundle::operator=( TextBundle& rSource ) +{ + SetIndex( rSource.GetIndex() ); + nTextFontIndex = rSource.nTextFontIndex; + eTextPrecision = rSource.eTextPrecision; + nCharacterExpansion = rSource.nCharacterExpansion; + nCharacterSpacing = rSource.nCharacterSpacing; + return *this; +}; + +FillBundle& FillBundle::operator=( FillBundle& rSource ) +{ + SetIndex( rSource.GetIndex() ); + eFillInteriorStyle = rSource.eFillInteriorStyle; + nFillPatternIndex = rSource.nFillPatternIndex; + nFillHatchIndex = rSource.nFillHatchIndex; + return *this; +}; + +// --------------------------------------------------------------- + +FontEntry::FontEntry() : + pFontName ( NULL ), + eCharSetType ( CST_CCOMPLETE ), + pCharSetValue ( NULL ), + nFontType ( 0 ) +{ +} + +FontEntry::~FontEntry() +{ + delete pFontName; + delete pCharSetValue; +} + +// --------------------------------------------------------------- + +CGMFList::CGMFList() : + nFontNameCount ( 0 ), + nCharSetCount ( 0 ), + nFontsAvailable ( 0 ) +{ + aFontEntryList.Clear(); +} + +CGMFList::~CGMFList() +{ + ImplDeleteList(); +} + +// --------------------------------------------------------------- + +CGMFList& CGMFList::operator=( CGMFList& rSource ) +{ + ImplDeleteList(); + nFontsAvailable = rSource.nFontsAvailable; + nFontNameCount = rSource.nFontNameCount; + nCharSetCount = rSource.nCharSetCount; + FontEntry* pPtr = (FontEntry*)rSource.aFontEntryList.First(); + while( pPtr ) + { + FontEntry* pCFontEntry = new FontEntry; + if ( pPtr->pFontName ) + { + sal_uInt32 nSize = strlen( (const char*)pPtr->pFontName ) + 1; + pCFontEntry->pFontName = new sal_Int8[ nSize ]; + memcpy( pCFontEntry->pFontName, pPtr->pFontName, nSize ); + } + if ( pPtr->pCharSetValue ) + { + sal_uInt32 nSize = strlen( (const char*)pPtr->pCharSetValue ) + 1; + pCFontEntry->pCharSetValue = new sal_Int8[ nSize ]; + memcpy( pCFontEntry->pCharSetValue, pPtr->pCharSetValue, nSize ); + } + pCFontEntry->eCharSetType = pPtr->eCharSetType; + pCFontEntry->nFontType = pPtr->nFontType; + aFontEntryList.Insert( pCFontEntry, LIST_APPEND ); + pPtr = (FontEntry*)rSource.aFontEntryList.Next(); + } + return *this; +} + +// --------------------------------------------------------------- + +FontEntry* CGMFList::GetFontEntry( sal_uInt32 nIndex ) +{ + sal_uInt32 nInd = nIndex; + if ( nInd ) + nInd--; + return (FontEntry*)aFontEntryList.GetObject( nInd ); +} + +// --------------------------------------------------------------- + +static sal_Int8* ImplSearchEntry( sal_Int8* pSource, sal_Int8* pDest, sal_uInt32 nComp, sal_uInt32 nSize ) +{ + while ( nComp-- >= nSize ) + { + sal_uInt32 i; + for ( i = 0; i < nSize; i++ ) + { + if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) + break; + } + if ( i == nSize ) + return pSource; + pSource++; + } + return NULL; +} + +void CGMFList::InsertName( sal_uInt8* pSource, sal_uInt32 nSize ) +{ + FontEntry* pFontEntry; + if ( nFontsAvailable == nFontNameCount ) + { + nFontsAvailable++; + pFontEntry = new FontEntry; + aFontEntryList.Insert( pFontEntry, LIST_APPEND ); + } + else + { + pFontEntry = (FontEntry*)aFontEntryList.GetObject( nFontNameCount ); + } + nFontNameCount++; + sal_Int8* pBuf = new sal_Int8[ nSize ]; + memcpy( pBuf, pSource, nSize ); + sal_Int8* pFound = ImplSearchEntry( pBuf, (sal_Int8*)"ITALIC", nSize, 6 ); + if ( pFound ) + { + pFontEntry->nFontType |= 1; + sal_uInt32 nPrev = ( pFound - pBuf ); + sal_uInt32 nToCopyOfs = 6; + if ( nPrev && ( pFound[ -1 ] == '-' || pFound[ -1 ] == ' ' ) ) + { + nPrev--; + pFound--; + nToCopyOfs++; + } + sal_uInt32 nToCopy = nSize - nToCopyOfs - nPrev; + if ( nToCopy ) + { + memcpy( pFound, pFound + nToCopyOfs, nToCopy ); + } + nSize -= nToCopyOfs; + } + pFound = ImplSearchEntry( pBuf, (sal_Int8*)"BOLD", nSize, 4 ); + if ( pFound ) + { + pFontEntry->nFontType |= 2; + + sal_uInt32 nPrev = ( pFound - pBuf ); + sal_uInt32 nToCopyOfs = 4; + if ( nPrev && ( pFound[ -1 ] == '-' || pFound[ -1 ] == ' ' ) ) + { + nPrev--; + pFound--; + nToCopyOfs++; + } + sal_uInt32 nToCopy = nSize - nToCopyOfs - nPrev; + if ( nToCopy ) + { + memcpy( pFound, pFound + nToCopyOfs, nToCopy ); + } + nSize -= nToCopyOfs; + } + pFontEntry->pFontName = new sal_Int8[ nSize + 1 ]; + pFontEntry->pFontName[ nSize ] = 0; + memcpy( pFontEntry->pFontName, pBuf, nSize ); + delete[] pBuf; +} + +//-------------------------------------------------------------------------- + +void CGMFList::InsertCharSet( CharSetType eCharSetType, sal_uInt8* pSource, sal_uInt32 nSize ) +{ + FontEntry* pFontEntry; + if ( nFontsAvailable == nCharSetCount ) + { + nFontsAvailable++; + pFontEntry = new FontEntry; + aFontEntryList.Insert( pFontEntry, LIST_APPEND ); + } + else + { + pFontEntry = (FontEntry*)aFontEntryList.GetObject( nCharSetCount ); + } + nCharSetCount++; + pFontEntry->eCharSetType = eCharSetType; + pFontEntry->pCharSetValue = new sal_Int8[ nSize + 1 ]; + pFontEntry->pCharSetValue[ nSize ] = 0; + memcpy( pFontEntry->pCharSetValue, pSource , nSize ); +} + +// --------------------------------------------------------------- + +void CGMFList::ImplDeleteList() +{ + FontEntry* pFontEntry = (FontEntry*)aFontEntryList.First(); + while( pFontEntry ) + { + delete pFontEntry; + pFontEntry = (FontEntry*)aFontEntryList.Next(); + } + aFontEntryList.Clear(); +} + diff --git a/filter/source/graphicfilter/icgm/bundles.hxx b/filter/source/graphicfilter/icgm/bundles.hxx new file mode 100644 index 000000000000..5185553055cb --- /dev/null +++ b/filter/source/graphicfilter/icgm/bundles.hxx @@ -0,0 +1,173 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_BUNDLES_HXX_ +#define CGM_BUNDLES_HXX_ + +#include +#include "cgmtypes.hxx" +#include +#include + +// --------------------------------------------------------------- + +class CGM; + +class Bundle +{ + + long mnBundleIndex; + sal_uInt32 mnColor; + +public: + void SetColor( sal_uInt32 nColor ) ; + sal_uInt32 GetColor() ; + long GetIndex() const { return mnBundleIndex; } ; + void SetIndex( long nBundleIndex ) { mnBundleIndex = nBundleIndex; } ; + + Bundle() {}; + virtual Bundle* Clone() { return new Bundle( *this ); }; + Bundle& operator=( Bundle& rBundle ); + + virtual ~Bundle() {} ; +}; + +// --------------------------------------------------------------- + +class LineBundle : public Bundle +{ +public: + + LineType eLineType; + double nLineWidth; + + LineBundle() {}; + virtual Bundle* Clone() { return new LineBundle( *this ); }; + LineBundle& operator=( LineBundle& rLineBundle ); + virtual ~LineBundle() {}; +}; + +// --------------------------------------------------------------- + +class MarkerBundle : public Bundle +{ +public: + + MarkerType eMarkerType; + double nMarkerSize; + + MarkerBundle() {}; + virtual Bundle* Clone() { return new MarkerBundle( *this ); } ; + MarkerBundle& operator=( MarkerBundle& rMarkerBundle ); + virtual ~MarkerBundle() {}; +}; + +// --------------------------------------------------------------- + +class EdgeBundle : public Bundle +{ +public: + + EdgeType eEdgeType; + double nEdgeWidth; + + EdgeBundle() {}; + virtual Bundle* Clone() { return new EdgeBundle( *this ); } ; + EdgeBundle& operator=( EdgeBundle& rEdgeBundle ); + virtual ~EdgeBundle() {}; +}; + +// --------------------------------------------------------------- + +class TextBundle : public Bundle +{ +public: + + sal_uInt32 nTextFontIndex; + TextPrecision eTextPrecision; + double nCharacterExpansion; + double nCharacterSpacing; + + TextBundle() {}; + virtual Bundle* Clone() { return new TextBundle( *this ); } ; + TextBundle& operator=( TextBundle& rTextBundle ); + virtual ~TextBundle() {}; +}; + +// --------------------------------------------------------------- + +class FillBundle : public Bundle +{ +public: + + FillInteriorStyle eFillInteriorStyle; + long nFillPatternIndex; + long nFillHatchIndex; + + FillBundle() {}; + virtual Bundle* Clone() { return new FillBundle( *this ); } ; + FillBundle& operator=( FillBundle& rFillBundle ); + virtual ~FillBundle() {}; +}; + + +// --------------------------------------------------------------- + +class FontEntry +{ +public: + sal_Int8* pFontName; + CharSetType eCharSetType; + sal_Int8* pCharSetValue; + sal_uInt32 nFontType; // bit 0 = 1 -> Italic, + // bit 1 = 1 -> Bold + + FontEntry(); + FontEntry* Clone() { return new FontEntry( *this ); } ; + ~FontEntry(); +}; + +// --------------------------------------------------------------- + +class CGMFList +{ + sal_uInt32 nFontNameCount; + sal_uInt32 nCharSetCount; + List aFontEntryList; + void ImplDeleteList(); +public: + sal_uInt32 nFontsAvailable; + FontEntry* GetFontEntry( sal_uInt32 ); + void InsertName( sal_uInt8* pSource, sal_uInt32 nSize ); + void InsertCharSet( CharSetType, sal_uInt8* pSource, sal_uInt32 nSize ); + CGMFList(); + CGMFList& operator=( CGMFList& rFontList ); + ~CGMFList(); +}; + + +#endif diff --git a/filter/source/graphicfilter/icgm/cgm.cxx b/filter/source/graphicfilter/icgm/cgm.cxx new file mode 100644 index 000000000000..ea474a160e36 --- /dev/null +++ b/filter/source/graphicfilter/icgm/cgm.cxx @@ -0,0 +1,927 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#include +#include + +#define CGM_BREAK_ACTION 0xffffffff +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace ::com::sun::star; + +// --------------------------------------------------------------- + +void CGM::ImplCGMInit() +{ + mbIsFinished = mbPicture = mbMetaFile = mbPictureBody = sal_False; + + mnActCount = 0; + mnOutdx = 28000; + mnOutdy = 21000; + + mpBuf = NULL; + mpChart = NULL; + mpBitmapInUse = NULL; + + pCopyOfE = new CGMElements( *this ); + pElement = new CGMElements( *this ); +} + +// --------------------------------------------------------------- + +#ifdef CGM_EXPORT_IMPRESS + +CGM::CGM( sal_uInt32 nMode, uno::Reference< frame::XModel > & rModel ) : + mpGraphic ( NULL ), + mpCommentOut ( NULL ), + mbStatus ( sal_True ), + mpOutAct ( new CGMImpressOutAct( *this, rModel ) ), + mnMode ( nMode ) +{ + mnMode |= CGM_EXPORT_IMPRESS; + ImplCGMInit(); +} +#endif + +// --------------------------------------------------------------- + +void CGM::ImplComment( sal_uInt32 Level, const char* Description ) +{ + if ( mpCommentOut ) + { + if ( Level == CGM_DESCRIPTION ) + { + *mpCommentOut << " " << Description << "\n"; + } + else + { + sal_Int8 nFirst, nSecond, i, nCount = 0; + if ( mnActCount < 10000 ) + nCount++; + if ( mnActCount < 1000 ) + nCount++; + if ( mnActCount < 100 ) + nCount++; + if ( mnActCount < 10 ) + nCount++; + for ( i = 0; i <= nCount; i++ ) + *mpCommentOut << " "; + mpCommentOut->WriteNumber( mnActCount ); + + switch( Level & 0xff ) + { + case CGM_UNKNOWN_LEVEL : + *mpCommentOut << " L?"; + break; + case CGM_UNKNOWN_COMMAND : + *mpCommentOut << " UNKNOWN COMMAND"; + break; + case CGM_GDSF_ONLY : + *mpCommentOut << " LI"; + break; + default: + *mpCommentOut << " L"; + mpCommentOut->WriteNumber( Level & 0xff ); + break; + } + *mpCommentOut << " C"; + mpCommentOut->WriteNumber( mnElementClass ); + *mpCommentOut << " ID-0x"; + nFirst = ( mnElementID > 0x9F ) ? (sal_Int8)( mnElementID >> 4 ) + 'A' - 10: (sal_Int8)( mnElementID >> 4 ) + '0'; + nSecond = ( ( mnElementID & 15 ) > 9 ) ? (sal_Int8)( mnElementID & 15 ) + 'A' - 10 : (sal_Int8)( mnElementID & 15 ) + '0'; + *mpCommentOut << nFirst << nSecond; + *mpCommentOut << " Size"; + nCount = 1; + if ( mnElementSize < 1000000 ) + nCount++; + if ( mnElementSize < 100000 ) + nCount++; + if ( mnElementSize < 10000 ) + nCount++; + if ( mnElementSize < 1000 ) + nCount++; + if ( mnElementSize < 100 ) + nCount++; + if ( mnElementSize < 10 ) + nCount++; + for ( i = 0; i < nCount; i++ ) + *mpCommentOut << " "; + mpCommentOut->WriteNumber( mnElementSize ); + *mpCommentOut << " " << Description << "\n"; + } + } +} + +// --------------------------------------------------------------- + +CGM::~CGM() +{ + +#ifdef CGM_EXPORT_META + if ( mpGraphic ) + { + mpGDIMetaFile->Stop(); + mpGDIMetaFile->SetPrefMapMode( MapMode() ); + mpGDIMetaFile->SetPrefSize( Size( static_cast< long >( mnOutdx ), static_cast< long >( mnOutdy ) ) ); + delete mpVirDev; + *mpGraphic = Graphic( *mpGDIMetaFile ); + } +#endif + sal_Int8* pBuf = (sal_Int8*)maDefRepList.First(); + while( pBuf ) + { + delete pBuf; + pBuf = (sal_Int8*)maDefRepList.Next(); + } + maDefRepList.Clear(); + delete mpBitmapInUse; + delete mpCommentOut; + delete mpChart; + delete mpOutAct; + delete pCopyOfE; + delete pElement; + delete [] mpBuf; +}; + +// --------------------------------------------------------------- + +sal_uInt32 CGM::GetBackGroundColor() +{ + return ( pElement ) ? pElement->aColorTable[ 0 ] : 0; +} + +// --------------------------------------------------------------- + +sal_uInt32 CGM::ImplGetUI16( sal_uInt32 /*nAlign*/ ) +{ + sal_uInt8* pSource = mpSource + mnParaSize; + mnParaSize += 2; + return ( pSource[ 0 ] << 8 ) + pSource[ 1 ]; +}; + +// --------------------------------------------------------------- + +sal_uInt8 CGM::ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision ) +{ + return (sal_uInt8)( nSource >> ( ( nPrecision - 1 ) << 3 ) ); +}; + +// --------------------------------------------------------------- + +long CGM::ImplGetI( sal_uInt32 nPrecision ) +{ + sal_uInt8* pSource = mpSource + mnParaSize; + mnParaSize += nPrecision; + switch( nPrecision ) + { + case 1 : + { + return (char)*pSource; + } + + case 2 : + { + return (sal_Int16)( ( pSource[ 0 ] << 8 ) | pSource[ 1 ] ); + } + + case 3 : + { + return ( ( pSource[ 0 ] << 24 ) | ( pSource[ 1 ] << 16 ) | pSource[ 2 ] << 8 ) >> 8; + } + case 4: + { + return (sal_Int32)( ( pSource[ 0 ] << 24 ) | ( pSource[ 1 ] << 16 ) | ( pSource[ 2 ] << 8 ) | ( pSource[ 3 ] ) ); + } + default: + mbStatus = sal_False; + return 0; + } +} + +// --------------------------------------------------------------- + +sal_uInt32 CGM::ImplGetUI( sal_uInt32 nPrecision ) +{ + sal_uInt8* pSource = mpSource + mnParaSize; + mnParaSize += nPrecision; + switch( nPrecision ) + { + case 1 : + return (sal_Int8)*pSource; + case 2 : + { + return (sal_uInt16)( ( pSource[ 0 ] << 8 ) | pSource[ 1 ] ); + } + case 3 : + { + return ( pSource[ 0 ] << 16 ) | ( pSource[ 1 ] << 8 ) | pSource[ 2 ]; + } + case 4: + { + return (sal_uInt32)( ( pSource[ 0 ] << 24 ) | ( pSource[ 1 ] << 16 ) | ( pSource[ 2 ] << 8 ) | ( pSource[ 3 ] ) ); + } + default: + mbStatus = sal_False; + return 0; + } +} + +// --------------------------------------------------------------- + +void CGM::ImplGetSwitch4( sal_uInt8* pSource, sal_uInt8* pDest ) +{ + for ( int i = 0; i < 4; i++ ) + { + pDest[ i ] = pSource[ i ^ 3 ]; // Little Endian <-> Big Endian switch + } +} + +// --------------------------------------------------------------- + +void CGM::ImplGetSwitch8( sal_uInt8* pSource, sal_uInt8* pDest ) +{ + for ( int i = 0; i < 8; i++ ) + { + pDest[ i ] = pSource[ i ^ 7 ]; // Little Endian <-> Big Endian switch + } +} + +// --------------------------------------------------------------- + +double CGM::ImplGetFloat( RealPrecision eRealPrecision, sal_uInt32 nRealSize ) +{ + void* pPtr; + sal_uInt8 aBuf[8]; + sal_Bool bCompatible; + double nRetValue; + double fDoubleBuf; + float fFloatBuf; + +#ifdef OSL_BIGENDIAN + bCompatible = sal_True; +#else + bCompatible = sal_False; +#endif + if ( bCompatible ) + pPtr = mpSource + mnParaSize; + else + { + if ( nRealSize == 4 ) + ImplGetSwitch4( mpSource + mnParaSize, &aBuf[0] ); + else + ImplGetSwitch8( mpSource + mnParaSize, &aBuf[0] ); + pPtr = &aBuf; + } + if ( eRealPrecision == RP_FLOAT ) + { + if ( nRealSize == 4 ) + { + memcpy( (void*)&fFloatBuf, pPtr, 4 ); + nRetValue = (double)fFloatBuf; + } + else + { + memcpy( (void*)&fDoubleBuf, pPtr, 8 ); + nRetValue = fDoubleBuf; + } + } + else // ->RP_FIXED + { + long nVal; + int nSwitch = ( bCompatible ) ? 0 : 1 ; + if ( nRealSize == 4 ) + { + sal_uInt16* pShort = (sal_uInt16*)pPtr; + nVal = pShort[ nSwitch ]; + nVal <<= 16; + nVal |= pShort[ nSwitch ^ 1 ]; + nRetValue = (double)nVal; + nRetValue /= 65536; + } + else + { + long* pLong = (long*)pPtr; + nRetValue = (double)abs( pLong[ nSwitch ] ); + nRetValue *= 65536; + nVal = (sal_uInt32)( pLong[ nSwitch ^ 1 ] ); + nVal >>= 16; + nRetValue += (double)nVal; + if ( pLong[ nSwitch ] < 0 ) + { + nRetValue -= nRetValue; + } + nRetValue /= 65536; + } + } + mnParaSize += nRealSize; + return nRetValue; +} + +// --------------------------------------------------------------- + +sal_uInt32 CGM::ImplGetPointSize() +{ + if ( pElement->eVDCType == VDC_INTEGER ) + return pElement->nVDCIntegerPrecision << 1; + else + return pElement->nVDCRealSize << 1; +} + +// --------------------------------------------------------------- + +inline double CGM::ImplGetIX() +{ + return ( ( ImplGetI( pElement->nVDCIntegerPrecision ) + mnVDCXadd ) * mnVDCXmul ); +} + +// --------------------------------------------------------------- + +inline double CGM::ImplGetFX() +{ + return ( ( ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ) + mnVDCXadd ) * mnVDCXmul ); +} + +// --------------------------------------------------------------- + +inline double CGM::ImplGetIY() +{ + return ( ( ImplGetI( pElement->nVDCIntegerPrecision ) + mnVDCYadd ) * mnVDCYmul ); +} + +// --------------------------------------------------------------- + +inline double CGM::ImplGetFY() +{ + return ( ( ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ) + mnVDCYadd ) * mnVDCYmul ); +} + +// --------------------------------------------------------------- + +void CGM::ImplGetPoint( FloatPoint& rFloatPoint, sal_Bool bMap ) +{ + if ( pElement->eVDCType == VDC_INTEGER ) + { + rFloatPoint.X = ImplGetIX(); + rFloatPoint.Y = ImplGetIY(); + } + else // ->floating points + { + rFloatPoint.X = ImplGetFX(); + rFloatPoint.Y = ImplGetFY(); + } + if ( bMap ) + ImplMapPoint( rFloatPoint ); +} + +// --------------------------------------------------------------- + +void CGM::ImplGetRectangle( FloatRect& rFloatRect, sal_Bool bMap ) +{ + if ( pElement->eVDCType == VDC_INTEGER ) + { + rFloatRect.Left = ImplGetIX(); + rFloatRect.Bottom = ImplGetIY(); + rFloatRect.Right = ImplGetIX(); + rFloatRect.Top = ImplGetIY(); + } + else // ->floating points + { + rFloatRect.Left = ImplGetFX(); + rFloatRect.Bottom = ImplGetFY(); + rFloatRect.Right = ImplGetFX(); + rFloatRect.Top = ImplGetFY(); + } + if ( bMap ) + { + ImplMapX( rFloatRect.Left ); + ImplMapX( rFloatRect.Right ); + ImplMapY( rFloatRect.Top ); + ImplMapY( rFloatRect.Bottom ); + rFloatRect.Justify(); + } +} + +// --------------------------------------------------------------- + +void CGM::ImplGetRectangleNS( FloatRect& rFloatRect ) +{ + if ( pElement->eVDCType == VDC_INTEGER ) + { + rFloatRect.Left = ImplGetI( pElement->nVDCIntegerPrecision ); + rFloatRect.Bottom = ImplGetI( pElement->nVDCIntegerPrecision ); + rFloatRect.Right = ImplGetI( pElement->nVDCIntegerPrecision ); + rFloatRect.Top = ImplGetI( pElement->nVDCIntegerPrecision ); + } + else // ->floating points + { + rFloatRect.Left = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + rFloatRect.Bottom = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + rFloatRect.Right = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + rFloatRect.Top = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + } +} + +// --------------------------------------------------------------- + +sal_uInt32 CGM::ImplGetBitmapColor( sal_Bool bDirect ) +{ + // the background color is always a direct color + + sal_uInt32 nTmp; + if ( ( pElement->eColorSelectionMode == CSM_DIRECT ) || bDirect ) + { + sal_uInt32 nColor = ImplGetByte( ImplGetUI( pElement->nColorPrecision ), 1 ); + sal_uInt32 nDiff = pElement->nColorValueExtent[ 3 ] - pElement->nColorValueExtent[ 0 ] + 1; + + if ( !nDiff ) + nDiff++; + nColor = ( ( nColor - pElement->nColorValueExtent[ 0 ] ) << 8 ) / nDiff; + nTmp = nColor << 16 & 0xff0000; + + nColor = ImplGetByte( ImplGetUI( pElement->nColorPrecision ), 1 ); + nDiff = pElement->nColorValueExtent[ 4 ] - pElement->nColorValueExtent[ 1 ] + 1; + if ( !nDiff ) + nDiff++; + nColor = ( ( nColor - pElement->nColorValueExtent[ 1 ] ) << 8 ) / nDiff; + nTmp |= nColor << 8 & 0xff00; + + nColor = ImplGetByte( ImplGetUI( pElement->nColorPrecision ), 1 ); + nDiff = pElement->nColorValueExtent[ 5 ] - pElement->nColorValueExtent[ 2 ] + 1; + if ( !nDiff ) + nDiff++; + nColor = ( ( nColor - pElement->nColorValueExtent[ 2 ] ) << 8 ) / nDiff; + nTmp |= (sal_uInt8)nColor; + } + else + { + sal_uInt32 nIndex = ImplGetUI( pElement->nColorIndexPrecision ); + nTmp = pElement->aColorTable[ (sal_uInt8)( nIndex ) ] ; + } + return nTmp; +} + +// --------------------------------------------------------------- + +// call this function each time after the mapmode settings has been changed +void CGM::ImplSetMapMode() +{ + int nAngReverse = 1; + mnVDCdx = pElement->aVDCExtent.Right - pElement->aVDCExtent.Left; + + mnVDCXadd = -pElement->aVDCExtent.Left; + mnVDCXmul = 1; + if ( mnVDCdx < 0 ) + { + nAngReverse ^= 1; + mnVDCdx = -mnVDCdx; + mnVDCXmul = -1; + } + + mnVDCdy = pElement->aVDCExtent.Bottom - pElement->aVDCExtent.Top; + mnVDCYadd = -pElement->aVDCExtent.Top; + mnVDCYmul = 1; + if ( mnVDCdy < 0 ) + { + nAngReverse ^= 1; + mnVDCdy = -mnVDCdy; + mnVDCYmul = -1; + } + if ( nAngReverse ) + mbAngReverse = sal_True; + else + mbAngReverse = sal_False; + + double fQuo1 = mnVDCdx / mnVDCdy; + double fQuo2 = mnOutdx / mnOutdy; + if ( fQuo2 < fQuo1 ) + { + mnXFraction = mnOutdx / mnVDCdx; + mnYFraction = mnOutdy * ( fQuo2 / fQuo1 ) / mnVDCdy; + } + else + { + mnXFraction = mnOutdx * ( fQuo1 / fQuo2 ) / mnVDCdx; + mnYFraction = mnOutdy / mnVDCdy; + } +} + +// --------------------------------------------------------------- + +void CGM::ImplMapDouble( double& nNumb ) +{ + if ( pElement->eDeviceViewPortMap == DVPM_FORCED ) + { + // point is 1mm * ScalingFactor + switch ( pElement->eDeviceViewPortMode ) + { + case DVPM_FRACTION : + { + nNumb *= ( mnXFraction + mnYFraction ) / 2; + } + break; + + case DVPM_METRIC : + { +// nNumb *= ( 100 * pElement->nDeviceViewPortScale ); + nNumb *= ( mnXFraction + mnYFraction ) / 2; + if ( pElement->nDeviceViewPortScale < 0 ) + nNumb = -nNumb; + } + break; + + case DVPM_DEVICE : + { + + } + break; + + default: + + break; + } + } + else + { + + + } +} + +// --------------------------------------------------------------- + +void CGM::ImplMapX( double& nNumb ) +{ + if ( pElement->eDeviceViewPortMap == DVPM_FORCED ) + { + // point is 1mm * ScalingFactor + switch ( pElement->eDeviceViewPortMode ) + { + case DVPM_FRACTION : + { + nNumb *= mnXFraction; + } + break; + + case DVPM_METRIC : + { +// nNumb *= ( 100 * pElement->nDeviceViewPortScale ); + nNumb *= mnXFraction; + if ( pElement->nDeviceViewPortScale < 0 ) + nNumb = -nNumb; + } + break; + + case DVPM_DEVICE : + { + + } + break; + + default: + + break; + } + } + else + { + + + } +} + + +// --------------------------------------------------------------- + +void CGM::ImplMapY( double& nNumb ) +{ + if ( pElement->eDeviceViewPortMap == DVPM_FORCED ) + { + // point is 1mm * ScalingFactor + switch ( pElement->eDeviceViewPortMode ) + { + case DVPM_FRACTION : + { + nNumb *= mnYFraction; + } + break; + + case DVPM_METRIC : + { +// nNumb *= ( 100 * pElement->nDeviceViewPortScale ); + nNumb *= mnYFraction; + if ( pElement->nDeviceViewPortScale < 0 ) + nNumb = -nNumb; + } + break; + + case DVPM_DEVICE : + { + + } + break; + + default: + + break; + } + } + else + { + + + } +} + + +// --------------------------------------------------------------- + +// convert a point to the current VC mapmode (1/100TH mm) +void CGM::ImplMapPoint( FloatPoint& rFloatPoint ) +{ + if ( pElement->eDeviceViewPortMap == DVPM_FORCED ) + { + // point is 1mm * ScalingFactor + switch ( pElement->eDeviceViewPortMode ) + { + case DVPM_FRACTION : + { + rFloatPoint.X *= mnXFraction; + rFloatPoint.Y *= mnYFraction; + } + break; + + case DVPM_METRIC : + { + rFloatPoint.X *= mnXFraction; + rFloatPoint.Y *= mnYFraction; + if ( pElement->nDeviceViewPortScale < 0 ) + { + rFloatPoint.X = -rFloatPoint.X; + rFloatPoint.Y = -rFloatPoint.Y; + } + } + break; + + case DVPM_DEVICE : + { + + } + break; + + default: + + break; + } + } + else + { + + + } +} + +// --------------------------------------------------------------- + +void CGM::ImplDoClass() +{ +#ifdef CGM_USER_BREAKPOINT +#ifdef WNT + if ( mnActCount == CGM_BREAK_ACTION ) + _asm int 0x3; +#endif +#endif + switch ( mnElementClass ) + { + case 0 : ImplDoClass0(); break; + case 1 : ImplDoClass1(); break; + case 2 : ImplDoClass2(); break; + case 3 : ImplDoClass3(); break; + case 4 : + { + ImplDoClass4(); + mnAct4PostReset = 0; + } + break; + case 5 : ImplDoClass5(); break; + case 6 : ImplDoClass6(); break; + case 7 : ImplDoClass7(); break; + case 8 : ImplDoClass8(); break; + case 9 : ImplDoClass9(); break; + case 15 :ImplDoClass15(); break; + default : ComOut( CGM_UNKNOWN_COMMAND, "" ); break; + } + mnActCount++; +}; + +// --------------------------------------------------------------- + +void CGM::ImplDefaultReplacement() +{ + sal_uInt8* pBuf = (sal_uInt8*)maDefRepList.First(); + if ( pBuf ) + { + sal_uInt32 nElementSize = (sal_uInt32)(sal_uIntPtr)maDefRepSizeList.First(); + sal_uInt32 nOldEscape = mnEscape; + sal_uInt32 nOldElementClass = mnElementClass; + sal_uInt32 nOldElementID = mnElementID; + sal_uInt32 nOldElementSize = mnElementSize; + sal_uInt8* pOldBuf = mpSource; + while( pBuf ) + { + sal_uInt32 nCount = 0; + while ( mbStatus && ( nCount < nElementSize ) ) + { + mpSource = pBuf + nCount; + mnParaSize = 0; + mnEscape = ImplGetUI16(); + mnElementClass = mnEscape >> 12; + mnElementID = ( mnEscape & 0x0fe0 ) >> 5; + mnElementSize = mnEscape & 0x1f; + if ( mnElementSize == 31 ) + { + mnElementSize = ImplGetUI16(); + } + nCount += mnParaSize; + mnParaSize = 0; + mpSource = pBuf + nCount; + if ( mnElementSize & 1 ) + nCount++; + nCount += mnElementSize; + if ( ( mnElementClass != 1 ) || ( mnElementID != 0xc ) ) // rekursion hier nicht moeglich!! + ImplDoClass(); + } + nElementSize = (sal_uInt32)(sal_uIntPtr)maDefRepSizeList.Next(); + pBuf = (sal_uInt8*)maDefRepList.Next(); + } + mnEscape = nOldEscape; + mnElementClass = nOldElementClass; + mnElementID = nOldElementID; + mnParaSize = mnElementSize = nOldElementSize; + mpSource = pOldBuf; + } +} + +// --------------------------------------------------------------- + +sal_Bool CGM::Write( SvStream& rIStm ) +{ + if ( !mpBuf ) + mpBuf = new sal_uInt8[ 0xffff ]; + + mnParaSize = 0; + mpSource = mpBuf; + rIStm.Read( mpSource, 2 ); + mnEscape = ImplGetUI16(); + mnElementClass = mnEscape >> 12; + mnElementID = ( mnEscape & 0x0fe0 ) >> 5; + mnElementSize = mnEscape & 0x1f; + + if ( mnElementSize == 31 ) + { + rIStm.Read( mpSource + mnParaSize, 2 ); + mnElementSize = ImplGetUI16(); + } + mnParaSize = 0; + if ( mnElementSize ) + rIStm.Read( mpSource + mnParaSize, mnElementSize ); + + if ( mnElementSize & 1 ) + rIStm.SeekRel( 1 ); + ImplDoClass(); + + +#ifdef CGM_USER_BREAKPOINT +#ifdef WNT + if ( !mbStatus || mnParaSize && ( mnElementSize != mnParaSize ) ) + _asm int 0x3; +#endif +#endif + + return mbStatus; +}; + +// --------------------------------------------------------------- + +SvStream& operator>>( SvStream& rOStm, CGM& /*rCGM*/ ) +{ + + return rOStm; +}; + +// --------------------------------------------------------------- + + + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" sal_uInt32 __LOADONCALLAPI ImportCGM( String& rFileName, uno::Reference< frame::XModel > & rXModel, sal_uInt32 nMode, void* pProgressBar ) +{ + + sal_uInt32 nStatus = 0; // retvalue == 0 -> ERROR + // == 0xffrrggbb -> background color in the lower 24 bits + sal_Bool bProgressBar = sal_False; + + if( rXModel.is() ) + { + CGM* pCGM= NULL; + + try + { + pCGM = new CGM( nMode, rXModel ); + if ( pCGM && pCGM->IsValid() ) + { + if ( nMode & CGM_IMPORT_CGM ) + { + SvStream* pIn = ::utl::UcbStreamHelper::CreateStream( rFileName, STREAM_READ ); + if ( pIn ) + { + pIn->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + pIn->Seek( STREAM_SEEK_TO_END ); + sal_uInt32 nInSize = pIn->Tell(); + pIn->Seek( 0 ); + +#ifdef CGM_EXPORT_IMPRESS + uno::Reference< task::XStatusIndicator > aXStatInd; + sal_uInt32 nNext = 0; + sal_uInt32 nAdd = nInSize / 20; + if ( pProgressBar ) + aXStatInd = *(uno::Reference< task::XStatusIndicator > *)pProgressBar; + bProgressBar = aXStatInd.is(); + if ( bProgressBar ) + aXStatInd->start( rtl::OUString::createFromAscii("CGM Import"), nInSize ); +#endif + + while ( pCGM->IsValid() && ( pIn->Tell() < nInSize ) && !pCGM->IsFinished() ) + { + +#ifdef CGM_EXPORT_IMPRESS + + + if ( bProgressBar ) + { + sal_uInt32 nCurrentPos = pIn->Tell(); + if ( nCurrentPos >= nNext ) + { + aXStatInd->setValue( nCurrentPos ); + nNext = nCurrentPos + nAdd; + } + } +#endif + + if ( pCGM->Write( *pIn ) == sal_False ) + break; + } + if ( pCGM->IsValid() ) + { + nStatus = pCGM->GetBackGroundColor() | 0xff000000; + } +#ifdef CGM_EXPORT_IMPRESS + if ( bProgressBar ) + aXStatInd->end(); +#endif + delete pIn; + } + } + } + } + catch( ::com::sun::star::uno::Exception& ) + { + nStatus = 0; + } + delete pCGM; + } + return nStatus; +} diff --git a/filter/source/graphicfilter/icgm/cgm.hxx b/filter/source/graphicfilter/icgm/cgm.hxx new file mode 100644 index 000000000000..980fc93fb34e --- /dev/null +++ b/filter/source/graphicfilter/icgm/cgm.hxx @@ -0,0 +1,178 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_HXX_ +#define CGM_HXX_ + +#include + +// --------------------------------------------------------------- +#undef CGM_USER_BREAKPOINT + +#define CGM_IMPORT_CGM 0x00000001 + +#define CGM_EXPORT_IMPRESS 0x00000100 +#define CGM_EXPORT_META 0x00000200 +//#define CGM_EXPORT_COMMENT 0x00000400 + +// --------------------------------------------------------------- + +#include +#include +#include +#include "cgmtypes.hxx" + +// --------------------------------------------------------------- + +class List; +class Bundle; +class Graphic; +class SvStream; +class CGMChart; +class CGMBitmap; +class CGMOutAct; +class CGMElements; +class BitmapColor; +class GDIMetaFile; +class VirtualDevice; +class CGMBitmapDescriptor; + +class CGM +{ + friend class CGMChart; + friend class CGMBitmap; + friend class CGMElements; + friend class CGMOutAct; + friend class CGMImpressOutAct; + + double mnOutdx; // Ausgabe Groesse in 1/100TH mm + double mnOutdy; // auf das gemappt wird + double mnVDCXadd; + double mnVDCYadd; + double mnVDCXmul; + double mnVDCYmul; + double mnVDCdx; + double mnVDCdy; + double mnXFraction; + double mnYFraction; + sal_Bool mbAngReverse; // AngularDirection + + Graphic* mpGraphic; // ifdef CGM_EXPORT_META + SvStream* mpCommentOut; // ifdef CGM_EXPORT_COMMENT + + sal_Bool mbStatus; + sal_Bool mbMetaFile; + sal_Bool mbIsFinished; + sal_Bool mbPicture; + sal_Bool mbPictureBody; + sal_Bool mbFigure; + sal_Bool mbFirstOutPut; + sal_uInt32 mnAct4PostReset; + CGMBitmap* mpBitmapInUse; + CGMChart* mpChart; // if sal_True->"SHWSLIDEREC" + // otherwise "BEGINPIC" commands + // controlls page inserting + CGMElements* pElement; + CGMElements* pCopyOfE; + CGMOutAct* mpOutAct; + List maDefRepList; + List maDefRepSizeList; + + sal_uInt8* mpSource; // source buffer that is not increased + // ( instead use mnParaCount to index ) + sal_uInt32 mnParaSize; // actual parameter size which has been done so far + sal_uInt32 mnActCount; // increased by each action + sal_uInt8* mpBuf; // source stream operation -> then this is allocated for + // the temp input buffer + + sal_uInt32 mnMode; // source description + sal_uInt32 mnEscape; // + sal_uInt32 mnElementClass; // + sal_uInt32 mnElementID; // + sal_uInt32 mnElementSize; // full parameter size for the latest action + + void ImplCGMInit(); + sal_uInt32 ImplGetUI16( sal_uInt32 nAlign = 0 ); + sal_uInt8 ImplGetByte( sal_uInt32 nSource, sal_uInt32 nPrecision ); + long ImplGetI( sal_uInt32 nPrecision ); + sal_uInt32 ImplGetUI( sal_uInt32 nPrecision ); + void ImplGetSwitch4( sal_uInt8* pSource, sal_uInt8* pDest ); + void ImplGetSwitch8( sal_uInt8* pSource, sal_uInt8* pDest ); + double ImplGetFloat( RealPrecision, sal_uInt32 nRealSize ); + sal_uInt32 ImplGetBitmapColor( sal_Bool bDirectColor = sal_False ); + void ImplSetMapMode(); + void ImplMapDouble( double& ); + void ImplMapX( double& ); + void ImplMapY( double& ); + void ImplMapPoint( FloatPoint& ); + inline double ImplGetIY(); + inline double ImplGetFY(); + inline double ImplGetIX(); + inline double ImplGetFX(); + sal_uInt32 ImplGetPointSize(); + void ImplGetPoint( FloatPoint& rFloatPoint, sal_Bool bMap = sal_False ); + void ImplGetRectangle( FloatRect&, sal_Bool bMap = sal_False ); + void ImplGetRectangleNS( FloatRect& ); + void ImplGetVector( double* ); + double ImplGetOrientation( FloatPoint& rCenter, FloatPoint& rPoint ); + void ImplSwitchStartEndAngle( double& rStartAngle, double& rEndAngle ); + sal_Bool ImplGetEllipse( FloatPoint& rCenter, FloatPoint& rRadius, double& rOrientation ); + + void ImplDefaultReplacement(); + void ImplDoClass(); + void ImplDoClass0(); + void ImplDoClass1(); + void ImplDoClass2(); + void ImplDoClass3(); + void ImplDoClass4(); + void ImplDoClass5(); + void ImplDoClass6(); + void ImplDoClass7(); + void ImplDoClass8(); + void ImplDoClass9(); + void ImplDoClass15(); + + public: + + ~CGM(); + + CGM( sal_uInt32 nMode, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & rModel ); +#ifdef CGM_EXPORT_META + VirtualDevice* mpVirDev; + GDIMetaFile* mpGDIMetaFile; +#endif + void ImplComment( sal_uInt32, const char* ); + sal_uInt32 GetBackGroundColor(); + sal_Bool IsValid() { return mbStatus; }; + sal_Bool IsFinished() { return mbIsFinished; }; + sal_Bool Write( SvStream& rIStm ); + + friend SvStream& operator>>( SvStream& rOStm, CGM& rCGM ); + +}; +#endif + diff --git a/filter/source/graphicfilter/icgm/cgmres.hrc b/filter/source/graphicfilter/icgm/cgmres.hrc new file mode 100644 index 000000000000..420f1ff8fe1b --- /dev/null +++ b/filter/source/graphicfilter/icgm/cgmres.hrc @@ -0,0 +1,28 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ +#define MB_CGM 1 +#define MID_TEST 1 diff --git a/filter/source/graphicfilter/icgm/cgmtypes.hxx b/filter/source/graphicfilter/icgm/cgmtypes.hxx new file mode 100644 index 000000000000..a3541d786e34 --- /dev/null +++ b/filter/source/graphicfilter/icgm/cgmtypes.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_TYPES_HXX_ +#define CGM_TYPES_HXX_ + +struct FloatPoint +{ + double X; + double Y; + FloatPoint(){}; + FloatPoint( const double& rX, const double& rY ) { X = rX, Y = rY; }; +}; + +struct FloatRect +{ + double Left; + double Top; + double Right; + double Bottom; + FloatRect(){}; + FloatRect( const FloatPoint& rTopLeft, const FloatPoint& rBottomRight ) + { + Left = rTopLeft.X; + Top = rTopLeft.Y; + Right = rBottomRight.X; + Bottom = rBottomRight.Y; + } + void Justify() + { + double fTemp; + if ( Left > Right ) + { + fTemp = Left; + Left = Right; + Right = fTemp; + } + if ( Top > Bottom ) + { + fTemp = Top; + Top = Bottom; + Bottom = fTemp; + } + } +}; + +struct HatchEntry +{ + int HatchStyle; + long HatchDistance; + long HatchAngle; +}; + +#define ASF_LINETYPE 0x00000001UL +#define ASF_LINEWIDTH 0x00000002UL +#define ASF_LINECOLOR 0x00000004UL +#define ASF_MARKERTYPE 0x00000008UL +#define ASF_MARKERSIZE 0x00000010UL +#define ASF_MARKERCOLOR 0x00000020UL // NS +#define ASF_FILLINTERIORSTYLE 0x00000040UL +#define ASF_HATCHINDEX 0x00000080UL +#define ASF_PATTERNINDEX 0x00000100UL +#define ASF_BITMAPINDEX 0x00000200UL // NS +#define ASF_FILLCOLOR 0x00000400UL +#define ASF_EDGETYPE 0x00000800UL +#define ASF_EDGEWIDTH 0x00001000UL +#define ASF_EDGECOLOR 0x00002000UL +#define ASF_TEXTFONTINDEX 0x00004000UL +#define ASF_TEXTPRECISION 0x00008000UL +#define ASF_CHARACTEREXPANSION 0x00010000UL +#define ASF_CHARACTERSPACING 0x00020000UL +#define ASF_TEXTCOLOR 0x00040000UL + +#define ACT4_GRADIENT_ACTION 0x00000001UL + +enum RealPrecision { RP_FLOAT = 0, RP_FIXED = 1 }; + +enum ScalingMode { SM_ABSTRACT = 0, SM_METRIC = 1 }; + +enum VDCType { VDC_INTEGER = 0, VDC_REAL = 1 }; +enum DeviceViewPortMode { DVPM_FRACTION = 0, DVPM_METRIC = 1, DVPM_DEVICE = 2 }; +enum DeviceViewPortMap { DVPM_NOT_FORCED = 0, DVPM_FORCED = 1 }; +enum DeviceViewPortMapH { DVPMH_LEFT = 0, DVPMH_CENTER = 1, CVPMH_RIGHT = 2 }; +enum DeviceViewPortMapV { DVPMV_BOTTOM = 0, DVPMV_CENTER = 1, DVPMV_TOP = 2 }; + +enum ClipIndicator { CI_OFF = 0, CI_ON = 1 }; + +enum ColorSelectionMode { CSM_INDEXED = 0, CSM_DIRECT = 1 }; +enum ColorModel { CM_RGB = 0, CM_CYMK = 1 }; + +enum CharacterCodingA { CCA_BASIC_7 = 0, CCA_BASIC_8 = 1, CCA_EXT_7 = 2, CCA_EXT_8 = 3 }; +enum CharSetType { CST_CBYTE_94 = 0, CST_CBYTE_96 = 1, CST_MULT94 = 2, CST_MULT96 = 3, CST_CCOMPLETE = 4 }; +enum TextPrecision { TPR_STRING = 0, TPR_CHARACTER = 1, TPR_STROKE = 2, TPR_UNDEFINED = 0xffff }; +enum TextPath { TPR_RIGHT = 0, TPR_LEFT = 1, TPR_UP = 2, TPR_DOWN = 3 }; +enum TextAlignmentH { TAH_NORMAL = 0, TAH_LEFT = 1, TAH_CENTER = 2, TAH_RIGHT = 3, TAH_CONT = 4 }; +enum TextAlignmentV { TAV_NORMAL = 0, TAV_TOP = 1, TAV_CAP = 2, TAV_HALF = 3, TAV_BASE = 4, TAV_BOTTOM = 5, TAV_CONT = 6 }; +enum UnderlineMode { UM_OFF = 0, UM_LOW = 1, UM_HIGH = 2, UM_STRIKEOUT = 4, UM_OVERSCORE = 8 }; +enum FinalFlag { FF_NOT_FINAL = 0, FF_FINAL = 1 }; + +enum LineType { LT_SOLID = 1, LT_DASH = 2, LT_DOT = 3, LT_DASHDOT = 4, LT_DASHDOTDOT = 5, // Standart + LT_NONE = -4, LT_DOTDOTSPACE = -3, LT_LONGDASH = -2, LT_DASHDASHDOT = -1 }; // GDSF Styles +enum SpecMode { SM_ABSOLUTE = 0, SM_SCALED = 1 }; +enum LineCapType { LCT_BUTT = 0, LCT_ROUND = 1, LCT_SQUARE = 2, LCT_TRIANGLE = 3, LCT_ARROW = 4, LCT_NONE = -1 }; +enum LineJoinType { LJT_MITER = 0, LJT_ROUND = 1, LJT_BEVEL = 2, LJT_NONE = -1 }; + + +enum EdgeType { ET_SOLID = 1, ET_DASH = 2, ET_DOT = 3, ET_DASHDOT = 4, ET_DASHDOTDOT = 5, // Standart + ET_NONE = -4, ET_DOTDOTSPACE = -3, ET_LONGDASH = -2, ET_DASHDASHDOT = -1 }; // GDSF Styles +enum EdgeVisibility { EV_OFF = 0, EV_ON = 1 }; + +enum MarkerType { MT_POINT = 1, MT_PLUS = 2, MT_STAR = 3, MT_CIRCLE = 4, MT_CROSS = 5 }; + +enum Transparency { T_OFF = 0, T_ON = 1 }; + +enum FillInteriorStyle { FIS_HOLLOW = 0, FIS_SOLID = 1, FIS_PATTERN = 2, FIS_HATCH = 3, FIS_EMPTY = 4, FIS_GEOPATTERN = 5, + FIS_INTERPOLATED = 6, FIS_GRADIENT = 7 }; + + + + +#endif diff --git a/filter/source/graphicfilter/icgm/chart.cxx b/filter/source/graphicfilter/icgm/chart.cxx new file mode 100644 index 000000000000..f62c62028e11 --- /dev/null +++ b/filter/source/graphicfilter/icgm/chart.cxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + +// --------------------------------------------------------------- + +CGMChart::CGMChart( CGM& rCGM ) : + mpCGM ( &rCGM ) +{ + for ( sal_Int8 i = 0; i < 7; i++ ) + { + mDataNode[ i ].nBoxX1 = mDataNode[ i ].nBoxY1 = 0 ; + mDataNode[ i ].nBoxX2 = mDataNode[ i ].nBoxY2 = 0 ; + + mDataNode[ i ].nZoneEnum = i; + } +}; + +// --------------------------------------------------------------- + +CGMChart::~CGMChart() +{ + // delete the whole textentry structure + + TextEntry* pTextEntry; + while( ( pTextEntry = (TextEntry*)maTextEntryList.First() ) != NULL ) + { + DeleteTextEntry( pTextEntry ); + } +}; + +// --------------------------------------------------------------- + +void CGMChart::DeleteTextEntry( TextEntry* pTextEntry ) +{ + if ( pTextEntry ) + { + delete pTextEntry->pText; + for ( TextAttribute* pTAttr = pTextEntry->pAttribute; pTAttr != NULL ; ) + { + TextAttribute* pTempTAttr = pTAttr; + pTAttr = pTAttr->pNextAttribute; + delete pTempTAttr; + } + delete pTextEntry; + maTextEntryList.Remove( pTextEntry ); + } +}; + +// --------------------------------------------------------------- + +void CGMChart::InsertTextEntry( TextEntry* pTextEntry ) +{ + maTextEntryList.Insert( pTextEntry ); +}; + +// --------------------------------------------------------------- + +// --------------------------------------------------------------- +void CGMChart::ResetAnnotation() +{ + mDataNode[ 0 ].nZoneEnum = 0; +} + +// --------------------------------------------------------------- + +sal_Bool CGMChart::IsAnnotation() +{ + return ( mDataNode[ 0 ].nZoneEnum == 0 ); +}; + diff --git a/filter/source/graphicfilter/icgm/chart.hxx b/filter/source/graphicfilter/icgm/chart.hxx new file mode 100644 index 000000000000..b1b5e53d81eb --- /dev/null +++ b/filter/source/graphicfilter/icgm/chart.hxx @@ -0,0 +1,214 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_CHART_HXX_ +#define CGM_CHART_HXX_ + +#include + +/* FILE TYPE CONSTANTS: */ +#define NOCHART 0 /* Undefined chart. */ +#define XYCHART 1 /* Standard XY chart. */ +#define PIECHART 21 /* Standard pie chart file. */ +#define ORGCHART 26 /* Standard org chart file. */ +#define TTLCHART 31 /* Title chart file. */ +#define BULCHART 32 /* Bullet chart file. */ +#define TABCHART 33 /* Table chart file. */ +#define DRWCHART 41 /* Chart with drawings only.*/ +#define MLTCHART 42 /* Multiple chart file. */ +#define LASTCHART 45 /* The largest chart type. */ +#define SHWFILE 46 /* Slide show file. */ +#define SYMFILE 47 /* Symbol file. */ +/* the following were added although SPC doesn't have a #define */ +/* for them... */ +#define AUTOTTLCHT 95 /* Autobuild TTL CHT */ +#define AUTOBULCHT 96 /* Autobuild BUL CHT */ +#define AUTOTABCHT 97 /* Autobuild TAB CHT */ + +/* FNC 10/11/93: for the chart stream, ALLCHART was added. */ +/* It is used specifically by PPT in its Template to let */ +/* us know that the template applies to all charts, not to */ +/* one specific chart type. */ +#define ALLCHART 127 /* Applies to all chart types */ +#define ALLCHART_TPL 255 /* Applies to all chart types */ + +#define IOC_CHTTITLE 1 /* Title for any chart. */ +#define IOC_CHTFOOTNOTE 2 /* ::com::sun::star::text::Footnote for any chart. */ +#define IOC_XYAXIS 3 /* Axis title for XY charts. */ +#define IOC_XYSERIESLEGEND 4 /* Series legend titles for XY charts. */ +#define IOC_PIETITLE 5 /* Title for pie charts. */ +#define IOC_TABLEBODY 6 /* Table chart text element. */ +#define IOC_TITLEBODY 7 /* Title chart text element. */ +#define IOC_BULLETBODY 8 /* Bullet chart text element. */ +#define IOC_XYLEGENDTITLE 9 /* Legend title for XY charts. */ +#define IOC_PIELEGENDTITLE 10 /* Legend title for pie charts. */ +#define IOC_TABLEGENDTITLE 11 /* Legend title for table charts. */ + +typedef struct TextAttribute +{ + sal_uInt16 nTextAttribCount; + sal_Int8 nTextColorIndex; + sal_Int8 nTextColorRed; + sal_Int8 nTextColorGreen; + sal_Int8 nTextColorBlue; + sal_Int8 nShadowColorIndex; + sal_Int8 nShadowColorRed; + sal_Int8 nShadowColorGreen; + sal_Int8 nShadowColorBlue; + float nTextAttribSize; + sal_uInt16 nTextAttribBits; + sal_Int8 nTextFontType; // font identifiers + sal_Int8 nTextCharPage; + sal_uInt16 nTextFontFamily; + sal_Int8 nTextFontMemberID; + sal_Int8 nTextFontVendorID; + TextAttribute* pNextAttribute; // zero or pointer to next TextAttribute +} TextAttribute; + +typedef struct TextEntry +{ + sal_uInt16 nTypeOfText; + sal_uInt16 nRowOrLineNum; + sal_uInt16 nColumnNum; + sal_uInt16 nZoneSize; // textzone attributes + sal_uInt16 nLineType; + sal_uInt16 nAttributes; + char* pText; // null terminated text + TextAttribute* pAttribute; +} TextEntry; + +typedef struct ZoneOption +{ + char nOverTitle; + char nOverBody; + char nOverFoot; + char nFStyle_Title; + char nFStyle_Body; + char nFStyle_Foot; + char nFOutc_Title; + char nFOutc_Body; + char nFOutc_Foot; + char nFFillc_Title; + char nFFillc_Body; + char nFFillc_Foot; +} ZoneOption; + +typedef struct BulletOption +{ + char nBType; + char nBSize; + char nBColor; + sal_Int16 nBStart; + double nTMargin; + double nBSpace; + char nCPlace; +} BulletOption; + +typedef struct BulDef +{ + char btype; + char bsize; + char bcolor; + char bnumber; +} BulDef; + +typedef struct BulletLines +{ + BulDef nBulDef[ 48 ]; +} BulletLines; + +typedef struct IntSettings +{ + sal_uInt16 nCountry; + sal_uInt16 nDateFormat; + sal_uInt16 nDateSep; + sal_uInt16 nTimeFormat; + sal_uInt16 nTimeSep; + sal_uInt16 nNumSeps; + sal_uInt16 nCurrencyFormat; + char nCurrencySymbol[ 5 ]; +} IntSettings; + +typedef struct PageOrientDim +{ + char nOrientation; + char nDimension; + float nPageX; + float nPageY; +} PageOrientDim; + +typedef struct DataNode +{ + sal_Int16 nBoxX1; + sal_Int16 nBoxY1; + sal_Int16 nBoxX2; + sal_Int16 nBoxY2; + sal_Int8 nZoneEnum; +} DataNode; + +typedef struct ChartZone +{ + sal_Int16 nMinX; + sal_Int16 nMinY; + sal_Int16 nMaxX; + sal_Int16 nMaxY; + char nUserDef; + char nPad1; +} ChartZone; + +class CGM; +class CGMImpressOutAct; +class CGMChart +{ + friend class CGM; + friend class CGMImpressOutAct; + + protected: + CGM* mpCGM; + sal_Int8 mnCurrentFileType; + List maTextEntryList; + DataNode mDataNode[ 7 ]; + ChartZone mChartZone; + PageOrientDim mPageOrientDim; + BulletOption mBulletOption; + BulletLines mBulletLines; + ZoneOption mZoneOption; + IntSettings mIntSettings; + + public: + CGMChart( CGM& rCGM ); + ~CGMChart(); + + void DeleteTextEntry( TextEntry* ); + void InsertTextEntry( TextEntry* ); + + void ResetAnnotation(); + sal_Bool IsAnnotation(); +}; + +#endif + diff --git a/filter/source/graphicfilter/icgm/class0.cxx b/filter/source/graphicfilter/icgm/class0.cxx new file mode 100644 index 000000000000..8ec31f03258c --- /dev/null +++ b/filter/source/graphicfilter/icgm/class0.cxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#include +#include + +// --------------------------------------------------------------- + +void CGM::ImplDoClass0() +{ + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1, "Begin Metafile" ) + { + ImplSetMapMode(); + mbMetaFile = sal_True; + } + break; + case 0x02 : ComOut( CGM_LEVEL1, "End MetaFile" ) + { + if ( mpBitmapInUse ) // vorhandene grafik verarbeiten, + { + CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap(); + // irgendetwas mit der Bitmap anfangen + mpOutAct->DrawBitmap( pBmpDesc ); + delete mpBitmapInUse; + mpBitmapInUse = NULL; + } + mbIsFinished = sal_True; + mbPictureBody = sal_False; + mbMetaFile = sal_False; + } + break; + case 0x03 : ComOut( CGM_LEVEL1, "Begin Picture" ) + { + ImplDefaultReplacement(); + ImplSetMapMode(); + if ( mbPicture ) + mbStatus = sal_False; + else + { + *pCopyOfE = *pElement; + mbPicture = mbFirstOutPut = sal_True; + mbFigure = sal_False; + mnAct4PostReset = 0; + if ( mpChart == NULL ) // normal CGM Files determines "BeginPic" + mpOutAct->InsertPage(); // as the next slide + } + } + break; + case 0x04 : ComOut( CGM_LEVEL1, "Begin Picture Body" ) + mbPictureBody = sal_True; + break; + case 0x05 : ComOut( CGM_LEVEL1, " End Picture" ) + { + if ( mbPicture ) + { + if ( mpBitmapInUse ) // vorhandene grafik verarbeiten, + { + CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap(); + // irgendetwas mit der Bitmap anfangen + mpOutAct->DrawBitmap( pBmpDesc ); + delete mpBitmapInUse; + mpBitmapInUse = NULL; + } + mpOutAct->EndFigure(); // eventuelle figuren schliessen + mpOutAct->EndGrouping(); // eventuelle gruppierungen noch abschliessen + *pElement = *pCopyOfE; + mbFigure = mbFirstOutPut = mbPicture = mbPictureBody = sal_False; + } + else + mbStatus = sal_False; + } + break; + case 0x06 : ComOut( CGM_LEVEL2, "Begin Segment" ) + pElement->bSegmentCount = sal_True; + break; + case 0x07 : ComOut( CGM_LEVEL2, "End Segment" ) + pElement->bSegmentCount = sal_True; + break; + case 0x08 : ComOut( CGM_LEVEL2, "Begin Figure" ) + mbFigure = sal_True; + mpOutAct->BeginFigure(); + break; + case 0x09 : ComOut( CGM_LEVEL2, "End Figure" ) + mpOutAct->EndFigure(); + mbFigure = sal_False; + break; + case 0x0d : ComOut( CGM_LEVEL3, "Begin Protection Region" ) break; + case 0x0e : ComOut( CGM_LEVEL3, "End Protection Region" ) break; + case 0x0f : ComOut( CGM_LEVEL3, "Begin Compound Line" ) break; + case 0x10 : ComOut( CGM_LEVEL3, "End Compound Line" ) break; + case 0x11 : ComOut( CGM_LEVEL3, "Begin Compound Text Path" ) break; + case 0x12 : ComOut( CGM_LEVEL3, "End Compound Text Path" ) break; + case 0x13 : ComOut( CGM_LEVEL3, "Begin Tile Array" ) break; // NS + case 0x14 : ComOut( CGM_LEVEL3, "End Tile Array" ) break; // NS + case 0xff : ComOut( CGM_GDSF_ONLY, "Filter Setup" ) break; + case 0xfe : ComOut( CGM_GDSF_ONLY, "Begin Block Text Region" ) break; + case 0xfd : ComOut( CGM_GDSF_ONLY, "End Block Text Region" ) break; + case 0xfc : ComOut( CGM_GDSF_ONLY, "Begin Group" ) + mpOutAct->BeginGroup(); + break; + case 0xfb : ComOut( CGM_GDSF_ONLY, "End Group" ) + mpOutAct->EndGroup(); + break; + case 0xfa : ComOut( CGM_GDSF_ONLY, "Begin Patch" ) break; + case 0xf9 : ComOut( CGM_GDSF_ONLY, "Begin Patch" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + + diff --git a/filter/source/graphicfilter/icgm/class1.cxx b/filter/source/graphicfilter/icgm/class1.cxx new file mode 100644 index 000000000000..33c62f5e2c6e --- /dev/null +++ b/filter/source/graphicfilter/icgm/class1.cxx @@ -0,0 +1,231 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include + +// --------------------------------------------------------------- + +void CGM::ImplDoClass1() +{ + long nInteger, nI0, nI1; + sal_uInt32 nUInteger; + + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1, "Metafile Version" ) + pElement->nMetaFileVersion = ImplGetI( pElement->nIntegerPrecision ); + break; + case 0x02 : ComOut( CGM_LEVEL1, "Metafile Description" ) break; + case 0x03 : ComOut( CGM_LEVEL1, "VDC Type" ) + { + nUInteger = ImplGetUI16(); + switch( nUInteger ) + { + case 0 : pElement->eVDCType = VDC_INTEGER; break; + case 1 : pElement->eVDCType = VDC_REAL; break; + default: mbStatus = sal_False; break; + } + } + break; + case 0x04 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Integer Precision" ) + { + nInteger = ImplGetI( pElement->nIntegerPrecision ); + switch ( nInteger ) + { + case 32 : + case 24 : + case 16 : + case 8 : pElement->nIntegerPrecision = nInteger >> 3; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x05 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Real Precision" ) + { + nUInteger = ImplGetUI16( 4 ); + nI0 = ImplGetI( pElement->nIntegerPrecision ); // exponent + nI1 = ImplGetI( pElement->nIntegerPrecision ); // mantisse + switch( nUInteger ) + { + case 0 : + pElement->eRealPrecision = RP_FLOAT; + switch ( nI0 ) + { + case 9 : + if ( nI1 != 23 ) + mbStatus = sal_False; + pElement->nRealSize = 4; + break; + case 12 : + if ( nI1 != 52 ) + mbStatus =sal_False; + pElement->nRealSize = 8; + break; + default: + mbStatus = sal_False; + break; + } + break; + case 1 : + pElement->eRealPrecision = RP_FIXED; + if ( nI0 != nI1 ) + mbStatus = sal_False; + if ( nI0 == 16 ) + pElement->nRealSize = 4; + else if ( nI0 == 32 ) + pElement->nRealSize = 8; + else + mbStatus = sal_False; + break; + default : + mbStatus = sal_False; break; + } + } + break; + case 0x06 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Index Precision" ) + { + nInteger = ImplGetI( pElement->nIntegerPrecision ); + switch ( nInteger ) + { + case 32 : + case 24 : + case 16 : + case 8 : pElement->nIndexPrecision = nInteger >> 3; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x07 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Color Precision" ) + { + nInteger = ImplGetI( pElement->nIntegerPrecision ); + switch ( nInteger ) + { + case 32 : + case 24 : + case 16 : + case 8 : pElement->nColorPrecision = nInteger >> 3; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x08 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Color Index Precision" ) + { + nInteger = ImplGetI( pElement->nIntegerPrecision ); + switch ( nInteger ) + { + case 32 : + case 24 : + case 16 : + case 8 : pElement->nColorIndexPrecision = nInteger >> 3; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x09 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Maximum Colour Index" ) + { + pElement->nColorMaximumIndex = ImplGetUI( pElement->nColorIndexPrecision ); + if ( ( pElement->nColorMaximumIndex > 256 /*255*/ ) || ( pElement->nColorMaximumIndex == 0 ) ) + mbStatus = sal_False; + } + break; + case 0x0a : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Color Value Extent" ) + { + if ( pElement->eColorModel == CM_RGB ) + nI1 = 6; + else + { + nI1 = 8; + mbStatus = sal_False; // CMYK is not supported + } + for ( nI0 = 0; nI0 < nI1; nI0++ ) + { + pElement->nColorValueExtent[ nI0 ] = (sal_uInt8)ImplGetUI( pElement->nColorPrecision ); + } + } + break; + case 0x0b : ComOut( CGM_LEVEL1, "MetaFile Element List" ) break; + case 0x0c : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "MetaFile Default Replacement" ) + { + if ( mnElementSize > 1 ) + { + sal_Int8* pBuf = new sal_Int8[ mnElementSize ]; + if ( pBuf ) + { + memcpy( pBuf, mpSource, mnElementSize ); + maDefRepList.Insert( pBuf, LIST_APPEND ); + maDefRepSizeList.Insert( (void*)mnElementSize, LIST_APPEND ); + } + } + mnParaSize = mnElementSize; + } + break; + case 0x0d : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Font List" ) + { + while ( mnParaSize < mnElementSize ) + { + sal_uInt32 nSize; + nSize = ImplGetUI( 1 ); + pElement->aFontList.InsertName( mpSource + mnParaSize, nSize ); + mnParaSize += nSize; + } + } + break; + case 0x0e : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Character Set List" ) + { + while ( mnParaSize < mnElementSize ) + { + sal_uInt32 nCharSetType; + sal_uInt32 nSize; + nCharSetType = ImplGetUI16(); + nSize = ImplGetUI( 1 ); + pElement->aFontList.InsertCharSet( (CharSetType)nCharSetType, mpSource + mnParaSize, nSize ); + mnParaSize += nSize; + } + } + break; + case 0x0f : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Character Coding Announcer" ) + pElement->eCharacterCodingA = (CharacterCodingA)ImplGetUI16(); + break; + case 0x10 : ComOut( CGM_LEVEL2, "Name Precision" ) break; // NS + case 0x11 : ComOut( CGM_LEVEL2, "Maximum VDC Extent" ) break; // NS + case 0x12 : ComOut( CGM_LEVEL2, "Segment Priority Extent" ) break; // NS + case 0x13 : ComOut( CGM_LEVEL3, "Color Model" ) break; // NS + case 0x14 : ComOut( CGM_LEVEL3, "Color Calibration" ) break; // NS + case 0x15 : ComOut( CGM_LEVEL3, "Font Properties" ) break; // NS + case 0x16 : ComOut( CGM_LEVEL3, "Glyph Mapping" ) break; // NS + case 0x17 : ComOut( CGM_LEVEL3, "Symbol Library List" ) break; // NS + case 0xfc : ComOut( CGM_GDSF_ONLY, "Inquire Function Support" ) break; + case 0xfa : ComOut( CGM_GDSF_ONLY, "End Metafile Defaults Replacement" ) break; + case 0xf8 : ComOut( CGM_GDSF_ONLY, "Set Color Value Desc Extent" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + + diff --git a/filter/source/graphicfilter/icgm/class2.cxx b/filter/source/graphicfilter/icgm/class2.cxx new file mode 100644 index 000000000000..8b4722b0f19c --- /dev/null +++ b/filter/source/graphicfilter/icgm/class2.cxx @@ -0,0 +1,227 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include + +// --------------------------------------------------------------- + +void CGM::ImplDoClass2() +{ + sal_uInt32 nUInteger; + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Scaling Mode" ) + { + if ( mnElementSize ) // HACK (NASA.CGM) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eScalingMode = SM_ABSTRACT; break; + case 1 : pElement->eScalingMode = SM_METRIC; break; + default : mbStatus = sal_False; break; + } + pElement->nScalingFactor = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + ImplSetMapMode(); + } + } + break; + case 0x02 : ComOut( CGM_LEVEL1, "Color Selection Mode" ) + { + nUInteger = ImplGetUI16(); + switch( nUInteger ) + { + case 0 : pElement->eColorSelectionMode = CSM_INDEXED; break; + case 1 : pElement->eColorSelectionMode = CSM_DIRECT; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x03 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Line Width Specification Mode" ) + { + nUInteger = ImplGetUI16(); + switch( nUInteger ) + { + case 0 : pElement->eLineWidthSpecMode = SM_ABSOLUTE; break; + case 1 : pElement->eLineWidthSpecMode = SM_SCALED; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x04 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Marker Size Specification Mode" ) + { + nUInteger = ImplGetUI16(); + switch( nUInteger ) + { + case 0 : pElement->eMarkerSizeSpecMode = SM_ABSOLUTE; break; + case 1 : pElement->eMarkerSizeSpecMode = SM_SCALED; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x05 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Edge Width Specification Mode" ) + { + nUInteger = ImplGetUI16(); + switch( nUInteger ) + { + case 0 : pElement->eEdgeWidthSpecMode = SM_ABSOLUTE; break; + case 1 : pElement->eEdgeWidthSpecMode = SM_SCALED; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x06 : ComOut( CGM_LEVEL1, "VDC Extent" ) + { + ImplGetRectangleNS( pElement->aVDCExtent ); + ImplSetMapMode(); + } + break; + case 0x07 : ComOut( CGM_LEVEL1, "Background Color" ) + pElement->nBackGroundColor = ImplGetBitmapColor( sal_True ); + break; + case 0x08 : ComOut( CGM_LEVEL2, "Device Viewport" ) + { + if ( pElement->eVDCType == VDC_INTEGER ) + ImplGetRectangle( pElement->aDeviceViewPort ); + ImplSetMapMode(); + } + break; + case 0x09 : ComOut( CGM_LEVEL2, "Device Viewport Specification Mode" ) + { + nUInteger = ImplGetUI16( 8 ); + switch( nUInteger ) + { + case 0 : pElement->eDeviceViewPortMode = DVPM_FRACTION; break; + case 1 : pElement->eDeviceViewPortMode = DVPM_METRIC; break; + case 2 : pElement->eDeviceViewPortMode = DVPM_DEVICE; break; + default : mbStatus = sal_False; break; + } + pElement->nDeviceViewPortScale = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + ImplSetMapMode(); + } + break; + case 0x0a : ComOut( CGM_LEVEL2, "Device Viewport Mapping" ) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eDeviceViewPortMap = DVPM_NOT_FORCED; break; + case 1 : pElement->eDeviceViewPortMap = DVPM_FORCED; break; + default : mbStatus = sal_False; break; + } + switch( ImplGetUI16() ) + { + case 0 : pElement->eDeviceViewPortMapH = DVPMH_LEFT; break; + case 1 : pElement->eDeviceViewPortMapH = DVPMH_CENTER; break; + case 2 : pElement->eDeviceViewPortMapH = CVPMH_RIGHT; break; + default : mbStatus = sal_False; break; + } + switch( ImplGetUI16() ) + { + case 0 : pElement->eDeviceViewPortMapV = DVPMV_BOTTOM; break; + case 1 : pElement->eDeviceViewPortMapV = DVPMV_CENTER; break; + case 2 : pElement->eDeviceViewPortMapV = DVPMV_TOP; break; + default : mbStatus = sal_False; break; + } + ImplSetMapMode(); + } + break; + case 0x0b : ComOut( CGM_LEVEL2, "Line Representation" ) + { + LineBundle aTempLineBundle; + aTempLineBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) ); + aTempLineBundle.eLineType = (LineType)ImplGetI( pElement->nIndexPrecision ); + aTempLineBundle.nLineWidth = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + aTempLineBundle.SetColor( ImplGetBitmapColor() ); + pElement->InsertBundle( pElement->aLineList, aTempLineBundle ); + } + break; + case 0x0c : ComOut( CGM_LEVEL2, "Marker Representation" ) + { + MarkerBundle aTempMarkerBundle; + aTempMarkerBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) ); + aTempMarkerBundle.eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision ); + aTempMarkerBundle.nMarkerSize = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + aTempMarkerBundle.SetColor( ImplGetBitmapColor() ); + pElement->InsertBundle( pElement->aMarkerList, aTempMarkerBundle ); + } + break; + case 0x0d : ComOut( CGM_LEVEL2, "Text Representation" ) + { + TextBundle aTempTextBundle; + aTempTextBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) ); + aTempTextBundle.nTextFontIndex = ImplGetI( pElement->nIndexPrecision ); + aTempTextBundle.eTextPrecision = (TextPrecision)ImplGetI( pElement->nIndexPrecision ); + aTempTextBundle.nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + aTempTextBundle.nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + aTempTextBundle.SetColor( ImplGetBitmapColor() ); + pElement->InsertBundle( pElement->aTextList, aTempTextBundle ); + } + break; + case 0x0e : ComOut( CGM_LEVEL2, "Fill Representation" ) + { + FillBundle aTempFillBundle; + aTempFillBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) ); + aTempFillBundle.eFillInteriorStyle = (FillInteriorStyle)ImplGetI( pElement->nIndexPrecision ); + aTempFillBundle.SetColor( ImplGetBitmapColor() ); + aTempFillBundle.nFillPatternIndex = ImplGetI( pElement->nIndexPrecision ); + aTempFillBundle.nFillHatchIndex = ImplGetI( pElement->nIndexPrecision ); + pElement->InsertBundle( pElement->aFillList, aTempFillBundle ); + } + break; + case 0x0f : ComOut( CGM_LEVEL2, "Edge Representation" ) + { + EdgeBundle aTempEdgeBundle; + aTempEdgeBundle.SetIndex( ImplGetI( pElement->nIndexPrecision ) ); + aTempEdgeBundle.eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision ); + aTempEdgeBundle.nEdgeWidth = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + aTempEdgeBundle.SetColor( ImplGetBitmapColor() ); + pElement->InsertBundle( pElement->aEdgeList, aTempEdgeBundle ); + } + break; + case 0x10 : ComOut( CGM_LEVEL3, "Interior Style Specification Mode" ) break; // NS + case 0x11 : ComOut( CGM_LEVEL3, "Line and Edge Type Definition" ) break; + case 0x12 : ComOut( CGM_LEVEL3, "Hatch Style Definition" ) break; // NS + case 0x13 : ComOut( CGM_LEVEL3, "Geometric Pattern Definition" ) break; // NS + case 0xff : ComOut( CGM_GDSF_ONLY, "inquire VDC EXTENT" ) break; + case 0xfe : ComOut( CGM_GDSF_ONLY, "inquire Background Color" ) break; + case 0xfd : ComOut( CGM_GDSF_ONLY, "inquire Device Viewport" ) break; + case 0xfc : ComOut( CGM_GDSF_ONLY, "set Font Selection Mode" ) break; + case 0xfb : ComOut( CGM_GDSF_ONLY, "inquire Color Selection Mode" ) break; + case 0xfa : ComOut( CGM_GDSF_ONLY, "inquire Font Selection Mode" ) break; + case 0xf9 : ComOut( CGM_GDSF_ONLY, "set Char Height Spec Mode" ) + { + ImplGetUI16(); // -Wall is this really needed? + } + break; + case 0xf8 : ComOut( CGM_GDSF_ONLY, "set Background Style" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + + diff --git a/filter/source/graphicfilter/icgm/class3.cxx b/filter/source/graphicfilter/icgm/class3.cxx new file mode 100644 index 000000000000..d64b3456624c --- /dev/null +++ b/filter/source/graphicfilter/icgm/class3.cxx @@ -0,0 +1,144 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + +// --------------------------------------------------------------- + +void CGM::ImplDoClass3() +{ + sal_uInt32 nUInteger; + long nI0, nI1; + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1, "VDC Integer Precision" ) + { + switch( ImplGetI( pElement->nIntegerPrecision ) ) + { + case 16 : pElement->nVDCIntegerPrecision = 2; break; + case 32 : pElement->nVDCIntegerPrecision = 4; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x02 : ComOut( CGM_LEVEL1, "VDC Real Precision" ) + { + nUInteger = ImplGetUI16(); + nI0 = ImplGetI( pElement->nIntegerPrecision ); // exponent + nI1 = ImplGetI( pElement->nIntegerPrecision ); // mantisse + switch( nUInteger ) + { + case 0 : + pElement->eVDCRealPrecision = RP_FLOAT; + switch ( nI0 ) + { + case 9 : + if ( nI1 != 23 ) + mbStatus = sal_False; + pElement->nVDCRealSize = 4; + break; + case 12 : + if ( nI1 != 52 ) + mbStatus =sal_False; + pElement->nVDCRealSize = 8; + break; + default: + mbStatus = sal_False; + break; + } + break; + case 1 : + pElement->eVDCRealPrecision = RP_FIXED; + if ( nI0 != nI1 ) + mbStatus = sal_False; + if ( nI0 == 16 ) + pElement->nVDCRealSize = 4; + else if ( nI0 == 32 ) + pElement->nVDCRealSize = 8; + else + mbStatus = sal_False; + break; + default : + mbStatus = sal_False; break; + } + } + break; + case 0x03 : ComOut( CGM_LEVEL1, "Auxiliary Colour" ) + { + pElement->nAuxiliaryColor = ImplGetBitmapColor(); + } + break; + case 0x04 : ComOut( CGM_LEVEL1, "Transparency" ) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eTransparency = T_OFF; break; + case 1 : pElement->eTransparency = T_ON; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x05 : ComOut( CGM_LEVEL1, "Clip Rectangle" ) + ImplGetRectangle( pElement->aClipRect ); + break; + case 0x06 : ComOut( CGM_LEVEL1, "Clip Indicator" ) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eClipIndicator = CI_OFF; break; + case 1 : pElement->eClipIndicator = CI_ON; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x07 : ComOut( CGM_LEVEL2, "Line Clipping Mode" ) break; // NS + case 0x08 : ComOut( CGM_LEVEL2, "Marker Clipping Mode" ) break; // NS + case 0x09 : ComOut( CGM_LEVEL2, "Edge Clipping Mode" ) break; // NS + case 0x0a : ComOut( CGM_LEVEL2, "New Region" ) + mpOutAct->NewRegion(); + break; + case 0x0b : ComOut( CGM_LEVEL2, "Save Primitive Context" ) break; // NS + case 0x0c : ComOut( CGM_LEVEL2, "Restore Primitive Context" ) break; // NS + case 0x11 : ComOut( CGM_LEVEL3, "Protection Region Indicator" ) break; + case 0x12 : ComOut( CGM_LEVEL3, "Generalized Text Path Mode" ) break; // NS + case 0x13 : ComOut( CGM_LEVEL3, "Mitre Limit" ) + pElement->nMitreLimit = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + break; // NS + case 0x14 : ComOut( CGM_LEVEL3, "Transparent Cell Color" ) break; // NS + case 0xfc : ComOut( CGM_GDSF_ONLY, "Text Path Alignment Modes" ) break; + case 0xfd : ComOut( CGM_GDSF_ONLY, "Pop Transformation Stack" ) break; + case 0xfe : ComOut( CGM_GDSF_ONLY, "Push Transformation Stack" ) break; + case 0xff : ComOut( CGM_GDSF_ONLY, "Set Patch ID" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + + diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx new file mode 100644 index 000000000000..ee8aaef531d5 --- /dev/null +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -0,0 +1,861 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include + +using namespace ::com::sun::star; + +double CGM::ImplGetOrientation( FloatPoint& rCenter, FloatPoint& rPoint ) +{ + double fOrientation; + + double nX = rPoint.X - rCenter.X; + double nY = rPoint.Y - rCenter.Y; + + fOrientation = acos( nX / sqrt( nX * nX + nY * nY ) ) * 57.29577951308; + if ( nY > 0 ) + fOrientation = 360 - fOrientation; + + return fOrientation; +} + +// --------------------------------------------------------------- + +void CGM::ImplSwitchStartEndAngle( double& rStartAngle, double& rEndAngle ) +{ + double nTemp; + nTemp = rStartAngle; + rStartAngle = rEndAngle; + rEndAngle = nTemp; +} + +// --------------------------------------------------------------- + +void CGM::ImplGetVector( double* pVector ) +{ + if ( pElement->eVDCType == VDC_REAL ) + { + for ( sal_uInt32 i = 0; i < 4; i++ ) + { + pVector[ i ] = (double)ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + } + } + else + { + for ( sal_uInt32 i = 0; i < 4; i++ ) + { + pVector[ i ] = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + } + } + pVector[ 0 ] *= mnVDCXmul; + pVector[ 2 ] *= mnVDCXmul; + pVector[ 1 ] *= mnVDCYmul; + pVector[ 3 ] *= mnVDCYmul; +} + +// --------------------------------------------------------------- +sal_Bool CGM::ImplGetEllipse( FloatPoint& rCenter, FloatPoint& rRadius, double& rAngle ) +{ + FloatPoint aPoint1, aPoint2; + double fRot1, fRot2; + ImplGetPoint( rCenter, sal_True ); + ImplGetPoint( aPoint1, sal_True ); + ImplGetPoint( aPoint2, sal_True ); + fRot1 = ImplGetOrientation( rCenter, aPoint1 ); + fRot2 = ImplGetOrientation( rCenter, aPoint2 ); + rAngle = ImplGetOrientation( rCenter, aPoint1 ); + aPoint1.X -= rCenter.X; + aPoint1.Y -= rCenter.Y; + rRadius.X = sqrt( aPoint1.X * aPoint1.X + aPoint1.Y * aPoint1.Y ); + aPoint2.X -= rCenter.X; + aPoint2.Y -= rCenter.Y; + rRadius.Y = sqrt( aPoint2.X * aPoint2.X + aPoint2.Y * aPoint2.Y ); + + if ( fRot1 > fRot2 ) + { + if ( ( fRot1 - fRot2 ) < 180 ) + return sal_False; + } + else + { + if ( ( fRot2 - fRot1 ) > 180 ) + return sal_False; + } + return sal_True; +} + +void CGM::ImplDoClass4() +{ + if ( mbFirstOutPut ) + mpOutAct->FirstOutPut(); + + if ( mpBitmapInUse && ( mnElementID != 9 ) ) // vorhandene grafik verarbeiten, + { // da jetzt nicht bitmap actions anstehen + CGMBitmapDescriptor* pBmpDesc = mpBitmapInUse->GetBitmap(); + // irgendetwas mit der Bitmap anfangen + mpOutAct->DrawBitmap( pBmpDesc ); + delete mpBitmapInUse; + mpBitmapInUse = NULL; + } + + if ( ( mpChart == NULL ) || mpChart->IsAnnotation() ) + { + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1, "PolyLine" ) + { + sal_uInt32 nPoints = mnElementSize / ImplGetPointSize(); + Polygon aPolygon( (sal_uInt16)nPoints ); + for ( sal_uInt16 i = 0; i < nPoints; i++) + { + FloatPoint aFloatPoint; + ImplGetPoint( aFloatPoint, sal_True ); + aPolygon.SetPoint( Point( (long)aFloatPoint.X, (long)aFloatPoint.Y ), i ); + } + if ( mbFigure ) + mpOutAct->RegPolyLine( aPolygon ); + else + mpOutAct->DrawPolyLine( aPolygon ); + } + break; + + case 0x02 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Disjoint PolyLine" ) + { + USHORT nPoints = sal::static_int_cast< USHORT >( + mnElementSize / ImplGetPointSize()); + if ( ! ( nPoints & 1 ) ) + { + nPoints >>= 1; + FloatPoint aFloatPoint; + if ( mbFigure ) + { + Polygon aPolygon( nPoints ); + for ( sal_uInt16 i = 0; i < nPoints; i++ ) + { + ImplGetPoint( aFloatPoint, sal_True ); + aPolygon.SetPoint( Point( (long)aFloatPoint.X, (long)aFloatPoint.Y ), 0 ); + } + mpOutAct->RegPolyLine( aPolygon ); + } + else + { + mpOutAct->BeginGroup(); + Polygon aPolygon( (sal_uInt16)2 ); + for ( sal_uInt16 i = 0; i < nPoints; i++ ) + { + ImplGetPoint( aFloatPoint, sal_True ); + aPolygon.SetPoint( Point( (long)aFloatPoint.X, (long)aFloatPoint.Y ), 0 ); + ImplGetPoint( aFloatPoint, sal_True ); + aPolygon.SetPoint( Point( (long)aFloatPoint.X, (long)aFloatPoint.Y ), 1); + mpOutAct->DrawPolyLine( aPolygon ); + } + mpOutAct->EndGroup(); + } + } + } + break; + + case 0x03 : ComOut( CGM_LEVEL1, "PolyMarker" ) break; + case 0x04 : ComOut( CGM_LEVEL1, "Text" ) + { + FloatPoint aFloatPoint; + sal_uInt32 nType, nSize; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + ImplGetPoint ( aFloatPoint, sal_True ); + nType = ImplGetUI16( 4 ); + nSize = ImplGetUI( 1 ); + mpSource[ mnParaSize + nSize ] = 0; + + ComOut( CGM_DESCRIPTION, (char*)mpSource + mnParaSize ); + + awt::Size aSize; + awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y ); + mpOutAct->DrawText( aPoint, aSize, + (char*)mpSource + mnParaSize, nSize, (FinalFlag)nType ); +// mnParaSize += nSize; + mnParaSize = mnElementSize; + } + break; + + case 0x05 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Restricted Text" ) + { + double dx, dy; + FloatPoint aFloatPoint; + sal_uInt32 nType, nSize; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + if ( pElement->eVDCType == VDC_REAL ) + { + dx = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + dy = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + } + else + { + dx = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + dy = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + } + ImplMapDouble( dx ); + ImplMapDouble( dy ); + + ImplGetPoint ( aFloatPoint, sal_True ); + nType = ImplGetUI16( 4 ); + nSize = ImplGetUI( 1 ); + + mpSource[ mnParaSize + nSize ] = 0; + + ComOut( CGM_DESCRIPTION, (char*)mpSource + mnParaSize ); + + awt::Point aPoint( (long)aFloatPoint.X, (long)aFloatPoint.Y ); + awt::Size aSize((long)dx, (long)dy); + mpOutAct->DrawText( aPoint, aSize , + (char*)mpSource + mnParaSize, nSize, (FinalFlag)nType ); +// mnParaSize += nSize; + mnParaSize = mnElementSize; + } + break; + + case 0x06 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Append Text" ) + { + sal_uInt32 nSize; + sal_uInt32 nType = ImplGetUI16( 4 ); + + nSize = ImplGetUI( 1 ); + mpSource[ mnParaSize + nSize ] = 0; + + ComOut( CGM_DESCRIPTION, (char*)mpSource + mnParaSize ); + + mpOutAct->AppendText( (char*)mpSource + mnParaSize, nSize, (FinalFlag)nType ); +// mnParaSize += nSize; + mnParaSize = mnElementSize; + } + break; + + case 0x07 : ComOut( CGM_LEVEL1, "Polygon" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + + USHORT nPoints = sal::static_int_cast< USHORT >( + mnElementSize / ImplGetPointSize()); + Polygon aPolygon( nPoints ); + for ( USHORT i = 0; i < nPoints; i++) + { + FloatPoint aFloatPoint; + ImplGetPoint( aFloatPoint, sal_True ); + aPolygon.SetPoint( Point ( (long)( aFloatPoint.X ), (long)( aFloatPoint.Y ) ), i ); + } + mpOutAct->DrawPolygon( aPolygon ); + } + break; + + case 0x08 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Polygon Set" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + + USHORT nPoints = 0; + Point* pPoints = new Point[ 0x4000 ]; + + PolyPolygon aPolyPolygon; + FloatPoint aFloatPoint; + sal_uInt32 nEdgeFlag; + while ( mnParaSize < mnElementSize ) + { + ImplGetPoint( aFloatPoint, sal_True ); + nEdgeFlag = ImplGetUI16(); + pPoints[ nPoints++ ] = Point( (long)aFloatPoint.X, (long)aFloatPoint.Y ); + if ( ( nEdgeFlag & 2 ) || ( mnParaSize == mnElementSize ) ) + { + Polygon aPolygon( nPoints ); + for ( USHORT i = 0; i < nPoints; i++ ) + { + aPolygon.SetPoint( pPoints[ i ], i ); + } + aPolyPolygon.Insert( aPolygon, POLYPOLY_APPEND ); + nPoints = 0; + } + } + delete[] pPoints; + mpOutAct->DrawPolyPolygon( aPolyPolygon ); + } + break; + + case 0x09 : ComOut( CGM_LEVEL1, "Cell Array" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + + if ( mpBitmapInUse ) + { + CGMBitmap* pBmpDesc = mpBitmapInUse->GetNext(); + if ( pBmpDesc ) // eventuell bekommen wir eine bitmap zurück, die nicht + { // zur vorherigen paßt -> diese müssen wir dann auch löschen + mpOutAct->DrawBitmap( pBmpDesc->GetBitmap() ); + delete pBmpDesc; + } + } + else + { + mpBitmapInUse = new CGMBitmap( *this ); + } + } + break; + + case 0x0a : ComOut( CGM_LEVEL1, "Generalized Drawing Primitive" ) + { + ImplGetI( pElement->nIntegerPrecision ); //-Wall is this needed + ImplGetUI( pElement->nIntegerPrecision ); //-Wall is this needed + mnParaSize = mnElementSize; + } + break; + + case 0x0b : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Rectangle" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + + FloatRect aFloatRect; + ImplGetRectangle( aFloatRect, sal_True ); + mpOutAct->DrawRectangle( aFloatRect ); + } + break; + + case 0x0c : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circle" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + + double fRotation = 0; + FloatPoint aCenter, aRadius; + ImplGetPoint( aCenter, sal_True ); + if ( pElement->eVDCType == VDC_REAL ) + aRadius.X = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + else + aRadius.X = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + ImplMapDouble( aRadius.X ); + aRadius.Y = aRadius.X; + mpOutAct->DrawEllipse( aCenter, aRadius, fRotation ); + } + break; + + case 0x0d : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc 3 Point" ) + { + int nSwitch = 0; + + FloatPoint aStartingPoint, aIntermediatePoint, aEndingPoint, aCenterPoint; + ImplGetPoint( aStartingPoint, sal_True ); + ImplGetPoint( aIntermediatePoint, sal_True ); + ImplGetPoint( aEndingPoint, sal_True ); + + double fA = aIntermediatePoint.X - aStartingPoint.X; + double fB = aIntermediatePoint.Y - aStartingPoint.Y; + double fC = aEndingPoint.X - aStartingPoint.X; + double fD = aEndingPoint.Y - aStartingPoint.Y; + + double fE = fA * ( aStartingPoint.X + aIntermediatePoint.X ) + fB * ( aStartingPoint.Y + aIntermediatePoint.Y ); + double fF = fC * ( aStartingPoint.X + aEndingPoint.X ) + fD * ( aStartingPoint.Y + aEndingPoint.Y ); + + double fG = 2.0 * ( fA * ( aEndingPoint.Y - aIntermediatePoint.Y ) - fB * ( aEndingPoint.X - aIntermediatePoint.X ) ); + + aCenterPoint.X = ( fD * fE - fB * fF ) / fG; + aCenterPoint.Y = ( fA * fF - fC * fE ) / fG; + + if ( fG != 0 ) + { + double fStartAngle = ImplGetOrientation( aCenterPoint, aStartingPoint ); + double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint ); + double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint ); + + if ( fStartAngle > fEndAngle ) + { + nSwitch ^=1; + aIntermediatePoint = aEndingPoint; + aEndingPoint = aStartingPoint; + aStartingPoint = aIntermediatePoint; + fG = fStartAngle; + fStartAngle = fEndAngle; + fEndAngle = fG; + } + if ( ! ( fInterAngle > fStartAngle ) && ( fInterAngle < fEndAngle ) ) + { + nSwitch ^=1; + aIntermediatePoint = aEndingPoint; + aEndingPoint = aStartingPoint; + aStartingPoint = aIntermediatePoint; + fG = fStartAngle; + fStartAngle = fEndAngle; + fEndAngle = fG; + } + double fRadius = sqrt( pow( ( aStartingPoint.X - aCenterPoint.X ), 2 ) + pow( ( aStartingPoint.Y - aCenterPoint.Y ), 2 ) ) ; + + if ( mbFigure ) + { + Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ), + Size( ( static_cast< long >( 2 * fRadius ) ), (long)( 2 * fRadius) ) ); + Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), POLY_ARC ); + if ( nSwitch ) + mpOutAct->RegPolyLine( aPolygon, sal_True ); + else + mpOutAct->RegPolyLine( aPolygon ); + } + else + { + fG = 0; + FloatPoint aRadius; + aRadius.X = aRadius.Y = fRadius; + mpOutAct->DrawEllipticalArc( aCenterPoint, aRadius, fG, 2, fStartAngle, fEndAngle ); + } + } + } + break; + + case 0x0e : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc 3 Point Close" ) + { + int nSwitch = 0; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + FloatPoint aStartingPoint, aIntermediatePoint, aEndingPoint, aCenterPoint; + ImplGetPoint( aStartingPoint ); + ImplGetPoint( aIntermediatePoint ); + ImplGetPoint( aEndingPoint ); + + double fA = aIntermediatePoint.X - aStartingPoint.X; + double fB = aIntermediatePoint.Y - aStartingPoint.Y; + double fC = aEndingPoint.X - aStartingPoint.X; + double fD = aEndingPoint.Y - aStartingPoint.Y; + + double fE = fA * ( aStartingPoint.X + aIntermediatePoint.X ) + fB * ( aStartingPoint.Y + aIntermediatePoint.Y ); + double fF = fC * ( aStartingPoint.X + aEndingPoint.X ) + fD * ( aStartingPoint.Y + aEndingPoint.Y ); + + double fG = 2.0 * ( fA * ( aEndingPoint.Y - aIntermediatePoint.Y ) - fB * ( aEndingPoint.X - aIntermediatePoint.X ) ); + + aCenterPoint.X = ( fD * fE - fB * fF ) / fG; + aCenterPoint.Y = ( fA * fF - fC * fE ) / fG; + + if ( fG != 0 ) + { + double fStartAngle = ImplGetOrientation( aCenterPoint, aStartingPoint ); + double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint ); + double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint ); + + if ( fStartAngle > fEndAngle ) + { + nSwitch ^=1; + aIntermediatePoint = aEndingPoint; + aEndingPoint = aStartingPoint; + aStartingPoint = aIntermediatePoint; + fG = fStartAngle; + fStartAngle = fEndAngle; + fEndAngle = fG; + } + if ( ! ( fInterAngle > fStartAngle ) && ( fInterAngle < fEndAngle ) ) + { + nSwitch ^=1; + aIntermediatePoint = aEndingPoint; + aEndingPoint = aStartingPoint; + aStartingPoint = aIntermediatePoint; + fG = fStartAngle; + fStartAngle = fEndAngle; + fEndAngle = fG; + } + FloatPoint fRadius; + fRadius.Y = fRadius.X = sqrt( pow( ( aStartingPoint.X - aCenterPoint.X ), 2 ) + pow( ( aStartingPoint.Y - aCenterPoint.Y ), 2 ) ) ; + + sal_uInt32 nType = ImplGetUI16(); + if ( nType == 0 ) + nType = 0; // is PIE + else + nType = 1; // is CHORD + + double fOrientation = 0; + mpOutAct->DrawEllipticalArc( aCenterPoint, fRadius, fOrientation, nType, fStartAngle, fEndAngle ); + } + } + break; + + case 0x0f : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc Centre" ) + { + double fOrientation, fStartAngle, fEndAngle, vector[ 4 ]; + FloatPoint aCenter, aRadius; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + ImplGetPoint( aCenter, sal_True ); + ImplGetVector( &vector[ 0 ] ); + + if ( pElement->eVDCType == VDC_REAL ) + { + aRadius.X = (double)ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + } + else + { + aRadius.X = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + } + + ImplMapDouble( aRadius.X ); + aRadius.Y = aRadius.X; + + fStartAngle = acos( vector[ 0 ] / sqrt( vector[ 0 ] * vector[ 0 ] + vector[ 1 ] * vector[ 1 ] ) ) * 57.29577951308; + fEndAngle = acos( vector[ 2 ] / sqrt( vector[ 2 ] * vector[ 2 ] + vector[ 3 ] * vector[ 3 ] ) ) * 57.29577951308; + + if ( vector[ 1 ] > 0 ) + fStartAngle = 360 - fStartAngle; + if ( vector[ 3 ] > 0 ) + fEndAngle = 360 - fEndAngle; + + if ( mbAngReverse ) + ImplSwitchStartEndAngle( fStartAngle, fEndAngle ); + + if ( mbFigure ) + { + Rectangle aBoundingBox( + Point( (long)( aCenter.X - aRadius.X ), long( aCenter.Y - aRadius.X ) ), + Size( static_cast< long >( 2 * aRadius.X ), (long)( 2 * aRadius.X ) ) ); + Polygon aPolygon( aBoundingBox, + Point( (long)vector[ 0 ], (long)vector[ 1 ] ), + Point( (long)vector[ 2 ], (long)vector[ 3 ] ), POLY_ARC ); + mpOutAct->RegPolyLine( aPolygon ); + } + else + { + fOrientation = 0; + mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, 2, fStartAngle, fEndAngle ); + } + mnParaSize = mnElementSize; + + } + break; + + case 0x10 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Circular Arc Centre Close" ) + { + double fOrientation, fStartAngle, fEndAngle, vector[ 4 ]; + FloatPoint aCenter, aRadius; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + ImplGetPoint( aCenter, sal_True ); + ImplGetVector( &vector[ 0 ] ); + if ( pElement->eVDCType == VDC_REAL ) + { + aRadius.X = (double)ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + } + else + { + aRadius.X = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + } + ImplMapDouble( aRadius.X ); + aRadius.Y = aRadius.X; + fStartAngle = acos( vector[ 0 ] / sqrt( vector[ 0 ] * vector[ 0 ] + vector[ 1 ] * vector[ 1 ] ) ) * 57.29577951308; + fEndAngle = acos( vector[ 2 ] / sqrt( vector[ 2 ] * vector[ 2 ] + vector[ 3 ] * vector[ 3 ] ) ) * 57.29577951308; + + if ( vector[ 1 ] > 0 ) + fStartAngle = 360 - fStartAngle; + if ( vector[ 3 ] > 0 ) + fEndAngle = 360 - fEndAngle; + + if ( mbAngReverse ) + ImplSwitchStartEndAngle( fStartAngle, fEndAngle ); + + + sal_uInt32 nType = ImplGetUI16(); + if ( nType == 0 ) + nType = 0; // is PIE + else + nType = 1; // is CHORD + fOrientation = 0; + + mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, + nType, fStartAngle, fEndAngle ); + mnParaSize = mnElementSize; + } + break; + + case 0x11 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Ellipse" ) + { + double fOrientation; + FloatPoint aCenter, aRadius; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + ImplGetEllipse( aCenter, aRadius, fOrientation ) ; + mpOutAct->DrawEllipse( aCenter, aRadius, fOrientation ) ; + } + break; + + case 0x12 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Elliptical Arc" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + + double fOrientation, fStartAngle, fEndAngle, vector[ 4 ]; + FloatPoint aCenter, aRadius; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + sal_Bool bDirection = ImplGetEllipse( aCenter, aRadius, fOrientation ); + ImplGetVector( &vector[ 0 ] ); + + fStartAngle = acos( vector[ 0 ] / sqrt( vector[ 0 ] * vector[ 0 ] + vector[ 1 ] * vector[ 1 ] ) ) * 57.29577951308; + fEndAngle = acos( vector[ 2 ] / sqrt( vector[ 2 ] * vector[ 2 ] + vector[ 3 ] * vector[ 3 ] ) ) * 57.29577951308; + + if ( vector[ 1 ] > 0 ) + fStartAngle = 360 - fStartAngle; + if ( vector[ 3 ] > 0 ) + fEndAngle = 360 - fEndAngle; + + if ( bDirection ) + mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, + 2, fStartAngle, fEndAngle ); + else + mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, + 2, fEndAngle, fStartAngle); + } + break; + + case 0x13 : ComOut( CGM_LEVEL1 | CGM_EXTENDED_PRIMITIVES_SET, "Elliptical Arc Close" ) + { + double fOrientation, fStartAngle, fEndAngle, vector[ 4 ]; + FloatPoint aCenter, aRadius; + + if ( mbFigure ) + mpOutAct->CloseRegion(); + + sal_Bool bDirection = ImplGetEllipse( aCenter, aRadius, fOrientation ); + ImplGetVector( &vector[ 0 ] ); + + fStartAngle = acos( vector[ 0 ] / sqrt( vector[ 0 ] * vector[ 0 ] + vector[ 1 ] * vector[ 1 ] ) ) * 57.29577951308; + fEndAngle = acos( vector[ 2 ] / sqrt( vector[ 2 ] * vector[ 2 ] + vector[ 3 ] * vector[ 3 ] ) ) * 57.29577951308; + + if ( vector[ 1 ] > 0 ) + fStartAngle = 360 - fStartAngle; + if ( vector[ 3 ] > 0 ) + fEndAngle = 360 - fEndAngle; + + sal_uInt32 nType = ImplGetUI16(); + if ( nType == 0 ) + nType = 0; // is PIE + else + nType = 1; // is CHORD + + if ( bDirection ) + mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, + nType, fStartAngle, fEndAngle ); + else + mpOutAct->DrawEllipticalArc( aCenter, aRadius, fOrientation, + nType, fEndAngle, fStartAngle); + } + break; + case 0x14 : ComOut( CGM_LEVEL2, "Circular Arc Centre Reversed" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x15 : ComOut( CGM_LEVEL2, "Connection Edge" ) // NS + { +// if ( mbFigure ) +// mpOutAct->CloseRegion(); + } + break; + case 0x16 : ComOut( CGM_LEVEL3, "Hyperbolic Arc" ) // NS + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x17 : ComOut( CGM_LEVEL3, "Parabolic Arc" ) // NS + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x18 : ComOut( CGM_LEVEL3, "Non Uniform B-Spline" ) // NS + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x19 : ComOut( CGM_LEVEL3, "Non Uniform Rational B-Spline" ) // NS + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x1a : ComOut( CGM_LEVEL3, "Polybezier" ) + { + sal_uInt32 nOrder = ImplGetI( pElement->nIntegerPrecision ); + + USHORT nNumberOfPoints = sal::static_int_cast< USHORT >(( mnElementSize - pElement->nIntegerPrecision ) / ImplGetPointSize()); + + Polygon aPolygon( nNumberOfPoints ); + + for ( USHORT i = 0; i < nNumberOfPoints; i++) + { + FloatPoint aFloatPoint; + ImplGetPoint( aFloatPoint, sal_True ); + aPolygon.SetPoint( Point ( (long)( aFloatPoint.X ), (long)( aFloatPoint.Y ) ), i ); + } + if ( nOrder & 4 ) + { + for ( USHORT i = 0; i < nNumberOfPoints; i++ ) + { + if ( ( i % 3 ) == 0 ) + aPolygon.SetFlags( i, POLY_NORMAL ); + else + aPolygon.SetFlags( i, POLY_CONTROL ); + } + } + else + { + for ( USHORT i = 0; i < nNumberOfPoints; i++ ) + { + switch ( i & 3 ) + { + case 0 : + case 3 : aPolygon.SetFlags( i, POLY_NORMAL ); break; + default : aPolygon.SetFlags( i, POLY_CONTROL ); break; + } + } + } + if ( mbFigure ) + mpOutAct->RegPolyLine( aPolygon ); + else + mpOutAct->DrawPolybezier( aPolygon ); + mnParaSize = mnElementSize; + } + break; + + case 0x1b : ComOut( CGM_LEVEL3, "Polysymbol" ) // NS + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x1c : ComOut( CGM_LEVEL3, "Bitonal Tile" ) // NS + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x1d : ComOut( CGM_LEVEL3, "Tile" ) // NS + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0x1e : ComOut( CGM_UNKNOWN_LEVEL, "Insert Object" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xff : ComOut( CGM_GDSF_ONLY, "Polybezier" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xfe : ComOut( CGM_GDSF_ONLY, "Sharp Polybezier" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xfd : ComOut( CGM_GDSF_ONLY, "Polyspline" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xfc : ComOut( CGM_GDSF_ONLY, "Reounded Rectangle" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xfb : ComOut( CGM_GDSF_ONLY, "Begin Cell Array" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xfa : ComOut( CGM_GDSF_ONLY, "End Cell Array" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xf9 : ComOut( CGM_GDSF_ONLY, "Insert File" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xf8 : ComOut( CGM_GDSF_ONLY, "Block Text" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xf7 : ComOut( CGM_GDSF_ONLY, "Variable Width Polyline" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xf6 : ComOut( CGM_GDSF_ONLY, "Elliptical Arc 3 Point" ) + { + if ( mbFigure ) + mpOutAct->CloseRegion(); + } + break; + case 0xf1 : ComOut( CGM_GDSF_ONLY, "Hyperlink Definition" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } + } + else + mnParaSize = mnElementSize; +}; + + diff --git a/filter/source/graphicfilter/icgm/class5.cxx b/filter/source/graphicfilter/icgm/class5.cxx new file mode 100644 index 000000000000..6d570a0b7baf --- /dev/null +++ b/filter/source/graphicfilter/icgm/class5.cxx @@ -0,0 +1,524 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +//#define VCL_NEED_BASETSD + +#include +#include + + +// --------------------------------------------------------------- + +void CGM::ImplDoClass5() +{ + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1, "Line Bundle Index" ) + pElement->pLineBundle = (LineBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aLineList, pElement->aLineBundle ); + break; + case 0x02 : ComOut( CGM_LEVEL1, "Line Type" ) + { + if ( pElement->nAspectSourceFlags & ASF_LINETYPE ) + pElement->pLineBundle->eLineType = (LineType)ImplGetI( pElement->nIndexPrecision ); + else + pElement->aLineBundle.eLineType = (LineType)ImplGetI( pElement->nIndexPrecision ); + } + break; + case 0x03 : ComOut( CGM_LEVEL1, "Line Width" ) + { + double nWidth; + if ( pElement->eLineWidthSpecMode == SM_ABSOLUTE ) + { + if ( pElement->eVDCType == VDC_REAL ) + nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + else + nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + + ImplMapDouble( nWidth ); + } + else + nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25; // scaling in 1/4 mm + + ( pElement->nAspectSourceFlags & ASF_LINEWIDTH ) + ? pElement->aLineBundle.nLineWidth = nWidth + : pElement->aLineBundle.nLineWidth = nWidth; + } + break; + case 0x04 : ComOut( CGM_LEVEL1, "Line Color" ) + { + if ( pElement->nAspectSourceFlags & ASF_LINECOLOR ) + pElement->pLineBundle->SetColor( ImplGetBitmapColor() ); + else + pElement->aLineBundle.SetColor( ImplGetBitmapColor() ); + } + break; + case 0x05 : ComOut( CGM_LEVEL1, "Marker Bundle Index" ) + pElement->pMarkerBundle = (MarkerBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aMarkerList, pElement->aMarkerBundle ); + break; + case 0x06 : ComOut( CGM_LEVEL1, "Marker Type" ) + { + if ( pElement->nAspectSourceFlags & ASF_MARKERTYPE ) + pElement->pMarkerBundle->eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision ); + else + pElement->aMarkerBundle.eMarkerType = (MarkerType)ImplGetI( pElement->nIndexPrecision ); + } + break; + case 0x07 : ComOut( CGM_LEVEL1, "Marker Size" ) + { + double nWidth; + if ( pElement->eMarkerSizeSpecMode == SM_ABSOLUTE ) + { + if ( pElement->eVDCType == VDC_REAL ) + nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + else + nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + ImplMapDouble( nWidth ); + } + else + nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25; + ( pElement->nAspectSourceFlags & ASF_MARKERSIZE ) + ? pElement->aMarkerBundle.nMarkerSize = nWidth + : pElement->aMarkerBundle.nMarkerSize = nWidth; + } + break; + case 0x08 : ComOut( CGM_LEVEL1, "Marker Color" ) + { + if ( pElement->nAspectSourceFlags & ASF_MARKERCOLOR ) + pElement->pMarkerBundle->SetColor( ImplGetBitmapColor() ); + else + pElement->aMarkerBundle.SetColor( ImplGetBitmapColor() ); + } + break; + case 0x09 : ComOut( CGM_LEVEL1, "Text Bundle Index" ) + pElement->pTextBundle = (TextBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aTextList, pElement->aTextBundle ); + break; + case 0x0a : ComOut( CGM_LEVEL1, "Text Font Index" ) + { + if ( pElement->nAspectSourceFlags & ASF_TEXTFONTINDEX ) + pElement->pTextBundle->nTextFontIndex = ImplGetI( pElement->nIndexPrecision ); + else + pElement->aTextBundle.nTextFontIndex = ImplGetI( pElement->nIndexPrecision ); + } + break; + case 0x0b : ComOut( CGM_LEVEL1, "Text Precision" ) + { + TextBundle* pBundle; + if ( pElement->nAspectSourceFlags & ASF_TEXTPRECISION ) + pBundle = pElement->pTextBundle; + else + pBundle = &pElement->aTextBundle; + switch( ImplGetUI16() ) + { + case 0 : pBundle->eTextPrecision = TPR_STRING; break; + case 1 : pBundle->eTextPrecision = TPR_CHARACTER; break; + case 2 : pBundle->eTextPrecision = TPR_STROKE; break; + default : pBundle->eTextPrecision = TPR_UNDEFINED; break; + } + } + break; + case 0x0c : ComOut( CGM_LEVEL1, "Character Expansion Factor" ) + { + if ( pElement->nAspectSourceFlags & ASF_CHARACTEREXPANSION ) + pElement->pTextBundle->nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + else + pElement->aTextBundle.nCharacterExpansion = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + } + break; + case 0x0d : ComOut( CGM_LEVEL1, "Character Spacing" ) + { + if ( pElement->nAspectSourceFlags & ASF_CHARACTERSPACING ) + pElement->pTextBundle->nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + else + pElement->aTextBundle.nCharacterSpacing = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + } + break; + case 0x0e : ComOut( CGM_LEVEL1, "Text Color" ) + { + if ( pElement->nAspectSourceFlags & ASF_TEXTCOLOR ) + pElement->pTextBundle->SetColor( ImplGetBitmapColor() ); + else + pElement->aTextBundle.SetColor( ImplGetBitmapColor() ); + } + break; + case 0x0f : ComOut( CGM_LEVEL1, "Character Height" ) + { + if ( pElement->eVDCType == VDC_INTEGER ) + pElement->nCharacterHeight = ImplGetI( pElement->nVDCIntegerPrecision ); + else // ->floating points + pElement->nCharacterHeight = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + ImplMapDouble( pElement->nCharacterHeight ); + pElement->nCharacterHeight /= 18.0; + } + break; + case 0x10 : ComOut( CGM_LEVEL1, "Character Orientation" ) + { + if ( pElement->eVDCType == VDC_INTEGER ) + { + pElement->nCharacterOrientation[0] = ImplGetI( pElement->nVDCIntegerPrecision ); + pElement->nCharacterOrientation[1] = ImplGetI( pElement->nVDCIntegerPrecision ); + pElement->nCharacterOrientation[2] = ImplGetI( pElement->nVDCIntegerPrecision ); + pElement->nCharacterOrientation[3] = ImplGetI( pElement->nVDCIntegerPrecision ); + } + else // ->floating points + { + pElement->nCharacterOrientation[0] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + pElement->nCharacterOrientation[1] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + pElement->nCharacterOrientation[2] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + pElement->nCharacterOrientation[3] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + } + } + break; + case 0x11 : ComOut( CGM_LEVEL1, "Text Path" ) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eTextPath = TPR_RIGHT; break; + case 1 : pElement->eTextPath = TPR_LEFT; break; + case 2 : pElement->eTextPath = TPR_UP; break; + case 3 : pElement->eTextPath = TPR_DOWN; break; + default : mbStatus = sal_False; break; + } + } + break; + case 0x12 : ComOut( CGM_LEVEL1, "Text Alignment" ) + { + pElement->eTextAlignmentH = (TextAlignmentH)ImplGetUI16(); + pElement->eTextAlignmentV = (TextAlignmentV)ImplGetUI16( 8 ); + pElement->nTextAlignmentHCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + pElement->nTextAlignmentVCont = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + } + break; + case 0x13 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Character Set Index" ) + pElement->nCharacterSetIndex = ImplGetI( pElement->nIndexPrecision ); + break; + case 0x14 : ComOut( CGM_LEVEL1 | CGM_DRAWING_PLUS_CONTROL_SET, "Alternate Character Set Index" ) + pElement->nAlternateCharacterSetIndex = ImplGetI( pElement->nIndexPrecision ); + break; + case 0x15 : ComOut( CGM_LEVEL1, "Fill Bundle Index" ) + pElement->pFillBundle = (FillBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aFillList, pElement->aFillBundle ); + break; + case 0x16 : ComOut( CGM_LEVEL1, "Fill Interior Style" ) + { + if ( pElement->nAspectSourceFlags & ASF_FILLINTERIORSTYLE ) + pElement->pFillBundle->eFillInteriorStyle = (FillInteriorStyle)ImplGetUI16(); + else + pElement->aFillBundle.eFillInteriorStyle = (FillInteriorStyle)ImplGetUI16(); + } + break; + case 0x17 : ComOut( CGM_LEVEL1, "Fill Color" ) + { + if ( pElement->nAspectSourceFlags & ASF_FILLCOLOR ) + pElement->pFillBundle->SetColor( ImplGetBitmapColor() ); + else + pElement->aFillBundle.SetColor( ImplGetBitmapColor() ); + } + break; + case 0x18 : ComOut( CGM_LEVEL1, "Fill Hatch Index" ) + { + if ( pElement->nAspectSourceFlags & ASF_HATCHINDEX ) + pElement->pFillBundle->nFillHatchIndex = ImplGetI( pElement->nIndexPrecision ); + else + pElement->aFillBundle.nFillHatchIndex = ImplGetI( pElement->nIndexPrecision ); + } + break; + case 0x19 : ComOut( CGM_LEVEL1, "Fill Pattern Index" ) + { + if ( pElement->nAspectSourceFlags & ASF_PATTERNINDEX ) + pElement->pFillBundle->nFillPatternIndex = ImplGetI( pElement->nIndexPrecision ); + else + pElement->aFillBundle.nFillPatternIndex = ImplGetI( pElement->nIndexPrecision ); + } + break; + case 0x1a : ComOut( CGM_LEVEL1, "Edge Bundle Index" ) + pElement->pEdgeBundle = (EdgeBundle*)pElement->GetBundleIndex( ImplGetI( pElement->nIndexPrecision ), pElement->aEdgeList, pElement->aEdgeBundle ); + break; + case 0x1b : ComOut( CGM_LEVEL1, "Edge Type" ) + { + if ( pElement->nAspectSourceFlags & ASF_EDGETYPE ) + pElement->pEdgeBundle->eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision ); + else + pElement->aEdgeBundle.eEdgeType = (EdgeType)ImplGetI( pElement->nIndexPrecision ); + } + break; + case 0x1c : ComOut( CGM_LEVEL1, "Edge Width" ) + { + double nWidth; + if ( pElement->eEdgeWidthSpecMode == SM_ABSOLUTE ) + { + if ( pElement->eVDCType == VDC_REAL ) + nWidth = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + else + nWidth = (double)ImplGetI( pElement->nVDCIntegerPrecision ); + + ImplMapDouble( nWidth ); + } + else + nWidth = (sal_uInt32)ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ) * 25; + ( pElement->nAspectSourceFlags & ASF_EDGEWIDTH ) + ? pElement->aEdgeBundle.nEdgeWidth = nWidth + : pElement->aEdgeBundle.nEdgeWidth = nWidth; + } + break; + case 0x1d : ComOut( CGM_LEVEL1, "Edge Color" ) + { + if ( pElement->nAspectSourceFlags & ASF_EDGECOLOR ) + pElement->pEdgeBundle->SetColor( ImplGetBitmapColor() ); + else + pElement->aEdgeBundle.SetColor( ImplGetBitmapColor() ); + } + break; + case 0x1e : ComOut( CGM_LEVEL1, "Edge Visibility" ) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eEdgeVisibility = EV_OFF; break; + case 1 : pElement->eEdgeVisibility = EV_ON; break; + default : mbStatus = sal_False; + } + } + break; + case 0x1f : ComOut( CGM_LEVEL1, "Fill Reference Point" ) + ImplGetPoint( pElement->aFillRefPoint ); + break; + case 0x20 : ComOut( CGM_LEVEL1, "Pattern Table" ) break; + case 0x21 : ComOut( CGM_LEVEL1, "Pattern Size" ) break; + case 0x22 : ComOut( CGM_LEVEL1, "Color Table" ) + { + sal_uInt32 nColorStartIndex = ImplGetUI( pElement->nColorIndexPrecision ); + if ( ( nColorStartIndex > 255 ) || + ( ( ( mnElementSize - pElement->nColorIndexPrecision ) % ( pElement->nColorPrecision * 3 ) ) != 0 ) ) + { + mbStatus = sal_False; + } + else + { + sal_uInt32 nColors = ( mnElementSize - pElement->nColorIndexPrecision ) / ( 3 * pElement->nColorPrecision ); + if ( nColors ) + { + sal_uInt32 nMaxColorIndex = nColorStartIndex + nColors - 1; + sal_uInt32 nIndex; + if ( nMaxColorIndex > 255 ) + { + mbStatus = sal_False; + } + else + { + if ( pElement->nLatestColorMaximumIndex < nMaxColorIndex ) + pElement->nLatestColorMaximumIndex = nMaxColorIndex; + + for ( nIndex = nColorStartIndex; nIndex <= nMaxColorIndex; nIndex++ ) + { + pElement->aLatestColorTable[ nIndex ] = ImplGetBitmapColor( sal_True ); + } + } + pElement->nColorMaximumIndex = pElement->nLatestColorMaximumIndex; + for ( nIndex = nColorStartIndex; nIndex <= nMaxColorIndex; nIndex++ ) + { + if ( !pElement->aColorTableEntryIs[ nIndex ] ) + { + pElement->aColorTableEntryIs[ nIndex ] = 1; + pElement->aColorTable[ nIndex ] = pElement->aLatestColorTable[ nIndex ]; + } + } + } + } + } + break; + case 0x23 : ComOut( CGM_LEVEL1, "Aspect Source Flags" ) + { + int nFlags = mnElementSize >> 2; + while ( nFlags-- > 0 ) + { + sal_uInt32 nFlag = 0; + switch( ImplGetUI16() ) + { + case 0 : nFlag = ASF_LINETYPE; break; + case 1 : nFlag = ASF_LINEWIDTH; break; + case 2 : nFlag = ASF_LINECOLOR; break; + case 3 : nFlag = ASF_MARKERTYPE; break; + case 4 : nFlag = ASF_MARKERSIZE; break; + case 5 : nFlag = ASF_MARKERCOLOR; break; + case 6 : nFlag = ASF_FILLINTERIORSTYLE; break; + case 7 : nFlag = ASF_HATCHINDEX; break; + case 8 : nFlag = ASF_PATTERNINDEX; break; + case 9 : nFlag = ASF_BITMAPINDEX; break; + case 10 : nFlag = ASF_FILLCOLOR; break; + case 11 : nFlag = ASF_EDGETYPE; break; + case 12 : nFlag = ASF_EDGEWIDTH; break; + case 13 : nFlag = ASF_EDGECOLOR; break; + case 14 : nFlag = ASF_TEXTFONTINDEX; break; + case 15 : nFlag = ASF_TEXTPRECISION; break; + case 16 : nFlag = ASF_CHARACTEREXPANSION; break; + case 17 : nFlag = ASF_CHARACTERSPACING; break; + case 18 : nFlag = ASF_TEXTCOLOR; break; + default : mbStatus = sal_False; break; + } + sal_uInt32 nASF = ImplGetUI16(); + switch ( nASF ) + { + case 0 : pElement->nAspectSourceFlags &= ~nFlag; break; // INDIVIDUAL + case 1 : pElement->nAspectSourceFlags |= nFlag; break; // BUNDLED + default : mbStatus = sal_False; break; + } + } + } + break; + case 0x24 : ComOut( CGM_LEVEL2, "Pick Identifier" ) break; + case 0x25 : ComOut( CGM_LEVEL3, "Line Cap" ) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eLineCapType = LCT_BUTT; break; + case 1 : pElement->eLineCapType = LCT_ROUND; break; + case 2 : pElement->eLineCapType = LCT_SQUARE; break; + case 3 : pElement->eLineCapType = LCT_TRIANGLE; break; + case 4 : pElement->eLineCapType = LCT_ARROW; break; + default : pElement->eLineCapType = LCT_NONE; break; + } + } + break; + case 0x26 : ComOut( CGM_LEVEL3, "Line Join" ) + { + switch( ImplGetUI16() ) + { + case 0 : pElement->eLineJoinType = LJT_MITER; break; + case 1 : pElement->eLineJoinType = LJT_ROUND; break; + case 2 : pElement->eLineJoinType = LJT_BEVEL; break; + default : pElement->eLineJoinType = LJT_NONE; break; + } + } + break; + case 0x27 : ComOut( CGM_LEVEL3, "Line Type Continuation" ) break; // NS + case 0x28 : ComOut( CGM_LEVEL3, "Line Type Initial Offset" ) break; // NS + case 0x29 : ComOut( CGM_LEVEL3, "Text Score Type" ) break; + case 0x2a : ComOut( CGM_LEVEL3, "Restricted Text Type" ) break; + case 0x2b : ComOut( CGM_LEVEL3, "Interpolated interior" ) break; + case 0x2c : ComOut( CGM_LEVEL3, "Edge Cap" ) break; // NS + case 0x2d : ComOut( CGM_LEVEL3, "Edge Join" ) break; + case 0x2e : ComOut( CGM_LEVEL3, "Edge Type Continuation" ) break; // NS + case 0x2f : ComOut( CGM_LEVEL3, "Edge Type Initial Offset" ) break; // NS + case 0x30 : ComOut( CGM_LEVEL3, "Symbol Library Index" ) break; // NS + case 0x31 : ComOut( CGM_LEVEL3, "Symbol Color" ) break; // NS + case 0x32 : ComOut( CGM_LEVEL3, "Symbol Size" ) break; // NS + case 0x33 : ComOut( CGM_LEVEL3, "Symbol Orientation" ) break; // NS + case 0x50 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Region Margins" ) break; + case 0x51 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Region Expansion" ) break; + case 0x52 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Region Anchor" ) break; + case 0x53 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Horizontal Alignment" ) break; + case 0x54 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Vertical Alignment" ) break; + case 0x55 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Line Flow" ) break; + case 0x60 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Spacing" ) break; + case 0x61 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Indent" ) break; + case 0x62 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Tabs" ) break; + case 0x63 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Bullets" ) break; + case 0x64 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Bullet Level" ) break; + case 0x65 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Line Horizontal Alignment" ) break; + case 0x66 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Line Vertical Alignment" ) break; + case 0x67 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragragh Line Spacing" ) break; + case 0x68 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Paragraph Word Wrap" ) break; + case 0x70 : ComOut( CGM_UNKNOWN_LEVEL, "Block Text Forward Advance Distance" ) break; + case 0x71 : ComOut( CGM_UNKNOWN_LEVEL, "Word Spacing" ) break; + case 0x72 : ComOut( CGM_UNKNOWN_LEVEL, "External Leading" ) break; + case 0x7a : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Offset" ) + { + long nHorzOffset = ImplGetI( pElement->nIndexPrecision ); + long nVertOffset = ImplGetI( pElement->nIndexPrecision ); + sal_uInt32 nType = ImplGetUI16(); + mpOutAct->SetGradientOffset( nHorzOffset, nVertOffset, nType ); + mnAct4PostReset |= ACT4_GRADIENT_ACTION; + } + break; + case 0x7b : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Edge" ) + { + mnAct4PostReset |= ACT4_GRADIENT_ACTION; + } + break; + case 0x7c : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Angle" ) + { + mpOutAct->SetGradientAngle( ImplGetI( pElement->nIndexPrecision ) ); + mnAct4PostReset |= ACT4_GRADIENT_ACTION; + } + break; + case 0x7d : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Description" ) + { + ImplGetI( pElement->nIndexPrecision ); // -Wall is this needed? + sal_uInt32 nNumberOfStages = ImplGetI( pElement->nIndexPrecision ); + sal_uInt32 i, nColorFrom = 0; + sal_uInt32 nColorTo = 0xffffff; + + //FIXME, does this loop actually do anything? + for ( i = 0; i < nNumberOfStages; i++ ) + { + ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); // -Wall is this needed + } + + for ( i = 0; i <= nNumberOfStages; i++ ) + { + sal_uInt32 nPara = mnParaSize + 24; + if ( i == 0 ) + { + nColorTo = ImplGetBitmapColor(); + nColorFrom = nColorTo ^ 0xffffff; + } + else if ( i == 1 ) + nColorFrom = ImplGetBitmapColor(); + mnParaSize = nPara; + } + if ( nNumberOfStages > 1 ) + mpOutAct->SetGradientStyle( 0xff, 1 ); + + mpOutAct->SetGradientDescriptor( nColorFrom, nColorTo ); + mnAct4PostReset |= ACT4_GRADIENT_ACTION; + } + break; + case 0x7e : ComOut( CGM_UNKNOWN_LEVEL, "set Gradient Style" ) + { + sal_uInt32 nStyle = ImplGetUI16( 8 ); + double fRatio = ImplGetFloat( pElement->eRealPrecision, pElement->nRealSize ); + mpOutAct->SetGradientStyle( nStyle, fRatio ); + mnAct4PostReset |= ACT4_GRADIENT_ACTION; + } + break; + case 0xff : ComOut( CGM_GDSF_ONLY, "inquire Font metrics" ) break; + case 0xfe : ComOut( CGM_GDSF_ONLY, "inquire character widths" ) break; + case 0xfd : ComOut( CGM_GDSF_ONLY, "set Text Font" ) break; + case 0xfc : ComOut( CGM_GDSF_ONLY, "set current position" ) break; + case 0xfb : ComOut( CGM_GDSF_ONLY, "set current position mode" ) break; + case 0xfa : ComOut( CGM_GDSF_ONLY, "set character height mode" ) break; + case 0xf9 : ComOut( CGM_GDSF_ONLY, "set Transform matrix 2D" ) break; + case 0xf8 : ComOut( CGM_GDSF_ONLY, "set Transform matrix 3D" ) break; + case 0xf7 : ComOut( CGM_GDSF_ONLY, "pop transformation state" ) break; + case 0xf6 : ComOut( CGM_GDSF_ONLY, "clear transformation state" ) break; + case 0xf5 : ComOut( CGM_GDSF_ONLY, "set character widths" ) break; + case 0xf4 : ComOut( CGM_GDSF_ONLY, "set color name - for Pantone support" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + + diff --git a/filter/source/graphicfilter/icgm/class7.cxx b/filter/source/graphicfilter/icgm/class7.cxx new file mode 100644 index 000000000000..21c67bf9c161 --- /dev/null +++ b/filter/source/graphicfilter/icgm/class7.cxx @@ -0,0 +1,237 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include + +// --------------------------------------------------------------- + +void CGM::ImplDoClass7() +{ + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1, "Message" ) break; + case 0x02 : + { + sal_uInt8* pAppData = mpSource + 12; + sal_uInt16* pTemp = (sal_uInt16*)mpSource; + sal_uInt16 nOpcode = pTemp[ 4 ]; + + if ( mpChart || ( nOpcode == 0 ) ) + { + switch ( nOpcode ) + { + case 0x000 : ComOut( CGM_LEVEL1, "AppData - Beginning of File Opcodes" ) + { + if ( mpChart == NULL ) + mpChart = new CGMChart( *this ); + mpChart->mnCurrentFileType = pAppData[ 3 ]; + } + break; + case 0x001 : ComOut( CGM_LEVEL1, "AppData - End of File Opcodes" ) break; + case 0x190 : ComOut( CGM_LEVEL1, "AppData - FDESC" ) break; + case 0x192 : ComOut( CGM_LEVEL1, "AppData - FNOTES" ) break; + case 0x1F4 : ComOut( CGM_LEVEL1, "AppData - BOGENFILE" ) break; + case 0x1F5 : ComOut( CGM_LEVEL1, "AppData - EOGENFILE" ) break; + case 0x1F8 : ComOut( CGM_LEVEL1, "AppData - BOCHTGROUP" ) break; + case 0x1F9 : ComOut( CGM_LEVEL1, "AppData - EOCHTGROUP" ) break; + case 0x1FC : ComOut( CGM_LEVEL1, "AppData - BOCHTDATA" ) break; + case 0x1FD : ComOut( CGM_LEVEL1, "AppData - EOCHTDATA" ) + { + mpOutAct->DrawChart(); + } + break; + case 0x200 : ComOut( CGM_LEVEL1, "AppData - BOSYMGROUP" ) break; + case 0x201 : ComOut( CGM_LEVEL1, "AppData - EOSYMGROUP" ) break; + case 0x204 : ComOut( CGM_LEVEL1, "AppData - BEGSYMBOL" ) break; + case 0x205 : ComOut( CGM_LEVEL1, "AppData - ENDSYMBOL" ) break; + case 0x208 : ComOut( CGM_LEVEL1, "AppData - BOSHWGROUP" ) break; + case 0x209 : ComOut( CGM_LEVEL1, "AppData - EOSHWGROUP" ) break; + case 0x260 : ComOut( CGM_LEVEL1, "AppData - BEGGROUP" ) break; + case 0x262 : ComOut( CGM_LEVEL1, "AppData - ENDGROUP" ) break; + case 0x264 : ComOut( CGM_LEVEL1, "AppData - DATANODE" ) + { + mpChart->mDataNode[ 0 ] = *(DataNode*)( pAppData ); + sal_Int8 nZoneEnum = mpChart->mDataNode[ 0 ].nZoneEnum; + if ( nZoneEnum && ( nZoneEnum <= 6 ) ) + mpChart->mDataNode[ nZoneEnum ] = *(DataNode*)( pAppData ); + } + break; + case 0x2BE : ComOut( CGM_LEVEL1, "AppData - SHWSLIDEREC" ) + { + if ( mnMode & CGM_EXPORT_IMPRESS ) + { + if ( pAppData[ 16 ] == 0 ) // a blank template ? + { + if ( pAppData[ 2 ] == 46 ) + { + // this starts the document -> maybe we could insert a new document + } + else if ( pAppData[ 2 ] & 0x80 ) + { + // this is a template + } + else + { + mpOutAct->InsertPage(); + } + } + mpChart->ResetAnnotation(); + } + } + break; + case 0x2C0 : ComOut( CGM_LEVEL1, "AppData - SHWKEYTABLE" ) break; + case 0x2C2 : ComOut( CGM_LEVEL1, "AppData - SHWBUTTONTAB" ) break; + case 0x2C4 : ComOut( CGM_LEVEL1, "AppData - SHWGLOBAL" ) break; + case 0x2C6 : ComOut( CGM_LEVEL1, "AppData - SHWTITLE" ) break; + case 0x2CA : ComOut( CGM_LEVEL1, "AppData - SHWAPP" ) break; + case 0x320 : ComOut( CGM_LEVEL1, "AppData - TEXT" ) + { + TextEntry* pTextEntry = new TextEntry; + pTextEntry->nTypeOfText = *((sal_uInt16*)( pAppData ) ); + pTextEntry->nRowOrLineNum = *((sal_uInt16*)( pAppData + 2 ) ); + pTextEntry->nColumnNum = *((sal_uInt16*)( pAppData + 4 ) ); + sal_uInt16 nAttributes = *( (sal_uInt16*)( pAppData + 6 ) ); + pTextEntry->nZoneSize = nAttributes & 0xff; + pTextEntry->nLineType = ( nAttributes >> 8 ) & 0xf; + nAttributes >>= 12; + pTextEntry->nAttributes = nAttributes; + pAppData += 8; + sal_uInt32 nLen = strlen( (char*)( pAppData ) ) + 1; + pTextEntry->pText = new char[ nLen ]; + memcpy( pTextEntry->pText, pAppData, nLen ); + pAppData += nLen; + + TextAttribute* pTextOld = 0; + for ( sal_uInt16 i = 0; i < nAttributes; i++ ) + { + TextAttribute* pTextAttr = new TextAttribute; + + *pTextAttr = *(TextAttribute*)( pAppData ); + + pTextAttr->pNextAttribute = NULL; + if ( i == 0 ) + pTextEntry->pAttribute = pTextAttr; + else + pTextOld->pNextAttribute = pTextAttr; + + pAppData += sizeof( TextAttribute ) - 4; + pTextOld = pTextAttr; + } + mpChart->InsertTextEntry( pTextEntry ); + } + break; + case 0x321 : ComOut( CGM_LEVEL1, "AppData - IOC_TABS" ) break; + case 0x322 : ComOut( CGM_LEVEL1, "AppData - CHARTZONE" ) + { + mpChart->mChartZone = *( ChartZone* )( pAppData ); + } + break; + case 0x324 : ComOut( CGM_LEVEL1, "AppData - TITLEZONE" ) break; + case 0x328 : ComOut( CGM_LEVEL1, "AppData - FOOTNOTEZONE" ) break; + case 0x32A : ComOut( CGM_LEVEL1, "AppData - LEGENDZONE" ) break; + case 0x330 : ComOut( CGM_LEVEL1, "AppData - PAGEORIENTDIM" ) + { + mpChart->mPageOrientDim = *( PageOrientDim*)( pAppData ); + } + break; + case 0x334 : ComOut( CGM_LEVEL1, "AppData - CHTZONEOPTN" ) + { + mpChart->mZoneOption = *( ZoneOption*)( pAppData ); + } + break; + case 0x336 : ComOut( CGM_LEVEL1, "AppData - CHTINTL" ) + { + mpChart->mIntSettings = *( IntSettings*)( pAppData ); + } + break; + case 0x338 : ComOut( CGM_LEVEL1, "AppData - CHTLINESPC" ) break; + case 0x384 : ComOut( CGM_LEVEL1, "AppData - ORGGRIDSTATE" ) break; + case 0x386 : ComOut( CGM_LEVEL1, "AppData - ORGSCRSTATE" ) break; + case 0x388 : ComOut( CGM_LEVEL1, "AppData - ORGTREESTATE" ) break; + case 0x38A : ComOut( CGM_LEVEL1, "AppData - ORGTEXTOPTN" ) break; + case 0x38E : ComOut( CGM_LEVEL1, "AppData - ORGBOXOPTN" ) break; + case 0x390 : ComOut( CGM_LEVEL1, "AppData - ORGBOXDIM" ) break; + case 0x392 : ComOut( CGM_LEVEL1, "AppData - ORGBOX" ) break; + case 0x3EA : ComOut( CGM_LEVEL1, "AppData - TTLTEXTOPTN" ) break; + case 0x3EE : ComOut( CGM_LEVEL1, "AppData - TTLAUTOBUILD" ) break; + case 0x44E : ComOut( CGM_LEVEL1, "AppData - BULTEXTOPTN" ) break; + case 0x452 : ComOut( CGM_LEVEL1, "AppData - BULLETOPTN" ) + { + mpChart->mBulletOption = *( BulletOption*)( pAppData ); + } + break; + case 0x454 : ComOut( CGM_LEVEL1, "AppData - BULLETLINES" ) + { + mpChart->mBulletLines = *( BulletLines*)( pAppData ); + } + break; + case 0x456 : ComOut( CGM_LEVEL1, "AppData - BULAUTOBUILD" ) break; + case 0x4B2 : ComOut( CGM_LEVEL1, "AppData - TBLTEXTOPTN" ) break; + case 0x4B6 : ComOut( CGM_LEVEL1, "AppData - TBLOPTN" ) break; + case 0x4B8 : ComOut( CGM_LEVEL1, "AppData - TBLCOLOPTN" ) break; + case 0x4BA : ComOut( CGM_LEVEL1, "AppData - TBLLEGENDOPTN" ) break; + case 0x4BC : ComOut( CGM_LEVEL1, "AppData - TBLRANGEOPTN" ) break; + case 0x4BE : ComOut( CGM_LEVEL1, "AppData - TBLROWOPTN" ) break; + case 0x4C0 : ComOut( CGM_LEVEL1, "AppData - TBLAUTOBUILD" ) break; + case 0x518 : ComOut( CGM_LEVEL1, "AppData - PIECHARTOPTN" ) break; + case 0x51A : ComOut( CGM_LEVEL1, "AppData - PIELEGENDOPTN" ) break; + case 0x51C : ComOut( CGM_LEVEL1, "AppData - PIETEXTOPTN" ) break; + case 0x51E : ComOut( CGM_LEVEL1, "AppData - PIEOPTN" ) break; + case 0x520 : ComOut( CGM_LEVEL1, "AppData - PIEPCTLABOPTN" ) break; + case 0x522 : ComOut( CGM_LEVEL1, "AppData - PIEVALLABOPTN" ) break; + case 0x524 : ComOut( CGM_LEVEL1, "AppData - PIESLICE" ) break; + case 0x57A : ComOut( CGM_LEVEL1, "AppData - XYAXISOPTN" ) break; + case 0x57C : ComOut( CGM_LEVEL1, "AppData - XYGRIDOPTN" ) break; + case 0x57D : ComOut( CGM_LEVEL1, "AppData - XYGRIDSHOWFILL" ) break; + case 0x57E : ComOut( CGM_LEVEL1, "AppData - XYSERIESOPTN" ) break; + case 0x580 : ComOut( CGM_LEVEL1, "AppData - XYSTYLEOPTN" ) break; + case 0x582 : ComOut( CGM_LEVEL1, "AppData - XYTABLEOPTN" ) break; + case 0x584 : ComOut( CGM_LEVEL1, "AppData - XYTEXTOPTN" ) break; + case 0x586 : ComOut( CGM_LEVEL1, "AppData - XYDATAOPTN" ) break; + case 0x58A : ComOut( CGM_LEVEL1, "AppData - XYLEGENDOPN" ) break; + case 0x58C : ComOut( CGM_LEVEL1, "AppData - XYCALCULATION" ) break; + case 0x58E : ComOut( CGM_LEVEL1, "AppData - XYXVALUE" ) break; + case 0x590 : ComOut( CGM_LEVEL1, "AppData - XYYVALUE" ) break; + case 0x592 : ComOut( CGM_LEVEL1, "AppData - XYXEXTVALUE" ) break; + case 0x618 : ComOut( CGM_LEVEL1, "AppData - IOC_CHTCOLRTAB" ) break; + case 0x619 : ComOut( CGM_LEVEL1, "AppData - IOC_CHTFONTTAB" ) break; + case 0x1fff : ComOut( CGM_LEVEL1, "AppData - 0x1fff" ) break; + default : ComOut( CGM_LEVEL1, "UNKNOWN Application Data" ) break; + } + } + mnParaSize = mnElementSize; + break; + } + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + diff --git a/filter/source/graphicfilter/icgm/classx.cxx b/filter/source/graphicfilter/icgm/classx.cxx new file mode 100644 index 000000000000..a63c41d545b9 --- /dev/null +++ b/filter/source/graphicfilter/icgm/classx.cxx @@ -0,0 +1,262 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + +// --------------------------------------------------------------- + +#define ImplSetUnderlineMode() \ + \ + sal_uInt32 nMode = ImplGetUI16(); \ + switch ( nMode ) \ + { \ + case 1 : pElement->eUnderlineMode = UM_LOW; break; \ + case 2 : pElement->eUnderlineMode = UM_HIGH; break; \ + case 4 : pElement->eUnderlineMode = UM_STRIKEOUT; break;\ + case 8 : pElement->eUnderlineMode = UM_OVERSCORE; break;\ + default: pElement->eUnderlineMode = UM_OFF; break; \ + } \ + pElement->nUnderlineColor = ImplGetBitmapColor(); + +// --------------------------------------------------------------- + +void CGM::ImplDoClass6() +{ + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL1, "Escape" ) + { + long nIdentifier = ImplGetI( pElement->nIntegerPrecision ); + switch ( nIdentifier ) + { + case 0 : ComOut( CGM_DESCRIPTION, "inquire function support" ) break; + case -1 : ComOut( CGM_DESCRIPTION, "set underline mode" ) + { + ImplSetUnderlineMode() + } + break; + case -2 : ComOut( CGM_DESCRIPTION, "set script mode" ) break; + case -3 : ComOut( CGM_DESCRIPTION, "set shadow mode" ) break; + case -6 : ComOut( CGM_DESCRIPTION, "inquire origin offset" ) break; + case -8 : ComOut( CGM_DESCRIPTION, "set media size" ) break; + case -10 : ComOut( CGM_DESCRIPTION, "set character mode" ) break; + case -14 : ComOut( CGM_DESCRIPTION, "resolution mode" ) break; + case -17 : ComOut( CGM_DESCRIPTION, "line cap" ) break; + case -18 : ComOut( CGM_DESCRIPTION, "line join" ) break; + case -19 : ComOut( CGM_DESCRIPTION, "edge join" ) break; + case -30 : ComOut( CGM_DESCRIPTION, "media type" ) break; + case -31 : ComOut( CGM_DESCRIPTION, "number of copies" ) break; + case -32 : ComOut( CGM_DESCRIPTION, "orientation" ) break; + case -33 : ComOut( CGM_DESCRIPTION, "device color representation" ) break; + case -34 : ComOut( CGM_DESCRIPTION, "device font list" ) break; + case -35 : ComOut( CGM_DESCRIPTION, "color reversal mode" ) break; + case -36 : ComOut( CGM_DESCRIPTION, "line cap attributes" ) break; + case -37 : ComOut( CGM_DESCRIPTION, "begin effect" ) break; + case -38 : ComOut( CGM_DESCRIPTION, "end effect" ) break; + case -39 : ComOut( CGM_DESCRIPTION, "begin effect definition" ) break; + case -40 : ComOut( CGM_DESCRIPTION, "end effect definition" ) break; + case -41 : ComOut( CGM_DESCRIPTION, "end style definition" ) break; + case -42 : ComOut( CGM_DESCRIPTION, "begin eps data" ) break; + case -43 : ComOut( CGM_DESCRIPTION, "eps data" ) break; + case -44 : ComOut( CGM_DESCRIPTION, "end eps data" ) break; + case -45 : ComOut( CGM_DESCRIPTION, "set background style" ) break; + case -46 : ComOut( CGM_DESCRIPTION, "set eps mode" ) break; + case -47 : ComOut( CGM_DESCRIPTION, "fill mode" ) break; + case -48 : ComOut( CGM_DESCRIPTION, "begin symbol" ) break; + case -49 : ComOut( CGM_DESCRIPTION, "end symbol" ) break; + case -50 : ComOut( CGM_DESCRIPTION, "begin layer" ) break; + case -51 : ComOut( CGM_DESCRIPTION, "end layer" ) break; + case -52 : ComOut( CGM_DESCRIPTION, "layer visibility" ) break; + case -53 : ComOut( CGM_DESCRIPTION, "inquire foreign data" ) break; + case -54 : ComOut( CGM_DESCRIPTION, "set text offset" ) break; + case -55 : ComOut( CGM_DESCRIPTION, "begin group" ) break; + case -56 : ComOut( CGM_DESCRIPTION, "end group" ) break; + case -100 : ComOut( CGM_DESCRIPTION, "begin patch" ) break; + case -101 : ComOut( CGM_DESCRIPTION, "end patch" ) break; + case -102 : ComOut( CGM_DESCRIPTION, "begin block text region" ) break; + case -103 : ComOut( CGM_DESCRIPTION, "end block text region" ) break; + case -120 : ComOut( CGM_DESCRIPTION, "region margins" ) break; + case -121 : ComOut( CGM_DESCRIPTION, "region expansions" ) break; + case -122 : ComOut( CGM_DESCRIPTION, "region anchor" ) break; + case -123 : ComOut( CGM_DESCRIPTION, "paragraph horizontal align" ) break; + case -124 : ComOut( CGM_DESCRIPTION, "paragraph vertical align" ) break; + case -125 : ComOut( CGM_DESCRIPTION, "region line flow" ) break; + case -130 : ComOut( CGM_DESCRIPTION, "paragraph spacing" ) break; + case -131 : ComOut( CGM_DESCRIPTION, "paragraph identation" ) break; + case -132 : ComOut( CGM_DESCRIPTION, "paragraph tabs" ) break; + case -133 : ComOut( CGM_DESCRIPTION, "paragraph bullet" ) break; + case -134 : ComOut( CGM_DESCRIPTION, "paragraph bulet level" ) break; + case -135 : ComOut( CGM_DESCRIPTION, "line horuzontal align" ) break; + case -136 : ComOut( CGM_DESCRIPTION, "line vertical align" ) break; + case -137 : ComOut( CGM_DESCRIPTION, "line spacing" ) break; + case -138 : ComOut( CGM_DESCRIPTION, "word wrap" ) break; + case -150 : ComOut( CGM_DESCRIPTION, "forward advance distance" ) break; + case -151 : ComOut( CGM_DESCRIPTION, "word spacing" ) break; + case -152 : ComOut( CGM_DESCRIPTION, "external leading" ) break; + case -160 : ComOut( CGM_DESCRIPTION, "set gradient offset" ) break; + case -161 : ComOut( CGM_DESCRIPTION, "set gradient edge" ) break; + case -162 : ComOut( CGM_DESCRIPTION, "set gradient angle" ) break; + case -163 : ComOut( CGM_DESCRIPTION, "set gradient description" ) break; + case -164 : ComOut( CGM_DESCRIPTION, "set gradient style" ) break; + case -165 : ComOut( CGM_DESCRIPTION, "set back ground style" ) break; + case -170 : ComOut( CGM_DESCRIPTION, "geometric pattern draw style" ) break; + case -190 : ComOut( CGM_DESCRIPTION, "set character width" ) break; + case -191 : ComOut( CGM_DESCRIPTION, "hyperlink definitions" ) break; + case -192 : ComOut( CGM_DESCRIPTION, "set color name for pantone" ) break; + case -32746 : ComOut( CGM_DESCRIPTION, "set text font" ) break; + case -32747 : ComOut( CGM_DESCRIPTION, "font selection mode" ) break; + case -32752 : ComOut( CGM_DESCRIPTION, "connecting edge" ) break; + case -32753 : ComOut( CGM_DESCRIPTION, "set drawing mode" ) break; + case -32754 : ComOut( CGM_DESCRIPTION, "inquire clip rectangle" ) break; + case -32755 : ComOut( CGM_DESCRIPTION, "protection region indicator" ) break; + case -32756 : ComOut( CGM_DESCRIPTION, "end protection region" ) break; + case -32757 : ComOut( CGM_DESCRIPTION, "begin protection region" ) break; + case -32758 : ComOut( CGM_DESCRIPTION, "geometric pattern definition" ) break; + case -32759 : ComOut( CGM_DESCRIPTION, "hatch style definition" ) break; + case -32760 : ComOut( CGM_DESCRIPTION, "close figure" ) break; + case -32761 : ComOut( CGM_DESCRIPTION, "end figure" ) + { + mpOutAct->EndFigure(); + mbFigure = sal_False; + } + break; + case -32762 : ComOut( CGM_DESCRIPTION, "begin figure" ) + { + mbFigure = sal_True; + mpOutAct->BeginFigure(); + } + break; + case -32763 : ComOut( CGM_DESCRIPTION, "pop transformatin" ) break; + case -32764 : ComOut( CGM_DESCRIPTION, "push transformation" ) break; + case -32765 : ComOut( CGM_DESCRIPTION, "copy segment" ) break; + case -32766 : ComOut( CGM_DESCRIPTION, "endseg" ) break; + case -32767 : ComOut( CGM_DESCRIPTION, "begin segment" ) break; + default : ComOut( CGM_DESCRIPTION, "????????????????????????????????" ) break; + } + mnParaSize = mnElementSize; + } + break; + case 0x02 : ComOut( CGM_LEVEL1, "Get Escape" ) break; + case 0x11 : ComOut( CGM_GDSF_ONLY, "Set Underline Mode" ) + { + ImplSetUnderlineMode(); + } + break; + case 0x12 : ComOut( CGM_GDSF_ONLY, "Set Script Mode" ) break; + case 0x13 : ComOut( CGM_GDSF_ONLY, "Set Shadow Mode" ) break; + case 0x18 : ComOut( CGM_GDSF_ONLY, "Set Media Size" ) break; + case 0x20 : ComOut( CGM_GDSF_ONLY, "Set Character Mode" ) break; + case 0x24 : ComOut( CGM_GDSF_ONLY, "Resolution Mode" ) break; + case 0x27 : ComOut( CGM_GDSF_ONLY, "Line Cap" ) break; + case 0x28 : ComOut( CGM_GDSF_ONLY, "Line Join" ) break; + case 0x29 : ComOut( CGM_GDSF_ONLY, "Edge Join" ) break; + case 0x40 : ComOut( CGM_GDSF_ONLY, "Media Type" ) break; + case 0x41 : ComOut( CGM_GDSF_ONLY, "Number of Copies" ) break; + case 0x42 : ComOut( CGM_GDSF_ONLY, "Origin" ) break; + case 0x45 : ComOut( CGM_GDSF_ONLY, "Color Reversal Mode" ) break; + case 0x46 : ComOut( CGM_GDSF_ONLY, "Line Cap Attributes" ) break; + case 0x49 : ComOut( CGM_GDSF_ONLY, "Begin Effect Definition" ) break; + case 0x50 : ComOut( CGM_GDSF_ONLY, "End Effect Definition" ) break; + case 0x51 : ComOut( CGM_GDSF_ONLY, "Line End Style Attributes" ) break; + case 0x52 : ComOut( CGM_GDSF_ONLY, "Begin Data" ) break; + case 0x53 : ComOut( CGM_GDSF_ONLY, "Data" ) break; + case 0x54 : ComOut( CGM_GDSF_ONLY, "End Data" ) break; + case 0x55 : ComOut( CGM_GDSF_ONLY, "Set Background Style" ) break; + case 0x56 : ComOut( CGM_GDSF_ONLY, "Set EPS Mode" ) break; + case 0x57 : ComOut( CGM_GDSF_ONLY, "Fill Mode" ) break; + case 0x58 : ComOut( CGM_GDSF_ONLY, "Begin Symbol" ) break; + case 0x59 : ComOut( CGM_GDSF_ONLY, "End Symbol" ) break; + case 0x60 : ComOut( CGM_GDSF_ONLY, "Begin Layer" ) break; + case 0x61 : ComOut( CGM_GDSF_ONLY, "End Layer" ) break; + case 0x62 : ComOut( CGM_GDSF_ONLY, "Layer Visibility" ) break; + case 0x64 : ComOut( CGM_GDSF_ONLY, "Set Text Offset" ) break; + case 0xFF : ComOut( CGM_GDSF_ONLY, "Inquire Function Support" ) break; + case 0xFE : ComOut( CGM_GDSF_ONLY, "Inquire Origin" ) break; + case 0xFD : ComOut( CGM_GDSF_ONLY, "Inquire Foreign Data Mode" ) break; + case 0xFC : ComOut( CGM_GDSF_ONLY, "Inquire Text Extent" ) break; + case 0xFB : ComOut( CGM_GDSF_ONLY, "Inquire DPI" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + +// --------------------------------------------------------------- + +void CGM::ImplDoClass8() +{ + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_LEVEL2, "Copy Segment" ) break; // NS + case 0x02 : ComOut( CGM_LEVEL2, "Inheritance Filter" ) break; // NS + case 0x03 : ComOut( CGM_LEVEL2, "Clip Inheritance" ) break; // NS + case 0x04 : ComOut( CGM_LEVEL2, "Segment Transformation" ) break; + case 0x05 : ComOut( CGM_LEVEL2, "Segment HighLighting" ) break; // NS + case 0x06 : ComOut( CGM_LEVEL2, "Segment Display Priority" ) break; // NS + case 0x07 : ComOut( CGM_LEVEL2, "Segment Pick Priority" ) break; // NS + case 0xfe : ComOut( CGM_GDSF_ONLY, "INQ Current Position" ) break; + case 0xff : ComOut( CGM_GDSF_ONLY, "INQ Inserted Object Extent" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; // NS + } +}; + +// --------------------------------------------------------------- + +void CGM::ImplDoClass9() +{ + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_UNKNOWN_LEVEL, "Pixel Array" ) break; // NS + case 0x02 : ComOut( CGM_UNKNOWN_LEVEL, "Create Bitmap" ) break; // NS + case 0x03 : ComOut( CGM_UNKNOWN_LEVEL, "Delete Bitmap" ) break; // NS + case 0x04 : ComOut( CGM_UNKNOWN_LEVEL, "Select Drawing Bitmap" ) break; // NS + case 0x05 : ComOut( CGM_UNKNOWN_LEVEL, "Display Bitmap" ) break; // NS + case 0x06 : ComOut( CGM_UNKNOWN_LEVEL, "Drawing Mode" ) break; + case 0x07 : ComOut( CGM_UNKNOWN_LEVEL, "Mapped Bitmap ForeGrnd Color" ) break; // NS + case 0x08 : ComOut( CGM_UNKNOWN_LEVEL, "Fill Bitmap" ) break; // NS + case 0x09 : ComOut( CGM_UNKNOWN_LEVEL, "Two Operand BitBlt" ) break; // NS + case 0x0a : ComOut( CGM_UNKNOWN_LEVEL, "Three Operand BitBlt" ) break; // NS + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + +// --------------------------------------------------------------- + +void CGM::ImplDoClass15() +{ + switch ( mnElementID ) + { + case 0x01 : ComOut( CGM_UNKNOWN_LEVEL, "Inquire Error Stack" ) break; + case 0x02 : ComOut( CGM_UNKNOWN_LEVEL, "Pop Error Stack" ) break; + case 0x03 : ComOut( CGM_UNKNOWN_LEVEL, "Empty Error Stack" ) break; + default: ComOut( CGM_UNKNOWN_COMMAND, "" ) break; + } +}; + +// --------------------------------------------------------------- diff --git a/filter/source/graphicfilter/icgm/elements.cxx b/filter/source/graphicfilter/icgm/elements.cxx new file mode 100644 index 000000000000..305ca1d73834 --- /dev/null +++ b/filter/source/graphicfilter/icgm/elements.cxx @@ -0,0 +1,395 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "elements.hxx" + +// --------------------------------------------------------------- + + +CGMElements::CGMElements( CGM& rCGM ) : + mpCGM ( &rCGM ) +{ + Init(); +}; + +// --------------------------------------------------------------- + +CGMElements::~CGMElements() +{ + DeleteTable( aHatchTable ); + DeleteAllBundles( aLineList ); + DeleteAllBundles( aMarkerList ); + DeleteAllBundles( aEdgeList ); + DeleteAllBundles( aTextList ); + DeleteAllBundles( aFillList ); +} + +// --------------------------------------------------------------- + +CGMElements& CGMElements::operator=( CGMElements& rSource ) +{ + sal_uInt32 nIndex; + + nVDCIntegerPrecision = rSource.nVDCIntegerPrecision; + nIntegerPrecision = rSource.nIntegerPrecision; + eRealPrecision = rSource.eRealPrecision; + nRealSize = rSource.nRealSize; + nIndexPrecision = rSource.nIndexPrecision; + nColorPrecision = rSource.nColorPrecision; + nColorIndexPrecision = rSource.nColorIndexPrecision; + + nMetaFileVersion = rSource.nMetaFileVersion; + eScalingMode = rSource.eScalingMode; + nScalingFactor = rSource.nScalingFactor; + eVDCType = rSource.eVDCType; + eVDCRealPrecision = rSource.eVDCRealPrecision; + nVDCRealSize = rSource.nVDCRealSize; + aVDCExtent = rSource.aVDCExtent; + aVDCExtentMaximum = rSource.aVDCExtentMaximum; + eDeviceViewPortMode = rSource.eDeviceViewPortMode; + nDeviceViewPortScale = rSource.nDeviceViewPortScale; + eDeviceViewPortMap = rSource.eDeviceViewPortMap; + eDeviceViewPortMapH = rSource.eDeviceViewPortMapH; + eDeviceViewPortMapV = rSource.eDeviceViewPortMapV; + aDeviceViewPort = rSource.aDeviceViewPort; + nMitreLimit = rSource.nMitreLimit; + eClipIndicator = rSource.eClipIndicator; + aClipRect = rSource.aClipRect; + eColorSelectionMode = rSource.eColorSelectionMode; + eColorModel = rSource.eColorModel; + nColorMaximumIndex = rSource.nColorMaximumIndex; + nLatestColorMaximumIndex = rSource.nLatestColorMaximumIndex; + + for ( nIndex = 1; nIndex < 256; nIndex++ ) // do not overwrite the background color + { + aColorTableEntryIs[ nIndex ] = rSource.aColorTableEntryIs[ nIndex ]; + aColorTable[ nIndex ] = rSource.aColorTable[ nIndex ]; + aLatestColorTable[ nIndex ] = rSource.aColorTable[ nIndex ]; + } + + for ( nIndex = 0; nIndex < 8; nIndex++ ) + { + nColorValueExtent[ nIndex ] = rSource.nColorValueExtent[ nIndex ]; + } + nAspectSourceFlags = rSource.nAspectSourceFlags; + + CopyAllBundles( rSource.aLineList, aLineList ); + aLineBundle = rSource.aLineBundle; + pLineBundle = (LineBundle*)GetBundle( aLineList, rSource.pLineBundle->GetIndex() ); + eLineWidthSpecMode = rSource.eLineWidthSpecMode; + eLineCapType = rSource.eLineCapType; + eLineJoinType = rSource.eLineJoinType; + + CopyAllBundles( rSource.aMarkerList, aMarkerList ); + aMarkerBundle = rSource.aMarkerBundle; + pMarkerBundle = (MarkerBundle*)GetBundle( aMarkerList, rSource.pMarkerBundle->GetIndex() ); + eMarkerSizeSpecMode = rSource.eMarkerSizeSpecMode; + + CopyAllBundles( rSource.aEdgeList, aEdgeList ); + aEdgeBundle = rSource.aEdgeBundle; + pEdgeBundle = (EdgeBundle*)GetBundle( aEdgeList, rSource.pEdgeBundle->GetIndex() ); + eEdgeVisibility = rSource.eEdgeVisibility; + eEdgeWidthSpecMode = rSource.eEdgeWidthSpecMode; + + CopyAllBundles( rSource.aTextList, aTextList ); + aTextBundle = rSource.aTextBundle; + pTextBundle = (TextBundle*)GetBundle( aTextList, rSource.pTextBundle->GetIndex() ); + nCharacterHeight = rSource.nCharacterHeight; + nCharacterOrientation[ 0 ] = rSource.nCharacterOrientation[ 0 ]; + nCharacterOrientation[ 1 ] = rSource.nCharacterOrientation[ 1 ]; + nCharacterOrientation[ 2 ] = rSource.nCharacterOrientation[ 2 ]; + nCharacterOrientation[ 3 ] = rSource.nCharacterOrientation[ 3 ]; + eUnderlineMode = rSource.eUnderlineMode; + nUnderlineColor = rSource.nUnderlineColor; + eTextPath = rSource.eTextPath; + eTextAlignmentH = rSource.eTextAlignmentH; + eTextAlignmentV = rSource.eTextAlignmentV; + nTextAlignmentHCont = rSource.nTextAlignmentHCont; + nTextAlignmentVCont = rSource.nTextAlignmentVCont; + nCharacterSetIndex = rSource.nCharacterSetIndex; + nAlternateCharacterSetIndex = rSource.nAlternateCharacterSetIndex; + aFontList = rSource.aFontList; + eCharacterCodingA = rSource.eCharacterCodingA; + + CopyAllBundles( rSource.aFillList, aFillList ); + aFillBundle = rSource.aFillBundle; + pFillBundle = (FillBundle*)GetBundle( aFillList, rSource.pFillBundle->GetIndex() ); + aFillRefPoint = rSource.aFillRefPoint; + eTransparency = rSource.eTransparency; + nAuxiliaryColor = rSource.nAuxiliaryColor; + + DeleteTable( aHatchTable ); + HatchEntry* pSource = (HatchEntry*)rSource.aHatchTable.First(); + while ( pSource ) + { + sal_uInt32 nKey = rSource.aHatchTable.GetKey( pSource ); + aHatchTable.Insert( nKey, new HatchEntry( *pSource ) ); + pSource = (HatchEntry*)rSource.aHatchTable.Next(); + } + bSegmentCount = rSource.bSegmentCount; + return (*this); +} + +// --------------------------------------------------------------- + +void CGMElements::Init() +{ + + nIntegerPrecision = nIndexPrecision = 2; + nRealSize = nVDCRealSize = 4; + nColorIndexPrecision = 1; + nColorPrecision = 1; + nVDCIntegerPrecision = 2; + eRealPrecision = eVDCRealPrecision = RP_FIXED; //RP_FLOAT; + + nMetaFileVersion = 1; + eScalingMode = SM_ABSTRACT; + eVDCType = VDC_INTEGER; + aVDCExtent.Left = aVDCExtent.Bottom = 0; +// aVDCExtent.Right = aVDCExtent.Top = 32767; + aVDCExtent.Right = aVDCExtent.Top = 1.0; + aVDCExtentMaximum.Left = aVDCExtentMaximum.Bottom = 0; +// aVDCExtentMaximum.Right = aVDCExtentMaximum.Top = 32767; + aVDCExtentMaximum.Right = aVDCExtentMaximum.Top = 1.0; + + eDeviceViewPortMode = DVPM_FRACTION; + nDeviceViewPortScale = 1; + eDeviceViewPortMap = DVPM_FORCED; + eDeviceViewPortMapH = DVPMH_LEFT; + eDeviceViewPortMapV = DVPMV_BOTTOM; + aDeviceViewPort.Left = 0; + aDeviceViewPort.Top = 1; + aDeviceViewPort.Right = 0; + aDeviceViewPort.Bottom = 1; + + nMitreLimit = 32767; + eClipIndicator = CI_ON; + aClipRect = aVDCExtent; + + eColorSelectionMode = CSM_INDEXED; + eColorModel = CM_RGB; + nColorMaximumIndex = 63; + int i; + for ( i = 0; i < 256; aColorTableEntryIs[ i++ ] = 0 ) ; + aColorTable[ 0 ] = 0; + for ( i = 1; i < 256; aColorTable[ i++ ] = 0xffffff ) ; + nLatestColorMaximumIndex = 63; + aLatestColorTable[ 0 ] = 0; + for ( i = 1; i < 256; aLatestColorTable[ i++ ] = 0xffffff ) ; + nColorValueExtent[ 0 ] = nColorValueExtent[ 1 ] = nColorValueExtent[ 2 ] = 0; + nColorValueExtent[ 3 ] = nColorValueExtent[ 4 ] = nColorValueExtent[ 5 ] = 255; + + nAspectSourceFlags = 0; // all flags are individual + + eLineWidthSpecMode = SM_SCALED; // line parameter + eLineCapType = LCT_NONE; + eLineJoinType = LJT_NONE; + pLineBundle = &aLineBundle; // line bundle parameter + aLineBundle.SetIndex( 1 ); + aLineBundle.eLineType = LT_SOLID; + aLineBundle.nLineWidth = 1; + aLineBundle.SetColor( 0xffffff ); + InsertBundle( aLineList, aLineBundle ); + + eMarkerSizeSpecMode = SM_SCALED; // marker parameter + pMarkerBundle = &aMarkerBundle; // marker bundle parameter + aMarkerBundle.SetIndex( 1 ); + aMarkerBundle.eMarkerType = MT_STAR; + aMarkerBundle.nMarkerSize = 1; + aMarkerBundle.SetColor( 0xffffff ); + InsertBundle( aMarkerList, aMarkerBundle ); + + eEdgeVisibility = EV_OFF; // edge parameter + eEdgeWidthSpecMode = SM_SCALED; + pEdgeBundle = &aEdgeBundle; // edge bundle parameter + aEdgeBundle.SetIndex( 1 ); + aEdgeBundle.eEdgeType = ET_SOLID; + aEdgeBundle.nEdgeWidth = 1; + aEdgeBundle.SetColor( 0xffffff ); + InsertBundle( aEdgeList, aEdgeBundle ); + + nCharacterHeight = 327; // text parameter + nCharacterOrientation[0] = 0; + nCharacterOrientation[1] = 1; + nCharacterOrientation[2] = 1; + nCharacterOrientation[3] = 0; + eUnderlineMode = UM_OFF; + nUnderlineColor = 0xffffff; + eTextPath = TPR_RIGHT; + eTextAlignmentH = TAH_NORMAL; + eTextAlignmentV = TAV_NORMAL; + nCharacterSetIndex = nAlternateCharacterSetIndex = 1; + eCharacterCodingA = CCA_BASIC_7; + pTextBundle = &aTextBundle; // text bundle parameter + aTextBundle.SetIndex( 1 ); + aTextBundle.nTextFontIndex = 1; + aTextBundle.eTextPrecision = TPR_STRING; + aTextBundle.nCharacterExpansion = 1; + aTextBundle.nCharacterSpacing = 0; + aTextBundle.SetColor( 0xffffff ); + InsertBundle( aTextList, aTextBundle ); + + pFillBundle = &aFillBundle; // fill bundle parameter + aFillBundle.SetIndex( 1 ); + aFillBundle.eFillInteriorStyle = FIS_HOLLOW; + aFillBundle.nFillHatchIndex = 1; + aFillBundle.nFillPatternIndex = 1; + aFillBundle.SetColor( 0xffffff ); + InsertBundle( aFillList, aFillBundle ); + + ImplInsertHatch( 0, 0, 0, 0 ); + ImplInsertHatch( 1, 0, 125, 0 ); + ImplInsertHatch( 2, 0, 125, 900 ); + ImplInsertHatch( 3, 0, 125, 450 ); + ImplInsertHatch( 4, 0, 125, 1350 ); + ImplInsertHatch( 5, 1, 125, 0 ); + ImplInsertHatch( 6, 1, 125, 450 ); + ImplInsertHatch( -1, 0, 75, 0 ); + ImplInsertHatch( -2, 0, 75, 900 ); + ImplInsertHatch( -3, 0, 75, 450 ); + ImplInsertHatch( -4, 0, 75, 1350 ); + ImplInsertHatch( -5, 1, 75, 0 ); + ImplInsertHatch( -6, 1, 75, 450 ); + ImplInsertHatch( -7, 2, 125, 0 ); + ImplInsertHatch( -8, 2, 125, 900 ); + ImplInsertHatch( -9, 2, 125, 450 ); + ImplInsertHatch( -10, 2, 125, 1350 ); + ImplInsertHatch( -11, 0, 40, 0 ); + ImplInsertHatch( -12, 0, 40, 900 ); + ImplInsertHatch( -13, 0, 40, 450 ); + ImplInsertHatch( -14, 0, 40, 1350 ); + ImplInsertHatch( -15, 1, 40, 0 ); + ImplInsertHatch( -16, 1, 40, 900 ); + ImplInsertHatch( -21, 0, 250, 0 ); + ImplInsertHatch( -22, 0, 250, 900 ); + ImplInsertHatch( -23, 0, 250, 450 ); + ImplInsertHatch( -24, 0, 250, 1350 ); + ImplInsertHatch( -25, 1, 250, 0 ); + ImplInsertHatch( -26, 1, 250, 450 ); + + eTransparency = T_ON; + + nBackGroundColor = nAuxiliaryColor = 0; + + bSegmentCount = sal_False; +} + +// --------------------------------------------------------------- + +void CGMElements::ImplInsertHatch( sal_Int32 nKey, int nStyle, long nDistance, long nAngle ) +{ + HatchEntry* pHatchEntry; + pHatchEntry = new HatchEntry; + aHatchTable.Insert( (sal_uInt32)nKey, pHatchEntry ); + pHatchEntry->HatchStyle = nStyle; + pHatchEntry->HatchDistance = nDistance; + pHatchEntry->HatchAngle = nAngle; +} + +// --------------------------------------------------------------- + +void CGMElements::DeleteTable( Table& rTable ) +{ + HatchEntry* pPtr = (HatchEntry*)rTable.First(); + while ( pPtr ) + { + delete pPtr; + pPtr = (HatchEntry*)rTable.Next(); + } + rTable.Clear(); +} + +// --------------------------------------------------------------- + +void CGMElements::DeleteAllBundles( List& rList ) +{ + void* pPtr = rList.First(); + while( pPtr ) + { + delete (Bundle*)pPtr; + pPtr = rList.Next(); + } +}; + + +// --------------------------------------------------------------- + +void CGMElements::CopyAllBundles( List& rSource, List& rDest ) +{ + DeleteAllBundles( rDest ); + rDest.Clear(); + + void* pPtr = rSource.First(); + while( pPtr ) + { + Bundle* pTempBundle = ( (Bundle*)pPtr)->Clone(); + rDest.Insert( pTempBundle, LIST_APPEND ); + pPtr = rSource.Next(); + } +}; + +// --------------------------------------------------------------- + +Bundle* CGMElements::GetBundleIndex( sal_uInt32 nIndex, List& rList, Bundle& rBundle ) +{ + rBundle.SetIndex( nIndex ); + Bundle* pBundle = GetBundle( rList, nIndex ); + if ( !pBundle ) + pBundle = InsertBundle( rList, rBundle ); + return pBundle; +} + +// --------------------------------------------------------------- + +Bundle* CGMElements::GetBundle( List& rList, long nIndex ) +{ + Bundle* pBundle = (Bundle*)rList.First(); + while( pBundle && ( pBundle->GetIndex() != nIndex ) ) + { + pBundle = (Bundle*)rList.Next(); + } + return pBundle; +} + +// --------------------------------------------------------------- + +Bundle* CGMElements::InsertBundle( List& rList, Bundle& rBundle ) +{ + Bundle* pBundle = GetBundle( rList, rBundle.GetIndex() ); + if ( pBundle ) + { + rList.Remove( pBundle ); + delete pBundle; + } + pBundle = rBundle.Clone(); + rList.Insert( pBundle, LIST_APPEND ); + return pBundle; +}; + diff --git a/filter/source/graphicfilter/icgm/elements.hxx b/filter/source/graphicfilter/icgm/elements.hxx new file mode 100644 index 000000000000..32614ef2590e --- /dev/null +++ b/filter/source/graphicfilter/icgm/elements.hxx @@ -0,0 +1,145 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_ELEMENTS_HXX_ +#define CGM_ELEMENTS_HXX_ + +#include "main.hxx" +#include + +#define nBackGroundColor aColorTable[ 0 ] + +class CGMElements +{ + void ImplInsertHatch( sal_Int32 Key, int Style, long Distance, long Angle ); + public: + CGM* mpCGM; + long nMetaFileVersion; + + sal_uInt32 nIntegerPrecision; // maybe 1, 2, 4 Bytes + sal_uInt32 nIndexPrecision; // " " " + RealPrecision eRealPrecision; + sal_uInt32 nRealSize; // maybe 4 or 8 bytes + sal_uInt32 nColorPrecision; // " " " + sal_uInt32 nColorIndexPrecision;// " " " + + ScalingMode eScalingMode; + double nScalingFactor; + + VDCType eVDCType; // Integer / Real + sal_uInt32 nVDCIntegerPrecision; + RealPrecision eVDCRealPrecision; + sal_uInt32 nVDCRealSize; + FloatRect aVDCExtent; + FloatRect aVDCExtentMaximum; + + DeviceViewPortMode eDeviceViewPortMode; + double nDeviceViewPortScale; + DeviceViewPortMap eDeviceViewPortMap; + DeviceViewPortMapH eDeviceViewPortMapH; + DeviceViewPortMapV eDeviceViewPortMapV; + FloatRect aDeviceViewPort; + + double nMitreLimit; + + ClipIndicator eClipIndicator; + FloatRect aClipRect; + + ColorSelectionMode eColorSelectionMode; + ColorModel eColorModel; + sal_uInt32 nColorMaximumIndex; // default 63 + sal_uInt32 nLatestColorMaximumIndex; // default 63 + sal_Int8 aColorTableEntryIs[ 256 ]; + sal_uInt32 aColorTable[ 256 ]; + sal_uInt32 aLatestColorTable[ 256 ]; + sal_uInt32 nColorValueExtent[ 8 ]; // RGB, CMYK + + // ASPECT SOURCE FLAGS + sal_uInt32 nAspectSourceFlags; // bit = 0 -> INDIVIDUAL + // 1 -> BUNDLED + + LineBundle* pLineBundle; // Pointer to the current LineBundleIndex + LineBundle aLineBundle; + List aLineList; + SpecMode eLineWidthSpecMode; + LineCapType eLineCapType; + LineJoinType eLineJoinType; + + MarkerBundle* pMarkerBundle; // Pointer to the current MarkerBundleIndex + MarkerBundle aMarkerBundle; + List aMarkerList; + SpecMode eMarkerSizeSpecMode; + + EdgeBundle* pEdgeBundle; // Pointer to the current EdgeBundleIndex + EdgeBundle aEdgeBundle; + List aEdgeList; + EdgeVisibility eEdgeVisibility; + SpecMode eEdgeWidthSpecMode; + + TextBundle* pTextBundle; // Pointer to the current TextBundleIndex + TextBundle aTextBundle; + List aTextList; + double nCharacterHeight; + double nCharacterOrientation[ 4 ]; + UnderlineMode eUnderlineMode; + sal_uInt32 nUnderlineColor; + TextPath eTextPath; + TextAlignmentH eTextAlignmentH; + TextAlignmentV eTextAlignmentV; + double nTextAlignmentHCont; + double nTextAlignmentVCont; + long nCharacterSetIndex; + long nAlternateCharacterSetIndex; + CharacterCodingA eCharacterCodingA; + CGMFList aFontList; + + FillBundle* pFillBundle; // Pointer to the current EdgeBundleIndex + FillBundle aFillBundle; + List aFillList; + FloatPoint aFillRefPoint; + Table aHatchTable; + + Transparency eTransparency; + + sal_uInt32 nAuxiliaryColor; + + // Delimiter Counts -> which will be increased by each 'begin' operation + // and decreased by each 'end' operation + sal_Bool bSegmentCount; + CGMElements( CGM& rCGM ); + ~CGMElements(); + CGMElements& operator=( CGMElements& ); + void Init(); + void DeleteTable( Table& ); + Bundle* GetBundleIndex( sal_uInt32 nIndex, List&, Bundle& ); + Bundle* GetBundle( List& rList, long nIndex ); + Bundle* InsertBundle( List&, Bundle& ); + void DeleteAllBundles( List& ); + void CopyAllBundles( List& Source, List& Dest ); +}; + +#endif + diff --git a/filter/source/graphicfilter/icgm/exports.map b/filter/source/graphicfilter/icgm/exports.map new file mode 100644 index 000000000000..cc7f07dd1112 --- /dev/null +++ b/filter/source/graphicfilter/icgm/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + ImportCGM; + + local: + *; +}; diff --git a/filter/source/graphicfilter/icgm/main.hxx b/filter/source/graphicfilter/icgm/main.hxx new file mode 100644 index 000000000000..675d7149d12e --- /dev/null +++ b/filter/source/graphicfilter/icgm/main.hxx @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_MAIN_HXX +#define CGM_MAIN_HXX + +#include "cgm.hxx" + +// --------------------------------------------------------------- + +#define CGM_LEVEL1 0x0001 // VERSION 1 METAFILE +#define CGM_LEVEL2 0x0002 +#define CGM_LEVEL3 0x0003 +#define CGM_GDSF_ONLY 0x00F0 +#define CGM_UNKNOWN_LEVEL 0x00F1 +#define CGM_UNKNOWN_COMMAND 0x00F2 +#define CGM_DESCRIPTION 0x00F3 + +#define CGM_EXTENDED_PRIMITIVES_SET 0x0100 // INDICATES PRIMITIVES WHICH ARE AVAILABLE IN + // LEVEL 1 BUT ARE NOT DEFINED IN ISO 7942(GKS) +#define CGM_DRAWING_PLUS_CONTROL_SET 0x0200 // INDICATES THAT THIS IS AN ADDITIONAL LEVEL 1 + // ELEMENT +#define ComOut( Level, Description ) if ( mpCommentOut ) ImplComment( Level, Description ); + +#define BMCOL( _col ) BitmapColor( (sal_Int8)(_col >> 16 ), (sal_Int8)( _col >> 8 ), (sal_Int8)_col ) +#define ALIGN2( _nElementSize ) { _nElementSize = ( _nElementSize + 1 ) & ~1; } +#define ALIGN4( _nElementSize ) { _nElementSize = ( _nElementSize + 3 ) & ~3; } +#define ALIGN8( _nElementSize ) { _nElementSize = ( _nElementSize + 7 ) & ~7; } + +#include +#include +#include +#include "bundles.hxx" +#include "bitmap.hxx" +#include "elements.hxx" + + +#endif + diff --git a/filter/source/graphicfilter/icgm/makefile.mk b/filter/source/graphicfilter/icgm/makefile.mk new file mode 100644 index 000000000000..f8dc889086f5 --- /dev/null +++ b/filter/source/graphicfilter/icgm/makefile.mk @@ -0,0 +1,80 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. +PRJNAME=filter +TARGET=icgm +ENABLE_EXCEPTIONS=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/cgm.obj \ + $(SLO)$/chart.obj \ + $(SLO)$/class0.obj \ + $(SLO)$/class1.obj \ + $(SLO)$/class2.obj \ + $(SLO)$/class3.obj \ + $(SLO)$/class4.obj \ + $(SLO)$/class5.obj \ + $(SLO)$/class7.obj \ + $(SLO)$/classx.obj \ + $(SLO)$/outact.obj \ + $(SLO)$/actimpr.obj \ + $(SLO)$/bundles.obj \ + $(SLO)$/bitmap.obj \ + $(SLO)$/elements.obj +# $(SLO)$/svdem.obj + +SHL1TARGET = icg$(DLLPOSTFIX) +SHL1IMPLIB = icgm +SHL1VERSIONMAP=exports.map +SHL1DEF = $(MISC)$/$(SHL1TARGET).def +SHL1LIBS = $(SLB)$/icgm.lib + +DEF1NAME=$(SHL1TARGET) + +.IF "$(GUI)"=="OS2" +SHL1OBJS = $(SLO)$/class0.obj +.ENDIF + +SHL1STDLIBS = \ + $(TKLIB) \ + $(VCLLIB) \ + $(UNOTOOLSLIB) \ + $(TOOLSLIB) \ + $(CPPULIB) \ + $(SALLIB) +.ENDIF + +# --- Targets -------------------------------------------------------------- + +.INCLUDE : target.mk + diff --git a/filter/source/graphicfilter/icgm/outact.cxx b/filter/source/graphicfilter/icgm/outact.cxx new file mode 100644 index 000000000000..6e7e9959a4c7 --- /dev/null +++ b/filter/source/graphicfilter/icgm/outact.cxx @@ -0,0 +1,200 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + +using namespace ::com::sun::star; + +// --------------------------------------------------------------- + +CGMOutAct::CGMOutAct( CGM& rCGM ) +{ + mpCGM = &rCGM; + mnCurrentPage = 0; + mnGroupActCount = mnGroupLevel = 0; + mpGroupLevel = new sal_uInt32[ CGM_OUTACT_MAX_GROUP_LEVEL ]; + mpPoints = (Point*)new sal_Int8[ 0x2000 * sizeof( Point ) ]; + mpFlags = new BYTE[ 0x2000 ]; + + mnIndex = 0; + mpGradient = NULL; +}; + +// --------------------------------------------------------------- + +CGMOutAct::~CGMOutAct() +{ + delete[] (sal_Int8*) mpPoints; + delete[] mpFlags; + delete[] mpGroupLevel; + + if ( mpGradient ) + delete mpGradient; +}; + +// --------------------------------------------------------------- + +void CGMOutAct::BeginFigure() +{ + if ( mnIndex ) + EndFigure(); + + BeginGroup(); + mnIndex = 0; +} + +// --------------------------------------------------------------- + +void CGMOutAct::CloseRegion() +{ + if ( mnIndex > 2 ) + { + NewRegion(); + DrawPolyPolygon( maPolyPolygon ); + maPolyPolygon.Clear(); + } +} + +// --------------------------------------------------------------- + +void CGMOutAct::NewRegion() +{ + if ( mnIndex > 2 ) + { + Polygon aPolygon( mnIndex, mpPoints, mpFlags ); + maPolyPolygon.Insert( aPolygon ); + } + mnIndex = 0; +} + +// --------------------------------------------------------------- + +void CGMOutAct::EndFigure() +{ + NewRegion(); + DrawPolyPolygon( maPolyPolygon ); + maPolyPolygon.Clear(); + EndGroup(); + mnIndex = 0; +} + +// --------------------------------------------------------------- + +void CGMOutAct::RegPolyLine( Polygon& rPolygon, sal_Bool bReverse ) +{ + USHORT nPoints = rPolygon.GetSize(); + if ( nPoints ) + { + if ( bReverse ) + { + for ( USHORT i = 0; i < nPoints; i++ ) + { + mpPoints[ mnIndex + i ] = rPolygon.GetPoint( nPoints - i - 1 ); + mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( nPoints - i - 1 ); + } + } + else + { + for ( USHORT i = 0; i < nPoints; i++ ) + { + mpPoints[ mnIndex + i ] = rPolygon.GetPoint( i ); + mpFlags[ mnIndex + i ] = (sal_Int8)rPolygon.GetFlags( i ); + } + } + mnIndex = mnIndex + nPoints; + } +} + +// --------------------------------------------------------------- + +void CGMOutAct::SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 /*nType*/ ) +{ + if ( !mpGradient ) + mpGradient = new awt::Gradient; + mpGradient->XOffset = ( (sal_uInt16)nHorzOfs & 0x7f ); + mpGradient->YOffset = ( (sal_uInt16)nVertOfs & 0x7f ); +} + +// --------------------------------------------------------------- + +void CGMOutAct::SetGradientAngle( long nAngle ) +{ + if ( !mpGradient ) + mpGradient = new awt::Gradient; + mpGradient->Angle = sal::static_int_cast< sal_Int16 >(nAngle); +} + +// --------------------------------------------------------------- + +void CGMOutAct::SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo ) +{ + if ( !mpGradient ) + mpGradient = new awt::Gradient; + mpGradient->StartColor = nColorFrom; + mpGradient->EndColor = nColorTo; +} + +// --------------------------------------------------------------- + +void CGMOutAct::SetGradientStyle( sal_uInt32 nStyle, double /*fRatio*/ ) +{ + if ( !mpGradient ) + mpGradient = new awt::Gradient; + switch ( nStyle ) + { + case 0xff : + { + mpGradient->Style = awt::GradientStyle_AXIAL; + } + break; + case 4 : + { + mpGradient->Style = awt::GradientStyle_RADIAL; // CONICAL + } + break; + case 3 : + { + mpGradient->Style = awt::GradientStyle_RECT; + } + break; + case 2 : + { + mpGradient->Style = awt::GradientStyle_ELLIPTICAL; + } + break; + default : + { + mpGradient->Style = awt::GradientStyle_LINEAR; + } + } +} + + diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx new file mode 100644 index 000000000000..10c47dd14906 --- /dev/null +++ b/filter/source/graphicfilter/icgm/outact.hxx @@ -0,0 +1,148 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 CGM_OUTACT_HXX_ +#define CGM_OUTACT_HXX_ + +#include +#include +#include +#include +#include +#include + + +#define CGM_OUTACT_MAX_GROUP_LEVEL 64 + +#include "cgm.hxx" +#include +#include + +typedef struct NodeFrameSet +{ + Point nTopLeft; + Point nBottomRight; + ::com::sun::star::awt::Size nSize; +} NodeFrameSet; + +class CGM; +class VclGradient; +class CGMOutAct +{ + protected: + sal_uInt16 mnCurrentPage; // defaulted to zero + + sal_uInt32 mnGroupActCount; // grouping + sal_uInt32 mnGroupLevel; + sal_uInt32* mpGroupLevel; + + USHORT mnIndex; // figure + BYTE* mpFlags; + Point* mpPoints; + PolyPolygon maPolyPolygon; + ::com::sun::star::awt::Gradient* mpGradient; + + CGM* mpCGM; + + public: + CGMOutAct( CGM& rCGM ); + virtual ~CGMOutAct(); + virtual void FirstOutPut() { mpCGM->mbFirstOutPut = sal_False; } ; + virtual void InsertPage() { mnCurrentPage++; } ; + virtual void BeginGroup() {} ; + virtual void EndGroup() {}; + virtual void EndGrouping() {} ; + void BeginFigure() ; + void CloseRegion() ; + void NewRegion() ; + void EndFigure() ; + void RegPolyLine( Polygon&, sal_Bool bReverse = sal_False ) ; + void SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 nType ); + void SetGradientAngle( long nAngle ); + void SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo ); + void SetGradientStyle( sal_uInt32 nStyle, double fRatio ); + virtual void DrawRectangle( FloatRect& ) {} ; + virtual void DrawEllipse( FloatPoint&, FloatPoint&, double& ) {} ; + virtual void DrawEllipticalArc( FloatPoint&, FloatPoint&, double&, + sal_uInt32, double&, double&) {} ; + virtual void DrawBitmap( CGMBitmapDescriptor* ) {} ; + virtual void DrawPolygon( Polygon& ) {} ; + virtual void DrawPolyLine( Polygon& ) {} ; + virtual void DrawPolybezier( Polygon& ) {} ; + virtual void DrawPolyPolygon( PolyPolygon& ) {} ; + virtual void DrawText( ::com::sun::star::awt::Point&, ::com::sun::star::awt::Size&, char*, sal_uInt32, FinalFlag ) {} ; + virtual void AppendText( char*, sal_uInt32, FinalFlag ) {} ; + virtual sal_uInt32 DrawText( TextEntry*, NodeFrameSet&, sal_uInt32 ) { return 0; } ; + virtual void DrawChart(){} ; +}; + +class CGMImpressOutAct : public CGMOutAct +{ + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPages > maXDrawPages; + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > maXDrawPage; + +// ::com::sun::star::uno::Reference< XServiceRegistry > maXServiceRegistry; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > maXMultiServiceFactory; + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > maXServiceManagerSC; + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > maXShape; + sal_Bool ImplCreateShape( const ::rtl::OUString& rType ); + + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > maXPropSet; + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > maXShapes; + + sal_uInt32 nFinalTextCount; + + sal_Bool ImplInitPage(); + void ImplSetOrientation( FloatPoint& RefPoint, double& Orientation ) ; + void ImplSetLineBundle() ; + void ImplSetFillBundle() ; + void ImplSetTextBundle( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & ) ; +public: + CGMImpressOutAct( CGM&, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & ) ; + ~CGMImpressOutAct() {} ; + virtual void InsertPage() ; + virtual void BeginGroup() ; + virtual void EndGroup() ; + virtual void EndGrouping() ; + virtual void DrawRectangle( FloatRect& ) ; + virtual void DrawEllipse( FloatPoint& center, FloatPoint&, double& Orientation ) ; + virtual void DrawEllipticalArc( FloatPoint& center, FloatPoint& size, double& orientation, + sal_uInt32 etype, double& startangle, double& endangle ) ; + virtual void DrawBitmap( CGMBitmapDescriptor* ) ; + virtual void DrawPolygon( Polygon& ) ; + virtual void DrawPolyLine( Polygon& ) ; + virtual void DrawPolybezier( Polygon& ) ; + virtual void DrawPolyPolygon( PolyPolygon& ) ; + virtual void DrawText( ::com::sun::star::awt::Point& TextRectPos, ::com::sun::star::awt::Size& TextRectSize, char* String, sal_uInt32 StringSize, FinalFlag ) ; + virtual void AppendText( char* String, sal_uInt32 StringSize, FinalFlag ) ; + virtual sal_uInt32 DrawText( TextEntry*, NodeFrameSet&, sal_uInt32 ) ; + virtual void DrawChart(); +}; + + +#endif + diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx new file mode 100644 index 000000000000..11e82f97b328 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx @@ -0,0 +1,980 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include "dxf2mtf.hxx" + +#include + + +ULONG DXF2GDIMetaFile::CountEntities(const DXFEntities & rEntities) +{ + const DXFBasicEntity * pBE; + ULONG nRes; + + nRes=0; + for (pBE=rEntities.pFirst; pBE!=NULL; pBE=pBE->pSucc) nRes++; + return nRes; +} + + +void DXF2GDIMetaFile::MayCallback(ULONG /*nMainEntitiesProcessed*/) +{ + // ULONG nPercent; +/* + if (pCallback!=NULL && nMainEntitiesCount!=0) { + nPercent=nMinPercent+(nMaxPercent-nMinPercent)*nMainEntitiesProcessed/nMainEntitiesCount; + if (nPercent>=nLastPercent+4) { + if (((*pCallback)(pCallerData,(USHORT)nPercent))==TRUE) bStatus=FALSE; + nLastPercent=nPercent; + } + } +*/ +} + +Color DXF2GDIMetaFile::ConvertColor(BYTE nColor) +{ + return Color( + pDXF->aPalette.GetRed( nColor ), + pDXF->aPalette.GetGreen( nColor ), + pDXF->aPalette.GetBlue( nColor ) ); +} + +long DXF2GDIMetaFile::GetEntityColor(const DXFBasicEntity & rE) +{ + long nColor; + const DXFLayer * pLayer; + + nColor=rE.nColor; + if (nColor==256) { + if (rE.sLayer[0]=='0' && rE.sLayer[1]==0) nColor=nParentLayerColor; + else { + pLayer=pDXF->aTables.SearchLayer(rE.sLayer); + if (pLayer!=NULL) nColor=pLayer->nColor; + else nColor=nParentLayerColor; + } + } + else if (nColor==0) nColor=nBlockColor; + return nColor; +} + +DXFLineInfo DXF2GDIMetaFile::LTypeToDXFLineInfo(const char * sLineType) +{ + const DXFLType * pLT; + DXFLineInfo aDXFLineInfo; + + pLT=pDXF->aTables.SearchLType(sLineType); + if (pLT==NULL || pLT->nDashCount == 0) { + aDXFLineInfo.eStyle = LINE_SOLID; + } + else { + sal_Int32 i; + double x; + aDXFLineInfo.eStyle = LINE_DASH; + for (i=0; i < (pLT->nDashCount); i++) { + x = pLT->fDash[i] * pDXF->getGlobalLineTypeScale(); +// #### + // x = (sal_Int32) rTransform.TransLineWidth( pLT->fDash[i] * pDXF->getGlobalLineTypeScale() ); + if ( x >= 0.0 ) { + if ( aDXFLineInfo.nDotCount == 0 ) { + aDXFLineInfo.nDotCount ++; + aDXFLineInfo.fDotLen = x; + } + else if ( aDXFLineInfo.fDotLen == x ) { + aDXFLineInfo.nDotCount ++; + } + else if ( aDXFLineInfo.nDashCount == 0 ) { + aDXFLineInfo.nDashCount ++; + aDXFLineInfo.fDashLen = x; + } + else if ( aDXFLineInfo.fDashLen == x ) { + aDXFLineInfo.nDashCount ++; + } + else { + // It is impossible to be converted. + } + } + else { + if ( aDXFLineInfo.fDistance == 0 ) { + aDXFLineInfo.fDistance = -1 * x; + } + else { + // It is impossible to be converted. + } + } + + } + } + +#if 0 + if (aDXFLineInfo.DashCount > 0 && aDXFLineInfo.DashLen == 0.0) + aDXFLineInfo.DashLen ( 1 ); + if (aDXFLineInfo.DotCount > 0 && aDXFLineInfo.DotLen() == 0.0) + aDXFLineInfo.SetDotLen( 1 ); + if (aDXFLineInfo.GetDashCount > 0 || aDXFLineInfo.GetDotCount > 0) + if (aDXFLineInfo.GetDistance() == 0) + aDXFLineInfo.SetDistance( 1 ); +#endif + + return aDXFLineInfo; +} + +DXFLineInfo DXF2GDIMetaFile::GetEntityDXFLineInfo(const DXFBasicEntity & rE) +{ + DXFLineInfo aDXFLineInfo; + const DXFLayer * pLayer; + + aDXFLineInfo.eStyle = LINE_SOLID; + aDXFLineInfo.fWidth = 0; + aDXFLineInfo.nDashCount = 0; + aDXFLineInfo.fDashLen = 0; + aDXFLineInfo.nDotCount = 0; + aDXFLineInfo.fDotLen = 0; + aDXFLineInfo.fDistance = 0; + + if (strcmp(rE.sLineType,"BYLAYER")==0) { + if (rE.sLayer[0]=='0' && rE.sLayer[1]==0) aDXFLineInfo=aParentLayerDXFLineInfo; + else { + pLayer=pDXF->aTables.SearchLayer(rE.sLayer); + if (pLayer!=NULL) aDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType); + else aDXFLineInfo=aParentLayerDXFLineInfo; + } + } + else if (strcmp(rE.sLineType,"BYBLOCK")==0) { + aDXFLineInfo=aBlockDXFLineInfo; + } + else aDXFLineInfo=LTypeToDXFLineInfo(rE.sLineType); + return aDXFLineInfo; +} + + +BOOL DXF2GDIMetaFile::SetLineAttribute(const DXFBasicEntity & rE, ULONG /*nWidth*/) +{ + long nColor; + Color aColor; + + nColor=GetEntityColor(rE); + if (nColor<0) return FALSE; + aColor=ConvertColor((BYTE)nColor); + + if (aActLineColor!=aColor) { + pVirDev->SetLineColor( aActLineColor = aColor ); + } + + if (aActFillColor!=Color( COL_TRANSPARENT )) { + pVirDev->SetFillColor(aActFillColor = Color( COL_TRANSPARENT )); + } + return TRUE; +} + + +BOOL DXF2GDIMetaFile::SetAreaAttribute(const DXFBasicEntity & rE) +{ + long nColor; + Color aColor; + + nColor=GetEntityColor(rE); + if (nColor<0) return FALSE; + aColor=ConvertColor((BYTE)nColor); + + if (aActLineColor!=aColor) { + pVirDev->SetLineColor( aActLineColor = aColor ); + } + + if ( aActFillColor == Color( COL_TRANSPARENT ) || aActFillColor != aColor) { + pVirDev->SetFillColor( aActFillColor = aColor ); + } + return TRUE; +} + + +BOOL DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAngle, USHORT nHeight, double /*fWidthScale*/) +{ + long nColor; + Color aColor; + Font aFont; + + nAngle=-nAngle; + while (nAngle>3600) nAngle-=3600; + while (nAngle<0) nAngle+=3600; + + nColor=GetEntityColor(rE); + if (nColor<0) return FALSE; + aColor=ConvertColor((BYTE)nColor); + + aFont.SetColor(aColor); + aFont.SetTransparent(TRUE); + aFont.SetFamily(FAMILY_SWISS); + aFont.SetSize(Size(0,nHeight)); + aFont.SetAlign(ALIGN_BASELINE); + aFont.SetOrientation(nAngle); + if (aActFont!=aFont) { + aActFont=aFont; + pVirDev->SetFont(aActFont); + } + + return TRUE; +} + + +void DXF2GDIMetaFile::DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform) +{ + if (SetLineAttribute(rE)) { + Point aP0,aP1; + rTransform.Transform(rE.aP0,aP0); + rTransform.Transform(rE.aP1,aP1); + + DXFLineInfo aDXFLineInfo; + aDXFLineInfo=GetEntityDXFLineInfo(rE); + LineInfo aLineInfo; + aLineInfo = rTransform.Transform(aDXFLineInfo); + +#if 0 + printf("%f\n", rTransform.TransLineWidth(1000.0)); + + // LINE_NONE = 0, LINE_SOLID = 1, LINE_DASH = 2, LineStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM + aLineInfo.SetStyle( LINE_DASH ); + aLineInfo.SetWidth( 300 ); + aLineInfo.SetDashCount( 2 ); + aLineInfo.SetDashLen( 100 ); + aLineInfo.SetDotCount( 1 ); + aLineInfo.SetDotLen( 0 ); + aLineInfo.SetDistance( 500 ); +#endif + + pVirDev->DrawLine(aP0,aP1,aLineInfo); + if (rE.fThickness!=0) { + Point aP2,aP3; + rTransform.Transform(rE.aP0+DXFVector(0,0,rE.fThickness),aP2); + rTransform.Transform(rE.aP1+DXFVector(0,0,rE.fThickness),aP3); + pVirDev->DrawLine(aP2,aP3); + pVirDev->DrawLine(aP0,aP2); + pVirDev->DrawLine(aP1,aP3); + } + } +} + + +void DXF2GDIMetaFile::DrawPointEntity(const DXFPointEntity & rE, const DXFTransform & rTransform) +{ + + if (SetLineAttribute(rE)) { + Point aP0; + rTransform.Transform(rE.aP0,aP0); + if (rE.fThickness==0) pVirDev->DrawPixel(aP0); + else { + Point aP1; + rTransform.Transform(rE.aP0+DXFVector(0,0,rE.fThickness),aP1); + pVirDev->DrawLine(aP0,aP1); + } + } +} + + +void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTransform & rTransform) +{ + double frx,fry,fAng; + USHORT nPoints,i; + DXFVector aC; + + if (SetLineAttribute(rE)==FALSE) return; + rTransform.Transform(rE.aP0,aC); + if (rE.fThickness==0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)==TRUE) { + pVirDev->DrawEllipse( + Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5), + (long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5))); + } + else { + nPoints=OptPointsPerCircle; + Polygon aPoly(nPoints); + for (i=0; iDrawPolyLine(aPoly); + if (rE.fThickness!=0) { + Polygon aPoly2(nPoints); + for (i=0; iDrawPolyLine(aPoly2); + for (i=0; iDrawLine(aPoly[i],aPoly2[i]); + } + } +} + + +void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform & rTransform) +{ + double frx,fry,fA1,fdA,fAng; + USHORT nPoints,i; + DXFVector aC; + Point aPS,aPE; + + if (SetLineAttribute(rE)==FALSE) return; + fA1=rE.fStart; + fdA=rE.fEnd-fA1; + while (fdA>=360.0) fdA-=360.0; + while (fdA<=0) fdA+=360.0; + rTransform.Transform(rE.aP0,aC); + if (rE.fThickness==0 && fdA>5.0 && rTransform.TransCircleToEllipse(rE.fRadius,frx,fry)==TRUE) { + DXFVector aVS(cos(fA1/180.0*3.14159265359),sin(fA1/180.0*3.14159265359),0.0); + aVS*=rE.fRadius; + aVS+=rE.aP0; + DXFVector aVE(cos((fA1+fdA)/180.0*3.14159265359),sin((fA1+fdA)/180.0*3.14159265359),0.0); + aVE*=rE.fRadius; + aVE+=rE.aP0; + if (rTransform.Mirror()==TRUE) { + rTransform.Transform(aVS,aPS); + rTransform.Transform(aVE,aPE); + } + else { + rTransform.Transform(aVS,aPE); + rTransform.Transform(aVE,aPS); + } + pVirDev->DrawArc( + Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5), + (long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5)), + aPS,aPE + ); + } + else { + nPoints=(USHORT)(fdA/360.0*(double)OptPointsPerCircle+0.5); + if (nPoints<2) nPoints=2; + Polygon aPoly(nPoints); + for (i=0; iDrawPolyLine(aPoly); + if (rE.fThickness!=0) { + Polygon aPoly2(nPoints); + for (i=0; iDrawPolyLine(aPoly2); + for (i=0; iDrawLine(aPoly[i],aPoly2[i]); + } + } +} + + +void DXF2GDIMetaFile::DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransform & rTransform) +{ + if (SetLineAttribute(rE)) { + Polygon aPoly(4); + rTransform.Transform(rE.aP0,aPoly[0]); + rTransform.Transform(rE.aP1,aPoly[1]); + rTransform.Transform(rE.aP3,aPoly[2]); + rTransform.Transform(rE.aP2,aPoly[3]); + pVirDev->DrawPolygon(aPoly); + if (rE.fThickness!=0) { + USHORT i; + Polygon aPoly2(4); + DXFVector aVAdd(0,0,rE.fThickness); + rTransform.Transform(rE.aP0+aVAdd,aPoly2[0]); + rTransform.Transform(rE.aP1+aVAdd,aPoly2[1]); + rTransform.Transform(rE.aP3+aVAdd,aPoly2[2]); + rTransform.Transform(rE.aP2+aVAdd,aPoly2[3]); + pVirDev->DrawPolygon(aPoly2); + for (i=0; i<4; i++) pVirDev->DrawLine(aPoly[i],aPoly2[i]); + } + } +} + + +void DXF2GDIMetaFile::DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransform & rTransform) +{ + if (SetAreaAttribute(rE)) { + USHORT nN; + if (rE.aP2==rE.aP3) nN=3; else nN=4; + Polygon aPoly(nN); + rTransform.Transform(rE.aP0,aPoly[0]); + rTransform.Transform(rE.aP1,aPoly[1]); + rTransform.Transform(rE.aP3,aPoly[2]); + if (nN>3) rTransform.Transform(rE.aP2,aPoly[3]); + pVirDev->DrawPolygon(aPoly); + if (rE.fThickness!=0) { + Polygon aPoly2(nN); + DXFVector aVAdd(0,0,rE.fThickness); + rTransform.Transform(rE.aP0+aVAdd,aPoly2[0]); + rTransform.Transform(rE.aP1+aVAdd,aPoly2[1]); + rTransform.Transform(rE.aP3+aVAdd,aPoly2[2]); + if (nN>3) rTransform.Transform(rE.aP2+aVAdd,aPoly2[3]); + pVirDev->DrawPolygon(aPoly2); + if (SetLineAttribute(rE)) { + USHORT i; + for (i=0; iDrawLine(aPoly[i],aPoly2[i]); + } + } + } +} + + +void DXF2GDIMetaFile::DrawTextEntity(const DXFTextEntity & rE, const DXFTransform & rTransform) +{ + DXFVector aV; + Point aPt; + double fA; + USHORT nHeight; + short nAng; + ByteString aStr( rE.sText ); + DXFTransform aT( DXFTransform(rE.fXScale,rE.fHeight,1.0,rE.fRotAngle,rE.aP0), rTransform ); + aT.TransDir(DXFVector(0,1,0),aV); + nHeight=(USHORT)(aV.Abs()+0.5); + fA=aT.CalcRotAngle(); + nAng=(short)(fA*10.0+0.5); + aT.TransDir(DXFVector(1,0,0),aV); + if ( SetFontAttribute( rE,nAng, nHeight, aV. Abs() ) ) + { + String aUString( aStr, pDXF->getTextEncoding() ); + aT.Transform( DXFVector( 0, 0, 0 ), aPt ); + pVirDev->DrawText( aPt, aUString ); + } +} + + +void DXF2GDIMetaFile::DrawInsertEntity(const DXFInsertEntity & rE, const DXFTransform & rTransform) +{ + const DXFBlock * pB; + pB=pDXF->aBlocks.Search(rE.sName); + if (pB!=NULL) { + DXFTransform aDXFTransform1(1.0,1.0,1.0,DXFVector(0.0,0.0,0.0)-pB->aBasePoint); + DXFTransform aDXFTransform2(rE.fXScale,rE.fYScale,rE.fZScale,rE.fRotAngle,rE.aP0); + DXFTransform aT( + DXFTransform( aDXFTransform1, aDXFTransform2 ), + rTransform + ); + long nSavedBlockColor, nSavedParentLayerColor; + DXFLineInfo aSavedBlockDXFLineInfo, aSavedParentLayerDXFLineInfo; + nSavedBlockColor=nBlockColor; + nSavedParentLayerColor=nParentLayerColor; + aSavedBlockDXFLineInfo=aBlockDXFLineInfo; + aSavedParentLayerDXFLineInfo=aParentLayerDXFLineInfo; + nBlockColor=GetEntityColor(rE); + aBlockDXFLineInfo=GetEntityDXFLineInfo(rE); + if (rE.sLayer[0]!='0' || rE.sLayer[1]!=0) { + DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.sLayer); + if (pLayer!=NULL) { + nParentLayerColor=pLayer->nColor; + aParentLayerDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType); + } + } + DrawEntities(*pB,aT,FALSE); + aBlockDXFLineInfo=aSavedBlockDXFLineInfo; + aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo; + nBlockColor=nSavedBlockColor; + nParentLayerColor=nSavedParentLayerColor; + } +} + + +void DXF2GDIMetaFile::DrawAttribEntity(const DXFAttribEntity & rE, const DXFTransform & rTransform) +{ + if ((rE.nAttrFlags&1)==0) { + DXFVector aV; + Point aPt; + double fA; + USHORT nHeight; + short nAng; + ByteString aStr( rE.sText ); + DXFTransform aT( DXFTransform( rE.fXScale, rE.fHeight, 1.0, rE.fRotAngle, rE.aP0 ), rTransform ); + aT.TransDir(DXFVector(0,1,0),aV); + nHeight=(USHORT)(aV.Abs()+0.5); + fA=aT.CalcRotAngle(); + nAng=(short)(fA*10.0+0.5); + aT.TransDir(DXFVector(1,0,0),aV); + if (SetFontAttribute(rE,nAng,nHeight,aV.Abs())) + { + String aUString( aStr, pDXF->getTextEncoding() ); + aT.Transform( DXFVector( 0, 0, 0 ), aPt ); + pVirDev->DrawText( aPt, aUString ); + } + } +} + + +void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXFTransform & rTransform) +{ + USHORT i,nPolySize; + double fW; + const DXFBasicEntity * pBE; + + nPolySize=0; + pBE=rE.pSucc; + while (pBE!=NULL && pBE->eType==DXF_VERTEX) { + nPolySize++; + pBE=pBE->pSucc; + } + if (nPolySize<2) return; + Polygon aPoly(nPolySize); + fW=0.0; + pBE=rE.pSucc; + for (i=0; iaP0,aPoly[i]); + if (i+1fSWidth>=0.0) fW+=((DXFVertexEntity*)pBE)->fSWidth; + else fW+=rE.fSWidth; + if (((DXFVertexEntity*)pBE)->fEWidth>=0.0) fW+=((DXFVertexEntity*)pBE)->fEWidth; + else fW+=rE.fEWidth; + } + pBE=pBE->pSucc; + } + fW/=2.0; + if ((rE.nFlags&1)!=0) fW/=(double)nPolySize; + else fW/=(double)(nPolySize-1); + if (SetLineAttribute(rE,rTransform.TransLineWidth(fW))) { + if ((rE.nFlags&1)!=0) pVirDev->DrawPolygon(aPoly); + else pVirDev->DrawPolyLine(aPoly); + if (rE.fThickness!=0) { + Polygon aPoly2(nPolySize); + pBE=rE.pSucc; + for (i=0; iaP0)+DXFVector(0,0,rE.fThickness), + aPoly2[i] + ); + pBE=pBE->pSucc; + } + if ((rE.nFlags&1)!=0) pVirDev->DrawPolygon(aPoly2); + else pVirDev->DrawPolyLine(aPoly2); + for (i=0; iDrawLine(aPoly[i],aPoly2[i]); + } + } +} + +void DXF2GDIMetaFile::DrawLWPolyLineEntity(const DXFLWPolyLineEntity & rE, const DXFTransform & rTransform ) +{ + sal_Int32 i, nPolySize = rE.nCount; + if ( nPolySize && rE.pP ) + { + Polygon aPoly( (sal_uInt16)nPolySize); + for ( i = 0; i < nPolySize; i++ ) + { + rTransform.Transform( rE.pP[ (sal_uInt16)i ], aPoly[ (sal_uInt16)i ] ); + } + double fW = rE.fConstantWidth; + if ( SetLineAttribute( rE, rTransform.TransLineWidth( fW ) ) ) + { + if ( ( rE.nFlags & 1 ) != 0 ) + pVirDev->DrawPolygon( aPoly ); + else + pVirDev->DrawPolyLine( aPoly ); + // #### + //pVirDev->DrawPolyLine( aPoly, aDXFLineInfo ); + } + } +} + +void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransform & rTransform ) +{ + if ( rE.nBoundaryPathCount ) + { + SetAreaAttribute( rE ); + sal_Int32 j = 0; + PolyPolygon aPolyPoly; + for ( j = 0; j < rE.nBoundaryPathCount; j++ ) + { + DXFPointArray aPtAry; + const DXFBoundaryPathData& rPathData = rE.pBoundaryPathData[ j ]; + if ( rPathData.bIsPolyLine ) + { + sal_Int32 i; + for( i = 0; i < rPathData.nPointCount; i++ ) + { + Point aPt; + rTransform.Transform( rPathData.pP[ i ], aPt ); + aPtAry.push_back( aPt ); + } + } + else + { + sal_uInt32 i; + for ( i = 0; i < rPathData.aEdges.size(); i++ ) + { + const DXFEdgeType* pEdge = rPathData.aEdges[ i ]; + switch( pEdge->nEdgeType ) + { + case 1 : + { + Point aPt; + rTransform.Transform( ((DXFEdgeTypeLine*)pEdge)->aStartPoint, aPt ); + aPtAry.push_back( aPt ); + rTransform.Transform( ((DXFEdgeTypeLine*)pEdge)->aEndPoint, aPt ); + aPtAry.push_back( aPt ); + } + break; + case 2 : + { +/* + double frx,fry,fA1,fdA,fAng; + USHORT nPoints,i; + DXFVector aC; + Point aPS,aPE; + fA1=((DXFEdgeTypeCircularArc*)pEdge)->fStartAngle; + fdA=((DXFEdgeTypeCircularArc*)pEdge)->fEndAngle - fA1; + while ( fdA >= 360.0 ) + fdA -= 360.0; + while ( fdA <= 0 ) + fdA += 360.0; + rTransform.Transform(((DXFEdgeTypeCircularArc*)pEdge)->aCenter, aC); + if ( fdA > 5.0 && rTransform.TransCircleToEllipse(((DXFEdgeTypeCircularArc*)pEdge)->fRadius,frx,fry ) == TRUE ) + { + DXFVector aVS(cos(fA1/180.0*3.14159265359),sin(fA1/180.0*3.14159265359),0.0); + aVS*=((DXFEdgeTypeCircularArc*)pEdge)->fRadius; + aVS+=((DXFEdgeTypeCircularArc*)pEdge)->aCenter; + DXFVector aVE(cos((fA1+fdA)/180.0*3.14159265359),sin((fA1+fdA)/180.0*3.14159265359),0.0); + aVE*=((DXFEdgeTypeCircularArc*)pEdge)->fRadius; + aVE+=((DXFEdgeTypeCircularArc*)pEdge)->aCenter; + if ( rTransform.Mirror() == TRUE ) + { + rTransform.Transform(aVS,aPS); + rTransform.Transform(aVE,aPE); + } + else + { + rTransform.Transform(aVS,aPE); + rTransform.Transform(aVE,aPS); + } + pVirDev->DrawArc( + Rectangle((long)(aC.fx-frx+0.5),(long)(aC.fy-fry+0.5), + (long)(aC.fx+frx+0.5),(long)(aC.fy+fry+0.5)), + aPS,aPE + ); + } +*/ + } + break; + case 3 : + case 4 : + break; + } + } + } + sal_uInt16 i, nSize = (sal_uInt16)aPtAry.size(); + if ( nSize ) + { + Polygon aPoly( nSize ); + for ( i = 0; i < nSize; i++ ) + aPoly[ i ] = aPtAry[ i ]; + aPolyPoly.Insert( aPoly, POLYPOLY_APPEND ); + } + } + if ( aPolyPoly.Count() ) + pVirDev->DrawPolyPolygon( aPolyPoly ); + } +} + +void DXF2GDIMetaFile::Draw3DFaceEntity(const DXF3DFaceEntity & rE, const DXFTransform & rTransform) +{ + USHORT nN,i; + if (SetLineAttribute(rE)) { + if (rE.aP2==rE.aP3) nN=3; else nN=4; + Polygon aPoly(nN); + rTransform.Transform(rE.aP0,aPoly[0]); + rTransform.Transform(rE.aP1,aPoly[1]); + rTransform.Transform(rE.aP2,aPoly[2]); + if (nN>3) rTransform.Transform(rE.aP3,aPoly[3]); + if ((rE.nIEFlags&0x0f)==0) pVirDev->DrawPolygon(aPoly); + else { + for (i=0; iDrawLine(aPoly[i],aPoly[(i+1)%nN]); + } + } + } + } +} + + +void DXF2GDIMetaFile::DrawDimensionEntity(const DXFDimensionEntity & rE, const DXFTransform & rTransform) +{ + const DXFBlock * pB; + pB=pDXF->aBlocks.Search(rE.sPseudoBlock); + if (pB!=NULL) { + DXFTransform aT( + DXFTransform(1.0,1.0,1.0,DXFVector(0.0,0.0,0.0)-pB->aBasePoint), + rTransform + ); + long nSavedBlockColor, nSavedParentLayerColor; + DXFLineInfo aSavedBlockDXFLineInfo, aSavedParentLayerDXFLineInfo; + nSavedBlockColor=nBlockColor; + nSavedParentLayerColor=nParentLayerColor; + aSavedBlockDXFLineInfo=aBlockDXFLineInfo; + aSavedParentLayerDXFLineInfo=aParentLayerDXFLineInfo; + nBlockColor=GetEntityColor(rE); + aBlockDXFLineInfo=GetEntityDXFLineInfo(rE); + if (rE.sLayer[0]!='0' || rE.sLayer[1]!=0) { + DXFLayer * pLayer=pDXF->aTables.SearchLayer(rE.sLayer); + if (pLayer!=NULL) { + nParentLayerColor=pLayer->nColor; + aParentLayerDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType); + } + } + DrawEntities(*pB,aT,FALSE); + aBlockDXFLineInfo=aSavedBlockDXFLineInfo; + aParentLayerDXFLineInfo=aSavedParentLayerDXFLineInfo; + nBlockColor=nSavedBlockColor; + nParentLayerColor=nSavedParentLayerColor; + } +} + + +void DXF2GDIMetaFile::DrawEntities(const DXFEntities & rEntities, + const DXFTransform & rTransform, + BOOL bTopEntities) +{ + ULONG nCount=0; + DXFTransform aET; + const DXFTransform * pT; + + const DXFBasicEntity * pE=rEntities.pFirst; + + while (pE!=NULL && bStatus==TRUE) { + if (pE->nSpace==0) { + if (pE->aExtrusion.fz==1.0) { + pT=&rTransform; + } + else { + aET=DXFTransform(DXFTransform(pE->aExtrusion),rTransform); + pT=&aET; + } + switch (pE->eType) { + case DXF_LINE: + DrawLineEntity((DXFLineEntity&)*pE,*pT); + break; + case DXF_POINT: + DrawPointEntity((DXFPointEntity&)*pE,*pT); + break; + case DXF_CIRCLE: + DrawCircleEntity((DXFCircleEntity&)*pE,*pT); + break; + case DXF_ARC: + DrawArcEntity((DXFArcEntity&)*pE,*pT); + break; + case DXF_TRACE: + DrawTraceEntity((DXFTraceEntity&)*pE,*pT); + break; + case DXF_SOLID: + DrawSolidEntity((DXFSolidEntity&)*pE,*pT); + break; + case DXF_TEXT: + DrawTextEntity((DXFTextEntity&)*pE,*pT); + break; + case DXF_INSERT: + DrawInsertEntity((DXFInsertEntity&)*pE,*pT); + break; + case DXF_ATTRIB: + DrawAttribEntity((DXFAttribEntity&)*pE,*pT); + break; + case DXF_POLYLINE: + DrawPolyLineEntity((DXFPolyLineEntity&)*pE,*pT); + break; + case DXF_LWPOLYLINE : + DrawLWPolyLineEntity((DXFLWPolyLineEntity&)*pE, *pT); + break; + case DXF_HATCH : + DrawHatchEntity((DXFHatchEntity&)*pE, *pT); + break; + case DXF_3DFACE: + Draw3DFaceEntity((DXF3DFaceEntity&)*pE,*pT); + break; + case DXF_DIMENSION: + DrawDimensionEntity((DXFDimensionEntity&)*pE,*pT); + break; + default: + break; // four other values not handled -Wall + } + } + pE=pE->pSucc; + nCount++; + if (bTopEntities) MayCallback(nCount); + } +} + + +DXF2GDIMetaFile::DXF2GDIMetaFile() +{ +} + + +DXF2GDIMetaFile::~DXF2GDIMetaFile() +{ +} + + +BOOL DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & rMTF, USHORT nminpercent, USHORT nmaxpercent) +{ + double fWidth,fHeight,fScale; + DXFTransform aTransform; + Size aPrefSize; + const DXFLayer * pLayer; + const DXFVPort * pVPort; + + pVirDev = new VirtualDevice; + pDXF = &rDXF; + bStatus = TRUE; + + OptPointsPerCircle=50; + + nMinPercent=(ULONG)nminpercent; + nMaxPercent=(ULONG)nmaxpercent; + nLastPercent=nMinPercent; + nMainEntitiesCount=CountEntities(pDXF->aEntities); + + nBlockColor=7; + aBlockDXFLineInfo.eStyle = LINE_SOLID; + aBlockDXFLineInfo.fWidth = 0; + aBlockDXFLineInfo.nDashCount = 0; + aBlockDXFLineInfo.fDashLen = 0; + aBlockDXFLineInfo.nDotCount = 0; + aBlockDXFLineInfo.fDotLen = 0; + aBlockDXFLineInfo.fDistance = 0; + + pLayer=pDXF->aTables.SearchLayer("0"); + if (pLayer!=NULL) { + nParentLayerColor=pLayer->nColor & 0xff; + aParentLayerDXFLineInfo=LTypeToDXFLineInfo(pLayer->sLineType); + } + else { + nParentLayerColor=7; + aParentLayerDXFLineInfo.eStyle = LINE_SOLID; + aParentLayerDXFLineInfo.fWidth = 0; + aParentLayerDXFLineInfo.nDashCount = 0; + aParentLayerDXFLineInfo.fDashLen = 0; + aParentLayerDXFLineInfo.nDotCount = 0; + aParentLayerDXFLineInfo.fDotLen = 0; + aParentLayerDXFLineInfo.fDistance = 0; + } + + pVirDev->EnableOutput(FALSE); + rMTF.Record(pVirDev); + + aActLineColor = pVirDev->GetLineColor(); + aActFillColor = pVirDev->GetFillColor(); + aActFont = pVirDev->GetFont(); + + pVPort=pDXF->aTables.SearchVPort("*ACTIVE"); + if (pVPort!=NULL) { + if (pVPort->aDirection.fx==0 && pVPort->aDirection.fy==0) + pVPort=NULL; + } + + if (pVPort==NULL) { + if (pDXF->aBoundingBox.bEmpty==TRUE) + bStatus=FALSE; + else { + fWidth=pDXF->aBoundingBox.fMaxX-pDXF->aBoundingBox.fMinX; + fHeight=pDXF->aBoundingBox.fMaxY-pDXF->aBoundingBox.fMinY; + if (fWidth<=0 || fHeight<=0) { + bStatus=FALSE; + fScale = 0; // -Wall added this... + } + else { +// if (fWidth<500.0 || fHeight<500.0 || fWidth>32767.0 || fHeight>32767.0) { + if (fWidth>fHeight) + fScale=10000.0/fWidth; + else + fScale=10000.0/fHeight; +// } +// else +// fScale=1.0; + aTransform=DXFTransform(fScale,-fScale,fScale, + DXFVector(-pDXF->aBoundingBox.fMinX*fScale, + pDXF->aBoundingBox.fMaxY*fScale, + -pDXF->aBoundingBox.fMinZ*fScale)); + } + aPrefSize.Width() =(long)(fWidth*fScale+1.5); + aPrefSize.Height()=(long)(fHeight*fScale+1.5); + } + } + else { + fHeight=pVPort->fHeight; + fWidth=fHeight*pVPort->fAspectRatio; +// if (fWidth<500.0 || fHeight<500.0 || fWidth>32767.0 || fHeight>32767.0) { + if (fWidth>fHeight) + fScale=10000.0/fWidth; + else + fScale=10000.0/fHeight; +// } +// else +// fScale=1.0; + aTransform=DXFTransform( + DXFTransform(pVPort->aDirection,pVPort->aTarget), + DXFTransform( + DXFTransform(1.0,-1.0,1.0,DXFVector(fWidth/2-pVPort->fCenterX,fHeight/2+pVPort->fCenterY,0)), + DXFTransform(fScale,fScale,fScale,DXFVector(0,0,0)) + ) + ); + aPrefSize.Width() =(long)(fWidth*fScale+1.5); + aPrefSize.Height()=(long)(fHeight*fScale+1.5); + } + + if (bStatus==TRUE) + DrawEntities(pDXF->aEntities,aTransform,TRUE); + + rMTF.Stop(); + + if ( bStatus==TRUE ) + { + rMTF.SetPrefSize( aPrefSize ); + + // MapMode einfach, falls Grafik dann nicht zu klein wird (<0,5cm), + // auf 1/100-mm (1/10-mm) setzen + if( ( aPrefSize.Width() < 500 ) && ( aPrefSize.Height() < 500 ) ) + rMTF.SetPrefMapMode( MapMode( MAP_10TH_MM ) ); + else + rMTF.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); + } + + delete pVirDev; + return bStatus; +} + + + diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.hxx b/filter/source/graphicfilter/idxf/dxf2mtf.hxx new file mode 100644 index 000000000000..cb03c47429fc --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxf2mtf.hxx @@ -0,0 +1,128 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DXF2MTF_HXX +#define _DXF2MTF_HXX + +#include "dxfreprd.hxx" +#include +#include + +// MT: NOOLDSV, someone should change the code... +enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT }; +enum BrushStyle { BRUSH_NULL, BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT, + BRUSH_CROSS, BRUSH_DIAGCROSS, BRUSH_UPDIAG, BRUSH_DOWNDIAG, + BRUSH_25, BRUSH_50, BRUSH_75, + BRUSH_BITMAP }; + + +class DXF2GDIMetaFile { +private: + + VirtualDevice * pVirDev; + const DXFRepresentation * pDXF; + BOOL bStatus; + + USHORT OptPointsPerCircle; + + ULONG nMinPercent; + ULONG nMaxPercent; + ULONG nLastPercent; + ULONG nMainEntitiesCount; + + long nBlockColor; + DXFLineInfo aBlockDXFLineInfo; + long nParentLayerColor; + DXFLineInfo aParentLayerDXFLineInfo; + Color aActLineColor; + Color aActFillColor; + Font aActFont; + + ULONG CountEntities(const DXFEntities & rEntities); + + void MayCallback(ULONG nMainEntitiesProcessed); + + Color ConvertColor(BYTE nColor); + + long GetEntityColor(const DXFBasicEntity & rE); + + DXFLineInfo LTypeToDXFLineInfo(const char * sLineType); + + DXFLineInfo GetEntityDXFLineInfo(const DXFBasicEntity & rE); + + BOOL SetLineAttribute(const DXFBasicEntity & rE, ULONG nWidth=0); + + BOOL SetAreaAttribute(const DXFBasicEntity & rE); + + BOOL SetFontAttribute(const DXFBasicEntity & rE, short nAngle, + USHORT nHeight, double fWidthScale); + + void DrawLineEntity(const DXFLineEntity & rE, const DXFTransform & rTransform); + + void DrawPointEntity(const DXFPointEntity & rE, const DXFTransform & rTransform); + + void DrawCircleEntity(const DXFCircleEntity & rE, const DXFTransform & rTransform); + + void DrawArcEntity(const DXFArcEntity & rE, const DXFTransform & rTransform); + + void DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransform & rTransform); + + void DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransform & rTransform); + + void DrawTextEntity(const DXFTextEntity & rE, const DXFTransform & rTransform); + + void DrawInsertEntity(const DXFInsertEntity & rE, const DXFTransform & rTransform); + + void DrawAttribEntity(const DXFAttribEntity & rE, const DXFTransform & rTransform); + + void DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXFTransform & rTransform); + + void Draw3DFaceEntity(const DXF3DFaceEntity & rE, const DXFTransform & rTransform); + + void DrawDimensionEntity(const DXFDimensionEntity & rE, const DXFTransform & rTransform); + + void DrawLWPolyLineEntity( const DXFLWPolyLineEntity & rE, const DXFTransform & rTransform ); + + void DrawHatchEntity( const DXFHatchEntity & rE, const DXFTransform & rTransform ); + + void DrawEntities(const DXFEntities & rEntities, + const DXFTransform & rTransform, + BOOL bTopEntities); + +public: + + DXF2GDIMetaFile(); + ~DXF2GDIMetaFile(); + + BOOL Convert( const DXFRepresentation & rDXF, GDIMetaFile & rMTF, USHORT nMinPercent, USHORT nMaxPercent); + +}; + + +#endif + + diff --git a/filter/source/graphicfilter/idxf/dxfblkrd.cxx b/filter/source/graphicfilter/idxf/dxfblkrd.cxx new file mode 100644 index 000000000000..da7753615bf3 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfblkrd.cxx @@ -0,0 +1,139 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + + +//---------------------------------------------------------------------------- +//---------------- DXFBlock -------------------------------------------------- +//---------------------------------------------------------------------------- + + +DXFBlock::DXFBlock() +{ + pSucc=NULL; +} + + +DXFBlock::~DXFBlock() +{ +} + + +void DXFBlock::Read(DXFGroupReader & rDGR) +{ + sName[0]=0; + sAlsoName[0]=0; + aBasePoint.fx=0.0; + aBasePoint.fy=0.0; + aBasePoint.fz=0.0; + nFlags=0; + sXRef[0]=0; + + while (rDGR.Read()!=0) + { + switch (rDGR.GetG()) + { + case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 3: strncpy( sAlsoName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 70: nFlags=rDGR.GetI(); break; + case 10: aBasePoint.fx=rDGR.GetF(); break; + case 20: aBasePoint.fy=rDGR.GetF(); break; + case 30: aBasePoint.fz=rDGR.GetF(); break; + case 1: strncpy( sXRef, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + } + } + DXFEntities::Read(rDGR); +} + + +//---------------------------------------------------------------------------- +//---------------- DXFBlocks ------------------------------------------------- +//---------------------------------------------------------------------------- + + +DXFBlocks::DXFBlocks() +{ + pFirst=NULL; +} + + +DXFBlocks::~DXFBlocks() +{ + Clear(); +} + + +void DXFBlocks::Read(DXFGroupReader & rDGR) +{ + DXFBlock * pB, * * ppSucc; + + ppSucc=&pFirst; + while (*ppSucc!=NULL) ppSucc=&((*ppSucc)->pSucc); + + for (;;) { + while (rDGR.GetG()!=0) rDGR.Read(); + if (strcmp(rDGR.GetS(),"ENDSEC")==0 || + strcmp(rDGR.GetS(),"EOF")==0) break; + if (strcmp(rDGR.GetS(),"BLOCK")==0) { + pB=new DXFBlock; + pB->Read(rDGR); + *ppSucc=pB; + ppSucc=&(pB->pSucc); + } + else rDGR.Read(); + } +} + + +DXFBlock * DXFBlocks::Search(const char * sName) const +{ + DXFBlock * pB; + for (pB=pFirst; pB!=NULL; pB=pB->pSucc) { + if (strcmp(sName,pB->sName)==0) break; + } + return pB; +} + + +void DXFBlocks::Clear() +{ + DXFBlock * ptmp; + + while (pFirst!=NULL) { + ptmp=pFirst; + pFirst=ptmp->pSucc; + delete ptmp; + } +} + + + diff --git a/filter/source/graphicfilter/idxf/dxfblkrd.hxx b/filter/source/graphicfilter/idxf/dxfblkrd.hxx new file mode 100644 index 000000000000..9f0d92e3fa6d --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfblkrd.hxx @@ -0,0 +1,87 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DXFBLKRD_HXX +#define _DXFBLKRD_HXX + +#include + +//---------------------------------------------------------------------------- +//---------------- Ein Block (= Menge von Entities) -------------------------- +//---------------------------------------------------------------------------- + +class DXFBlock : public DXFEntities { + +public: + + DXFBlock * pSucc; + // Zeiger auf naechsten Block in der Liste DXFBlocks::pFirst + + // Eigenschaften des Blocks, durch Gruppencodes kommentiert: + char sName[DXF_MAX_STRING_LEN+1]; // 2 + char sAlsoName[DXF_MAX_STRING_LEN+1]; // 3 + long nFlags; // 70 + DXFVector aBasePoint; // 10,20,30 + char sXRef[DXF_MAX_STRING_LEN+1]; // 1 + + DXFBlock(); + ~DXFBlock(); + + void Read(DXFGroupReader & rDGR); + // Liest den Block (einschliesslich der Entities) per rGDR + // aus einer DXF-Datei bis zu einem ENDBLK, ENDSEC oder EOF. +}; + + +//---------------------------------------------------------------------------- +//---------------- Eine Menge von Bloecken ----------------------------------- +//---------------------------------------------------------------------------- + +class DXFBlocks { + +public: + + DXFBlock * pFirst; + // Liste der Bloecke, READ ONLY! + + DXFBlocks(); + ~DXFBlocks(); + + void Read(DXFGroupReader & rDGR); + // Liesst alle Bloecke per rDGR bis zu einem ENDSEC oder EOF. + + DXFBlock * Search(const char * sName) const; + // Sucht einen Block mit dem Namen, liefert NULL bei Misserfolg. + + void Clear(); + // Loescht alle Bloecke; + +}; + +#endif + + diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx new file mode 100644 index 000000000000..990594a90731 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx @@ -0,0 +1,871 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + +//--------------------------DXFBasicEntity-------------------------------------- + +DXFBasicEntity::DXFBasicEntity(DXFEntityType eThisType) +{ + eType=eThisType; + pSucc=NULL; + strncpy(sLayer,"0", 2 ); + strncpy(sLineType,"BYLAYER", 8 ); + fElevation=0; + fThickness=0; + nColor=256; + nSpace=0; + aExtrusion.fx=0.0; + aExtrusion.fy=0.0; + aExtrusion.fz=1.0; +} + +void DXFBasicEntity::Read(DXFGroupReader & rDGR) +{ + while (rDGR.Read()!=0) EvaluateGroup(rDGR); +} + +void DXFBasicEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) + { + case 8: strncpy( sLayer, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 6: strncpy( sLineType, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 38: fElevation=rDGR.GetF(); break; + case 39: fThickness=rDGR.GetF(); break; + case 62: nColor=rDGR.GetI(); break; + case 67: nSpace=rDGR.GetI(); break; + case 210: aExtrusion.fx=rDGR.GetF(); break; + case 220: aExtrusion.fy=rDGR.GetF(); break; + case 230: aExtrusion.fz=rDGR.GetF(); break; + } +} + +DXFBasicEntity::~DXFBasicEntity() +{ +} + +//--------------------------DXFLineEntity--------------------------------------- + +DXFLineEntity::DXFLineEntity() : DXFBasicEntity(DXF_LINE) +{ +} + +void DXFLineEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 11: aP1.fx=rDGR.GetF(); break; + case 21: aP1.fy=rDGR.GetF(); break; + case 31: aP1.fz=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFPointEntity-------------------------------------- + +DXFPointEntity::DXFPointEntity() : DXFBasicEntity(DXF_POINT) +{ +} + +void DXFPointEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFCircleEntity------------------------------------- + +DXFCircleEntity::DXFCircleEntity() : DXFBasicEntity(DXF_CIRCLE) +{ + fRadius=1.0; +} + +void DXFCircleEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 40: fRadius=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFArcEntity---------------------------------------- + +DXFArcEntity::DXFArcEntity() : DXFBasicEntity(DXF_ARC) +{ + fRadius=1.0; + fStart=0; + fEnd=360.0; +} + +void DXFArcEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 40: fRadius=rDGR.GetF(); break; + case 50: fStart=rDGR.GetF(); break; + case 51: fEnd=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFTraceEntity-------------------------------------- + +DXFTraceEntity::DXFTraceEntity() : DXFBasicEntity(DXF_TRACE) +{ +} + +void DXFTraceEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 11: aP1.fx=rDGR.GetF(); break; + case 21: aP1.fy=rDGR.GetF(); break; + case 31: aP1.fz=rDGR.GetF(); break; + case 12: aP2.fx=rDGR.GetF(); break; + case 22: aP2.fy=rDGR.GetF(); break; + case 32: aP2.fz=rDGR.GetF(); break; + case 13: aP3.fx=rDGR.GetF(); break; + case 23: aP3.fy=rDGR.GetF(); break; + case 33: aP3.fz=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFSolidEntity-------------------------------------- + +DXFSolidEntity::DXFSolidEntity() : DXFBasicEntity(DXF_SOLID) +{ +} + +void DXFSolidEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 11: aP1.fx=rDGR.GetF(); break; + case 21: aP1.fy=rDGR.GetF(); break; + case 31: aP1.fz=rDGR.GetF(); break; + case 12: aP2.fx=rDGR.GetF(); break; + case 22: aP2.fy=rDGR.GetF(); break; + case 32: aP2.fz=rDGR.GetF(); break; + case 13: aP3.fx=rDGR.GetF(); break; + case 23: aP3.fy=rDGR.GetF(); break; + case 33: aP3.fz=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFTextEntity--------------------------------------- + +DXFTextEntity::DXFTextEntity() : DXFBasicEntity(DXF_TEXT) +{ + fHeight=1.0; + sText[0]=0; + fRotAngle=0.0; + fXScale=1.0; + fOblAngle=0.0; + strncpy( sStyle, "STANDARD", 9 ); + nGenFlags=0; + nHorzJust=0; + nVertJust=0; +} + +void DXFTextEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 40: fHeight=rDGR.GetF(); break; + case 1: strncpy( sText, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 50: fRotAngle=rDGR.GetF(); break; + case 41: fXScale=rDGR.GetF(); break; + case 42: fOblAngle=rDGR.GetF(); break; + case 7: strncpy( sStyle, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 71: nGenFlags=rDGR.GetI(); break; + case 72: nHorzJust=rDGR.GetI(); break; + case 73: nVertJust=rDGR.GetI(); break; + case 11: aAlign.fx=rDGR.GetF(); break; + case 21: aAlign.fy=rDGR.GetF(); break; + case 31: aAlign.fz=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFShapeEntity-------------------------------------- + +DXFShapeEntity::DXFShapeEntity() : DXFBasicEntity(DXF_SHAPE) +{ + fSize=1.0; + sName[0]=0; + fRotAngle=0; + fXScale=1.0; + fOblAngle=0; +} + +void DXFShapeEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 40: fSize=rDGR.GetF(); break; + case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 50: fRotAngle=rDGR.GetF(); break; + case 41: fXScale=rDGR.GetF(); break; + case 51: fOblAngle=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFInsertEntity------------------------------------- + +DXFInsertEntity::DXFInsertEntity() : DXFBasicEntity(DXF_INSERT) +{ + nAttrFlag=0; + sName[0]=0; + fXScale=1.0; + fYScale=1.0; + fZScale=1.0; + fRotAngle=0.0; + nColCount=1; + nRowCount=1; + fColSpace=0.0; + fRowSpace=0.0; +} + +void DXFInsertEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 66: nAttrFlag=rDGR.GetI(); break; + case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 41: fXScale=rDGR.GetF(); break; + case 42: fYScale=rDGR.GetF(); break; + case 43: fZScale=rDGR.GetF(); break; + case 50: fRotAngle=rDGR.GetF(); break; + case 70: nColCount=rDGR.GetI(); break; + case 71: nRowCount=rDGR.GetI(); break; + case 44: fColSpace=rDGR.GetF(); break; + case 45: fRowSpace=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFAttDefEntity------------------------------------- + +DXFAttDefEntity::DXFAttDefEntity() : DXFBasicEntity(DXF_ATTDEF) +{ + fHeight=1.0; + sDefVal[0]=0; + sPrompt[0]=0; + sTagStr[0]=0; + nAttrFlags=0; + nFieldLen=0; + fRotAngle=0.0; + fXScale=1.0; + fOblAngle=0.0; + strncpy( sStyle, "STANDARD", 9 ); + nGenFlags=0; + nHorzJust=0; + nVertJust=0; +} + +void DXFAttDefEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 40: fHeight=rDGR.GetF(); break; + case 1: strncpy( sDefVal, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 3: strncpy( sPrompt, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 2: strncpy( sTagStr, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 70: nAttrFlags=rDGR.GetI(); break; + case 73: nFieldLen=rDGR.GetI(); break; + case 50: fRotAngle=rDGR.GetF(); break; + case 41: fXScale=rDGR.GetF(); break; + case 51: fOblAngle=rDGR.GetF(); break; + case 7: strncpy( sStyle, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 71: nGenFlags=rDGR.GetI(); break; + case 72: nHorzJust=rDGR.GetI(); break; + case 74: nVertJust=rDGR.GetI(); break; + case 11: aAlign.fx=rDGR.GetF(); break; + case 21: aAlign.fy=rDGR.GetF(); break; + case 31: aAlign.fz=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFAttribEntity------------------------------------- + +DXFAttribEntity::DXFAttribEntity() : DXFBasicEntity(DXF_ATTRIB) +{ + fHeight=1.0; + sText[0]=0; + sTagStr[0]=0; + nAttrFlags=0; + nFieldLen=0; + fRotAngle=0.0; + fXScale=1.0; + fOblAngle=0.0; + strncpy( sStyle, "STANDARD", 9 ); + nGenFlags=0; + nHorzJust=0; + nVertJust=0; +} + +void DXFAttribEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 40: fHeight=rDGR.GetF(); break; + case 1: strncpy( sText, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 2: strncpy( sTagStr, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 70: nAttrFlags=rDGR.GetI(); break; + case 73: nFieldLen=rDGR.GetI(); break; + case 50: fRotAngle=rDGR.GetF(); break; + case 41: fXScale=rDGR.GetF(); break; + case 51: fOblAngle=rDGR.GetF(); break; + case 7: strncpy( sStyle, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 71: nGenFlags=rDGR.GetI(); break; + case 72: nHorzJust=rDGR.GetI(); break; + case 74: nVertJust=rDGR.GetI(); break; + case 11: aAlign.fx=rDGR.GetF(); break; + case 21: aAlign.fy=rDGR.GetF(); break; + case 31: aAlign.fz=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFPolyLine----------------------------------------- + +DXFPolyLineEntity::DXFPolyLineEntity() : DXFBasicEntity(DXF_POLYLINE) +{ + fElevation=0.0; + nFlags=0; + fSWidth=0.0; + fEWidth=0.0; + nMeshMCount=0; + nMeshNCount=0; + nMDensity=0; + nNDensity=0; + nCSSType=0; +} + +void DXFPolyLineEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 30: fElevation=rDGR.GetF(); break; + case 70: nFlags=rDGR.GetI(); break; + case 40: fSWidth=rDGR.GetF(); break; + case 41: fEWidth=rDGR.GetF(); break; + case 71: nMeshMCount=rDGR.GetI(); break; + case 72: nMeshNCount=rDGR.GetI(); break; + case 73: nMDensity=rDGR.GetI(); break; + case 74: nNDensity=rDGR.GetI(); break; + case 75: nCSSType=rDGR.GetI(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFLWPolyLine--------------------------------------- + +DXFLWPolyLineEntity::DXFLWPolyLineEntity() : + DXFBasicEntity( DXF_LWPOLYLINE ), + nIndex( 0 ), + nCount( 0 ), + nFlags( 0 ), + fConstantWidth( 0.0 ), + fStartWidth( 0.0 ), + fEndWidth( 0.0 ), + pP( NULL ) +{ +} + +void DXFLWPolyLineEntity::EvaluateGroup( DXFGroupReader & rDGR ) +{ + switch ( rDGR.GetG() ) + { + case 90 : + { + nCount = rDGR.GetI(); + if ( nCount ) + pP = new DXFVector[ nCount ]; + } + break; + case 70: nFlags = rDGR.GetI(); break; + case 43: fConstantWidth = rDGR.GetF(); break; + case 40: fStartWidth = rDGR.GetF(); break; + case 41: fEndWidth = rDGR.GetF(); break; + case 10: + { + if ( pP && ( nIndex < nCount ) ) + pP[ nIndex ].fx = rDGR.GetF(); + } + break; + case 20: + { + if ( pP && ( nIndex < nCount ) ) + pP[ nIndex++ ].fy = rDGR.GetF(); + } + break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +DXFLWPolyLineEntity::~DXFLWPolyLineEntity() +{ + delete[] pP; +} + +//--------------------------DXFHatchEntity------------------------------------- + +DXFEdgeTypeLine::DXFEdgeTypeLine() : + DXFEdgeType( 1 ) +{ + +} +DXFEdgeTypeLine::~DXFEdgeTypeLine() +{ + +} +sal_Bool DXFEdgeTypeLine::EvaluateGroup( DXFGroupReader & rDGR ) +{ + sal_Bool bExecutingGroupCode = sal_True; + switch ( rDGR.GetG() ) + { + case 10 : aStartPoint.fx = rDGR.GetF(); break; + case 20 : aStartPoint.fy = rDGR.GetF(); break; + case 11 : aEndPoint.fx = rDGR.GetF(); break; + case 21 : aEndPoint.fy = rDGR.GetF(); break; + default : bExecutingGroupCode = sal_False; break; + } + return bExecutingGroupCode; +} + +DXFEdgeTypeCircularArc::DXFEdgeTypeCircularArc() : + DXFEdgeType( 2 ), + fRadius( 0.0 ), + fStartAngle( 0.0 ), + fEndAngle( 0.0 ), + nIsCounterClockwiseFlag( 0 ) +{ +} +DXFEdgeTypeCircularArc::~DXFEdgeTypeCircularArc() +{ +} +sal_Bool DXFEdgeTypeCircularArc::EvaluateGroup( DXFGroupReader & rDGR ) +{ + sal_Bool bExecutingGroupCode = sal_True; + switch ( rDGR.GetG() ) + { + case 10 : aCenter.fx = rDGR.GetF(); break; + case 20 : aCenter.fy = rDGR.GetF(); break; + case 40 : fRadius = rDGR.GetF(); break; + case 50 : fStartAngle = rDGR.GetF(); break; + case 51 : fEndAngle = rDGR.GetF(); break; + case 73 : nIsCounterClockwiseFlag = rDGR.GetI(); break; + default : bExecutingGroupCode = sal_False; break; + } + return bExecutingGroupCode; +} + +DXFEdgeTypeEllipticalArc::DXFEdgeTypeEllipticalArc() : + DXFEdgeType( 3 ), + fLength( 0.0 ), + fStartAngle( 0.0 ), + fEndAngle( 0.0 ), + nIsCounterClockwiseFlag( 0 ) +{ +} +DXFEdgeTypeEllipticalArc::~DXFEdgeTypeEllipticalArc() +{ + +} +sal_Bool DXFEdgeTypeEllipticalArc::EvaluateGroup( DXFGroupReader & rDGR ) +{ + sal_Bool bExecutingGroupCode = sal_True; + switch( rDGR.GetG() ) + { + case 10 : aCenter.fx = rDGR.GetF(); break; + case 20 : aCenter.fy = rDGR.GetF(); break; + case 11 : aEndPoint.fx = rDGR.GetF(); break; + case 21 : aEndPoint.fy = rDGR.GetF(); break; + case 40 : fLength = rDGR.GetF(); break; + case 50 : fStartAngle = rDGR.GetF(); break; + case 51 : fEndAngle = rDGR.GetF(); break; + case 73 : nIsCounterClockwiseFlag = rDGR.GetI(); break; + default : bExecutingGroupCode = sal_False; break; + } + return bExecutingGroupCode; +} + +DXFEdgeTypeSpline::DXFEdgeTypeSpline() : + DXFEdgeType( 4 ), + nDegree( 0 ), + nRational( 0 ), + nPeriodic( 0 ), + nKnotCount( 0 ), + nControlCount( 0 ) +{ +} +DXFEdgeTypeSpline::~DXFEdgeTypeSpline() +{ + +} +sal_Bool DXFEdgeTypeSpline::EvaluateGroup( DXFGroupReader & rDGR ) +{ + sal_Bool bExecutingGroupCode = sal_True; + switch ( rDGR.GetG() ) + { + case 94 : nDegree = rDGR.GetI(); break; + case 73 : nRational = rDGR.GetI(); break; + case 74 : nPeriodic = rDGR.GetI(); break; + case 95 : nKnotCount = rDGR.GetI(); break; + case 96 : nControlCount = rDGR.GetI(); break; + default : bExecutingGroupCode = sal_False; break; + } + return bExecutingGroupCode; +} + +DXFBoundaryPathData::DXFBoundaryPathData() : + nFlags( 0 ), + nHasBulgeFlag( 0 ), + nIsClosedFlag( 0 ), + nPointCount( 0 ), + fBulge( 0.0 ), + nSourceBoundaryObjects( 0 ), + nEdgeCount( 0 ), + bIsPolyLine( sal_True ), + nPointIndex( 0 ), + pP( NULL ) +{ +} + +DXFBoundaryPathData::~DXFBoundaryPathData() +{ + sal_uInt32 i = 0; + for ( i = 0; i < aEdges.size(); i++ ) + delete aEdges[ i ]; + delete[] pP; +} + +sal_Bool DXFBoundaryPathData::EvaluateGroup( DXFGroupReader & rDGR ) +{ + sal_Bool bExecutingGroupCode = sal_True; + if ( bIsPolyLine ) + { + switch( rDGR.GetG() ) + { + case 92 : + { + nFlags = rDGR.GetI(); + if ( ( nFlags & 2 ) == 0 ) + bIsPolyLine = sal_False; + } + break; + case 93 : + { + nPointCount = rDGR.GetI(); + if ( nPointCount ) + pP = new DXFVector[ nPointCount ]; + } + break; + case 72 : nHasBulgeFlag = rDGR.GetI(); break; + case 73 : nIsClosedFlag = rDGR.GetI(); break; + case 97 : nSourceBoundaryObjects = rDGR.GetI(); break; + case 42 : fBulge = rDGR.GetF(); break; + case 10: + { + if ( pP && ( nPointIndex < nPointCount ) ) + pP[ nPointIndex ].fx = rDGR.GetF(); + } + break; + case 20: + { + if ( pP && ( nPointIndex < nPointCount ) ) + pP[ nPointIndex++ ].fy = rDGR.GetF(); + } + break; + + default : bExecutingGroupCode = sal_False; break; + } + } + else + { + if ( rDGR.GetG() == 93 ) + nEdgeCount = rDGR.GetI(); + else if ( rDGR.GetG() == 72 ) + { + sal_Int32 nEdgeType = rDGR.GetI(); + switch( nEdgeType ) + { + case 1 : aEdges.push_back( new DXFEdgeTypeLine() ); break; + case 2 : aEdges.push_back( new DXFEdgeTypeCircularArc() ); break; + case 3 : aEdges.push_back( new DXFEdgeTypeEllipticalArc() ); break; + case 4 : aEdges.push_back( new DXFEdgeTypeSpline() ); break; + } + } + else if ( aEdges.size() ) + aEdges[ aEdges.size() - 1 ]->EvaluateGroup( rDGR ); + else + bExecutingGroupCode = sal_False; + } + return bExecutingGroupCode; +} + +DXFHatchEntity::DXFHatchEntity() : + DXFBasicEntity( DXF_HATCH ), + bIsInBoundaryPathContext( sal_False ), + nCurrentBoundaryPathIndex( -1 ), + nFlags( 0 ), + nAssociativityFlag( 0 ), + nBoundaryPathCount( 0 ), + nHatchStyle( 0 ), + nHatchPatternType( 0 ), + fHatchPatternAngle( 0.0 ), + fHatchPatternScale( 1.0 ), + nHatchDoubleFlag( 0 ), + nHatchPatternDefinitionLines( 0 ), + fPixelSize( 1.0 ), + nNumberOfSeedPoints( 0 ), + pBoundaryPathData( NULL ) +{ +} + +void DXFHatchEntity::EvaluateGroup( DXFGroupReader & rDGR ) +{ + switch ( rDGR.GetG() ) + { +// case 10 : aElevationPoint.fx = rDGR.GetF(); break; +// case 20 : aElevationPoint.fy = rDGR.GetF(); break; +// case 30 : aElevationPoint.fz = rDGR.GetF(); break; + case 70 : nFlags = rDGR.GetI(); break; + case 71 : nAssociativityFlag = rDGR.GetI(); break; + case 91 : + { + bIsInBoundaryPathContext = sal_True; + nBoundaryPathCount = rDGR.GetI(); + if ( nBoundaryPathCount ) + pBoundaryPathData = new DXFBoundaryPathData[ nBoundaryPathCount ]; + } + break; + case 75 : + { + nHatchStyle = rDGR.GetI(); + bIsInBoundaryPathContext = sal_False; + } + break; + case 76 : nHatchPatternType = rDGR.GetI(); break; + case 52 : fHatchPatternAngle = rDGR.GetF(); break; + case 41 : fHatchPatternScale = rDGR.GetF(); break; + case 77 : nHatchDoubleFlag = rDGR.GetI(); break; + case 78 : nHatchPatternDefinitionLines = rDGR.GetI(); break; + case 47 : fPixelSize = rDGR.GetF(); break; + case 98 : nNumberOfSeedPoints = rDGR.GetI(); break; + + //!! passthrough !! + case 92 : nCurrentBoundaryPathIndex++; + default: + { + sal_Bool bExecutingGroupCode = sal_False; + if ( bIsInBoundaryPathContext ) + { + if ( ( nCurrentBoundaryPathIndex >= 0 ) && + ( nCurrentBoundaryPathIndex < nBoundaryPathCount ) ) + bExecutingGroupCode = pBoundaryPathData[ nCurrentBoundaryPathIndex ].EvaluateGroup( rDGR ); + } + if ( bExecutingGroupCode == sal_False ) + DXFBasicEntity::EvaluateGroup(rDGR); + } + break; + } +} + +DXFHatchEntity::~DXFHatchEntity() +{ + delete[] pBoundaryPathData; +} + +//--------------------------DXFVertexEntity------------------------------------- + +DXFVertexEntity::DXFVertexEntity() : DXFBasicEntity(DXF_VERTEX) +{ + fSWidth=-1.0; + fEWidth=-1.0; + fBulge=0.0; + nFlags=0; + fCFTDir=0.0; + +} + +void DXFVertexEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 40: fSWidth=rDGR.GetF(); break; + case 41: fEWidth=rDGR.GetF(); break; + case 42: fBulge=rDGR.GetF(); break; + case 70: nFlags=rDGR.GetI(); break; + case 50: fCFTDir=rDGR.GetF(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//--------------------------DXFSeqEndEntity------------------------------------- + +DXFSeqEndEntity::DXFSeqEndEntity() : DXFBasicEntity(DXF_SEQEND) +{ +} + +//--------------------------DXF3DFace------------------------------------------- + +DXF3DFaceEntity::DXF3DFaceEntity() : DXFBasicEntity(DXF_3DFACE) +{ + nIEFlags=0; +} + +void DXF3DFaceEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 10: aP0.fx=rDGR.GetF(); break; + case 20: aP0.fy=rDGR.GetF(); break; + case 30: aP0.fz=rDGR.GetF(); break; + case 11: aP1.fx=rDGR.GetF(); break; + case 21: aP1.fy=rDGR.GetF(); break; + case 31: aP1.fz=rDGR.GetF(); break; + case 12: aP2.fx=rDGR.GetF(); break; + case 22: aP2.fy=rDGR.GetF(); break; + case 32: aP2.fz=rDGR.GetF(); break; + case 13: aP3.fx=rDGR.GetF(); break; + case 23: aP3.fy=rDGR.GetF(); break; + case 33: aP3.fz=rDGR.GetF(); break; + case 70: nIEFlags=rDGR.GetI(); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + + +//--------------------------DXFDimensionEntity---------------------------------- + +DXFDimensionEntity::DXFDimensionEntity() : DXFBasicEntity(DXF_DIMENSION) +{ + sPseudoBlock[0]=0; +} + +void DXFDimensionEntity::EvaluateGroup(DXFGroupReader & rDGR) +{ + switch (rDGR.GetG()) { + case 2: strncpy( sPseudoBlock, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + default: DXFBasicEntity::EvaluateGroup(rDGR); + } +} + +//---------------------------- DXFEntites -------------------------------------- + +void DXFEntities::Read(DXFGroupReader & rDGR) +{ + DXFBasicEntity * pE, * * ppSucc; + + ppSucc=&pFirst; + while (*ppSucc!=NULL) ppSucc=&((*ppSucc)->pSucc); + + while (rDGR.GetG()!=0) rDGR.Read(); + + while (strcmp(rDGR.GetS(),"ENDBLK")!=0 && + strcmp(rDGR.GetS(),"ENDSEC")!=0 && + strcmp(rDGR.GetS(),"EOF")!=0 ) + { + + if (strcmp(rDGR.GetS(),"LINE" )==0) pE=new DXFLineEntity; + else if (strcmp(rDGR.GetS(),"POINT" )==0) pE=new DXFPointEntity; + else if (strcmp(rDGR.GetS(),"CIRCLE" )==0) pE=new DXFCircleEntity; + else if (strcmp(rDGR.GetS(),"ARC" )==0) pE=new DXFArcEntity; + else if (strcmp(rDGR.GetS(),"TRACE" )==0) pE=new DXFTraceEntity; + else if (strcmp(rDGR.GetS(),"SOLID" )==0) pE=new DXFSolidEntity; + else if (strcmp(rDGR.GetS(),"TEXT" )==0) pE=new DXFTextEntity; + else if (strcmp(rDGR.GetS(),"SHAPE" )==0) pE=new DXFShapeEntity; + else if (strcmp(rDGR.GetS(),"INSERT" )==0) pE=new DXFInsertEntity; + else if (strcmp(rDGR.GetS(),"ATTDEF" )==0) pE=new DXFAttDefEntity; + else if (strcmp(rDGR.GetS(),"ATTRIB" )==0) pE=new DXFAttribEntity; + else if (strcmp(rDGR.GetS(),"POLYLINE" )==0) pE=new DXFPolyLineEntity; + else if (strcmp(rDGR.GetS(),"LWPOLYLINE")==0) pE=new DXFLWPolyLineEntity; + else if (strcmp(rDGR.GetS(),"VERTEX" )==0) pE=new DXFVertexEntity; + else if (strcmp(rDGR.GetS(),"SEQEND" )==0) pE=new DXFSeqEndEntity; + else if (strcmp(rDGR.GetS(),"3DFACE" )==0) pE=new DXF3DFaceEntity; + else if (strcmp(rDGR.GetS(),"DIMENSION" )==0) pE=new DXFDimensionEntity; + else if (strcmp(rDGR.GetS(),"HATCH" )==0) pE=new DXFHatchEntity; + else + { + do { + rDGR.Read(); + } while (rDGR.GetG()!=0); + continue; + } + *ppSucc=pE; + ppSucc=&(pE->pSucc); + pE->Read(rDGR); + } +} + +void DXFEntities::Clear() +{ + DXFBasicEntity * ptmp; + + while (pFirst!=NULL) { + ptmp=pFirst; + pFirst=ptmp->pSucc; + delete ptmp; + } +} + diff --git a/filter/source/graphicfilter/idxf/dxfentrd.hxx b/filter/source/graphicfilter/idxf/dxfentrd.hxx new file mode 100644 index 000000000000..3ddcc8f3d7ea --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfentrd.hxx @@ -0,0 +1,602 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DXFENTRD_HXX +#define _DXFENTRD_HXX + +#include +#include + +#include + +typedef std::deque< Point > DXFPointArray; + +//------------------------------------------------------------------------------ +//------------------------- Art eines Entity ----------------------------------- +//------------------------------------------------------------------------------ + +enum DXFEntityType { + DXF_LINE, + DXF_POINT, + DXF_CIRCLE, + DXF_ARC, + DXF_TRACE, + DXF_SOLID, + DXF_TEXT, + DXF_SHAPE, + DXF_INSERT, + DXF_ATTDEF, + DXF_ATTRIB, + DXF_POLYLINE, + DXF_VERTEX, + DXF_SEQEND, + DXF_3DFACE, + DXF_DIMENSION, + DXF_LWPOLYLINE, + DXF_HATCH +}; + +//------------------------------------------------------------------------------ +//---------------------- Basisklasse fuer ein Entity --------------------------- +//------------------------------------------------------------------------------ + +class DXFBasicEntity { + +public: + + DXFBasicEntity * pSucc; + // Zeiger auf naechstes Entity (in der Liste DXFEntities.pFirst) + + DXFEntityType eType; + // Art des Entitys (Linie oder Kreis oder was) + + // Eigenschaftenm, die alle Entities besitzen, jeweils + // durch den Gruppencode kommentiert: + char sLayer[DXF_MAX_STRING_LEN+1]; // 8 + char sLineType[DXF_MAX_STRING_LEN+1]; // 6 + double fElevation; // 38 + double fThickness; // 39 + long nColor; // 62 + long nSpace; // 67 + DXFVector aExtrusion; // 210,220,230 + +protected: + + DXFBasicEntity(DXFEntityType eThisType); + // Konstruktoren der Entities initialiseren immer mit Defaultwerten. + +public: + + virtual ~DXFBasicEntity(); + virtual void Read(DXFGroupReader & rDGR); + // Liest die Prameter ein, bis zur naechten 0-Gruppe + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); + // Diese Methode wird durch Read() fuer jeden Parameter (bzw. fuer jede + // Gruppe) aufgerufen. + // Sofern der Gruppencode dem Entity bekannt ist, wird der entsprechende + // Parameter geholt. + +}; + +//------------------------------------------------------------------------------ +//---------------- die verschiedenen Arten von Entyties ------------------------ +//------------------------------------------------------------------------------ + +//--------------------------Line------------------------------------------------ + +class DXFLineEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + DXFVector aP1; // 11,21,31 + + DXFLineEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Point----------------------------------------------- + +class DXFPointEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + + DXFPointEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Circle---------------------------------------------- + +class DXFCircleEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + double fRadius; // 40 + + DXFCircleEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Arc------------------------------------------------- + +class DXFArcEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + double fRadius; // 40 + double fStart; // 50 + double fEnd; // 51 + + DXFArcEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Trace----------------------------------------------- + +class DXFTraceEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + DXFVector aP1; // 11,21,31 + DXFVector aP2; // 12,22,32 + DXFVector aP3; // 13,23,33 + + DXFTraceEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Solid----------------------------------------------- + +class DXFSolidEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + DXFVector aP1; // 11,21,31 + DXFVector aP2; // 12,22,32 + DXFVector aP3; // 13,23,33 + + DXFSolidEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Text------------------------------------------------ + +class DXFTextEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + double fHeight; // 40 + char sText[DXF_MAX_STRING_LEN+1]; // 1 + double fRotAngle; // 50 + double fXScale; // 41 + double fOblAngle; // 42 + char sStyle[DXF_MAX_STRING_LEN+1]; // 7 + long nGenFlags; // 71 + long nHorzJust; // 72 + long nVertJust; // 73 + DXFVector aAlign; // 11,21,31 + + DXFTextEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Shape----------------------------------------------- + +class DXFShapeEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + double fSize; // 40 + char sName[DXF_MAX_STRING_LEN+1]; // 2 + double fRotAngle; // 50 + double fXScale; // 41 + double fOblAngle; // 51 + + DXFShapeEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Insert---------------------------------------------- + +class DXFInsertEntity : public DXFBasicEntity { + +public: + + long nAttrFlag; // 66 + char sName[DXF_MAX_STRING_LEN+1]; // 2 + DXFVector aP0; // 10,20,30 + double fXScale; // 41 + double fYScale; // 42 + double fZScale; // 43 + double fRotAngle; // 50 + long nColCount; // 70 + long nRowCount; // 71 + double fColSpace; // 44 + double fRowSpace; // 45 + + DXFInsertEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------AttDef---------------------------------------------- + +class DXFAttDefEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + double fHeight; // 40 + char sDefVal[DXF_MAX_STRING_LEN+1]; // 1 + char sPrompt[DXF_MAX_STRING_LEN+1]; // 3 + char sTagStr[DXF_MAX_STRING_LEN+1]; // 2 + long nAttrFlags; // 70 + long nFieldLen; // 73 + double fRotAngle; // 50 + double fXScale; // 41 + double fOblAngle; // 51 + char sStyle[DXF_MAX_STRING_LEN+1]; // 7 + long nGenFlags; // 71 + long nHorzJust; // 72 + long nVertJust; // 74 + DXFVector aAlign; // 11,21,31 + + DXFAttDefEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Attrib---------------------------------------------- + +class DXFAttribEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + double fHeight; // 40 + char sText[DXF_MAX_STRING_LEN+1]; // 1 + char sTagStr[DXF_MAX_STRING_LEN+1]; // 2 + long nAttrFlags; // 70 + long nFieldLen; // 73 + double fRotAngle; // 50 + double fXScale; // 41 + double fOblAngle; // 51 + char sStyle[DXF_MAX_STRING_LEN+1]; // 7 + long nGenFlags; // 71 + long nHorzJust; // 72 + long nVertJust; // 74 + DXFVector aAlign; // 11,21,31 + + DXFAttribEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------PolyLine-------------------------------------------- + +class DXFPolyLineEntity : public DXFBasicEntity { + +public: + + double fElevation; // 30 + long nFlags; // 70 + double fSWidth; // 40 + double fEWidth; // 41 + long nMeshMCount; // 71 + long nMeshNCount; // 72 + long nMDensity; // 73 + long nNDensity; // 74 + long nCSSType; // 75 + + DXFPolyLineEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +class DXFLWPolyLineEntity : public DXFBasicEntity +{ + sal_Int32 nIndex; + + public : + + sal_Int32 nCount; // 90 + sal_Int32 nFlags; // 70 1 = closed, 128 = plinegen + double fConstantWidth; // 43 (optional - default: 0, not used if fStartWidth and/or fEndWidth is used) + double fStartWidth; // 40 + double fEndWidth; // 41 + + DXFVector* pP; + + DXFLWPolyLineEntity(); + ~DXFLWPolyLineEntity(); + + protected : + + virtual void EvaluateGroup( DXFGroupReader & rDGR ); + +}; + +//-------------------------- Hatch --------------------------------------------- + +struct DXFEdgeType +{ + sal_Int32 nEdgeType; + + virtual ~DXFEdgeType(){}; + virtual sal_Bool EvaluateGroup( DXFGroupReader & /*rDGR*/ ){ return sal_True; }; + + protected : + + DXFEdgeType( sal_Int32 EdgeType ):nEdgeType(EdgeType){}; +}; +struct DXFEdgeTypeLine : public DXFEdgeType +{ + DXFVector aStartPoint; // 10,20 + DXFVector aEndPoint; // 11,21 + DXFEdgeTypeLine(); + virtual ~DXFEdgeTypeLine(); + virtual sal_Bool EvaluateGroup( DXFGroupReader & rDGR ); +}; +struct DXFEdgeTypeCircularArc : public DXFEdgeType +{ + DXFVector aCenter; // 10,20 + double fRadius; // 40 + double fStartAngle; // 50 + double fEndAngle; // 51 + sal_Int32 nIsCounterClockwiseFlag; // 73 + DXFEdgeTypeCircularArc(); + virtual ~DXFEdgeTypeCircularArc(); + virtual sal_Bool EvaluateGroup( DXFGroupReader & rDGR ); +}; +struct DXFEdgeTypeEllipticalArc : public DXFEdgeType +{ + DXFVector aCenter; // 10,20 + DXFVector aEndPoint; // 11,21 + double fLength; // 40 + double fStartAngle; // 50 + double fEndAngle; // 51 + sal_Int32 nIsCounterClockwiseFlag; // 73 + + DXFEdgeTypeEllipticalArc(); + virtual ~DXFEdgeTypeEllipticalArc(); + virtual sal_Bool EvaluateGroup( DXFGroupReader & rDGR ); +}; +struct DXFEdgeTypeSpline : public DXFEdgeType +{ + sal_Int32 nDegree; // 94 + sal_Int32 nRational; // 73 + sal_Int32 nPeriodic; // 74 + sal_Int32 nKnotCount; // 75 + sal_Int32 nControlCount; // 76 + + DXFEdgeTypeSpline(); + virtual ~DXFEdgeTypeSpline(); + virtual sal_Bool EvaluateGroup( DXFGroupReader & rDGR ); +}; + +typedef std::deque< DXFEdgeType* > DXFEdgeTypeArray; + +struct DXFBoundaryPathData +{ + sal_Int32 nFlags; // 92 + sal_Int32 nHasBulgeFlag; // 72 + sal_Int32 nIsClosedFlag; // 73 + sal_Int32 nPointCount; // 93 + double fBulge; // 42 + sal_Int32 nSourceBoundaryObjects; // 97 + sal_Int32 nEdgeCount; // 93 + + sal_Bool bIsPolyLine; + sal_Int32 nPointIndex; + + DXFVector* pP; + DXFEdgeTypeArray aEdges; + + DXFBoundaryPathData(); + ~DXFBoundaryPathData(); + + sal_Bool EvaluateGroup( DXFGroupReader & rDGR ); +}; + +class DXFHatchEntity : public DXFBasicEntity +{ + sal_Bool bIsInBoundaryPathContext; + sal_Int32 nCurrentBoundaryPathIndex; + + public : + + DXFVector aElevationPoint; + sal_Int32 nFlags; // 70 (solid fill = 1, pattern fill = 0) + sal_Int32 nAssociativityFlag; // 71 (assoiciative = 1, non-associative = 0) + sal_Int32 nBoundaryPathCount; // 91 + sal_Int32 nHatchStyle; // 75 (odd parity = 0, outmost area = 1, entire area = 2 ) + sal_Int32 nHatchPatternType; // 76 (user defined = 0, predefined = 1, custom = 2) + double fHatchPatternAngle; // 52 (pattern fill only) + double fHatchPatternScale; // 41 (pattern fill only:scale or spacing) + sal_Int32 nHatchDoubleFlag; // 77 (pattern fill only:double = 1, not double = 0) + sal_Int32 nHatchPatternDefinitionLines; // 78 + double fPixelSize; // 47 + sal_Int32 nNumberOfSeedPoints; // 98 + + DXFBoundaryPathData* pBoundaryPathData; + + DXFHatchEntity(); + ~DXFHatchEntity(); + + protected : + + virtual void EvaluateGroup( DXFGroupReader & rDGR ); +}; + + +//--------------------------Vertex---------------------------------------------- + +class DXFVertexEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + double fSWidth; // 40 (Wenn <0.0, dann gilt DXFPolyLine::fSWidth) + double fEWidth; // 41 (Wenn <0.0, dann gilt DXFPolyLine::fEWidth) + double fBulge; // 42 + long nFlags; // 70 + double fCFTDir; // 50 + + DXFVertexEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------SeqEnd---------------------------------------------- + +class DXFSeqEndEntity : public DXFBasicEntity { + +public: + + DXFSeqEndEntity(); +}; + +//--------------------------3DFace---------------------------------------------- + +class DXF3DFaceEntity : public DXFBasicEntity { + +public: + + DXFVector aP0; // 10,20,30 + DXFVector aP1; // 11,21,31 + DXFVector aP2; // 12,22,32 + DXFVector aP3; // 13,23,33 + long nIEFlags; // 70 + + DXF3DFaceEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//--------------------------Dimension------------------------------------------- + +class DXFDimensionEntity : public DXFBasicEntity { + +public: + + char sPseudoBlock[DXF_MAX_STRING_LEN+1]; // 2 + + DXFDimensionEntity(); + +protected: + + virtual void EvaluateGroup(DXFGroupReader & rDGR); +}; + +//------------------------------------------------------------------------------ +//----------- Eine Menge von Entities lesen und repraesentieren ---------------- +//------------------------------------------------------------------------------ + +class DXFEntities { + +public: + + DXFEntities(); + ~DXFEntities(); + + DXFBasicEntity * pFirst; // Liste von Entities, READ ONLY! + + void Read(DXFGroupReader & rDGR); + // Liest Entitis per rGDR aus einer DXF-Datei bis zu + // einem ENDBLK, ENDSEC oder EOF (der Gruppe 0). + // (Alle unbekannten Dinge werden uebersprungen) + + void Clear(); + // Loescht alle Entities +}; + +//------------------------------------------------------------------------------ +//--------------------------------- inlines ------------------------------------ +//------------------------------------------------------------------------------ + +inline DXFEntities::DXFEntities() +{ + pFirst=NULL; +} + + +inline DXFEntities::~DXFEntities() +{ + Clear(); +} + + +#endif + + diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx new file mode 100644 index 000000000000..f09b17e80635 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx @@ -0,0 +1,361 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include "dxfgrprd.hxx" + +// ---------------------------------------------------------------------------- + +// we use an own ReadLine function, because Stream::ReadLine stops if +// a 0-sign occurs; this functions converts 0-signs to blanks and reads +// a complete line until a cr/lf is found + +BOOL DXFReadLine( SvStream& rIStm, ByteString& rStr ) +{ + char buf[256 + 1]; + BOOL bEnd = FALSE; + ULONG nOldFilePos = rIStm.Tell(); + char c = 0; + + rStr.Erase(); + + while( !bEnd && !rIStm.GetError() ) // !!! nicht auf EOF testen, + // !!! weil wir blockweise + // !!! lesen + { + USHORT nLen = (USHORT)rIStm.Read( buf, sizeof(buf)-1 ); + if( !nLen ) + { + if( rStr.Len() == 0 ) + return FALSE; + else + break; + } + + for( USHORT n = 0; n < nLen ; n++ ) + { + c = buf[n]; + if( c != '\n' && c != '\r' ) + { + if( !c ) + c = ' '; + rStr += c; + } + else + { + bEnd = TRUE; + break; + } + } + } + + if( !bEnd && !rIStm.GetError() && rStr.Len() ) + bEnd = TRUE; + + nOldFilePos += rStr.Len(); + if( rIStm.Tell() > nOldFilePos ) + nOldFilePos++; + rIStm.Seek( nOldFilePos ); // seeken wg. obigem BlockRead! + + if( bEnd && (c=='\r' || c=='\n')) // Sonderbehandlung DOS-Dateien + { + char cTemp; + rIStm.Read((char*)&cTemp , sizeof(cTemp) ); + if( cTemp == c || (cTemp != '\n' && cTemp != '\r') ) + rIStm.Seek( nOldFilePos ); + } + + return bEnd; +} + +// ------------------ + +DXFGroupReader::DXFGroupReader(SvStream & rIStream, USHORT nminpercent, USHORT nmaxpercent ) : + rIS(rIStream) +{ + USHORT i; + + nIBuffPos=0; + nIBuffSize=0; + bStatus=TRUE; + nLastG=0; + nGCount=0; + + nMinPercent=(ULONG)nminpercent; + nMaxPercent=(ULONG)nmaxpercent; + nLastPercent=nMinPercent; + + rIS.Seek(STREAM_SEEK_TO_END); + nFileSize=rIS.Tell(); + rIS.Seek(0); + + for (i=0; i<10; i++) S0_9[i][0]=0; + S100[ 0 ] = S102[ 0 ] = 0; + for (i=0; i<50; i++) F10_59[i]=0.0; + for (i=0; i<20; i++) I60_79[i]=0; + for (i=0; i<10; i++) I90_99[i]=0; + for (i=0; i< 8; i++) F140_147[i]=0.0; + for (i=0; i< 6; i++) I170_175[i]=0; + for (i=0; i<30; i++) F210_239[i]=0.0; + for (i=0; i<11; i++) S999_1009[i][0]=0; + for (i=0; i<50; i++) F1010_1059[i]=0.0; + for (i=0; i<20; i++) I1060_1079[i]=0; + +} + + +USHORT DXFGroupReader::Read() +{ + sal_uInt16 nG = 0; + if ( bStatus ) + { + nGCount++; + nG = (sal_uInt16)ReadI(); + if ( bStatus ) + { + char aTmp[ DXF_MAX_STRING_LEN + 1 ]; + + if (nG< 10) ReadS(S0_9[nG]); + else if (nG< 60) F10_59[nG-10]=ReadF(); + else if (nG< 80) I60_79[nG-60]=ReadI(); + else if (nG< 90) ReadS( aTmp ); + else if (nG< 99) I90_99[nG-90]=ReadI(); + else if (nG==100) ReadS(S100); + else if (nG==102) ReadS(S102); + else if (nG==105) ReadS( aTmp ); + else if (nG< 140) ReadS( aTmp ); + else if (nG< 148) F140_147[nG-140]=ReadF(); + else if (nG< 170) ReadS( aTmp ); + else if (nG< 176) I170_175[nG-175]=ReadI(); + else if (nG< 180) ReadI(); + else if (nG< 210) ReadS( aTmp ); + else if (nG< 240) F210_239[nG-210]=ReadF(); + else if (nG<=369) ReadS( aTmp ); + else if (nG< 999) ReadS( aTmp ); + else if (nG<1010) ReadS(S999_1009[nG-999]); + else if (nG<1060) F1010_1059[nG-1010]=ReadF(); + else if (nG<1080) I1060_1079[nG-1060]=ReadI(); + else bStatus = sal_False; + } + } + if ( bStatus ) + nLastG = nG; + else + { + nG = 0; + SetS( 0, "EOF" ); + if ( nGCount != 0xffffffff ) + { + // InfoBox(NULL,String("Fehler ab Gruppe Nr ")+String(nGCount)).Execute(); + nGCount=0xffffffff; + } + } + nLastG = nG; + return nG; +} + + +long DXFGroupReader::GetI(USHORT nG) +{ + sal_Int32 nRetValue = 0; + if ( ( nG >= 60 ) && ( nG <= 79 ) ) + nRetValue = I60_79[ nG - 60 ]; + else if ( ( nG >= 90 ) && ( nG <= 99 ) ) + nRetValue = I90_99[ nG - 90 ]; + else if ( ( nG >= 170 ) && ( nG <= 175 ) ) + nRetValue = I170_175[ nG - 170 ]; + else if ( ( nG >= 1060 ) && ( nG <= 1079 ) ) + nRetValue = I1060_1079[ nG - 1060 ]; + return nRetValue; +} + +double DXFGroupReader::GetF(USHORT nG) +{ + nG-=10; + if (nG<50) return F10_59[nG]; + else { + nG-=130; + if (nG<8) return F140_147[nG]; + else { + nG-=70; + if (nG<30) return F210_239[nG]; + else { + nG-=800; + if (nG<50) return F1010_1059[nG]; + else return 0; + } + } + } +} + +const char * DXFGroupReader::GetS(USHORT nG) +{ + if (nG<10) return S0_9[nG]; + else if ( nG == 100 ) + return S100; + else if ( nG == 102 ) + return S102; + else + { + nG-=999; + if (nG<11) return S999_1009[nG]; + else return NULL; + } +} + +void DXFGroupReader::SetF(USHORT nG, double fF) +{ + nG-=10; + if (nG<50) F10_59[nG]=fF; + else { + nG-=130; + if (nG<8) F140_147[nG]=fF; + else { + nG-=70; + if (nG<30) F210_239[nG]=fF; + else { + nG-=800; + if (nG<50) F1010_1059[nG]=fF; + } + } + } +} + + +void DXFGroupReader::SetS(USHORT nG, const char * sS) +{ + char* pPtr = NULL; + if ( nG < 10 ) + pPtr = S0_9[ nG ]; + else if ( nG == 100 ) + pPtr = S100; + else if ( nG == 102 ) + pPtr = S102; + else + { + nG -= 999; + if ( nG < 11 ) + pPtr = S999_1009[ nG ]; + } + if ( pPtr ) + strncpy( pPtr, sS, DXF_MAX_STRING_LEN + 1 ); +} + + +void DXFGroupReader::ReadLine(char * ptgt) +{ + ByteString aStr; + ULONG nLen; + + DXFReadLine( rIS, aStr ); + + nLen = aStr.Len(); + if ( nLen > DXF_MAX_STRING_LEN ) + nLen = DXF_MAX_STRING_LEN; + + memcpy( ptgt, aStr.GetBuffer(), nLen ); + ptgt[ nLen ] = 0x00; +/* + if ( pCallback ) + { + const ULONG nPercent= nMinPercent + (nMaxPercent-nMinPercent)*rIS.Tell() / nFileSize; + + if ( nPercent >= nLastPercent + 4 ) + { + nLastPercent=nPercent; + if (((*pCallback)(pCallerData,(USHORT)nPercent))==TRUE) + bStatus=FALSE; + } + } +*/ +} + + +long DXFGroupReader::ReadI() +{ + char sl[DXF_MAX_STRING_LEN+1],*p; + long res,nv; + + ReadLine(sl); + + p=sl; + + while(*p==0x20) p++; + + if ((*p<'0' || *p>'9') && *p!='-') { + bStatus=FALSE; + return 0; + } + + if (*p=='-') { + nv=-1; + p++; + } + else nv=1; + + res=0; + do { + res=res*10+(long)(*p-'0'); + p++; + } while (*p>='0' && *p<='9'); + + while (*p==0x20) p++; + if (*p!=0) { + bStatus=FALSE; + return 0; + } + + return res*nv; +} + + +double DXFGroupReader::ReadF() +{ + char sl[DXF_MAX_STRING_LEN+1],*p; + + ReadLine(sl); + p=sl; + while(*p==0x20) p++; + if ((*p<'0' || *p>'9') && *p!='.' && *p!='-') { + bStatus=FALSE; + return 0.0; + } + return atof(p); +} + + +void DXFGroupReader::ReadS(char * ptgt) +{ + ReadLine(ptgt); +} + + diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.hxx b/filter/source/graphicfilter/idxf/dxfgrprd.hxx new file mode 100644 index 000000000000..0b9a40ff6bf8 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfgrprd.hxx @@ -0,0 +1,155 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DXFGRPRD_HXX +#define _DXFGRPRD_HXX + +#include + +#define DXF_MAX_STRING_LEN 256 // Max Stringlaenge (ohne die 0) + + +class DXFGroupReader +{ + +public: + + // Anmerkkung: + // sizeof(DXFGroupReader) ist gross, also nur dynamisch anlegen! + + DXFGroupReader( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent ); + + BOOL GetStatus(); + + void SetError(); + + USHORT Read(); + // Liesst die naechste Gruppe ein und liefert den Gruppencode zurueck. + // Im Falle eines Fehlers liefert GetStatus() FALSE, Gruppencode wird 0 + // gesetzt, und es wird SetS(0,"EOF") ausgefuehrt. + + USHORT GetG(); + // Liefert den letzten Gruppencode (also was Read() zuletzt lieferte) + + long GetI(); + // Liefert den Integer-Wert zur Gruppe, die vorher mit Read() gelesen wurde. + // Dabei muss es sich um einen Gruppencode fuer den Datentyp Integer + // gehandelt haben, wenn nicht, wird 0 gelieferet. + + double GetF(); + // Liefert den Floatingpoint-Wert zur Gruppe, die vorher mit Read() gelesen wurde. + // Dabei muss es sich um einen Gruppencode fuer den Datentyp Floatingpoint + // gehandelt haben, wenn nicht, wird 0 geliefert. + + const char * GetS(); + // Liefert den String zur Gruppe, die vorher mit Read() gelesen wurde. + // Dabei muss es sich um einen Gruppencode fuer den Datentyp String + // gehandelt haben, wenn nicht, wird NULL geliefert. + + // Folgende drei Methoden arbeiten wie die obigen, nur kann auch ein anderer als der + // aktuelle Gruppencode angegeben werden. (DXFGroupReader speichert die Parameter + // zu allen Gruppencodes. Dadurch ist es moeglich, dass zunaechst mit Read() einige + // verschiedene Gruppen eingelesen werden, bevor sie ausgewertet werden.) + long GetI(USHORT nG); + double GetF(USHORT nG); + const char * GetS(USHORT nG); + + // Mit folgenden Methoden koennen die aktuell gespeicherten Werte zu den + // Gruppencodes veraendert werden. (z.B. um Defaultwerte zu setzen, bevor + // 'blind' eine Menge von Gruppen eingelesen wird.) + void SetF(USHORT nG, double fF); + void SetS(USHORT nG, const char * sS); // (wird kopiert) + +private: + + void ReadLine(char * ptgt); + long ReadI(); + double ReadF(); + void ReadS(char * ptgt); + + SvStream & rIS; + char sIBuff[1024]; + USHORT nIBuffSize,nIBuffPos; + BOOL bStatus; + USHORT nLastG; + ULONG nGCount; + + ULONG nMinPercent; + ULONG nMaxPercent; + ULONG nLastPercent; + ULONG nFileSize; + + char S0_9 [10][DXF_MAX_STRING_LEN+1]; // Strings Gruppencodes 0..9 + double F10_59 [50]; // Floats Gruppencodes 10..59 + long I60_79 [20]; // Integers Gruppencodes 60..79 + long I90_99 [10]; + char S100 [DXF_MAX_STRING_LEN+1]; + char S102 [DXF_MAX_STRING_LEN+1]; + double F140_147 [ 8]; // Floats Gruppencodes 140..147 + long I170_175 [ 6]; // Integers Gruppencodes 170..175 + double F210_239 [30]; // Floats Gruppencodes 210..239 + char S999_1009 [11][DXF_MAX_STRING_LEN+1]; // Strings Gruppencodes 999..1009 + double F1010_1059[50]; // Floats Gruppencodes 1010..1059 + long I1060_1079[20]; // Integers Gruppencodes 1060..1079 + +}; + + +inline BOOL DXFGroupReader::GetStatus() +{ + return bStatus; +} + + +inline void DXFGroupReader::SetError() +{ + bStatus=FALSE; +} + +inline USHORT DXFGroupReader::GetG() +{ + return nLastG; +} + +inline long DXFGroupReader::GetI() +{ + return GetI(nLastG); +} + +inline double DXFGroupReader::GetF() +{ + return GetF(nLastG); +} + +inline const char * DXFGroupReader::GetS() +{ + return GetS(nLastG); +} + +#endif + + diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx new file mode 100644 index 000000000000..9d6494b87f9d --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx @@ -0,0 +1,385 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + + +//------------------DXFBoundingBox-------------------------------------------- + + +void DXFBoundingBox::Union(const DXFVector & rVector) +{ + if (bEmpty==TRUE) { + fMinX=rVector.fx; + fMinY=rVector.fy; + fMinZ=rVector.fz; + fMaxX=rVector.fx; + fMaxY=rVector.fy; + fMaxZ=rVector.fz; + bEmpty=FALSE; + } + else { + if (fMinX>rVector.fx) fMinX=rVector.fx; + if (fMinY>rVector.fy) fMinY=rVector.fy; + if (fMinZ>rVector.fz) fMinZ=rVector.fz; + if (fMaxX=1; nVal--) { + for (nNSat=0; nNSat<2; nNSat++) { + nmax=((nHue+3)>>3)%3; + j=nHue-(nmax<<3); if (j>4) j=j-24; + if (j>=0) { + nmed=(nmax+1)%3; + nmin=(nmax+2)%3; + } + else { + nmed=(nmax+2)%3; + nmin=(nmax+1)%3; + j=-j; + } + nC[nmin]=0; + nC[nmed]=255*j/4; + nC[nmax]=255; + if (nNSat!=0) { + for (j=0; j<3; j++) nC[j]=(nC[j]>>1)+128; + } + for (j=0; j<3; j++) nC[j]=nC[j]*nVal/5; + SetColor((BYTE)(i++),(BYTE)nC[0],(BYTE)nC[1],(BYTE)nC[2]); + } + } + } + + // Farben 250 - 255 (Grautoenne) + for (i=0; i<6; i++) { + nV=(BYTE)(i*38+65); + SetColor((BYTE)(250+i),nV,nV,nV); + } +} + + +DXFPalette::~DXFPalette() +{ + delete[] pBlue; + delete[] pGreen; + delete[] pRed; +} + + +void DXFPalette::SetColor(BYTE nIndex, BYTE nRed, BYTE nGreen, BYTE nBlue) +{ + pRed[nIndex]=nRed; + pGreen[nIndex]=nGreen; + pBlue[nIndex]=nBlue; +} + + +//------------------DXFRepresentation----------------------------------------- + + +DXFRepresentation::DXFRepresentation() +{ + setTextEncoding(RTL_TEXTENCODING_IBM_437); + setGlobalLineTypeScale(1.0); +} + + +DXFRepresentation::~DXFRepresentation() +{ +} + + +BOOL DXFRepresentation::Read( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent) +{ + DXFGroupReader * pDGR; + BOOL bRes; + + aTables.Clear(); + aBlocks.Clear(); + aEntities.Clear(); + + pDGR = new DXFGroupReader( rIStream, nMinPercent, nMaxPercent ); + + pDGR->Read(); + while (pDGR->GetG()!=0 || strcmp(pDGR->GetS(),"EOF")!=0) { + if (pDGR->GetG()==0 && strcmp(pDGR->GetS(),"SECTION")==0) { + if (pDGR->Read()!=2) { + pDGR->SetError(); + break; + } + if (strcmp(pDGR->GetS(),"HEADER" )==0) ReadHeader(*pDGR); + else if (strcmp(pDGR->GetS(),"TABLES" )==0) aTables.Read(*pDGR); + else if (strcmp(pDGR->GetS(),"BLOCKS" )==0) aBlocks.Read(*pDGR); + else if (strcmp(pDGR->GetS(),"ENTITIES")==0) aEntities.Read(*pDGR); + else pDGR->Read(); + } + else pDGR->Read(); + } + + bRes=pDGR->GetStatus(); + + delete pDGR; + + if (bRes==TRUE && aBoundingBox.bEmpty==TRUE) + CalcBoundingBox(aEntities,aBoundingBox); + + return bRes; +} + + +void DXFRepresentation::ReadHeader(DXFGroupReader & rDGR) +{ + + while (rDGR.GetG()!=0 || (strcmp(rDGR.GetS(),"EOF")!=0 && strcmp(rDGR.GetS(),"ENDSEC")!=0) ) + { + if (rDGR.GetG()==9) { + if (strcmp(rDGR.GetS(),"$EXTMIN")==0 || + strcmp(rDGR.GetS(),"$EXTMAX")==0) + { + DXFVector aVector; + rDGR.SetF(10,0.0); + rDGR.SetF(20,0.0); + rDGR.SetF(30,0.0); + do { + rDGR.Read(); + } while (rDGR.GetG()!=9 && rDGR.GetG()!=0); + aVector.fx=rDGR.GetF(10); + aVector.fy=rDGR.GetF(20); + aVector.fz=rDGR.GetF(30); + aBoundingBox.Union(aVector); + } else { + if (strcmp(rDGR.GetS(),"$DWGCODEPAGE")==0) + { + rDGR.Read(); + + // FIXME: we really need a whole table of + // $DWGCODEPAGE to encodings mappings + if ( (strcmp(rDGR.GetS(),"ANSI_932")==0) || + (strcmp(rDGR.GetS(),"ansi_932")==0) || + (strcmp(rDGR.GetS(),"DOS932")==0) || + (strcmp(rDGR.GetS(),"dos932")==0) ) + { + setTextEncoding(RTL_TEXTENCODING_MS_932); + } + } + else if (strcmp(rDGR.GetS(),"$LTSCALE")==0) + { + rDGR.Read(); + setGlobalLineTypeScale(getGlobalLineTypeScale() * rDGR.GetF()); + } + else rDGR.Read(); + } + } + else rDGR.Read(); + } +} + + +void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities, + DXFBoundingBox & rBox) +{ + DXFBasicEntity * pBE=rEntities.pFirst; + while (pBE!=NULL) { + switch (pBE->eType) { + case DXF_LINE: { + const DXFLineEntity * pE = (DXFLineEntity*)pBE; + rBox.Union(pE->aP0); + rBox.Union(pE->aP1); + break; + } + case DXF_POINT: { + const DXFPointEntity * pE = (DXFPointEntity*)pBE; + rBox.Union(pE->aP0); + break; + } + case DXF_CIRCLE: { + const DXFCircleEntity * pE = (DXFCircleEntity*)pBE; + DXFVector aP; + aP=pE->aP0; + aP.fx-=pE->fRadius; + aP.fy-=pE->fRadius; + rBox.Union(aP); + aP=pE->aP0; + aP.fx+=pE->fRadius; + aP.fy+=pE->fRadius; + rBox.Union(aP); + break; + } + case DXF_ARC: { + const DXFArcEntity * pE = (DXFArcEntity*)pBE; + DXFVector aP; + aP=pE->aP0; + aP.fx-=pE->fRadius; + aP.fy-=pE->fRadius; + rBox.Union(aP); + aP=pE->aP0; + aP.fx+=pE->fRadius; + aP.fy+=pE->fRadius; + rBox.Union(aP); + break; + } + case DXF_TRACE: { + const DXFTraceEntity * pE = (DXFTraceEntity*)pBE; + rBox.Union(pE->aP0); + rBox.Union(pE->aP1); + rBox.Union(pE->aP2); + rBox.Union(pE->aP3); + break; + } + case DXF_SOLID: { + const DXFSolidEntity * pE = (DXFSolidEntity*)pBE; + rBox.Union(pE->aP0); + rBox.Union(pE->aP1); + rBox.Union(pE->aP2); + rBox.Union(pE->aP3); + break; + } + case DXF_TEXT: { + //const DXFTextEntity * pE = (DXFTextEntity*)pBE; + //??? + break; + } + case DXF_SHAPE: { + //const DXFShapeEntity * pE = (DXFShapeEntity*)pBE; + //??? + break; + } + case DXF_INSERT: { + const DXFInsertEntity * pE = (DXFInsertEntity*)pBE; + DXFBlock * pB; + DXFBoundingBox aBox; + DXFVector aP; + pB=aBlocks.Search(pE->sName); + if (pB==NULL) break; + CalcBoundingBox(*pB,aBox); + if (aBox.bEmpty==TRUE) break; + aP.fx=(aBox.fMinX-pB->aBasePoint.fx)*pE->fXScale+pE->aP0.fx; + aP.fy=(aBox.fMinY-pB->aBasePoint.fy)*pE->fYScale+pE->aP0.fy; + aP.fz=(aBox.fMinZ-pB->aBasePoint.fz)*pE->fZScale+pE->aP0.fz; + rBox.Union(aP); + aP.fx=(aBox.fMaxX-pB->aBasePoint.fx)*pE->fXScale+pE->aP0.fx; + aP.fy=(aBox.fMaxY-pB->aBasePoint.fy)*pE->fYScale+pE->aP0.fy; + aP.fz=(aBox.fMaxZ-pB->aBasePoint.fz)*pE->fZScale+pE->aP0.fz; + rBox.Union(aP); + break; + } + case DXF_ATTDEF: { + //const DXFAttDefEntity * pE = (DXFAttDefEntity*)pBE; + //??? + break; + } + case DXF_ATTRIB: { + //const DXFAttribEntity * pE = (DXFAttribEntity*)pBE; + //??? + break; + } + case DXF_VERTEX: { + const DXFVertexEntity * pE = (DXFVertexEntity*)pBE; + rBox.Union(pE->aP0); + break; + } + case DXF_3DFACE: { + const DXF3DFaceEntity * pE = (DXF3DFaceEntity*)pBE; + rBox.Union(pE->aP0); + rBox.Union(pE->aP1); + rBox.Union(pE->aP2); + rBox.Union(pE->aP3); + break; + } + case DXF_DIMENSION: { + const DXFDimensionEntity * pE = (DXFDimensionEntity*)pBE; + DXFBlock * pB; + DXFBoundingBox aBox; + DXFVector aP; + pB=aBlocks.Search(pE->sPseudoBlock); + if (pB==NULL) break; + CalcBoundingBox(*pB,aBox); + if (aBox.bEmpty==TRUE) break; + aP.fx=aBox.fMinX-pB->aBasePoint.fx; + aP.fy=aBox.fMinY-pB->aBasePoint.fy; + aP.fz=aBox.fMinZ-pB->aBasePoint.fz; + rBox.Union(aP); + aP.fx=aBox.fMaxX-pB->aBasePoint.fx; + aP.fy=aBox.fMaxY-pB->aBasePoint.fy; + aP.fz=aBox.fMaxZ-pB->aBasePoint.fz; + rBox.Union(aP); + break; + } + case DXF_POLYLINE: { + //const DXFAttribEntity * pE = (DXFAttribEntity*)pBE; + //??? + break; + } + case DXF_SEQEND: { + //const DXFAttribEntity * pE = (DXFAttribEntity*)pBE; + //??? + break; + } + case DXF_HATCH : + break; + case DXF_LWPOLYLINE : + break; + } + pBE=pBE->pSucc; + } +} diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx new file mode 100644 index 000000000000..c95d65cfbe46 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfreprd.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DXFREPRD_HXX +#define _DXFREPRD_HXX + +#include +#include + + +//---------------------------------------------------------------------------- +//--------------------Nebensachen--------------------------------------------- +//---------------------------------------------------------------------------- + +//-------------------Eine 3D-Min/Max-Box-------------------------------------- + +class DXFBoundingBox { +public: + BOOL bEmpty; + double fMinX; + double fMinY; + double fMinZ; + double fMaxX; + double fMaxY; + double fMaxZ; + + DXFBoundingBox() { bEmpty=TRUE; } + void Union(const DXFVector & rVector); +}; + + +//-------------------Die (konstante) Palette fuer DXF------------------------- + +class DXFPalette { + +public: + + DXFPalette(); + ~DXFPalette(); + + BYTE GetRed(BYTE nIndex) const; + BYTE GetGreen(BYTE nIndex) const; + BYTE GetBlue(BYTE nIndex) const; + +private: + BYTE * pRed; + BYTE * pGreen; + BYTE * pBlue; + void SetColor(BYTE nIndex, BYTE nRed, BYTE nGreen, BYTE nBlue); +}; + + +//---------------------------------------------------------------------------- +//-----------------DXF Datei lesen und repraesentieren------------------------ +//---------------------------------------------------------------------------- + +class DXFRepresentation { + +public: + + DXFPalette aPalette; + // Die immer gleiche DXF-Farb-Palette + + DXFBoundingBox aBoundingBox; + // Ist gleich den AutoCAD-Variablen EXTMIN, EXTMAX sofern in DXF-Datei + // vorhanden, anderenfalls wird die BoundingBox berechnet (in Read()). + + DXFTables aTables; + // Die Tabellen der DXF-Datei + + DXFBlocks aBlocks; + // Die Bloecke der DXF-Datei + + DXFEntities aEntities; + // Die Entities (aus der Entities-Section) der DXF-Datei + + rtl_TextEncoding mEnc; // $DWGCODEPAGE + + double mfGlobalLineTypeScale; // $LTSCALE + + DXFRepresentation(); + ~DXFRepresentation(); + + rtl_TextEncoding getTextEncoding() const; + void setTextEncoding(rtl_TextEncoding aEnc); + + double getGlobalLineTypeScale() const; + void setGlobalLineTypeScale(double fGlobalLineTypeScale); + + BOOL Read( SvStream & rIStream, USHORT nMinPercent, USHORT nMaxPercent); + // Liesst die komplette DXF-Datei ein. + +private: + + void ReadHeader(DXFGroupReader & rDGR); + void CalcBoundingBox(const DXFEntities & rEntities, + DXFBoundingBox & rBox); +}; + +//---------------------------------------------------------------------------- +//-------------------inlines-------------------------------------------------- +//---------------------------------------------------------------------------- + +inline BYTE DXFPalette::GetRed(BYTE nIndex) const { return pRed[nIndex]; } +inline BYTE DXFPalette::GetGreen(BYTE nIndex) const { return pGreen[nIndex]; } +inline BYTE DXFPalette::GetBlue(BYTE nIndex) const { return pBlue[nIndex]; } +inline rtl_TextEncoding DXFRepresentation::getTextEncoding() const { return mEnc; } +inline void DXFRepresentation::setTextEncoding(rtl_TextEncoding aEnc) { mEnc = aEnc; } +inline double DXFRepresentation::getGlobalLineTypeScale() const { return mfGlobalLineTypeScale; } +inline void DXFRepresentation::setGlobalLineTypeScale(double fGlobalLineTypeScale) { mfGlobalLineTypeScale = fGlobalLineTypeScale; } + +#endif + + diff --git a/filter/source/graphicfilter/idxf/dxftblrd.cxx b/filter/source/graphicfilter/idxf/dxftblrd.cxx new file mode 100644 index 000000000000..337e43730cb6 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxftblrd.cxx @@ -0,0 +1,348 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + +//----------------------------------DXFLType----------------------------------- + +DXFLType::DXFLType() +{ + pSucc=NULL; + sName[0]=0; + nFlags=0; + sDescription[0]=0; + nDashCount=0; +} + +void DXFLType::Read(DXFGroupReader & rDGR) +{ + long nDashIndex=-1; + + while (rDGR.Read()!=0) + { + switch (rDGR.GetG()) + { + case 2: strncpy( sName, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 70: nFlags=rDGR.GetI(); break; + case 3: strncpy( sDescription, rDGR.GetS(), DXF_MAX_STRING_LEN + 1 ); break; + case 73: + if (nDashIndex!=-1) { + rDGR.SetError(); + return; + } + nDashCount=rDGR.GetI(); + if (nDashCount>DXF_MAX_DASH_COUNT) + nDashCount=DXF_MAX_DASH_COUNT; + nDashIndex=0; + break; + case 40: fPatternLength=rDGR.GetF(); break; + case 49: + if (nDashCount==-1) { + rDGR.SetError(); + return; + } + if (nDashIndexpSucc); + + ppLa=&pLayers; + while(*ppLa!=NULL) ppLa=&((*ppLa)->pSucc); + + ppSt=&pStyles; + while(*ppSt!=NULL) ppSt=&((*ppSt)->pSucc); + + ppVP=&pVPorts; + while(*ppVP!=NULL) ppVP=&((*ppVP)->pSucc); + + for (;;) { + while (rDGR.GetG()!=0) rDGR.Read(); + if (strcmp(rDGR.GetS(),"EOF")==0 || + strcmp(rDGR.GetS(),"ENDSEC")==0) break; + else if (strcmp(rDGR.GetS(),"LTYPE")==0) { + pLT=new DXFLType; + pLT->Read(rDGR); + *ppLT=pLT; + ppLT=&(pLT->pSucc); + } + else if (strcmp(rDGR.GetS(),"LAYER")==0) { + pLa=new DXFLayer; + pLa->Read(rDGR); + *ppLa=pLa; + ppLa=&(pLa->pSucc); + } + else if (strcmp(rDGR.GetS(),"STYLE")==0) { + pSt=new DXFStyle; + pSt->Read(rDGR); + *ppSt=pSt; + ppSt=&(pSt->pSucc); + } + else if (strcmp(rDGR.GetS(),"VPORT")==0) { + pVP=new DXFVPort; + pVP->Read(rDGR); + *ppVP=pVP; + ppVP=&(pVP->pSucc); + } + else rDGR.Read(); + } +} + + +void DXFTables::Clear() +{ + DXFLType * pLT; + DXFLayer * pLa; + DXFStyle * pSt; + DXFVPort * pVP; + + while (pStyles!=NULL) { + pSt=pStyles; + pStyles=pSt->pSucc; + delete pSt; + } + while (pLayers!=NULL) { + pLa=pLayers; + pLayers=pLa->pSucc; + delete pLa; + } + while (pLTypes!=NULL) { + pLT=pLTypes; + pLTypes=pLT->pSucc; + delete pLT; + } + while (pVPorts!=NULL) { + pVP=pVPorts; + pVPorts=pVP->pSucc; + delete pVP; + } +} + + +DXFLType * DXFTables::SearchLType(const char * pName) const +{ + DXFLType * p; + for (p=pLTypes; p!=NULL; p=p->pSucc) { + if (strcmp(pName,p->sName)==0) break; + } + return p; +} + + +DXFLayer * DXFTables::SearchLayer(const char * pName) const +{ + DXFLayer * p; + for (p=pLayers; p!=NULL; p=p->pSucc) { + if (strcmp(pName,p->sName)==0) break; + } + return p; +} + + +DXFVPort * DXFTables::SearchVPort(const char * pName) const +{ + DXFVPort * p; + for (p=pVPorts; p!=NULL; p=p->pSucc) { + if (strcmp(pName,p->sName)==0) break; + } + return p; +} + + diff --git a/filter/source/graphicfilter/idxf/dxftblrd.hxx b/filter/source/graphicfilter/idxf/dxftblrd.hxx new file mode 100644 index 000000000000..afa6274bd6cc --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxftblrd.hxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DXFTBLRD_HXX +#define _DXFTBLRD_HXX + +#include +#include + + +//---------------------------------------------------------------------------- +//------------------ Linien-Typ ---------------------------------------------- +//---------------------------------------------------------------------------- + +#define DXF_MAX_DASH_COUNT 32 + +class DXFLType { + +public: + + DXFLType * pSucc; + + char sName[DXF_MAX_STRING_LEN+1]; // 2 + long nFlags; // 70 + char sDescription[DXF_MAX_STRING_LEN+1]; // 3 + long nDashCount; // 73 + double fPatternLength; // 40 + double fDash[DXF_MAX_DASH_COUNT]; // 49,49,... + + DXFLType(); + void Read(DXFGroupReader & rDGR); +}; + + +//---------------------------------------------------------------------------- +//------------------ Layer --------------------------------------------------- +//---------------------------------------------------------------------------- + +class DXFLayer { + +public: + + DXFLayer * pSucc; + + char sName[DXF_MAX_STRING_LEN+1]; // 2 + long nFlags; // 70 + long nColor; // 62 + char sLineType[DXF_MAX_STRING_LEN+1]; // 6 + + DXFLayer(); + void Read(DXFGroupReader & rDGR); +}; + + +//---------------------------------------------------------------------------- +//------------------ Style --------------------------------------------------- +//---------------------------------------------------------------------------- + +class DXFStyle { + +public: + + DXFStyle * pSucc; + + char sName[DXF_MAX_STRING_LEN+1]; // 2 + long nFlags; // 70 + double fHeight; // 40 + double fWidthFak; // 41 + double fOblAngle; // 50 + long nTextGenFlags; // 71 + double fLastHeightUsed; // 42 + char sPrimFontFile[DXF_MAX_STRING_LEN+1]; // 3 + char sBigFontFile[DXF_MAX_STRING_LEN+1]; // 4 + + DXFStyle(); + void Read(DXFGroupReader & rDGR); +}; + + +//---------------------------------------------------------------------------- +//------------------ VPort --------------------------------------------------- +//---------------------------------------------------------------------------- + +class DXFVPort { + +public: + + DXFVPort * pSucc; + + char sName[DXF_MAX_STRING_LEN+1]; // 2 + long nFlags; // 70 + double fMinX; // 10 + double fMinY; // 20 + double fMaxX; // 11 + double fMaxY; // 21 + double fCenterX; // 12 + double fCenterY; // 22 + double fSnapBaseX; // 13 + double fSnapBaseY; // 23 + double fSnapSapcingX; // 14 + double fSnapSpacingY; // 24 + double fGridX; // 15 + double fGridY; // 25 + DXFVector aDirection; // 16,26,36 + DXFVector aTarget; // 17,27,37 + double fHeight; // 40 + double fAspectRatio; // 41 + double fLensLength; // 42 + double fFrontClipPlane; // 43 + double fBackClipPlane; // 44 + double fTwistAngle; // 51 + long nStatus; // 68 + long nID; // 69 + long nMode; // 71 + long nCircleZoomPercent; // 72 + long nFastZoom; // 73 + long nUCSICON; // 74 + long nSnap; // 75 + long nGrid; // 76 + long nSnapStyle; // 77 + long nSnapIsopair; // 78 + + DXFVPort(); + void Read(DXFGroupReader & rDGR); +}; + + +//---------------------------------------------------------------------------- +//------------------ Tabellen ------------------------------------------------ +//---------------------------------------------------------------------------- + +class DXFTables { + +public: + + DXFLType * pLTypes; // Liste der Linientypen + DXFLayer * pLayers; // Liste der Layers + DXFStyle * pStyles; // Liste der Styles + DXFVPort * pVPorts; // Liste der Viewports + + DXFTables(); + ~DXFTables(); + + void Read(DXFGroupReader & rDGR); + // Liest die Tabellen ein bis zu einem ENDSEC oder EOF + // (unbekannte Dinge/Tabellen werden uebersprungen) + + void Clear(); + + // Suche nach Tabelleneintraegen: + DXFLType * SearchLType(const char * pName) const; + DXFLayer * SearchLayer(const char * pName) const; + DXFVPort * SearchVPort(const char * pName) const; + +}; + +#endif + + diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx new file mode 100644 index 000000000000..d71100cdc6b1 --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfvec.cxx @@ -0,0 +1,254 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include + + +//---------------------------- DXFVector --------------------------------------- + + +double DXFVector::Abs() const +{ + return sqrt(SProd(*this)); +} + + +DXFVector DXFVector::Unit() const +{ + double flen; + + flen=Abs(); + if (flen!=0) return (*this)*(1.0/flen); + else return DXFVector(1.0,0.0,0.0); +} + + +//---------------------------- DXFTransform ------------------------------------ + + +DXFTransform::DXFTransform() : + aMX(1.0, 0.0, 0.0), + aMY(0.0, 1.0, 0.0), + aMZ(0.0, 0.0, 1.0), + aMP(0.0, 0.0, 0.0) +{ +} + + +DXFTransform::DXFTransform(double fScaleX, double fScaleY, double fScaleZ, + const DXFVector & rShift) : + aMX(fScaleX, 0.0, 0.0), + aMY(0.0, fScaleY, 0.0), + aMZ(0.0, 0.0, fScaleZ), + aMP(rShift) +{ +} + + +DXFTransform::DXFTransform(double fScaleX, double fScaleY, double fScaleZ, + double fRotAngle, + const DXFVector & rShift) : + aMX(0.0, 0.0, 0.0), + aMY(0.0, 0.0, 0.0), + aMZ(0.0, 0.0, fScaleZ), + aMP(rShift) +{ + aMX.fx=cos(3.14159265359/180.0*fRotAngle); + aMX.fy=sin(3.14159265359/180.0*fRotAngle); + aMY.fx=-aMX.fy; + aMY.fy=aMX.fx; + aMX*=fScaleX; + aMY*=fScaleY; +} + + +DXFTransform::DXFTransform(const DXFVector & rExtrusion) : + aMX(), aMY(), aMZ(), aMP(0.0, 0.0, 0.0) +{ + // 'Arbitrary Axis Algorithm' (siehe DXF-Doku von Autodesk) + if ( fabs(rExtrusion.fx) < 1.0/64.0 && fabs(rExtrusion.fy) < 1.0/64.0) { + aMX = DXFVector(0.0, 1.0, 0.0) * rExtrusion; + } + else { + aMX = DXFVector(0.0, 0.0, 1.0) * rExtrusion; + } + aMX=aMX.Unit(); + aMY=(rExtrusion*aMX).Unit(); + aMZ=rExtrusion.Unit(); +} + + +DXFTransform::DXFTransform(const DXFVector & rViewDir, const DXFVector & rViewTarget) : + aMX(), aMY(), aMZ(), aMP() +{ + DXFVector aV; + + aV=rViewDir.Unit(); + aMX.fz=aV.fx; + aMY.fz=aV.fy; + aMZ.fz=aV.fz; + + aMZ.fx=0; + if (aV.fx==0) aMY.fx=0; else aMY.fx=sqrt(1/(1+aV.fy*aV.fy/(aV.fx*aV.fx))); + aMX.fx=sqrt(1-aMY.fx*aMY.fx); + if (aV.fx*aV.fy*aMY.fx>0) aMX.fx=-aMX.fx; + + aV=aV*DXFVector(aMX.fx,aMY.fx,aMZ.fx); + aMX.fy=aV.fx; + aMY.fy=aV.fy; + aMZ.fy=aV.fz; + + if (aMZ.fy<0) { + aMX.fy=-aMX.fy; + aMY.fy=-aMY.fy; + aMZ.fy=-aMZ.fy; + aMX.fx=-aMX.fx; + aMY.fx=-aMY.fx; + } + + aV=DXFVector(0,0,0)-rViewTarget; + aMP.fx = aV.fx * aMX.fx + aV.fy * aMY.fx + aV.fz * aMZ.fx; + aMP.fy = aV.fx * aMX.fy + aV.fy * aMY.fy + aV.fz * aMZ.fy; + aMP.fz = aV.fx * aMX.fz + aV.fy * aMY.fz + aV.fz * aMZ.fz; +} + + +DXFTransform::DXFTransform(const DXFTransform & rT1, const DXFTransform & rT2) : + aMX(),aMY(),aMZ(),aMP() +{ + rT2.TransDir(rT1.aMX,aMX); + rT2.TransDir(rT1.aMY,aMY); + rT2.TransDir(rT1.aMZ,aMZ); + rT2.Transform(rT1.aMP,aMP); +} + + +void DXFTransform::Transform(const DXFVector & rSrc, DXFVector & rTgt) const +{ + rTgt.fx = rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx + aMP.fx; + rTgt.fy = rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy + aMP.fy; + rTgt.fz = rSrc.fx * aMX.fz + rSrc.fy * aMY.fz + rSrc.fz * aMZ.fz + aMP.fz; +} + + +void DXFTransform::Transform(const DXFVector & rSrc, Point & rTgt) const +{ + rTgt.X()=(long)( rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx + aMP.fx + 0.5 ); + rTgt.Y()=(long)( rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy + aMP.fy + 0.5 ); +} + + +void DXFTransform::TransDir(const DXFVector & rSrc, DXFVector & rTgt) const +{ + rTgt.fx = rSrc.fx * aMX.fx + rSrc.fy * aMY.fx + rSrc.fz * aMZ.fx; + rTgt.fy = rSrc.fx * aMX.fy + rSrc.fy * aMY.fy + rSrc.fz * aMZ.fy; + rTgt.fz = rSrc.fx * aMX.fz + rSrc.fy * aMY.fz + rSrc.fz * aMZ.fz; +} + + +BOOL DXFTransform::TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const +{ + double fMXAbs=aMX.Abs(); + double fMYAbs=aMY.Abs(); + double fNearNull=(fMXAbs+fMYAbs)*0.001; + + if (fabs(aMX.fy)<=fNearNull && fabs(aMX.fz)<=fNearNull && + fabs(aMY.fx)<=fNearNull && fabs(aMY.fz)<=fNearNull) + { + rEx=fabs(aMX.fx*fRadius); + rEy=fabs(aMY.fy*fRadius); + return TRUE; + } + else if (fabs(aMX.fx)<=fNearNull && fabs(aMX.fz)<=fNearNull && + fabs(aMY.fy)<=fNearNull && fabs(aMY.fz)<=fNearNull) + { + rEx=fabs(aMY.fx*fRadius); + rEy=fabs(aMX.fy*fRadius); + return TRUE; + } + else if (fabs(fMXAbs-fMYAbs)<=fNearNull && + fabs(aMX.fz)<=fNearNull && fabs(aMY.fz)<=fNearNull) + { + rEx=rEy=fabs(((fMXAbs+fMYAbs)/2)*fRadius); + return TRUE; + } + else return FALSE; +} + +LineInfo DXFTransform::Transform(const DXFLineInfo& aDXFLineInfo) const +{ + double fex,fey,scale; + + fex=sqrt(aMX.fx*aMX.fx + aMX.fy*aMX.fy); + fey=sqrt(aMY.fx*aMY.fx + aMY.fy*aMY.fy); + scale = (fex+fey)/2.0; + + LineInfo aLineInfo; + + aLineInfo.SetStyle( aDXFLineInfo.eStyle ); + aLineInfo.SetWidth( (sal_Int32) (aDXFLineInfo.fWidth * scale + 0.5) ); + aLineInfo.SetDashCount( static_cast< USHORT >( aDXFLineInfo.nDashCount ) ); + aLineInfo.SetDashLen( (sal_Int32) (aDXFLineInfo.fDashLen * scale + 0.5) ); + aLineInfo.SetDotCount( static_cast< USHORT >( aDXFLineInfo.nDotCount ) ); + aLineInfo.SetDotLen( (sal_Int32) (aDXFLineInfo.fDotLen * scale + 0.5) ); + aLineInfo.SetDistance( (sal_Int32) (aDXFLineInfo.fDistance * scale + 0.5) ); + + if ( aLineInfo.GetDashCount() > 0 && aLineInfo.GetDashLen() == 0 ) + aLineInfo.SetDashLen(1); + + if ( aLineInfo.GetDotCount() > 0 && aLineInfo.GetDotLen() == 0 ) + aLineInfo.SetDotLen(1); + + return aLineInfo; +} + +ULONG DXFTransform::TransLineWidth(double fW) const +{ + double fex,fey; + + fex=sqrt(aMX.fx*aMX.fx + aMX.fy*aMX.fy); + fey=sqrt(aMY.fx*aMY.fx + aMY.fy*aMY.fy); + // ### + // printf("fex=%f fey=%f\n", fex, fey); + return (ULONG)(fabs(fW)*(fex+fey)/2.0+0.5); +} + + +double DXFTransform::CalcRotAngle() const +{ + return atan2(aMX.fy,aMX.fx)/3.14159265359*180.0; +} + +BOOL DXFTransform::Mirror() const +{ + if (aMZ.SProd(aMX*aMY)<0) return TRUE; else return FALSE; +} + diff --git a/filter/source/graphicfilter/idxf/dxfvec.hxx b/filter/source/graphicfilter/idxf/dxfvec.hxx new file mode 100644 index 000000000000..2f7734e5277f --- /dev/null +++ b/filter/source/graphicfilter/idxf/dxfvec.hxx @@ -0,0 +1,261 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _DXFVEC_HXX +#define _DXFVEC_HXX + +#include +#include + +class DXFLineInfo { +public: + LineStyle eStyle; + double fWidth; + sal_Int32 nDashCount; + double fDashLen; + sal_Int32 nDotCount; + double fDotLen; + double fDistance; + + DXFLineInfo() : + eStyle(LINE_SOLID), + fWidth(0), + nDashCount(0), + fDashLen(0), + nDotCount(0), + fDotLen(0), + fDistance(0) {} + + DXFLineInfo(const DXFLineInfo& x) : + eStyle(x.eStyle), + fWidth(x.fWidth), + nDashCount(x.nDashCount), + fDashLen(x.fDashLen), + nDotCount(x.nDotCount), + fDotLen(x.fDotLen), + fDistance(x.fDistance) {} + +}; + + +//------------------------------------------------------------------------------ +//---------------------------- DXFVector --------------------------------------- +//------------------------------------------------------------------------------ +// Allgemeiner 3D-Vektor mit double + +class DXFVector { + +public: + + double fx,fy,fz; // public ! - Warum nicht ? + + inline DXFVector(double fX=0.0, double fY=0.0, double fZ=0.0); + inline DXFVector(const DXFVector & rV); + + // Addition/Subtraktion: + DXFVector & operator += (const DXFVector & rV); + DXFVector operator + (const DXFVector & rV) const; + DXFVector & operator -= (const DXFVector & rV); + DXFVector operator - (const DXFVector & rV) const; + + // Vektorprodukt + DXFVector operator * (const DXFVector & rV) const; + + // Skalarprodukt: + double SProd(const DXFVector & rV) const; + + // Multiplikation mit Skalar: + DXFVector & operator *= (double fs); + DXFVector operator * (double fs) const; + + // Laenge: + double Abs() const; + + // Vektor gleicher Richtung und der Laenge 1: + DXFVector Unit() const; + + // Aequivalenz oder nicht: + BOOL operator == (const DXFVector & rV) const; + BOOL operator != (const DXFVector & rV) const; +}; + +//------------------------------------------------------------------------------ +//---------------------------- DXFTransform ------------------------------------ +//------------------------------------------------------------------------------ +// Eine Transformationsmatrix, spezialisiert auf unser Problem + +class DXFTransform { + +public: + + DXFTransform(); + // Zielkoordinate = Quellkoordinate + + DXFTransform(double fScaleX, double fScaleY, double fScaleZ, + const DXFVector & rShift); + // Zielkoordinate = Verschoben(Skaliert(Quellkoorinate)) + + DXFTransform(double fScaleX, double fScaleY, double fScaleZ, + double fRotAngle, + const DXFVector & rShift); + // Zielkoordinate = Verschoben(Gedreht(Skaliert(Quellkoorinate))) + // Drehung geshieht um die Z-Achse, fRotAngle in Grad. + + DXFTransform(const DXFVector & rExtrusion); + // Transformation "ECS->WCS" per "Entity Extrusion Direction" + // und dem "Arbitrary Axis Algorithm" + // (Siehe DXF-Docu von AutoDesk) + + DXFTransform(const DXFVector & rViewDir, const DXFVector & rViewTarget); + // Transformation Objektraum->Bildraum anhand von Richtung und + // Zielpunkt eines ViewPort. + // (siehe DXF-Docu von AutoDesk: VPORT) + + DXFTransform(const DXFTransform & rT1, const DXFTransform & rT2); + // Zielkoordinate = rT2(rT1(Quellkoorinate)) + + + void Transform(const DXFVector & rSrc, DXFVector & rTgt) const; + // Transformation DXFVector nach DXFVector + + void Transform(const DXFVector & rSrc, Point & rTgt) const; + // Transformation DXFVector nach SvPoint + + void TransDir(const DXFVector & rSrc, DXFVector & rTgt) const; + // Transformation eines relativen Vektors (also kein Verschiebung) + + BOOL TransCircleToEllipse(double fRadius, double & rEx, double & rEy) const; + // Versucht, einen Kreis (in der XY-Ebene) zu transformieren, so dass eine + // ausgerichtete Ellipse entsteht. Wenn das nicht geht, weil Ellipse + // in belibieger Lage entstehen wuerde, wird FALSE geliefert. + // (Der Mittelpunkt wird hiermit nicht transformiert, nehme Transform(..)) + + ULONG TransLineWidth(double fW) const; + // Transformiert die Liniendicke (so gut es geht) + + double CalcRotAngle() const; + // Ermittelt den Rotationswinkel um die Z-Achse (in Grad) + + BOOL Mirror() const; + // Liefert TRUE, wenn die Matrix ein Linkssystem bildet + + LineInfo Transform(const DXFLineInfo& aDXFLineInfo) const; + // Transform to LineInfo + +private: + DXFVector aMX; + DXFVector aMY; + DXFVector aMZ; + DXFVector aMP; +}; + +//------------------------------------------------------------------------------ +//------------------------------- inlines -------------------------------------- +//------------------------------------------------------------------------------ + + +inline DXFVector::DXFVector(double fX, double fY, double fZ) +{ + fx=fX; fy=fY; fz=fZ; +} + + +inline DXFVector::DXFVector(const DXFVector & rV) +{ + fx=rV.fx; fy=rV.fy; fz=rV.fz; +} + + +inline DXFVector & DXFVector::operator += (const DXFVector & rV) +{ + fx+=rV.fx; fy+=rV.fy; fz+=rV.fz; + return *this; +} + + +inline DXFVector DXFVector::operator + (const DXFVector & rV) const +{ + return DXFVector(fx+rV.fx, fy+rV.fy, fz+rV.fz); +} + + +inline DXFVector & DXFVector::operator -= (const DXFVector & rV) +{ + fx-=rV.fx; fy-=rV.fy; fz-=rV.fz; + return *this; +} + + +inline DXFVector DXFVector::operator - (const DXFVector & rV) const +{ + return DXFVector(fx-rV.fx, fy-rV.fy, fz-rV.fz); +} + + +inline DXFVector DXFVector::operator * (const DXFVector & rV) const +{ + return DXFVector( + fy * rV.fz - fz * rV.fy, + fz * rV.fx - fx * rV.fz, + fx * rV.fy - fy * rV.fx + ); +} + + +inline double DXFVector::SProd(const DXFVector & rV) const +{ + return fx*rV.fx + fy*rV.fy + fz*rV.fz; +} + + +inline DXFVector & DXFVector::operator *= (double fs) +{ + fx*=fs; fy*=fs; fz*=fs; + return *this; +} + + +inline DXFVector DXFVector::operator * (double fs) const +{ + return DXFVector(fx*fs,fy*fs,fz*fs); +} + + +inline BOOL DXFVector::operator == (const DXFVector & rV) const +{ + if (fx==rV.fx && fy==rV.fy && fz==rV.fz) return TRUE; + else return FALSE; +} + + +inline BOOL DXFVector::operator != (const DXFVector & rV) const +{ + if (fx!=rV.fx || fy!=rV.fy || fz!=rV.fz) return TRUE; + else return FALSE; +} + +#endif diff --git a/filter/source/graphicfilter/idxf/exports.map b/filter/source/graphicfilter/idxf/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/idxf/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/idxf/idxf.cxx b/filter/source/graphicfilter/idxf/idxf.cxx new file mode 100644 index 000000000000..149f4c2feb78 --- /dev/null +++ b/filter/source/graphicfilter/idxf/idxf.cxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include "dxf2mtf.hxx" +#include + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + DXFRepresentation aDXF; + DXF2GDIMetaFile aConverter; + GDIMetaFile aMTF; + + if ( aDXF.Read( rStream, 0, 60 ) == FALSE ) + return FALSE; + if ( aConverter.Convert( aDXF, aMTF, 60, 100 ) == FALSE ) + return FALSE; + rGraphic=Graphic(aMTF); + + return TRUE; +} + +//============================= fuer Windows ================================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + + diff --git a/filter/source/graphicfilter/idxf/makefile.mk b/filter/source/graphicfilter/idxf/makefile.mk new file mode 100644 index 000000000000..046f0765a74e --- /dev/null +++ b/filter/source/graphicfilter/idxf/makefile.mk @@ -0,0 +1,79 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=idxf +DEPTARGET=vidxf + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +EXCEPTIONSFILES=\ + $(SLO)$/dxfentrd.obj \ + $(SLO)$/dxf2mtf.obj + +SLOFILES = $(SLO)$/dxfgrprd.obj \ + $(SLO)$/dxfvec.obj \ + $(SLO)$/dxfentrd.obj \ + $(SLO)$/dxfblkrd.obj \ + $(SLO)$/dxftblrd.obj \ + $(SLO)$/dxfreprd.obj \ + $(SLO)$/dxf2mtf.obj \ + $(SLO)$/idxf.obj + +# ========================================================================== + +SHL1TARGET= idx$(DLLPOSTFIX) +SHL1IMPLIB= idxf +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/idxf.lib # $(LB)$/rtftoken.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/idxf.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/ieps/exports.map b/filter/source/graphicfilter/ieps/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/ieps/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx new file mode 100644 index 000000000000..097fc83e35fe --- /dev/null +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -0,0 +1,771 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include + +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/************************************************************************* +|* +|* ImpSearchEntry() +|* +|* Beschreibung Prueft ob im Speicherbereich pSource der nComp Bytes +|* gross ist eine Zeichenkette(pDest) mit der l�nge nSize +|* liegt. Geprueft wird NON-CASE-SENSITIVE und der Rueck- +|* gabewert ist die Adresse an der die Zeichekette gefunden +|* wurde oder NULL +|* +|* Ersterstellung SJ 04.03.98 ( und das an meinem Geburtstag ) +|* Letzte Aenderung SJ 04.03.98 +|* +*************************************************************************/ + +static BYTE* ImplSearchEntry( BYTE* pSource, BYTE* pDest, ULONG nComp, ULONG nSize ) +{ + while ( nComp-- >= nSize ) + { + ULONG i; + for ( i = 0; i < nSize; i++ ) + { + if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) + break; + } + if ( i == nSize ) + return pSource; + pSource++; + } + return NULL; +} + +//-------------------------------------------------------------------------- +// SecurityCount is the buffersize of the buffer in which we will parse for a number +static long ImplGetNumber( BYTE **pBuf, int& nSecurityCount ) +{ + BOOL bValid = TRUE; + BOOL bNegative = FALSE; + long nRetValue = 0; + while ( ( --nSecurityCount ) && ( ( **pBuf == ' ' ) || ( **pBuf == 0x9 ) ) ) + (*pBuf)++; + BYTE nByte = **pBuf; + while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) ) + { + switch ( nByte ) + { + case '.' : + // we'll only use the integer format + bValid = FALSE; + break; + case '-' : + bNegative = TRUE; + break; + default : + if ( ( nByte < '0' ) || ( nByte > '9' ) ) + nSecurityCount = 1; // error parsing the bounding box values + else if ( bValid ) + { + nRetValue *= 10; + nRetValue += nByte - '0'; + } + break; + } + nSecurityCount--; + nByte = *(++(*pBuf)); + } + if ( bNegative ) + nRetValue = -nRetValue; + return nRetValue; +} + +//-------------------------------------------------------------------------- + +static int ImplGetLen( BYTE* pBuf, int nMax ) +{ + int nLen = 0; + while( nLen != nMax ) + { + BYTE nDat = *pBuf++; + if ( nDat == 0x0a || nDat == 0x25 ) + break; + nLen++; + } + return nLen; +} + +static void MakeAsMeta(Graphic &rGraphic) +{ + VirtualDevice aVDev; + GDIMetaFile aMtf; + Bitmap aBmp( rGraphic.GetBitmap() ); + Size aSize = aBmp.GetPrefSize(); + + if( !aSize.Width() || !aSize.Height() ) + aSize = Application::GetDefaultDevice()->PixelToLogic( + aBmp.GetSizePixel(), MAP_100TH_MM ); + else + aSize = Application::GetDefaultDevice()->LogicToLogic( aSize, + aBmp.GetPrefMapMode(), MAP_100TH_MM ); + + aVDev.EnableOutput( FALSE ); + aMtf.Record( &aVDev ); + aVDev.DrawBitmap( Point(), aSize, rGraphic.GetBitmap() ); + aMtf.Stop(); + aMtf.WindStart(); + aMtf.SetPrefMapMode( MAP_100TH_MM ); + aMtf.SetPrefSize( aSize ); + rGraphic = aMtf; +} + +static oslProcessError runProcessWithPathSearch(const rtl::OUString &rProgName, + rtl_uString* pArgs[], sal_uInt32 nArgs, oslProcess *pProcess, + oslFileHandle *pIn, oslFileHandle *pOut, oslFileHandle *pErr) +{ +#ifdef WNT + /* + * ooo#72096 + * On Window the underlying SearchPath searches in order of... + * The directory from which the application loaded. + * The current directory. + * The Windows system directory. + * The Windows directory. + * The directories that are listed in the PATH environment variable. + * + * Because one of our programs is called "convert" and there is a convert + * in the windows system directory, we want to explicitly search the PATH + * to avoid picking up on that one if ImageMagick's convert preceeds it in + * PATH. + * + */ + rtl::OUString url; + rtl::OUString path(reinterpret_cast(_wgetenv(L"PATH"))); + + oslFileError err = osl_searchFileURL(rProgName.pData, path.pData, &url.pData); + if (err != osl_File_E_None) + return osl_Process_E_NotFound; + return osl_executeProcess_WithRedirectedIO(url.pData, + pArgs, nArgs, osl_Process_HIDDEN, + osl_getCurrentSecurity(), 0, 0, 0, pProcess, pIn, pOut, pErr); +#else + return osl_executeProcess_WithRedirectedIO(rProgName.pData, + pArgs, nArgs, osl_Process_SEARCHPATH | osl_Process_HIDDEN, + osl_getCurrentSecurity(), 0, 0, 0, pProcess, pIn, pOut, pErr); +#endif +} + +#if defined(WNT) || defined(OS2) +# define EXESUFFIX ".exe" +#else +# define EXESUFFIX "" +#endif + +static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic) +{ + TempFile aTemp; + aTemp.EnableKillingFile(); + rtl::OUString fileName = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pstoedit"EXESUFFIX)); + rtl::OUString arg1 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-f")); + rtl::OUString arg2 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("emf:-OO")); + rtl::OUString arg3 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); + rtl::OUString output; + osl::FileBase::getSystemPathFromFileURL(aTemp.GetName(), output); + rtl_uString *args[] = + { + arg1.pData, arg2.pData, arg3.pData, output.pData + }; + oslProcess aProcess; + oslFileHandle pIn = NULL; + oslFileHandle pOut = NULL; + oslFileHandle pErr = NULL; + oslProcessError eErr = runProcessWithPathSearch(fileName, + args, sizeof(args)/sizeof(rtl_uString *), + &aProcess, &pIn, &pOut, &pErr); + + if (eErr!=osl_Process_E_None) + return false; + + bool bRet = false; + sal_uInt64 nCount; + osl_writeFile(pIn, pBuf, nBytesRead, &nCount); + if (pIn) osl_closeFile(pIn); + bool bEMFSupported=true; + if (pOut) + { + rtl::ByteSequence seq; + if (osl_File_E_None == osl_readLine(pOut, (sal_Sequence **)&seq)) + { + rtl::OString line( (const sal_Char *) seq.getConstArray(), seq.getLength() ); + if (line.indexOf(rtl::OString("Unsupported output format")) == 0) + bEMFSupported=false; + } + osl_closeFile(pOut); + } + if (pErr) osl_closeFile(pErr); + if (nCount == nBytesRead && bEMFSupported) + { + SvFileStream aFile(output, STREAM_READ); + if (GraphicConverter::Import(aFile, rGraphic, CVT_EMF) == ERRCODE_NONE) + bRet = true; + } + osl_joinProcess(aProcess); + osl_freeProcessHandle(aProcess); + return bRet; +} + +static bool RenderAsPNGThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, + Graphic &rGraphic, rtl::OUString &rProgName, rtl_uString *pArgs[], size_t nArgs) +{ + oslProcess aProcess; + oslFileHandle pIn = NULL; + oslFileHandle pOut = NULL; + oslFileHandle pErr = NULL; + oslProcessError eErr = runProcessWithPathSearch(rProgName, + pArgs, nArgs, + &aProcess, &pIn, &pOut, &pErr); + if (eErr!=osl_Process_E_None) + return false; + + bool bRet = false; + sal_uInt64 nCount; + osl_writeFile(pIn, pBuf, nBytesRead, &nCount); + if (pIn) osl_closeFile(pIn); + if (nCount == nBytesRead) + { + SvMemoryStream aMemStm; + sal_uInt8 aBuf[32000]; + oslFileError eFileErr = osl_readFile(pOut, aBuf, 32000, &nCount); + while (eFileErr == osl_File_E_None && nCount) + { + aMemStm.Write(aBuf, sal::static_int_cast< sal_Size >(nCount)); + eFileErr = osl_readFile(pOut, aBuf, 32000, &nCount); + } + + aMemStm.Seek(0); + if ( + aMemStm.GetEndOfData() && + GraphicConverter::Import(aMemStm, rGraphic, CVT_PNG) == ERRCODE_NONE + ) + { + MakeAsMeta(rGraphic); + bRet = true; + } + } + if (pOut) osl_closeFile(pOut); + if (pErr) osl_closeFile(pErr); + osl_joinProcess(aProcess); + osl_freeProcessHandle(aProcess); + return bRet; +} + +static bool RenderAsPNGThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, + Graphic &rGraphic) +{ + rtl::OUString fileName = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("convert"EXESUFFIX)); + // density in pixel/inch + rtl::OUString arg1 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-density")); + // since the preview is also used for PDF-Export & printing on non-PS-printers, + // use some better quality - 300x300 should allow some resizing as well + rtl::OUString arg2 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("300x300")); + // read eps from STDIN + rtl::OUString arg3 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("eps:-")); + // write png to STDOUT + rtl::OUString arg4 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("png:-")); + rtl_uString *args[] = + { + arg1.pData, arg2.pData, arg3.pData, arg4.pData + }; + return RenderAsPNGThroughHelper(pBuf, nBytesRead, rGraphic, fileName, args, + sizeof(args)/sizeof(rtl_uString *)); +} + +static bool RenderAsPNGThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, + Graphic &rGraphic) +{ +#ifdef WNT + rtl::OUString fileName = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gswin32c"EXESUFFIX)); +#else + rtl::OUString fileName = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("gs"EXESUFFIX)); +#endif + rtl::OUString arg1 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-q")); + rtl::OUString arg2 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dBATCH")); + rtl::OUString arg3 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dNOPAUSE")); + rtl::OUString arg4 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dPARANOIDSAFER")); + rtl::OUString arg5 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dEPSCrop")); + rtl::OUString arg6 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dTextAlphaBits=4")); + rtl::OUString arg7 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-dGraphicsAlphaBits=4")); + rtl::OUString arg8 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-r300x300")); + rtl::OUString arg9 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-sDEVICE=png256")); + rtl::OUString arg10 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-sOutputFile=-")); + rtl::OUString arg11 = + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); + rtl_uString *args[] = + { + arg1.pData, arg2.pData, arg3.pData, arg4.pData, arg5.pData, + arg6.pData, arg7.pData, arg8.pData, arg9.pData, arg10.pData, + arg11.pData + }; + return RenderAsPNGThroughHelper(pBuf, nBytesRead, rGraphic, fileName, args, + sizeof(args)/sizeof(rtl_uString *)); +} + +static bool RenderAsPNG(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &rGraphic) +{ + if (RenderAsPNGThroughConvert(pBuf, nBytesRead, rGraphic)) + return true; + else + return RenderAsPNGThroughGS(pBuf, nBytesRead, rGraphic); +} + +// this method adds a replacement action containing the original wmf or tiff replacement, +// so the original eps can be written when storing to ODF. +void CreateMtfReplacementAction( GDIMetaFile& rMtf, SvStream& rStrm, sal_uInt32 nOrigPos, sal_uInt32 nPSSize, + sal_uInt32 nPosWMF, sal_uInt32 nSizeWMF, sal_uInt32 nPosTIFF, sal_uInt32 nSizeTIFF ) +{ + ByteString aComment( (const sal_Char*)"EPSReplacementGraphic" ); + if ( nSizeWMF || nSizeTIFF ) + { + SvMemoryStream aReplacement( nSizeWMF + nSizeTIFF + 28 ); + sal_uInt32 nMagic = 0xc6d3d0c5; + sal_uInt32 nPPos = 28 + nSizeWMF + nSizeTIFF; + sal_uInt32 nWPos = nSizeWMF ? 28 : 0; + sal_uInt32 nTPos = nSizeTIFF ? 28 + nSizeWMF : 0; + + aReplacement << nMagic << nPPos << nPSSize + << nWPos << nSizeWMF + << nTPos << nSizeTIFF; + if ( nSizeWMF ) + { + sal_uInt8* pBuf = new sal_uInt8[ nSizeWMF ]; + rStrm.Seek( nOrigPos + nPosWMF ); + rStrm.Read( pBuf, nSizeWMF ); + aReplacement.Write( pBuf, nSizeWMF ); + delete[] pBuf; + } + if ( nSizeTIFF ) + { + sal_uInt8* pBuf = new sal_uInt8[ nSizeTIFF ]; + rStrm.Seek( nOrigPos + nPosTIFF ); + rStrm.Read( pBuf, nSizeTIFF ); + aReplacement.Write( pBuf, nSizeTIFF ); + delete[] pBuf; + } + rMtf.AddAction( (MetaAction*)( new MetaCommentAction( aComment, 0, (const BYTE*)aReplacement.GetData(), aReplacement.Tell() ) ) ); + } + else + rMtf.AddAction( (MetaAction*)( new MetaCommentAction( aComment, 0, NULL, 0 ) ) ); +} + +//there is no preview -> make a red box +void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, + long nWidth, long nHeight, Graphic &rGraphic) +{ + GDIMetaFile aMtf; + VirtualDevice aVDev; + Font aFont; + + aVDev.EnableOutput( FALSE ); + aMtf.Record( &aVDev ); + aVDev.SetLineColor( Color( COL_RED ) ); + aVDev.SetFillColor(); + + aFont.SetColor( COL_LIGHTRED ); +// aFont.SetSize( Size( 0, 32 ) ); + + aVDev.Push( PUSH_FONT ); + aVDev.SetFont( aFont ); + + Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) ); + aVDev.DrawRect( aRect ); + + String aString; + int nLen; + BYTE* pDest = ImplSearchEntry( pBuf, (BYTE*)"%%Title:", nBytesRead - 32, 8 ); + if ( pDest ) + { + pDest += 8; + if ( *pDest == ' ' ) + pDest++; + nLen = ImplGetLen( pDest, 32 ); + BYTE aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0; + if ( strcmp( (const char*)pDest, "none" ) != 0 ) + { + aString.AppendAscii( " Title:" ); + aString.AppendAscii( (char*)pDest ); + aString.AppendAscii( "\n" ); + } + pDest[ nLen ] = aOldValue; + } + pDest = ImplSearchEntry( pBuf, (BYTE*)"%%Creator:", nBytesRead - 32, 10 ); + if ( pDest ) + { + pDest += 10; + if ( *pDest == ' ' ) + pDest++; + nLen = ImplGetLen( pDest, 32 ); + BYTE aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0; + aString.AppendAscii( " Creator:" ); + aString.AppendAscii( (char*)pDest ); + aString.AppendAscii( "\n" ); + pDest[ nLen ] = aOldValue; + } + pDest = ImplSearchEntry( pBuf, (BYTE*)"%%CreationDate:", nBytesRead - 32, 15 ); + if ( pDest ) + { + pDest += 15; + if ( *pDest == ' ' ) + pDest++; + nLen = ImplGetLen( pDest, 32 ); + BYTE aOldValue(pDest[ nLen ]); pDest[ nLen ] = 0; + if ( strcmp( (const char*)pDest, "none" ) != 0 ) + { + aString.AppendAscii( " CreationDate:" ); + aString.AppendAscii( (char*)pDest ); + aString.AppendAscii( "\n" ); + } + pDest[ nLen ] = aOldValue; + } + pDest = ImplSearchEntry( pBuf, (BYTE*)"%%LanguageLevel:", nBytesRead - 4, 16 ); + if ( pDest ) + { + pDest += 16; + int nCount = 4; + long nNumber = ImplGetNumber( &pDest, nCount ); + if ( nCount && ( (UINT32)nNumber < 10 ) ) + { + aString.AppendAscii( " LanguageLevel:" ); + aString.Append( UniString::CreateFromInt32( nNumber ) ); + } + } + aVDev.DrawText( aRect, aString, TEXT_DRAW_CLIP | TEXT_DRAW_MULTILINE ); + aVDev.Pop(); + aMtf.Stop(); + aMtf.WindStart(); + aMtf.SetPrefMapMode( MAP_POINT ); + aMtf.SetPrefSize( Size( nWidth, nHeight ) ); + rGraphic = aMtf; +} + + +//================== GraphicImport - die exportierte Funktion ================ + +#ifdef WNT +extern "C" BOOL _cdecl GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL) +#else +extern "C" BOOL GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL) +#endif +{ + if ( rStream.GetError() ) + return FALSE; + + Graphic aGraphic; + sal_Bool bRetValue = sal_False; + sal_Bool bHasPreview = sal_False; + sal_Bool bGraphicLinkCreated = sal_False; + sal_uInt32 nSignature, nPSStreamPos, nPSSize; + sal_uInt32 nSizeWMF = 0; + sal_uInt32 nPosWMF = 0; + sal_uInt32 nSizeTIFF = 0; + sal_uInt32 nPosTIFF = 0; + sal_uInt32 nOrigPos = nPSStreamPos = rStream.Tell(); + sal_uInt16 nOldFormat = rStream.GetNumberFormatInt(); + rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + rStream >> nSignature; + if ( nSignature == 0xc6d3d0c5 ) + { + rStream >> nPSStreamPos >> nPSSize >> nPosWMF >> nSizeWMF; + + // first we try to get the metafile grafix + + if ( nSizeWMF ) + { + if ( nPosWMF != 0 ) + { + rStream.Seek( nOrigPos + nPosWMF ); + if ( GraphicConverter::Import( rStream, aGraphic, CVT_WMF ) == ERRCODE_NONE ) + bHasPreview = bRetValue = TRUE; + } + } + else + { + rStream >> nPosTIFF >> nSizeTIFF; + + // else we have to get the tiff grafix + + if ( nPosTIFF && nSizeTIFF ) + { + rStream.Seek( nOrigPos + nPosTIFF ); + if ( GraphicConverter::Import( rStream, aGraphic, CVT_TIF ) == ERRCODE_NONE ) + { + MakeAsMeta(aGraphic); + rStream.Seek( nOrigPos + nPosTIFF ); + bHasPreview = bRetValue = TRUE; + } + } + } + } + else + { + nPSStreamPos = nOrigPos; // no preview available _>so we must get the size manually + nPSSize = rStream.Seek( STREAM_SEEK_TO_END ) - nOrigPos; + } + sal_uInt8* pHeader = new sal_uInt8[ 22 ]; + rStream.Seek( nPSStreamPos ); + rStream.Read( pHeader, 22 ); // check PostScript header + if ( ImplSearchEntry( pHeader, (BYTE*)"%!PS-Adobe", 10, 10 ) && + ImplSearchEntry( &pHeader[ 15 ], (BYTE*)"EPS", 3, 3 ) ) + { + rStream.Seek( nPSStreamPos ); + sal_uInt8* pBuf = new sal_uInt8[ nPSSize ]; + if ( pBuf ) + { + sal_uInt32 nBufStartPos = rStream.Tell(); + sal_uInt32 nBytesRead = rStream.Read( pBuf, nPSSize ); + if ( nBytesRead == nPSSize ) + { + int nSecurityCount = 32; + if ( !bHasPreview ) // if there is no tiff/wmf preview, we will parse for an preview in the eps prolog + { + BYTE* pDest = ImplSearchEntry( pBuf, (BYTE*)"%%BeginPreview:", nBytesRead - 32, 15 ); + if ( pDest ) + { + pDest += 15; + long nWidth = ImplGetNumber( &pDest, nSecurityCount ); + long nHeight = ImplGetNumber( &pDest, nSecurityCount ); + long nBitDepth = ImplGetNumber( &pDest, nSecurityCount ); + long nScanLines = ImplGetNumber( &pDest, nSecurityCount ); + pDest = ImplSearchEntry( pDest, (BYTE*)"%", 16, 1 ); // go to the first Scanline + if ( nSecurityCount && pDest && nWidth && nHeight && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines ) + { + rStream.Seek( nBufStartPos + ( pDest - pBuf ) ); + + Bitmap aBitmap( Size( nWidth, nHeight ), 1 ); + BitmapWriteAccess* pAcc = aBitmap.AcquireWriteAccess(); + if ( pAcc ) + { + int nBitsLeft; + BOOL bIsValid = TRUE; + BYTE nDat = 0; + char nByte; + for ( long y = 0; bIsValid && ( y < nHeight ); y++ ) + { + nBitsLeft = 0; + for ( long x = 0; x < nWidth; x++ ) + { + if ( --nBitsLeft < 0 ) + { + while ( bIsValid && ( nBitsLeft != 7 ) ) + { + rStream >> nByte; + switch ( nByte ) + { + case 0x0a : + if ( --nScanLines < 0 ) + bIsValid = FALSE; + case 0x09 : + case 0x0d : + case 0x20 : + case 0x25 : + break; + default: + { + if ( nByte >= '0' ) + { + if ( nByte > '9' ) + { + nByte &=~0x20; // case none sensitive for hexadezimal values + nByte -= ( 'A' - 10 ); + if ( nByte > 15 ) + bIsValid = FALSE; + } + else + nByte -= '0'; + nBitsLeft += 4; + nDat <<= 4; + nDat |= ( nByte ^ 0xf ); // in epsi a zero bit represents white color + } + else + bIsValid = FALSE; + } + break; + } + } + } + if ( nBitDepth == 1 ) + pAcc->SetPixel( y, x, sal::static_int_cast< BYTE >(( nDat >> nBitsLeft ) & 1) ); + else + { + pAcc->SetPixel( y, x, ( nDat ) ? 1 : 0 ); // nBitDepth == 8 + nBitsLeft = 0; + } + } + } + if ( bIsValid ) + { + VirtualDevice aVDev; + GDIMetaFile aMtf; + Size aSize; + aVDev.EnableOutput( FALSE ); + aMtf.Record( &aVDev ); + aSize = aBitmap.GetPrefSize(); + if( !aSize.Width() || !aSize.Height() ) + aSize = Application::GetDefaultDevice()->PixelToLogic( aBitmap.GetSizePixel(), MAP_100TH_MM ); + else + aSize = Application::GetDefaultDevice()->LogicToLogic( aSize, aBitmap.GetPrefMapMode(), MAP_100TH_MM ); + aVDev.DrawBitmap( Point(), aSize, aBitmap ); + aMtf.Stop(); + aMtf.WindStart(); + aMtf.SetPrefMapMode( MAP_100TH_MM ); + aMtf.SetPrefSize( aSize ); + aGraphic = aMtf; + bHasPreview = bRetValue = TRUE; + } + aBitmap.ReleaseAccess( pAcc ); + } + } + } + } + + BYTE* pDest = ImplSearchEntry( pBuf, (BYTE*)"%%BoundingBox:", nBytesRead, 14 ); + if ( pDest ) + { + nSecurityCount = 100; + long nNumb[4]; + nNumb[0] = nNumb[1] = nNumb[2] = nNumb[3] = 0; + pDest += 14; + for ( int i = 0; ( i < 4 ) && nSecurityCount; i++ ) + { + nNumb[ i ] = ImplGetNumber( &pDest, nSecurityCount ); + } + if ( nSecurityCount) + { + bGraphicLinkCreated = sal_True; + GfxLink aGfxLink( pBuf, nPSSize, GFX_LINK_TYPE_EPS_BUFFER, TRUE ) ; + GDIMetaFile aMtf; + + long nWidth = nNumb[2] - nNumb[0] + 1; + long nHeight = nNumb[3] - nNumb[1] + 1; + + // if there is no preview -> try with gs to make one + if( !bHasPreview ) + { + bHasPreview = RenderAsEMF(pBuf, nBytesRead, aGraphic); + if (!bHasPreview) + bHasPreview = RenderAsPNG(pBuf, nBytesRead, aGraphic); + } + + // if there is no preview -> make a red box + if( !bHasPreview ) + { + MakePreview(pBuf, nBytesRead, nWidth, nHeight, + aGraphic); + } + + aMtf.AddAction( (MetaAction*)( new MetaEPSAction( Point(), Size( nWidth, nHeight ), + aGfxLink, aGraphic.GetGDIMetaFile() ) ) ); + CreateMtfReplacementAction( aMtf, rStream, nOrigPos, nPSSize, nPosWMF, nSizeWMF, nPosTIFF, nSizeTIFF ); + aMtf.WindStart(); + aMtf.SetPrefMapMode( MAP_POINT ); + aMtf.SetPrefSize( Size( nWidth, nHeight ) ); + rGraphic = aMtf; + bRetValue = sal_True; + } + } + } + } + if ( !bGraphicLinkCreated ) + delete[] pBuf; + } + delete[] pHeader; + rStream.SetNumberFormatInt(nOldFormat); + rStream.Seek( nOrigPos ); + return ( bRetValue ); +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/ieps/makefile.mk b/filter/source/graphicfilter/ieps/makefile.mk new file mode 100644 index 000000000000..7d8fdb6e5337 --- /dev/null +++ b/filter/source/graphicfilter/ieps/makefile.mk @@ -0,0 +1,66 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=ieps +DEPTARGET=vieps + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/ieps.obj + +# ========================================================================== + +SHL1TARGET= ips$(DLLPOSTFIX) +SHL1IMPLIB= ieps +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/ieps.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/ieps.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/ios2met/exports.map b/filter/source/graphicfilter/ios2met/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/ios2met/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx new file mode 100644 index 000000000000..6cab0cdc4e18 --- /dev/null +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -0,0 +1,2784 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include + +#include + +// MT: NOOLDSV, someone should change the code... +enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT }; + + +//============================== defines =================================== + +#define OOODEBUG(str,Num) //InfoBox(NULL,String(str)+String(" ")+String(Num)).Execute(); + +// -----------------------------Feld-Typen------------------------------- + +#define BegDocumnMagic 0xA8A8 /* Begin Document */ +#define EndDocumnMagic 0xA8A9 /* End Document */ + +#define BegResGrpMagic 0xC6A8 /* Begin Resource Group */ +#define EndResGrpMagic 0xC6A9 /* End Resource Group */ + +#define BegColAtrMagic 0x77A8 /* Begin Color Attribute Table */ +#define EndColAtrMagic 0x77A9 /* End Color Attribute Table */ +#define BlkColAtrMagic 0x77B0 /* Color Attribute Table */ +#define MapColAtrMagic 0x77AB /* Map Color Attribute Table */ + +#define BegImgObjMagic 0xFBA8 /* Begin Image Object */ +#define EndImgObjMagic 0xFBA9 /* End Image Object */ +#define DscImgObjMagic 0xFBA6 /* Image Data Descriptor */ +#define DatImgObjMagic 0xFBEE /* Image Picture Data */ + +#define BegObEnv1Magic 0xC7A8 /* Begin Object Environment Group */ +#define EndObEnv1Magic 0xC7A9 /* End Object Environment Group */ + +#define BegGrfObjMagic 0xBBA8 /* Begin Graphics Object */ +#define EndGrfObjMagic 0xBBA9 /* End Graphics Object */ +#define DscGrfObjMagic 0xBBA6 /* Graphics Data Descritor */ +#define DatGrfObjMagic 0xBBEE /* Graphics Data */ + +#define MapCodFntMagic 0x8AAB /* Map Coded Font */ +#define MapDatResMagic 0xC3AB /* Map Data Resource */ + +// -----------------------------Order-Typen------------------------------- + +#define GOrdGivArc 0xC6 /* 1 Arc at given position */ +#define GOrdCurArc 0x86 /* 1 Arc at current position */ +#define GOrdGivBzr 0xE5 /* 1 Beziercurve at given position */ +#define GOrdCurBzr 0xA5 /* 1 Beziercurve at current position */ +#define GOrdGivBox 0xC0 /* 1 Box at given position */ +#define GOrdCurBox 0x80 /* 1 Box at current position */ +#define GOrdGivFil 0xC5 /* 1 Fillet at given position */ +#define GOrdCurFil 0x85 /* 1 Fillet at current position */ +#define GOrdGivCrc 0xC7 /* 1 Full arc (circle) at given position */ +#define GOrdCurCrc 0x87 /* 1 Full arc (circle) at current position */ +#define GOrdGivLin 0xC1 /* 1 Line at given position */ +#define GOrdCurLin 0x81 /* 1 Line at current position */ +#define GOrdGivMrk 0xC2 /* 1 Marker at given position */ +#define GOrdCurMrk 0x82 /* 1 Marker at current position */ +#define GOrdGivArP 0xE3 /* 1 Partial arc at given position */ +#define GOrdCurArP 0xA3 /* 1 Partial arc at current position */ +#define GOrdGivRLn 0xE1 /* 1 Relative line at given position */ +#define GOrdCurRLn 0xA1 /* 1 Relative line at current position */ +#define GOrdGivSFl 0xE4 /* 1 Sharp fillet at given position */ +#define GOrdCurSFl 0xA4 /* 1 Sharp fillet at current position */ + +#define GOrdGivStM 0xF1 /* 1 Character string move at given position */ +#define GOrdCurStM 0xB1 /* 1 Character string move at current position */ +#define GOrdGivStr 0xC3 /* 1 Character string at given position */ +#define GOrdCurStr 0x83 /* 1 Character string at current position */ +#define GOrdGivStx 0xFEF0 /* 2 Character string extended at given position */ +#define GOrdCurStx 0xFEB0 /* 2 Character string extended at current position */ + +#define GOrdGivImg 0xD1 /* 1 Begin Image at given position */ +#define GOrdCurImg 0x91 /* 1 Begin Image at current position */ +#define GOrdImgDat 0x92 /* 1 Image data */ +#define GOrdEndImg 0x93 /* 1 End Image */ +#define GOrdBegAra 0x68 /* 0 1 Begin area */ +#define GOrdEndAra 0x60 /* 1 End area */ +#define GOrdBegElm 0xD2 /* 1 Begin element */ +#define GOrdEndElm 0x49 /* 0 1 End element */ + +#define GOrdBegPth 0xD0 /* 1 Begin path */ +#define GOrdEndPth 0x7F /* 0 1 End path */ +#define GOrdFilPth 0xD7 /* 1 Fill path */ +#define GOrdModPth 0xD8 /* 1 Modify path */ +#define GOrdOutPth 0xD4 /* 1 Outline path */ +#define GOrdSClPth 0xB4 /* 1 Set clip path */ + +#define GOrdNopNop 0x00 /* 0 0 No operation */ +#define GOrdRemark 0x01 /* 1 Comment */ +#define GOrdSegLab 0xD3 /* 1 Label */ +#define GOrdBitBlt 0xD6 /* 1 Bitblt */ +#define GOrdCalSeg 0x07 /* 1 Call Segment */ +#define GOrdSSgBnd 0x32 /* 1 Set segment boundary */ +#define GOrdSegChr 0x04 /* 1 Segment characteristics */ +#define GOrdCloFig 0x7D /* 0 1 Close Figure */ +#define GOrdEndSym 0xFF /* 0 0 End of symbol definition */ +#define GOrdEndPlg 0x3E /* 0 1 End prolog */ +#define GOrdEscape 0xD5 /* 1 Escape */ +#define GOrdExtEsc 0xFED5 /* 2 Extended Escape */ +#define GOrdPolygn 0xF3 /* 2 Polygons */ + +#define GOrdStkPop 0x3F /* 0 1 Pop */ + +#define GOrdSIvAtr 0x14 /* 1 Set individual attribute */ +#define GOrdPIvAtr 0x54 /* 1 Push and set individual attribute */ +#define GOrdSColor 0x0A /* 0 1 Set color */ +#define GOrdPColor 0x4A /* 0 1 Push and set color */ +#define GOrdSIxCol 0xA6 /* 1 Set indexed color */ +#define GOrdPIxCol 0xE6 /* 1 Push and set indexed color */ +#define GOrdSXtCol 0x26 /* 1 Set extended color */ +#define GOrdPXtCol 0x66 /* 1 Push and set extended color */ +#define GOrdSBgCol 0x25 /* 1 Set background color */ +#define GOrdPBgCol 0x65 /* 1 Push and set background color */ +#define GOrdSBxCol 0xA7 /* 1 Set background indexed color */ +#define GOrdPBxCol 0xE7 /* 1 Push and set background indexed color */ +#define GOrdSMixMd 0x0C /* 0 1 Set mix */ +#define GOrdPMixMd 0x4C /* 0 1 Push and set mix */ +#define GOrdSBgMix 0x0D /* 0 1 Set background mix */ +#define GOrdPBgMix 0x4D /* 0 1 Push and set background mix */ + +#define GOrdSPtSet 0x08 /* 0 1 Set pattern set */ +#define GOrdPPtSet 0x48 /* 0 1 Push and set pattern set */ +#define GOrdSPtSym 0x28 /* 0 1 Set pattern symbol */ +#define GOrdPPtSym 0x09 /* 0 1 Push and set pattern symbol */ +#define GOrdSPtRef 0xA0 /* 1 Set model pattern reference */ +#define GOrdPPtRef 0xE0 /* 1 Push and set pattern reference point */ + +#define GOrdSLnEnd 0x1A /* 0 1 Set line end */ +#define GOrdPLnEnd 0x5A /* 0 1 Push and set line end */ +#define GOrdSLnJoi 0x1B /* 0 1 Set line join */ +#define GOrdPLnJoi 0x5B /* 0 1 Push and set line join */ +#define GOrdSLnTyp 0x18 /* 0 1 Set line type */ +#define GOrdPLnTyp 0x58 /* 0 1 Push and set line type */ +#define GOrdSLnWdt 0x19 /* 0 1 Set line width */ +#define GOrdPLnWdt 0x59 /* 0 1 Push and set line width */ +#define GOrdSFrLWd 0x11 /* 1 Set fractional line width */ +#define GOrdPFrLWd 0x51 /* 1 Push and set fractional line width */ +#define GOrdSStLWd 0x15 /* 1 Set stroke line width */ +#define GOrdPStLWd 0x55 /* 1 Push and set stroke line width */ + +#define GOrdSChDir 0x3A /* 0 1 Set character direction */ +#define GOrdPChDir 0x7A /* 0 1 Push and set character direction */ +#define GOrdSChPrc 0x39 /* 0 1 Set character precision */ +#define GOrdPChPrc 0x79 /* 0 1 Push and set character precision */ +#define GOrdSChSet 0x38 /* 0 1 Set character set */ +#define GOrdPChSet 0x78 /* 0 1 Push and set character set */ +#define GOrdSChAng 0x34 /* 1 Set character angle */ +#define GOrdPChAng 0x74 /* 1 Push and set character angle */ +#define GOrdSChBrx 0x05 /* 1 Set character break extra */ +#define GOrdPChBrx 0x45 /* 1 Push and set character break extra */ +#define GOrdSChCel 0x33 /* 1 Set character cell */ +#define GOrdPChCel 0x03 /* 1 Push and set character cell */ +#define GOrdSChXtr 0x17 /* 1 Set character extra */ +#define GOrdPChXtr 0x57 /* 1 Push and set character extra */ +#define GOrdSChShr 0x35 /* 1 Set character shear */ +#define GOrdPChShr 0x75 /* 1 Push and set character shear */ +#define GOrdSTxAlg 0x36 /* 0 2 Set text allingment */ +#define GOrdPTxAlg 0x76 /* 0 2 Push and set text allingment */ + +#define GOrdSMkPrc 0x3B /* 0 1 Set marker precision */ +#define GOrdPMkPrc 0x7B /* 0 1 Push and set marker precision */ +#define GOrdSMkSet 0x3C /* 0 1 Set marker set */ +#define GOrdPMkSet 0x7C /* 0 1 Push and set marker set */ +#define GOrdSMkSym 0x29 /* 0 1 Set marker symbol */ +#define GOrdPMkSym 0x69 /* 0 1 Push and set marker symbol */ +#define GOrdSMkCel 0x37 /* 1 Set marker cell */ +#define GOrdPMkCel 0x77 /* 1 Push and set marker cell */ + +#define GOrdSArcPa 0x22 /* 1 Set arc parameters */ +#define GOrdPArcPa 0x62 /* 1 Push and set arc parameters */ + +#define GOrdSCrPos 0x21 /* 1 Set current position */ +#define GOrdPCrPos 0x61 /* 1 Push and set current position */ + +#define GOrdSMdTrn 0x24 /* 1 Set model transform */ +#define GOrdPMdTrn 0x64 /* 1 Push and set model transform */ +#define GOrdSPkIdn 0x43 /* 1 Set pick identifier */ +#define GOrdPPkIdn 0x23 /* 1 Push and set pick identifier */ +#define GOrdSVwTrn 0x31 /* 1 Set viewing transform */ +#define GOrdSVwWin 0x27 /* 1 Set viewing window */ +#define GOrdPVwWin 0x67 /* 1 Push and set viewing window */ + +//============================ OS2METReader ================================== + +struct OSPalette { + OSPalette * pSucc; + sal_uInt32 * p0RGB; // Darf auch NULL sein! + USHORT nSize; +}; + +struct OSArea { + OSArea * pSucc; + BYTE nFlags; + PolyPolygon aPPoly; + BOOL bClosed; + Color aCol; + Color aBgCol; + RasterOp eMix; + RasterOp eBgMix; + BOOL bFill; + OSArea(){} ~OSArea(){} +}; + +struct OSPath +{ + OSPath* pSucc; + sal_uInt32 nID; + PolyPolygon aPPoly; + BOOL bClosed; + BOOL bStroke; + + OSPath(){} + ~OSPath(){} +}; + +struct OSFont { + OSFont * pSucc; + ULONG nID; + Font aFont; + OSFont(){} ~OSFont(){} +}; + +struct OSBitmap { + OSBitmap * pSucc; + ULONG nID; + Bitmap aBitmap; + + // Waehrend des Lesens der Bitmap benoetigt: + SvStream * pBMP; // Zeiger auf temporaere Windows-BMP-Datei oder NULL + sal_uInt32 nWidth, nHeight; + USHORT nBitsPerPixel; + ULONG nMapPos; + OSBitmap(){} ~OSBitmap(){} +}; + +struct OSAttr { + OSAttr * pSucc; + USHORT nPushOrder; + BYTE nIvAttrA, nIvAttrP; // Spezialvariablen fuer den Order "GOrdPIvAtr" + + Color aLinCol; + Color aLinBgCol; + RasterOp eLinMix; + RasterOp eLinBgMix; + Color aChrCol; + Color aChrBgCol; + RasterOp eChrMix; + RasterOp eChrBgMix; + Color aMrkCol; + Color aMrkBgCol; + RasterOp eMrkMix; + RasterOp eMrkBgMix; + Color aPatCol; + Color aPatBgCol; + RasterOp ePatMix; + RasterOp ePatBgMix; + Color aImgCol; + Color aImgBgCol; + RasterOp eImgMix; + RasterOp eImgBgMix; + long nArcP, nArcQ, nArcR, nArcS; + short nChrAng; +// long nChrBreakExtra; + Size aChrCellSize; +// BYTE nChrDir; +// long nChrExtra; +// BYTE nChrPrec; + ULONG nChrSet; +// Size aChrShear; + Point aCurPos; +// long nFracLinWidth; +// BYTE nLinEnd; +// BYTE nLinJoin; + PenStyle eLinStyle; + USHORT nLinWidth; + Size aMrkCellSize; + BYTE nMrkPrec; + BYTE nMrkSet; + BYTE nMrkSymbol; +// //... aModTransform; +// Point aPatRef; +// BYTE nPatSet; + BOOL bFill; +// ULONG nPickId; +// //... aSegBound; + USHORT nStrLinWidth; +// BYTE nTxtAlignHor,nTxtAlignVer; +// //... aViewTransform; +// //... aViewWindow; + OSAttr(){} ~OSAttr(){} +}; + +class OS2METReader { + +private: + + long ErrorCode; + + SvStream * pOS2MET; // Die einzulesende OS2MET-Datei + VirtualDevice * pVirDev; // Hier werden die Drawing-Methoden aufgerufen. + // Dabei findet ein Recording in das GDIMetaFile + // statt. + ULONG nOrigPos; // Anfaengliche Position in pOS2MET + UINT16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pOS2MET + Rectangle aBoundingRect; // Boundingrectangle wie in Datei angegeben + Rectangle aCalcBndRect; // selbst ermitteltes Boundingrectangle + MapMode aGlobMapMode; // Aufloesung des Bildes + BOOL bCoord32; + + OSPalette * pPaletteStack; + + LineInfo aLineInfo; + + OSArea * pAreaStack; // Areas, die in Arbeit sind + + OSPath * pPathStack; // Paths, die in Arbeit sind + OSPath * pPathList; // Vollendete Paths + + OSFont * pFontList; + + OSBitmap * pBitmapList; + + OSAttr aDefAttr; + OSAttr aAttr; + OSAttr * pAttrStack; + + SvStream * pOrdFile; + + BOOL Callback(USHORT nPercent); + + void AddPointsToPath(const Polygon & rPoly); + void AddPointsToArea(const Polygon & rPoly); + void CloseFigure(); + void PushAttr(USHORT nPushOrder); + void PopAttr(); + + void ChangeBrush( const Color& rPatColor, const Color& rBGColor, BOOL bFill ); + void SetPen( const Color& rColor, USHORT nStrLinWidth = 0, PenStyle ePenStyle = PEN_SOLID ); + void SetRasterOp(RasterOp eROP); + + void SetPalette0RGB(USHORT nIndex, ULONG nCol); + sal_uInt32 GetPalette0RGB(sal_uInt32 nIndex); + // Holt Farbe aus der Palette, oder, wenn nicht vorhanden, + // interpretiert nIndex als direkten RGB-Wert. + Color GetPaletteColor(sal_uInt32 nIndex); + + + BOOL IsLineInfo(); + void DrawPolyLine( const Polygon& rPolygon ); + void DrawPolygon( const Polygon& rPolygon ); + void DrawPolyPolygon( const PolyPolygon& rPolygon ); + USHORT ReadBigEndianWord(); + ULONG ReadBigEndian3BytesLong(); + ULONG ReadLittleEndian3BytesLong(); + long ReadCoord(BOOL b32); + Point ReadPoint( const BOOL bAdjustBoundRect = TRUE ); + RasterOp OS2MixToRasterOp(BYTE nMix); + void ReadLine(BOOL bGivenPos, USHORT nOrderLen); + void ReadRelLine(BOOL bGivenPos, USHORT nOrderLen); + void ReadBox(BOOL bGivenPos); + void ReadBitBlt(); + void ReadChrStr(BOOL bGivenPos, BOOL bMove, BOOL bExtra, USHORT nOrderLen); + void ReadArc(BOOL bGivenPos); + void ReadFullArc(BOOL bGivenPos, USHORT nOrderSize); + void ReadPartialArc(BOOL bGivenPos, USHORT nOrderSize); + void ReadPolygons(); + void ReadBezier(BOOL bGivenPos, USHORT nOrderLen); + void ReadFillet(BOOL bGivenPos, USHORT nOrderLen); + void ReadFilletSharp(BOOL bGivenPos, USHORT nOrderLen); + void ReadMarker(BOOL bGivenPos, USHORT nOrderLen); + void ReadOrder(USHORT nOrderID, USHORT nOrderLen); + void ReadDsc(USHORT nDscID, USHORT nDscLen); + void ReadImageData(USHORT nDataID, USHORT nDataLen); + void ReadFont(USHORT nFieldSize); + void ReadField(USHORT nFieldType, USHORT nFieldSize); + +public: + + OS2METReader(); + ~OS2METReader(); + + void ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaFile ); + // Liesst aus dem Stream eine OS2MET-Datei und fuellt das GDIMetaFile + +}; + +//=================== Methoden von OS2METReader ============================== + +BOOL OS2METReader::Callback(USHORT /*nPercent*/) +{ +/* + if (pCallback!=NULL) { + if (((*pCallback)(pCallerData,nPercent))==TRUE) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + return TRUE; + } + } +*/ + return FALSE; +} + +OS2METReader::OS2METReader() +{ +} + +OS2METReader::~OS2METReader() +{ +} + +BOOL OS2METReader::IsLineInfo() +{ + return ( ! ( aLineInfo.IsDefault() || ( aLineInfo.GetStyle() == LINE_NONE ) || ( pVirDev->GetLineColor() == COL_TRANSPARENT ) ) ); +} + +void OS2METReader::DrawPolyLine( const Polygon& rPolygon ) +{ + if ( aLineInfo.GetStyle() == LINE_DASH || ( aLineInfo.GetWidth() > 1 ) ) + pVirDev->DrawPolyLine( rPolygon, aLineInfo ); + else + pVirDev->DrawPolyLine( rPolygon ); +} + +void OS2METReader::DrawPolygon( const Polygon& rPolygon ) +{ + if ( IsLineInfo() ) + { + pVirDev->Push( PUSH_LINECOLOR ); + pVirDev->SetLineColor( COL_TRANSPARENT ); + pVirDev->DrawPolygon( rPolygon ); + pVirDev->Pop(); + pVirDev->DrawPolyLine( rPolygon, aLineInfo ); + } + else + pVirDev->DrawPolygon( rPolygon ); +} + +void OS2METReader::DrawPolyPolygon( const PolyPolygon& rPolyPolygon ) +{ + if ( IsLineInfo() ) + { + pVirDev->Push( PUSH_LINECOLOR ); + pVirDev->SetLineColor( COL_TRANSPARENT ); + pVirDev->DrawPolyPolygon( rPolyPolygon ); + pVirDev->Pop(); + for ( USHORT i = 0; i < rPolyPolygon.Count(); i++ ) + pVirDev->DrawPolyLine( rPolyPolygon.GetObject( i ), aLineInfo ); + } + else + pVirDev->DrawPolyPolygon( rPolyPolygon ); +} + +void OS2METReader::AddPointsToArea(const Polygon & rPoly) +{ + USHORT nOldSize, nNewSize,i; + + if (pAreaStack==NULL || rPoly.GetSize()==0) return; + PolyPolygon * pPP=&(pAreaStack->aPPoly); + if (pPP->Count()==0 || pAreaStack->bClosed==TRUE) pPP->Insert(rPoly); + else { + Polygon aLastPoly(pPP->GetObject(pPP->Count()-1)); + nOldSize=aLastPoly.GetSize(); + if (aLastPoly.GetPoint(nOldSize-1)==rPoly.GetPoint(0)) nOldSize--; + nNewSize=nOldSize+rPoly.GetSize(); + aLastPoly.SetSize(nNewSize); + for (i=nOldSize; iReplace(aLastPoly,pPP->Count()-1); + } + pAreaStack->bClosed=FALSE; +} + +void OS2METReader::AddPointsToPath(const Polygon & rPoly) +{ + USHORT nOldSize, nNewSize,i; + + if (pPathStack==NULL || rPoly.GetSize()==0) return; + PolyPolygon * pPP=&(pPathStack->aPPoly); + if (pPP->Count()==0 /*|| pPathStack->bClosed==TRUE*/) pPP->Insert(rPoly); + else { + Polygon aLastPoly(pPP->GetObject(pPP->Count()-1)); + nOldSize=aLastPoly.GetSize(); + if (aLastPoly.GetPoint(nOldSize-1)!=rPoly.GetPoint(0)) pPP->Insert(rPoly); + else { + nOldSize--; + nNewSize=nOldSize+rPoly.GetSize(); + aLastPoly.SetSize(nNewSize); + for (i=nOldSize; iReplace(aLastPoly,pPP->Count()-1); + } + } + pPathStack->bClosed=FALSE; +} + +void OS2METReader::CloseFigure() +{ + if (pAreaStack!=NULL) pAreaStack->bClosed=TRUE; + else if (pPathStack!=NULL) pPathStack->bClosed=TRUE; +} + +void OS2METReader::PushAttr(USHORT nPushOrder) +{ + OSAttr * p; + p=new OSAttr; + *p=aAttr; + p->pSucc=pAttrStack; pAttrStack=p; + p->nPushOrder=nPushOrder; +} + +void OS2METReader::PopAttr() +{ + OSAttr * p=pAttrStack; + + if (p==NULL) return; + switch (p->nPushOrder) { + + case GOrdPIvAtr: + switch (p->nIvAttrA) { + case 1: switch (p->nIvAttrP) { + case 1: aAttr.aLinCol=p->aLinCol; break; + case 2: aAttr.aChrCol=p->aChrCol; break; + case 3: aAttr.aMrkCol=p->aMrkCol; break; + case 4: aAttr.aPatCol=p->aPatCol; break; + case 5: aAttr.aImgCol=p->aImgCol; break; + } break; + case 2: switch (p->nIvAttrP) { + case 1: aAttr.aLinBgCol=p->aLinBgCol; break; + case 2: aAttr.aChrBgCol=p->aChrBgCol; break; + case 3: aAttr.aMrkBgCol=p->aMrkBgCol; break; + case 4: aAttr.aPatBgCol=p->aPatBgCol; break; + case 5: aAttr.aImgBgCol=p->aImgBgCol; break; + } break; + case 3: switch (p->nIvAttrP) { + case 1: aAttr.eLinMix=p->eLinMix; break; + case 2: aAttr.eChrMix=p->eChrMix; break; + case 3: aAttr.eMrkMix=p->eMrkMix; break; + case 4: aAttr.ePatMix=p->ePatMix; break; + case 5: aAttr.eImgMix=p->eImgMix; break; + } break; + case 4: switch (p->nIvAttrP) { + case 1: aAttr.eLinBgMix=p->eLinBgMix; break; + case 2: aAttr.eChrBgMix=p->eChrBgMix; break; + case 3: aAttr.eMrkBgMix=p->eMrkBgMix; break; + case 4: aAttr.ePatBgMix=p->ePatBgMix; break; + case 5: aAttr.eImgBgMix=p->eImgBgMix; break; + } break; + } + break; + + case GOrdPLnTyp: aAttr.eLinStyle=p->eLinStyle; break; + + case GOrdPLnWdt: aAttr.nLinWidth=p->nLinWidth; break; + + case GOrdPStLWd: aAttr.nStrLinWidth=p->nStrLinWidth; break; + + case GOrdPChSet: aAttr.nChrSet=p->nChrSet; break; + + case GOrdPChAng: aAttr.nChrAng=p->nChrAng; break; + + case GOrdPMixMd: + aAttr.eLinMix=p->eLinMix; + aAttr.eChrMix=p->eChrMix; + aAttr.eMrkMix=p->eMrkMix; + aAttr.ePatMix=p->ePatMix; + aAttr.eImgMix=p->eImgMix; + break; + + case GOrdPBgMix: + aAttr.eLinBgMix=p->eLinBgMix; + aAttr.eChrBgMix=p->eChrBgMix; + aAttr.eMrkBgMix=p->eMrkBgMix; + aAttr.ePatBgMix=p->ePatBgMix; + aAttr.eImgBgMix=p->eImgBgMix; + break; + + case GOrdPPtSym: aAttr.bFill = p->bFill; break; + + case GOrdPColor: + case GOrdPIxCol: + case GOrdPXtCol: + aAttr.aLinCol=p->aLinCol; + aAttr.aChrCol=p->aChrCol; + aAttr.aMrkCol=p->aMrkCol; + aAttr.aPatCol=p->aPatCol; + aAttr.aImgCol=p->aImgCol; + break; + + case GOrdPBgCol: + case GOrdPBxCol: + aAttr.aLinBgCol=p->aLinBgCol; + aAttr.aChrBgCol=p->aChrBgCol; + aAttr.aMrkBgCol=p->aMrkBgCol; + aAttr.aPatBgCol=p->aPatBgCol; + aAttr.aImgBgCol=p->aImgBgCol; + break; + + case GOrdPMkPrc: aAttr.nMrkPrec=aDefAttr.nMrkPrec; break; + + case GOrdPMkSet: aAttr.nMrkSet=aDefAttr.nMrkSet; break; + + case GOrdPMkSym: aAttr.nMrkSymbol=aDefAttr.nMrkSymbol; break; + + case GOrdPMkCel: aAttr.aMrkCellSize=aDefAttr.aMrkCellSize; break; + + case GOrdPArcPa: + aAttr.nArcP=p->nArcP; aAttr.nArcQ=p->nArcQ; + aAttr.nArcR=p->nArcR; aAttr.nArcS=p->nArcS; + break; + + case GOrdPCrPos: + aAttr.aCurPos=p->aCurPos; + break; + } + pAttrStack=p->pSucc; + delete p; +} + +void OS2METReader::ChangeBrush(const Color& rPatColor, const Color& /*rBGColor*/, BOOL bFill ) +{ + Color aColor; + + if( bFill ) + aColor = rPatColor; + else + aColor = Color( COL_TRANSPARENT ); + + if( pVirDev->GetFillColor() != aColor ) + pVirDev->SetFillColor( aColor ); +} + +void OS2METReader::SetPen( const Color& rColor, USHORT nLineWidth, PenStyle ePenStyle ) +{ + LineStyle eLineStyle( LINE_SOLID ); + + if ( pVirDev->GetLineColor() != rColor ) + pVirDev->SetLineColor( rColor ); + aLineInfo.SetWidth( nLineWidth ); + + USHORT nDotCount = 0; + USHORT nDashCount = 0; + switch ( ePenStyle ) + { + case PEN_NULL : + eLineStyle = LINE_NONE; + break; + case PEN_DASHDOT : + nDashCount++; + case PEN_DOT : + nDotCount++; + nDashCount--; + case PEN_DASH : + nDashCount++; + aLineInfo.SetDotCount( nDotCount ); + aLineInfo.SetDashCount( nDashCount ); + aLineInfo.SetDistance( nLineWidth ); + aLineInfo.SetDotLen( nLineWidth ); + aLineInfo.SetDashLen( nLineWidth << 2 ); + eLineStyle = LINE_DASH; + break; + case PEN_SOLID: + break; // -Wall not handled... + } + aLineInfo.SetStyle( eLineStyle ); +} + +void OS2METReader::SetRasterOp(RasterOp eROP) +{ + if (pVirDev->GetRasterOp()!=eROP) pVirDev->SetRasterOp(eROP); +} + + +void OS2METReader::SetPalette0RGB(USHORT nIndex, ULONG nCol) +{ + if (pPaletteStack==NULL) { + pPaletteStack=new OSPalette; + pPaletteStack->pSucc=NULL; + pPaletteStack->p0RGB=NULL; + pPaletteStack->nSize=0; + } + if (pPaletteStack->p0RGB==NULL || nIndex>=pPaletteStack->nSize) { + sal_uInt32 * pOld0RGB=pPaletteStack->p0RGB; + USHORT i,nOldSize=pPaletteStack->nSize; + if (pOld0RGB==NULL) nOldSize=0; + pPaletteStack->nSize=2*(nIndex+1); + if (pPaletteStack->nSize<256) pPaletteStack->nSize=256; + pPaletteStack->p0RGB = new sal_uInt32[pPaletteStack->nSize]; + for (i=0; inSize; i++) { + if (ip0RGB[i]=pOld0RGB[i]; + else if (i==0) pPaletteStack->p0RGB[i]=0x00ffffff; + else pPaletteStack->p0RGB[i]=0; + } + if (pOld0RGB!=NULL) delete[] pOld0RGB; + } + pPaletteStack->p0RGB[nIndex]=nCol; +} + +sal_uInt32 OS2METReader::GetPalette0RGB(sal_uInt32 nIndex) +{ + if (pPaletteStack!=NULL && pPaletteStack->p0RGB!=NULL && + pPaletteStack->nSize>nIndex) nIndex=pPaletteStack->p0RGB[nIndex]; + return nIndex; +} + +Color OS2METReader::GetPaletteColor(sal_uInt32 nIndex) +{ + nIndex=GetPalette0RGB(nIndex); + return Color(sal::static_int_cast< UINT8 >((nIndex>>16)&0xff), + sal::static_int_cast< UINT8 >((nIndex>>8)&0xff), + sal::static_int_cast< UINT8 >(nIndex&0xff)); +} + + +USHORT OS2METReader::ReadBigEndianWord() +{ + BYTE nLo,nHi; + *pOS2MET >> nHi >> nLo; + return (((USHORT)nHi)<<8)|(((USHORT)nLo)&0x00ff); +} + +ULONG OS2METReader::ReadBigEndian3BytesLong() +{ + USHORT nLo; + BYTE nHi; + *pOS2MET >> nHi; + nLo=ReadBigEndianWord(); + return ((((ULONG)nHi)<<16)&0x00ff0000)|((ULONG)nLo); +} + +ULONG OS2METReader::ReadLittleEndian3BytesLong() +{ + BYTE nHi,nMed,nLo; + + *pOS2MET >> nLo >> nMed >> nHi; + return ((((ULONG)nHi)&0xff)<<16)|((((ULONG)nMed)&0xff)<<8)|(((ULONG)nLo)&0xff); +} + +long OS2METReader::ReadCoord(BOOL b32) +{ + long l; + short s; + + if (b32) *pOS2MET >> l; + else { *pOS2MET >> s; l=(long)s; } + return l; +} + +Point OS2METReader::ReadPoint( const BOOL bAdjustBoundRect ) +{ + long x,y; + + x=ReadCoord(bCoord32); + y=ReadCoord(bCoord32); + x=x-aBoundingRect.Left(); + y=aBoundingRect.Bottom()-y; + + if ( bAdjustBoundRect ) + aCalcBndRect.Union(Rectangle(x,y,x+1,y+1)); + + return Point(x,y); +} + +RasterOp OS2METReader::OS2MixToRasterOp(BYTE nMix) +{ + switch (nMix) { + case 0x0c: return ROP_INVERT; + case 0x04: return ROP_XOR; + case 0x0b: return ROP_XOR; + default: return ROP_OVERPAINT; + } +} + +void OS2METReader::ReadLine(BOOL bGivenPos, USHORT nOrderLen) +{ + USHORT i,nPolySize; + + if (bCoord32) nPolySize=nOrderLen/8; else nPolySize=nOrderLen/4; + if (!bGivenPos) nPolySize++; + if (nPolySize==0) return; + Polygon aPolygon(nPolySize); + for (i=0; i> nunsignedbyte; aP0.X()+=(INT8)nunsignedbyte; + *pOS2MET >> nunsignedbyte; aP0.Y()+=(INT8)nunsignedbyte; +#else + INT8 nsignedbyte; + *pOS2MET >> nsignedbyte; aP0.X()+=(long)nsignedbyte; + *pOS2MET >> nsignedbyte; aP0.Y()-=(long)nsignedbyte; +#endif + aCalcBndRect.Union(Rectangle(aP0,Size(1,1))); + aPolygon.SetPoint(aP0,i); + } + aAttr.aCurPos=aPolygon.GetPoint(nPolySize-1); + if (pAreaStack!=NULL) AddPointsToArea(aPolygon); + else if (pPathStack!=NULL) AddPointsToPath(aPolygon); + else + { + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + SetRasterOp(aAttr.eLinMix); + DrawPolyLine( aPolygon ); + } +} + +void OS2METReader::ReadBox(BOOL bGivenPos) +{ + BYTE nFlags; + Point P0; + long nHRound,nVRound; + + *pOS2MET >> nFlags; + pOS2MET->SeekRel(1); + + if ( bGivenPos ) + P0 = ReadPoint(); + else + P0 = aAttr.aCurPos; + + aAttr.aCurPos=ReadPoint(); + nHRound=ReadCoord(bCoord32); + nVRound=ReadCoord(bCoord32); + + Rectangle aBoxRect( P0, aAttr.aCurPos ); + + if ( pAreaStack ) + AddPointsToArea( Polygon( aBoxRect ) ); + else if ( pPathStack ) + AddPointsToPath( Polygon( aBoxRect ) ); + else + { + if ( nFlags & 0x20 ) + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + else + SetPen( COL_TRANSPARENT ); + + if ( nFlags & 0x40 ) + { + ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + SetRasterOp(aAttr.ePatMix); + } + else + { + ChangeBrush( Color( COL_TRANSPARENT ), Color( COL_TRANSPARENT ), FALSE ); + SetRasterOp(aAttr.eLinMix); + } + + if ( IsLineInfo() ) + { + Polygon aPolygon( aBoxRect, nHRound, nVRound ); + if ( nFlags & 0x40 ) + { + pVirDev->Push( PUSH_LINECOLOR ); + pVirDev->SetLineColor( COL_TRANSPARENT ); + pVirDev->DrawRect( aBoxRect, nHRound, nVRound ); + pVirDev->Pop(); + } + pVirDev->DrawPolyLine( aPolygon, aLineInfo ); + } + else + pVirDev->DrawRect( aBoxRect, nHRound, nVRound ); + } +} + +void OS2METReader::ReadBitBlt() +{ + Point aP1,aP2; + Size aSize; + sal_uInt32 nID; + OSBitmap * pB; + long nt; + + pOS2MET->SeekRel(4); + *pOS2MET >> nID; + pOS2MET->SeekRel(4); + aP1=ReadPoint(); aP2=ReadPoint(); + if (aP1.X() > aP2.X()) { nt=aP1.X(); aP1.X()=aP2.X(); aP2.X()=nt; } + if (aP1.Y() > aP2.Y()) { nt=aP1.Y(); aP1.Y()=aP2.Y(); aP2.Y()=nt; } + aSize=Size(aP2.X()-aP1.X(),aP2.Y()-aP1.Y()); + + pB=pBitmapList; + while (pB!=NULL && pB->nID!=nID) pB=pB->pSucc; + if (pB!=NULL) { + SetRasterOp(aAttr.ePatMix); + pVirDev->DrawBitmap(aP1,aSize,pB->aBitmap); + } +} + +void OS2METReader::ReadChrStr(BOOL bGivenPos, BOOL bMove, BOOL bExtra, USHORT nOrderLen) +{ + Point aP0; + USHORT i, nLen; + char * pChr; + OSFont * pF; + Font aFont; + Size aSize; + + pF = pFontList; + while (pF!=NULL && pF->nID!=aAttr.nChrSet) pF=pF->pSucc; + if (pF!=NULL) + aFont = pF->aFont; + aFont.SetColor(aAttr.aChrCol); + aFont.SetSize(Size(0,aAttr.aChrCellSize.Height())); + if ( aAttr.nChrAng != 0 ) + aFont.SetOrientation(aAttr.nChrAng); + + if (bGivenPos) + aP0 = ReadPoint(); + else + aP0 = aAttr.aCurPos; + if (bExtra) + { + pOS2MET->SeekRel(2); + ReadPoint( FALSE ); + ReadPoint( FALSE ); + *pOS2MET >> nLen; + } + else + { + if ( !bGivenPos ) + nLen = nOrderLen; + else if ( bCoord32 ) + nLen = nOrderLen-8; + else + nLen = nOrderLen-4; + } + pChr = new char[nLen+1]; + for (i=0; i> pChr[i]; + pChr[nLen] = 0; + String aStr( (const sal_Char*)pChr, gsl_getSystemTextEncoding() ); + SetRasterOp(aAttr.eChrMix); + if (pVirDev->GetFont()!=aFont) + pVirDev->SetFont(aFont); + pVirDev->DrawText(aP0,aStr); + + aSize = Size( pVirDev->GetTextWidth(aStr), pVirDev->GetTextHeight() ); + if ( aAttr.nChrAng == 0 ) + { + aCalcBndRect.Union(Rectangle( Point(aP0.X(),aP0.Y()-aSize.Height()), + Size(aSize.Width(),aSize.Height()*2))); + if (bMove) + aAttr.aCurPos = Point( aP0.X() + aSize.Width(), aP0.Y()); + } + else + { + Polygon aDummyPoly(4); + + aDummyPoly.SetPoint( Point( aP0.X(), aP0.Y() ), 0); // TOP LEFT + aDummyPoly.SetPoint( Point( aP0.X(), aP0.Y() - aSize.Height() ), 1); // BOTTOM LEFT + aDummyPoly.SetPoint( Point( aP0.X() + aSize.Width(), aP0.Y() ), 2); // TOP RIGHT + aDummyPoly.SetPoint( Point( aP0.X() + aSize.Width(), aP0.Y() - aSize.Height() ), 3);// BOTTOM RIGHT + aDummyPoly.Rotate( aP0, (short)aAttr.nChrAng ); + if ( bMove ) + aAttr.aCurPos = aDummyPoly.GetPoint( 0 ); + aCalcBndRect.Union( Rectangle( aDummyPoly.GetPoint( 0 ), aDummyPoly.GetPoint( 3 ) ) ); + aCalcBndRect.Union( Rectangle( aDummyPoly.GetPoint( 1 ), aDummyPoly.GetPoint( 2 ) ) ); + } + delete[] pChr; +} + +void OS2METReader::ReadArc(BOOL bGivenPos) +{ + Point aP1, aP2, aP3; + double x1,y1,x2,y2,x3,y3,p,q,cx,cy,ncx,ncy,r,rx,ry,w1,w3; + if (bGivenPos) aP1=ReadPoint(); else aP1=aAttr.aCurPos; + aP2=ReadPoint(); aP3=ReadPoint(); + aAttr.aCurPos=aP3; + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + SetRasterOp(aAttr.eLinMix); + // OK, gegeben sind 3 Punkte der Ellipse, und das Verhaeltnis + // Breite zu Hoehe (als p zu q): + x1=aP1.X(); y1=aP1.Y(); + x2=aP2.X(); y2=aP2.Y(); + x3=aP3.X(); y3=aP3.Y(); + p=aAttr.nArcP;q=aAttr.nArcQ; + // Berechnet wird der Mittelpunkt cx,cy der Ellipse: + ncy=2*p*p*((y3-y1)*(x2-x1)-(y1-y2)*(x1-x3)); + ncx=2*q*q*(x2-x1); + if ( (ncx<0.001 && ncx>-0.001) || (ncy<0.001 && ncy>-0.001) ) { + // Berechnung nicht moeglich, Punkte liegen auf einer Linie + pVirDev->DrawLine(aP1,aP2); + pVirDev->DrawLine(aP2,aP3); + return; + } + cy=( q*q*((x3*x3-x1*x1)*(x2-x1)+(x2*x2-x1*x1)*(x1-x3)) + + p*p*((y3*y3-y1*y1)*(x2-x1)+(y2*y2-y1*y1)*(x1-x3)) ) / ncy; + cx=( q*q*(x2*x2-x1*x1)+p*p*(y2*y2-y1*y1)+cy*2*p*p*(y1-y2) ) / ncx; + // Nun brauchen wir noch den Radius in x und y Richtung: + r=sqrt(q*q*(x1-cx)*(x1-cx)+p*p*(y1-cy)*(y1-cy)); + rx=r/q; ry=r/p; + // Jetzt stellt sich "nur noch" die Frage, wie Start- und Endpunkt + // gewaehlt werden muessen, damit Punkt Nr. 2 innerhalb des + // gezeichneten Bogens liegt: + w1=fmod((atan2(x1-cx,y1-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w1<0) w1+=6.28318530718; + w3=fmod((atan2(x3-cx,y3-cy)-atan2(x2-cx,y2-cy)),6.28318530718); if (w3<0) w3+=6.28318530718; + if (w3DrawArc(Rectangle((long)(cx-rx),(long)(cy-ry), + (long)(cx+rx),(long)(cy+ry)),aP1,aP3); + } + else { + pVirDev->DrawArc(Rectangle((long)(cx-rx),(long)(cy-ry), + (long)(cx+rx),(long)(cy+ry)),aP3,aP1); + } +} + +void OS2METReader::ReadFullArc(BOOL bGivenPos, USHORT nOrderSize) +{ + Point aCenter; + long nP,nQ,nR,nS; + Rectangle aRect; + sal_uInt32 nMul; USHORT nMulS; + + if (bGivenPos) { + aCenter=ReadPoint(); + if (bCoord32) nOrderSize-=8; else nOrderSize-=4; + } + else aCenter=aAttr.aCurPos; + + nP=aAttr.nArcP; nQ=aAttr.nArcQ; nR=aAttr.nArcR; nS=aAttr.nArcS; + if (nP<0) nP=-nP; + if (nQ<0) nQ=-nQ; + if (nR<0) nR=-nR; + if (nS<0) nS=-nS; + if (nOrderSize>=4) *pOS2MET >> nMul; + else { *pOS2MET >> nMulS; nMul=((ULONG)nMulS)<<8; } + if (nMul!=0x00010000) { + nP=(nP*nMul)>>16; + nQ=(nQ*nMul)>>16; + nR=(nR*nMul)>>16; + nS=(nS*nMul)>>16; + } + + aRect=Rectangle(aCenter.X()-nP,aCenter.Y()-nQ, + aCenter.X()+nP,aCenter.Y()+nQ); + aCalcBndRect.Union(aRect); + + if (pAreaStack!=NULL) { + ChangeBrush(aAttr.aPatCol,aAttr.aPatBgCol,aAttr.bFill); + SetRasterOp(aAttr.ePatMix); + if ((pAreaStack->nFlags&0x40)!=0) + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + else + SetPen( COL_TRANSPARENT, 0, PEN_NULL ); + } + else + { + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + ChangeBrush(Color( COL_TRANSPARENT ),Color( COL_TRANSPARENT ),FALSE); + SetRasterOp(aAttr.eLinMix); + } + pVirDev->DrawEllipse(aRect); +} + +void OS2METReader::ReadPartialArc(BOOL bGivenPos, USHORT nOrderSize) +{ + Point aP0, aCenter,aPStart,aPEnd; + long nP,nQ,nR,nS,nStart, nSweep; + Rectangle aRect; + sal_uInt32 nMul; USHORT nMulS; + double fStart, fEnd; + + if (bGivenPos) { + aP0=ReadPoint(); + if (bCoord32) nOrderSize-=8; else nOrderSize-=4; + } + else aP0=aAttr.aCurPos; + aCenter=ReadPoint(); + + nP=aAttr.nArcP; nQ=aAttr.nArcQ; nR=aAttr.nArcR; nS=aAttr.nArcS; + if (nP<0) nP=-nP; + if (nQ<0) nQ=-nQ; + if (nR<0) nR=-nR; + if (nS<0) nS=-nS; + if (nOrderSize>=12) *pOS2MET >> nMul; + else { *pOS2MET >> nMulS; nMul=((ULONG)nMulS)<<8; } + if (nMul!=0x00010000) { + nP=(nP*nMul)>>16; + nQ=(nQ*nMul)>>16; + nR=(nR*nMul)>>16; + nS=(nS*nMul)>>16; + } + + *pOS2MET >> nStart >> nSweep; + fStart=((double)nStart)/65536.0/180.0*3.14159265359; + fEnd=fStart+((double)nSweep)/65536.0/180.0*3.14159265359; + aPStart=Point(aCenter.X()+(long)( cos(fStart)*nP), + aCenter.Y()+(long)(-sin(fStart)*nQ)); + aPEnd= Point(aCenter.X()+(long)( cos(fEnd)*nP), + aCenter.Y()+(long)(-sin(fEnd)*nQ)); + + aRect=Rectangle(aCenter.X()-nP,aCenter.Y()-nQ, + aCenter.X()+nP,aCenter.Y()+nQ); + aCalcBndRect.Union(aRect); + + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + SetRasterOp(aAttr.eLinMix); + + pVirDev->DrawLine(aP0,aPStart); + pVirDev->DrawArc(aRect,aPStart,aPEnd); + aAttr.aCurPos=aPEnd; +} + +void OS2METReader::ReadPolygons() +{ + sal_uInt32 i,j,nNumPolys, nNumPoints; + PolyPolygon aPolyPoly; + Polygon aPoly; + Point aPoint; + BYTE nFlags; + + *pOS2MET >> nFlags >> nNumPolys; + for (i=0; i> nNumPoints; + if (i==0) nNumPoints++; + aPoly.SetSize((short)nNumPoints); + for (j=0; j> 2; + Polygon aBezPoly( nSegments * nSegPoints ); + + USHORT nSeg, nBezPos, nStartPos; + for( nSeg = 0, nBezPos = 0, nStartPos = 0; nSeg < nSegments; nSeg++, nStartPos += 4 ) + { + const Polygon aSegPoly( aPolygon[ nStartPos ], aPolygon[ nStartPos + 1 ], + aPolygon[ nStartPos + 3 ], aPolygon[ nStartPos + 2 ], + nSegPoints ); + + for( USHORT nSegPos = 0; nSegPos < nSegPoints; ) + aBezPoly[ nBezPos++ ] = aSegPoly[ nSegPos++ ]; + } + + nNumPoints = nBezPos; + + if( nNumPoints != aBezPoly.GetSize() ) + aBezPoly.SetSize( nNumPoints ); + + aPolygon = aBezPoly; + } + + aAttr.aCurPos = aPolygon[ nNumPoints - 1 ]; + + if (pAreaStack!=NULL) + AddPointsToArea(aPolygon); + else if (pPathStack!=NULL) + AddPointsToPath(aPolygon); + else + { + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + SetRasterOp(aAttr.eLinMix); + DrawPolyLine( aPolygon ); + } +} + +void OS2METReader::ReadFillet(BOOL bGivenPos, USHORT nOrderLen) +{ + USHORT i,nNumPoints; + + if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4; + if (!bGivenPos) nNumPoints++; + if (nNumPoints==0) return; + Polygon aPolygon(nNumPoints); + for (i=0; i=5 && aAttr.nMrkSymbol<=9) + { + ChangeBrush(aAttr.aMrkCol,aAttr.aMrkCol,TRUE); + } + else + { + ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),FALSE); + } + if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4; + if (!bGivenPos) nNumPoints++; + for (i=0; iDrawLine(Point(x-4,y),Point(x+4,y)); + pVirDev->DrawLine(Point(x,y-4),Point(x,y+4)); + break; + case 3: // DIAMOND + case 7: { // SOLIDDIAMOND + Polygon aPoly(4); + aPoly.SetPoint(Point(x,y+4),0); + aPoly.SetPoint(Point(x+4,y),1); + aPoly.SetPoint(Point(x,y-4),2); + aPoly.SetPoint(Point(x-4,y),3); + pVirDev->DrawPolygon(aPoly); + break; + } + case 4: // SQARE + case 8: { // SOLIDSUARE + Polygon aPoly(4); + aPoly.SetPoint(Point(x+4,y+4),0); + aPoly.SetPoint(Point(x+4,y-4),1); + aPoly.SetPoint(Point(x-4,y-4),2); + aPoly.SetPoint(Point(x-4,y+4),3); + pVirDev->DrawPolygon(aPoly); + break; + } + case 5: { // SIXPOINTSTAR + Polygon aPoly(12); + aPoly.SetPoint(Point(x ,y-4),0); + aPoly.SetPoint(Point(x+2,y-2),1); + aPoly.SetPoint(Point(x+4,y-2),2); + aPoly.SetPoint(Point(x+2,y ),3); + aPoly.SetPoint(Point(x+4,y+2),4); + aPoly.SetPoint(Point(x+2,y+2),5); + aPoly.SetPoint(Point(x ,y+4),6); + aPoly.SetPoint(Point(x-2,y+2),7); + aPoly.SetPoint(Point(x-4,y+2),8); + aPoly.SetPoint(Point(x-2,y ),9); + aPoly.SetPoint(Point(x-4,y-2),10); + aPoly.SetPoint(Point(x-2,y-2),11); + pVirDev->DrawPolygon(aPoly); + break; + } + case 6: { // EIGHTPOINTSTAR + Polygon aPoly(16); + aPoly.SetPoint(Point(x ,y-4),0); + aPoly.SetPoint(Point(x+1,y-2),1); + aPoly.SetPoint(Point(x+3,y-3),2); + aPoly.SetPoint(Point(x+2,y-1),3); + aPoly.SetPoint(Point(x+4,y ),4); + aPoly.SetPoint(Point(x+2,y+1),5); + aPoly.SetPoint(Point(x+3,y+3),6); + aPoly.SetPoint(Point(x+1,y+2),7); + aPoly.SetPoint(Point(x ,y+4),8); + aPoly.SetPoint(Point(x-1,y+2),9); + aPoly.SetPoint(Point(x-3,y+3),10); + aPoly.SetPoint(Point(x-2,y+1),11); + aPoly.SetPoint(Point(x-4,y ),12); + aPoly.SetPoint(Point(x-2,y-1),13); + aPoly.SetPoint(Point(x-3,y-3),14); + aPoly.SetPoint(Point(x-1,y-2),15); + pVirDev->DrawPolygon(aPoly); + break; + } + case 9: // DOT + pVirDev->DrawEllipse(Rectangle(x-1,y-1,x+1,y+1)); + break; + case 10: // SMALLCIRCLE + pVirDev->DrawEllipse(Rectangle(x-2,y-2,x+2,y+2)); + break; + case 64: // BLANK + break; + default: // (=1) CROSS + pVirDev->DrawLine(Point(x-4,y-4),Point(x+4,y+4)); + pVirDev->DrawLine(Point(x-4,y+4),Point(x+4,y-4)); + break; + } + } +} + +void OS2METReader::ReadOrder(USHORT nOrderID, USHORT nOrderLen) +{ + switch (nOrderID) { + + case GOrdGivArc: ReadArc(TRUE); break; + case GOrdCurArc: ReadArc(FALSE); break; + + case GOrdGivBzr: ReadBezier(TRUE,nOrderLen); break; + case GOrdCurBzr: ReadBezier(FALSE,nOrderLen); break; + + case GOrdGivBox: ReadBox(TRUE); break; + case GOrdCurBox: ReadBox(FALSE); break; + + case GOrdGivFil: ReadFillet(TRUE,nOrderLen); break; + case GOrdCurFil: ReadFillet(FALSE,nOrderLen); break; + + case GOrdGivCrc: ReadFullArc(TRUE,nOrderLen); break; + case GOrdCurCrc: ReadFullArc(FALSE,nOrderLen); break; + + case GOrdGivLin: ReadLine(TRUE, nOrderLen); break; + case GOrdCurLin: ReadLine(FALSE, nOrderLen); break; + + case GOrdGivMrk: ReadMarker(TRUE, nOrderLen); break; + case GOrdCurMrk: ReadMarker(FALSE, nOrderLen); break; + + case GOrdGivArP: ReadPartialArc(TRUE,nOrderLen); break; + case GOrdCurArP: ReadPartialArc(FALSE,nOrderLen); break; + + case GOrdGivRLn: ReadRelLine(TRUE,nOrderLen); break; + case GOrdCurRLn: ReadRelLine(FALSE,nOrderLen); break; + + case GOrdGivSFl: ReadFilletSharp(TRUE,nOrderLen); break; + case GOrdCurSFl: ReadFilletSharp(FALSE,nOrderLen); break; + + case GOrdGivStM: ReadChrStr(TRUE , TRUE , FALSE, nOrderLen); break; + case GOrdCurStM: ReadChrStr(FALSE, TRUE , FALSE, nOrderLen); break; + case GOrdGivStr: ReadChrStr(TRUE , FALSE, FALSE, nOrderLen); break; + case GOrdCurStr: ReadChrStr(FALSE, FALSE, FALSE, nOrderLen); break; + case GOrdGivStx: ReadChrStr(TRUE , FALSE, TRUE , nOrderLen); break; + case GOrdCurStx: ReadChrStr(FALSE, FALSE, TRUE , nOrderLen); break; + + case GOrdGivImg: OOODEBUG("GOrdGivImg",0); + break; + case GOrdCurImg: OOODEBUG("GOrdCurImg",0); + break; + case GOrdImgDat: OOODEBUG("GOrdImgDat",0); + break; + case GOrdEndImg: OOODEBUG("GOrdEndImg",0); + break; + + case GOrdBegAra: { + OSArea * p=new OSArea; + p->bClosed=FALSE; + p->pSucc=pAreaStack; pAreaStack=p; + *pOS2MET >> (p->nFlags); + p->aCol=aAttr.aPatCol; + p->aBgCol=aAttr.aPatBgCol; + p->eMix=aAttr.ePatMix; + p->eBgMix=aAttr.ePatBgMix; + p->bFill=aAttr.bFill; + break; + } + case GOrdEndAra: + { + OSArea * p=pAreaStack; + if ( p ) + { + pAreaStack = p->pSucc; + if ( pPathStack ) + { + for ( USHORT i=0; iaPPoly.Count(); i++ ) + { + AddPointsToPath( p->aPPoly.GetObject( i ) ); + CloseFigure(); + } + } + else + { + if ( ( p->nFlags & 0x40 ) == 0 ) + SetPen( COL_TRANSPARENT, 0, PEN_NULL ); + else + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + + ChangeBrush(p->aCol,p->aBgCol,p->bFill); + SetRasterOp(p->eMix); + DrawPolyPolygon( p->aPPoly ); + } + delete p; + } + } + break; + + case GOrdBegElm:// OOODEBUG("GOrdBegElm",0); + break; + case GOrdEndElm:// OOODEBUG("GOrdEndElm",0); + break; + + case GOrdBegPth: { + OSPath * p=new OSPath; + p->pSucc=pPathStack; pPathStack=p; + pOS2MET->SeekRel(2); + *pOS2MET >> p->nID; + p->bClosed=FALSE; + p->bStroke=FALSE; + break; + } + case GOrdEndPth: { + OSPath * p, * pprev, * psucc; + if (pPathStack==NULL) break; + p=pPathList; pprev=NULL; + while (p!=NULL) { + psucc=p->pSucc; + if (p->nID==pPathStack->nID) { + if (pprev==NULL) pPathList=psucc; else pprev->pSucc=psucc; + delete p; + } + else pprev=p; + p=psucc; + } + p=pPathStack; + pPathStack=p->pSucc; + p->pSucc=pPathList; pPathList=p; + break; + } + case GOrdFilPth: + { + sal_uInt32 nID; + UINT16 nDummy; + OSPath* p = pPathList; + + *pOS2MET >> nDummy + >> nID; + + if ( ! ( nDummy & 0x20 ) ) // #30933# i do not know the exact meaning of this bit, + { // but if set it seems to be better not to fill this path + while( p && p->nID != nID ) + p = p->pSucc; + + if( p ) + { + if( p->bStroke ) + { + SetPen( aAttr.aPatCol, aAttr.nStrLinWidth, PEN_SOLID ); + ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),FALSE); + SetRasterOp( aAttr.ePatMix ); + if ( IsLineInfo() ) + { + for ( USHORT i = 0; i < p->aPPoly.Count(); i++ ) + pVirDev->DrawPolyLine( p->aPPoly.GetObject( i ), aLineInfo ); + } + else + pVirDev->DrawPolyPolygon( p->aPPoly ); + } + else + { + SetPen( COL_TRANSPARENT, 0, PEN_NULL ); + ChangeBrush( aAttr.aPatCol, aAttr.aPatBgCol, aAttr.bFill ); + SetRasterOp( aAttr.ePatMix ); + pVirDev->DrawPolyPolygon( p->aPPoly ); + } + } + } + } + break; + + case GOrdModPth: + { + OSPath* p = pPathList; + + while( p && p->nID != 1 ) + p = p->pSucc; + + if( p ) + p->bStroke = TRUE; + } + break; + + case GOrdOutPth: + { + sal_uInt32 nID; + USHORT i,nC; + OSPath* p=pPathList; + pOS2MET->SeekRel(2); + *pOS2MET >> nID; + while (p!=NULL && p->nID!=nID) + p=p->pSucc; + + if( p!=NULL ) + { + SetPen( aAttr.aLinCol, aAttr.nStrLinWidth, aAttr.eLinStyle ); + SetRasterOp(aAttr.eLinMix); + ChangeBrush(Color(COL_TRANSPARENT),Color(COL_TRANSPARENT),FALSE); + nC=p->aPPoly.Count(); + for (i=0; ibClosed==TRUE) + DrawPolygon( p->aPPoly.GetObject( i ) ); + else + DrawPolyLine( p->aPPoly.GetObject( i ) ); + } + } + break; + } + case GOrdSClPth: { OOODEBUG("GOrdSClPth",0); + sal_uInt32 nID; + OSPath * p=pPathList; + pOS2MET->SeekRel(2); + *pOS2MET >> nID; + if (nID==0) p=NULL; + while (p!=NULL && p->nID!=nID) p=p->pSucc; + if (p!=NULL) pVirDev->SetClipRegion(Region(p->aPPoly)); + else pVirDev->SetClipRegion(); + break; + } + case GOrdNopNop: + break; + case GOrdRemark: //OOODEBUG("GOrdRemark",0); + break; + case GOrdSegLab: OOODEBUG("GOrdSegLab",0); + break; + + case GOrdBitBlt: ReadBitBlt(); break; + + case GOrdCalSeg: OOODEBUG("GOrdCalSeg",0); + break; + case GOrdSSgBnd: OOODEBUG("GOrdSSgBnd",0); + break; + case GOrdSegChr: OOODEBUG("GOrdSegChr",0); + break; + case GOrdCloFig: + CloseFigure(); + break; + case GOrdEndSym: OOODEBUG("GOrdEndSym",0); + break; + case GOrdEndPlg: OOODEBUG("GOrdEndPlg",0); + break; + case GOrdEscape: OOODEBUG("GOrdEscape",0); + break; + case GOrdExtEsc: OOODEBUG("GOrdExtEsc",0); + break; + + case GOrdPolygn: ReadPolygons(); break; + + case GOrdStkPop: PopAttr(); break; + + case GOrdPIvAtr: PushAttr(nOrderID); + case GOrdSIvAtr: { + BYTE nA, nP, nFlags, nMix; + ULONG nVal; + Color aCol; + RasterOp eROP; + *pOS2MET >> nA >> nP >> nFlags; + if (nOrderID==GOrdPIvAtr) { + pAttrStack->nIvAttrA=nA; + pAttrStack->nIvAttrP=nP; + } + if (nA<=2) { + if ((nFlags&0x80)!=0) { + if (nA==1) switch (nP) { + case 1: aAttr.aLinCol=aDefAttr.aLinCol; break; + case 2: aAttr.aChrCol=aDefAttr.aChrCol; break; + case 3: aAttr.aMrkCol=aDefAttr.aMrkCol; break; + case 4: aAttr.aPatCol=aDefAttr.aPatCol; break; + case 5: aAttr.aImgCol=aDefAttr.aImgCol; break; + } + else switch (nP) { + case 1: aAttr.aLinBgCol=aDefAttr.aLinBgCol; break; + case 2: aAttr.aChrBgCol=aDefAttr.aChrBgCol; break; + case 3: aAttr.aMrkBgCol=aDefAttr.aMrkBgCol; break; + case 4: aAttr.aPatBgCol=aDefAttr.aPatBgCol; break; + case 5: aAttr.aImgBgCol=aDefAttr.aImgBgCol; break; + } + } + else { + nVal=ReadLittleEndian3BytesLong(); + if ((nFlags&0x40)!=0 && nVal==1) aCol=Color(COL_BLACK); + else if ((nFlags&0x40)!=0 && nVal==2) aCol=Color(COL_WHITE); + else if ((nFlags&0x40)!=0 && nVal==4) aCol=Color(COL_WHITE); + else if ((nFlags&0x40)!=0 && nVal==5) aCol=Color(COL_BLACK); + else aCol=GetPaletteColor(nVal); + if (nA==1) switch (nP) { + case 1: aAttr.aLinCol=aCol; break; + case 2: aAttr.aChrCol=aCol; break; + case 3: aAttr.aMrkCol=aCol; break; + case 4: aAttr.aPatCol=aCol; break; + case 5: aAttr.aImgCol=aCol; break; + } + else switch (nP) { + case 1: aAttr.aLinBgCol=aCol; break; + case 2: aAttr.aChrBgCol=aCol; break; + case 3: aAttr.aMrkBgCol=aCol; break; + case 4: aAttr.aPatBgCol=aCol; break; + case 5: aAttr.aImgBgCol=aCol; break; + } + } + } + else { + *pOS2MET >> nMix; + if (nMix==0) { + if (nA==1) switch (nP) { + case 1: aAttr.eLinMix=aDefAttr.eLinMix; break; + case 2: aAttr.eChrMix=aDefAttr.eChrMix; break; + case 3: aAttr.eMrkMix=aDefAttr.eMrkMix; break; + case 4: aAttr.ePatMix=aDefAttr.ePatMix; break; + case 5: aAttr.eImgMix=aDefAttr.eImgMix; break; + } + else switch (nP) { + case 1: aAttr.eLinBgMix=aDefAttr.eLinBgMix; break; + case 2: aAttr.eChrBgMix=aDefAttr.eChrBgMix; break; + case 3: aAttr.eMrkBgMix=aDefAttr.eMrkBgMix; break; + case 4: aAttr.ePatBgMix=aDefAttr.ePatBgMix; break; + case 5: aAttr.eImgBgMix=aDefAttr.eImgBgMix; break; + } + } + else { + eROP=OS2MixToRasterOp(nMix); + if (nA==1) switch (nP) { + case 1: aAttr.eLinMix=eROP; break; + case 2: aAttr.eChrMix=eROP; break; + case 3: aAttr.eMrkMix=eROP; break; + case 4: aAttr.ePatMix=eROP; break; + case 5: aAttr.eImgMix=eROP; break; + } + else switch (nP) { + case 1: aAttr.eLinBgMix=eROP; break; + case 2: aAttr.eChrBgMix=eROP; break; + case 3: aAttr.eMrkBgMix=eROP; break; + case 4: aAttr.ePatBgMix=eROP; break; + case 5: aAttr.eImgBgMix=eROP; break; + } + } + } + break; + } + case GOrdPIxCol: PushAttr(nOrderID); + case GOrdSIxCol: { + BYTE nFlags; + ULONG nVal; + Color aCol; + *pOS2MET >> nFlags; + if ((nFlags&0x80)!=0) { + aAttr.aLinCol=aDefAttr.aLinCol; + aAttr.aChrCol=aDefAttr.aChrCol; + aAttr.aMrkCol=aDefAttr.aMrkCol; + aAttr.aPatCol=aDefAttr.aPatCol; + aAttr.aImgCol=aDefAttr.aImgCol; + } + else { + nVal=ReadLittleEndian3BytesLong(); + if ((nFlags&0x40)!=0 && nVal==1) aCol=Color(COL_BLACK); + else if ((nFlags&0x40)!=0 && nVal==2) aCol=Color(COL_WHITE); + else if ((nFlags&0x40)!=0 && nVal==4) aCol=Color(COL_WHITE); + else if ((nFlags&0x40)!=0 && nVal==5) aCol=Color(COL_BLACK); + else aCol=GetPaletteColor(nVal); + aAttr.aLinCol = aAttr.aChrCol = aAttr.aMrkCol = aAttr.aPatCol = + aAttr.aImgCol = aCol; + } + break; + } + + case GOrdPColor: + case GOrdPXtCol: PushAttr(nOrderID); + case GOrdSColor: + case GOrdSXtCol: { + BYTE nbyte; + USHORT nVal; + Color aCol; + if (nOrderID==GOrdPColor || nOrderID==GOrdSColor) { + *pOS2MET >> nbyte; nVal=((USHORT)nbyte)|0xff00; + } + else *pOS2MET >> nVal; + if (nVal==0x0000 || nVal==0xff00) { + aAttr.aLinCol=aDefAttr.aLinCol; + aAttr.aChrCol=aDefAttr.aChrCol; + aAttr.aMrkCol=aDefAttr.aMrkCol; + aAttr.aPatCol=aDefAttr.aPatCol; + aAttr.aImgCol=aDefAttr.aImgCol; + } + else { + if (nVal==0x0007) aCol=Color(COL_WHITE); + else if (nVal==0x0008) aCol=Color(COL_BLACK); + else if (nVal==0xff08) aCol=GetPaletteColor(1); + else aCol=GetPaletteColor(((ULONG)nVal) & 0x000000ff); + aAttr.aLinCol = aAttr.aChrCol = aAttr.aMrkCol = aAttr.aPatCol = + aAttr.aImgCol = aCol; + } + break; + } + + case GOrdPBgCol: PushAttr(nOrderID); + case GOrdSBgCol: { + USHORT nVal; + Color aCol; + *pOS2MET >> nVal; + if (nVal==0x0000 || nVal==0xff00) { + aAttr.aLinBgCol=aDefAttr.aLinBgCol; + aAttr.aChrBgCol=aDefAttr.aChrBgCol; + aAttr.aMrkBgCol=aDefAttr.aMrkBgCol; + aAttr.aPatBgCol=aDefAttr.aPatBgCol; + aAttr.aImgBgCol=aDefAttr.aImgBgCol; + } + else { + if (nVal==0x0007) aCol=Color(COL_WHITE); + else if (nVal==0x0008) aCol=Color(COL_BLACK); + else if (nVal==0xff08) aCol=GetPaletteColor(0); + else aCol=GetPaletteColor(((ULONG)nVal) & 0x000000ff); + aAttr.aLinBgCol = aAttr.aChrBgCol = aAttr.aMrkBgCol = + aAttr.aPatBgCol = aAttr.aImgBgCol = aCol; + } + break; + } + case GOrdPBxCol: PushAttr(nOrderID); + case GOrdSBxCol: { + BYTE nFlags; + ULONG nVal; + Color aCol; + *pOS2MET >> nFlags; + if ((nFlags&0x80)!=0) { + aAttr.aLinBgCol=aDefAttr.aLinBgCol; + aAttr.aChrBgCol=aDefAttr.aChrBgCol; + aAttr.aMrkBgCol=aDefAttr.aMrkBgCol; + aAttr.aPatBgCol=aDefAttr.aPatBgCol; + aAttr.aImgBgCol=aDefAttr.aImgBgCol; + } + else { + nVal=ReadLittleEndian3BytesLong(); + if ((nFlags&0x40)!=0 && nVal==1) aCol=Color(COL_BLACK); + else if ((nFlags&0x40)!=0 && nVal==2) aCol=Color(COL_WHITE); + else if ((nFlags&0x40)!=0 && nVal==4) aCol=Color(COL_WHITE); + else if ((nFlags&0x40)!=0 && nVal==5) aCol=Color(COL_BLACK); + else aCol=GetPaletteColor(nVal); + aAttr.aLinBgCol = aAttr.aChrBgCol = aAttr.aMrkBgCol = + aAttr.aPatBgCol = aAttr.aImgBgCol = aCol; + } + break; + } + + case GOrdPMixMd: PushAttr(nOrderID); + case GOrdSMixMd: { + BYTE nMix; + *pOS2MET >> nMix; + if (nMix==0) { + aAttr.eLinMix=aDefAttr.eLinMix; + aAttr.eChrMix=aDefAttr.eChrMix; + aAttr.eMrkMix=aDefAttr.eMrkMix; + aAttr.ePatMix=aDefAttr.ePatMix; + aAttr.eImgMix=aDefAttr.eImgMix; + } + else { + aAttr.eLinMix = aAttr.eChrMix = aAttr.eMrkMix = + aAttr.ePatMix = aAttr.eImgMix = OS2MixToRasterOp(nMix); + } + break; + } + case GOrdPBgMix: PushAttr(nOrderID); + case GOrdSBgMix: { + BYTE nMix; + *pOS2MET >> nMix; + if (nMix==0) { + aAttr.eLinBgMix=aDefAttr.eLinBgMix; + aAttr.eChrBgMix=aDefAttr.eChrBgMix; + aAttr.eMrkBgMix=aDefAttr.eMrkBgMix; + aAttr.ePatBgMix=aDefAttr.ePatBgMix; + aAttr.eImgBgMix=aDefAttr.eImgBgMix; + } + else { + aAttr.eLinBgMix = aAttr.eChrBgMix = aAttr.eMrkBgMix = + aAttr.ePatBgMix = aAttr.eImgBgMix = OS2MixToRasterOp(nMix); + } + break; + } + case GOrdPPtSet: PushAttr(nOrderID); + case GOrdSPtSet: OOODEBUG("GOrdSPtSet",0); + break; + + case GOrdPPtSym: PushAttr(nOrderID); + case GOrdSPtSym: { + BYTE nPatt; + *pOS2MET >> nPatt; + aAttr.bFill = ( nPatt != 0x0f ); + break; + } + + case GOrdPPtRef: PushAttr(nOrderID); + case GOrdSPtRef: OOODEBUG("GOrdSPtRef",0); + break; + + case GOrdPLnEnd: PushAttr(nOrderID); + case GOrdSLnEnd: + break; + + case GOrdPLnJoi: PushAttr(nOrderID); + case GOrdSLnJoi: + break; + + case GOrdPLnTyp: PushAttr(nOrderID); + case GOrdSLnTyp: { + BYTE nType; + *pOS2MET >> nType; + switch (nType) { + case 0: aAttr.eLinStyle=aDefAttr.eLinStyle; break; + case 1: case 4: aAttr.eLinStyle=PEN_DOT; break; + case 2: case 5: aAttr.eLinStyle=PEN_DASH; break; + case 3: case 6: aAttr.eLinStyle=PEN_DASHDOT; break; + case 8: aAttr.eLinStyle=PEN_NULL; break; + default: aAttr.eLinStyle=PEN_SOLID; + } + break; + } + case GOrdPLnWdt: PushAttr(nOrderID); + case GOrdSLnWdt: { + BYTE nbyte; + *pOS2MET >> nbyte; + if (nbyte==0) aAttr.nLinWidth=aDefAttr.nLinWidth; + else aAttr.nLinWidth=(USHORT)nbyte-1; + break; + } + case GOrdPFrLWd: PushAttr(nOrderID); + case GOrdSFrLWd: + break; + + case GOrdPStLWd: PushAttr(nOrderID); + case GOrdSStLWd : + { + BYTE nFlags; + long nWd; + + *pOS2MET >> nFlags; + if ( nFlags & 0x80 ) + aAttr.nStrLinWidth = aDefAttr.nStrLinWidth; + else + { + pOS2MET->SeekRel( 1 ); + nWd = ReadCoord( bCoord32 ); + if ( nWd < 0 ) + nWd = -nWd; + aAttr.nStrLinWidth = (USHORT)nWd; + } + break; + } + case GOrdPChDir: PushAttr(nOrderID); + case GOrdSChDir: + break; + + case GOrdPChPrc: PushAttr(nOrderID); + case GOrdSChPrc: + break; + + case GOrdPChSet: PushAttr(nOrderID); + case GOrdSChSet: { + BYTE nbyte; *pOS2MET >> nbyte; + aAttr.nChrSet=((ULONG)nbyte)&0xff; + break; + } + case GOrdPChAng: PushAttr(nOrderID); + case GOrdSChAng: { + long nX,nY; + nX=ReadCoord(bCoord32); nY=ReadCoord(bCoord32); + if (nX>=0 && nY==0) aAttr.nChrAng=0; + else { + aAttr.nChrAng=(short)(atan2((double)nY,(double)nX)/3.1415926539*1800.0); + while (aAttr.nChrAng<0) aAttr.nChrAng+=3600; + aAttr.nChrAng%=3600; + } + break; + } + case GOrdPChBrx: PushAttr(nOrderID); + case GOrdSChBrx: + break; + + case GOrdPChCel: PushAttr(nOrderID); + case GOrdSChCel: { + BYTE nbyte; + USHORT nLen=nOrderLen; + aAttr.aChrCellSize.Width()=ReadCoord(bCoord32); + aAttr.aChrCellSize.Height()=ReadCoord(bCoord32); + if (bCoord32) nLen-=8; else nLen-=4; + if (nLen>=4) { + pOS2MET->SeekRel(4); nLen-=4; + } + if (nLen>=2) { + *pOS2MET >> nbyte; + if ((nbyte&0x80)==0 && aAttr.aChrCellSize==Size(0,0)) + aAttr.aChrCellSize=aDefAttr.aChrCellSize; + } + break; + } + case GOrdPChXtr: PushAttr(nOrderID); + case GOrdSChXtr: + break; + + case GOrdPChShr: PushAttr(nOrderID); + case GOrdSChShr: + break; + + case GOrdPTxAlg: PushAttr(nOrderID); + case GOrdSTxAlg: OOODEBUG("GOrdSTxAlg",0); + break; + + case GOrdPMkPrc: PushAttr(nOrderID); + case GOrdSMkPrc: { + BYTE nbyte; + *pOS2MET >> nbyte; + if (nbyte==0) aAttr.nMrkPrec=aDefAttr.nMrkPrec; + else aAttr.nMrkPrec=nbyte; + break; + } + + case GOrdPMkSet: PushAttr(nOrderID); + case GOrdSMkSet: { + BYTE nbyte; + *pOS2MET >> nbyte; + if (nbyte==0) aAttr.nMrkSet=aDefAttr.nMrkSet; + else aAttr.nMrkSet=nbyte; + break; + } + + case GOrdPMkSym: PushAttr(nOrderID); + case GOrdSMkSym: { + BYTE nbyte; + *pOS2MET >> nbyte; + if (nbyte==0) aAttr.nMrkSymbol=aDefAttr.nMrkSymbol; + else aAttr.nMrkSymbol=nbyte; + break; + } + + case GOrdPMkCel: PushAttr(nOrderID); + case GOrdSMkCel: { + BYTE nbyte; + USHORT nLen=nOrderLen; + aAttr.aMrkCellSize.Width()=ReadCoord(bCoord32); + aAttr.aMrkCellSize.Height()=ReadCoord(bCoord32); + if (bCoord32) nLen-=8; else nLen-=4; + if (nLen>=2) { + *pOS2MET >> nbyte; + if ((nbyte&0x80)==0 && aAttr.aMrkCellSize==Size(0,0)) + aAttr.aMrkCellSize=aDefAttr.aMrkCellSize; + } + break; + } + + case GOrdPArcPa: PushAttr(nOrderID); + case GOrdSArcPa: + aAttr.nArcP=ReadCoord(bCoord32); + aAttr.nArcQ=ReadCoord(bCoord32); + aAttr.nArcR=ReadCoord(bCoord32); + aAttr.nArcS=ReadCoord(bCoord32); + break; + + case GOrdPCrPos: PushAttr(nOrderID); + case GOrdSCrPos: + aAttr.aCurPos=ReadPoint(); + break; + + case GOrdPMdTrn: PushAttr(nOrderID); + case GOrdSMdTrn: OOODEBUG("GOrdSMdTrn",0); + break; + + case GOrdPPkIdn: PushAttr(nOrderID); + case GOrdSPkIdn: OOODEBUG("GOrdSPkIdn",0); + break; + + case GOrdSVwTrn: OOODEBUG("GOrdSVwTrn",0); + break; + + case GOrdPVwWin: PushAttr(nOrderID); + case GOrdSVwWin: OOODEBUG("GOrdSVwWin",0); + break; + default: OOODEBUG("Order unbekannt:",nOrderID); + } +} + +void OS2METReader::ReadDsc(USHORT nDscID, USHORT /*nDscLen*/) +{ + switch (nDscID) { + case 0x00f7: { // 'Specify GVM Subset' + BYTE nbyte; + pOS2MET->SeekRel(6); + *pOS2MET >> nbyte; + if (nbyte==0x05) bCoord32=TRUE; + else if (nbyte==0x04) bCoord32=FALSE; + else { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=1; + } + break; + } + case 0x00f6: + { + // 'Set Picture Descriptor' + BOOL b32; + BYTE nbyte,nUnitType; + long x1,y1,x2,y2,nt,xr,yr; + + pOS2MET->SeekRel(2); + *pOS2MET >> nbyte; + + if (nbyte==0x05) + b32=TRUE; + else if(nbyte==0x04) + b32=FALSE; + else + { + b32 = FALSE; // -Wall added the case. + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=2; + } + + *pOS2MET >> nUnitType; + + xr=ReadCoord(b32); + yr=ReadCoord(b32); + + ReadCoord(b32); + + if (nUnitType==0x00 && xr>0 && yr>0) + aGlobMapMode=MapMode(MAP_INCH,Point(0,0),Fraction(10,xr),Fraction(10,yr)); + else if (nUnitType==0x01 && xr>0 && yr>0) + aGlobMapMode=MapMode(MAP_CM,Point(0,0),Fraction(10,xr),Fraction(10,yr)); + else + aGlobMapMode=MapMode(); + + x1=ReadCoord(b32); + x2=ReadCoord(b32); + y1=ReadCoord(b32); + y2=ReadCoord(b32); + + if (x1>x2) + { + nt=x1; + x1=x2; + x2=nt; + } + + if (y1>y2) + { + nt=y1; + y1=y2; + y2=nt; + } + + aBoundingRect.Left() = x1; + aBoundingRect.Right() = x2; + aBoundingRect.Top() = y1; + aBoundingRect.Bottom() = y2; + + // no output beside this bounding rect + pVirDev->IntersectClipRegion( Rectangle( Point(), aBoundingRect.GetSize() ) ); + + break; + } + case 0x0021: // 'Set Current Defaults' + break; + } +} + +void OS2METReader::ReadImageData(USHORT nDataID, USHORT nDataLen) +{ + OSBitmap * p=pBitmapList; if (p==NULL) return; // Nanu ? + + switch (nDataID) { + + case 0x0070: // Begin Segment + break; + + case 0x0091: // Begin Image Content + break; + + case 0x0094: // Image Size + pOS2MET->SeekRel(5); + p->nHeight=ReadBigEndianWord(); + p->nWidth=ReadBigEndianWord(); + break; + + case 0x0095: // Image Encoding + break; + + case 0x0096: { // Image IDE-Size + BYTE nbyte; + *pOS2MET >> nbyte; p->nBitsPerPixel=nbyte; + break; + } + + case 0x0097: // Image LUT-ID + break; + + case 0x009b: // IDE Structure + break; + + case 0xfe92: { // Image Data + // Spaetestens jetzt brauchen wir die temporaere BMP-Datei + // und darin mindestens den Header + Palette. + if (p->pBMP==NULL) { + p->pBMP=new SvMemoryStream(); + p->pBMP->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + if (p->nWidth==0 || p->nHeight==0 || p->nBitsPerPixel==0) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=3; + return; + } + // Schreibe (Windows-)BITMAPINFOHEADER: + *(p->pBMP) << ((sal_uInt32)40) << p->nWidth << p->nHeight; + *(p->pBMP) << ((USHORT)1) << p->nBitsPerPixel; + *(p->pBMP) << ((sal_uInt32)0) << ((sal_uInt32)0) << ((sal_uInt32)0) << ((sal_uInt32)0); + *(p->pBMP) << ((sal_uInt32)0) << ((sal_uInt32)0); + // Schreibe Farbtabelle: + if (p->nBitsPerPixel<=8) { + USHORT i, nColTabSize=1<<(p->nBitsPerPixel); + for (i=0; ipBMP) << GetPalette0RGB(i); + } + } + // OK, nun werden die Map-Daten ruebergeschoben. Leider haben OS2 und + // BMP eine unterschiedliche Reihenfolge von RGB bei 24-Bit. + BYTE * pBuf=new BYTE[nDataLen]; + pOS2MET->Read(pBuf,nDataLen); + if (p->nBitsPerPixel==24) { + ULONG i, j, nAlign, nBytesPerLine; + BYTE nTemp; + nBytesPerLine=(p->nWidth*3+3)&0xfffffffc; + nAlign=p->nMapPos-(p->nMapPos % nBytesPerLine); + i=0; + while (nAlign+i+2nMapPos+nDataLen) { + if (nAlign+i>=p->nMapPos) { + j=nAlign+i-p->nMapPos; + nTemp=pBuf[j]; pBuf[j]=pBuf[j+2]; pBuf[j+2]=nTemp; + } + i+=3; if (i+2>=nBytesPerLine) { + nAlign+=nBytesPerLine; + i=0; + } + } + } + p->pBMP->Write(pBuf,nDataLen); + p->nMapPos+=nDataLen; + delete[] pBuf; + break; + } + case 0x0093: // End Image Content + break; + + case 0x0071: // End Segment + break; + } +} + +void OS2METReader::ReadFont(USHORT nFieldSize) +{ + ULONG nPos, nMaxPos; + USHORT nLen; + BYTE nByte, nTripType, nTripType2; + OSFont * pF=new OSFont; + pF->pSucc=pFontList; pFontList=pF; + pF->nID=0; + pF->aFont.SetTransparent(TRUE); + pF->aFont.SetAlign(ALIGN_BASELINE); + + nPos=pOS2MET->Tell(); + nMaxPos=nPos+(ULONG)nFieldSize; + pOS2MET->SeekRel(2); nPos+=2; + while (nPosGetError()==0) { + *pOS2MET >> nByte; nLen =((USHORT)nByte) & 0x00ff; + *pOS2MET >> nTripType; + switch (nTripType) { + case 0x02: + *pOS2MET >> nTripType2; + switch (nTripType2) { + case 0x84: // Font name + break; + case 0x08: { // Font Typeface + char str[33]; + pOS2MET->SeekRel(1); + pOS2MET->Read( &str, 32 ); + str[ 32 ] = 0; + String aStr( (const sal_Char*)str, gsl_getSystemTextEncoding() ); + if ( aStr.CompareIgnoreCaseToAscii( "Helv" ) == COMPARE_EQUAL ) + aStr = String::CreateFromAscii( "Helvetica" ); + pF->aFont.SetName( aStr ); + break; + } + } + break; + case 0x24: // Icid + *pOS2MET >> nTripType2; + switch (nTripType2) { + case 0x05: //Icid + *pOS2MET >> nByte; + pF->nID=((ULONG)nByte)&0xff; + break; + } + break; + case 0x20: // Font Binary GCID + break; + case 0x1f: { // Font Attributes + FontWeight eWeight; + BYTE nbyte; + *pOS2MET >> nbyte; + switch (nbyte) { + case 1: eWeight=WEIGHT_THIN; break; + case 2: eWeight=WEIGHT_ULTRALIGHT; break; + case 3: eWeight=WEIGHT_LIGHT; break; + case 4: eWeight=WEIGHT_SEMILIGHT; break; + case 5: eWeight=WEIGHT_NORMAL; break; + case 6: eWeight=WEIGHT_SEMIBOLD; break; + case 7: eWeight=WEIGHT_BOLD; break; + case 8: eWeight=WEIGHT_ULTRABOLD; break; + case 9: eWeight=WEIGHT_BLACK; break; + default: eWeight=WEIGHT_DONTKNOW; + } + pF->aFont.SetWeight(eWeight); + break; + } + } + nPos+=nLen; pOS2MET->Seek(nPos); + } +} + +void OS2METReader::ReadField(USHORT nFieldType, USHORT nFieldSize) +{ + switch (nFieldType) { + case BegDocumnMagic: + break; + case EndDocumnMagic: + break; + case BegResGrpMagic: + break; + case EndResGrpMagic: + break; + case BegColAtrMagic: + break; + case EndColAtrMagic: + break; + case BlkColAtrMagic: { + ULONG nPos, nMaxPos; + BYTE nbyte; + ULONG nCol; + USHORT nStartIndex, nEndIndex, i, nElemLen, nBytesPerCol; + + nPos=pOS2MET->Tell(); + nMaxPos=nPos+(ULONG)nFieldSize; + pOS2MET->SeekRel(3); nPos+=3; + while (nPosGetError()==0) { + *pOS2MET >> nbyte; nElemLen=((USHORT)nbyte) & 0x00ff; + if (nElemLen>11) { + pOS2MET->SeekRel(4); + nStartIndex=ReadBigEndianWord(); + pOS2MET->SeekRel(3); + *pOS2MET >> nbyte; nBytesPerCol=((USHORT)nbyte) & 0x00ff; + nEndIndex=nStartIndex+(nElemLen-11)/nBytesPerCol; + for (i=nStartIndex; i 3) pOS2MET->SeekRel(nBytesPerCol-3); + nCol=ReadBigEndian3BytesLong(); + SetPalette0RGB(i,nCol); + } + } + else if (nElemLen<10) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=4; + } + nPos+=(ULONG)nElemLen; + pOS2MET->Seek(nPos); + } + break; + } + case MapColAtrMagic: + break; + case BegImgObjMagic: { + // neue Bitmap schonmal herstellen: (wird spaeter gefuellt) + OSBitmap * pB=new OSBitmap; + pB->pSucc=pBitmapList; pBitmapList=pB; + pB->pBMP=NULL; pB->nWidth=0; pB->nHeight=0; pB->nBitsPerPixel=0; + pB->nMapPos=0; + // ID der Bitmap ermitteln: + BYTE i,nbyte,nbyte2; + pB->nID=0; + for (i=0; i<4; i++) { + *pOS2MET >> nbyte >> nbyte2; + nbyte=((nbyte-0x30)<<4)|(nbyte2-0x30); + pB->nID=(pB->nID>>8)|(((ULONG)nbyte)<<24); + } + // neue Palette auf den Paletten-Stack bringen: (wird spaeter gefuellt) + OSPalette * pP=new OSPalette; + pP->pSucc=pPaletteStack; pPaletteStack=pP; + pP->p0RGB=NULL; pP->nSize=0; + break; + } + case EndImgObjMagic: { + // Temporaere Windows-BMP-Datei auslesen: + if (pBitmapList==NULL || pBitmapList->pBMP==NULL || + pBitmapList->pBMP->GetError()!=0) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=5; + return; + } + pBitmapList->pBMP->Seek(0); + + pBitmapList->aBitmap.Read( *( pBitmapList->pBMP ), FALSE ); + + if (pBitmapList->pBMP->GetError()!=0) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=6; + } + delete pBitmapList->pBMP; pBitmapList->pBMP=NULL; + // Palette vom Stack killen: + OSPalette * pP=pPaletteStack; + if (pP!=NULL) { + pPaletteStack=pP->pSucc; + if (pP->p0RGB!=NULL) delete[] pP->p0RGB; + delete pP; + } + break; + } + case DscImgObjMagic: + break; + case DatImgObjMagic: { + USHORT nDataID, nDataLen; + BYTE nbyte; + ULONG nPos, nMaxPos; + + nPos=pOS2MET->Tell(); + nMaxPos=nPos+(ULONG)nFieldSize; + while (nPosGetError()==0) { + *pOS2MET >> nbyte; nDataID=((USHORT)nbyte)&0x00ff; + if (nDataID==0x00fe) { + *pOS2MET >> nbyte; + nDataID=(nDataID<<8)|(((USHORT)nbyte)&0x00ff); + nDataLen=ReadBigEndianWord(); + nPos+=4; + } + else { + *pOS2MET >> nbyte; nDataLen=((USHORT)nbyte)&0x00ff; + nPos+=2; + } + ReadImageData(nDataID, nDataLen); + nPos+=(ULONG)nDataLen; + pOS2MET->Seek(nPos); + } + break; + } + + case BegObEnv1Magic: + break; + case EndObEnv1Magic: + break; + case BegGrfObjMagic: + break; + case EndGrfObjMagic: { + SvStream * pSave; + ULONG nPos, nMaxPos; + USHORT nOrderID, nOrderLen; + BYTE nbyte; + + if (pOrdFile==NULL) break; + + // in pOrdFile wurden alle "DatGrfObj"-Felder gesammelt, so + // dass die darin enthaltnen "Orders" zusammenhangend und nicht durch + // "Fields" segmentiert sind. Um sie aus dem MemoryStream auszulesen, + // ohne grosse Umstaende deswegen zu haben (frueher wurden die "Orders" + // direkt aus pOS2MET gelesen), hier ein kleiner Trick: + pSave=pOS2MET; + pOS2MET=pOrdFile; //(!) + nMaxPos=pOS2MET->Tell(); + pOS2MET->Seek(0); + + // "Segmentheader": + *pOS2MET >> nbyte; + if (nbyte==0x70) { // Header vorhanden + pOS2MET->SeekRel(15); // brauchen wir aber nicht + } + else pOS2MET->SeekRel(-1); // Kein Header, Byte zurueck + + // Schleife ueber Order: + while (pOS2MET->Tell()GetError()==0) { + *pOS2MET >> nbyte; nOrderID=((USHORT)nbyte) & 0x00ff; + if (nOrderID==0x00fe) { + *pOS2MET >> nbyte; + nOrderID=(nOrderID << 8) | (((USHORT)nbyte) & 0x00ff); + } + if (nOrderID>0x00ff || nOrderID==GOrdPolygn) { + // ooo: Laut OS2-Doku sollte die Orderlaenge nun als Big-Endian-Word + // gegeben sein (Zitat: "Highorder byte precedes loworder byte"). + // Tatsaechlich gibt es aber Dateien, die die Laenge als + // Little-Endian-Word angeben (zu mindestens fuer nOrderID==GOrdPolygn). + // Also werfen wir eine Muenze oder was ? + *pOS2MET >> nbyte; nOrderLen=(USHORT)nbyte&0x00ff; + *pOS2MET >> nbyte; if (nbyte!=0) nOrderLen=nOrderLen<<8|(((USHORT)nbyte)&0x00ff); + } + else if (nOrderID==GOrdSTxAlg || nOrderID==GOrdPTxAlg) nOrderLen=2; + else if ((nOrderID&0xff88)==0x0008) nOrderLen=1; + else if (nOrderID==0x0000 || nOrderID==0x00ff) nOrderLen=0; + else { *pOS2MET >> nbyte; nOrderLen=((USHORT)nbyte) & 0x00ff; } + nPos=pOS2MET->Tell(); + ReadOrder(nOrderID, nOrderLen); + if (nPos+nOrderLen < pOS2MET->Tell()) { + OOODEBUG("Order kuerzer als er denkt! OrderID:",nOrderID); + OOODEBUG("...und zwar bei Position (Parameteranfang):",nPos); + } + else if (nPos+nOrderLen != pOS2MET->Tell()) { + OOODEBUG(String(nOrderID)+String(" Order nicht alles gelesen! bei:"),nPos); + } + pOS2MET->Seek(nPos+nOrderLen); + } + + pOS2MET=pSave; + if (pOrdFile->GetError()) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=10; + } + delete pOrdFile; pOrdFile=NULL; + break; + } + case DscGrfObjMagic: { + ULONG nPos, nMaxPos; + USHORT nDscID, nDscLen; + BYTE nbyte; + + nMaxPos=pOS2MET->Tell()+(ULONG)nFieldSize; + while (pOS2MET->Tell()GetError()==0) { + *pOS2MET >> nbyte; nDscID =((USHORT)nbyte) & 0x00ff; + *pOS2MET >> nbyte; nDscLen=((USHORT)nbyte) & 0x00ff; + nPos=pOS2MET->Tell(); + ReadDsc(nDscID, nDscLen); + pOS2MET->Seek(nPos+nDscLen); + } + break; + } + case DatGrfObjMagic: { + if (pOrdFile==NULL) { + pOrdFile = new SvMemoryStream; + pOrdFile->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + } + BYTE * pBuf; pBuf = new BYTE[nFieldSize]; + pOS2MET->Read(pBuf,nFieldSize); + pOrdFile->Write(pBuf,nFieldSize); + delete[] pBuf; + break; + } + case MapCodFntMagic: + ReadFont(nFieldSize); + break; + + case MapDatResMagic: + break; + } +} + +void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaFile ) +{ + USHORT nFieldSize; + USHORT nFieldType; + ULONG nPos, nStartPos, nEndPos, nPercent, nLastPercent; + BYTE nMagicByte; + + ErrorCode=0; + + pOS2MET = &rStreamOS2MET; + nOrigPos = pOS2MET->Tell(); + nOrigNumberFormat = pOS2MET->GetNumberFormatInt(); + + bCoord32 = TRUE; + pPaletteStack=NULL; + pAreaStack=NULL; + pPathStack=NULL; + pPathList=NULL; + pFontList=NULL; + pBitmapList=NULL; + pAttrStack=NULL; + + aDefAttr.aLinCol =Color(COL_BLACK); + aDefAttr.aLinBgCol =Color(COL_WHITE); + aDefAttr.eLinMix =ROP_OVERPAINT; + aDefAttr.eLinBgMix =ROP_OVERPAINT; + aDefAttr.aChrCol =Color(COL_BLACK); + aDefAttr.aChrBgCol =Color(COL_WHITE); + aDefAttr.eChrMix =ROP_OVERPAINT; + aDefAttr.eChrBgMix =ROP_OVERPAINT; + aDefAttr.aMrkCol =Color(COL_BLACK); + aDefAttr.aMrkBgCol =Color(COL_WHITE); + aDefAttr.eMrkMix =ROP_OVERPAINT; + aDefAttr.eMrkBgMix =ROP_OVERPAINT; + aDefAttr.aPatCol =Color(COL_BLACK); + aDefAttr.aPatBgCol =Color(COL_WHITE); + aDefAttr.ePatMix =ROP_OVERPAINT; + aDefAttr.ePatBgMix =ROP_OVERPAINT; + aDefAttr.aImgCol =Color(COL_BLACK); + aDefAttr.aImgBgCol =Color(COL_WHITE); + aDefAttr.eImgMix =ROP_OVERPAINT; + aDefAttr.eImgBgMix =ROP_OVERPAINT; + aDefAttr.nArcP =1; + aDefAttr.nArcQ =1; + aDefAttr.nArcR =0; + aDefAttr.nArcS =0; + aDefAttr.nChrAng =0; + aDefAttr.aChrCellSize=Size(12,12); + aDefAttr.nChrSet =0; + aDefAttr.aCurPos =Point(0,0); + aDefAttr.eLinStyle =PEN_SOLID; + aDefAttr.nLinWidth =0; + aDefAttr.aMrkCellSize=Size(10,10); + aDefAttr.nMrkPrec =0x01; + aDefAttr.nMrkSet =0xff; + aDefAttr.nMrkSymbol =0x01; + aDefAttr.bFill =TRUE; + aDefAttr.nStrLinWidth=0; + + aAttr=aDefAttr; + + pOrdFile=NULL; + + pVirDev = new VirtualDevice(); + pVirDev->EnableOutput(FALSE); + rGDIMetaFile.Record(pVirDev); + + pOS2MET->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + + nStartPos=pOS2MET->Tell(); + nEndPos=pOS2MET->Seek(STREAM_SEEK_TO_END); pOS2MET->Seek(nStartPos); + Callback(0); nLastPercent=0; + + nPos=pOS2MET->Tell(); + if ( nStartPos == nEndPos ) + { + nEndPos = 100; + nStartPos = 0; + } + + for (;;) { + + nPercent=(nPos-nStartPos)*100/(nEndPos-nStartPos); + if (nLastPercent+4<=nPercent) { + if (Callback((USHORT)nPercent)==TRUE) break; + nLastPercent=nPercent; + } + + nFieldSize=ReadBigEndianWord(); + + *pOS2MET >> nMagicByte; + if (nMagicByte!=0xd3) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=7; + break; + } + *pOS2MET >> nFieldType; + + pOS2MET->SeekRel(3); + nPos+=8; nFieldSize-=8; + + if (pOS2MET->GetError()) break; + if (pOS2MET->IsEof()) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=8; + break; + } + + if (nFieldType==EndDocumnMagic) break; + + ReadField(nFieldType, nFieldSize); + + nPos+=(ULONG)nFieldSize; + if (pOS2MET->Tell()>nPos) { + pOS2MET->SetError(SVSTREAM_FILEFORMAT_ERROR); + ErrorCode=9; + break; + } + pOS2MET->Seek(nPos); + } + + rGDIMetaFile.Stop(); + delete pVirDev; + + rGDIMetaFile.SetPrefMapMode( aGlobMapMode ); + + if( aBoundingRect.GetWidth() && aBoundingRect.GetHeight() ) + rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() ); + else + { + if( aCalcBndRect.Left() || aCalcBndRect.Top() ) + rGDIMetaFile.Move( -aCalcBndRect.Left(), -aCalcBndRect.Top() ); + + rGDIMetaFile.SetPrefSize( aCalcBndRect.GetSize() ); + } + + if (pOrdFile!=NULL) delete pOrdFile; + + while (pAreaStack!=NULL) { + OSArea * p=pAreaStack; + pAreaStack=p->pSucc; + delete p; + } + + while (pPathStack!=NULL) { + OSPath * p=pPathStack; + pPathStack=p->pSucc; + delete p; + } + + while (pPathList!=NULL) { + OSPath * p=pPathList; + pPathList=p->pSucc; + delete p; + } + + while (pFontList!=NULL) { + OSFont * p=pFontList; + pFontList=p->pSucc; + delete p; + } + + while (pBitmapList!=NULL) { + OSBitmap * p=pBitmapList; + pBitmapList=p->pSucc; + if (p->pBMP!=NULL) delete p->pBMP; + delete p; + } + + while (pAttrStack!=NULL) { + OSAttr * p=pAttrStack; + pAttrStack=p->pSucc; + delete p; + } + + while (pPaletteStack!=NULL) { + OSPalette * p=pPaletteStack; + pPaletteStack=p->pSucc; + if (p->p0RGB!=NULL) delete[] p->p0RGB; + delete p; + } + + pOS2MET->SetNumberFormatInt(nOrigNumberFormat); + + if (pOS2MET->GetError()) { + OOODEBUG("Fehler Nr.:",ErrorCode); + pOS2MET->Seek(nOrigPos); + } +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + OS2METReader aOS2METReader; + GDIMetaFile aMTF; + BOOL bRet = FALSE; + + aOS2METReader.ReadOS2MET( rStream, aMTF ); + + if ( !rStream.GetError() ) + { + rGraphic=Graphic( aMTF ); + bRet = TRUE; + } + + return bRet; +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/ios2met/makefile.mk b/filter/source/graphicfilter/ios2met/makefile.mk new file mode 100644 index 000000000000..b3358eea7b4f --- /dev/null +++ b/filter/source/graphicfilter/ios2met/makefile.mk @@ -0,0 +1,68 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=ios2met +DEPTARGET=vios2met + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/ios2met.obj + +# ========================================================================== + +SHL1TARGET= ime$(DLLPOSTFIX) +SHL1IMPLIB= ios2met +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) + +SHL1LIBS= $(SLB)$/ios2met.lib # $(LB)$/rtftoken.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/ios2met.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF +# ========================================================================== + +.INCLUDE : target.mk + diff --git a/filter/source/graphicfilter/ipbm/exports.map b/filter/source/graphicfilter/ipbm/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/ipbm/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx new file mode 100644 index 000000000000..6b83fc1021c7 --- /dev/null +++ b/filter/source/graphicfilter/ipbm/ipbm.cxx @@ -0,0 +1,565 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include + +//============================ PBMReader ================================== + +class PBMReader { + +private: + + SvStream* mpPBM; // Die einzulesende PBM-Datei + + BOOL mbStatus; + BOOL mbRemark; // FALSE wenn sich stream in einem Kommentar befindet + BOOL mbRaw; // RAW/ASCII MODE + ULONG mnMode; // 0->PBM, 1->PGM, 2->PPM + Bitmap maBmp; + BitmapWriteAccess* mpAcc; + ULONG mnWidth, mnHeight; // Bildausmass in Pixeln + ULONG mnCol; + ULONG mnMaxVal; // maximaler wert in den + BOOL ImplCallback( USHORT nPercent ); + BOOL ImplReadBody(); + BOOL ImplReadHeader(); + +public: + PBMReader(); + ~PBMReader(); + BOOL ReadPBM( SvStream & rPBM, Graphic & rGraphic ); +}; + +//=================== Methoden von PBMReader ============================== + +PBMReader::PBMReader() : + mbStatus ( TRUE ), + mbRemark ( FALSE ), + mbRaw ( TRUE ), + mpAcc ( NULL ) +{ +} + +PBMReader::~PBMReader() +{ +} + +BOOL PBMReader::ImplCallback( USHORT /*nPercent*/ ) +{ +/* + if ( pCallback != NULL ) + { + if ( ( (*pCallback)( pCallerData, nPercent ) ) == TRUE ) + { + mpPBM->SetError( SVSTREAM_FILEFORMAT_ERROR ); + return TRUE; + } + } +*/ + return FALSE; +} + +BOOL PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic ) +{ + USHORT i; + + if ( rPBM.GetError() ) + return FALSE; + + mpPBM = &rPBM; + mpPBM->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + + // Kopf einlesen: + + if ( ( mbStatus = ImplReadHeader() ) == FALSE ) + return FALSE; + + if ( ( mnMaxVal == 0 ) || ( mnWidth == 0 ) || ( mnHeight == 0 ) ) + return FALSE; + + // 0->PBM, 1->PGM, 2->PPM + switch ( mnMode ) + { + case 0 : + maBmp = Bitmap( Size( mnWidth, mnHeight ), 1 ); + if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE ) + return FALSE; + mpAcc->SetPaletteEntryCount( 2 ); + mpAcc->SetPaletteColor( 0, BitmapColor( 0xff, 0xff, 0xff ) ); + mpAcc->SetPaletteColor( 1, BitmapColor( 0x00, 0x00, 0x00 ) ); + break; + + case 1 : + if ( mnMaxVal <= 1 ) + maBmp = Bitmap( Size( mnWidth, mnHeight ), 1); + else if ( mnMaxVal <= 15 ) + maBmp = Bitmap( Size( mnWidth, mnHeight ), 4); + else + maBmp = Bitmap( Size( mnWidth, mnHeight ), 8); + + if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE ) + return FALSE; + mnCol = (USHORT)mnMaxVal + 1; + if ( mnCol > 256 ) + mnCol = 256; + + mpAcc->SetPaletteEntryCount( 256 ); + for ( i = 0; i < mnCol; i++ ) + { + ULONG nCount = 255 * i / mnCol; + mpAcc->SetPaletteColor( i, BitmapColor( (BYTE)nCount, (BYTE)nCount, (BYTE)nCount ) ); + } + break; + case 2 : + maBmp = Bitmap( Size( mnWidth, mnHeight ), 24 ); + if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE ) + return FALSE; + break; + } + + // Bitmap-Daten einlesen + mbStatus = ImplReadBody(); + + if ( mpAcc ) + { + maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; + } + if ( mbStatus ) + rGraphic = maBmp; + + return mbStatus; +} + +BOOL PBMReader::ImplReadHeader() +{ + BYTE nID[ 2 ]; + BYTE nDat; + BYTE nMax, nCount = 0; + BOOL bFinished = FALSE; + + *mpPBM >> nID[ 0 ] >> nID[ 1 ]; + if ( nID[ 0 ] != 'P' ) + return FALSE; + mnMaxVal = mnWidth = mnHeight = 0; + switch ( nID[ 1 ] ) + { + case '1' : + mbRaw = FALSE; + case '4' : + mnMode = 0; + nMax = 2; // number of parameters in Header + mnMaxVal = 1; + break; + case '2' : + mbRaw = FALSE; + case '5' : + mnMode = 1; + nMax = 3; + break; + case '3' : + mbRaw = FALSE; + case '6' : + mnMode = 2; + nMax = 3; + break; + default: + return FALSE; + } + while ( bFinished == FALSE ) + { + if ( mpPBM->GetError() ) + return FALSE; + + *mpPBM >> nDat; + + if ( nDat == '#' ) + { + mbRemark = TRUE; + continue; + } + else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) ) + { + mbRemark = FALSE; + nDat = 0x20; + } + if ( mbRemark ) + continue; + + if ( ( nDat == 0x20 ) || ( nDat == 0x09 ) ) + { + if ( ( nCount == 0 ) && mnWidth ) + nCount++; + else if ( ( nCount == 1 ) && mnHeight ) + { + if ( ++nCount == nMax ) + bFinished = TRUE; + } + else if ( ( nCount == 2 ) && mnMaxVal ) + { + bFinished = TRUE; + } + continue; + } + if ( ( nDat >= '0' ) && ( nDat <= '9' ) ) + { + nDat -= '0'; + if ( nCount == 0 ) + { + mnWidth *= 10; + mnWidth += nDat; + } + else if ( nCount == 1 ) + { + mnHeight *= 10; + mnHeight += nDat; + } + else if ( nCount == 2 ) + { + mnMaxVal *= 10; + mnMaxVal += nDat; + } + } + else + return FALSE; + } + return mbStatus; +} + +BOOL PBMReader::ImplReadBody() +{ + BOOL bPara, bFinished = FALSE; + BYTE nDat = 0, nCount; + ULONG nGrey, nRGB[3]; + ULONG nWidth = 0; + ULONG nHeight = 0; + signed char nShift = 0; + + if ( mbRaw ) + { + switch ( mnMode ) + { + + // PBM + case 0 : + while ( nHeight != mnHeight ) + { + if ( mpPBM->IsEof() || mpPBM->GetError() ) + return FALSE; + + if ( --nShift < 0 ) + { + *mpPBM >> nDat; + nShift = 7; + } + mpAcc->SetPixel( nHeight, nWidth, nDat >> nShift ); + if ( ++nWidth == mnWidth ) + { + nShift = 0; + nWidth = 0; + nHeight++; + ImplCallback( (USHORT)( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent + } + } + break; + + // PGM + case 1 : + while ( nHeight != mnHeight ) + { + if ( mpPBM->IsEof() || mpPBM->GetError() ) + return FALSE; + + *mpPBM >> nDat; + mpAcc->SetPixel( nHeight, nWidth++, nDat); + + if ( nWidth == mnWidth ) + { + nWidth = 0; + nHeight++; + ImplCallback( (USHORT)( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent + } + } + break; + + // PPM + case 2 : + while ( nHeight != mnHeight ) + { + if ( mpPBM->IsEof() || mpPBM->GetError() ) + return FALSE; + + BYTE nR, nG, nB; + ULONG nRed, nGreen, nBlue; + *mpPBM >> nR >> nG >> nB; + nRed = 255 * nR / mnMaxVal; + nGreen = 255 * nG / mnMaxVal; + nBlue = 255 * nB / mnMaxVal; + mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) ); + if ( nWidth == mnWidth ) + { + nWidth = 0; + nHeight++; + ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent + } + } + break; + } + } + else switch ( mnMode ) + { + // PBM + case 0 : + while ( bFinished == FALSE ) + { + if ( mpPBM->IsEof() || mpPBM->GetError() ) + return FALSE; + + *mpPBM >> nDat; + + if ( nDat == '#' ) + { + mbRemark = TRUE; + continue; + } + else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) ) + { + mbRemark = FALSE; + continue; + } + if ( mbRemark || nDat == 0x20 || nDat == 0x09 ) + continue; + + if ( nDat == '0' || nDat == '1' ) + { + mpAcc->SetPixel( nHeight, nWidth, (BYTE)nDat-'0' ); + nWidth++; + if ( nWidth == mnWidth ) + { + nWidth = 0; + if ( ++nHeight == mnHeight ) + bFinished = TRUE; + ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent + } + } + else + return FALSE; + } + break; + + // PGM + case 1 : + + bPara = FALSE; + nCount = 0; + nGrey = 0; + + while ( bFinished == FALSE ) + { + if ( nCount ) + { + nCount--; + if ( nGrey <= mnMaxVal ) + nGrey = 255 * nGrey / mnMaxVal; + mpAcc->SetPixel( nHeight, nWidth++, (BYTE)nGrey ); + nGrey = 0; + if ( nWidth == mnWidth ) + { + nWidth = 0; + if ( ++nHeight == mnHeight ) + bFinished = TRUE; + ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent + } + continue; + } + + if ( mpPBM->IsEof() || mpPBM->GetError() ) + return FALSE; + + *mpPBM >> nDat; + + if ( nDat == '#' ) + { + mbRemark = TRUE; + if ( bPara ) + { + bPara = FALSE; + nCount++; + } + continue; + } + else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) ) + { + mbRemark = FALSE; + if ( bPara ) + { + bPara = FALSE; + nCount++; + } + continue; + } + + if ( nDat == 0x20 || nDat == 0x09 ) + { + if ( bPara ) + { + bPara = FALSE; + nCount++; + } + continue; + } + if ( nDat >= '0' && nDat <= '9' ) + { + bPara = TRUE; + nGrey *= 10; + nGrey += nDat-'0'; + continue; + } + else + return FALSE; + } + break; + + + + // PPM + case 2 : + + bPara = FALSE; + nCount = 0; + nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0; + + while ( bFinished == FALSE ) + { + if ( nCount == 3 ) + { + nCount = 0; + mpAcc->SetPixel( nHeight, nWidth++, BitmapColor( static_cast< BYTE >( ( nRGB[ 0 ] * 255 ) / mnMaxVal ), + static_cast< BYTE >( ( nRGB[ 1 ] * 255 ) / mnMaxVal ), + static_cast< BYTE >( ( nRGB[ 2 ] * 255 ) / mnMaxVal ) ) ); + nCount = 0; + nRGB[ 0 ] = nRGB[ 1 ] = nRGB[ 2 ] = 0; + if ( nWidth == mnWidth ) + { + nWidth = 0; + if ( ++nHeight == mnHeight ) + bFinished = TRUE; + ImplCallback( (USHORT) ( ( 100 * nHeight ) / mnHeight ) ); // processing output in percent + } + continue; + } + + if ( mpPBM->IsEof() || mpPBM->GetError() ) + return FALSE; + + *mpPBM >> nDat; + + if ( nDat == '#' ) + { + mbRemark = TRUE; + if ( bPara ) + { + bPara = FALSE; + nCount++; + } + continue; + } + else if ( ( nDat == 0x0d ) || ( nDat == 0x0a ) ) + { + mbRemark = FALSE; + if ( bPara ) + { + bPara = FALSE; + nCount++; + } + continue; + } + + if ( nDat == 0x20 || nDat == 0x09 ) + { + if ( bPara ) + { + bPara = FALSE; + nCount++; + } + continue; + } + if ( nDat >= '0' && nDat <= '9' ) + { + bPara = TRUE; + nRGB[ nCount ] *= 10; + nRGB[ nCount ] += nDat-'0'; + continue; + } + else + return FALSE; + } + break; + } + return mbStatus; +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + PBMReader aPBMReader; + + return aPBMReader.ReadPBM( rStream, rGraphic ); +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/ipbm/makefile.mk b/filter/source/graphicfilter/ipbm/makefile.mk new file mode 100644 index 000000000000..8f29b3a462a9 --- /dev/null +++ b/filter/source/graphicfilter/ipbm/makefile.mk @@ -0,0 +1,68 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=ipbm +DEPTARGET=vipbm + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/ipbm.obj + +# ========================================================================== + +SHL1TARGET= ipb$(DLLPOSTFIX) +SHL1IMPLIB= ipbm +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/ipbm.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/ipbm.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk + diff --git a/filter/source/graphicfilter/ipcd/exports.map b/filter/source/graphicfilter/ipcd/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/ipcd/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx new file mode 100644 index 000000000000..0d44993c252d --- /dev/null +++ b/filter/source/graphicfilter/ipcd/ipcd.cxx @@ -0,0 +1,422 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "rtl/alloc.h" +#include +#include +#include +#include +#include +#include + +//============================ PCDReader ================================== + +// Diese Aufloesungen sind in einer PCD-Datei enthalten: +enum PCDResolution { + PCDRES_BASE16, // 192 x 128 + PCDRES_BASE4, // 384 x 256 + PCDRES_BASE, // 768 x 512 + // Die folgenden sind komprimiert und koennen + // von uns NICHT gelesen werden: + PCDRES_4BASE, // 1536 x 1024 + PCDRES_16BASE // 3072 x 3072 +}; + +class PCDReader { + +private: + + BOOL bStatus; + + ULONG nLastPercent; + + SvStream* pPCD; + BitmapWriteAccess* mpAcc; + + BYTE nOrientation; // Ausrichtung des Bildes in der PCD-Datei: + // 0 - Turmspitze zeigt nach oben + // 1 - Turmspitze zeigt nach rechts + // 2 - Turmspitze zeigt nach unten + // 3 - Turmspitze zeigt nach links + + PCDResolution eResolution; // Welche Aufloesung wir haben wollen + + ULONG nWidth; // Breite des PCD-Bildes + ULONG nHeight; // Hoehe des PCD-Bildes + ULONG nImagePos; // Position des Bildes in der PCD-Datei + + // Temporare BLue-Green-Red-Bitmap + ULONG nBMPWidth; + ULONG nBMPHeight; + + void MayCallback(ULONG nPercent); + + void CheckPCDImagePacFile(); + // Prueft, ob es eine Photo-CD-Datei mit 'Image Pac' ist. + + void ReadOrientation(); + // Liest die Ausrichtung und setzt nOrientation + + void ReadImage(ULONG nMinPercent, ULONG nMaxPercent); + +public: + + PCDReader() {} + ~PCDReader() {} + + BOOL ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem* pConfigItem ); +}; + +//=================== Methoden von PCDReader ============================== + +BOOL PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigItem* pConfigItem ) +{ + Bitmap aBmp; + + bStatus = TRUE; + nLastPercent = 0; + pPCD = &rPCD; + + MayCallback( 0 ); + + // Ist es eine PCD-Datei mit Bild ? ( setzt bStatus == FALSE, wenn nicht ): + CheckPCDImagePacFile(); + + // Orientierung des Bildes einlesen: + ReadOrientation(); + + // Welche Aufloesung wollen wir ?: + eResolution = PCDRES_BASE; + if ( pConfigItem ) + { + sal_Int32 nResolution = pConfigItem->ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Resolution" ) ), 2 ); + if ( nResolution == 1 ) + eResolution = PCDRES_BASE4; + else if ( nResolution == 0 ) + eResolution = PCDRES_BASE16; + } + // Groesse und Position (Position in PCD-Datei) des Bildes bestimmen: + switch (eResolution) + { + case PCDRES_BASE16 : + nWidth = 192; + nHeight = 128; + nImagePos = 8192; + break; + + case PCDRES_BASE4 : + nWidth = 384; + nHeight = 256; + nImagePos = 47104; + break; + + case PCDRES_BASE : + nWidth = 768; + nHeight = 512; + nImagePos = 196608; + break; + + default: + bStatus = FALSE; + } + if ( bStatus ) + { + if ( ( nOrientation & 0x01 ) == 0 ) + { + nBMPWidth = nWidth; + nBMPHeight = nHeight; + } + else + { + nBMPWidth = nHeight; + nBMPHeight = nWidth; + } + aBmp = Bitmap( Size( nBMPWidth, nBMPHeight ), 24 ); + if ( ( mpAcc = aBmp.AcquireWriteAccess() ) == FALSE ) + return FALSE; + + ReadImage( 5 ,65 ); + + aBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; + rGraphic = aBmp; + } + return bStatus; +} + +// ------------------------------------------------------------------------------------------- + +void PCDReader::MayCallback(ULONG /*nPercent*/) +{ +/* + if ( nPercent >= nLastPercent + 3 ) + { + nLastPercent=nPercent; + if ( pCallback != NULL && nPercent <= 100 && bStatus == TRUE ) + { + if ( ( (*pCallback)( pCallerData, (USHORT)nPercent ) ) == TRUE ) + bStatus = FALSE; + } + } +*/ +} + +// ------------------------------------------------------------------------------------------- + +void PCDReader::CheckPCDImagePacFile() +{ + char Buf[ 8 ]; + + pPCD->Seek( 2048 ); + pPCD->Read( Buf, 7 ); + Buf[ 7 ] = 0; + if ( ByteString( Buf ).CompareTo( "PCD_IPI" ) != COMPARE_EQUAL ) + bStatus = FALSE; +} + +// ------------------------------------------------------------------------------------------- + +void PCDReader::ReadOrientation() +{ + if ( bStatus == FALSE ) + return; + pPCD->Seek( 194635 ); + *pPCD >> nOrientation; + nOrientation &= 0x03; +} + +// ------------------------------------------------------------------------------------------- + +void PCDReader::ReadImage(ULONG nMinPercent, ULONG nMaxPercent) +{ + ULONG nx,ny,nW2,nH2,nYPair,ndy,nXPair; + long nL,nCb,nCr,nRed,nGreen,nBlue; + BYTE * pt; + BYTE * pL0; // Luminanz fuer jeden Pixel der 1. Zeile des aktuellen Zeilen-Paars + BYTE * pL1; // Luminanz fuer jeden Pixel der 2. Zeile des aktuellen Zeilen-Paars + BYTE * pCb; // Blau-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars + BYTE * pCr; // Rot-Chrominanz fuer je 2x2 Pixel des aktuellen Zeilen-Paars + BYTE * pL0N, * pL1N, * pCbN, * pCrN; // wie oben, nur fuer das naechste Zeilen-Paar + + if ( bStatus == FALSE ) + return; + + nW2=nWidth>>1; + nH2=nHeight>>1; + + pL0 =(BYTE*)rtl_allocateMemory( nWidth ); + pL1 =(BYTE*)rtl_allocateMemory( nWidth ); + pCb =(BYTE*)rtl_allocateMemory( nW2+1 ); + pCr =(BYTE*)rtl_allocateMemory( nW2+1 ); + pL0N=(BYTE*)rtl_allocateMemory( nWidth ); + pL1N=(BYTE*)rtl_allocateMemory( nWidth ); + pCbN=(BYTE*)rtl_allocateMemory( nW2+1 ); + pCrN=(BYTE*)rtl_allocateMemory( nW2+1 ); + + if ( pL0 == NULL || pL1 == NULL || pCb == NULL || pCr == NULL || + pL0N == NULL || pL1N == NULL || pCbN == NULL || pCrN == NULL) + { + rtl_freeMemory((void*)pL0 ); + rtl_freeMemory((void*)pL1 ); + rtl_freeMemory((void*)pCb ); + rtl_freeMemory((void*)pCr ); + rtl_freeMemory((void*)pL0N); + rtl_freeMemory((void*)pL1N); + rtl_freeMemory((void*)pCbN); + rtl_freeMemory((void*)pCrN); + bStatus = FALSE; + return; + } + + pPCD->Seek( nImagePos ); + + // naechstes Zeilen-Paar := erstes Zeile-Paar: + pPCD->Read( pL0N, nWidth ); + pPCD->Read( pL1N, nWidth ); + pPCD->Read( pCbN, nW2 ); + pPCD->Read( pCrN, nW2 ); + pCbN[ nW2 ] = pCbN[ nW2 - 1 ]; + pCrN[ nW2 ] = pCrN[ nW2 - 1 ]; + + for ( nYPair = 0; nYPair < nH2; nYPair++ ) + { + // aktuelles Zeilen-Paar := naechstes Zeilen-Paar + pt=pL0; pL0=pL0N; pL0N=pt; + pt=pL1; pL1=pL1N; pL1N=pt; + pt=pCb; pCb=pCbN; pCbN=pt; + pt=pCr; pCr=pCrN; pCrN=pt; + + // naechstes Zeilen-Paar holen: + if ( nYPair < nH2 - 1 ) + { + pPCD->Read( pL0N, nWidth ); + pPCD->Read( pL1N, nWidth ); + pPCD->Read( pCbN, nW2 ); + pPCD->Read( pCrN, nW2 ); + pCbN[nW2]=pCbN[ nW2 - 1 ]; + pCrN[nW2]=pCrN[ nW2 - 1 ]; + } + else + { + for ( nXPair = 0; nXPair < nW2; nXPair++ ) + { + pCbN[ nXPair ] = pCb[ nXPair ]; + pCrN[ nXPair ] = pCr[ nXPair ]; + } + } + + // Schleife uber die beiden Zeilen des Zeilen-Paars: + for ( ndy = 0; ndy < 2; ndy++ ) + { + ny = ( nYPair << 1 ) + ndy; + + // Schleife ueber X: + for ( nx = 0; nx < nWidth; nx++ ) + { + // nL,nCb,nCr fuer den Pixel nx,ny holen/berechenen: + nXPair = nx >> 1; + if ( ndy == 0 ) + { + nL = (long)pL0[ nx ]; + if (( nx & 1 ) == 0 ) + { + nCb = (long)pCb[ nXPair ]; + nCr = (long)pCr[ nXPair ]; + } + else + { + nCb = ( ( (long)pCb[ nXPair ] ) + ( (long)pCb[ nXPair + 1 ] ) ) >> 1; + nCr = ( ( (long)pCr[ nXPair ] ) + ( (long)pCr[ nXPair + 1 ] ) ) >> 1; + } + } + else { + nL = pL1[ nx ]; + if ( ( nx & 1 ) == 0 ) + { + nCb = ( ( (long)pCb[ nXPair ] ) + ( (long)pCbN[ nXPair ] ) ) >> 1; + nCr = ( ( (long)pCr[ nXPair ] ) + ( (long)pCrN[ nXPair ] ) ) >> 1; + } + else + { + nCb = ( ( (long)pCb[ nXPair ] ) + ( (long)pCb[ nXPair + 1 ] ) + + ( (long)pCbN[ nXPair ] ) + ( (long)pCbN[ nXPair + 1 ] ) ) >> 2; + nCr = ( ( (long)pCr[ nXPair ] ) + ( (long)pCr[ nXPair + 1] ) + + ( (long)pCrN[ nXPair ] ) + ( (long)pCrN[ nXPair + 1 ] ) ) >> 2; + } + } + // Umwandlung von nL,nCb,nCr in nRed,nGreen,nBlue: + nL *= 89024L; + nCb -= 156; + nCr -= 137; + nRed = ( nL + nCr * 119374L + 0x8000 ) >> 16; + if ( nRed < 0 ) + nRed = 0; + if ( nRed > 255) + nRed = 255; + nGreen = ( nL - nCb * 28198L - nCr * 60761L + 0x8000 ) >> 16; + if ( nGreen < 0 ) + nGreen = 0; + if ( nGreen > 255 ) + nGreen = 255; + nBlue = ( nL + nCb * 145352L + 0x8000 ) >> 16; + if ( nBlue < 0 ) + nBlue = 0; + if ( nBlue > 255 ) + nBlue = 255; + + // Farbwert in pBMPMap eintragen: + if ( nOrientation < 2 ) + { + if ( nOrientation == 0 ) + mpAcc->SetPixel( ny, nx, BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) ); + else + mpAcc->SetPixel( nWidth - 1 - nx, ny, BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) ); + } + else + { + if ( nOrientation == 2 ) + mpAcc->SetPixel( nHeight - 1 - ny, ( nWidth - 1 - nx ), BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) ); + else + mpAcc->SetPixel( nx, ( nHeight - 1 - ny ), BitmapColor( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) ); + } + } + } + + if ( pPCD->GetError() ) + bStatus = FALSE; + MayCallback( nMinPercent + ( nMaxPercent - nMinPercent ) * nYPair / nH2 ); + if ( bStatus == FALSE ) + break; + } + rtl_freeMemory((void*)pL0 ); + rtl_freeMemory((void*)pL1 ); + rtl_freeMemory((void*)pCb ); + rtl_freeMemory((void*)pCr ); + rtl_freeMemory((void*)pL0N); + rtl_freeMemory((void*)pL1N); + rtl_freeMemory((void*)pCbN); + rtl_freeMemory((void*)pCrN); +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem* pConfigItem, BOOL ) +{ + PCDReader aPCDReader; + return aPCDReader.ReadPCD( rStream, rGraphic, pConfigItem ); +} + +//============================= fuer Windows ================================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + + diff --git a/filter/source/graphicfilter/ipcd/makefile.mk b/filter/source/graphicfilter/ipcd/makefile.mk new file mode 100644 index 000000000000..5b43d9521cd5 --- /dev/null +++ b/filter/source/graphicfilter/ipcd/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=ipcd +DEPTARGET=vipcd + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/ipcd.obj + +# ========================================================================== + +SHL1TARGET= icd$(DLLPOSTFIX) +SHL1IMPLIB= ipcd +SHL1STDLIBS= $(SVTOOLLIB) $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/ipcd.lib # $(LB)$/rtftoken.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/ipcd.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/ipcx/exports.map b/filter/source/graphicfilter/ipcx/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/ipcx/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx new file mode 100644 index 000000000000..02c552744299 --- /dev/null +++ b/filter/source/graphicfilter/ipcx/ipcx.cxx @@ -0,0 +1,458 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include + +//============================ PCXReader ================================== + +class PCXReader { + +private: + + SvStream* pPCX; // Die einzulesende PCX-Datei + + Bitmap aBmp; + BitmapWriteAccess* pAcc; + BYTE nVersion; // PCX-Version + BYTE nEncoding; // Art der Komprimierung + ULONG nBitsPerPlanePix; // Bits Pro Ebene pro Pixel + ULONG nPlanes; // Anzahl Ebenen + ULONG nBytesPerPlaneLin; // Bytes in einer Ebenen pro Zeile + USHORT nPaletteInfo; + + ULONG nWidth, nHeight; // Bildausmass in Pixeln + USHORT nResX, nResY; // Aufloesung in Pixel pro Inch oder 0,0 + USHORT nDestBitsPerPixel; // Bits pro Pixel der Zielbitmap 1,4,8 oder 24 + BYTE* pPalette; // + BOOL nStatus; // status nun nicht mehr am stream abfragen ( SJ ) + + + BOOL Callback( USHORT nPercent ); + void ImplReadBody(); + void ImplReadPalette( ULONG nCol ); + void ImplReadHeader(); + +public: + PCXReader(); + ~PCXReader(); + BOOL ReadPCX( SvStream & rPCX, Graphic & rGraphic ); + // Liesst aus dem Stream eine PCX-Datei und fuellt das GDIMetaFile +}; + +//=================== Methoden von PCXReader ============================== + +PCXReader::PCXReader() : + pAcc ( NULL ) +{ + pPalette = new BYTE[ 768 ]; +} + +PCXReader::~PCXReader() +{ + delete[] pPalette; +} + +BOOL PCXReader::Callback( USHORT /*nPercent*/ ) +{ +/* + if (pCallback!=NULL) { + if (((*pCallback)(pCallerData,nPercent))==TRUE) { + nStatus = FALSE; + return TRUE; + } + } +*/ + return FALSE; +} + +BOOL PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic ) +{ + if ( rPCX.GetError() ) + return FALSE; + + ULONG* pDummy = new ULONG; delete pDummy; // damit unter OS/2 + // das richtige (Tools-)new + // verwendet wird, da es sonst + // in dieser DLL nur Vector-news + // gibt; + + pPCX = &rPCX; + pPCX->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); + + // Kopf einlesen: + + nStatus = TRUE; + + ImplReadHeader(); + + // BMP-Header und ggf. (eventuell zunaechst ungueltige) Farbpalette schreiben: + if ( nStatus ) + { + aBmp = Bitmap( Size( nWidth, nHeight ), nDestBitsPerPixel ); + if ( ( pAcc = aBmp.AcquireWriteAccess() ) == FALSE ) + return FALSE; + + if ( nDestBitsPerPixel <= 8 ) + { + USHORT nColors = 1 << nDestBitsPerPixel; + BYTE* pPal = pPalette; + pAcc->SetPaletteEntryCount( nColors ); + for ( USHORT i = 0; i < nColors; i++, pPal += 3 ) + { + pAcc->SetPaletteColor( i, BitmapColor ( pPal[ 0 ], pPal[ 1 ], pPal[ 2 ] ) ); + } + } + // Bitmap-Daten einlesen + ImplReadBody(); + + // Wenn erweiterte Farbpalette am Ende von PCX, dann diese einlesen, und nochmals + // in Palette schreiben: + if ( nDestBitsPerPixel == 8 && nStatus ) + { + BYTE* pPal = pPalette; + pPCX->SeekRel(1); + ImplReadPalette(256); + pAcc->SetPaletteEntryCount( 256 ); + for ( USHORT i = 0; i < 256; i++, pPal += 3 ) + { + pAcc->SetPaletteColor( i, BitmapColor ( pPal[ 0 ], pPal[ 1 ], pPal[ 2 ] ) ); + } + } + /* + // Aufloesung einstellen: + if (nResX!=0 && nResY!=0) { + MapMode aMapMode(MAP_INCH,Point(0,0),Fraction(1,nResX),Fraction(1,nResY)); + rBitmap.SetPrefMapMode(aMapMode); + rBitmap.SetPrefSize(Size(nWidth,nHeight)); + } + */ if ( nStatus && pAcc ) + { + aBmp.ReleaseAccess( pAcc ), pAcc = NULL; + rGraphic = aBmp; + return TRUE; + } + } + return FALSE; +} + +void PCXReader::ImplReadHeader() +{ + BYTE nbyte; + USHORT nushort; + USHORT nMinX,nMinY,nMaxX,nMaxY; + + *pPCX >> nbyte >> nVersion >> nEncoding; + if ( nbyte!=0x0a || (nVersion != 0 && nVersion != 2 && nVersion != 3 && nVersion != 5) || nEncoding > 1 ) + { + nStatus = FALSE; + return; + } + + *pPCX >> nbyte; nBitsPerPlanePix = (ULONG)nbyte; + *pPCX >> nMinX >> nMinY >> nMaxX >> nMaxY; + + if ((nMinX > nMaxX) || (nMinY > nMaxY)) + { + nStatus = FALSE; + return; + } + + nWidth = nMaxX-nMinX+1; + nHeight = nMaxY-nMinY+1; + + *pPCX >> nResX; + *pPCX >> nResY; + if ( nResX >= nWidth || nResY >= nHeight || ( nResX != nResY ) ) + nResX = nResY = 0; + + ImplReadPalette( 16 ); + + pPCX->SeekRel( 1 ); + *pPCX >> nbyte; nPlanes = (ULONG)nbyte; + *pPCX >> nushort; nBytesPerPlaneLin = (ULONG)nushort; + *pPCX >> nPaletteInfo; + + pPCX->SeekRel( 58 ); + + nDestBitsPerPixel = (USHORT)( nBitsPerPlanePix * nPlanes ); + if (nDestBitsPerPixel == 2 || nDestBitsPerPixel == 3) nDestBitsPerPixel = 4; + + if ( ( nDestBitsPerPixel != 1 && nDestBitsPerPixel != 4 && nDestBitsPerPixel != 8 && nDestBitsPerPixel != 24 ) + || nPlanes > 4 || nBytesPerPlaneLin < ( ( nWidth * nBitsPerPlanePix+7 ) >> 3 ) ) + { + nStatus = FALSE; + return; + } + + // Wenn das Bild nur 2 Farben hat, ist die Palette zumeist ungueltig, und es handelt sich + // immer (?) um ein schwarz-weiss-Bild: + if ( nPlanes == 1 && nBitsPerPlanePix == 1 ) + { + pPalette[ 0 ] = pPalette[ 1 ] = pPalette[ 2 ] = 0x00; + pPalette[ 3 ] = pPalette[ 4 ] = pPalette[ 5 ] = 0xff; + } +} + +void PCXReader::ImplReadBody() +{ + BYTE *pPlane[ 4 ], * pDest, * pSource1, * pSource2, * pSource3, *pSource4; + ULONG i, nx, ny, np, nCount, nUsedLineSize, nLineSize, nPercent; + ULONG nLastPercent = 0; + BYTE nDat = 0, nCol = 0; + + nUsedLineSize = (ULONG)( ( ( nWidth * (ULONG)nDestBitsPerPixel ) + 7 ) >> 3 ); + nLineSize = ( nUsedLineSize + 3 ) & 0xfffc; + + for( np = 0; np < nPlanes; np++ ) + pPlane[ np ] = new BYTE[ nBytesPerPlaneLin ]; + + nCount = 0; + for ( ny = 0; ny < nHeight; ny++ ) + { + if (pPCX->GetError() || pPCX->IsEof()) + { + nStatus = FALSE; + break; + } + nPercent = ny * 60 / nHeight + 10; + if ( ny == 0 || nLastPercent + 4 <= nPercent ) + { + nLastPercent = nPercent; + if ( Callback( (USHORT)nPercent ) == TRUE ) + break; + } + for ( np = 0; np < nPlanes; np++) + { + if ( nEncoding == 0) + pPCX->Read( (void *)pPlane[ np ], nBytesPerPlaneLin ); + else + { + pDest = pPlane[ np ]; + nx = nBytesPerPlaneLin; + while ( nCount > 0 && nx > 0) + { + *(pDest++) = nDat; + nx--; + nCount--; + } + while ( nx > 0 ) + { + *pPCX >> nDat; + if ( ( nDat & 0xc0 ) == 0xc0 ) + { + nCount =( (ULONG)nDat ) & 0x003f; + *pPCX >> nDat; + if ( nCount < nx ) + { + nx -= nCount; + while ( nCount > 0) + { + *(pDest++) = nDat; + nCount--; + } + } + else + { + nCount -= nx; + do + { + *(pDest++) = nDat; + nx--; + } + while ( nx > 0 ); + break; + } + } + else + { + *(pDest++) = nDat; + nx--; + } + } + } + } + pSource1 = pPlane[ 0 ]; + pSource2 = pPlane[ 1 ]; + pSource3 = pPlane[ 2 ]; + pSource4 = pPlane[ 3 ]; + switch ( nBitsPerPlanePix + ( nPlanes << 8 ) ) + { + // 2 colors + case 0x101 : + for ( i = 0; i < nWidth; i++ ) + { + ULONG nShift = ( i & 7 ) ^ 7; + if ( nShift == 0 ) + pAcc->SetPixel( ny, i, ( *pSource1++ & 1 ) ); + else + pAcc->SetPixel( + ny, i, + sal::static_int_cast< BYTE >( + ( *pSource1 >> nShift ) & 1) ); + } + break; + // 4 colors + case 0x102 : + for ( i = 0; i < nWidth; i++ ) + { + switch( i & 3 ) + { + case 0 : + nCol = *pSource1 >> 6; + break; + case 1 : + nCol = ( *pSource1 >> 4 ) & 0x03 ; + break; + case 2 : + nCol = ( *pSource1 >> 2 ) & 0x03; + break; + case 3 : + nCol = ( *pSource1++ ) & 0x03; + break; + } + pAcc->SetPixel( ny, i, nCol ); + } + break; + // 256 colors + case 0x108 : + for ( i = 0; i < nWidth; i++ ) + { + pAcc->SetPixel( ny, i, *pSource1++ ); + } + break; + // 8 colors + case 0x301 : + for ( i = 0; i < nWidth; i++ ) + { + ULONG nShift = ( i & 7 ) ^ 7; + if ( nShift == 0 ) + { + nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 ); + pAcc->SetPixel( ny, i, nCol ); + } + else + { + nCol = sal::static_int_cast< BYTE >( + ( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) + + ( ( ( *pSource3 >> nShift ) << 2 ) & 4 )); + pAcc->SetPixel( ny, i, nCol ); + } + } + break; + // 16 colors + case 0x401 : + for ( i = 0; i < nWidth; i++ ) + { + ULONG nShift = ( i & 7 ) ^ 7; + if ( nShift == 0 ) + { + nCol = ( *pSource1++ & 1) + ( ( *pSource2++ << 1 ) & 2 ) + ( ( *pSource3++ << 2 ) & 4 ) + + ( ( *pSource4++ << 3 ) & 8 ); + pAcc->SetPixel( ny, i, nCol ); + } + else + { + nCol = sal::static_int_cast< BYTE >( + ( ( *pSource1 >> nShift ) & 1) + ( ( ( *pSource2 >> nShift ) << 1 ) & 2 ) + + ( ( ( *pSource3 >> nShift ) << 2 ) & 4 ) + ( ( ( *pSource4 >> nShift ) << 3 ) & 8 )); + pAcc->SetPixel( ny, i, nCol ); + } + } + break; + // 16m colors + case 0x308 : + for ( i = 0; i < nWidth; i++ ) + { + pAcc->SetPixel( ny, i, Color( *pSource1++, *pSource2++, *pSource3++ ) ); + + } + break; + default : + nStatus = FALSE; + break; + } + } + for ( np = 0; np < nPlanes; np++ ) + delete[] pPlane[ np ]; +} + +void PCXReader::ImplReadPalette( ULONG nCol ) +{ + BYTE r, g, b; + BYTE* pPtr = pPalette; + for ( ULONG i = 0; i < nCol; i++ ) + { + *pPCX >> r >> g >> b; + *pPtr++ = r; + *pPtr++ = g; + *pPtr++ = b; + } +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + PCXReader aPCXReader; + BOOL nRetValue = aPCXReader.ReadPCX( rStream, rGraphic ); + if ( nRetValue == FALSE ) + rStream.SetError( SVSTREAM_FILEFORMAT_ERROR ); + return nRetValue; +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/ipcx/makefile.mk b/filter/source/graphicfilter/ipcx/makefile.mk new file mode 100644 index 000000000000..679ffd2a984a --- /dev/null +++ b/filter/source/graphicfilter/ipcx/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=ipcx +DEPTARGET=vipcx + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/ipcx.obj + +# ========================================================================== + +SHL1TARGET= ipx$(DLLPOSTFIX) +SHL1IMPLIB= ipcx +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/ipcx.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/ipcx.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/ipict/exports.map b/filter/source/graphicfilter/ipict/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/ipict/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx new file mode 100644 index 000000000000..d1af028149b7 --- /dev/null +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -0,0 +1,1937 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include +#include +#include +#include +#include + +// MT: NOOLDSV, someone should change the code... +enum PenStyle { PEN_NULL, PEN_SOLID, PEN_DOT, PEN_DASH, PEN_DASHDOT }; +enum BrushStyle { BRUSH_NULL, BRUSH_SOLID, BRUSH_HORZ, BRUSH_VERT, + BRUSH_CROSS, BRUSH_DIAGCROSS, BRUSH_UPDIAG, BRUSH_DOWNDIAG, + BRUSH_25, BRUSH_50, BRUSH_75, + BRUSH_BITMAP }; + +//============================ PictReader ================================== + +enum PictDrawingMethod { + PDM_FRAME, PDM_PAINT, PDM_ERASE, PDM_INVERT, PDM_FILL, + PDM_TEXT, PDM_UNDEFINED +}; + +class PictReader { + +private: + + SvStream * pPict; // Die einzulesende Pict-Datei + VirtualDevice * pVirDev; // Hier werden die Drawing-Methoden aufgerufen. + // Dabei findet ein Recording in das GDIMetaFile + // statt. + ULONG nOrigPos; // Anfaengliche Position in pPict + UINT16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pPict + BOOL IsVersion2; // Ob es ein Version 2 Pictfile ist. + Rectangle aBoundingRect; // Min/Max-Rechteck fuer die ganze Zeichnung + + Point aPenPosition; + Point aTextPosition; + Color aActForeColor; + Color aActBackColor; + PenStyle eActPenPenStyle; + BrushStyle eActPenBrushStyle; + BrushStyle eActFillStyle; + BrushStyle eActBackStyle; + USHORT nActPenSize; + RasterOp eActROP; + PictDrawingMethod eActMethod; + Size aActOvalSize; + Font aActFont; + + Fraction aHRes; + Fraction aVRes; + + BOOL Callback(USHORT nPercent); + + Point ReadPoint(); + + Point ReadDeltaH(Point aBase); + Point ReadDeltaV(Point aBase); + + Point ReadUnsignedDeltaH(Point aBase); + Point ReadUnsignedDeltaV(Point aBase); + + Size ReadSize(); + + Color ReadColor(); + + Color ReadRGBColor(); + + void ReadRectangle(Rectangle & rRect); + + ULONG ReadPolygon(Polygon & rPoly); + + ULONG ReadPattern(PenStyle * pPenStyle, BrushStyle * pBrushStyle); + + ULONG ReadPixPattern(PenStyle * pPenStyle, BrushStyle * pBrushStyle); + + Rectangle aLastRect; + ULONG ReadAndDrawRect(PictDrawingMethod eMethod); + ULONG ReadAndDrawSameRect(PictDrawingMethod eMethod); + + Rectangle aLastRoundRect; + ULONG ReadAndDrawRoundRect(PictDrawingMethod eMethod); + ULONG ReadAndDrawSameRoundRect(PictDrawingMethod eMethod); + + Rectangle aLastOval; + ULONG ReadAndDrawOval(PictDrawingMethod eMethod); + ULONG ReadAndDrawSameOval(PictDrawingMethod eMethod); + + Polygon aLastPolygon; + ULONG ReadAndDrawPolygon(PictDrawingMethod eMethod); + ULONG ReadAndDrawSamePolygon(PictDrawingMethod eMethod); + + Rectangle aLastArcRect; + ULONG ReadAndDrawArc(PictDrawingMethod eMethod); + ULONG ReadAndDrawSameArc(PictDrawingMethod eMethod); + + ULONG ReadAndDrawRgn(PictDrawingMethod eMethod); + ULONG ReadAndDrawSameRgn(PictDrawingMethod eMethod); + + void DrawingMethod(PictDrawingMethod eMethod); + + ULONG ReadAndDrawText(); + + ULONG ReadPixMapEtc(Bitmap & rBitmap, BOOL bBaseAddr, BOOL bColorTable, + Rectangle * pSrcRect, Rectangle * pDestRect, + BOOL bMode, BOOL bMaskRgn); + + void ReadHeader(); + // Liesst den Kopf der Pict-Datei, setzt IsVersion2 und aBoundingRect + + ULONG ReadData(USHORT nOpcode); + // Liesst die Daten eines Opcodes ein und fuehrt die Operation aus. + // Auf jeden Fall wird die Anzahl der Datenbytes zu dem Opcode + // zurueckgeliefert. + + void SetLineColor( const Color& rColor ); + void SetFillColor( const Color& rColor ); + +public: + + PictReader() {} + + void ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ); + // Liesst aus dem Stream eine Pict-Datei und fuellt das GDIMetaFile + +}; + +//------------------------------------------------------------------------------------------------ + +#define SETBYTE \ + switch ( nPixelSize ) \ + { \ + case 1 : \ + pAcc->SetPixel( ny, nx++, nDat >> 7 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 6 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 5 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 4 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 3 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 2 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 1 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat ); \ + break; \ + case 2 : \ + pAcc->SetPixel( ny, nx++, nDat >> 6 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 4 & 3); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat >> 2 & 3 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat & 3); \ + break; \ + case 4 : \ + pAcc->SetPixel( ny, nx++, nDat >> 4 ); \ + if ( nx == nWidth ) break; \ + pAcc->SetPixel( ny, nx++, nDat ); \ + break; \ + case 8 : \ + pAcc->SetPixel( ny, nx++, nDat ); \ + break; \ + } + +//------------------------------------------------------------------------------------------------ + +#define BITMAPERROR \ +{ \ + if ( pAcc ) \ + aBitmap.ReleaseAccess( pAcc ); \ + if ( pReadAcc ) \ + aBitmap.ReleaseAccess( pReadAcc ); \ + return 0xffffffff; \ +} + +//=================== Methoden von PictReader ============================== + +void PictReader::SetLineColor( const Color& rColor ) +{ + pVirDev->SetLineColor( rColor ); +} + +void PictReader::SetFillColor( const Color& rColor ) +{ + pVirDev->SetFillColor( rColor ); +} + +BOOL PictReader::Callback(USHORT /*nPercent*/) +{ +/* + if (pCallback!=NULL) { + if (((*pCallback)(pCallerData,nPercent))==TRUE) { + pPict->SetError(SVSTREAM_FILEFORMAT_ERROR); + return TRUE; + } + } +*/ + return FALSE; +} + +Point PictReader::ReadPoint() +{ + short nx,ny; + + *pPict >> ny >> nx; + + return Point( (long)nx - aBoundingRect.Left(), + (long)ny - aBoundingRect.Top() ); +} + +Point PictReader::ReadDeltaH(Point aBase) +{ + signed char ndh; + + *pPict >> ((char&)ndh); + + return Point( aBase.X() + (long)ndh, aBase.Y() ); +} + +Point PictReader::ReadDeltaV(Point aBase) +{ + signed char ndv; + + *pPict >> ((char&)ndv); + + return Point( aBase.X(), aBase.Y() + (long)ndv ); +} + +Point PictReader::ReadUnsignedDeltaH(Point aBase) +{ + sal_uInt8 ndh; + + *pPict >> ndh; + + return Point( aBase.X() + (long)ndh, aBase.Y() ); +} + +Point PictReader::ReadUnsignedDeltaV(Point aBase) +{ + sal_uInt8 ndv; + + *pPict >> ndv; + + return Point( aBase.X(), aBase.Y() + (long)ndv ); +} + +Size PictReader::ReadSize() +{ + short nx,ny; + + *pPict >> ny >> nx; + + return Size( (long)nx, (long)ny ); +} + +Color PictReader::ReadColor() +{ + sal_uInt32 nCol; + Color aCol; + + *pPict >> nCol; + switch (nCol) + { + case 33: aCol=Color( COL_BLACK ); break; + case 30: aCol=Color( COL_WHITE ); break; + case 205: aCol=Color( COL_LIGHTRED ); break; + case 341: aCol=Color( COL_LIGHTGREEN ); break; + case 409: aCol=Color( COL_LIGHTBLUE ); break; + case 273: aCol=Color( COL_LIGHTCYAN ); break; + case 137: aCol=Color( COL_LIGHTMAGENTA ); break; + case 69: aCol=Color( COL_YELLOW ); break; + default: aCol=Color( COL_LIGHTGRAY ); + } + return aCol; +} + + +Color PictReader::ReadRGBColor() +{ + USHORT nR, nG, nB; + + *pPict >> nR >> nG >> nB; + return Color( (BYTE) ( nR >> 8 ), (BYTE) ( nG >> 8 ), (BYTE) ( nB >> 8 ) ); +} + + +void PictReader::ReadRectangle(Rectangle & rRect) +{ + Point aTopLeft, aBottomRight; + + aTopLeft=ReadPoint(); + aBottomRight=ReadPoint(); + aBottomRight.X() -= 1; + aBottomRight.Y() -= 1; + rRect=Rectangle(aTopLeft,aBottomRight); +} + + +ULONG PictReader::ReadPolygon(Polygon & rPoly) +{ + USHORT nSize,i; + ULONG nDataSize; + + *pPict >> nSize; + pPict->SeekRel(8); + nDataSize=(ULONG)nSize; + nSize=(nSize-10)/4; + rPoly.SetSize(nSize); + for (i=0; i> ((char&)nbyte[ny]); + for (nx=0; nx<8; nx++) { + if ( (nbyte[ny] & (1<> nPatType; + if (nPatType==1) { + ReadPattern(pPenStyle,pBrushStyle); + nDataSize=ReadPixMapEtc(aBMP,FALSE,TRUE,NULL,NULL,FALSE,FALSE); + if (nDataSize!=0xffffffff) nDataSize+=10; + } + else if (nPatType==2) { + ReadPattern(pPenStyle,pBrushStyle); + pPict->SeekRel(6); // RGBColor + nDataSize=16; + } + else nDataSize=0xffffffff; + + return nDataSize; +} + +ULONG PictReader::ReadAndDrawRect(PictDrawingMethod eMethod) +{ + ReadRectangle(aLastRect); + DrawingMethod(eMethod); + pVirDev->DrawRect(aLastRect); + return 8; +} + +ULONG PictReader::ReadAndDrawSameRect(PictDrawingMethod eMethod) +{ + DrawingMethod(eMethod); + pVirDev->DrawRect(aLastRect); + return 0; +} + +ULONG PictReader::ReadAndDrawRoundRect(PictDrawingMethod eMethod) +{ + ReadRectangle(aLastRoundRect); + DrawingMethod(eMethod); + pVirDev->DrawRect(aLastRoundRect,aActOvalSize.Width(),aActOvalSize.Height()); + return 8; +} + +ULONG PictReader::ReadAndDrawSameRoundRect(PictDrawingMethod eMethod) +{ + DrawingMethod(eMethod); + pVirDev->DrawRect(aLastRoundRect,aActOvalSize.Width(),aActOvalSize.Height()); + return 0; +} + +ULONG PictReader::ReadAndDrawOval(PictDrawingMethod eMethod) +{ + ReadRectangle(aLastOval); + DrawingMethod(eMethod); + pVirDev->DrawEllipse(aLastOval); + return 8; +} + +ULONG PictReader::ReadAndDrawSameOval(PictDrawingMethod eMethod) +{ + DrawingMethod(eMethod); + pVirDev->DrawEllipse(aLastOval); + return 0; +} + +ULONG PictReader::ReadAndDrawPolygon(PictDrawingMethod eMethod) +{ + ULONG nDataSize; + + nDataSize=ReadPolygon(aLastPolygon); + DrawingMethod(eMethod); + if (eMethod==PDM_FRAME) pVirDev->DrawPolyLine(aLastPolygon); + else pVirDev->DrawPolygon(aLastPolygon); + return nDataSize; +} + +ULONG PictReader::ReadAndDrawSamePolygon(PictDrawingMethod eMethod) +{ + DrawingMethod(eMethod); + if (eMethod==PDM_FRAME) pVirDev->DrawPolyLine(aLastPolygon); + else pVirDev->DrawPolygon(aLastPolygon); + return 0; +} + + +ULONG PictReader::ReadAndDrawArc(PictDrawingMethod eMethod) +{ + short nstartAngle, narcAngle; + double fAng1, fAng2; + Point aStartPt, aEndPt, aCenter; + + ReadRectangle(aLastArcRect); + *pPict >> nstartAngle >> narcAngle; + if (narcAngle<0) { + nstartAngle = nstartAngle + narcAngle; + narcAngle=-narcAngle; + } + fAng1=((double)nstartAngle)/180.0*3.14159265359; + fAng2=((double)(nstartAngle+narcAngle))/180.0*3.14159265359; + aCenter=Point((aLastArcRect.Left()+aLastArcRect.Right())/2, + (aLastArcRect.Top()+aLastArcRect.Bottom())/2); + aStartPt=Point(aCenter.X()+(long)( sin(fAng2)*256.0), + aCenter.Y()+(long)(-cos(fAng2)*256.0)); + aEndPt= Point(aCenter.X()+(long)( sin(fAng1)*256.0), + aCenter.Y()+(long)(-cos(fAng1)*256.0)); + DrawingMethod(eMethod); + if (eMethod==PDM_FRAME) pVirDev->DrawArc(aLastArcRect,aStartPt,aEndPt); + else pVirDev->DrawPie(aLastArcRect,aStartPt,aEndPt); + return 12; +} + +ULONG PictReader::ReadAndDrawSameArc(PictDrawingMethod eMethod) +{ + short nstartAngle, narcAngle; + double fAng1, fAng2; + Point aStartPt, aEndPt, aCenter; + + *pPict >> nstartAngle >> narcAngle; + if (narcAngle<0) { + nstartAngle = nstartAngle + narcAngle; + narcAngle=-narcAngle; + } + fAng1=((double)nstartAngle)/180.0*3.14159265359; + fAng2=((double)(nstartAngle+narcAngle))/180.0*3.14159265359; + aCenter=Point((aLastArcRect.Left()+aLastArcRect.Right())/2, + (aLastArcRect.Top()+aLastArcRect.Bottom())/2); + aStartPt=Point(aCenter.X()+(long)( sin(fAng2)*256.0), + aCenter.Y()+(long)(-cos(fAng2)*256.0)); + aEndPt= Point(aCenter.X()+(long)( sin(fAng1)*256.0), + aCenter.Y()+(long)(-cos(fAng1)*256.0)); + DrawingMethod(eMethod); + if (eMethod==PDM_FRAME) pVirDev->DrawArc(aLastArcRect,aStartPt,aEndPt); + else pVirDev->DrawPie(aLastArcRect,aStartPt,aEndPt); + return 4; +} + +ULONG PictReader::ReadAndDrawRgn(PictDrawingMethod eMethod) +{ + USHORT nSize; + + DrawingMethod(eMethod); + *pPict >> nSize; + // ...???... + return (ULONG)nSize; +} + +ULONG PictReader::ReadAndDrawSameRgn(PictDrawingMethod eMethod) +{ + DrawingMethod(eMethod); + // ...???... + return 0; +} + +void PictReader::DrawingMethod(PictDrawingMethod eMethod) +{ + if( eActMethod==eMethod ) return; + switch (eMethod) { + case PDM_FRAME: + SetLineColor( aActForeColor ); + SetFillColor( Color(COL_TRANSPARENT) ); + pVirDev->SetRasterOp(eActROP); + break; + case PDM_PAINT: + SetLineColor( Color(COL_TRANSPARENT) ); + SetFillColor( aActForeColor ); + pVirDev->SetRasterOp(eActROP); + break; + case PDM_ERASE: + SetLineColor( Color(COL_TRANSPARENT) ); + SetFillColor( aActForeColor ); + pVirDev->SetRasterOp(ROP_OVERPAINT); + break; + case PDM_INVERT: + SetLineColor( Color(COL_TRANSPARENT)); + SetFillColor( Color( COL_BLACK ) ); + pVirDev->SetRasterOp(ROP_INVERT); + break; + case PDM_FILL: + SetLineColor( Color(COL_TRANSPARENT) ); + SetFillColor( aActForeColor ); + pVirDev->SetRasterOp(ROP_OVERPAINT); + break; + case PDM_TEXT: + aActFont.SetColor(aActForeColor); + aActFont.SetFillColor(aActBackColor); + aActFont.SetTransparent(TRUE); + pVirDev->SetFont(aActFont); + pVirDev->SetRasterOp(ROP_OVERPAINT); + break; + default: + break; // -Wall undefined not handled... + } + eActMethod=eMethod; +} + +ULONG PictReader::ReadAndDrawText() +{ + char nByteLen; + sal_uInt32 nLen, nDataLen; + sal_Char sText[256]; + + DrawingMethod(PDM_TEXT); + *pPict >> nByteLen; nLen=((ULONG)nByteLen)&0x000000ff; + nDataLen = nLen + 1; + pPict->Read( &sText, nLen ); + + // Stoerende Steuerzeuichen wegnehmen: + while ( nLen > 0 && ( (unsigned char)sText[ nLen - 1 ] ) < 32 ) + nLen--; + sText[ nLen ] = 0; + String aString( (const sal_Char*)&sText, gsl_getSystemTextEncoding() ); + pVirDev->DrawText( Point( aTextPosition.X(), aTextPosition.Y() ), aString ); + return nDataLen; +} + +ULONG PictReader::ReadPixMapEtc( Bitmap &rBitmap, BOOL bBaseAddr, BOOL bColorTable, Rectangle* pSrcRect, + Rectangle* pDestRect, BOOL bMode, BOOL bMaskRgn ) +{ + Bitmap aBitmap; + BitmapWriteAccess* pAcc = NULL; + BitmapReadAccess* pReadAcc = NULL; + USHORT ny, nx, nColTabSize; + USHORT nRowBytes, nBndX, nBndY, nWidth, nHeight, nVersion, nPackType, nPixelType, + nPixelSize, nCmpCount, nCmpSize; + sal_uInt32 nPackSize, nPlaneBytes, nHRes, nVRes; + BYTE nDat, nRed, nGreen, nBlue, nDummy; + ULONG i, nDataSize = 0; + + // In nDataSize wird mitgerechnet, wie gross die gesammten Daten sind. + nDataSize = 0; + + // ggf. BaseAddr ueberlesen + if ( bBaseAddr ) + { + pPict->SeekRel( 4 ); + nDataSize += 4; + } + + // PixMap oder Bitmap-Struktur einlesen; + *pPict >> nRowBytes >> nBndY >> nBndX >> nHeight >> nWidth; + nHeight = nHeight - nBndY; + nWidth = nWidth - nBndX; + + if ( ( nRowBytes & 0x8000 ) != 0 ) + { // it is a PixMap + nRowBytes &= 0x3fff; + *pPict >> nVersion >> nPackType >> nPackSize >> nHRes >> nVRes >> nPixelType >> + nPixelSize >> nCmpCount >> nCmpSize >> nPlaneBytes; + + pPict->SeekRel( 8 ); + nDataSize += 46; + + sal_uInt16 nDstBitCount = nPixelSize; + if ( nDstBitCount > 8 ) + nDstBitCount = 24; + else if ( nDstBitCount == 2 ) + nDstBitCount = 4; + aBitmap = Bitmap( Size( nWidth, nHeight ), nDstBitCount ); + + if ( ( pAcc = aBitmap.AcquireWriteAccess() ) == NULL ) + BITMAPERROR; + + if ( bColorTable ) + { + pPict->SeekRel( 6 ); + *pPict >> nColTabSize; + + if ( ++nColTabSize > 256 ) + BITMAPERROR; + + pAcc->SetPaletteEntryCount( nColTabSize ); + + for ( i = 0; i < nColTabSize; i++ ) + { + pPict->SeekRel(2); + *pPict >> nRed >> nDummy >> nGreen >> nDummy >> nBlue >> nDummy; + pAcc->SetPaletteColor( (USHORT) i, BitmapColor( nRed, nGreen, nBlue ) ); + } + nDataSize += 8 + nColTabSize * 8; + } + } + else + { + nRowBytes &= 0x3fff; + nVersion = 0; + nPackType = 0; + nPackSize = nHRes = nVRes = nPlaneBytes = 0; + nPixelType = 0; + nPixelSize = nCmpCount = nCmpSize = 1; + nDataSize += 10; + aBitmap = Bitmap( Size( nWidth, nHeight ), 1 ); + if ( ( pAcc = aBitmap.AcquireWriteAccess() ) == NULL ) + BITMAPERROR; + pAcc->SetPaletteEntryCount( 2 ); + pAcc->SetPaletteColor( 0, BitmapColor( 0xff, 0xff, 0xff ) ); + pAcc->SetPaletteColor( 1, BitmapColor( 0, 0, 0 ) ); + } + + // ggf. Quell-Rechteck einlesen: + if ( pSrcRect != 0) + { + USHORT nTop, nLeft, nBottom, nRight; + *pPict >> nTop >> nLeft >> nBottom >> nRight; + *pSrcRect = Rectangle( (ULONG)nLeft, (ULONG)nTop, (ULONG)nRight, (ULONG)nBottom ); + nDataSize += 8; + } + + // ggf. Ziel-Rechteck einlesen: + if ( pDestRect != 0 ) + { + Point aTL, aBR; + aTL = ReadPoint(); + aBR = ReadPoint(); + *pDestRect = Rectangle( aTL, aBR ); + nDataSize += 8; + } + + // ggf. Modus einlesen (bzw. ueberspringen): + if ( bMode ) + { + pPict->SeekRel(2); + nDataSize += 2; + } + + // ggf. Region einlesen (bzw. ueberspringen): + if ( bMaskRgn ) + { + USHORT nSize; + *pPict >> nSize; + pPict->SeekRel( nSize - 2 ); + nDataSize += (ULONG)nSize; + } + +// aSMem << (nHRes/1665L) << (nVRes/1665L) << ((ULONG)0) << ((ULONG)0); + + // Lese und Schreibe Bitmap-Bits: + if ( nPixelSize == 1 || nPixelSize == 2 || nPixelSize == 4 || nPixelSize == 8 ) + { + BYTE nByteCountAsByte, nFlagCounterByte; + USHORT nByteCount, nCount, nSrcBPL, nDestBPL; + + if ( nPixelSize == 1 ) nSrcBPL = ( nWidth + 7 ) >> 3; + else if ( nPixelSize == 2 ) nSrcBPL = ( nWidth + 3 ) >> 2; + else if ( nPixelSize == 4 ) nSrcBPL = ( nWidth + 1 ) >> 1; + else nSrcBPL = nWidth; + nDestBPL = ( nSrcBPL + 3 ) & 0xfffc; + if ( nRowBytes < nSrcBPL || nRowBytes > nDestBPL ) + BITMAPERROR; + + for ( ny = 0; ny < nHeight; ny++ ) + { + nx = 0; + if ( nRowBytes < 8 || nPackType == 1 ) + { + for ( i = 0; i < nRowBytes; i++ ) + { + *pPict >> nDat; + if ( nx < nWidth ) + SETBYTE; + } + nDataSize += nRowBytes; + } + else + { + if ( nRowBytes > 250 ) + { + *pPict >> nByteCount; + nDataSize += 2 + (ULONG)nByteCount; + } + else + { + *pPict >> nByteCountAsByte; + nByteCount = ( (USHORT)nByteCountAsByte ) & 0x00ff; + nDataSize += 1 + (ULONG)nByteCount; + } + + while ( nByteCount ) + { + *pPict >> nFlagCounterByte; + if ( ( nFlagCounterByte & 0x80 ) == 0 ) + { + nCount = ( (USHORT)nFlagCounterByte ) + 1; + for ( i = 0; i < nCount; i++ ) + { + *pPict >> nDat; + if ( nx < nWidth ) + SETBYTE; + } + nByteCount -= 1 + nCount; + } + else + { + nCount = ( 1 - ( ( (USHORT)nFlagCounterByte ) | 0xff00 ) ); + *pPict >> nDat; + for ( i = 0; i < nCount; i++ ) + { + if ( nx < nWidth ) + SETBYTE; + } + nByteCount -= 2; + } + } + } + } + } + else if ( nPixelSize == 16 ) + { + BYTE nByteCountAsByte, nFlagCounterByte; + USHORT nByteCount, nCount, nDestBPL,nD; + ULONG nSrcBitsPos; + + if ( nRowBytes < 2 * nWidth ) + BITMAPERROR; + + nDestBPL = ( ( 3 * nWidth ) + 0x0003 ) & 0xfffc; + + for ( ny = 0; ny < nHeight; ny++ ) + { + nx = 0; + if ( nRowBytes < 8 || nPackType == 1 ) + { + for ( i = 0; i < nWidth; i++ ) + { + *pPict >> nD; + nRed = (BYTE)( nD >> 7 ); + nGreen = (BYTE)( nD >> 2 ); + nBlue = (BYTE)( nD << 3 ); + pAcc->SetPixel( ny, nx++, BitmapColor( nRed, nGreen, nBlue ) ); + } + nDataSize += ( (ULONG)nWidth ) * 2; + } + else + { + nSrcBitsPos = pPict->Tell(); + if ( nRowBytes > 250 ) + { + *pPict >> nByteCount; + nByteCount += 2; + } + else + { + *pPict >> nByteCountAsByte; + nByteCount = ( (USHORT)nByteCountAsByte ) & 0x00ff; + nByteCount++; + } + while ( nx != nWidth ) + { + *pPict >> nFlagCounterByte; + if ( (nFlagCounterByte & 0x80) == 0) + { + nCount=((USHORT)nFlagCounterByte)+1; + if ( nCount + nx > nWidth) // SJ: the RLE decoding seems not to be correct here, + nCount = nWidth - nx; // I don't want to change this until I have a bugdoc for + for (i=0; i> nD; + nRed = (BYTE)( nD >> 7 ); + nGreen = (BYTE)( nD >> 2 ); + nBlue = (BYTE)( nD << 3 ); + pAcc->SetPixel( ny, nx++, BitmapColor( nRed, nGreen, nBlue ) ); + } + } + else + { + nCount=(1-(((USHORT)nFlagCounterByte)|0xff00)); + if ( nCount + nx > nWidth ) + nCount = nWidth - nx; + *pPict >> nD; + nRed = (BYTE)( nD >> 7 ); + nGreen = (BYTE)( nD >> 2 ); + nBlue = (BYTE)( nD << 3 ); + for (i=0; iSetPixel( ny, nx++, BitmapColor( nRed, nGreen, nBlue ) ); + } + } + } + nDataSize+=(ULONG)nByteCount; + pPict->Seek(nSrcBitsPos+(ULONG)nByteCount); + } + } + } + else if (nPixelSize==32) + { + BYTE nByteCountAsByte, nFlagCounterByte; + USHORT nByteCount, nCount; + ULONG nSrcBitsPos; + BitmapColor aBitmapColor; + if ( ( pReadAcc = aBitmap.AcquireReadAccess() ) == NULL ) + BITMAPERROR; + if ( nRowBytes != 4*nWidth ) + BITMAPERROR; + + if ( nRowBytes < 8 || nPackType == 1 ) + { + for ( ny = 0; ny < nHeight; ny++ ) + { + if ( nRowBytes < 8 || nPackType == 1 ) + { + for ( nx = 0; nx < nWidth; nx++ ) + { + *pPict >> nDummy >> nRed >> nGreen >> nBlue; + pAcc->SetPixel( ny, nx, BitmapColor( nRed, nGreen, nBlue) ); + } + nDataSize += ( (ULONG)nWidth ) * 4; + } + } + } + else if ( nPackType == 2 ) + { + for ( ny = 0; ny < nHeight; ny++ ) + { + for ( nx = 0; nx < nWidth; nx++ ) + { + *pPict >> nRed >> nGreen >> nBlue; + pAcc->SetPixel( ny, nx, BitmapColor( nRed, nGreen, nBlue ) ); + } + nDataSize += ( (ULONG)nWidth ) * 3; + } + } + else + { + if ( ( nCmpCount == 3 ) || ( nCmpCount == 4 ) ) + { + sal_uInt8* pScanline = new sal_uInt8[ nWidth * nCmpCount ]; + for ( ny = 0; ny < nHeight; ny++ ) + { + nSrcBitsPos = pPict->Tell(); + if ( nRowBytes > 250 ) + { + *pPict >> nByteCount; + nByteCount += 2; + } + else + { + *pPict >> nByteCountAsByte; + nByteCount = (BYTE)nByteCountAsByte; + nByteCount++; + } + i = 0; + while( i < (sal_uInt32)( nWidth * nCmpCount ) ) + { + *pPict >> nFlagCounterByte; + if ( ( nFlagCounterByte & 0x80 ) == 0) + { + nCount = ( (USHORT)nFlagCounterByte ) + 1; + if ( ( i + nCount ) > (sal_uInt32)( nWidth * nCmpCount ) ) + nCount = (sal_uInt16)( nWidth * nCmpCount - i ); + while( nCount-- ) + { + *pPict >> nDat; + pScanline[ i++ ] = nDat; + } + } + else + { + nCount = ( 1 - ( ( (USHORT)nFlagCounterByte ) | 0xff00 ) ); + if ( ( i + nCount ) > (sal_uInt32)( nWidth * nCmpCount ) ) + nCount = (sal_uInt16)( nWidth * nCmpCount - i ); + *pPict >> nDat; + while( nCount-- ) + pScanline[ i++ ] = nDat; + } + } + sal_uInt8* pTmp = pScanline; + if ( nCmpCount == 4 ) + pTmp += nWidth; + for ( nx = 0; nx < nWidth; pTmp++ ) + pAcc->SetPixel( ny, nx++, BitmapColor( *pTmp, pTmp[ nWidth ], pTmp[ 2 * nWidth ] ) ); + nDataSize += (ULONG)nByteCount; + pPict->Seek( nSrcBitsPos + (ULONG)nByteCount ); + } + delete[] pScanline; + } + } + } + else + BITMAPERROR; + if ( pReadAcc ) + aBitmap.ReleaseAccess( pReadAcc ); + aBitmap.ReleaseAccess( pAcc ); + rBitmap = aBitmap; + return nDataSize; +} + +void PictReader::ReadHeader() +{ + char nC; + short y1,x1,y2,x2; + + sal_Char sBuf[ 3 ]; + pPict->SeekRel( 10 ); + pPict->Read( sBuf, 3 ); + if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && ( sBuf[ 2 ] == 0x01 || sBuf[ 2 ] == 0x02 ) ) + pPict->SeekRel( -13 ); // this maybe a pict from a ms document + else + pPict->SeekRel( 512 - 13 ); // 512 Bytes Muell am Anfang + + pPict->SeekRel(2); // Lo-16-bits von "picture size" + *pPict >> y1 >> x1 >> y2 >> x2; // Rahmen-Rechteck des Bildes + aBoundingRect=Rectangle( x1,y1, --x2, --y2 ); + + // Jetzt kommen x-beliebig viele Nullen + // (in manchen Dateien tatsaechlich mehr als eine): + do { *pPict >> nC; } while (nC==0 && pPict->IsEof()==FALSE); + + // dann sollte der Versions-Opcode 0x11 folgen, dann die Versionsnummer: + if (nC==0x11) + { + *pPict >> nC; + if ( nC == 0x01 ) + IsVersion2 = FALSE; // Version 1 + else // Version 2 oder hoeher + { + short nExtVer; + // 3 Bytes ueberspringen, um auf + // ExtVersion2 oder Version2 zu kommen + pPict->SeekRel( 3 ); + *pPict >> nExtVer; + + // nachsehen, ob wir einen Extended-Version2-Header (==-2) haben + // oder einen einfachen Version2-Header (==-1); + // dementsprechend Aufloesung einlesen oder nicht + if ( nExtVer == -2 ) + { + sal_Int16 nReserved; + sal_Int32 nHResFixed, nVResFixed; + *pPict >> nReserved >> nHResFixed >> nVResFixed; + double fHRes = nHResFixed; + fHRes /= 65536; + double fVRes = nVResFixed; + fVRes /= 65536; + aHRes /= fHRes; + aVRes /= fVRes; + *pPict >> y1 >> x1 >> y2 >> x2; // reading the optimal bounding rect + aBoundingRect=Rectangle( x1,y1, --x2, --y2 ); + pPict->SeekRel( -22 ); + } + else + { + pPict->SeekRel( -4 ); + } + IsVersion2=TRUE; + } + } + else { + // Eigentlich ist dies wohl kein Pict-File, aber es gibt tatsaechlich + // Dateien, bei denen mehr als 512 Bytes "Muell" am Anfang stehen. + // Somit koennte es theoretisch folgende Art von Header geben: + // + // <0x11> .. + // Da aber in so einem Fall die Position von kaum auszumachen ist, + // gehen wir nun davon aus, dass in einer Datei immer entweder genau 512 Bytes Muell + // am Anfang sind (wie oben versucht), oder (wie normalerweise ueblich) genau eine 0 zwischen + // Bounding-Rectangle und 0x11. Des weiteren mag es hoechstens 1024 Bytes Muell geben, + // und das Ganze nur fuer Version 1 oder 2. + // Somit suchen wir nun nach der Folge 0x00,0x11,0x01 oder 0x00,0x11,0x02 innerhalb der + // "zweiten" 512 Bytes, und nehmen an, dass davor das Bounding-Rect steht, und hoffen + // dass das alles so seine Richtigkeit hat. + BYTE n1,n2,n3; + USHORT i,Found; + pPict->Seek(522); + Found=0; + *pPict >> n1 >> n2 >> n3; + for (i=0; i<512; i++) { + if (n1==0x00 && n2==0x11 && (n3==0x01 || n3==0x02)) { Found=1; break; } + n1=n2; n2=n3; *pPict >> n3; + } + if (Found!=0) { + pPict->SeekRel(-11); + *pPict >> y1 >> x1 >> y2 >> x2; + // Lieber nochmal nachsehen, ob das Bounding-Rectangle gut zu sein scheint: + if (x1+10=-2048 && x1>=-2048 && x2<=2048 && y2<=2048) { + aBoundingRect=Rectangle( x1, y1, --x2, --y2 ); + if (n3==0x01) { + pPict->SeekRel(3); + IsVersion2=FALSE; + } + else { + pPict->SeekRel(4); + IsVersion2=TRUE; + } + } + else pPict->SetError(SVSTREAM_FILEFORMAT_ERROR); + } + else pPict->SetError(SVSTREAM_FILEFORMAT_ERROR); + } +} + + +ULONG PictReader::ReadData(USHORT nOpcode) +{ + USHORT nUSHORT; + Point aPoint; + ULONG nDataSize=0; + + switch(nOpcode) { + + case 0x0000: // NOP + nDataSize=0; + break; + + case 0x0001: { // Clip + Rectangle aRect; + *pPict >> nUSHORT; + nDataSize=nUSHORT; + ReadRectangle(aRect); + pVirDev->SetClipRegion( Region( aRect ) ); + break; + } + case 0x0002: // BkPat + nDataSize=ReadPattern(NULL,&eActBackStyle); + eActMethod=PDM_UNDEFINED; + break; + + case 0x0003: // TxFont + *pPict >> nUSHORT; + if (nUSHORT <= 1) aActFont.SetFamily(FAMILY_SWISS); + else if (nUSHORT <= 12) aActFont.SetFamily(FAMILY_DECORATIVE); + else if (nUSHORT <= 20) aActFont.SetFamily(FAMILY_ROMAN); + else if (nUSHORT == 21) aActFont.SetFamily(FAMILY_SWISS); + else if (nUSHORT == 22) aActFont.SetFamily(FAMILY_MODERN); + else if (nUSHORT <= 1023) aActFont.SetFamily(FAMILY_SWISS); + else aActFont.SetFamily(FAMILY_ROMAN); + if ( nUSHORT == 23 ) aActFont.SetCharSet( RTL_TEXTENCODING_SYMBOL ); + else aActFont.SetCharSet( gsl_getSystemTextEncoding() ); + eActMethod=PDM_UNDEFINED; + nDataSize=2; + break; + + case 0x0004: { // TxFace + char nFace; + *pPict >> nFace; + if ( (nFace & 0x01)!=0 ) aActFont.SetWeight(WEIGHT_BOLD); + else aActFont.SetWeight(WEIGHT_NORMAL); + if ( (nFace & 0x02)!=0 ) aActFont.SetItalic(ITALIC_NORMAL); + else aActFont.SetItalic(ITALIC_NONE); + if ( (nFace & 0x04)!=0 ) aActFont.SetUnderline(UNDERLINE_SINGLE); + else aActFont.SetUnderline(UNDERLINE_NONE); + if ( (nFace & 0x08)!=0 ) aActFont.SetOutline(TRUE); + else aActFont.SetOutline(FALSE); + if ( (nFace & 0x10)!=0 ) aActFont.SetShadow(TRUE); + else aActFont.SetShadow(FALSE); + eActMethod=PDM_UNDEFINED; + nDataSize=1; + break; + } + case 0x0005: // TxMode + nDataSize=2; + break; + + case 0x0006: // SpExtra + nDataSize=4; + break; + + case 0x0007: { // PnSize + Size aSize; + aSize=ReadSize(); + nActPenSize=(USHORT)((aSize.Width()+aSize.Height())/2); + eActMethod=PDM_UNDEFINED; + nDataSize=4; + break; + } + case 0x0008: // PnMode + *pPict >> nUSHORT; + switch (nUSHORT & 0x0007) { + case 0: eActROP=ROP_OVERPAINT; break; // Copy + case 1: eActROP=ROP_OVERPAINT; break; // Or + case 2: eActROP=ROP_XOR; break; // Xor + case 3: eActROP=ROP_OVERPAINT; break; // Bic + case 4: eActROP=ROP_INVERT; break; // notCopy + case 5: eActROP=ROP_OVERPAINT; break; // notOr + case 6: eActROP=ROP_XOR; break; // notXor + case 7: eActROP=ROP_OVERPAINT; break; // notBic + } + eActMethod=PDM_UNDEFINED; + nDataSize=2; + break; + + case 0x0009: // PnPat + nDataSize=ReadPattern(&eActPenPenStyle,&eActPenBrushStyle); + eActMethod=PDM_UNDEFINED; + break; + + case 0x000a: // FillPat + nDataSize=ReadPattern(NULL,&eActFillStyle); + eActMethod=PDM_UNDEFINED; + break; + + case 0x000b: // OvSize + aActOvalSize=ReadSize(); + nDataSize=4; + break; + + case 0x000c: // Origin + nDataSize=4; + break; + + case 0x000d: // TxSize + { + *pPict >> nUSHORT; + aActFont.SetSize( Size( 0, (long)nUSHORT ) ); + eActMethod=PDM_UNDEFINED; + nDataSize=2; + } + break; + + case 0x000e: // FgColor + aActForeColor=ReadColor(); + eActMethod=PDM_UNDEFINED; + nDataSize=4; + break; + + case 0x000f: // BkColor + aActBackColor=ReadColor(); + nDataSize=4; + break; + + case 0x0010: // TxRatio + nDataSize=8; + break; + + case 0x0011: // VersionOp + nDataSize=1; + break; + + case 0x0012: // BkPixPat + nDataSize=ReadPixPattern(NULL,&eActBackStyle); + eActMethod=PDM_UNDEFINED; + break; + + case 0x0013: // PnPixPat + nDataSize=ReadPixPattern(&eActPenPenStyle,&eActPenBrushStyle); + eActMethod=PDM_UNDEFINED; + break; + + case 0x0014: // FillPixPat + nDataSize=ReadPixPattern(NULL,&eActFillStyle); + eActMethod=PDM_UNDEFINED; + break; + + case 0x0015: // PnLocHFrac + nDataSize=2; + break; + + case 0x0016: // ChExtra + nDataSize=2; + break; + + case 0x0017: // Reserved (0 Bytes) + case 0x0018: // Reserved (0 Bytes) + case 0x0019: // Reserved (0 Bytes) + nDataSize=0; + break; + + case 0x001a: // RGBFgCol + aActForeColor=ReadRGBColor(); + eActMethod=PDM_UNDEFINED; + nDataSize=6; + break; + + case 0x001b: // RGBBkCol + aActBackColor=ReadRGBColor(); + eActMethod=PDM_UNDEFINED; + nDataSize=6; + break; + + case 0x001c: // HiliteMode + nDataSize=0; + break; + + case 0x001d: // HiliteColor + nDataSize=6; + break; + + case 0x001e: // DefHilite + nDataSize=0; + break; + + case 0x001f: // OpColor + nDataSize=6; + break; + + case 0x0020: // Line + aPoint=ReadPoint(); aPenPosition=ReadPoint(); + DrawingMethod(PDM_FRAME); + pVirDev->DrawLine(aPoint,aPenPosition); + nDataSize=8; + break; + + case 0x0021: // LineFrom + aPoint=aPenPosition; aPenPosition=ReadPoint(); + DrawingMethod(PDM_FRAME); + pVirDev->DrawLine(aPoint,aPenPosition); + nDataSize=4; + break; + + case 0x0022: // ShortLine + aPoint=ReadPoint(); + aPenPosition=ReadDeltaH(aPoint); + aPenPosition=ReadDeltaV(aPenPosition); + DrawingMethod(PDM_FRAME); + pVirDev->DrawLine(aPoint,aPenPosition); + nDataSize=6; + break; + + case 0x0023: // ShortLineFrom + aPoint=aPenPosition; + aPenPosition=ReadDeltaH(aPoint); + aPenPosition=ReadDeltaV(aPenPosition); + DrawingMethod(PDM_FRAME); + pVirDev->DrawLine(aPoint,aPenPosition); + nDataSize=2; + break; + + case 0x0024: // Reserved (n Bytes) + case 0x0025: // Reserved (n Bytes) + case 0x0026: // Reserved (n Bytes) + case 0x0027: // Reserved (n Bytes) + *pPict >> nUSHORT; + nDataSize=2+nUSHORT; + break; + + case 0x0028: // LongText + aTextPosition=ReadPoint(); + nDataSize=4+ReadAndDrawText(); + break; + + case 0x0029: // DHText + aTextPosition=ReadUnsignedDeltaH(aTextPosition); + nDataSize=1+ReadAndDrawText(); + break; + + case 0x002a: // DVText + aTextPosition=ReadUnsignedDeltaV(aTextPosition); + nDataSize=1+ReadAndDrawText(); + break; + + case 0x002b: // DHDVText + aTextPosition=ReadUnsignedDeltaH(aTextPosition); + aTextPosition=ReadUnsignedDeltaV(aTextPosition); + nDataSize=2+ReadAndDrawText(); + break; + + case 0x002c: { // fontName + char sFName[ 256 ], nByteLen; + sal_uInt16 nLen; + *pPict >> nUSHORT; nDataSize=nUSHORT+2; + *pPict >> nUSHORT; + if (nUSHORT <= 1) aActFont.SetFamily(FAMILY_SWISS); + else if (nUSHORT <= 12) aActFont.SetFamily(FAMILY_DECORATIVE); + else if (nUSHORT <= 20) aActFont.SetFamily(FAMILY_ROMAN); + else if (nUSHORT == 21) aActFont.SetFamily(FAMILY_SWISS); + else if (nUSHORT == 22) aActFont.SetFamily(FAMILY_MODERN); + else if (nUSHORT <= 1023) aActFont.SetFamily(FAMILY_SWISS); + else aActFont.SetFamily(FAMILY_ROMAN); + if (nUSHORT==23) aActFont.SetCharSet( RTL_TEXTENCODING_SYMBOL); + else aActFont.SetCharSet( gsl_getSystemTextEncoding() ); + *pPict >> nByteLen; nLen=((USHORT)nByteLen)&0x00ff; + pPict->Read( &sFName, nLen ); + sFName[ nLen ] = 0; + String aString( (const sal_Char*)&sFName, gsl_getSystemTextEncoding() ); + aActFont.SetName( aString ); + eActMethod=PDM_UNDEFINED; + break; + } + case 0x002d: // lineJustify + nDataSize=10; + break; + + case 0x002e: // glyphState + *pPict >> nUSHORT; + nDataSize=2+nUSHORT; + break; + + case 0x002f: // Reserved (n Bytes) + *pPict >> nUSHORT; + nDataSize=2+nUSHORT; + break; + + case 0x0030: // frameRect + nDataSize=ReadAndDrawRect(PDM_FRAME); + break; + + case 0x0031: // paintRect + nDataSize=ReadAndDrawRect(PDM_PAINT); + break; + + case 0x0032: // eraseRect + nDataSize=ReadAndDrawRect(PDM_ERASE); + break; + + case 0x0033: // invertRect + nDataSize=ReadAndDrawRect(PDM_INVERT); + break; + + case 0x0034: // fillRect + nDataSize=ReadAndDrawRect(PDM_FILL); + break; + + case 0x0035: // Reserved (8 Bytes) + case 0x0036: // Reserved (8 Bytes) + case 0x0037: // Reserved (8 Bytes) + nDataSize=8; + break; + + case 0x0038: // frameSameRect + nDataSize=ReadAndDrawSameRect(PDM_FRAME); + break; + + case 0x0039: // paintSameRect + nDataSize=ReadAndDrawSameRect(PDM_PAINT); + break; + + case 0x003a: // eraseSameRect + nDataSize=ReadAndDrawSameRect(PDM_ERASE); + break; + + case 0x003b: // invertSameRect + nDataSize=ReadAndDrawSameRect(PDM_INVERT); + break; + + case 0x003c: // fillSameRect + nDataSize=ReadAndDrawSameRect(PDM_FILL); + break; + + case 0x003d: // Reserved (0 Bytes) + case 0x003e: // Reserved (0 Bytes) + case 0x003f: // Reserved (0 Bytes) + nDataSize=0; + break; + + case 0x0040: // frameRRect + nDataSize=ReadAndDrawRoundRect(PDM_FRAME); + break; + + case 0x0041: // paintRRect + nDataSize=ReadAndDrawRoundRect(PDM_PAINT); + break; + + case 0x0042: // eraseRRect + nDataSize=ReadAndDrawRoundRect(PDM_ERASE); + break; + + case 0x0043: // invertRRect + nDataSize=ReadAndDrawRoundRect(PDM_INVERT); + break; + + case 0x0044: // fillRRect + nDataSize=ReadAndDrawRoundRect(PDM_FILL); + break; + + case 0x0045: // Reserved (8 Bytes) + case 0x0046: // Reserved (8 Bytes) + case 0x0047: // Reserved (8 Bytes) + nDataSize=8; + break; + + case 0x0048: // frameSameRRect + nDataSize=ReadAndDrawSameRoundRect(PDM_FRAME); + break; + + case 0x0049: // paintSameRRect + nDataSize=ReadAndDrawSameRoundRect(PDM_PAINT); + break; + + case 0x004a: // eraseSameRRect + nDataSize=ReadAndDrawSameRoundRect(PDM_ERASE); + break; + + case 0x004b: // invertSameRRect + nDataSize=ReadAndDrawSameRoundRect(PDM_INVERT); + break; + + case 0x004c: // fillSameRRect + nDataSize=ReadAndDrawSameRoundRect(PDM_FILL); + break; + + case 0x004d: // Reserved (0 Bytes) + case 0x004e: // Reserved (0 Bytes) + case 0x004f: // Reserved (0 Bytes) + nDataSize=0; + break; + + case 0x0050: // frameOval + nDataSize=ReadAndDrawOval(PDM_FRAME); + break; + + case 0x0051: // paintOval + nDataSize=ReadAndDrawOval(PDM_PAINT); + break; + + case 0x0052: // eraseOval + nDataSize=ReadAndDrawOval(PDM_ERASE); + break; + + case 0x0053: // invertOval + nDataSize=ReadAndDrawOval(PDM_INVERT); + break; + + case 0x0054: // fillOval + nDataSize=ReadAndDrawOval(PDM_FILL); + break; + + case 0x0055: // Reserved (8 Bytes) + case 0x0056: // Reserved (8 Bytes) + case 0x0057: // Reserved (8 Bytes) + nDataSize=8; + break; + + case 0x0058: // frameSameOval + nDataSize=ReadAndDrawSameOval(PDM_FRAME); + break; + + case 0x0059: // paintSameOval + nDataSize=ReadAndDrawSameOval(PDM_PAINT); + break; + + case 0x005a: // eraseSameOval + nDataSize=ReadAndDrawSameOval(PDM_ERASE); + break; + + case 0x005b: // invertSameOval + nDataSize=ReadAndDrawSameOval(PDM_INVERT); + break; + + case 0x005c: // fillSameOval + nDataSize=ReadAndDrawSameOval(PDM_FILL); + break; + + case 0x005d: // Reserved (0 Bytes) + case 0x005e: // Reserved (0 Bytes) + case 0x005f: // Reserved (0 Bytes) + nDataSize=0; + break; + + case 0x0060: // frameArc + nDataSize=ReadAndDrawArc(PDM_FRAME); + break; + + case 0x0061: // paintArc + nDataSize=ReadAndDrawArc(PDM_PAINT); + break; + + case 0x0062: // eraseArc + nDataSize=ReadAndDrawArc(PDM_ERASE); + break; + + case 0x0063: // invertArc + nDataSize=ReadAndDrawArc(PDM_INVERT); + break; + + case 0x0064: // fillArc + nDataSize=ReadAndDrawArc(PDM_FILL); + break; + + case 0x0065: // Reserved (12 Bytes) + case 0x0066: // Reserved (12 Bytes) + case 0x0067: // Reserved (12 Bytes) + nDataSize=12; + break; + + case 0x0068: // frameSameArc + nDataSize=ReadAndDrawSameArc(PDM_FRAME); + break; + + case 0x0069: // paintSameArc + nDataSize=ReadAndDrawSameArc(PDM_PAINT); + break; + + case 0x006a: // eraseSameArc + nDataSize=ReadAndDrawSameArc(PDM_ERASE); + break; + + case 0x006b: // invertSameArc + nDataSize=ReadAndDrawSameArc(PDM_INVERT); + break; + + case 0x006c: // fillSameArc + nDataSize=ReadAndDrawSameArc(PDM_FILL); + break; + + case 0x006d: // Reserved (4 Bytes) + case 0x006e: // Reserved (4 Bytes) + case 0x006f: // Reserved (4 Bytes) + nDataSize=4; + break; + + case 0x0070: // framePoly + nDataSize=ReadAndDrawPolygon(PDM_FRAME); + break; + + case 0x0071: // paintPoly + nDataSize=ReadAndDrawPolygon(PDM_PAINT); + break; + + case 0x0072: // erasePoly + nDataSize=ReadAndDrawPolygon(PDM_ERASE); + break; + + case 0x0073: // invertPoly + nDataSize=ReadAndDrawPolygon(PDM_INVERT); + break; + + case 0x0074: // fillPoly + nDataSize=ReadAndDrawPolygon(PDM_FILL); + break; + + case 0x0075: // Reserved (Polygon-Size) + case 0x0076: // Reserved (Polygon-Size) + case 0x0077: // Reserved (Polygon-Size) + *pPict >> nUSHORT; nDataSize=nUSHORT; + break; + + case 0x0078: // frameSamePoly + nDataSize=ReadAndDrawSamePolygon(PDM_FRAME); + break; + + case 0x0079: // paintSamePoly + nDataSize=ReadAndDrawSamePolygon(PDM_PAINT); + break; + + case 0x007a: // eraseSamePoly + nDataSize=ReadAndDrawSamePolygon(PDM_ERASE); + break; + + case 0x007b: // invertSamePoly + nDataSize=ReadAndDrawSamePolygon(PDM_INVERT); + break; + + case 0x007c: // fillSamePoly + nDataSize=ReadAndDrawSamePolygon(PDM_FILL); + break; + + case 0x007d: // Reserved (0 Bytes) + case 0x007e: // Reserved (0 Bytes) + case 0x007f: // Reserved (0 Bytes) + nDataSize=0; + break; + + case 0x0080: // frameRgn + nDataSize=ReadAndDrawRgn(PDM_FILL); + break; + + case 0x0081: // paintRgn + nDataSize=ReadAndDrawRgn(PDM_PAINT); + break; + + case 0x0082: // eraseRgn + nDataSize=ReadAndDrawRgn(PDM_ERASE); + break; + + case 0x0083: // invertRgn + nDataSize=ReadAndDrawRgn(PDM_INVERT); + break; + + case 0x0084: // fillRgn + nDataSize=ReadAndDrawRgn(PDM_FILL); + break; + + case 0x0085: // Reserved (Region-Size) + case 0x0086: // Reserved (Region-Size) + case 0x0087: // Reserved (Region-Size) + *pPict >> nUSHORT; nDataSize=nUSHORT; + break; + + case 0x0088: // frameSameRgn + nDataSize=ReadAndDrawSameRgn(PDM_FRAME); + break; + + case 0x0089: // paintSameRgn + nDataSize=ReadAndDrawSameRgn(PDM_PAINT); + break; + + case 0x008a: // eraseSameRgn + nDataSize=ReadAndDrawSameRgn(PDM_ERASE); + break; + + case 0x008b: // invertSameRgn + nDataSize=ReadAndDrawSameRgn(PDM_INVERT); + break; + + case 0x008c: // fillSameRgn + nDataSize=ReadAndDrawSameRgn(PDM_FILL); + break; + + case 0x008d: // Reserved (0 Bytes) + case 0x008e: // Reserved (0 Bytes) + case 0x008f: // Reserved (0 Bytes) + nDataSize=0; + break; + + case 0x0090: { // BitsRect + Bitmap aBmp; + Rectangle aSrcRect, aDestRect; + nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, FALSE); + DrawingMethod(PDM_PAINT); + pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); + break; + } + case 0x0091: { // BitsRgn + Bitmap aBmp; + Rectangle aSrcRect, aDestRect; + nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, TRUE); + DrawingMethod(PDM_PAINT); + pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); + break; + } + case 0x0092: // Reserved (n Bytes) + case 0x0093: // Reserved (n Bytes) + case 0x0094: // Reserved (n Bytes) + case 0x0095: // Reserved (n Bytes) + case 0x0096: // Reserved (n Bytes) + case 0x0097: // Reserved (n Bytes) + *pPict >> nUSHORT; nDataSize=2+nUSHORT; + break; + + case 0x0098: { // PackBitsRect + Bitmap aBmp; + Rectangle aSrcRect, aDestRect; + nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, FALSE); + DrawingMethod(PDM_PAINT); + pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); + break; + } + case 0x0099: { // PackBitsRgn + Bitmap aBmp; + Rectangle aSrcRect, aDestRect; + nDataSize=ReadPixMapEtc(aBmp, FALSE, TRUE, &aSrcRect, &aDestRect, TRUE, TRUE); + DrawingMethod(PDM_PAINT); + pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); + break; + } + case 0x009a: { // DirectBitsRect + Bitmap aBmp; + Rectangle aSrcRect, aDestRect; + nDataSize=ReadPixMapEtc(aBmp, TRUE, FALSE, &aSrcRect, &aDestRect, TRUE, FALSE); + DrawingMethod(PDM_PAINT); + pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); + break; + } + case 0x009b: { // DirectBitsRgn + Bitmap aBmp; + Rectangle aSrcRect, aDestRect; + nDataSize=ReadPixMapEtc(aBmp, TRUE, FALSE, &aSrcRect, &aDestRect, TRUE, TRUE); + DrawingMethod(PDM_PAINT); + pVirDev->DrawBitmap(aDestRect.TopLeft(),aDestRect.GetSize(),aBmp); + break; + } + case 0x009c: // Reserved (n Bytes) + case 0x009d: // Reserved (n Bytes) + case 0x009e: // Reserved (n Bytes) + case 0x009f: // Reserved (n Bytes) + *pPict >> nUSHORT; nDataSize=2+nUSHORT; + break; + + case 0x00a0: // ShortComment + nDataSize=2; + break; + + case 0x00a1: // LongComment + pPict->SeekRel(2); *pPict >> nUSHORT; nDataSize=4+nUSHORT; + break; + + default: // 0x00a2 bis 0xffff (zumeist Reserved) + if (nOpcode<=0x00af) { *pPict >> nUSHORT; nDataSize=2+nUSHORT; } + else if (nOpcode<=0x00cf) { nDataSize=0; } + else if (nOpcode<=0x00fe) { sal_uInt32 nTemp; *pPict >> nTemp ; nDataSize = nTemp; nDataSize+=4; } + else if (nOpcode==0x00ff) { nDataSize=2; } // OpEndPic + else if (nOpcode<=0x01ff) { nDataSize=2; } + else if (nOpcode<=0x0bfe) { nDataSize=4; } + else if (nOpcode<=0x0bff) { nDataSize=22; } + else if (nOpcode==0x0c00) { nDataSize=24; } // HeaderOp + else if (nOpcode<=0x7eff) { nDataSize=24; } + else if (nOpcode<=0x7fff) { nDataSize=254; } + else if (nOpcode<=0x80ff) { nDataSize=0; } + else { sal_uInt32 nTemp; *pPict >> nTemp ; nDataSize = nTemp; nDataSize+=4; } + } + + if (nDataSize==0xffffffff) { + pPict->SetError(SVSTREAM_FILEFORMAT_ERROR); + return 0; + } + return nDataSize; +} + +void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) +{ + USHORT nOpcode; + BYTE nOneByteOpcode; + ULONG nSize, nPos, nStartPos, nEndPos, nPercent, nLastPercent; + + pPict = &rStreamPict; + nOrigPos = pPict->Tell(); + nOrigNumberFormat = pPict->GetNumberFormatInt(); + + aActForeColor = Color(COL_BLACK); + aActBackColor = Color(COL_WHITE); + eActPenPenStyle = PEN_SOLID; + eActPenBrushStyle = BRUSH_SOLID; + eActFillStyle = BRUSH_SOLID; + eActBackStyle = BRUSH_SOLID; + nActPenSize = 1; + eActROP = ROP_OVERPAINT; + eActMethod = PDM_UNDEFINED; + aActOvalSize = Size(1,1); + + aActFont.SetCharSet( gsl_getSystemTextEncoding() ); + aActFont.SetFamily(FAMILY_SWISS); + aActFont.SetSize(Size(0,12)); + aActFont.SetAlign(ALIGN_BASELINE); + + aHRes = aVRes = Fraction( 1, 1 ); + + pVirDev = new VirtualDevice(); + pVirDev->EnableOutput(FALSE); + rGDIMetaFile.Record(pVirDev); + + pPict->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); + + nStartPos=pPict->Tell(); + nEndPos=pPict->Seek(STREAM_SEEK_TO_END); pPict->Seek(nStartPos); + Callback(0); nLastPercent=0; + + ReadHeader(); + + aPenPosition=Point(-aBoundingRect.Left(),-aBoundingRect.Top()); + aTextPosition=aPenPosition; + + nPos=pPict->Tell(); + + for (;;) { + + nPercent=(nPos-nStartPos)*100/(nEndPos-nStartPos); + if (nLastPercent+4<=nPercent) { + if (Callback((USHORT)nPercent)==TRUE) break; + nLastPercent=nPercent; + } + + if (IsVersion2 ) + *pPict >> nOpcode; + else + { + *pPict >> nOneByteOpcode; + nOpcode=(USHORT)nOneByteOpcode; + } + + if (pPict->GetError()) + break; + + if (pPict->IsEof()) + { + pPict->SetError(SVSTREAM_FILEFORMAT_ERROR); + break; + } + + if (nOpcode==0x00ff) + break; + + nSize=ReadData(nOpcode); + + if ( IsVersion2 ) + { + if ( nSize & 1 ) + nSize++; + + nPos+=2+nSize; + } + else + nPos+=1+nSize; + + pPict->Seek(nPos); + } + + rGDIMetaFile.Stop(); + delete pVirDev; + + rGDIMetaFile.SetPrefMapMode( MapMode( MAP_INCH, Point(), aHRes, aVRes ) ); + rGDIMetaFile.SetPrefSize( aBoundingRect.GetSize() ); + + pPict->SetNumberFormatInt(nOrigNumberFormat); + + if (pPict->GetError()) pPict->Seek(nOrigPos); +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport( SvStream& rIStm, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + GDIMetaFile aMTF; + PictReader aPictReader; + BOOL bRet = FALSE; + + aPictReader.ReadPict( rIStm, aMTF ); + + if ( !rIStm.GetError() ) + { + rGraphic = Graphic( aMTF ); + bRet = TRUE; + } + + return bRet; +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/ipict/makefile.mk b/filter/source/graphicfilter/ipict/makefile.mk new file mode 100644 index 000000000000..679fd79951ac --- /dev/null +++ b/filter/source/graphicfilter/ipict/makefile.mk @@ -0,0 +1,68 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=ipict +DEPTARGET=vipict + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/ipict.obj + +# ========================================================================== + +SHL1TARGET= ipt$(DLLPOSTFIX) +SHL1IMPLIB= ipict +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/ipict.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/ipict.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk + diff --git a/filter/source/graphicfilter/ipsd/exports.map b/filter/source/graphicfilter/ipsd/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/ipsd/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/ipsd/ipsd.cxx b/filter/source/graphicfilter/ipsd/ipsd.cxx new file mode 100644 index 000000000000..70cd1ab13f29 --- /dev/null +++ b/filter/source/graphicfilter/ipsd/ipsd.cxx @@ -0,0 +1,763 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include + +//============================ PSDReader ================================== + +#define PSD_BITMAP 0 +#define PSD_GRAYSCALE 1 +#define PSD_INDEXED 2 +#define PSD_RGB 3 +#define PSD_CMYK 4 +#define PSD_MULTICHANNEL 7 +#define PSD_DUOTONE 8 +#define PSD_LAB 9 + +typedef struct +{ + UINT32 nSignature; + UINT16 nVersion; + UINT32 nPad1; + UINT16 nPad2; + UINT16 nChannels; + UINT32 nRows; + UINT32 nColumns; + UINT16 nDepth; + UINT16 nMode; + +} PSDFileHeader; + +class PSDReader { + +private: + + SvStream* mpPSD; // Die einzulesende PSD-Datei + PSDFileHeader* mpFileHeader; + + sal_uInt32 mnXResFixed; + sal_uInt32 mnYResFixed; + + sal_Bool mbStatus; + sal_Bool mbTransparent; + + Bitmap maBmp; + Bitmap maMaskBmp; + BitmapReadAccess* mpReadAcc; + BitmapWriteAccess* mpWriteAcc; + BitmapWriteAccess* mpMaskWriteAcc; + USHORT mnDestBitDepth; + BOOL mbCompression; // RLE decoding + BYTE* mpPalette; + + BOOL ImplReadBody(); + BOOL ImplReadHeader(); + +public: + PSDReader(); + ~PSDReader(); + BOOL ReadPSD( SvStream & rPSD, Graphic & rGraphic ); +}; + +//=================== Methoden von PSDReader ============================== + +PSDReader::PSDReader() : + mpFileHeader ( NULL ), + mnXResFixed ( 0 ), + mnYResFixed ( 0 ), + mbStatus ( TRUE ), + mbTransparent ( FALSE ), + mpReadAcc ( NULL ), + mpWriteAcc ( NULL ), + mpMaskWriteAcc ( NULL ), + mpPalette ( NULL ) +{ +} + +PSDReader::~PSDReader() +{ + delete[] mpPalette; + delete mpFileHeader; +} + +// ------------------------------------------------------------------------ + +BOOL PSDReader::ReadPSD( SvStream & rPSD, Graphic & rGraphic ) +{ + if ( rPSD.GetError() ) + return FALSE; + + mpPSD = &rPSD; + mpPSD->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + + // Kopf einlesen: + + if ( ImplReadHeader() == FALSE ) + return FALSE; + + Size aBitmapSize( mpFileHeader->nColumns, mpFileHeader->nRows ); + maBmp = Bitmap( aBitmapSize, mnDestBitDepth ); + if ( ( mpWriteAcc = maBmp.AcquireWriteAccess() ) == NULL ) + mbStatus = FALSE; + if ( ( mpReadAcc = maBmp.AcquireReadAccess() ) == NULL ) + mbStatus = FALSE; + if ( mbTransparent && mbStatus ) + { + maMaskBmp = Bitmap( aBitmapSize, 1 ); + if ( ( mpMaskWriteAcc = maMaskBmp.AcquireWriteAccess() ) == NULL ) + mbStatus = FALSE; + } + if ( mpPalette && mbStatus ) + { + mpWriteAcc->SetPaletteEntryCount( 256 ); + for ( USHORT i = 0; i < 256; i++ ) + { + mpWriteAcc->SetPaletteColor( i, Color( mpPalette[ i ], mpPalette[ i + 256 ], mpPalette[ i + 512 ] ) ); + } + } + // Bitmap-Daten einlesen + if ( mbStatus && ImplReadBody() ) + { + if ( mbTransparent ) + rGraphic = Graphic( BitmapEx( maBmp, maMaskBmp ) ); + else + rGraphic = maBmp; + + if ( mnXResFixed && mnYResFixed ) + { + Point aEmptyPoint; + Fraction aFractX( 1, mnXResFixed >> 16 ); + Fraction aFractY( 1, mnYResFixed >> 16 ); + MapMode aMapMode( MAP_INCH, aEmptyPoint, aFractX, aFractY ); + Size aPrefSize = OutputDevice::LogicToLogic( aBitmapSize, aMapMode, MAP_100TH_MM ); + rGraphic.SetPrefSize( aPrefSize ); + rGraphic.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); + } + } + else + mbStatus = FALSE; + if ( mpWriteAcc ) + maBmp.ReleaseAccess( mpWriteAcc ); + if ( mpReadAcc ) + maBmp.ReleaseAccess( mpReadAcc ); + if ( mpMaskWriteAcc ) + maMaskBmp.ReleaseAccess( mpMaskWriteAcc ); + return mbStatus; +} + +// ------------------------------------------------------------------------ + +BOOL PSDReader::ImplReadHeader() +{ + UINT16 nCompression; + UINT32 nColorLength, nResourceLength, nLayerMaskLength; + + mpFileHeader = new PSDFileHeader; + + if ( !mpFileHeader ) + return FALSE; + + *mpPSD >> mpFileHeader->nSignature >> mpFileHeader->nVersion >> mpFileHeader->nPad1 >> + mpFileHeader->nPad2 >> mpFileHeader->nChannels >> mpFileHeader->nRows >> + mpFileHeader->nColumns >> mpFileHeader->nDepth >> mpFileHeader->nMode; + + if ( ( mpFileHeader->nSignature != 0x38425053 ) || ( mpFileHeader->nVersion != 1 ) ) + return FALSE; + + if ( mpFileHeader->nRows == 0 || mpFileHeader->nColumns == 0 ) + return FALSE; + + if ( ( mpFileHeader->nRows > 30000 ) || ( mpFileHeader->nColumns > 30000 ) ) + return FALSE; + + UINT16 nDepth = mpFileHeader->nDepth; + if (!( ( nDepth == 1 ) || ( nDepth == 8 ) || ( nDepth == 16 ) ) ) + return FALSE; + + mnDestBitDepth = ( nDepth == 16 ) ? 8 : nDepth; + + *mpPSD >> nColorLength; + if ( mpFileHeader->nMode == PSD_CMYK ) + { + switch ( mpFileHeader->nChannels ) + { + case 5 : + mbTransparent = TRUE; + case 4 : + mnDestBitDepth = 24; + break; + default : + return FALSE; + } + } + else switch ( mpFileHeader->nChannels ) + { + case 2 : + mbTransparent = TRUE; + case 1 : + break; + case 4 : + mbTransparent = TRUE; + case 3 : + mnDestBitDepth = 24; + break; + default: + return FALSE; + } + + switch ( mpFileHeader->nMode ) + { + case PSD_BITMAP : + { + if ( nColorLength || ( nDepth != 1 ) ) + return FALSE; + } + break; + + case PSD_INDEXED : + { + if ( nColorLength != 768 ) // we need the color map + return FALSE; + mpPalette = new BYTE[ 768 ]; + if ( mpPalette == NULL ) + return FALSE; + mpPSD->Read( mpPalette, 768 ); + } + break; + + case PSD_DUOTONE : // we'll handle the doutone color like a normal grayscale picture + mpPSD->SeekRel( nColorLength ); + nColorLength = 0; + case PSD_GRAYSCALE : + { + if ( nColorLength ) + return FALSE; + mpPalette = new BYTE[ 768 ]; + if ( mpPalette == NULL ) + return FALSE; + for ( USHORT i = 0; i < 256; i++ ) + { + mpPalette[ i ] = mpPalette[ i + 256 ] = mpPalette[ i + 512 ] = (BYTE)i; + } + } + break; + + case PSD_CMYK : + case PSD_RGB : + case PSD_MULTICHANNEL : + case PSD_LAB : + { + if ( nColorLength ) // color table is not supported by the other graphic modes + return FALSE; + } + break; + + default: + return FALSE; + } + *mpPSD >> nResourceLength; + sal_uInt32 nLayerPos = mpPSD->Tell() + nResourceLength; + + // this is a loop over the resource entries to get the resolution info + while( mpPSD->Tell() < nLayerPos ) + { + sal_uInt8 n8; + sal_uInt32 nType, nPStringLen, nResEntryLen; + sal_uInt16 nUniqueID; + + *mpPSD >> nType >> nUniqueID >> n8; + nPStringLen = n8; + if ( nType != 0x3842494d ) + break; + if ( ! ( nPStringLen & 1 ) ) + nPStringLen++; + mpPSD->SeekRel( nPStringLen ); // skipping the pstring + *mpPSD >> nResEntryLen; + if ( nResEntryLen & 1 ) + nResEntryLen++; // the resource entries are padded + sal_uInt32 nCurrentPos = mpPSD->Tell(); + if ( ( nResEntryLen + nCurrentPos ) > nLayerPos ) // check if size + break; // is possible + switch( nUniqueID ) + { + case 0x3ed : // UID for the resolution info + { + sal_Int16 nUnit; + + *mpPSD >> mnXResFixed >> nUnit >> nUnit + >> mnYResFixed >> nUnit >> nUnit; + } + break; + } + mpPSD->Seek( nCurrentPos + nResEntryLen ); // set the stream to the next + } // resource entry + mpPSD->Seek( nLayerPos ); + *mpPSD >> nLayerMaskLength; + mpPSD->SeekRel( nLayerMaskLength ); + + *mpPSD >> nCompression; + if ( nCompression == 0 ) + { + mbCompression = FALSE; + } + else if ( nCompression == 1 ) + { + mpPSD->SeekRel( ( mpFileHeader->nRows * mpFileHeader->nChannels ) << 1 ); + mbCompression = TRUE; + } + else + return FALSE; + + return TRUE; +} + +// ------------------------------------------------------------------------ + +BOOL PSDReader::ImplReadBody() +{ + ULONG nX, nY; + char nRunCount = 0; + signed char nBitCount = -1; + BYTE nDat = 0, nDummy, nRed, nGreen, nBlue; + BitmapColor aBitmapColor; + nX = nY = 0; + + switch ( mnDestBitDepth ) + { + case 1 : + { + while ( nY < mpFileHeader->nRows ) + { + if ( nBitCount == -1 ) + { + if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets + *mpPSD >> nRunCount; + } + if ( nRunCount & 0x80 ) // a run length packet + { + if ( nBitCount == -1 ) // bits left in nDat ? + { + *mpPSD >> nDat; + nDat ^= 0xff; + nBitCount = 7; + } + for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ ) + { + mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat >> nBitCount-- ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + nBitCount = -1; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + if ( nBitCount == -1 ) // bits left in nDat ? + { + *mpPSD >> nDat; + nDat ^= 0xff; + nBitCount = 7; + } + mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat >> nBitCount-- ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + nBitCount = -1; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + } + } + break; + + case 8 : + { + while ( nY < mpFileHeader->nRows ) + { + if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets + *mpPSD >> nRunCount; + + if ( nRunCount & 0x80 ) // a run length packet + { + *mpPSD >> nDat; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ ) + { + mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpPSD >> nDat; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + mpWriteAcc->SetPixel( nY, nX, (BYTE)nDat ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + } + } + break; + + case 24 : + { + + // the psd format is in plain order (RRRR GGGG BBBB) so we have to set each pixel three times + // maybe the format is CCCC MMMM YYYY KKKK + + while ( nY < mpFileHeader->nRows ) + { + if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets + *mpPSD >> nRunCount; + + if ( nRunCount & 0x80 ) // a run length packet + { + *mpPSD >> nRed; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ ) + { + mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (BYTE)0, (BYTE)0 ) ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpPSD >> nRed; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + mpWriteAcc->SetPixel( nY, nX, BitmapColor( nRed, (BYTE)0, (BYTE)0 ) ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + } + nY = 0; + while ( nY < mpFileHeader->nRows ) + { + if ( mbCompression ) + *mpPSD >> nRunCount; + if ( nRunCount & 0x80 ) // a run length packet + { + *mpPSD >> nGreen; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ ) + { + aBitmapColor = mpReadAcc->GetPixel( nY, nX ); + mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), nGreen, aBitmapColor.GetBlue() ) ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpPSD >> nGreen; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + aBitmapColor = mpReadAcc->GetPixel( nY, nX ); + mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), nGreen, aBitmapColor.GetBlue() ) ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + } + nY = 0; + while ( nY < mpFileHeader->nRows ) + { + if ( mbCompression ) + *mpPSD >> nRunCount; + if ( nRunCount & 0x80 ) // a run length packet + { + *mpPSD >> nBlue; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ ) + { + aBitmapColor = mpReadAcc->GetPixel( nY, nX ); + mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), aBitmapColor.GetGreen(), nBlue ) ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpPSD >> nBlue; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + aBitmapColor = mpReadAcc->GetPixel( nY, nX ); + mpWriteAcc->SetPixel( nY, nX, BitmapColor( aBitmapColor.GetRed(), aBitmapColor.GetGreen(), nBlue ) ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + } + if ( mpFileHeader->nMode == PSD_CMYK ) + { + UINT32 nBlack, nBlackMax = 0; + BYTE* pBlack = new BYTE[ mpFileHeader->nRows * mpFileHeader->nColumns ]; + nY = 0; + while ( nY < mpFileHeader->nRows ) + { + if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets + *mpPSD >> nRunCount; + + if ( nRunCount & 0x80 ) // a run length packet + { + *mpPSD >> nDat; + + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + + for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ ) + { + nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetRed() + nDat; + if ( nBlack > nBlackMax ) + nBlackMax = nBlack; + nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetGreen() + nDat; + if ( nBlack > nBlackMax ) + nBlackMax = nBlack; + nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetBlue() + nDat; + if ( nBlack > nBlackMax ) + nBlackMax = nBlack; + pBlack[ nX + nY * mpFileHeader->nColumns ] = nDat ^ 0xff; + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpPSD >> nDat; + + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetRed() + nDat; + if ( nBlack > nBlackMax ) + nBlackMax = nBlack; + nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetGreen() + nDat; + if ( nBlack > nBlackMax ) + nBlackMax = nBlack; + nBlack = (BYTE)mpReadAcc->GetPixel( nY, nX ).GetBlue() + nDat; + if ( nBlack > nBlackMax ) + nBlackMax = nBlack; + pBlack[ nX + nY * mpFileHeader->nColumns ] = nDat ^ 0xff; + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + } + + for ( nY = 0; nY < mpFileHeader->nRows; nY++ ) + { + for ( nX = 0; nX < mpFileHeader->nColumns; nX++ ) + { + INT32 nDAT = pBlack[ nX + nY * mpFileHeader->nColumns ] * ( nBlackMax - 256 ) / 0x1ff; + + aBitmapColor = mpReadAcc->GetPixel( nY, nX ); + BYTE cR = (BYTE) MinMax( aBitmapColor.GetRed() - nDAT, 0L, 255L ); + BYTE cG = (BYTE) MinMax( aBitmapColor.GetGreen() - nDAT, 0L, 255L ); + BYTE cB = (BYTE) MinMax( aBitmapColor.GetBlue() - nDAT, 0L, 255L ); + mpWriteAcc->SetPixel( nY, nX, BitmapColor( cR, cG, cB ) ); + } + } + delete[] pBlack; + } + } + break; + } + + if ( mbTransparent ) + { + // the psd is 24 or 8 bit grafix + alphachannel + + nY = nX = 0; + while ( nY < mpFileHeader->nRows ) + { + if ( mbCompression ) // else nRunCount = 0 -> so we use only single raw packets + *mpPSD >> nRunCount; + + if ( nRunCount & 0x80 ) // a run length packet + { + *mpPSD >> nDat; + if ( nDat ) + nDat = 0; + else + nDat = 1; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + for ( USHORT i = 0; i < ( -nRunCount + 1 ); i++ ) + { + mpMaskWriteAcc->SetPixel( nY, nX, (BYTE)nDat ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpPSD >> nDat; + if ( nDat ) + nDat = 0; + else + nDat = 1; + if ( mpFileHeader->nDepth == 16 ) // 16 bit depth is to be skipped + *mpPSD >> nDummy; + mpMaskWriteAcc->SetPixel( nY, nX, (BYTE)nDat ); + if ( ++nX == mpFileHeader->nColumns ) + { + nX = 0; + nY++; + if ( nY == mpFileHeader->nRows ) + break; + } + } + } + } + } + return TRUE; +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + PSDReader aPSDReader; + + return aPSDReader.ReadPSD( rStream, rGraphic ); +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif diff --git a/filter/source/graphicfilter/ipsd/makefile.mk b/filter/source/graphicfilter/ipsd/makefile.mk new file mode 100644 index 000000000000..8974563b3791 --- /dev/null +++ b/filter/source/graphicfilter/ipsd/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=ipsd +DEPTARGET=vipsd + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/ipsd.obj + +# ========================================================================== + +SHL1TARGET= ipd$(DLLPOSTFIX) +SHL1IMPLIB= ipsd +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/ipsd.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/ipsd.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/iras/exports.map b/filter/source/graphicfilter/iras/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/iras/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx new file mode 100644 index 000000000000..6255dc486537 --- /dev/null +++ b/filter/source/graphicfilter/iras/iras.cxx @@ -0,0 +1,383 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include + +#define RAS_TYPE_OLD 0x00000000 // supported formats by this filter +#define RAS_TYPE_STANDARD 0x00000001 +#define RAS_TYPE_BYTE_ENCODED 0x00000002 +#define RAS_TYPE_RGB_FORMAT 0x00000003 + +#define RAS_COLOR_NO_MAP 0x00000000 +#define RAS_COLOR_RGB_MAP 0x00000001 +#define RAS_COLOR_RAW_MAP 0x00000002 + +#define SUNRASTER_MAGICNUMBER 0x59a66a95 + +//============================ RASReader ================================== + +class RASReader { + +private: + + SvStream* mpRAS; // Die einzulesende RAS-Datei + + BOOL mbStatus; + Bitmap maBmp; + BitmapWriteAccess* mpAcc; + sal_uInt32 mnWidth, mnHeight; // Bildausmass in Pixeln + USHORT mnDstBitsPerPix; + USHORT mnDstColors; + sal_uInt32 mnDepth, mnImageDatSize, mnType; + sal_uInt32 mnColorMapType, mnColorMapSize; + BYTE mnRepCount, mnRepVal; // RLE Decoding + BOOL mbPalette; + + BOOL ImplReadBody(); + BOOL ImplReadHeader(); + BYTE ImplGetByte(); + +public: + RASReader(); + ~RASReader(); + BOOL ReadRAS( SvStream & rRAS, Graphic & rGraphic ); +}; + +//=================== Methoden von RASReader ============================== + +RASReader::RASReader() : + mbStatus ( TRUE ), + mpAcc ( NULL ), + mnRepCount ( 0 ), + mbPalette ( FALSE ) +{ +} + +RASReader::~RASReader() +{ +} + +//---------------------------------------------------------------------------- + +BOOL RASReader::ReadRAS( SvStream & rRAS, Graphic & rGraphic ) +{ + UINT32 nMagicNumber; + + if ( rRAS.GetError() ) + return FALSE; + + mpRAS = &rRAS; + mpRAS->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + *mpRAS >> nMagicNumber; + if ( nMagicNumber != SUNRASTER_MAGICNUMBER ) + return FALSE; + + // Kopf einlesen: + + if ( ( mbStatus = ImplReadHeader() ) == FALSE ) + return FALSE; + + maBmp = Bitmap( Size( mnWidth, mnHeight ), mnDstBitsPerPix ); + if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == FALSE ) + return FALSE; + + if ( mnDstBitsPerPix <= 8 ) // paletten bildchen + { + if ( mnColorMapType == RAS_COLOR_RAW_MAP ) // RAW Colormap wird geskipped + { + ULONG nCurPos = mpRAS->Tell(); + mpRAS->Seek( nCurPos + mnColorMapSize ); + } + else if ( mnColorMapType == RAS_COLOR_RGB_MAP ) // RGB koennen wir auslesen + { + mnDstColors = (USHORT)( mnColorMapSize / 3 ); + + if ( ( 1 << mnDstBitsPerPix ) < mnDstColors ) + return FALSE; + + if ( ( mnDstColors >= 2 ) && ( ( mnColorMapSize % 3 ) == 0 ) ) + { + mpAcc->SetPaletteEntryCount( mnDstColors ); + USHORT i; + BYTE nRed[256], nGreen[256], nBlue[256]; + for ( i = 0; i < mnDstColors; i++ ) *mpRAS >> nRed[ i ]; + for ( i = 0; i < mnDstColors; i++ ) *mpRAS >> nGreen[ i ]; + for ( i = 0; i < mnDstColors; i++ ) *mpRAS >> nBlue[ i ]; + for ( i = 0; i < mnDstColors; i++ ) + { + mpAcc->SetPaletteColor( i, BitmapColor( nRed[ i ], nGreen[ i ], nBlue[ i ] ) ); + } + mbPalette = TRUE; + } + else + return FALSE; + + } + else if ( mnColorMapType != RAS_COLOR_NO_MAP ) // alles andere ist kein standard + return FALSE; + + if ( !mbPalette ) + { + mnDstColors = 1 << mnDstBitsPerPix; + mpAcc->SetPaletteEntryCount( mnDstColors ); + for ( USHORT i = 0; i < mnDstColors; i++ ) + { + ULONG nCount = 255 - ( 255 * i / ( mnDstColors - 1 ) ); + mpAcc->SetPaletteColor( i, BitmapColor( (BYTE)nCount, (BYTE)nCount, (BYTE)nCount ) ); + } + } + } + else + { + if ( mnColorMapType != RAS_COLOR_NO_MAP ) // when graphic has more then 256 colors and a color map we skip + { // the colormap + ULONG nCurPos = mpRAS->Tell(); + mpRAS->Seek( nCurPos + mnColorMapSize ); + } + } + + // Bitmap-Daten einlesen + mbStatus = ImplReadBody(); + + if ( mpAcc ) + { + maBmp.ReleaseAccess( mpAcc ), mpAcc = NULL; + } + if ( mbStatus ) + rGraphic = maBmp; + + return mbStatus; +} + +//---------------------------------------------------------------------------- + +BOOL RASReader::ImplReadHeader() +{ + *mpRAS >> mnWidth >> mnHeight >> mnDepth >> mnImageDatSize >> + mnType >> mnColorMapType >> mnColorMapSize; + + if ( mnWidth == 0 || mnHeight == 0 ) + mbStatus = FALSE; + + switch ( mnDepth ) + { + case 24 : + case 8 : + case 1 : + mnDstBitsPerPix = (USHORT)mnDepth; + break; + case 32 : + mnDstBitsPerPix = 24; + break; + + default : + mbStatus = FALSE; + } + + switch ( mnType ) + { + case RAS_TYPE_OLD : + case RAS_TYPE_STANDARD : + case RAS_TYPE_RGB_FORMAT : + case RAS_TYPE_BYTE_ENCODED : // this type will be supported later + break; + + default: + mbStatus = FALSE; + } + return mbStatus; +} + +//---------------------------------------------------------------------------- + +BOOL RASReader::ImplReadBody() +{ + ULONG x, y; + BYTE nDat = 0; + BYTE nRed, nGreen, nBlue; + switch ( mnDstBitsPerPix ) + { + case 1 : + for ( y = 0; y < mnHeight; y++ ) + { + for ( x = 0; x < mnWidth; x++ ) + { + if (!(x & 7)) + nDat = ImplGetByte(); + mpAcc->SetPixel ( + y, x, + sal::static_int_cast< BYTE >( + nDat >> ( ( x & 7 ) ^ 7 )) ); + } + if (!( ( x - 1 ) & 0x8 ) ) ImplGetByte(); // WORD ALIGNMENT ??? + } + break; + + case 8 : + for ( y = 0; y < mnHeight; y++ ) + { + for ( x = 0; x < mnWidth; x++ ) + { + nDat = ImplGetByte(); + mpAcc->SetPixel ( y, x, nDat ); + } + if ( x & 1 ) ImplGetByte(); // WORD ALIGNMENT ??? + } + break; + + case 24 : + switch ( mnDepth ) + { + + case 24 : + for ( y = 0; y < mnHeight; y++ ) + { + for ( x = 0; x < mnWidth; x++ ) + { + if ( mnType == RAS_TYPE_RGB_FORMAT ) + { + nRed = ImplGetByte(); + nGreen = ImplGetByte(); + nBlue = ImplGetByte(); + } + else + { + nBlue = ImplGetByte(); + nGreen = ImplGetByte(); + nRed = ImplGetByte(); + } + mpAcc->SetPixel ( y, x, BitmapColor( nRed, nGreen, nBlue ) ); + } + if ( x & 1 ) ImplGetByte(); // WORD ALIGNMENT ??? + } + break; + + case 32 : + for ( y = 0; y < mnHeight; y++ ) + { + for ( x = 0; x < mnWidth; x++ ) + { + nDat = ImplGetByte(); // pad byte > nil + if ( mnType == RAS_TYPE_RGB_FORMAT ) + { + nRed = ImplGetByte(); + nGreen = ImplGetByte(); + nBlue = ImplGetByte(); + } + else + { + nBlue = ImplGetByte(); + nGreen = ImplGetByte(); + nRed = ImplGetByte(); + } + mpAcc->SetPixel ( y, x, BitmapColor( nRed, nGreen, nBlue ) ); + } + } + break; + } + break; + + default: + mbStatus = FALSE; + break; + } + return mbStatus; +} + +//---------------------------------------------------------------------------- + +BYTE RASReader::ImplGetByte() +{ + BYTE nRetVal; + if ( mnType != RAS_TYPE_BYTE_ENCODED ) + { + *mpRAS >> nRetVal; + return nRetVal; + } + else + { + if ( mnRepCount ) + { + mnRepCount--; + return mnRepVal; + } + else + { + *mpRAS >> nRetVal; + if ( nRetVal != 0x80 ) + return nRetVal; + *mpRAS >> nRetVal; + if ( nRetVal == 0 ) + return 0x80; + mnRepCount = nRetVal ; + *mpRAS >> mnRepVal; + return mnRepVal; + } + } +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + RASReader aRASReader; + + return aRASReader.ReadRAS( rStream, rGraphic ); +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/iras/makefile.mk b/filter/source/graphicfilter/iras/makefile.mk new file mode 100644 index 000000000000..9585a35f50b8 --- /dev/null +++ b/filter/source/graphicfilter/iras/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=iras +DEPTARGET=viras + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/iras.obj + +# ========================================================================== + +SHL1TARGET= ira$(DLLPOSTFIX) +SHL1IMPLIB= iras +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/iras.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/iras.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/itga/exports.map b/filter/source/graphicfilter/itga/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/itga/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx new file mode 100644 index 000000000000..5dcb5f82ccab --- /dev/null +++ b/filter/source/graphicfilter/itga/itga.cxx @@ -0,0 +1,758 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include +#include +#include + +//============================ TGAReader ================================== + +struct TGAFileHeader +{ + BYTE nImageIDLength; + BYTE nColorMapType; + BYTE nImageType; + UINT16 nColorMapFirstEntryIndex; + UINT16 nColorMapLength; + BYTE nColorMapEntrySize; + UINT16 nColorMapXOrigin; + UINT16 nColorMapYOrigin; + UINT16 nImageWidth; + UINT16 nImageHeight; + BYTE nPixelDepth; + BYTE nImageDescriptor; +}; + +#define SizeOfTGAFileFooter 26 + +struct TGAFileFooter +{ + UINT32 nExtensionFileOffset; + UINT32 nDeveloperDirectoryOffset; + UINT32 nSignature[4]; + BYTE nPadByte; + BYTE nStringTerminator; +}; + +#define SizeOfTGAExtension 495 + +struct TGAExtension +{ + UINT16 nExtensionSize; + char sAuthorName[41]; + char sAuthorComment[324]; + char sDateTimeStamp[12]; + char sJobNameID[41]; + UINT16 nJobTime[3]; + char sSoftwareID[41]; + UINT16 nSoftwareVersionNumber; + BYTE nSoftwareVersionLetter; + UINT32 nKeyColor; + UINT16 nPixelAspectRatioNumerator; + UINT16 nPixelAspectRatioDeNumerator; + UINT16 nGammaValueNumerator; + UINT16 nGammaValueDeNumerator; + UINT32 nColorCorrectionOffset; + UINT32 nPostageStampOffset; + UINT32 nScanLineOffset; + BYTE nAttributesType; +}; + +class TGAReader { + +private: + + SvStream* mpTGA; + + BitmapWriteAccess* mpAcc; + TGAFileHeader* mpFileHeader; + TGAFileFooter* mpFileFooter; + TGAExtension* mpExtension; + UINT32* mpColorMap; + + BOOL mbStatus; + + ULONG mnTGAVersion; // Enhanced TGA is defined as Version 2.0 + UINT16 mnDestBitDepth; + BOOL mbIndexing; // TRUE if source contains indexing color values + BOOL mbEncoding; // TRUE if source is compressed + + BOOL ImplReadHeader(); + BOOL ImplReadPalette(); + BOOL ImplReadBody(); + +public: + TGAReader(); + ~TGAReader(); + BOOL ReadTGA( SvStream & rTGA, Graphic & rGraphic ); +}; + +//=================== Methoden von TGAReader ============================== + +TGAReader::TGAReader() : + mpAcc ( NULL ), + mpFileHeader ( NULL ), + mpFileFooter ( NULL ), + mpExtension ( NULL ), + mpColorMap ( NULL ), + mbStatus ( TRUE ), + mnTGAVersion ( 1 ), + mbIndexing ( FALSE ), + mbEncoding ( FALSE ) +{ +} + +TGAReader::~TGAReader() +{ + delete[] mpColorMap; + delete mpFileHeader; + delete mpExtension; + delete mpFileFooter; +} + +// ------------------------------------------------------------------------------------------- + +BOOL TGAReader::ReadTGA( SvStream & rTGA, Graphic & rGraphic ) +{ + if ( rTGA.GetError() ) + return FALSE; + + mpTGA = &rTGA; + mpTGA->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + + // Kopf einlesen: + + if ( !mpTGA->GetError() ) + { + mbStatus = ImplReadHeader(); + if ( mbStatus ) + { + Bitmap aBitmap; + + aBitmap = Bitmap( Size( mpFileHeader->nImageWidth, mpFileHeader->nImageHeight ), mnDestBitDepth ); + mpAcc = aBitmap.AcquireWriteAccess(); + if ( mpAcc ) + { + if ( mbIndexing ) + mbStatus = ImplReadPalette(); + if ( mbStatus ) + mbStatus = ImplReadBody(); + } + else + mbStatus = FALSE; + + if ( mpAcc ) + aBitmap.ReleaseAccess ( mpAcc), mpAcc = NULL; + + if ( mbStatus ) + rGraphic = aBitmap; + } + } + return mbStatus; +} + +// ------------------------------------------------------------------------------------------- + +BOOL TGAReader::ImplReadHeader() +{ + mpFileHeader = new TGAFileHeader; + if ( mpFileHeader == NULL ) + return FALSE; + + *mpTGA >> mpFileHeader->nImageIDLength >> mpFileHeader->nColorMapType >> mpFileHeader->nImageType >> + mpFileHeader->nColorMapFirstEntryIndex >> mpFileHeader->nColorMapLength >> mpFileHeader->nColorMapEntrySize >> + mpFileHeader->nColorMapXOrigin >> mpFileHeader->nColorMapYOrigin >> mpFileHeader->nImageWidth >> + mpFileHeader->nImageHeight >> mpFileHeader->nPixelDepth >> mpFileHeader->nImageDescriptor; + + if ( mpFileHeader->nColorMapType > 1 ) + return FALSE; + if ( mpFileHeader->nColorMapType == 1 ) + mbIndexing = TRUE; + + // first we want to get the version + mpFileFooter = new TGAFileFooter; // read the TGA-File-Footer to determine whether + if ( mpFileFooter ) // we got an old TGA format or the new one + { + ULONG nCurStreamPos = mpTGA->Tell(); + mpTGA->Seek( STREAM_SEEK_TO_END ); + ULONG nTemp = mpTGA->Tell(); + mpTGA->Seek( nTemp - SizeOfTGAFileFooter ); + + *mpTGA >> mpFileFooter->nExtensionFileOffset >> mpFileFooter->nDeveloperDirectoryOffset >> + mpFileFooter->nSignature[0] >> mpFileFooter->nSignature[1] >> mpFileFooter->nSignature[2] >> + mpFileFooter->nSignature[3] >> mpFileFooter->nPadByte >> mpFileFooter->nStringTerminator; + + // check for TRUE, VISI, ON-X, FILE in the signatures + if ( mpFileFooter->nSignature[ 0 ] == (('T'<<24)|('R'<<16)|('U'<<8)|'E') && + mpFileFooter->nSignature[ 1 ] == (('V'<<24)|('I'<<16)|('S'<<8)|'I') && + mpFileFooter->nSignature[ 2 ] == (('O'<<24)|('N'<<16)|('-'<<8)|'X') && + mpFileFooter->nSignature[ 3 ] == (('F'<<24)|('I'<<16)|('L'<<8)|'E') ) + { + mpExtension = new TGAExtension; + if ( mpExtension ) + { + mpTGA->Seek( mpFileFooter->nExtensionFileOffset ); + *mpTGA >> mpExtension->nExtensionSize; + if ( mpExtension->nExtensionSize >= SizeOfTGAExtension ) + { + mnTGAVersion = 2; + + mpTGA->Read( mpExtension->sAuthorName, 41 ); + mpTGA->Read( mpExtension->sAuthorComment, 324 ); + mpTGA->Read( mpExtension->sDateTimeStamp, 12 ); + mpTGA->Read( mpExtension->sJobNameID, 12 ); + *mpTGA >> mpExtension->sJobNameID[ 0 ] >> mpExtension->sJobNameID[ 1 ] >> mpExtension->sJobNameID[ 2 ]; + mpTGA->Read( mpExtension->sSoftwareID, 41 ); + *mpTGA >> mpExtension->nSoftwareVersionNumber >> mpExtension->nSoftwareVersionLetter + >> mpExtension->nKeyColor >> mpExtension->nPixelAspectRatioNumerator + >> mpExtension->nPixelAspectRatioDeNumerator >> mpExtension->nGammaValueNumerator + >> mpExtension->nGammaValueDeNumerator >> mpExtension->nColorCorrectionOffset + >> mpExtension->nPostageStampOffset >> mpExtension->nScanLineOffset + >> mpExtension->nAttributesType; + + } + } + } + mpTGA->Seek( nCurStreamPos ); + } + + // using the TGA file specification this was the correct form but adobe photoshop sets nImageDescriptor + // equal to nPixelDepth + // mnDestBitDepth = mpFileHeader->nPixelDepth - ( mpFileHeader->nImageDescriptor & 0xf ); + mnDestBitDepth = mpFileHeader->nPixelDepth; + + if ( mnDestBitDepth == 8 ) // this is a patch for grayscale pictures not including a palette + mbIndexing = TRUE; + + if ( mnDestBitDepth > 32 ) // maybe the pixeldepth is invalid + return FALSE; + else if ( mnDestBitDepth > 8 ) + mnDestBitDepth = 24; + else if ( mnDestBitDepth > 4 ) + mnDestBitDepth = 8; + else if ( mnDestBitDepth > 2 ) + mnDestBitDepth = 4; + + if ( !mbIndexing && ( mnDestBitDepth < 15 ) ) + return FALSE; + + switch ( mpFileHeader->nImageType ) + { + case 9 : // encoding for colortype 9, 10, 11 + case 10 : + case 11 : + mbEncoding = TRUE; + break; + }; + + if ( mpFileHeader->nImageIDLength ) // skip the Image ID + mpTGA->SeekRel( mpFileHeader->nImageIDLength ); + + return mbStatus; +} + +// ------------------------------------------------------------------------------------------- + +BOOL TGAReader::ImplReadBody() +{ + + USHORT nXCount, nYCount, nRGB16; + BYTE nRed, nGreen, nBlue, nRunCount, nDummy, nDepth; + + // this four variables match the image direction + long nY, nYAdd, nX, nXAdd, nXStart; + + nX = nXStart = nY = 0; + nXCount = nYCount = 0; + nYAdd = nXAdd = 1; + + if ( mpFileHeader->nImageDescriptor & 0x10 ) + { + nX = nXStart = mpFileHeader->nImageWidth - 1; + nXAdd -= 2; + } + + if ( !(mpFileHeader->nImageDescriptor & 0x20 ) ) + { + nY = mpFileHeader->nImageHeight - 1; + nYAdd -=2; + } + +// nDepth = mpFileHeader->nPixelDepth - ( mpFileHeader->nImageDescriptor & 0xf ); + nDepth = mpFileHeader->nPixelDepth; + + if ( mbEncoding ) + { + if ( mbIndexing ) + { + switch( nDepth ) + { + // 16 bit encoding + indexing + case 16 : + while ( nYCount < mpFileHeader->nImageHeight ) + { + *mpTGA >> nRunCount; + if ( nRunCount & 0x80 ) // a run length packet + { + *mpTGA >> nRGB16; + if ( nRGB16 >= mpFileHeader->nColorMapLength ) + return FALSE; + nRed = (BYTE)( mpColorMap[ nRGB16 ] >> 16 ); + nGreen = (BYTE)( mpColorMap[ nRGB16 ] >> 8 ); + nBlue = (BYTE)( mpColorMap[ nRGB16 ] ); + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpTGA >> nRGB16; + if ( nRGB16 >= mpFileHeader->nColorMapLength ) + return FALSE; + nRed = (BYTE)( mpColorMap[ nRGB16 ] >> 16 ); + nGreen = (BYTE)( mpColorMap[ nRGB16 ] >> 8 ); + nBlue = (BYTE)( mpColorMap[ nRGB16 ] ); + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + } + break; + + // 8 bit encoding + indexing + case 8 : + while ( nYCount < mpFileHeader->nImageHeight ) + { + *mpTGA >> nRunCount; + if ( nRunCount & 0x80 ) // a run length packet + { + *mpTGA >> nDummy; + if ( nDummy >= mpFileHeader->nColorMapLength ) + return FALSE; + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + mpAcc->SetPixel( nY, nX, (BYTE)nDummy ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + + *mpTGA >> nDummy; + if ( nDummy >= mpFileHeader->nColorMapLength ) + return FALSE; + mpAcc->SetPixel( nY, nX, (BYTE)nDummy ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + } + break; + default: + return FALSE; + } + } + else + { + switch( nDepth ) + { + // 32 bit transparent true color encoding + case 32 : + { + while ( nYCount < mpFileHeader->nImageHeight ) + { + *mpTGA >> nRunCount; + if ( nRunCount & 0x80 ) // a run length packet + { + *mpTGA >> nBlue >> nGreen >> nRed >> nDummy; + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpTGA >> nBlue >> nGreen >> nRed >> nDummy; + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + } + } + break; + + // 24 bit true color encoding + case 24 : + while ( nYCount < mpFileHeader->nImageHeight ) + { + *mpTGA >> nRunCount; + if ( nRunCount & 0x80 ) // a run length packet + { + *mpTGA >> nBlue >> nGreen >> nRed; + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpTGA >> nBlue >> nGreen >> nRed; + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + } + break; + + // 16 bit true color encoding + case 16 : + while ( nYCount < mpFileHeader->nImageHeight ) + { + *mpTGA >> nRunCount; + if ( nRunCount & 0x80 ) // a run length packet + { + *mpTGA >> nRGB16; + nRed = (BYTE)( nRGB16 >> 7 ) & 0xf8; + nGreen = (BYTE)( nRGB16 >> 2 ) & 0xf8; + nBlue = (BYTE)( nRGB16 << 3 ) & 0xf8; + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + else // a raw packet + { + for ( USHORT i = 0; i < ( ( nRunCount & 0x7f ) + 1 ); i++ ) + { + *mpTGA >> nRGB16; + nRed = (BYTE)( nRGB16 >> 7 ) & 0xf8; + nGreen = (BYTE)( nRGB16 >> 2 ) & 0xf8; + nBlue = (BYTE)( nRGB16 << 3 ) & 0xf8; + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + nX += nXAdd; + nXCount++; + if ( nXCount == mpFileHeader->nImageWidth ) + { + nX = nXStart; + nXCount = 0; + nY += nYAdd; + nYCount++; + } + } + } + } + break; + + default: + return FALSE; + } + } + } + else + { + for ( nYCount = 0; nYCount < mpFileHeader->nImageHeight; nYCount++, nY += nYAdd ) + { + nX = nXStart; + nXCount = 0; + + if ( mbIndexing ) + { + switch( nDepth ) + { + // 16 bit indexing + case 16 : + for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd ) + { + *mpTGA >> nRGB16; + if ( nRGB16 >= mpFileHeader->nColorMapLength ) + return FALSE; + nRed = (BYTE)( mpColorMap[ nRGB16 ] >> 16 ); + nGreen = (BYTE)( mpColorMap[ nRGB16 ] >> 8 ); + nBlue = (BYTE)( mpColorMap[ nRGB16 ] ); + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + } + break; + + // 8 bit indexing + case 8 : + for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd ) + { + *mpTGA >> nDummy; + if ( nDummy >= mpFileHeader->nColorMapLength ) + return FALSE; + mpAcc->SetPixel( nY, nX, (BYTE)nDummy ); + } + break; + default: + return FALSE; + } + } + else + { + switch( nDepth ) + { + // 32 bit true color + case 32 : + { + for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd ) + { + *mpTGA >> nBlue >> nGreen >> nRed >> nDummy; + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + } + } + break; + + // 24 bit true color + case 24 : + for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd ) + { + *mpTGA >> nBlue >> nGreen >> nRed; + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + } + break; + + // 16 bit true color + case 16 : + for (;nXCount < mpFileHeader->nImageWidth; nXCount++, nX += nXAdd ) + { + *mpTGA >> nRGB16; + nRed = (BYTE)( nRGB16 >> 7 ) & 0xf8; + nGreen = (BYTE)( nRGB16 >> 2 ) & 0xf8; + nBlue = (BYTE)( nRGB16 << 3 ) & 0xf8; + mpAcc->SetPixel( nY, nX, BitmapColor( nRed, nGreen, nBlue ) ); + } + break; + default: + return FALSE; + } + } + } + } + return mbStatus; +} + +// ------------------------------------------------------------------------------------------- + +BOOL TGAReader::ImplReadPalette() +{ + if ( mbIndexing ) // read the colormap + { + USHORT nColors = mpFileHeader->nColorMapLength; + + if ( !nColors ) // colors == 0 ? -> we will build a grayscale palette + { + if ( mpFileHeader->nPixelDepth != 8 ) + return FALSE; + nColors = 256; + mpFileHeader->nColorMapLength = 256; + mpFileHeader->nColorMapEntrySize = 0x3f; // patch for the following switch routine + } + mpColorMap = new UINT32[ nColors ]; // we will always index dwords + if ( mpColorMap == FALSE ) + return FALSE; // out of memory %&!$&/!"�$ + + switch( mpFileHeader->nColorMapEntrySize ) + { + case 0x3f : + { + for ( ULONG i = 0; i < nColors; i++ ) + { + mpColorMap[ i ] = ( i << 16 ) + ( i << 8 ) + i; + } + } + break; + + case 32 : + mpTGA->Read( mpColorMap, 4 * nColors ); + break; + + case 24 : + { + for ( ULONG i = 0; i < nColors; i++ ) + { + mpTGA->Read( &mpColorMap[ i ], 3 ); + } + } + break; + + case 15 : + case 16 : + { + for ( ULONG i = 0; i < nColors; i++ ) + { + UINT16 nTemp; + *mpTGA >> nTemp; + mpColorMap[ i ] = ( ( nTemp & 0x7c00 ) << 9 ) + ( ( nTemp & 0x01e0 ) << 6 ) + + ( ( nTemp & 0x1f ) << 3 ); + } + } + break; + + default : + return FALSE; + } + if ( mnDestBitDepth <= 8 ) + { + USHORT nDestColors = ( 1 << mnDestBitDepth ); + if ( nColors > nDestColors ) + return FALSE; + + mpAcc->SetPaletteEntryCount( nColors ); + for ( USHORT i = 0; i < nColors; i++ ) + { + mpAcc->SetPaletteColor( i, Color( (BYTE)( mpColorMap[ i ] >> 16 ), + (BYTE)( mpColorMap[ i ] >> 8 ), (BYTE)(mpColorMap[ i ] ) ) ); + } + } + } + + return mbStatus; +} + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + TGAReader aTGAReader; + + return aTGAReader.ReadTGA( rStream, rGraphic ); +} + +//================== ein bischen Muell fuer Windows ========================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + diff --git a/filter/source/graphicfilter/itga/makefile.mk b/filter/source/graphicfilter/itga/makefile.mk new file mode 100644 index 000000000000..ef810d1708ef --- /dev/null +++ b/filter/source/graphicfilter/itga/makefile.mk @@ -0,0 +1,67 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=itga +DEPTARGET=vitga + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/itga.obj + +# ========================================================================== + +SHL1TARGET= itg$(DLLPOSTFIX) +SHL1IMPLIB= itga +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/itga.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/itga.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx new file mode 100644 index 000000000000..5e9e75cbf815 --- /dev/null +++ b/filter/source/graphicfilter/itiff/ccidecom.cxx @@ -0,0 +1,1112 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "ccidecom.hxx" + +//=============================== Huffman-Tabellen ======================== + +//---------------------------- White-Run ------------------------------ + +#define CCIWhiteTableSize 105 + +const CCIHuffmanTableEntry CCIWhiteTable[CCIWhiteTableSize]={ + { 0, 0x0035, 8 }, + { 1, 0x0007, 6 }, + { 2, 0x0007, 4 }, + { 3, 0x0008, 4 }, + { 4, 0x000b, 4 }, + { 5, 0x000c, 4 }, + { 6, 0x000e, 4 }, + { 7, 0x000f, 4 }, + { 8, 0x0013, 5 }, + { 9, 0x0014, 5 }, + { 10, 0x0007, 5 }, + { 11, 0x0008, 5 }, + { 12, 0x0008, 6 }, + { 13, 0x0003, 6 }, + { 14, 0x0034, 6 }, + { 15, 0x0035, 6 }, + { 16, 0x002a, 6 }, + { 17, 0x002b, 6 }, + { 18, 0x0027, 7 }, + { 19, 0x000c, 7 }, + { 20, 0x0008, 7 }, + { 21, 0x0017, 7 }, + { 22, 0x0003, 7 }, + { 23, 0x0004, 7 }, + { 24, 0x0028, 7 }, + { 25, 0x002b, 7 }, + { 26, 0x0013, 7 }, + { 27, 0x0024, 7 }, + { 28, 0x0018, 7 }, + { 29, 0x0002, 8 }, + { 30, 0x0003, 8 }, + { 31, 0x001a, 8 }, + { 32, 0x001b, 8 }, + { 33, 0x0012, 8 }, + { 34, 0x0013, 8 }, + { 35, 0x0014, 8 }, + { 36, 0x0015, 8 }, + { 37, 0x0016, 8 }, + { 38, 0x0017, 8 }, + { 39, 0x0028, 8 }, + { 40, 0x0029, 8 }, + { 41, 0x002a, 8 }, + { 42, 0x002b, 8 }, + { 43, 0x002c, 8 }, + { 44, 0x002d, 8 }, + { 45, 0x0004, 8 }, + { 46, 0x0005, 8 }, + { 47, 0x000a, 8 }, + { 48, 0x000b, 8 }, + { 49, 0x0052, 8 }, + { 50, 0x0053, 8 }, + { 51, 0x0054, 8 }, + { 52, 0x0055, 8 }, + { 53, 0x0024, 8 }, + { 54, 0x0025, 8 }, + { 55, 0x0058, 8 }, + { 56, 0x0059, 8 }, + { 57, 0x005a, 8 }, + { 58, 0x005b, 8 }, + { 59, 0x004a, 8 }, + { 60, 0x004b, 8 }, + { 61, 0x0032, 8 }, + { 62, 0x0033, 8 }, + { 63, 0x0034, 8 }, + { 64, 0x001b, 5 }, + { 128, 0x0012, 5 }, + { 192, 0x0017, 6 }, + { 256, 0x0037, 7 }, + { 320, 0x0036, 8 }, + { 384, 0x0037, 8 }, + { 448, 0x0064, 8 }, + { 512, 0x0065, 8 }, + { 576, 0x0068, 8 }, + { 640, 0x0067, 8 }, + { 704, 0x00cc, 9 }, + { 768, 0x00cd, 9 }, + { 832, 0x00d2, 9 }, + { 896, 0x00d3, 9 }, + { 960, 0x00d4, 9 }, + { 1024, 0x00d5, 9 }, + { 1088, 0x00d6, 9 }, + { 1152, 0x00d7, 9 }, + { 1216, 0x00d8, 9 }, + { 1280, 0x00d9, 9 }, + { 1344, 0x00da, 9 }, + { 1408, 0x00db, 9 }, + { 1472, 0x0098, 9 }, + { 1536, 0x0099, 9 }, + { 1600, 0x009a, 9 }, + { 1664, 0x0018, 6 }, + { 1728, 0x009b, 9 }, + { 1792, 0x0008, 11 }, + { 1856, 0x000c, 11 }, + { 1920, 0x000d, 11 }, + { 1984, 0x0012, 12 }, + { 2048, 0x0013, 12 }, + { 2112, 0x0014, 12 }, + { 2176, 0x0015, 12 }, + { 2240, 0x0016, 12 }, + { 2304, 0x0017, 12 }, + { 2368, 0x001c, 12 }, + { 2432, 0x001d, 12 }, + { 2496, 0x001e, 12 }, + { 2560, 0x001f, 12 }, + { 9999, 0x0001, 12 } // EOL +}; + +//---------------------------- Black-Run ------------------------------ + +#define CCIBlackTableSize 105 + +const CCIHuffmanTableEntry CCIBlackTable[CCIBlackTableSize]={ + { 0, 0x0037, 10 }, + { 1, 0x0002, 3 }, + { 2, 0x0003, 2 }, + { 3, 0x0002, 2 }, + { 4, 0x0003, 3 }, + { 5, 0x0003, 4 }, + { 6, 0x0002, 4 }, + { 7, 0x0003, 5 }, + { 8, 0x0005, 6 }, + { 9, 0x0004, 6 }, + { 10, 0x0004, 7 }, + { 11, 0x0005, 7 }, + { 12, 0x0007, 7 }, + { 13, 0x0004, 8 }, + { 14, 0x0007, 8 }, + { 15, 0x0018, 9 }, + { 16, 0x0017, 10 }, + { 17, 0x0018, 10 }, + { 18, 0x0008, 10 }, + { 19, 0x0067, 11 }, + { 20, 0x0068, 11 }, + { 21, 0x006c, 11 }, + { 22, 0x0037, 11 }, + { 23, 0x0028, 11 }, + { 24, 0x0017, 11 }, + { 25, 0x0018, 11 }, + { 26, 0x00ca, 12 }, + { 27, 0x00cb, 12 }, + { 28, 0x00cc, 12 }, + { 29, 0x00cd, 12 }, + { 30, 0x0068, 12 }, + { 31, 0x0069, 12 }, + { 32, 0x006a, 12 }, + { 33, 0x006b, 12 }, + { 34, 0x00d2, 12 }, + { 35, 0x00d3, 12 }, + { 36, 0x00d4, 12 }, + { 37, 0x00d5, 12 }, + { 38, 0x00d6, 12 }, + { 39, 0x00d7, 12 }, + { 40, 0x006c, 12 }, + { 41, 0x006d, 12 }, + { 42, 0x00da, 12 }, + { 43, 0x00db, 12 }, + { 44, 0x0054, 12 }, + { 45, 0x0055, 12 }, + { 46, 0x0056, 12 }, + { 47, 0x0057, 12 }, + { 48, 0x0064, 12 }, + { 49, 0x0065, 12 }, + { 50, 0x0052, 12 }, + { 51, 0x0053, 12 }, + { 52, 0x0024, 12 }, + { 53, 0x0037, 12 }, + { 54, 0x0038, 12 }, + { 55, 0x0027, 12 }, + { 56, 0x0028, 12 }, + { 57, 0x0058, 12 }, + { 58, 0x0059, 12 }, + { 59, 0x002b, 12 }, + { 60, 0x002c, 12 }, + { 61, 0x005a, 12 }, + { 62, 0x0066, 12 }, + { 63, 0x0067, 12 }, + { 64, 0x000f, 10 }, + { 128, 0x00c8, 12 }, + { 192, 0x00c9, 12 }, + { 256, 0x005b, 12 }, + { 320, 0x0033, 12 }, + { 384, 0x0034, 12 }, + { 448, 0x0035, 12 }, + { 512, 0x006c, 13 }, + { 576, 0x006d, 13 }, + { 640, 0x004a, 13 }, + { 704, 0x004b, 13 }, + { 768, 0x004c, 13 }, + { 832, 0x004d, 13 }, + { 896, 0x0072, 13 }, + { 960, 0x0073, 13 }, + { 1024, 0x0074, 13 }, + { 1088, 0x0075, 13 }, + { 1152, 0x0076, 13 }, + { 1216, 0x0077, 13 }, + { 1280, 0x0052, 13 }, + { 1344, 0x0053, 13 }, + { 1408, 0x0054, 13 }, + { 1472, 0x0055, 13 }, + { 1536, 0x005a, 13 }, + { 1600, 0x005b, 13 }, + { 1664, 0x0064, 13 }, + { 1728, 0x0065, 13 }, + { 1792, 0x0008, 11 }, + { 1856, 0x000c, 11 }, + { 1920, 0x000d, 11 }, + { 1984, 0x0012, 12 }, + { 2048, 0x0013, 12 }, + { 2112, 0x0014, 12 }, + { 2176, 0x0015, 12 }, + { 2240, 0x0016, 12 }, + { 2304, 0x0017, 12 }, + { 2368, 0x001c, 12 }, + { 2432, 0x001d, 12 }, + { 2496, 0x001e, 12 }, + { 2560, 0x001f, 12 }, + { 9999, 0x0001, 12 } // EOL +}; + + +//---------------------------- 2D-Mode -------------------------------- + +#define CCI2DMODE_UNCOMP 0 +#define CCI2DMODE_PASS 1 +#define CCI2DMODE_HORZ 2 +#define CCI2DMODE_VERT_L3 3 +#define CCI2DMODE_VERT_L2 4 +#define CCI2DMODE_VERT_L1 5 +#define CCI2DMODE_VERT_0 6 +#define CCI2DMODE_VERT_R1 7 +#define CCI2DMODE_VERT_R2 8 +#define CCI2DMODE_VERT_R3 9 + +#define CCI2DModeTableSize 10 + +const CCIHuffmanTableEntry CCI2DModeTable[CCI2DModeTableSize]={ + { CCI2DMODE_UNCOMP , 0x000f, 10 }, + { CCI2DMODE_PASS , 0x0001, 4 }, + { CCI2DMODE_HORZ , 0x0001, 3 }, + { CCI2DMODE_VERT_L3, 0x0002, 7 }, + { CCI2DMODE_VERT_L2, 0x0002, 6 }, + { CCI2DMODE_VERT_L1, 0x0002, 3 }, + { CCI2DMODE_VERT_0 , 0x0001, 1 }, + { CCI2DMODE_VERT_R1, 0x0003, 3 }, + { CCI2DMODE_VERT_R2, 0x0003, 6 }, + { CCI2DMODE_VERT_R3, 0x0003, 7 } +}; + + +//-------------------------- 2D-Uncompressed-Mode ---------------------- + +#define CCIUNCOMP_0White_1Black 0 +#define CCIUNCOMP_1White_1Black 1 +#define CCIUNCOMP_2White_1Black 2 +#define CCIUNCOMP_3White_1Black 3 +#define CCIUNCOMP_4White_1Black 4 +#define CCIUNCOMP_5White 5 +#define CCIUNCOMP_0White_End 6 +#define CCIUNCOMP_1White_End 7 +#define CCIUNCOMP_2White_End 8 +#define CCIUNCOMP_3White_End 9 +#define CCIUNCOMP_4White_End 10 + +#define CCIUncompTableSize 11 + +const CCIHuffmanTableEntry CCIUncompTable[CCIUncompTableSize]={ + { CCIUNCOMP_0White_1Black, 0x0001, 1 }, + { CCIUNCOMP_1White_1Black, 0x0001, 2 }, + { CCIUNCOMP_2White_1Black, 0x0001, 3 }, + { CCIUNCOMP_3White_1Black, 0x0001, 4 }, + { CCIUNCOMP_4White_1Black, 0x0001, 5 }, + { CCIUNCOMP_5White , 0x0001, 6 }, + { CCIUNCOMP_0White_End , 0x0001, 7 }, + { CCIUNCOMP_1White_End , 0x0001, 8 }, + { CCIUNCOMP_2White_End , 0x0001, 9 }, + { CCIUNCOMP_3White_End , 0x0001, 10 }, + { CCIUNCOMP_4White_End , 0x0001, 11 } +}; + + +//================== Sicherheitskopie der Huffman-Tabellen ================ +// Um sicher zugehen, dass die Huffman-Tabellen keine Fehler enthalten, +// wurden sie zweimal von unterschiedlichen Quellen eingegeben (Uff) und +// verglichen. +// Da sich aber im Laufe der Pflege des Source-Codes mal ein Fehler +// einschleichen koennte (z.B. versehentlicher druck einer Taste im Editor) +// werden die Tablellen hier weiterhin zweimal aufgefuehrt und zur Laufzeit +// verglichen. (Wenn der Vergleich fehlschlaegt, liefert CCIDecompressor +// immer einen Fehler). Das Ganze mag etwas wahnsinnig erscheinen, aber ein Fehler +// in den Tabellen waere sonst sehr sehr schwer zu erkennen, zumal es +// unwahrscheinlich ist, dass eine oder mehere Beispieldateien alle Codes +// durchlaufen. + +const CCIHuffmanTableEntry CCIWhiteTableSave[CCIWhiteTableSize]={ + { 0, 0x0035, 8 }, + { 1, 0x0007, 6 }, + { 2, 0x0007, 4 }, + { 3, 0x0008, 4 }, + { 4, 0x000b, 4 }, + { 5, 0x000c, 4 }, + { 6, 0x000e, 4 }, + { 7, 0x000f, 4 }, + { 8, 0x0013, 5 }, + { 9, 0x0014, 5 }, + { 10, 0x0007, 5 }, + { 11, 0x0008, 5 }, + { 12, 0x0008, 6 }, + { 13, 0x0003, 6 }, + { 14, 0x0034, 6 }, + { 15, 0x0035, 6 }, + { 16, 0x002a, 6 }, + { 17, 0x002b, 6 }, + { 18, 0x0027, 7 }, + { 19, 0x000c, 7 }, + { 20, 0x0008, 7 }, + { 21, 0x0017, 7 }, + { 22, 0x0003, 7 }, + { 23, 0x0004, 7 }, + { 24, 0x0028, 7 }, + { 25, 0x002b, 7 }, + { 26, 0x0013, 7 }, + { 27, 0x0024, 7 }, + { 28, 0x0018, 7 }, + { 29, 0x0002, 8 }, + { 30, 0x0003, 8 }, + { 31, 0x001a, 8 }, + { 32, 0x001b, 8 }, + { 33, 0x0012, 8 }, + { 34, 0x0013, 8 }, + { 35, 0x0014, 8 }, + { 36, 0x0015, 8 }, + { 37, 0x0016, 8 }, + { 38, 0x0017, 8 }, + { 39, 0x0028, 8 }, + { 40, 0x0029, 8 }, + { 41, 0x002a, 8 }, + { 42, 0x002b, 8 }, + { 43, 0x002c, 8 }, + { 44, 0x002d, 8 }, + { 45, 0x0004, 8 }, + { 46, 0x0005, 8 }, + { 47, 0x000a, 8 }, + { 48, 0x000b, 8 }, + { 49, 0x0052, 8 }, + { 50, 0x0053, 8 }, + { 51, 0x0054, 8 }, + { 52, 0x0055, 8 }, + { 53, 0x0024, 8 }, + { 54, 0x0025, 8 }, + { 55, 0x0058, 8 }, + { 56, 0x0059, 8 }, + { 57, 0x005a, 8 }, + { 58, 0x005b, 8 }, + { 59, 0x004a, 8 }, + { 60, 0x004b, 8 }, + { 61, 0x0032, 8 }, + { 62, 0x0033, 8 }, + { 63, 0x0034, 8 }, + { 64, 0x001b, 5 }, + { 128, 0x0012, 5 }, + { 192, 0x0017, 6 }, + { 256, 0x0037, 7 }, + { 320, 0x0036, 8 }, + { 384, 0x0037, 8 }, + { 448, 0x0064, 8 }, + { 512, 0x0065, 8 }, + { 576, 0x0068, 8 }, + { 640, 0x0067, 8 }, + { 704, 0x00cc, 9 }, + { 768, 0x00cd, 9 }, + { 832, 0x00d2, 9 }, + { 896, 0x00d3, 9 }, + { 960, 0x00d4, 9 }, + { 1024, 0x00d5, 9 }, + { 1088, 0x00d6, 9 }, + { 1152, 0x00d7, 9 }, + { 1216, 0x00d8, 9 }, + { 1280, 0x00d9, 9 }, + { 1344, 0x00da, 9 }, + { 1408, 0x00db, 9 }, + { 1472, 0x0098, 9 }, + { 1536, 0x0099, 9 }, + { 1600, 0x009a, 9 }, + { 1664, 0x0018, 6 }, + { 1728, 0x009b, 9 }, + { 1792, 0x0008, 11 }, + { 1856, 0x000c, 11 }, + { 1920, 0x000d, 11 }, + { 1984, 0x0012, 12 }, + { 2048, 0x0013, 12 }, + { 2112, 0x0014, 12 }, + { 2176, 0x0015, 12 }, + { 2240, 0x0016, 12 }, + { 2304, 0x0017, 12 }, + { 2368, 0x001c, 12 }, + { 2432, 0x001d, 12 }, + { 2496, 0x001e, 12 }, + { 2560, 0x001f, 12 }, + { 9999, 0x0001, 12 } // EOL +}; + +const CCIHuffmanTableEntry CCIBlackTableSave[CCIBlackTableSize]={ + { 0, 0x0037, 10 }, + { 1, 0x0002, 3 }, + { 2, 0x0003, 2 }, + { 3, 0x0002, 2 }, + { 4, 0x0003, 3 }, + { 5, 0x0003, 4 }, + { 6, 0x0002, 4 }, + { 7, 0x0003, 5 }, + { 8, 0x0005, 6 }, + { 9, 0x0004, 6 }, + { 10, 0x0004, 7 }, + { 11, 0x0005, 7 }, + { 12, 0x0007, 7 }, + { 13, 0x0004, 8 }, + { 14, 0x0007, 8 }, + { 15, 0x0018, 9 }, + { 16, 0x0017, 10 }, + { 17, 0x0018, 10 }, + { 18, 0x0008, 10 }, + { 19, 0x0067, 11 }, + { 20, 0x0068, 11 }, + { 21, 0x006c, 11 }, + { 22, 0x0037, 11 }, + { 23, 0x0028, 11 }, + { 24, 0x0017, 11 }, + { 25, 0x0018, 11 }, + { 26, 0x00ca, 12 }, + { 27, 0x00cb, 12 }, + { 28, 0x00cc, 12 }, + { 29, 0x00cd, 12 }, + { 30, 0x0068, 12 }, + { 31, 0x0069, 12 }, + { 32, 0x006a, 12 }, + { 33, 0x006b, 12 }, + { 34, 0x00d2, 12 }, + { 35, 0x00d3, 12 }, + { 36, 0x00d4, 12 }, + { 37, 0x00d5, 12 }, + { 38, 0x00d6, 12 }, + { 39, 0x00d7, 12 }, + { 40, 0x006c, 12 }, + { 41, 0x006d, 12 }, + { 42, 0x00da, 12 }, + { 43, 0x00db, 12 }, + { 44, 0x0054, 12 }, + { 45, 0x0055, 12 }, + { 46, 0x0056, 12 }, + { 47, 0x0057, 12 }, + { 48, 0x0064, 12 }, + { 49, 0x0065, 12 }, + { 50, 0x0052, 12 }, + { 51, 0x0053, 12 }, + { 52, 0x0024, 12 }, + { 53, 0x0037, 12 }, + { 54, 0x0038, 12 }, + { 55, 0x0027, 12 }, + { 56, 0x0028, 12 }, + { 57, 0x0058, 12 }, + { 58, 0x0059, 12 }, + { 59, 0x002b, 12 }, + { 60, 0x002c, 12 }, + { 61, 0x005a, 12 }, + { 62, 0x0066, 12 }, + { 63, 0x0067, 12 }, + { 64, 0x000f, 10 }, + { 128, 0x00c8, 12 }, + { 192, 0x00c9, 12 }, + { 256, 0x005b, 12 }, + { 320, 0x0033, 12 }, + { 384, 0x0034, 12 }, + { 448, 0x0035, 12 }, + { 512, 0x006c, 13 }, + { 576, 0x006d, 13 }, + { 640, 0x004a, 13 }, + { 704, 0x004b, 13 }, + { 768, 0x004c, 13 }, + { 832, 0x004d, 13 }, + { 896, 0x0072, 13 }, + { 960, 0x0073, 13 }, + { 1024, 0x0074, 13 }, + { 1088, 0x0075, 13 }, + { 1152, 0x0076, 13 }, + { 1216, 0x0077, 13 }, + { 1280, 0x0052, 13 }, + { 1344, 0x0053, 13 }, + { 1408, 0x0054, 13 }, + { 1472, 0x0055, 13 }, + { 1536, 0x005a, 13 }, + { 1600, 0x005b, 13 }, + { 1664, 0x0064, 13 }, + { 1728, 0x0065, 13 }, + { 1792, 0x0008, 11 }, + { 1856, 0x000c, 11 }, + { 1920, 0x000d, 11 }, + { 1984, 0x0012, 12 }, + { 2048, 0x0013, 12 }, + { 2112, 0x0014, 12 }, + { 2176, 0x0015, 12 }, + { 2240, 0x0016, 12 }, + { 2304, 0x0017, 12 }, + { 2368, 0x001c, 12 }, + { 2432, 0x001d, 12 }, + { 2496, 0x001e, 12 }, + { 2560, 0x001f, 12 }, + { 9999, 0x0001, 12 } // EOL +}; + + +const CCIHuffmanTableEntry CCI2DModeTableSave[CCI2DModeTableSize]={ + { CCI2DMODE_UNCOMP , 0x000f, 10 }, + { CCI2DMODE_PASS , 0x0001, 4 }, + { CCI2DMODE_HORZ , 0x0001, 3 }, + { CCI2DMODE_VERT_L3, 0x0002, 7 }, + { CCI2DMODE_VERT_L2, 0x0002, 6 }, + { CCI2DMODE_VERT_L1, 0x0002, 3 }, + { CCI2DMODE_VERT_0 , 0x0001, 1 }, + { CCI2DMODE_VERT_R1, 0x0003, 3 }, + { CCI2DMODE_VERT_R2, 0x0003, 6 }, + { CCI2DMODE_VERT_R3, 0x0003, 7 } +}; + + +const CCIHuffmanTableEntry CCIUncompTableSave[CCIUncompTableSize]={ + { CCIUNCOMP_0White_1Black, 0x0001, 1 }, + { CCIUNCOMP_1White_1Black, 0x0001, 2 }, + { CCIUNCOMP_2White_1Black, 0x0001, 3 }, + { CCIUNCOMP_3White_1Black, 0x0001, 4 }, + { CCIUNCOMP_4White_1Black, 0x0001, 5 }, + { CCIUNCOMP_5White , 0x0001, 6 }, + { CCIUNCOMP_0White_End , 0x0001, 7 }, + { CCIUNCOMP_1White_End , 0x0001, 8 }, + { CCIUNCOMP_2White_End , 0x0001, 9 }, + { CCIUNCOMP_3White_End , 0x0001, 10 }, + { CCIUNCOMP_4White_End , 0x0001, 11 } +}; + +//========================================================================= + + +CCIDecompressor::CCIDecompressor( ULONG nOpts, UINT32 nImageWidth ) : + bTableBad ( FALSE ), + bStatus ( FALSE ), + pByteSwap ( NULL ), + nWidth ( nImageWidth ), + nOptions ( nOpts ), + pLastLine ( NULL ) +{ + if ( nOpts & CCI_OPTION_INVERSEBITORDER ) + { + pByteSwap = new BYTE[ 256 ]; + for ( int i = 0; i < 256; i++ ) + { + pByteSwap[ i ] = sal::static_int_cast< BYTE >( + ( i << 7 ) | ( ( i & 2 ) << 5 ) | ( ( i & 4 ) << 3 ) | ( ( i & 8 ) << 1 ) | + ( ( i & 16 ) >> 1 ) | ( ( i & 32 ) >> 3 ) | ( ( i & 64 ) >> 5 ) | ( ( i & 128 ) >> 7 )); + } + } + + pWhiteLookUp =new CCILookUpTableEntry[1<<13]; + pBlackLookUp =new CCILookUpTableEntry[1<<13]; + p2DModeLookUp=new CCILookUpTableEntry[1<<10]; + pUncompLookUp=new CCILookUpTableEntry[1<<11]; + + MakeLookUp(CCIWhiteTable,CCIWhiteTableSave,pWhiteLookUp,CCIWhiteTableSize,13); + MakeLookUp(CCIBlackTable,CCIBlackTableSave,pBlackLookUp,CCIBlackTableSize,13); + MakeLookUp(CCI2DModeTable,CCI2DModeTableSave,p2DModeLookUp,CCI2DModeTableSize,10); + MakeLookUp(CCIUncompTable,CCIUncompTableSave,pUncompLookUp,CCIUncompTableSize,11); +} + + +CCIDecompressor::~CCIDecompressor() +{ + delete[] pByteSwap; + delete[] pLastLine; + delete[] pWhiteLookUp; + delete[] pBlackLookUp; + delete[] p2DModeLookUp; + delete[] pUncompLookUp; +} + + +void CCIDecompressor::StartDecompression( SvStream & rIStream ) +{ + pIStream = &rIStream; + nInputBitsBufSize = 0; + bFirstEOL = TRUE; + bStatus = TRUE; + nEOLCount = 0; + + if ( bTableBad == TRUE ) + return; +} + + +BOOL CCIDecompressor::DecompressScanline( BYTE * pTarget, ULONG nTargetBits ) +{ + USHORT i; + BYTE * pSrc,* pDst; + BOOL b2D; + + if ( nEOLCount >= 5 ) // RTC( Return To Controller ) + return TRUE; + + if ( bStatus == FALSE ) + return FALSE; + + // Wenn EOL-Codes vorhanden sind, steht der EOL-Code auch vor der ersten Zeile. + // (und ich dachte EOL heisst 'End Of Line'...) + // Daher lesen wir den EOL-Code immer vor jeder Zeile als erstes ein: + if ( nOptions & CCI_OPTION_EOL ) + { + if ( bFirstEOL ) + { + UINT32 nCurPos = pIStream->Tell(); + UINT16 nOldInputBitsBufSize = nInputBitsBufSize; + UINT32 nOldInputBitsBuf = nInputBitsBuf; + if ( ReadEOL( 32 ) == FALSE ) + { + nInputBitsBufSize = nOldInputBitsBufSize; + nInputBitsBuf = nOldInputBitsBuf; + pIStream->Seek( nCurPos ); + nOptions &=~ CCI_OPTION_EOL; // CCITT Group 3 - Compression Type 2 + } + bFirstEOL = FALSE; + } + else + { + if ( ReadEOL( nTargetBits ) == FALSE ) + { + return bStatus; + } + } + } + + if ( nEOLCount >= 5 ) // RTC( Return To Controller ) + return TRUE; + + // ggf. eine weisse vorherige Zeile herstellen fuer 2D: + if ( nOptions & CCI_OPTION_2D ) + { + if ( pLastLine == NULL || nLastLineSize != ( ( nTargetBits + 7 ) >> 3 ) ) + { + if ( pLastLine == NULL ) + delete[] pLastLine; + nLastLineSize = ( nTargetBits + 7 ) >> 3; + pLastLine = new BYTE[ nLastLineSize ]; + pDst = pLastLine; + for ( i = 0; i < nLastLineSize; i++ ) *( pDst++ ) = 0x00; + } + } + // ggf. Zeilen-Anfang auf naechste Byte-Grenze runden: + if ( nOptions & CCI_OPTION_BYTEALIGNROW ) + nInputBitsBufSize &= 0xfff8; + + // Ist es eine 2D-Zeile ?: + if ( nOptions & CCI_OPTION_2D ) + { + if ( nOptions & CCI_OPTION_EOL ) + b2D = Read2DTag(); + else + b2D = TRUE; + } + else + b2D = FALSE; + + // Zeile einlesen: + if ( b2D ) + Read2DScanlineData( pTarget, (USHORT)nTargetBits ); + else + Read1DScanlineData( pTarget, (USHORT)nTargetBits ); + + // Wenn wir im 2D-Modus sind, muessen wir uns die Zeile merken: + if ( nOptions & CCI_OPTION_2D && bStatus == TRUE ) + { + pSrc = pTarget; + pDst = pLastLine; + for ( i = 0; i < nLastLineSize; i++ ) *(pDst++)=*(pSrc++); + } + + if ( pIStream->GetError() ) + bStatus = FALSE; + + return bStatus; +} + + +void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab, + const CCIHuffmanTableEntry * pHufTabSave, + CCILookUpTableEntry * pLookUp, + USHORT nHuffmanTableSize, + USHORT nMaxCodeBits) +{ + USHORT i,j,nMinCode,nMaxCode,nLookUpSize,nMask; + + if (bTableBad==TRUE) return; + + nLookUpSize=1<>(16-nMaxCodeBits); + + for (i=0; inMaxCodeBits ) + { + bTableBad=TRUE; + return; + } + nMinCode = nMask & (pHufTab[i].nCode << (nMaxCodeBits-pHufTab[i].nCodeBits)); + nMaxCode = nMinCode | (nMask >> pHufTab[i].nCodeBits); + for (j=nMinCode; j<=nMaxCode; j++) { + if (pLookUp[j].nCodeBits!=0) { + bTableBad=TRUE; + return; + } + pLookUp[j].nValue=pHufTab[i].nValue; + pLookUp[j].nCodeBits=pHufTab[i].nCodeBits; + } + } +} + + +BOOL CCIDecompressor::ReadEOL( UINT32 /*nMaxFillBits*/ ) +{ + USHORT nCode; + BYTE nByte; + + // if (nOptions&CCI_OPTION_BYTEALIGNEOL) nMaxFillBits=7; else nMaxFillBits=0; + // Buuuh: Entweder wird die Option in itiff.cxx nicht richtig gesetzt (-> Fehler in Doku) + // oder es gibt tatsaechlich gemeine Export-Filter, die immer ein Align machen. + // Ausserdem wurden Dateien gefunden, in denen mehr als die maximal 7 noetigen + // Fuellbits vor dem EOL-Code stehen. Daher akzeptieren wir nun grundsaetzlich + // bis zu 32-Bloedsinn-Bits vor dem EOL-Code: + // und ich habe eine Datei gefunden in der bis zu ??? Bloedsinn Bits stehen, zudem ist dort die Bit Reihenfolge verdreht (SJ); + + UINT32 nMaxPos = pIStream->Tell(); + nMaxPos += nWidth >> 3; + + for ( ;; ) + { + while ( nInputBitsBufSize < 12 ) + { + *pIStream >> nByte; + if ( pIStream->IsEof() ) + return FALSE; + if ( pIStream->Tell() > nMaxPos ) + return FALSE; + + if ( nOptions & CCI_OPTION_INVERSEBITORDER ) + nByte = pByteSwap[ nByte ]; + nInputBitsBuf=(nInputBitsBuf<<8) | (ULONG)nByte; + nInputBitsBufSize += 8; + } + nCode = (USHORT)( ( nInputBitsBuf >> ( nInputBitsBufSize - 12 ) ) & 0x0fff ); + if ( nCode == 0x0001 ) + { + nEOLCount++; + nInputBitsBufSize -= 12; + break; + } + else + nInputBitsBufSize--; + } + return TRUE; +} + + +BOOL CCIDecompressor::Read2DTag() +{ + BYTE nByte; + + // Ein Bit einlesen und TRUE liefern, wenn es 0 ist, sonst FALSE + if (nInputBitsBufSize==0) { + *pIStream >> nByte; + if ( nOptions & CCI_OPTION_INVERSEBITORDER ) + nByte = pByteSwap[ nByte ]; + nInputBitsBuf=(ULONG)nByte; + nInputBitsBufSize=8; + } + nInputBitsBufSize--; + if ( ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) ) return FALSE; + else return TRUE; +} + + +BYTE CCIDecompressor::ReadBlackOrWhite() +{ + BYTE nByte; + + // Ein Bit einlesen und 0x00 liefern, wenn es 0 ist, sonst 0xff + if (nInputBitsBufSize==0) { + *pIStream >> nByte; + if ( nOptions & CCI_OPTION_INVERSEBITORDER ) + nByte = pByteSwap[ nByte ]; + nInputBitsBuf=(ULONG)nByte; + nInputBitsBufSize=8; + } + nInputBitsBufSize--; + if ( ((nInputBitsBuf>>nInputBitsBufSize)&0x0001) ) return 0xff; + else return 0x00; +} + + +USHORT CCIDecompressor::ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp, + USHORT nMaxCodeBits) +{ + USHORT nCode,nCodeBits; + BYTE nByte; + + // Einen Huffman-Code einlesen und dekodieren: + while (nInputBitsBufSize> nByte; + if ( nOptions & CCI_OPTION_INVERSEBITORDER ) + nByte = pByteSwap[ nByte ]; + nInputBitsBuf=(nInputBitsBuf<<8) | (ULONG)nByte; + nInputBitsBufSize+=8; + } + nCode=(USHORT)((nInputBitsBuf>>(nInputBitsBufSize-nMaxCodeBits)) + &(0xffff>>(16-nMaxCodeBits))); + nCodeBits=pLookUp[nCode].nCodeBits; + if (nCodeBits==0) bStatus=FALSE; + nInputBitsBufSize = nInputBitsBufSize - nCodeBits; + return pLookUp[nCode].nValue; +} + + +void CCIDecompressor::FillBits(BYTE * pTarget, USHORT nTargetBits, + USHORT nBitPos, USHORT nNumBits, + BYTE nBlackOrWhite) +{ + if ( nBitPos >= nTargetBits ) + return; + if ( nBitPos + nNumBits > nTargetBits ) + nNumBits = nTargetBits - nBitPos; + + pTarget+=nBitPos>>3; + nBitPos&=7; + + if (nBlackOrWhite==0x00) *pTarget &= 0xff << (8-nBitPos); + else *pTarget |= 0xff >> nBitPos; + if (nNumBits>8-nBitPos) { + nNumBits-=8-nBitPos; + while (nNumBits>=8) { + *(++pTarget)=nBlackOrWhite; + nNumBits-=8; + } + if (nNumBits>0) *(++pTarget)=nBlackOrWhite; + } +} + + +USHORT CCIDecompressor::CountBits(const BYTE * pData, USHORT nDataSizeBits, + USHORT nBitPos, BYTE nBlackOrWhite) +{ + USHORT nPos,nLo; + BYTE nData; + + // Hier wird die Anzahl der zusammenhaengenden Bits gezaehlt, die + // ab Position nBitPos in pTarget alle die Farbe nBlackOrWhite + // (0xff oder 0x00) haben. + + nPos=nBitPos; + for (;;) { + if (nPos>=nDataSizeBits) { + nPos=nDataSizeBits; + break; + } + nData=pData[nPos>>3]; + nLo=nPos & 7; + if ( nLo==0 && nData==nBlackOrWhite) nPos+=8; + else { + if ( ((nData^nBlackOrWhite) & (0x80 >> nLo))!=0) break; + nPos++; + } + } + if (nPos<=nBitPos) return 0; + else return nPos-nBitPos; +} + + +void CCIDecompressor::Read1DScanlineData(BYTE * pTarget, USHORT nTargetBits) +{ + USHORT nCode,nCodeBits,nDataBits,nTgtFreeByteBits; + BYTE nByte; + BYTE nBlackOrWhite; // ist 0xff fuer Black oder 0x00 fuer White + BOOL bTerminatingCode; + + // Der erste Code ist immer eine "White-Code": + nBlackOrWhite=0x00; + + // Anzahl der Bits, die im Byte *pTarget noch nicht geschrieben sind: + nTgtFreeByteBits=8; + + // Schleife ueber Codes aus dem Eingabe-Stream: + do { + + // die naechsten 13 Bits nach nCode holen, aber noch nicht + // aus dem Eingabe-Buffer loeschen: + while (nInputBitsBufSize<13) { + *pIStream >> nByte; + if ( nOptions & CCI_OPTION_INVERSEBITORDER ) + nByte = pByteSwap[ nByte ]; + nInputBitsBuf=(nInputBitsBuf<<8) | (ULONG)nByte; + nInputBitsBufSize+=8; + } + nCode=(USHORT)((nInputBitsBuf>>(nInputBitsBufSize-13))&0x1fff); + + // Anzahl der DatenBits und Anzahl der CodeBits ermitteln: + if (nBlackOrWhite) { + nCodeBits=pBlackLookUp[nCode].nCodeBits; + nDataBits=pBlackLookUp[nCode].nValue; + } + else { + nCodeBits=pWhiteLookUp[nCode].nCodeBits; + nDataBits=pWhiteLookUp[nCode].nValue; + } + // Ist es ein Ungueltiger Code ? + if ( nDataBits == 9999 ) + { + return; + } + if ( nCodeBits == 0 ) + { + return; // das koennen sich jetzt um FuellBits handeln + } + nEOLCount = 0; + // Zuviele Daten ? + if (nDataBits>nTargetBits) { + // Ja, koennte ein Folge-Fehler durch ungueltigen Code sein, + // daher irdenwie weitermachen: + nDataBits=nTargetBits; + } + + // Ist es ein 'Terminating-Code' ? + if (nDataBits<64) bTerminatingCode=TRUE; else bTerminatingCode=FALSE; + + // Die gelesenen Bits aus dem Eingabe-Buffer entfernen: + nInputBitsBufSize = nInputBitsBufSize - nCodeBits; + + // Die Anzahl Daten-Bits in die Scanline schreiben: + if (nDataBits>0) { + nTargetBits = nTargetBits - nDataBits; + if (nBlackOrWhite==0x00) *pTarget &= 0xff << nTgtFreeByteBits; + else *pTarget |= 0xff >> (8-nTgtFreeByteBits); + if (nDataBits<=nTgtFreeByteBits) { + if (nDataBits==nTgtFreeByteBits) { + pTarget++; + nTgtFreeByteBits=8; + } + else nTgtFreeByteBits = nTgtFreeByteBits - nDataBits; + } + else { + nDataBits = nDataBits - nTgtFreeByteBits; + pTarget++; + nTgtFreeByteBits=8; + while (nDataBits>=8) { + *(pTarget++)=nBlackOrWhite; + nDataBits-=8; + } + if (nDataBits>0) { + *pTarget=nBlackOrWhite; + nTgtFreeByteBits = nTgtFreeByteBits - nDataBits; + } + } + } + + // ggf. Umschaltung Black <-> White: + if (bTerminatingCode==TRUE) nBlackOrWhite=~nBlackOrWhite; + + } while (nTargetBits>0 || bTerminatingCode==FALSE); +} + + + +void CCIDecompressor::Read2DScanlineData(BYTE * pTarget, USHORT nTargetBits) +{ + USHORT n2DMode,nBitPos,nUncomp,nRun,nRun2,nt; + BYTE nBlackOrWhite; + + nBlackOrWhite=0x00; + nBitPos=0; + + while (nBitPos=64); + nRun2=0; + do { + nt=ReadCodeAndDecode(pBlackLookUp,13); + nRun2 = nRun2 + nt; + } while (nt>=64); + } + else { + nRun=0; + do { + nt=ReadCodeAndDecode(pBlackLookUp,13); + nRun = nRun + nt; + } while (nt>=64); + nRun2=0; + do { + nt=ReadCodeAndDecode(pWhiteLookUp,13); + nRun2 = nRun2 + nt; + } while (nt>=64); + } + FillBits(pTarget,nTargetBits,nBitPos,nRun,nBlackOrWhite); + nBitPos = nBitPos + nRun; + FillBits(pTarget,nTargetBits,nBitPos,nRun2,~nBlackOrWhite); + nBitPos = nBitPos + nRun2; + } + + else { // Es ist einer der Modi CCI2DMODE_VERT_... + if (nBitPos==0 && nBlackOrWhite==0x00 && CountBits(pLastLine,nTargetBits,0,0xff)!=0) nRun=0; + else { + nRun=CountBits(pLastLine,nTargetBits,nBitPos,~nBlackOrWhite); + nRun = nRun + CountBits(pLastLine,nTargetBits,nBitPos+nRun,nBlackOrWhite); + } + nRun+=n2DMode-CCI2DMODE_VERT_0; + FillBits(pTarget,nTargetBits,nBitPos,nRun,nBlackOrWhite); + nBitPos = nBitPos + nRun; + nBlackOrWhite=~nBlackOrWhite; + } + } +} + + diff --git a/filter/source/graphicfilter/itiff/ccidecom.hxx b/filter/source/graphicfilter/itiff/ccidecom.hxx new file mode 100644 index 000000000000..2543be82d052 --- /dev/null +++ b/filter/source/graphicfilter/itiff/ccidecom.hxx @@ -0,0 +1,125 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _CCIDECOM_HXX +#define _CCIDECOM_HXX + +#include + + +#define CCI_OPTION_2D 1 // 2D-Komprimierung (statt 1D) +#define CCI_OPTION_EOL 2 // EOL-Codes am Ende jeder Zeile vorhanden +#define CCI_OPTION_BYTEALIGNEOL 4 // Fuellbits vor jedem EOL-Code, so dass + // Ende von EOL auf Bytes aligend +#define CCI_OPTION_BYTEALIGNROW 8 // Rows beginnen immer auf Byte-Grenze +#define CCI_OPTION_INVERSEBITORDER 16 + +// Eintrag in eine Huffman-Tabelle: +struct CCIHuffmanTableEntry { + USHORT nValue; // Der Daten-Wert. + USHORT nCode; // Der Code durch den der Daten-Wert repraesentiert wird. + USHORT nCodeBits; // Laenge des Codes in Bits. +}; + + +// Eintrag in eine Hash-Tabelle zur schnellen Dekodierung +struct CCILookUpTableEntry { + USHORT nValue; + USHORT nCodeBits; +}; + + +class CCIDecompressor { + +public: + + CCIDecompressor( ULONG nOptions, UINT32 nImageWidth ); + ~CCIDecompressor(); + + void StartDecompression( SvStream & rIStream ); + + BOOL DecompressScanline(BYTE * pTarget, ULONG nTargetBits ); + +private: + + void MakeLookUp(const CCIHuffmanTableEntry * pHufTab, + const CCIHuffmanTableEntry * pHufTabSave, + CCILookUpTableEntry * pLookUp, + USHORT nHuffmanTableSize, + USHORT nMaxCodeBits); + + BOOL ReadEOL( UINT32 nMaxFillBits ); + + BOOL Read2DTag(); + + BYTE ReadBlackOrWhite(); + + USHORT ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp, + USHORT nMaxCodeBits); + + void FillBits(BYTE * pTarget, USHORT nTargetBits, + USHORT nBitPos, USHORT nNumBits, + BYTE nBlackOrWhite); + + USHORT CountBits(const BYTE * pData, USHORT nDataSizeBits, + USHORT nBitPos, BYTE nBlackOrWhite); + + void Read1DScanlineData(BYTE * pTarget, USHORT nTargetBits); + + void Read2DScanlineData(BYTE * pTarget, USHORT nTargetBits); + + BOOL bTableBad; + + BOOL bStatus; + + BYTE* pByteSwap; + + SvStream * pIStream; + + UINT32 nEOLCount; + + UINT32 nWidth; + + ULONG nOptions; + + BOOL bFirstEOL; + + CCILookUpTableEntry * pWhiteLookUp; + CCILookUpTableEntry * pBlackLookUp; + CCILookUpTableEntry * p2DModeLookUp; + CCILookUpTableEntry * pUncompLookUp; + + ULONG nInputBitsBuf; + USHORT nInputBitsBufSize; + + BYTE * pLastLine; + ULONG nLastLineSize; +}; + + +#endif + diff --git a/filter/source/graphicfilter/itiff/exports.map b/filter/source/graphicfilter/itiff/exports.map new file mode 100644 index 000000000000..941e4ab9bde8 --- /dev/null +++ b/filter/source/graphicfilter/itiff/exports.map @@ -0,0 +1,7 @@ +UDK_3_0_0 { + global: + GraphicImport; + + local: + *; +}; diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx new file mode 100644 index 000000000000..5ad400fc3149 --- /dev/null +++ b/filter/source/graphicfilter/itiff/itiff.cxx @@ -0,0 +1,1342 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" +#include +#include +#ifndef _SV_FLTCALL_HXX +#include +#endif +#include +#include "lzwdecom.hxx" +#include "ccidecom.hxx" + +#define OOODEBUG(str,Num) //(InfoBox(NULL,String(str)+String(" ")+String(Num)).Execute(); + +namespace { + +template< typename T > T BYTESWAP(T nByte) { + return ( nByte << 7 ) | ( ( nByte & 2 ) << 5 ) | ( ( nByte & 4 ) << 3 ) | + ( ( nByte & 8 ) << 1 ) | ( ( nByte & 16 ) >> 1 ) | + ( ( nByte & 32 ) >> 3 ) | ( ( nByte & 64 ) >> 5 ) | + ( ( nByte & 128 ) >> 7 ); +} + +} + +//============================ TIFFReader ================================== + +class TIFFReader +{ + +private: + + BOOL bStatus; // Ob bisher kein Fehler auftrat + Animation aAnimation; + ULONG nLastPercent; + + SvStream* pTIFF; // Die einzulesende TIFF-Datei + Bitmap aBitmap; + BitmapWriteAccess* pAcc; + USHORT nDstBitsPerPixel; + + ULONG nOrigPos; // Anfaengliche Position in pTIFF + UINT16 nOrigNumberFormat; // Anfaengliches Nummern-Format von pTIFF + + + UINT16 nDataType; + // Daten, die aus dem TIFF-Tags entnommen werden: + BOOL bByteSwap; // TRUE wenn bits 0..7 -> 7..0 invertiert werden sollen ( FILLORDER = 2 ); + BYTE nByte1; // 'I', wenn Format LittleEndian + + ULONG nNewSubFile; // + ULONG nSubFile; // + ULONG nImageWidth; // Bildbreite in Pixel + ULONG nImageLength; // Bildhoehe in Pixel + ULONG nBitsPerSample; // Bits pro Pixel pro Ebene + ULONG nCompression; // Art der Kompriemierung + ULONG nPhotometricInterpretation; // + ULONG nThresholding; // + ULONG nCellWidth; // + ULONG nCellLength; // + ULONG nFillOrder; // + ULONG* pStripOffsets; // Feld von Offsets zu den Bitmap-Daten-"Strips" + ULONG nNumStripOffsets; // Groesse obigen Feldes + ULONG nOrientation; // + ULONG nSamplesPerPixel; // Anzahl der Ebenen + ULONG nRowsPerStrip; // Wenn nicht komprimiert: Zahl der Zeilen pro Strip + ULONG* pStripByteCounts; // Wenn komprimiert (bestimmte Art): Groesse der Strips + ULONG nNumStripByteCounts; // Anzahl der Eintraege in obiges Feld + ULONG nMinSampleValue; // + ULONG nMaxSampleValue; // + double fXResolution; // X-Aufloesung oder 0.0 + double fYResolution; // Y-Aufloesung oder 0.0 + ULONG nPlanarConfiguration; // + ULONG nGroup3Options; // + ULONG nGroup4Options; // + ULONG nResolutionUnit; // Einheit von fX/YResolution: 1=unbekannt, 2(default)=Zoll, 3=cm + ULONG nPredictor; // + ULONG* pColorMap; // Farb-Palette + ULONG nNumColors; // Anzahl Farben in der Farbpalette + + ULONG nPlanes; // Anzahl der Ebenen in der Tiff-Datei + ULONG nStripsPerPlane; // Anzahl der Strips pro Ebene + ULONG nBytesPerRow; // Bytes pro Zeile pro Ebene in der Tiff-Datei ( unkomprimiert ) + BYTE* pMap[ 4 ]; // Temporaere Scanline + + + void MayCallback( ULONG nPercent ); + + ULONG DataTypeSize(); + ULONG ReadIntData(); + double ReadDoubleData(); + + void ReadHeader(); + void ReadTagData( USHORT nTagType, sal_uInt32 nDataLen ); + + BOOL ReadMap( ULONG nMinPercent, ULONG nMaxPercent ); + // Liesst/dekomprimert die Bitmap-Daten, und fuellt pMap + + ULONG GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount ); + // Holt nBitsCount Bits aus pSrc[..] an der Bit-Position nBitsPos + + void MakePalCol( void ); + // Erzeugt die Bitmap aus der temporaeren Bitmap pMap + // und loescht dabei pMap teilweise + BOOL ConvertScanline( ULONG nY ); + // Konvertiert eine Scanline in das Windows-BMP-Format + +public: + + TIFFReader() {} + ~TIFFReader() {} + + BOOL ReadTIFF( SvStream & rTIFF, Graphic & rGraphic ); +}; + +//=================== Methoden von TIFFReader ============================== + +void TIFFReader::MayCallback( ULONG /*nPercent*/ ) +{ +/* + if ( nPercent >= nLastPercent + 3 ) + { + nLastPercent=nPercent; + if ( pCallback != NULL && nPercent <= 100 && bStatus == TRUE ) + { + if (((*pCallback)(pCallerData,(USHORT)nPercent)) == TRUE ) + bStatus = FALSE; + } + } +*/ +} + +// --------------------------------------------------------------------------------- + +ULONG TIFFReader::DataTypeSize() +{ + ULONG nSize; + switch ( nDataType ) + { + case 1 : // BYTE + case 2 : // ACSII + case 6 : // SIGNED Byte + case 7 : // UNDEFINED + nSize = 1; + break; + case 3 : // UINT16 + case 8 : // INT16 + nSize = 2; + break; + case 4 : // UINT32 + case 9 : // INT32 + case 11 : // FLOAT + nSize = 4; + break; + case 5 : // RATIONAL + case 10 : // SIGNED RATINAL + case 12 : // DOUBLE + nSize = 8; + break; + default: + pTIFF->SetError(SVSTREAM_FILEFORMAT_ERROR); + nSize=1; + } + return nSize; +} + +// --------------------------------------------------------------------------------- + +ULONG TIFFReader::ReadIntData() +{ + double nDOUBLE; + float nFLOAT; + UINT32 nUINT32a, nUINT32b; + INT32 nINT32; + UINT16 nUINT16; + INT16 nINT16; + BYTE nBYTE; + char nCHAR; + + switch( nDataType ) + { + case 0 : //?? + case 1 : + case 2 : + case 7 : + *pTIFF >> nBYTE; + nUINT32a = (ULONG)nBYTE; + break; + case 3 : + *pTIFF >> nUINT16; + nUINT32a = (ULONG)nUINT16; + break; + case 9 : + case 4 : + *pTIFF >> nUINT32a; + break; + case 5 : + *pTIFF >> nUINT32a >> nUINT32b; + if ( nUINT32b != 0 ) + nUINT32a /= nUINT32b; + break; + case 6 : + *pTIFF >> nCHAR; + nUINT32a = (INT32)nCHAR; + break; + case 8 : + *pTIFF >> nINT16; + nUINT32a = (INT32)nINT16; + break; + case 10 : + *pTIFF >> nUINT32a >> nINT32; + if ( nINT32 != 0 ) + nUINT32a /= nINT32; + break; + case 11 : + *pTIFF >> nFLOAT; + nUINT32a = (INT32)nFLOAT; + break; + case 12 : + *pTIFF >> nDOUBLE; + nUINT32a = (INT32)nDOUBLE; + break; + default: + *pTIFF >> nUINT32a; + break; + } + return nUINT32a; +} + +// --------------------------------------------------------------------------------- + +double TIFFReader::ReadDoubleData() +{ + sal_uInt32 nulong; + double nd; + + if ( nDataType == 5 ) + { + *pTIFF >> nulong; + nd = (double)nulong; + *pTIFF >> nulong; + if ( nulong != 0 ) + nd /= (double)nulong; + } + else + nd = (double)ReadIntData(); + return nd; +} + +// --------------------------------------------------------------------------------- + +void TIFFReader::ReadTagData( USHORT nTagType, sal_uInt32 nDataLen) +{ + if ( bStatus == FALSE ) + return; + + switch ( nTagType ) + { + case 0x00fe: // New Sub File + nNewSubFile = ReadIntData(); + OOODEBUG("NewSubFile",nNewSubFile); + break; + + case 0x00ff: // Sub File + nSubFile = ReadIntData(); + OOODEBUG("SubFile",nSubFile); + break; + + case 0x0100: // Image Width + nImageWidth = ReadIntData(); + OOODEBUG("ImageWidth",nImageWidth); + break; + + case 0x0101: // Image Length + nImageLength = ReadIntData(); + OOODEBUG("ImageLength",nImageLength); + break; + + case 0x0102: // Bits Per Sample + nBitsPerSample = ReadIntData(); + OOODEBUG("BitsPerSample",nBitsPerSample); + break; + + case 0x0103: // Compression + nCompression = ReadIntData(); + OOODEBUG("Compression",nCompression); + break; + + case 0x0106: // Photometric Interpreation + nPhotometricInterpretation = ReadIntData(); + OOODEBUG("PhotometricInterpretation",nPhotometricInterpretation); + break; + + case 0x0107: // Thresholding + nThresholding = ReadIntData(); + OOODEBUG("Thresholding",nThresholding); + break; + + case 0x0108: // Cell Width + nCellWidth = ReadIntData(); + break; + + case 0x0109: // Cell Length + nCellLength = ReadIntData(); + break; + + case 0x010a: // Fill Order + nFillOrder = ReadIntData(); + OOODEBUG("FillOrder",nFillOrder); + break; + + case 0x0111: { // Strip Offset(s) + ULONG nOldNumSO, i, * pOldSO; + pOldSO = pStripOffsets; + if ( pOldSO == NULL ) + nNumStripOffsets = 0; + nOldNumSO = nNumStripOffsets; + nDataLen += nOldNumSO; + if ( ( nDataLen > nOldNumSO ) && ( nDataLen < SAL_MAX_UINT32 / sizeof( sal_uInt32 ) ) ) + { + nNumStripOffsets = nDataLen; + try + { + pStripOffsets = new ULONG[ nNumStripOffsets ]; + } + catch (std::bad_alloc) + { + pStripOffsets = NULL; + nNumStripOffsets = 0; + } + if ( pStripOffsets ) + { + for ( i = 0; i < nOldNumSO; i++ ) + pStripOffsets[ i ] = pOldSO[ i ] + nOrigPos; + for ( i = nOldNumSO; i < nNumStripOffsets; i++ ) + pStripOffsets[ i ] = ReadIntData() + nOrigPos; + } + delete[] pOldSO; + } + OOODEBUG("StripOffsets (Anzahl:)",nDataLen); + break; + } + case 0x0112: // Orientation + nOrientation = ReadIntData(); + OOODEBUG("Orientation",nOrientation); + break; + + case 0x0115: // Samples Per Pixel + nSamplesPerPixel = ReadIntData(); + OOODEBUG("SamplesPerPixel",nSamplesPerPixel); + break; + + case 0x0116: // Rows Per Strip + nRowsPerStrip = ReadIntData(); + OOODEBUG("RowsPerStrip",nRowsPerStrip); + break; + + case 0x0117: { // Strip Byte Counts + ULONG nOldNumSBC, i, * pOldSBC; + pOldSBC = pStripByteCounts; + if ( pOldSBC == NULL ) + nNumStripByteCounts = 0; // Sicherheitshalber + nOldNumSBC = nNumStripByteCounts; + nDataLen += nOldNumSBC; + if ( ( nDataLen > nOldNumSBC ) && ( nDataLen < SAL_MAX_UINT32 / sizeof( sal_uInt32 ) ) ) + { + nNumStripByteCounts = nDataLen; + try + { + pStripByteCounts = new ULONG[ nNumStripByteCounts ]; + } + catch (std::bad_alloc) + { + pStripByteCounts = NULL; + nNumStripByteCounts = 0; + } + if ( pStripByteCounts ) + { + for ( i = 0; i < nOldNumSBC; i++ ) + pStripByteCounts[ i ] = pOldSBC[ i ]; + for ( i = nOldNumSBC; i < nNumStripByteCounts; i++) + pStripByteCounts[ i ] = ReadIntData(); + } + delete[] pOldSBC; + } + OOODEBUG("StripByteCounts (Anzahl:)",nDataLen); + break; + } + case 0x0118: // Min Sample Value + nMinSampleValue = ReadIntData(); + OOODEBUG("MinSampleValue",nMinSampleValue); + break; + + case 0x0119: // Max Sample Value + nMaxSampleValue = ReadIntData(); + OOODEBUG("MaxSampleValue",nMaxSampleValue); + break; + + case 0x011a: // X Resolution + fXResolution = ReadDoubleData(); + break; + + case 0x011b: // Y Resolution + fYResolution = ReadDoubleData(); + break; + + case 0x011c: // Planar Configuration + nPlanarConfiguration = ReadIntData(); + OOODEBUG("PlanarConfiguration",nPlanarConfiguration); + break; + + case 0x0124: // Group 3 Options + nGroup3Options = ReadIntData(); + OOODEBUG("Group3Options",nGroup3Options); + break; + + case 0x0125: // Group 4 Options + nGroup4Options = ReadIntData(); + OOODEBUG("Group4Options",nGroup4Options); + break; + + case 0x0128: // Resolution Unit + nResolutionUnit = ReadIntData(); + break; + + case 0x013d: // Predictor + nPredictor = ReadIntData(); + OOODEBUG("Predictor",nPredictor); + break; + + case 0x0140: { // Color Map + USHORT nVal; + ULONG i; + nNumColors= ( 1 << nBitsPerSample ); + if ( nDataType == 3 && nNumColors <= 256) + { + pColorMap = new ULONG[ 256 ]; + for ( i = 0; i < nNumColors; i++ ) + pColorMap[ i ] = 0; + for ( i = 0; i < nNumColors; i++ ) + { + *pTIFF >> nVal; + pColorMap[ i ] |= ( ( (ULONG)nVal ) << 8 ) & 0x00ff0000; + } + for ( i = 0; i < nNumColors; i++ ) + { + *pTIFF >> nVal; + pColorMap[ i ] |= ( (ULONG)nVal ) & 0x0000ff00; + } + for ( i = 0; i < nNumColors; i++ ) + { + *pTIFF >> nVal; + pColorMap[ i ] |= ( ( (ULONG)nVal ) >> 8 ) & 0x000000ff; + } + } + else + bStatus = FALSE; + OOODEBUG("ColorMap (Anzahl Farben:)", nNumColors); + break; + } + } + + if ( pTIFF->GetError() ) + bStatus = FALSE; +} + +// --------------------------------------------------------------------------------- + +BOOL TIFFReader::ReadMap( ULONG nMinPercent, ULONG nMaxPercent ) +{ + if ( nCompression == 1 || nCompression == 32771 ) + { + ULONG ny, np, nStrip, nStripBytesPerRow; + + if ( nCompression == 1 ) + nStripBytesPerRow = nBytesPerRow; + else + nStripBytesPerRow = ( nBytesPerRow + 1 ) & 0xfffffffe; + for ( ny = 0; ny < nImageLength; ny++ ) + { + for ( np = 0; np < nPlanes; np++ ) + { + nStrip = ny / nRowsPerStrip + np * nStripsPerPlane; + if ( nStrip >= nNumStripOffsets ) + return FALSE; + pTIFF->Seek( pStripOffsets[ nStrip ] + ( ny % nRowsPerStrip ) * nStripBytesPerRow ); + pTIFF->Read( pMap[ np ], nBytesPerRow ); + if ( pTIFF->GetError() ) + return FALSE; + MayCallback( nMinPercent + ( nMaxPercent - nMinPercent ) * ( np * nImageLength + ny) / ( nImageLength * nPlanes ) ); + } + if ( !ConvertScanline( ny ) ) + return FALSE; + } + } + else if ( nCompression == 2 || nCompression == 3 || nCompression == 4 ) + { + ULONG ny, np, nStrip, nOptions; + if ( nCompression == 2 ) + { + nOptions = CCI_OPTION_BYTEALIGNROW; + } + else if ( nCompression == 3 ) + { + nOptions = CCI_OPTION_EOL; + if ( nGroup3Options & 0x00000001 ) + nOptions |= CCI_OPTION_2D; + if ( nGroup3Options & 0x00000004 ) + nOptions |= CCI_OPTION_BYTEALIGNEOL; + if ( nGroup3Options & 0xfffffffa ) + return FALSE; + } + else + { // nCompression==4 + nOptions = CCI_OPTION_2D; + if ( nGroup4Options & 0xffffffff ) + return FALSE; + } + if ( nFillOrder == 2 ) + { + nOptions |= CCI_OPTION_INVERSEBITORDER; + bByteSwap = FALSE; + } + nStrip = 0; + if ( nStrip >= nNumStripOffsets ) + return FALSE; + pTIFF->Seek(pStripOffsets[nStrip]); + + CCIDecompressor aCCIDecom( nOptions, nImageWidth ); + + aCCIDecom.StartDecompression( *pTIFF ); + + for ( ny = 0; ny < nImageLength; ny++ ) + { + for ( np = 0; np < nPlanes; np++ ) + { + if ( ny / nRowsPerStrip + np * nStripsPerPlane > nStrip ) + { + nStrip=ny/nRowsPerStrip+np*nStripsPerPlane; + if ( nStrip >= nNumStripOffsets ) + return FALSE; + pTIFF->Seek( pStripOffsets[ nStrip ] ); + aCCIDecom.StartDecompression( *pTIFF ); + } + if ( aCCIDecom.DecompressScanline( pMap[ np ], nImageWidth * nBitsPerSample * nSamplesPerPixel / nPlanes ) == FALSE ) + return FALSE; + if ( pTIFF->GetError() ) + return FALSE; + MayCallback(nMinPercent+(nMaxPercent-nMinPercent)*(np*nImageLength+ny)/(nImageLength*nPlanes)); + } + if ( !ConvertScanline( ny ) ) + return FALSE; + } + } + else if ( nCompression == 5 ) + { + LZWDecompressor aLZWDecom; + ULONG ny, np, nStrip; + nStrip=0; + if ( nStrip >= nNumStripOffsets ) + return FALSE; + pTIFF->Seek(pStripOffsets[nStrip]); + aLZWDecom.StartDecompression(*pTIFF); + for ( ny = 0; ny < nImageLength; ny++ ) + { + for ( np = 0; np < nPlanes; np++ ) + { + if ( ny / nRowsPerStrip + np * nStripsPerPlane > nStrip ) + { + nStrip = ny / nRowsPerStrip + np * nStripsPerPlane; + if ( nStrip >= nNumStripOffsets ) + return FALSE; + pTIFF->Seek(pStripOffsets[nStrip]); + aLZWDecom.StartDecompression(*pTIFF); + } + if ( ( aLZWDecom.Decompress( pMap[ np ], nBytesPerRow ) != nBytesPerRow ) || pTIFF->GetError() ) + return FALSE; + MayCallback(nMinPercent+(nMaxPercent-nMinPercent)*(np*nImageLength+ny)/(nImageLength*nPlanes)); + } + if ( !ConvertScanline( ny ) ) + return FALSE; + } + } + else if ( nCompression == 32773 ) + { + ULONG nStrip,nRecCount,nRowBytesLeft,ny,np,i; + BYTE * pdst, nRecHeader, nRecData; + nStrip = 0; + if ( nStrip >= nNumStripOffsets ) + return FALSE; + pTIFF->Seek(pStripOffsets[nStrip]); + for ( ny = 0; ny < nImageLength; ny++ ) + { + for ( np = 0; np < nPlanes; np++ ) + { + if ( ny / nRowsPerStrip + np * nStripsPerPlane > nStrip ) + { + nStrip=ny/nRowsPerStrip+np*nStripsPerPlane; + if ( nStrip >= nNumStripOffsets ) + return FALSE; + pTIFF->Seek(pStripOffsets[nStrip]); + } + nRowBytesLeft = nBytesPerRow; + pdst=pMap[ np ]; + do + { + *pTIFF >> nRecHeader; + if ((nRecHeader&0x80)==0) + { + nRecCount=0x00000001+((ULONG)nRecHeader); + if ( nRecCount > nRowBytesLeft ) + return FALSE; + pTIFF->Read(pdst,nRecCount); + pdst+=nRecCount; + nRowBytesLeft-=nRecCount; + } + else if ( nRecHeader != 0x80 ) + { + nRecCount = 0x000000101 - ( (ULONG)nRecHeader ); + if ( nRecCount > nRowBytesLeft ) + { + nRecCount = nRowBytesLeft; + +// bStatus = FALSE; +// return; + + } + *pTIFF >> nRecData; + for ( i = 0; i < nRecCount; i++ ) + *(pdst++) = nRecData; + nRowBytesLeft -= nRecCount; + } + } while ( nRowBytesLeft != 0 ); + if ( pTIFF->GetError() ) + return FALSE; + MayCallback(nMinPercent+(nMaxPercent-nMinPercent)*(np*nImageLength+ny)/(nImageLength*nPlanes)); + } + if ( !ConvertScanline( ny ) ) + return FALSE; + } + } + else + return FALSE; + return TRUE; +} + +ULONG TIFFReader::GetBits( const BYTE * pSrc, ULONG nBitsPos, ULONG nBitsCount ) +{ + ULONG nRes; + if ( bByteSwap ) + { + pSrc += ( nBitsPos >> 3 ); + nBitsPos &= 7; + BYTE nDat = *pSrc; + nRes = (ULONG)( BYTESWAP( nDat ) & ( 0xff >> nBitsPos ) ); + + if ( nBitsCount <= 8 - nBitsPos ) + { + nRes >>= ( 8 - nBitsPos - nBitsCount ); + } + else + { + pSrc++; + nBitsCount -= 8 - nBitsPos; + while ( nBitsCount >= 8 ) + { + nDat = *(pSrc++); + nRes = ( nRes << 8 ) | ((ULONG)BYTESWAP( nDat ) ); + nBitsCount -= 8; + } + if ( nBitsCount > 0 ) + { + nDat = *pSrc; + nRes = ( nRes << nBitsCount ) | (((ULONG)BYTESWAP(nDat))>>(8-nBitsCount)); + } + } + } + else + { + pSrc += ( nBitsPos >> 3 ); + nBitsPos &= 7; + nRes = (ULONG)((*pSrc)&(0xff>>nBitsPos)); + if ( nBitsCount <= 8 - nBitsPos ) + { + nRes >>= ( 8 - nBitsPos - nBitsCount ); + } + else + { + pSrc++; + nBitsCount -= 8 - nBitsPos; + while ( nBitsCount >= 8 ) + { + nRes = ( nRes << 8 ) | ((ULONG)*(pSrc++)); + nBitsCount -= 8; + } + if ( nBitsCount > 0 ) + nRes = ( nRes << nBitsCount ) | (((ULONG)*pSrc)>>(8-nBitsCount)); + } + } + return nRes; +} + +// --------------------------------------------------------------------------------- + +BOOL TIFFReader::ConvertScanline( ULONG nY ) +{ + UINT32 nRed, nGreen, nBlue, ns, nx, nVal, nByteCount; + BYTE nByteVal; + + if ( nDstBitsPerPixel == 24 ) + { + if ( nBitsPerSample == 8 && nSamplesPerPixel >= 3 && + nPlanes == 1 && nPhotometricInterpretation == 2 ) + { + BYTE* pt = pMap[ 0 ]; + + // sind die Werte als Differenz abgelegt? + if ( 2 == nPredictor ) + { + BYTE nLRed = 0; + BYTE nLGreen = 0; + BYTE nLBlue = 0; + for ( nx = 0; nx < nImageWidth; nx++, pt += nSamplesPerPixel ) + { + nLRed = nLRed + pt[ 0 ]; + nLGreen = nLGreen + pt[ 1 ]; + nLBlue = nLBlue + pt[ 2 ]; + pAcc->SetPixel( nY, nx, Color( nLRed, nLGreen, nLBlue ) ); + } + } + else + { + for ( nx = 0; nx < nImageWidth; nx++, pt += nSamplesPerPixel ) + { + pAcc->SetPixel( nY, nx, Color( pt[0], pt[1], pt[2] ) ); + } + } + } + else if ( nPhotometricInterpretation == 2 && nSamplesPerPixel >= 3 ) + { + ULONG nMinMax = nMinSampleValue * 255 / ( nMaxSampleValue - nMinSampleValue ); + for ( nx = 0; nx < nImageWidth; nx++ ) + { + if ( nPlanes < 3 ) + { + nRed = GetBits( pMap[ 0 ], ( nx * nSamplesPerPixel + 0 ) * nBitsPerSample, nBitsPerSample ); + nGreen = GetBits( pMap[ 1 ], ( nx * nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample ); + nBlue = GetBits( pMap[ 2 ], ( nx * nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample ); + } + else + { + nRed = GetBits( pMap[ 0 ], nx * nBitsPerSample, nBitsPerSample ); + nGreen = GetBits( pMap[ 1 ], nx * nBitsPerSample, nBitsPerSample ); + nBlue = GetBits( pMap[ 2 ], nx * nBitsPerSample, nBitsPerSample ); + } + pAcc->SetPixel( nY, nx, Color( (BYTE)( nRed - nMinMax ), (BYTE)( nGreen - nMinMax ), (BYTE)(nBlue - nMinMax) ) ); + } + } + else if ( nPhotometricInterpretation == 5 && nSamplesPerPixel == 3 ) + { + ULONG nMinMax = nMinSampleValue * 255 / ( nMaxSampleValue - nMinSampleValue ); + for ( nx = 0; nx < nImageWidth; nx++ ) + { + if ( nPlanes < 3 ) + { + nRed = GetBits( pMap[ 0 ],( nx * nSamplesPerPixel + 0 ) * nBitsPerSample, nBitsPerSample ); + nGreen = GetBits( pMap[ 0 ],( nx * nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample ); + nBlue = GetBits( pMap[ 0 ],( nx * nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample ); + } + else + { + nRed = GetBits( pMap[ 0 ], nx * nBitsPerSample, nBitsPerSample ); + nGreen = GetBits( pMap[ 1 ], nx * nBitsPerSample, nBitsPerSample ); + nBlue = GetBits( pMap[ 2 ], nx * nBitsPerSample, nBitsPerSample ); + } + nRed = 255 - (BYTE)( nRed - nMinMax ); + nGreen = 255 - (BYTE)( nGreen - nMinMax ); + nBlue = 255 - (BYTE)( nBlue - nMinMax ); + pAcc->SetPixel( nY, nx, Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ) ); + } + } + else if( nPhotometricInterpretation == 5 && nSamplesPerPixel == 4 ) + { + BYTE nSamp[ 4 ]; + BYTE nSampLast[ 4 ] = { 0, 0, 0, 0 }; + long nBlack; + + for( nx = 0; nx < nImageWidth; nx++ ) + { + // sind die Werte als Differenz abgelegt? + if( 2 == nPredictor ) + { + for( ns = 0; ns < 4; ns++ ) + { + if( nPlanes < 3 ) + nSampLast[ ns ] = nSampLast[ ns ] + (BYTE) GetBits( pMap[ 0 ], ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample ); + else + nSampLast[ ns ] = nSampLast[ ns ] + (BYTE) GetBits( pMap[ ns ], nx * nBitsPerSample, nBitsPerSample ); + nSamp[ ns ] = nSampLast[ ns ]; + } + } + else + { + for( ns = 0; ns < 4; ns++ ) + { + if( nPlanes < 3 ) + nSamp[ ns ] = (BYTE) GetBits( pMap[ 0 ], ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample ); + else + nSamp[ ns ]= (BYTE) GetBits( pMap[ ns ], nx * nBitsPerSample, nBitsPerSample ); + } + } + nBlack = nSamp[ 3 ]; + nRed = (BYTE) Max( 0L, 255L - ( ( (long) nSamp[ 0 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) * + 255L/(long)(nMaxSampleValue-nMinSampleValue) ) ); + nGreen = (BYTE) Max( 0L, 255L - ( ( (long) nSamp[ 1 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) * + 255L/(long)(nMaxSampleValue-nMinSampleValue) ) ); + nBlue = (BYTE) Max( 0L, 255L - ( ( (long) nSamp[ 2 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) * + 255L/(long)(nMaxSampleValue-nMinSampleValue) ) ); + pAcc->SetPixel( nY, nx, Color ( (BYTE)nRed, (BYTE)nGreen, (BYTE)nBlue ) ); + + } + } + } + else if ( nSamplesPerPixel == 1 && ( nPhotometricInterpretation <= 1 || nPhotometricInterpretation == 3 ) ) + { + ULONG nMinMax = ( ( 1 << nDstBitsPerPixel ) - 1 ) / ( nMaxSampleValue - nMinSampleValue ); + BYTE* pt = pMap[ 0 ]; + BYTE nShift; + + switch ( nDstBitsPerPixel ) + { + case 8 : + { + BYTE nLast; + if ( bByteSwap ) + { + if ( nPredictor == 2 ) + { + nLast = BYTESWAP( (BYTE)*pt++ ); + for ( nx = 0; nx < nImageWidth; nx++ ) + { + pAcc->SetPixel( nY, nx, nLast ); + nLast = nLast + *pt++; + } + } + else + { + for ( nx = 0; nx < nImageWidth; nx++ ) + { + nLast = *pt++; + pAcc->SetPixel( nY, nx, (BYTE)( ( (BYTESWAP((ULONG)nLast ) - nMinSampleValue ) * nMinMax ) ) ); + } + } + } + else + { + if ( nPredictor == 2 ) + { + nLast = *pt++; + for ( nx = 0; nx < nImageWidth; nx++ ) + { + pAcc->SetPixel( nY, nx, nLast ); + nLast = nLast + *pt++; + } + } + else + { + for ( nx = 0; nx < nImageWidth; nx++ ) + { + pAcc->SetPixel( nY, nx, (BYTE)( ( (ULONG)*pt++ - nMinSampleValue ) * nMinMax ) ); + + } + } + } + } + break; + + case 7 : + case 6 : + case 5 : + case 4 : + case 3 : + case 2 : + { + for ( nx = 0; nx < nImageWidth; nx++ ) + { + nVal = ( GetBits( pt, nx * nBitsPerSample, nBitsPerSample ) - nMinSampleValue ) * nMinMax; + pAcc->SetPixel( nY, nx, (BYTE)nVal ); + } + } + break; + + case 1 : + { + if ( bByteSwap ) + { + nx = 0; + nByteCount = ( nImageWidth >> 3 ) + 1; + while ( --nByteCount ) + { + nByteVal = *pt++; + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, nx++, nByteVal ); + } + if ( nImageWidth & 7 ) + { + nByteVal = *pt++; + while ( nx < nImageWidth ) + { + pAcc->SetPixel( nY, nx++, nByteVal & 1 ); + nByteVal >>= 1; + } + } + } + else + { + nx = 7; + nByteCount = ( nImageWidth >> 3 ) + 1; + while ( --nByteCount ) + { + nByteVal = *pt++; + pAcc->SetPixel( nY, nx, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, --nx, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, --nx, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, --nx, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, --nx, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, --nx, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, --nx, nByteVal & 1 ); + nByteVal >>= 1; + pAcc->SetPixel( nY, --nx, nByteVal ); + nx += 15; + } + if ( nImageWidth & 7 ) + { + nx -= 7; + nByteVal = *pt++; + nShift = 7; + while ( nx < nImageWidth ) + { + pAcc->SetPixel( nY, nx++, ( nByteVal >> nShift ) & 1); + } + } + } + } + break; + + default : + return FALSE; + } + } + else if ( ( nSamplesPerPixel == 2 ) && ( nBitsPerSample == 8 ) && + ( nPlanarConfiguration == 1 ) && ( pColorMap == 0 ) ) // grayscale + { + ULONG nMinMax = ( ( 1 << 8 /*nDstBitsPerPixel*/ ) - 1 ) / ( nMaxSampleValue - nMinSampleValue ); + BYTE* pt = pMap[ 0 ]; + if ( nByte1 == 'I' ) + pt++; + for ( nx = 0; nx < nImageWidth; nx++, pt += 2 ) + { + pAcc->SetPixel( nY, nx, (BYTE)( ( (ULONG)*pt - nMinSampleValue ) * nMinMax ) ); + } + } + else + return FALSE; + return TRUE; +} + +// --------------------------------------------------------------------------------- + +void TIFFReader::MakePalCol( void ) +{ + if ( nDstBitsPerPixel <= 8 ) + { + ULONG i, nVal, n0RGB; + if ( pColorMap == NULL ) + pColorMap = new ULONG[ 256 ]; + if ( nPhotometricInterpretation <= 1 ) + { + nNumColors = 1 << nBitsPerSample; + if ( nNumColors > 256 ) + nNumColors = 256; + pAcc->SetPaletteEntryCount( (USHORT)nNumColors ); + for ( i = 0; i < nNumColors; i++ ) + { + nVal = ( i * 255 / ( nNumColors - 1 ) ) & 0xff; + n0RGB = nVal | ( nVal << 8 ) | ( nVal << 16 ); + if ( nPhotometricInterpretation == 1 ) + pColorMap[ i ] = n0RGB; + else + pColorMap[ nNumColors - i - 1 ] = n0RGB; + } + } + for ( i = 0; i < nNumColors; i++ ) + { + pAcc->SetPaletteColor( (USHORT)i, BitmapColor( (BYTE)( pColorMap[ i ] >> 16 ), + (BYTE)( pColorMap[ i ] >> 8 ), (BYTE)pColorMap[ i ] ) ); + } + } + + if ( fXResolution > 1.0 && fYResolution > 1.0 && ( nResolutionUnit == 2 || nResolutionUnit == 3 ) ) + { + ULONG nRX,nRY; + if (nResolutionUnit==2) + { + nRX=(ULONG)(fXResolution+0.5); + nRY=(ULONG)(fYResolution+0.5); + } + else + { + nRX=(ULONG)(fXResolution*2.54+0.5); + nRY=(ULONG)(fYResolution*2.54+0.5); + } + MapMode aMapMode(MAP_INCH,Point(0,0),Fraction(1,nRX),Fraction(1,nRY)); + aBitmap.SetPrefMapMode(aMapMode); + aBitmap.SetPrefSize(Size(nImageWidth,nImageLength)); + } +} + +// --------------------------------------------------------------------------------- + +void TIFFReader::ReadHeader() +{ + BYTE nbyte1, nbyte2; + USHORT nushort; + + *pTIFF >> nbyte1; + if ( nbyte1 == 'I' ) + pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); + else + pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); + + *pTIFF >> nbyte2 >> nushort; + if ( nbyte1 != nbyte2 || ( nbyte1 != 'I' && nbyte1 != 'M' ) || nushort != 0x002a ) + bStatus = FALSE; +} + +// --------------------------------------------------------------------------------- + +BOOL TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic ) +{ + USHORT i, nNumTags, nTagType; + ULONG nMaxPos; + ULONG nPos; + sal_uInt32 nFirstIfd, nDataLen; + + bStatus = TRUE; + nLastPercent = 0; + + pTIFF = &rTIFF; + nMaxPos = nOrigPos = pTIFF->Tell(); + nOrigNumberFormat = pTIFF->GetNumberFormatInt(); + + MayCallback( 0 ); + + // Kopf einlesen: + ReadHeader(); + + // Ersten IFD einlesen: + *pTIFF >> nFirstIfd; + + if( !nFirstIfd || pTIFF->GetError() ) + bStatus = FALSE; + + if ( bStatus ) + { + sal_uInt32 nOffset = nFirstIfd; + + // calculate length of TIFF file + do + { + pTIFF->Seek( nOrigPos + nOffset ); + + if( pTIFF->GetError() ) + { + pTIFF->ResetError(); + break; + }; + nMaxPos = Max( pTIFF->Tell(), nMaxPos ); + + *pTIFF >> nNumTags; + + // Schleife ueber Tags: + for( i = 0; i < nNumTags; i++ ) + { + *pTIFF >> nTagType >> nDataType >> nDataLen >> nOffset; + + if( DataTypeSize() * nDataLen > 4 ) + nMaxPos = Max( nOrigPos + nOffset + DataTypeSize() * nDataLen, nMaxPos ); + } + *pTIFF >> nOffset; + if ( pTIFF->IsEof() ) + nOffset = 0; + + nMaxPos = Max( pTIFF->Tell(), nMaxPos ); + if ( !nOffset ) + nMaxPos = Max( pTIFF->Tell(), nMaxPos ); + } + while( nOffset ); + + for ( UINT32 nNextIfd = nFirstIfd; nNextIfd && bStatus; ) + { + pTIFF->Seek( nOrigPos + nNextIfd ); + { + bByteSwap = FALSE; + + nNewSubFile = 0; + nSubFile = 0; + nImageWidth = 0; + nImageLength = 0; + nBitsPerSample = 1; // Defaultwert laut Doku + nCompression = 1; + nPhotometricInterpretation = 0; + nThresholding = 1; // Defaultwert laut Doku + nCellWidth = 1; + nCellLength = 1; + nFillOrder = 1; // Defaultwert laut Doku + nNumStripOffsets = 0; + nOrientation = 1; + nSamplesPerPixel = 1; // Defaultwert laut Doku + nRowsPerStrip = 0xffffffff; // Defaultwert laut Doku + nNumStripByteCounts = 0; + nMinSampleValue = 0; // Defaultwert laut Doku + nMaxSampleValue = 0; + fXResolution = 0.0; + fYResolution = 0.0; + nPlanarConfiguration = 1; + nGroup3Options = 0; // Defaultwert laut Doku + nGroup4Options = 0; // Defaultwert laut Doku + nResolutionUnit = 2; // Defaultwert laut Doku + nPredictor = 1; + nNumColors = 0; + + pAcc = NULL; + pColorMap = NULL; + pStripOffsets = NULL; + pStripByteCounts = NULL; + pMap[ 0 ] = pMap[ 1 ] = pMap[ 2 ] = pMap[ 3 ] = NULL; + + *pTIFF >> nNumTags; + nPos = pTIFF->Tell(); + + // Schleife ueber Tags: + for( i = 0; i < nNumTags; i++ ) + { + *pTIFF >> nTagType >> nDataType >> nDataLen; + + if( DataTypeSize() * nDataLen > 4 ) + { + *pTIFF >> nOffset; + pTIFF->Seek( nOrigPos + nOffset ); + } + ReadTagData( nTagType, nDataLen ); + nPos += 12; pTIFF->Seek( nPos ); + + if ( pTIFF->GetError() ) + bStatus = FALSE; + + if ( bStatus == FALSE ) + break; + } + *pTIFF >> nNextIfd; + if ( pTIFF->IsEof() ) + nNextIfd = 0; + } + if ( bStatus ) + { + if ( nMaxSampleValue == 0 ) + nMaxSampleValue = ( 1 << nBitsPerSample ) - 1; + + if ( nPhotometricInterpretation == 2 || nPhotometricInterpretation == 5 || nPhotometricInterpretation == 6 ) + nDstBitsPerPixel = 24; + else if ( nBitsPerSample*nSamplesPerPixel <= 1 ) + nDstBitsPerPixel = 1; + else if ( nBitsPerSample*nSamplesPerPixel <= 4 ) + nDstBitsPerPixel = 4; + else + nDstBitsPerPixel = 8; + + aBitmap = Bitmap( Size( nImageWidth, nImageLength ), nDstBitsPerPixel ); + pAcc = aBitmap.AcquireWriteAccess(); + if ( pAcc ) + { + if ( nPlanarConfiguration == 1 ) + nPlanes = 1; + else + nPlanes = nSamplesPerPixel; + + if ( ( nFillOrder == 2 ) && ( nCompression != 5 ) ) // im LZW Mode werden die bits schon invertiert + bByteSwap = TRUE; + + nStripsPerPlane = ( nImageLength - 1 ) / nRowsPerStrip + 1; + nBytesPerRow = ( nImageWidth * nSamplesPerPixel / nPlanes * nBitsPerSample + 7 ) >> 3; + + for ( ULONG j = 0; j < 4; j++ ) + { + try + { + pMap[ j ] = new BYTE[ nBytesPerRow ]; + } + catch (std::bad_alloc) + { + pMap[ j ] = NULL; + bStatus = FALSE; + break; + } + } + + if ( bStatus && ReadMap( 10, 60 ) ) + { + nMaxPos = Max( pTIFF->Tell(), nMaxPos ); + MakePalCol(); + nMaxPos = Max( pTIFF->Tell(), nMaxPos ); + } + else + bStatus = FALSE; + + if( pAcc ) + { + aBitmap.ReleaseAccess( pAcc ); + if ( bStatus ) + { + AnimationBitmap aAnimationBitmap( aBitmap, Point( 0, 0 ), aBitmap.GetSizePixel(), + ANIMATION_TIMEOUT_ON_CLICK, DISPOSE_BACK ); + + aAnimation.Insert( aAnimationBitmap ); + } + } + // Aufraeumen: + for ( i = 0; i < 4; i++ ) + delete[] pMap[ i ]; + + delete[] pColorMap; + delete[] pStripOffsets; + delete[] pStripByteCounts; + } + } + } + } + + // seek to end of TIFF if succeeded + pTIFF->SetNumberFormatInt( nOrigNumberFormat ); + pTIFF->Seek( bStatus ? nMaxPos : nOrigPos ); + + if ( aAnimation.Count() ) + { + if ( aAnimation.Count() == 1 ) + rGraphic = aAnimation.GetBitmapEx(); + else + rGraphic = aAnimation; //aBitmap; + + return TRUE; + } + else + return FALSE; +} + + +//================== GraphicImport - die exportierte Funktion ================ + +extern "C" BOOL __LOADONCALLAPI GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, BOOL ) +{ + TIFFReader aTIFFReader; + + if ( aTIFFReader.ReadTIFF( rStream, rGraphic ) == FALSE ) + return FALSE; + + return TRUE; +} + +//============================= fuer Windows ================================== +#ifndef GCC +#endif + +#ifdef WIN + +static HINSTANCE hDLLInst = 0; // HANDLE der DLL + +extern "C" int CALLBACK LibMain( HINSTANCE hDLL, WORD, WORD nHeap, LPSTR ) +{ +#ifndef WNT + if ( nHeap ) + UnlockData( 0 ); +#endif + + hDLLInst = hDLL; + + return TRUE; +} + +extern "C" int CALLBACK WEP( int ) +{ + return 1; +} + +#endif + + diff --git a/filter/source/graphicfilter/itiff/lzwdecom.cxx b/filter/source/graphicfilter/itiff/lzwdecom.cxx new file mode 100644 index 000000000000..9460ed6ecf45 --- /dev/null +++ b/filter/source/graphicfilter/itiff/lzwdecom.cxx @@ -0,0 +1,192 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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. + * + ************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_filter.hxx" + +#include "lzwdecom.hxx" + +LZWDecompressor::LZWDecompressor() +{ + USHORT i; + + pTable=new LZWTableEntry[4096]; + pOutBuf=new BYTE[4096]; + for (i=0; i<4096; i++) + { + pTable[i].nPrevCode=0; + pTable[i].nDataCount=1; + pTable[i].nData=(BYTE)i; + } + pIStream=NULL; + bFirst = TRUE; + nOldCode = 0; +} + + +LZWDecompressor::~LZWDecompressor() +{ + delete[] pOutBuf; + delete[] pTable; +} + + +void LZWDecompressor::StartDecompression(SvStream & rIStream) +{ + pIStream=&rIStream; + + nTableSize=258; + + bEOIFound=FALSE; + + nOutBufDataLen=0; + + *pIStream >> nInputBitsBuf; + + nInputBitsBufSize=8; + + if ( bFirst ) + { + bInvert = nInputBitsBuf == 1; + bFirst = FALSE; + } + + if ( bInvert ) + nInputBitsBuf = ( ( nInputBitsBuf & 1 ) << 7 ) | ( ( nInputBitsBuf & 2 ) << 5 ) | ( ( nInputBitsBuf & 4 ) << 3 ) | ( ( nInputBitsBuf & 8 ) << 1 ) | ( ( nInputBitsBuf & 16 ) >> 1 ) | ( ( nInputBitsBuf & 32 ) >> 3 ) | ( ( nInputBitsBuf & 64 ) >> 5 ) | ( (nInputBitsBuf & 128 ) >> 7 ); +} + + +ULONG LZWDecompressor::Decompress(BYTE * pTarget, ULONG nMaxCount) +{ + ULONG nCount; + + if (pIStream==NULL) return 0; + + nCount=0; + for (;;) { + + if (pIStream->GetError()) break; + + if (((ULONG)nOutBufDataLen)>=nMaxCount) { + nOutBufDataLen = nOutBufDataLen - (USHORT)nMaxCount; + nCount+=nMaxCount; + while (nMaxCount>0) { + *(pTarget++)=*(pOutBufData++); + nMaxCount--; + } + break; + } + + nMaxCount-=(ULONG)nOutBufDataLen; + nCount+=nOutBufDataLen; + while (nOutBufDataLen>0) { + *(pTarget++)=*(pOutBufData++); + nOutBufDataLen--; + } + + if (bEOIFound==TRUE) break; + + DecompressSome(); + + } + + return nCount; +} + + +USHORT LZWDecompressor::GetNextCode() +{ + USHORT nBits,nCode; + + if (nTableSize<511) nBits=9; + else if (nTableSize<1023) nBits=10; + else if (nTableSize<2047) nBits=11; + else nBits=12; + + nCode=0; + do { + if (nInputBitsBufSize<=nBits) + { + nCode=(nCode<> nInputBitsBuf; + if ( bInvert ) + nInputBitsBuf = ( ( nInputBitsBuf & 1 ) << 7 ) | ( ( nInputBitsBuf & 2 ) << 5 ) | ( ( nInputBitsBuf & 4 ) << 3 ) | ( ( nInputBitsBuf & 8 ) << 1 ) | ( ( nInputBitsBuf & 16 ) >> 1 ) | ( ( nInputBitsBuf & 32 ) >> 3 ) | ( ( nInputBitsBuf & 64 ) >> 5 ) | ( (nInputBitsBuf & 128 ) >> 7 ); + nInputBitsBufSize=8; + } + else + { + nCode=(nCode<>(nInputBitsBufSize-nBits)); + nInputBitsBufSize = nInputBitsBufSize - nBits; + nInputBitsBuf&=0x00ff>>(8-nInputBitsBufSize); + nBits=0; + } + } while (nBits>0); + + return nCode; +} + + +void LZWDecompressor::AddToTable(USHORT nPrevCode, USHORT nCodeFirstData) +{ + while (pTable[nCodeFirstData].nDataCount>1) + nCodeFirstData=pTable[nCodeFirstData].nPrevCode; + + pTable[nTableSize].nPrevCode=nPrevCode; + pTable[nTableSize].nDataCount=pTable[nPrevCode].nDataCount+1; + pTable[nTableSize].nData=pTable[nCodeFirstData].nData; + + nTableSize++; +} + + +void LZWDecompressor::DecompressSome() +{ + USHORT i,nCode; + + nCode=GetNextCode(); + if (nCode==256) { + nTableSize=258; + nCode=GetNextCode(); + if (nCode==257) { bEOIFound=TRUE; return; } + } + else if (nCode + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _LZWDECOM_HXX +#define _LZWDECOM_HXX + +#include + +struct LZWTableEntry { + USHORT nPrevCode; + USHORT nDataCount; + BYTE nData; +}; + +class LZWDecompressor { + +public: + + LZWDecompressor(); + ~LZWDecompressor(); + + void StartDecompression(SvStream & rIStream); + + ULONG Decompress(BYTE * pTarget, ULONG nMaxCount); + // Liefert die Anzahl der geschriebenen Bytes, wenn < nMaxCount, + // sind keine weiteren Daten zu entpacken, oder es ist ein + // Fehler aufgetreten. + +private: + + USHORT GetNextCode(); + void AddToTable(USHORT nPrevCode, USHORT nCodeFirstData); + void DecompressSome(); + + SvStream * pIStream; + + LZWTableEntry * pTable; + USHORT nTableSize; + + BOOL bEOIFound, bInvert, bFirst; + + USHORT nOldCode; + + BYTE * pOutBuf; + BYTE * pOutBufData; + USHORT nOutBufDataLen; + + BYTE nInputBitsBuf; + USHORT nInputBitsBufSize; +}; + + +#endif + + diff --git a/filter/source/graphicfilter/itiff/makefile.mk b/filter/source/graphicfilter/itiff/makefile.mk new file mode 100644 index 000000000000..07fcf0ffdff4 --- /dev/null +++ b/filter/source/graphicfilter/itiff/makefile.mk @@ -0,0 +1,71 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# 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. +# +#************************************************************************* + +PRJ=..$/..$/.. + +PRJNAME=filter +TARGET=itiff +DEPTARGET=vitiff + +# --- Settings ----------------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Allgemein ---------------------------------------------------------- + +.IF "$(editdebug)"!="" || "$(EDITDEBUG)"!="" +CDEFS+= -DEDITDEBUG +.ENDIF +.IF "$(L10N_framework)"=="" +SLOFILES = $(SLO)$/itiff.obj \ + $(SLO)$/lzwdecom.obj \ + $(SLO)$/ccidecom.obj + +EXCEPTIONSNOOPTFILES= $(SLO)$/itiff.obj + +# ========================================================================== + +SHL1TARGET= iti$(DLLPOSTFIX) +SHL1IMPLIB= itiff +SHL1STDLIBS= $(VCLLIB) $(TOOLSLIB) $(SALLIB) +SHL1LIBS= $(SLB)$/itiff.lib # $(LB)$/rtftoken.lib + +.IF "$(GUI)" != "UNX" +.IF "$(COM)" != "GCC" +SHL1OBJS= $(SLO)$/itiff.obj +.ENDIF +.ENDIF + +SHL1VERSIONMAP=exports.map +SHL1DEF= $(MISC)$/$(SHL1TARGET).def + +DEF1NAME=$(SHL1TARGET) +.ENDIF + +# ========================================================================== + +.INCLUDE : target.mk diff --git a/filter/source/msfilter/countryid.cxx b/filter/source/msfilter/countryid.cxx index 474fdb5a2823..3239e5020cfb 100644 --- a/filter/source/msfilter/countryid.cxx +++ b/filter/source/msfilter/countryid.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: countryid.cxx,v $ - * $Revision: 1.8.242.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index b312988b5397..ff5be3476da7 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: escherex.cxx,v $ - * $Revision: 1.77.64.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,7 +27,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_filter.hxx" -#include "svx/impgrf.hxx" #include "eschesdo.hxx" #include #include @@ -2141,7 +2137,7 @@ sal_Bool EscherPropertyContainer::GetAdjustmentValue( const com::sun::star::draw sal_Bool bUseFixedFloat = ( nAdjustmentsWhichNeedsToBeConverted & ( 1 << nIndex ) ) != 0; if ( rkProp.Value.getValueTypeClass() == uno::TypeClass_DOUBLE ) { - double fValue; + double fValue(0.0); rkProp.Value >>= fValue; if ( bUseFixedFloat ) fValue *= 65536.0; @@ -3673,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 ) { @@ -3791,7 +3787,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const ByteSt nErrCode = GraphicConverter::Export( aStream, aGraphic, ( eGraphicType == GRAPHIC_BITMAP ) ? CVT_PNG : CVT_EMF ); else { // to store a animation, a gif has to be included into the msOG chunk of a png #I5583# - GraphicFilter* pFilter = GetGrfFilter(); + GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter(); SvMemoryStream aGIFStream; ByteString aVersion( "MSOFFICE9.0" ); aGIFStream.Write( aVersion.GetBuffer(), aVersion.Len() ); @@ -4293,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; @@ -4368,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 @@ -4432,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 ) @@ -4480,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 @@ -4558,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; @@ -4653,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(); } // --------------------------------------------------------------------------------------------- @@ -4695,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 @@ -4786,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 @@ -4794,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; } // --------------------------------------------------------------------------------------------- @@ -4846,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 d5a60fff9aa9..facc6e799d04 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: eschesdo.cxx,v $ - * $Revision: 1.39 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -59,7 +56,6 @@ #include using ::rtl::OUString; -using namespace ::vos; using namespace ::com::sun::star; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; @@ -150,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 ); \ @@ -186,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; @@ -242,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 ) @@ -768,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; @@ -776,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" )) @@ -806,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, @@ -866,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; } @@ -938,7 +934,7 @@ ImplEscherExSdr::~ImplEscherExSdr() // ------------------------------------------------------------------- -SvxDrawPage* ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) +bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage ) { do { @@ -964,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; +} // ------------------------------------------------------------------- @@ -1024,6 +1040,13 @@ void EscherEx::AddSdrPage( const SdrPage& rPage ) mpImplEscherExSdr->ImplWriteCurrentPage(); } +// ------------------------------------------------------------------- + +void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes ) +{ + if ( mpImplEscherExSdr->ImplInitUnoShapes( rxShapes ) ) + mpImplEscherExSdr->ImplWriteCurrentPage(); +} // ------------------------------------------------------------------- @@ -1045,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; } @@ -1058,13 +1081,6 @@ void EscherEx::EndShape( UINT16 /* nShapeType */, UINT32 /* nShapeID */ ) // ------------------------------------------------------------------- -SvStream* EscherEx::QueryPicStream() -{ - return NULL; -} - -// ------------------------------------------------------------------- - UINT32 EscherEx::QueryTextID( const Reference< XShape >&, UINT32 ) { return 0; @@ -1075,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(); @@ -1113,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 b563d0c57ca7..754eb6f3a2c0 100644 --- a/filter/source/msfilter/eschesdo.hxx +++ b/filter/source/msfilter/eschesdo.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: eschesdo.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -194,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/makefile.mk b/filter/source/msfilter/makefile.mk index 92a30e05331e..6056213ddecf 100644 --- a/filter/source/msfilter/makefile.mk +++ b/filter/source/msfilter/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.17 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -55,7 +51,6 @@ SLOFILES= \ $(SLO)$/mscodec.obj \ $(SLO)$/msfiltertracer.obj \ $(SLO)$/svdfppt.obj \ - $(SLO)$/msvbahelper.obj\ $(SLO)$/svxmsbas2.obj SHL1TARGET= msfilter$(DLLPOSTFIX) @@ -63,10 +58,11 @@ SHL1IMPLIB= i$(TARGET) SHL1OBJS= $(SLOFILES) SHL1USE_EXPORTS=name SHL1STDLIBS= \ + $(EDITENGLIB) \ + $(VBAHELPERLIB) \ $(SVXCORELIB) \ $(SFX2LIB) \ $(XMLOFFLIB) \ - $(GOODIESLIB) \ $(BASEGFXLIB) \ $(BASICLIB) \ $(SVTOOLLIB) \ diff --git a/filter/source/msfilter/makefile.pmk b/filter/source/msfilter/makefile.pmk index 48bcd6746271..1b3ae0c70ae0 100644 --- a/filter/source/msfilter/makefile.pmk +++ b/filter/source/msfilter/makefile.pmk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.pmk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/mscodec.cxx b/filter/source/msfilter/mscodec.cxx index 0c7bb9295290..de17da6bde59 100644 --- a/filter/source/msfilter/mscodec.cxx +++ b/filter/source/msfilter/mscodec.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: mscodec.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 861370e55ded..c96dab01c9c1 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msdffimp.cxx,v $ - * $Revision: 1.157 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -50,8 +47,8 @@ #include "viscache.hxx" // SvxItem-Mapping. Wird benoetigt um die SvxItem-Header erfolgreich zu includen -#include -#include +#include +#include #include #include #include @@ -66,8 +63,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -81,7 +78,7 @@ #include #include #include -#include +#include #include #include #include @@ -96,32 +93,31 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include #include "svx/svditer.hxx" #include #include "svx/xattr.hxx" -#include "svx/impgrf.hxx" #include // extern sichtbare Header-Datei -#include -#include -#include -#include +#include +#include +#include +#include #include "svx/gallery.hxx" #include #include @@ -4662,7 +4658,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons if( aURLObj.GetProtocol() != INET_PROT_NOT_VALID ) { - GraphicFilter* pGrfFilter = GetGrfFilter(); + GraphicFilter* pGrfFilter = GraphicFilter::GetGraphicFilter(); aFilterName = pGrfFilter->GetImportFormatName( pGrfFilter->GetImportFormatNumberForShortName( aURLObj.getExtension() ) ); } @@ -5378,6 +5374,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r ((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly ); } + pRet->SetMergedItemSet( aSet ); } } @@ -7120,7 +7117,7 @@ BOOL SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect } else { // und unsere feinen Filter darauf loslassen - GraphicFilter* pGF = GetGrfFilter(); + GraphicFilter* pGF = GraphicFilter::GetGraphicFilter(); String aEmptyStr; nRes = pGF->ImportGraphic( rData, aEmptyStr, *pGrStream, GRFILTER_FORMAT_DONTKNOW ); diff --git a/filter/source/msfilter/msfiltertracer.cxx b/filter/source/msfilter/msfiltertracer.cxx index 417fd906f22f..a961693165ab 100644 --- a/filter/source/msfilter/msfiltertracer.cxx +++ b/filter/source/msfilter/msfiltertracer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msfiltertracer.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/msocximex.cxx b/filter/source/msfilter/msocximex.cxx index f55873c41ebc..82663cdf2523 100644 --- a/filter/source/msfilter/msocximex.cxx +++ b/filter/source/msfilter/msocximex.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msocximex.cxx,v $ - * $Revision: 1.38 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -2326,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) @@ -2447,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; @@ -2462,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/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx index 71b01bafd7dd..ebafd06688b0 100644 --- a/filter/source/msfilter/msoleexp.cxx +++ b/filter/source/msfilter/msoleexp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msoleexp.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx deleted file mode 100644 index 2a2939fe123a..000000000000 --- a/filter/source/msfilter/msvbahelper.cxx +++ /dev/null @@ -1,384 +0,0 @@ -/************************************************************************* - * - * 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. - * - ************************************************************************/ - -#include "precompiled_filter.hxx" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace ::com::sun::star; - -const static rtl::OUString sUrlPart0 = rtl::OUString::createFromAscii( "vnd.sun.star.script:"); -const static rtl::OUString sUrlPart1 = rtl::OUString::createFromAscii( "?language=Basic&location=document"); - -namespace ooo { namespace vba { - -String makeMacroURL( const String& sMacroName ) -{ - return sUrlPart0.concat( sMacroName ).concat( sUrlPart1 ) ; -} - -SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath ) -{ - SfxObjectShell* pFoundShell=NULL; - SfxObjectShell* pShell = SfxObjectShell::GetFirst(); - INetURLObject aObj; - aObj.SetURL( sMacroURLOrPath ); - bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID; - rtl::OUString aURL; - if ( bIsURL ) - aURL = sMacroURLOrPath; - else - { - osl::FileBase::getFileURLFromSystemPath( sMacroURLOrPath, aURL ); - aObj.SetURL( aURL ); - } - OSL_TRACE("Trying to find shell for url %s", rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() ); - while ( pShell ) - { - - uno::Reference< frame::XModel > xModel = pShell->GetModel(); - // are we searching for a template? if so we have to cater for the - // fact that in openoffice a document opened from a template is always - // a new document :/ - if ( xModel.is() ) - { - OSL_TRACE("shell 0x%x has model with url %s and we look for %s", pShell - , rtl::OUStringToOString( xModel->getURL(), RTL_TEXTENCODING_UTF8 ).getStr() - , rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() - ); - if ( sMacroURLOrPath.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) ) - { - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( xModel, uno::UNO_QUERY ); - if( xDocInfoSupp.is() ) - { - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); - rtl::OUString sCurrName = xDocProps->getTemplateName(); - if( sMacroURLOrPath.lastIndexOf( sCurrName ) >= 0 ) - { - pFoundShell = pShell; - break; - } - } - } - else - { - if ( aURL.equals( xModel->getURL() ) ) - { - pFoundShell = pShell; - break; - } - } - } - pShell = SfxObjectShell::GetNext( *pShell ); - } - return pFoundShell; -} - -// sMod can be empty ( but we really need the library to search in ) -// if sMod is empty and a macro is found then sMod is updated -bool hasMacro( SfxObjectShell* pShell, const String& sLibrary, String& sMod, const String& sMacro ) -{ - bool bFound = false; - if ( sLibrary.Len() && sMacro.Len() ) - { - OSL_TRACE("** Searching for %s.%s in library %s" - ,rtl::OUStringToOString( sMod, RTL_TEXTENCODING_UTF8 ).getStr() - ,rtl::OUStringToOString( sMacro, RTL_TEXTENCODING_UTF8 ).getStr() - ,rtl::OUStringToOString( sLibrary, RTL_TEXTENCODING_UTF8 ).getStr() ); - BasicManager* pBasicMgr = pShell-> GetBasicManager(); - if ( pBasicMgr ) - { - StarBASIC* pBasic = pBasicMgr->GetLib( sLibrary ); - if ( !pBasic ) - { - USHORT nId = pBasicMgr->GetLibId( sLibrary ); - pBasicMgr->LoadLib( nId ); - pBasic = pBasicMgr->GetLib( sLibrary ); - } - if ( pBasic ) - { - if ( sMod.Len() ) // we wish to find the macro is a specific module - { - SbModule* pModule = pBasic->FindModule( sMod ); - if ( pModule ) - { - SbxArray* pMethods = pModule->GetMethods(); - if ( pMethods ) - { - SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( sMacro, SbxCLASS_METHOD ) ); - if ( pMethod ) - bFound = true; - } - } - } - else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_METHOD ) ) ) - { - if( SbModule* pModule = pMethod->GetModule() ) - { - sMod = pModule->GetName(); - bFound = true; - } - } - } - } - } - return bFound; -} -void parseMacro( const rtl::OUString& sMacro, String& sContainer, String& sModule, String& sProcedure ) -{ - sal_Int32 nMacroDot = sMacro.lastIndexOf( '.' ); - - if ( nMacroDot != -1 ) - { - sProcedure = sMacro.copy( nMacroDot + 1 ); - - sal_Int32 nContainerDot = sMacro.lastIndexOf( '.', nMacroDot - 1 ); - if ( nContainerDot != -1 ) - { - sModule = sMacro.copy( nContainerDot + 1, nMacroDot - nContainerDot - 1 ); - sContainer = sMacro.copy( 0, nContainerDot ); - } - else - sModule = sMacro.copy( 0, nMacroDot ); - } - else - sProcedure = sMacro; -} - -VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& MacroName, bool bSearchGlobalTemplates ) -{ - VBAMacroResolvedInfo aRes; - if ( !pShell ) - return aRes; - aRes.SetMacroDocContext( pShell ); - // parse the macro name - sal_Int32 nDocSepIndex = MacroName.indexOfAsciiL( "!", 1 ); - String sMacroUrl = MacroName; - - String sContainer; - String sModule; - String sProcedure; - - if( nDocSepIndex > 0 ) - { - // macro specified by document name - // find document shell for document name and call ourselves - // recursively - - // assume for now that the document name is *this* document - String sDocUrlOrPath = MacroName.copy( 0, nDocSepIndex ); - sMacroUrl = MacroName.copy( nDocSepIndex + 1 ); - OSL_TRACE("doc search, current shell is 0x%x", pShell ); - SfxObjectShell* pFoundShell = findShellForUrl( sDocUrlOrPath ); - OSL_TRACE("doc search, after find, found shell is 0x%x", pFoundShell ); - aRes = resolveVBAMacro( pFoundShell, sMacroUrl ); - } - else - { - // macro is contained in 'this' document ( or code imported from a template - // where that template is a global template or perhaps the template this - // document is created from ) - - // macro format = Container.Module.Procedure - parseMacro( MacroName, sContainer, sModule, sProcedure ); - uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY); - uno::Reference< container::XNameContainer > xPrjNameCache; - if ( xSF.is() ) - xPrjNameCache.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAProjectNameProvider" ) ) ), uno::UNO_QUERY ); - - std::vector< rtl::OUString > sSearchList; - - if ( sContainer.Len() > 0 ) - { - // get the Project associated with the Container - if ( xPrjNameCache.is() ) - { - if ( xPrjNameCache->hasByName( sContainer ) ) - { - rtl::OUString sProject; - xPrjNameCache->getByName( sContainer ) >>= sProject; - sContainer = sProject; - } - } - sSearchList.push_back( sContainer ); // First Lib to search - } - else - { - // Ok, if we have no Container specified then we need to search them in order, this document, template this document created from, global templates, - // get the name of Project/Library for 'this' document - rtl::OUString sThisProject; - BasicManager* pBasicMgr = pShell-> GetBasicManager(); - if ( pBasicMgr ) - { - if ( pBasicMgr->GetName().Len() ) - sThisProject = pBasicMgr->GetName(); - else // cater for the case where VBA is not enabled - sThisProject = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ); - } - sSearchList.push_back( sThisProject ); // First Lib to search - if ( xPrjNameCache.is() ) - { - // is this document created from a template? - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( pShell->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); - - rtl::OUString sCreatedFrom = xDocProps->getTemplateURL(); - if ( sCreatedFrom.getLength() ) - { - INetURLObject aObj; - aObj.SetURL( sCreatedFrom ); - bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID; - rtl::OUString aURL; - if ( bIsURL ) - aURL = sCreatedFrom; - else - { - osl::FileBase::getFileURLFromSystemPath( sCreatedFrom, aURL ); - aObj.SetURL( aURL ); - } - sCreatedFrom = aObj.GetLastName(); - } - - sal_Int32 nIndex = sCreatedFrom.lastIndexOf( '.' ); - if ( nIndex != -1 ) - sCreatedFrom = sCreatedFrom.copy( 0, nIndex ); - - rtl::OUString sPrj; - if ( sCreatedFrom.getLength() && xPrjNameCache->hasByName( sCreatedFrom ) ) - { - xPrjNameCache->getByName( sCreatedFrom ) >>= sPrj; - // Make sure we don't double up with this project - if ( !sPrj.equals( sThisProject ) ) - sSearchList.push_back( sPrj ); - } - - // get list of global template Names - uno::Sequence< rtl::OUString > sTemplateNames = xPrjNameCache->getElementNames(); - sal_Int32 nLen = sTemplateNames.getLength(); - for ( sal_Int32 index = 0; ( bSearchGlobalTemplates && index < nLen ); ++index ) - { - - if ( !sCreatedFrom.equals( sTemplateNames[ index ] ) ) - { - if ( xPrjNameCache->hasByName( sTemplateNames[ index ] ) ) - { - xPrjNameCache->getByName( sTemplateNames[ index ] ) >>= sPrj; - // Make sure we don't double up with this project - if ( !sPrj.equals( sThisProject ) ) - sSearchList.push_back( sPrj ); - } - } - - } - } - } - std::vector< rtl::OUString >::iterator it_end = sSearchList.end(); - for ( std::vector< rtl::OUString >::iterator it = sSearchList.begin(); it != it_end; ++it ) - { - bool bRes = hasMacro( pShell, *it, sModule, sProcedure ); - if ( bRes ) - { - aRes.SetResolved( true ); - aRes.SetMacroDocContext( pShell ); - sContainer = *it; - break; - } - } - } - aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) ); - - return aRes; -} - -// Treat the args as possible inouts ( convertion at bottom of method ) -sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& /*aRet*/, const uno::Any& aCaller ) -{ - sal_Bool bRes = sal_False; - if ( !pShell ) - return bRes; - rtl::OUString sUrl = makeMacroURL( sMacroName ); - - uno::Sequence< sal_Int16 > aOutArgsIndex; - uno::Sequence< uno::Any > aOutArgs; - - try - { - uno::Reference< script::provider::XScriptProvider > xScriptProvider; - uno::Reference< script::provider::XScriptProviderSupplier > xSPS( pShell->GetModel(), uno::UNO_QUERY_THROW ); - - xScriptProvider.set( xSPS->getScriptProvider(), uno::UNO_QUERY_THROW ); - - uno::Reference< script::provider::XScript > xScript( xScriptProvider->getScript( sUrl ), uno::UNO_QUERY_THROW ); - - if ( aCaller.hasValue() ) - { - uno::Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY ); - if ( xProps.is() ) - { - uno::Sequence< uno::Any > aCallerHack(1); - aCallerHack[ 0 ] = aCaller; - xProps->setPropertyValue( rtl::OUString::createFromAscii( "Caller" ), uno::makeAny( aCallerHack ) ); - } - } - - - xScript->invoke( aArgs, aOutArgsIndex, aOutArgs ); - - sal_Int32 nLen = aOutArgs.getLength(); - // convert any out params to seem like they were inouts - if ( nLen ) - { - for ( sal_Int32 index=0; index < nLen; ++index ) - { - sal_Int32 nOutIndex = aOutArgsIndex[ index ]; - aArgs[ nOutIndex ] = aOutArgs[ index ]; - } - } - - bRes = sal_True; - } - catch ( uno::Exception& e ) - { - bRes = sal_False; - } - return bRes; -} -} } // vba // ooo diff --git a/filter/source/msfilter/msvbasic.cxx b/filter/source/msfilter/msvbasic.cxx index b7d5b7da1d1b..91348043b75f 100644 --- a/filter/source/msfilter/msvbasic.cxx +++ b/filter/source/msfilter/msvbasic.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msvbasic.cxx,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/msvbasic.hxx b/filter/source/msfilter/msvbasic.hxx index b4ffd8514d4a..5b361518c0f5 100644 --- a/filter/source/msfilter/msvbasic.hxx +++ b/filter/source/msfilter/msvbasic.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: msvbasic.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 2326f6bcfea7..0ad3d4202f1f 100644 --- a/filter/source/msfilter/powerpoint/makefile.mk +++ b/filter/source/msfilter/powerpoint/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -58,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/powerpoint/pptcom.hxx b/filter/source/msfilter/powerpoint/pptcom.hxx index b0a31bb06fef..64dff7e54b30 100644 --- a/filter/source/msfilter/powerpoint/pptcom.hxx +++ b/filter/source/msfilter/powerpoint/pptcom.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pptcom.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/powerpoint/pptimporter.cxx b/filter/source/msfilter/powerpoint/pptimporter.cxx index b019644f86f0..960987700980 100644 --- a/filter/source/msfilter/powerpoint/pptimporter.cxx +++ b/filter/source/msfilter/powerpoint/pptimporter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pptimporter.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/powerpoint/pptimporter.hxx b/filter/source/msfilter/powerpoint/pptimporter.hxx index 9455b0774f5c..6366d0fda054 100644 --- a/filter/source/msfilter/powerpoint/pptimporter.hxx +++ b/filter/source/msfilter/powerpoint/pptimporter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pptimporter.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/powerpoint/pptimporteruno.cxx b/filter/source/msfilter/powerpoint/pptimporteruno.cxx index f8cd20c355b1..c1089f66a5c3 100644 --- a/filter/source/msfilter/powerpoint/pptimporteruno.cxx +++ b/filter/source/msfilter/powerpoint/pptimporteruno.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pptimporteruno.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/powerpoint/ppttoxml.cxx b/filter/source/msfilter/powerpoint/ppttoxml.cxx index cb3c70cdd18c..d4ec2af93e7b 100644 --- a/filter/source/msfilter/powerpoint/ppttoxml.cxx +++ b/filter/source/msfilter/powerpoint/ppttoxml.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ppttoxml.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/powerpoint/ppttoxml.hxx b/filter/source/msfilter/powerpoint/ppttoxml.hxx index f44bcb1a62c9..b77f85b0109b 100644 --- a/filter/source/msfilter/powerpoint/ppttoxml.hxx +++ b/filter/source/msfilter/powerpoint/ppttoxml.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ppttoxml.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 2d16541aa59a..8d8e48832dc9 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svdfppt.cxx,v $ - * $Revision: 1.163.6.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -34,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -59,17 +56,18 @@ #include #include #include -#include +#include #include #include "svx/xattr.hxx" #include "svx/svditext.hxx" #include -#include +#include #include #include #include -#include -#include +#include +#include +#include #if defined(JOEENV) && defined(JOEDEBUG) #include "impinccv.h" // etwas Testkram @@ -81,34 +79,34 @@ #endif #define ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue() -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include -#include +#include #include #include #include #include -#include -#include +#include +#include #include #include #include @@ -124,13 +122,13 @@ #include #include #include -#include +#include #include -#include -#include +#include +#include #include #include -#include +#include #include "com/sun/star/awt/Gradient.hpp" #include #include @@ -3129,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/msfilter/svxmsbas.cxx b/filter/source/msfilter/svxmsbas.cxx index 02370dd75c92..e4305c2e4e65 100644 --- a/filter/source/msfilter/svxmsbas.cxx +++ b/filter/source/msfilter/svxmsbas.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxmsbas.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/svxmsbas2.cxx b/filter/source/msfilter/svxmsbas2.cxx index 6e784811dd56..8da475ed78c8 100644 --- a/filter/source/msfilter/svxmsbas2.cxx +++ b/filter/source/msfilter/svxmsbas2.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svxmsbas.cxx,v $ - * $Revision: 1.24 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx index ceea10e28f27..075c4c39cc38 100644 --- a/filter/source/msfilter/viscache.hxx +++ b/filter/source/msfilter/viscache.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: viscache.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/impdialog.cxx b/filter/source/pdf/impdialog.cxx index a87b71c4c3c2..68c449dd7353 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impdialog.cxx,v $ - * $Revision: 1.35.28.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/impdialog.hrc b/filter/source/pdf/impdialog.hrc index ad214a752f77..6a010120e3bd 100644 --- a/filter/source/pdf/impdialog.hrc +++ b/filter/source/pdf/impdialog.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impdialog.hrc,v $ - * $Revision: 1.15.80.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index 7dacf4e34c76..050aeee4caf5 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impdialog.hxx,v $ - * $Revision: 1.23.80.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/impdialog.src b/filter/source/pdf/impdialog.src index b20c5afb0237..34f788495674 100644 --- a/filter/source/pdf/impdialog.src +++ b/filter/source/pdf/impdialog.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: impdialog.src,v $ - * $Revision: 1.41.4.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/makefile.mk b/filter/source/pdf/makefile.mk index 5c4064d02cbd..edf3147a822c 100644 --- a/filter/source/pdf/makefile.mk +++ b/filter/source/pdf/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -65,6 +61,7 @@ SHL1STDLIBS=\ $(TKLIB) \ $(VCLLIB) \ $(SVLLIB) \ + $(BASEGFXLIB) \ $(SFX2LIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ @@ -77,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/pdf.hrc b/filter/source/pdf/pdf.hrc index 7667f2e95da2..0d4f74cbfcba 100644 --- a/filter/source/pdf/pdf.hrc +++ b/filter/source/pdf/pdf.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdf.hrc,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/pdf.src b/filter/source/pdf/pdf.src index 97e8a5145d1b..0c7655c1c30c 100644 --- a/filter/source/pdf/pdf.src +++ b/filter/source/pdf/pdf.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdf.src,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx index a1c829de745a..6703511ec914 100644 --- a/filter/source/pdf/pdfdialog.cxx +++ b/filter/source/pdf/pdfdialog.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdfdialog.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/pdfdialog.hxx b/filter/source/pdf/pdfdialog.hxx index 69bec8f7d7a2..29da770e65ff 100644 --- a/filter/source/pdf/pdfdialog.hxx +++ b/filter/source/pdf/pdfdialog.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdfdialog.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 8ad3f7caad4f..793503abf9ba 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdfexport.cxx,v $ - * $Revision: 1.69.36.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -53,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 @@ -81,31 +81,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::view; -sal_Bool GetPropertyValue( Any& rAny, const Reference< XPropertySet > & rXPropSet, const sal_Char* pName ) -{ - sal_Bool bRetValue = sal_True; - try - { - rAny = rXPropSet->getPropertyValue( String::CreateFromAscii( pName ) ); - if ( !rAny.hasValue() ) - bRetValue = sal_False; - } - catch( ::com::sun::star::uno::Exception& ) - { - bRetValue = sal_False; - } - return bRetValue; -} - -OUString GetProperty( const Reference< XPropertySet > & rXPropSet, const sal_Char* pName ) -{ - OUString aRetValue; - Any aAny; - if ( GetPropertyValue( aAny, rXPropSet, pName ) ) - aAny >>= aRetValue; - return aRetValue; -} - // ------------- // - PDFExport - // ------------- @@ -968,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(); @@ -1671,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(); } @@ -1686,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; @@ -1857,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/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx index cfe70a4ff0af..18c760b85675 100644 --- a/filter/source/pdf/pdfexport.hxx +++ b/filter/source/pdf/pdfexport.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdfexport.hxx,v $ - * $Revision: 1.14.80.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx index 021123ed7eff..0c08be6d8a66 100644 --- a/filter/source/pdf/pdffilter.cxx +++ b/filter/source/pdf/pdffilter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdffilter.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/pdffilter.hxx b/filter/source/pdf/pdffilter.hxx index b1afcc27ba64..b4720c1627c7 100644 --- a/filter/source/pdf/pdffilter.hxx +++ b/filter/source/pdf/pdffilter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdffilter.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/pdf/pdfuno.cxx b/filter/source/pdf/pdfuno.cxx index a08689371a84..10c0f7df293d 100644 --- a/filter/source/pdf/pdfuno.cxx +++ b/filter/source/pdf/pdfuno.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: pdfuno.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/Base64Codec.cxx b/filter/source/placeware/Base64Codec.cxx index cc25fb146204..624be24dc256 100644 --- a/filter/source/placeware/Base64Codec.cxx +++ b/filter/source/placeware/Base64Codec.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Base64Codec.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/Base64Codec.hxx b/filter/source/placeware/Base64Codec.hxx index b684a5e0c739..125b944876a9 100644 --- a/filter/source/placeware/Base64Codec.hxx +++ b/filter/source/placeware/Base64Codec.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Base64Codec.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/exporter.cxx b/filter/source/placeware/exporter.cxx index acb705a00329..964bc618af5d 100644 --- a/filter/source/placeware/exporter.cxx +++ b/filter/source/placeware/exporter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: exporter.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/exporter.hxx b/filter/source/placeware/exporter.hxx index 10236c127e11..d52519cfcb4e 100644 --- a/filter/source/placeware/exporter.hxx +++ b/filter/source/placeware/exporter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: exporter.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/filter.cxx b/filter/source/placeware/filter.cxx index 4c44acecbe86..b38927d793d6 100644 --- a/filter/source/placeware/filter.cxx +++ b/filter/source/placeware/filter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filter.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/makefile.mk b/filter/source/placeware/makefile.mk index 6fdfe7ecb0fd..3238193c52ae 100644 --- a/filter/source/placeware/makefile.mk +++ b/filter/source/placeware/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -57,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/placeware/tempfile.cxx b/filter/source/placeware/tempfile.cxx index 51e58d599211..46c01e80d4a4 100644 --- a/filter/source/placeware/tempfile.cxx +++ b/filter/source/placeware/tempfile.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tempfile.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/tempfile.hxx b/filter/source/placeware/tempfile.hxx index a195bd1a24aa..d1f8335b38d5 100644 --- a/filter/source/placeware/tempfile.hxx +++ b/filter/source/placeware/tempfile.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: tempfile.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/uno.cxx b/filter/source/placeware/uno.cxx index d42320c7c15d..c11b4392a1b4 100644 --- a/filter/source/placeware/uno.cxx +++ b/filter/source/placeware/uno.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: uno.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/zip.cxx b/filter/source/placeware/zip.cxx index b99b0532138b..494ce2e576c4 100644 --- a/filter/source/placeware/zip.cxx +++ b/filter/source/placeware/zip.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: zip.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/zip.hxx b/filter/source/placeware/zip.hxx index 4977c048af75..b43ed32b8e7d 100644 --- a/filter/source/placeware/zip.hxx +++ b/filter/source/placeware/zip.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: zip.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/placeware/zipfile.hxx b/filter/source/placeware/zipfile.hxx index 3cec2eb5c494..33d9c1d1d587 100644 --- a/filter/source/placeware/zipfile.hxx +++ b/filter/source/placeware/zipfile.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: zipfile.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/SOTranscoder.java b/filter/source/svg/SOTranscoder.java index 02aa67c892b1..d0b3728e5978 100644 --- a/filter/source/svg/SOTranscoder.java +++ b/filter/source/svg/SOTranscoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SOTranscoder.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 17b999ce29bb..12c1210c18c4 100644 --- a/filter/source/svg/makefile.mk +++ b/filter/source/svg/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.14 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -56,9 +52,10 @@ SLOFILES+= $(SLO)$/svgimport.obj SHL1TARGET=$(TARGET)$(DLLPOSTFIX) SHL1STDLIBS=\ + $(EDITENGLIB) \ $(SVXCORELIB) \ $(XMLOFFLIB) \ - $(GOODIESLIB) \ + $(SVTOOLLIB) \ $(VCLLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ @@ -76,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/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index b55a0224daaa..081a914934c7 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgexport.cxx,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -40,9 +37,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include using ::rtl::OUString; diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx index 7e594b4377c2..118474bbe2b0 100644 --- a/filter/source/svg/svgfilter.cxx +++ b/filter/source/svg/svgfilter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgfilter.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx index caf6b005cd06..0bbc64e2c244 100644 --- a/filter/source/svg/svgfilter.hxx +++ b/filter/source/svg/svgfilter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgfilter.hxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -77,7 +74,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 789c6e270927..8fa9db03eacf 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgfontexport.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/svgfontexport.hxx b/filter/source/svg/svgfontexport.hxx index 4dfd392ca374..9147efb27a55 100644 --- a/filter/source/svg/svgfontexport.hxx +++ b/filter/source/svg/svgfontexport.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgfontexport.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/svgimport.cxx b/filter/source/svg/svgimport.cxx index 7139f559fa29..fd4f711cb085 100644 --- a/filter/source/svg/svgimport.cxx +++ b/filter/source/svg/svgimport.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgimport.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/svgscript.hxx b/filter/source/svg/svgscript.hxx index c511a2872141..9be9f268dd91 100644 --- a/filter/source/svg/svgscript.hxx +++ b/filter/source/svg/svgscript.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgscript.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/svguno.cxx b/filter/source/svg/svguno.cxx index a927fa9d858a..aa91889fc93f 100644 --- a/filter/source/svg/svguno.cxx +++ b/filter/source/svg/svguno.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svguno.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index fca8f8d48a3d..15f83c3be407 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgwriter.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 658fc19b0322..113448a551d5 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: svgwriter.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/t602/filterenv.cxx b/filter/source/t602/filterenv.cxx index b9941d8ce15b..f7fc319c27e3 100644 --- a/filter/source/t602/filterenv.cxx +++ b/filter/source/t602/filterenv.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filterenv.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/t602/makefile.mk b/filter/source/t602/makefile.mk index eb183798f4a2..c65de1bc9b7c 100644 --- a/filter/source/t602/makefile.mk +++ b/filter/source/t602/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -51,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.cxx b/filter/source/t602/t602filter.cxx index 8043f02af1ee..6ee62e306208 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: t602filter.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/t602/t602filter.hrc b/filter/source/t602/t602filter.hrc index 798e9700a6eb..5ddb1e158521 100644 --- a/filter/source/t602/t602filter.hrc +++ b/filter/source/t602/t602filter.hrc @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: t602filter.hrc,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/t602/t602filter.hxx b/filter/source/t602/t602filter.hxx index dc4a2919ad2e..077787689bb2 100644 --- a/filter/source/t602/t602filter.hxx +++ b/filter/source/t602/t602filter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: t602filter.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/t602/t602filter.src b/filter/source/t602/t602filter.src index ca9a36944003..1862bb2586c6 100644 --- a/filter/source/t602/t602filter.src +++ b/filter/source/t602/t602filter.src @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: t602filter.src,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index 8a1a21d1cc73..313c1e72dff5 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XmlFilterAdaptor.cxx,v $ - * - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx index 2628e08def17..e949f7aa8982 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XmlFilterAdaptor.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilteradaptor/genericfilter.cxx b/filter/source/xmlfilteradaptor/genericfilter.cxx index 59ab4a3547d2..f91c7e4f296c 100644 --- a/filter/source/xmlfilteradaptor/genericfilter.cxx +++ b/filter/source/xmlfilteradaptor/genericfilter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: genericfilter.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilteradaptor/makefile.mk b/filter/source/xmlfilteradaptor/makefile.mk index da4319036874..b3d39f860388 100644 --- a/filter/source/xmlfilteradaptor/makefile.mk +++ b/filter/source/xmlfilteradaptor/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.11 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -48,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/streamwrap.cxx b/filter/source/xmlfilteradaptor/streamwrap.cxx index b5e61f210035..42d2a6774057 100755 --- a/filter/source/xmlfilteradaptor/streamwrap.cxx +++ b/filter/source/xmlfilteradaptor/streamwrap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: streamwrap.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilteradaptor/streamwrap.hxx b/filter/source/xmlfilteradaptor/streamwrap.hxx index af552e28af1e..dd87dbd13492 100755 --- a/filter/source/xmlfilteradaptor/streamwrap.hxx +++ b/filter/source/xmlfilteradaptor/streamwrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: streamwrap.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/fdcomp.cxx b/filter/source/xmlfilterdetect/fdcomp.cxx index 5697ccd9077e..10820fc8f280 100644 --- a/filter/source/xmlfilterdetect/fdcomp.cxx +++ b/filter/source/xmlfilterdetect/fdcomp.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: fdcomp.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx index b883814efde0..2509bc88f9af 100644 --- a/filter/source/xmlfilterdetect/filterdetect.cxx +++ b/filter/source/xmlfilterdetect/filterdetect.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filterdetect.cxx,v $ - * - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilterdetect/filterdetect.hxx b/filter/source/xmlfilterdetect/filterdetect.hxx index 97df5f7e64a7..965e2ceaa1d7 100644 --- a/filter/source/xmlfilterdetect/filterdetect.hxx +++ b/filter/source/xmlfilterdetect/filterdetect.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: filterdetect.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/filter/source/xmlfilterdetect/makefile.mk b/filter/source/xmlfilterdetect/makefile.mk index 05195af889b1..d13c4af5f576 100644 --- a/filter/source/xmlfilterdetect/makefile.mk +++ b/filter/source/xmlfilterdetect/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.7 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -49,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/xslt/common/math.xsl b/filter/source/xslt/common/math.xsl index 166e715d5d96..2b6ce0c89ccf 100644 --- a/filter/source/xslt/common/math.xsl +++ b/filter/source/xslt/common/math.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: math.xsl,v $ - - $Revision: 1.8 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/spreadsheetml/formular.xsl b/filter/source/xslt/export/spreadsheetml/formular.xsl index 859ef29c2e99..3acb4f393c42 100644 --- a/filter/source/xslt/export/spreadsheetml/formular.xsl +++ b/filter/source/xslt/export/spreadsheetml/formular.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: formular.xsl,v $ - - $Revision: 1.5 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_border.xsl b/filter/source/xslt/export/wordml/ooo2wordml_border.xsl index 2e628d921b7e..9eb2fd4dcbd1 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_border.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_border.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_border.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_custom_draw.xsl b/filter/source/xslt/export/wordml/ooo2wordml_custom_draw.xsl index 9f2015f30337..0548e2525d46 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_custom_draw.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_custom_draw.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_custom_draw.xsl,v $ - - $Revision: 1.7 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl b/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl index 9143ef6f1ff2..40b146f1481e 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_draw.xsl @@ -2,27 +2,23 @@ diff --git a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl index 990d2e0a09a8..2762e1cd159f 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_list.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_list.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_list.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_page.xsl b/filter/source/xslt/export/wordml/ooo2wordml_page.xsl index 1dc0bba2aeb9..477ee0b109f0 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_page.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_page.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_page.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_path.xsl b/filter/source/xslt/export/wordml/ooo2wordml_path.xsl index 9ce6ed265bc9..695bbb0c3ef8 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_path.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_path.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_path.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl b/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl index 2f0d721eac02..71312d57ed5e 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_settings.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_settings.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_table.xsl b/filter/source/xslt/export/wordml/ooo2wordml_table.xsl index 83bf00ed288f..67e4eafe01d7 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_table.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_table.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_table.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/export/wordml/ooo2wordml_text.xsl b/filter/source/xslt/export/wordml/ooo2wordml_text.xsl index 08f5486840c8..5ba97699d4fa 100644 --- a/filter/source/xslt/export/wordml/ooo2wordml_text.xsl +++ b/filter/source/xslt/export/wordml/ooo2wordml_text.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ooo2wordml_text.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/common/ms2ooo_docpr.xsl b/filter/source/xslt/import/common/ms2ooo_docpr.xsl index 169573a3a18b..77d21306b7b7 100644 --- a/filter/source/xslt/import/common/ms2ooo_docpr.xsl +++ b/filter/source/xslt/import/common/ms2ooo_docpr.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: ms2ooo_docpr.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl index a1576db37f10..64ac1302b744 100644 --- a/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl +++ b/filter/source/xslt/import/spreadsheetml/spreadsheetml2ooo.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: spreadsheetml2ooo.xsl,v $ - - $Revision: 1.7 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo.xsl b/filter/source/xslt/import/wordml/wordml2ooo.xsl index e594e37012f9..1f36f195f3cd 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo.xsl,v $ - - $Revision: 1.13 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_custom_draw.xsl b/filter/source/xslt/import/wordml/wordml2ooo_custom_draw.xsl index fedfd69ce458..118c63301774 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_custom_draw.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_custom_draw.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_custom_draw.xsl,v $ - - $Revision: 1.7 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl index 2cd287e59e75..e0737d1374fa 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_draw.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_draw.xsl,v $ - - $Revision: 1.10 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_field.xsl b/filter/source/xslt/import/wordml/wordml2ooo_field.xsl index ca26a0cb54bc..6c77f63e66a6 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_field.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_field.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_field.xsl,v $ - - $Revision: 1.7 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_page.xsl b/filter/source/xslt/import/wordml/wordml2ooo_page.xsl index 8e90a39f42a4..8514594bf19a 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_page.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_page.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_page.xsl,v $ - - $Revision: 1.11 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_path.xsl b/filter/source/xslt/import/wordml/wordml2ooo_path.xsl index 0befedba710e..2ad46a1a96a0 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_path.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_path.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_path.xsl,v $ - - $Revision: 1.6 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_settings.xsl b/filter/source/xslt/import/wordml/wordml2ooo_settings.xsl index 2f519b1dc516..84696dcf5773 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_settings.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_settings.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_settings.xsl,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_table.xsl b/filter/source/xslt/import/wordml/wordml2ooo_table.xsl index f72d758f6ab1..113dd391b433 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_table.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_table.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_table.xsl,v $ - - $Revision: 1.10 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/import/wordml/wordml2ooo_text.xsl b/filter/source/xslt/import/wordml/wordml2ooo_text.xsl index 0cd5e0dbe59f..a00656a9ed32 100644 --- a/filter/source/xslt/import/wordml/wordml2ooo_text.xsl +++ b/filter/source/xslt/import/wordml/wordml2ooo_text.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: wordml2ooo_text.xsl,v $ - - $Revision: 1.11 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/filter/source/xslt/odf2xhtml/export/common/body.xsl b/filter/source/xslt/odf2xhtml/export/common/body.xsl index 1efa48718c2d..96f7d3ce691c 100644 --- a/filter/source/xslt/odf2xhtml/export/common/body.xsl +++ b/filter/source/xslt/odf2xhtml/export/common/body.xsl @@ -1,33 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; - - - - - - - - - - - - - - - - - - - - - - - - - ltr - - - rtl - - - - - - - - rtl - - - - - - - - - - - - - max-width: - - ; - - - - - background-image:url( - - - - ); - - - - - background-repeat:no-repeat; - - - background-repeat:repeat; - - - - - background-position: - - ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Next 'div' was a 'draw:text-box'. - - - - - - - - - - - - - - - - - - - - - - - - min-width: - - ; - - - max-width: - - ; - - - min-height: - - ; - - - max-height: - - ; - - - - - - height: - - - - - - - - - - ; - - - - - width: - - - - - - - - - - ; - - - - - - - - - - - - - - - - - - - - - - - - Next 'div' was a 'text:p'. - - - Next 'div' was a 'draw:page'. - - - - - - - - - - - - - - - - - - -
 
-
- - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - - - - - - - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - position:absolute;left: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - cm; - - - - - - - - - - - - - - - - - no - yes - - - - - - - - - - - - div - p - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - text-align: - - left - right - center - justify - - ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Next 'div' added for floating. - - - position:relative; left: - - cm; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-
- - - - - - - - - - - ; - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - - - - - 0 - - - - - Next 'div' is emulating the top hight of a draw:frame. - - - - - height: - - cm; - -   - - - - - - - - - - - - - - - - - - - - - - - - - Next 'div' is a draw:frame. - - - - - - float:left; padding:0; position:relative; left: - - cm; - - - top: - - cm; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - margin-right: - - - - cm; - - - min-width: - - - - cm; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - height: - - - - cm; - - - width: - - - - cm; - - - - - - - - - - - Accessibility Warning: - No alternate text ('svg:desc' element) set for - image ''! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The required node-set function was not found! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ol - - - - ul - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - display:block;float: - - - - - - ;min-width: - - cm - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - display:block;float: - - - - - ;min-width: - - cm - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - right - left - - - left - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - div - p - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - margin- - - - - - : - - cm; - - - - - - - - - - - - - Next 'div' was a 'text:section'. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Footnote: - - - Endnote: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - footnodeNumber - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + ltr + + + rtl + + + + + + + + rtl + + + + + + + + + + + + + max-width: + + ; + + + + + background-image:url( + + + + ); + + + + + background-repeat:no-repeat; + + + background-repeat:repeat; + + + + + background-position: + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Next 'div' was a 'draw:text-box'. + + + + + + + + + + + + + + + + + + + + + + + + min-width: + + ; + + + max-width: + + ; + + + min-height: + + ; + + + max-height: + + ; + + + + + + height: + + + + + + + + + + ; + + + + + width: + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + Next 'div' was a 'text:p'. + + + Next 'div' was a 'draw:page'. + + + + + + + + + + + + + + + + + + +
 
+
+ + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + position:absolute;left: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cm; + + + + + + + + + + + + + + + + + no + yes + + + + + + + + + + + + div + p + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + text-align: + + left + right + center + justify + + ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Next 'div' added for floating. + + + position:relative; left: + + cm; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+
+ + + + + + + + + + + ; + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + 0 + + + + + Next 'div' is emulating the top hight of a draw:frame. + + + + + height: + + cm; + +   + + + + + + + + + + + + + + + + + + + + + + + + + Next 'div' is a draw:frame. + + + + + + float:left; padding:0; position:relative; left: + + cm; + + + top: + + cm; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + margin-right: + + + + cm; + + + min-width: + + + + cm; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + height: + + + + cm; + + + width: + + + + cm; + + + + + + + + + + + Accessibility Warning: + No alternate text ('svg:desc' element) set for + image ''! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The required node-set function was not found! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ol + + + + ul + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + display:block;float: + + + + + + ;min-width: + + cm + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + display:block;float: + + + + + ;min-width: + + cm + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + right + left + + + left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + div + p + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + margin- + + + + + : + + cm; + + + + + + + + + + + + + Next 'div' was a 'text:section'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Footnote: + + + Endnote: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + footnodeNumber + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl index e63ed0226a64..ab2c9bbaa866 100644 --- a/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl +++ b/filter/source/xslt/odf2xhtml/export/xhtml/header.xsl @@ -1,488 +1,484 @@ - - - - - - - - - - - - - - - http://dublincore.org/documents/dcmi-terms/ - CSS helper variable will be created.... - - - - - CSS variable ready, header will be created.... - - - - - CSS header creation finished! - - - - - - - - - - - text/css - - - - - -table { border-collapse:collapse; border-spacing:0; empty-cells:show } - - - td, th { vertical-align:top; font-size:10pt;} - - td, th { vertical-align:top; font-size:12pt;} - - -h1, h2, h3, h4, h5, h6 { clear:both } - -ol, ul { margin:0; padding:0;} - -li { list-style: none; margin:0; padding:0;} - - "li span.odfLiEnd" - IE 7 issue - - -li span. { clear: both; line-height:0; width:0; height:0; margin:0; padding:0; } - -span.footnodeNumber { padding-right:1em; } - -span.annotation_style_by_filter { font-size:95%; font-family:Arial; background-color:#fff000; margin:0; border:0; padding:0; } - -* { margin:0;} - - - - - - - - - - - - - - - - - - - - - . { } - - - - - - - - - - - - - - - - - - - - ODF styles with no properties representable as CSS - { } - - - - - - - - - - - - - - - - - - - - - - ; - - - - - - - - - - -@page { - - - - - - - - - - - } - - - - - - - - - - - - - - - size: - - - - ; - - - size: - - ; - - - - - - - - - - - - - margin-top: - - ; - - - - margin-bottom: - - ; - - - - margin-left: - - ; - - - - margin-right: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - en-US - - - - - - - - - - - - - - - - - , - - - - - - - Content-Type - application/xhtml+xml; charset=utf-8 - - - - - - - - - - - - - - - - no title specified - - - - - - - DCTERMS.title - - - - - - - - - - - - - - - - - - - - - - - - - DCTERMS.source - http://xml.openoffice.org/odf2xhtml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + http://dublincore.org/documents/dcmi-terms/ + CSS helper variable will be created.... + + + + + CSS variable ready, header will be created.... + + + + + CSS header creation finished! + + + + + + + + + + + text/css + + + + + +table { border-collapse:collapse; border-spacing:0; empty-cells:show } + + + td, th { vertical-align:top; font-size:10pt;} + + td, th { vertical-align:top; font-size:12pt;} + + +h1, h2, h3, h4, h5, h6 { clear:both } + +ol, ul { margin:0; padding:0;} + +li { list-style: none; margin:0; padding:0;} + + "li span.odfLiEnd" - IE 7 issue + + +li span. { clear: both; line-height:0; width:0; height:0; margin:0; padding:0; } + +span.footnodeNumber { padding-right:1em; } + +span.annotation_style_by_filter { font-size:95%; font-family:Arial; background-color:#fff000; margin:0; border:0; padding:0; } + +* { margin:0;} + + + + + + + + + + + + + + + + + + + + + . { } + + + + + + + + + + + + + + + + + + + + ODF styles with no properties representable as CSS + { } + + + + + + + + + + + + + + + + + + + + + + ; + + + + + + + + + + +@page { + + + + + + + + + + + } + + + + + + + + + + + + + + + size: + + + + ; + + + size: + + ; + + + + + + + + + + + + + margin-top: + + ; + + + + margin-bottom: + + ; + + + + margin-left: + + ; + + + + margin-right: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + en-US + + + + + + + + + + + + + + + + + , + + + + + + + Content-Type + application/xhtml+xml; charset=utf-8 + + + + + + + + + + + + + + + - no title specified + + + + + + + DCTERMS.title + + + + + + + + + + + + + + + + + + + + + + + + + DCTERMS.source + http://xml.openoffice.org/odf2xhtml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl index 7d364cffee95..f0ac642a00eb 100644 --- a/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl +++ b/filter/source/xslt/odf2xhtml/export/xhtml/opendoc2xhtml.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: opendoc2xhtml.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> debug cell properties +#ifdef DEBUG_DOMAINMAPPER + //-->debug cell properties { ::rtl::OUString sNames; const uno::Sequence< beans::PropertyValues > aDebugCurrentRow = aCellProperties[nRow]; @@ -576,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 } @@ -668,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, @@ -676,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)); @@ -693,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 } @@ -712,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 @@ -731,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 971d75b32884..b5a1628a0725 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DomainMapperTableHandler.hxx,v $ - * - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -58,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; @@ -76,6 +74,10 @@ class DomainMapperTableHandler : public TableDataHandler Pointer_t; diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 34c8092eb2e5..452391fe6300 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DomainMapperTableManager.cxx,v $ - * $Revision: 1.21 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -41,6 +38,7 @@ #include #include #include +#include namespace writerfilter { namespace dmapper { @@ -53,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), @@ -60,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--------------------------------------------------- @@ -74,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 ) { @@ -114,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); } } @@ -242,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 */ @@ -279,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; @@ -316,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--------------------------------------------------- @@ -325,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--------------------------------------------------- @@ -332,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 ); @@ -345,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( ); @@ -353,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(); @@ -390,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); } @@ -397,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--------------------------------------------------- @@ -445,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 7a8b07c8d174..8f4fa082881e 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DomainMapperTableManager.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -47,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 @@ -117,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 e6b52805a5da..4d9a9bd83c35 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DomainMapper_Impl.cxx,v $ - * $Revision: 1.27.6.1 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -77,6 +74,7 @@ #ifdef DEBUG_DOMAINMAPPER #include #include +#include #endif #include @@ -422,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(); } /*------------------------------------------------------------------------- @@ -846,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 @@ -1099,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 } /*------------------------------------------------------------------------- @@ -1362,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 )); @@ -3722,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 989d09e9d351..d5493440ea48 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DomainMapper_Impl.hxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -51,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -309,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; @@ -436,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; } @@ -536,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 70baeeddd380..20f3d602156b 100644 --- a/writerfilter/source/dmapper/FontTable.cxx +++ b/writerfilter/source/dmapper/FontTable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FontTable.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,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--------------------------------------------------- @@ -497,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; @@ -569,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--------------------------------------------------- @@ -659,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 b47374d2b0f9..a2fa967d85fe 100644 --- a/writerfilter/source/dmapper/FontTable.hxx +++ b/writerfilter/source/dmapper/FontTable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FontTable.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -31,6 +28,7 @@ #ifndef INCLUDED_FONTTABLE_HXX #define INCLUDED_FONTTABLE_HXX +#include #include #include #include @@ -42,6 +40,8 @@ namespace dmapper struct FontTable_Impl; struct FontEntry { + typedef boost::shared_ptr Pointer_t; + ::rtl::OUString sFontName; ::rtl::OUString sFontName1; bool bTrueType; @@ -100,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 33a064b09d83..c8d94f8302c2 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GraphicImport.cxx,v $ - * - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -383,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:; @@ -435,6 +425,7 @@ void GraphicImport::attribute(Id nName, Value & val) switch(nName) { case NS_rtf::LN_shpopt: + /* WRITERFILTERSTATUS: */ m_pImpl->bInShapeOptionMode = false; break; default:; @@ -442,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) @@ -553,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 ); @@ -616,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 ] = { @@ -733,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 ] = { @@ -799,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; @@ -812,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 @@ -836,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 ) { @@ -859,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; @@ -885,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 ) @@ -897,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 @@ -946,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 @@ -974,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; @@ -995,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; @@ -1074,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; @@ -1126,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 @@ -1262,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% @@ -1295,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; @@ -1335,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 @@ -1506,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?"); } @@ -1827,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()) @@ -1877,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: @@ -1891,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/GraphicImport.hxx b/writerfilter/source/dmapper/GraphicImport.hxx index 8e1558656507..14f512a3d4ee 100644 --- a/writerfilter/source/dmapper/GraphicImport.hxx +++ b/writerfilter/source/dmapper/GraphicImport.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GraphicImport.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/LFOTable.cxx b/writerfilter/source/dmapper/LFOTable.cxx index c75156438329..51ecafd2662e 100644 --- a/writerfilter/source/dmapper/LFOTable.cxx +++ b/writerfilter/source/dmapper/LFOTable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: LFOTable.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -97,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()) @@ -534,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/LFOTable.hxx b/writerfilter/source/dmapper/LFOTable.hxx index df2f402179b3..89f72c557d85 100644 --- a/writerfilter/source/dmapper/LFOTable.hxx +++ b/writerfilter/source/dmapper/LFOTable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: LFOTable.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/ListTable.cxx b/writerfilter/source/dmapper/ListTable.cxx index 9a4e19939df7..36cb4d8bdb47 100644 --- a/writerfilter/source/dmapper/ListTable.cxx +++ b/writerfilter/source/dmapper/ListTable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ListTable.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -343,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 @@ -363,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(); @@ -795,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; @@ -881,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()) @@ -897,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()) @@ -911,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(); @@ -931,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()) @@ -962,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(); @@ -984,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(); @@ -1000,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; @@ -1009,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()) @@ -1029,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/ListTable.hxx b/writerfilter/source/dmapper/ListTable.hxx index 2d0cf2e6bdce..b7db225fb9f4 100644 --- a/writerfilter/source/dmapper/ListTable.hxx +++ b/writerfilter/source/dmapper/ListTable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ListTable.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/MeasureHandler.cxx b/writerfilter/source/dmapper/MeasureHandler.cxx index 5c315330a0cc..58f3980063ee 100644 --- a/writerfilter/source/dmapper/MeasureHandler.cxx +++ b/writerfilter/source/dmapper/MeasureHandler.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MeasureHandler.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/MeasureHandler.hxx b/writerfilter/source/dmapper/MeasureHandler.hxx index 6748ac02e368..574685f8ed27 100644 --- a/writerfilter/source/dmapper/MeasureHandler.hxx +++ b/writerfilter/source/dmapper/MeasureHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MeasureHandler.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/ModelEventListener.cxx b/writerfilter/source/dmapper/ModelEventListener.cxx index 5fbb5dc88faf..853b835d7d98 100644 --- a/writerfilter/source/dmapper/ModelEventListener.cxx +++ b/writerfilter/source/dmapper/ModelEventListener.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ModelEventListener.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/ModelEventListener.hxx b/writerfilter/source/dmapper/ModelEventListener.hxx index c52c1c44f4f5..3486dc70947d 100644 --- a/writerfilter/source/dmapper/ModelEventListener.hxx +++ b/writerfilter/source/dmapper/ModelEventListener.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ModelEventListener.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index 8f1501046418..65f76f11cbfc 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OLEHandler.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/OLEHandler.hxx b/writerfilter/source/dmapper/OLEHandler.hxx index bdd94a802b7b..f9059fb6a35a 100644 --- a/writerfilter/source/dmapper/OLEHandler.hxx +++ b/writerfilter/source/dmapper/OLEHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OLEHandler.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index bc76be7d8ecf..04dcf594339c 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PropertyIds.cxx,v $ - * $Revision: 1.32 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -315,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 cdbcf758b579..f9c4c333e8ea 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PropertyIds.hxx,v $ - * $Revision: 1.29 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -278,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 3e2f0752fc52..8d9c1fa84a7f 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PropertyMap.cxx,v $ - * - * $Revision: 1.25 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,6 +38,8 @@ #include #include #include +#include "dmapperLoggers.hxx" +#include "PropertyMapHelper.hxx" using namespace ::com::sun::star; @@ -129,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--------------------------------------------------- -----------------------------------------------------------------------*/ @@ -156,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--------------------------------------------------- @@ -170,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--------------------------------------------------- @@ -1047,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 ) { @@ -1060,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 1e30a018b721..0f934b37d7d8 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * 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 @@ -42,6 +39,10 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#endif + namespace com{namespace sun{namespace star{ namespace beans{ struct PropertyValue; @@ -102,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();} @@ -114,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; } @@ -134,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/SectionColumnHandler.cxx b/writerfilter/source/dmapper/SectionColumnHandler.cxx index b4e640f839cb..5ad3e51fb8b7 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.cxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SectionColumnHandler.cxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/SectionColumnHandler.hxx b/writerfilter/source/dmapper/SectionColumnHandler.hxx index 96cabce808d5..452895b50194 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.hxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SectionColumnHandler.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 c42651b21881..cbf6240c15ce 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: StyleSheetTable.cxx,v $ - * $Revision: 1.33 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -49,6 +46,11 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#include +#endif + using namespace ::com::sun::star; namespace writerfilter { namespace dmapper @@ -69,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( ), @@ -96,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, @@ -160,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[] = @@ -218,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 @@ -236,7 +293,7 @@ PropertyMapPtr TableStyleSheetEntry::GetLocalPropertiesFromMask( sal_Int32 nMask nBit++; } - while ( nBit < 12 ); + while ( nBit < 13 ); return pProps; } @@ -356,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 ; @@ -366,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()) @@ -419,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: @@ -451,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) @@ -845,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: @@ -876,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; @@ -892,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()) @@ -947,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()) @@ -1014,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; @@ -1031,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"); @@ -1055,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 @@ -1157,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& ) { @@ -1178,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); } @@ -1309,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 73f5a2defebf..6eef483289ec 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: StyleSheetTable.hxx,v $ - * $Revision: 1.16 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -39,6 +36,10 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#endif + namespace com{ namespace sun { namespace star { namespace text{ class XTextDocument; }}}} @@ -59,8 +60,9 @@ enum StyleType }; struct StyleSheetTable_Impl; -struct StyleSheetEntry +class StyleSheetEntry { +public: ::rtl::OUString sStyleIdentifierI; ::rtl::OUString sStyleIdentifierD; bool bIsDefaultStyle; @@ -73,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; @@ -140,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/TDefTableHandler.cxx b/writerfilter/source/dmapper/TDefTableHandler.cxx index dc2583249da2..c65ce2cdb784 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.cxx +++ b/writerfilter/source/dmapper/TDefTableHandler.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TDefTableHandler.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/dmapper/TDefTableHandler.hxx b/writerfilter/source/dmapper/TDefTableHandler.hxx index 352cb936cc97..993b49251a77 100644 --- a/writerfilter/source/dmapper/TDefTableHandler.hxx +++ b/writerfilter/source/dmapper/TDefTableHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TDefTableHandler.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 d3c56b17178c..ec9d8ea9d5a5 --- a/writerfilter/source/dmapper/ThemeTable.cxx +++ b/writerfilter/source/dmapper/ThemeTable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ThemeTable.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,9 +25,7 @@ * ************************************************************************/ -#ifndef INCLUDED_FONTTABLE_HXX #include -#endif #ifndef INCLUDED_RESOURCESIDS #include #include diff --git a/writerfilter/source/dmapper/ThemeTable.hxx b/writerfilter/source/dmapper/ThemeTable.hxx index 85b698b966c3..b79877703c58 100644 --- a/writerfilter/source/dmapper/ThemeTable.hxx +++ b/writerfilter/source/dmapper/ThemeTable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ThemeTable.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 293b6fa383b1..a19ff4832370 100644 --- a/writerfilter/source/doctok/WW8LFOLevel.cxx +++ b/writerfilter/source/dmapper/dmapperLoggers.hxx @@ -6,9 +6,8 @@ * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8LFOLevel.cxx,v $ - * - * $Revision: 1.4 $ + * $RCSfile: ooxmlLoggers.hxx,v $ + * $Revision: 1.2 $ * * This file is part of OpenOffice.org. * @@ -29,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 5f421643150d..dd94415aa966 --- a/writerfilter/source/dmapper/makefile.mk +++ b/writerfilter/source/dmapper/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.13 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,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/Dff.cxx b/writerfilter/source/doctok/Dff.cxx index 199a5e25278f..c7d8fb713d6f 100644 --- a/writerfilter/source/doctok/Dff.cxx +++ b/writerfilter/source/doctok/Dff.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Dff.cxx,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/Dff.hxx b/writerfilter/source/doctok/Dff.hxx index af5c107a1909..b0a64f05c303 100644 --- a/writerfilter/source/doctok/Dff.hxx +++ b/writerfilter/source/doctok/Dff.hxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Dff.hxx,v $ - * - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/DffImpl.cxx b/writerfilter/source/doctok/DffImpl.cxx index 16f597a2322a..fcb2fe6267be 100644 --- a/writerfilter/source/doctok/DffImpl.cxx +++ b/writerfilter/source/doctok/DffImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DffImpl.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/PLCF.hxx b/writerfilter/source/doctok/PLCF.hxx index f0009e33e642..fefff12f6c11 100644 --- a/writerfilter/source/doctok/PLCF.hxx +++ b/writerfilter/source/doctok/PLCF.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PLCF.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8Annotation.cxx b/writerfilter/source/doctok/WW8Annotation.cxx index 0eced37d071a..aabcd5525e90 100644 --- a/writerfilter/source/doctok/WW8Annotation.cxx +++ b/writerfilter/source/doctok/WW8Annotation.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Annotation.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8BinTable.hxx b/writerfilter/source/doctok/WW8BinTable.hxx index 75f3c8286b8a..4105a06b5fd4 100644 --- a/writerfilter/source/doctok/WW8BinTable.hxx +++ b/writerfilter/source/doctok/WW8BinTable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8BinTable.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8BinTableImpl.cxx b/writerfilter/source/doctok/WW8BinTableImpl.cxx index d0e068c925b9..05959cf359b1 100644 --- a/writerfilter/source/doctok/WW8BinTableImpl.cxx +++ b/writerfilter/source/doctok/WW8BinTableImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8BinTableImpl.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8BinTableImpl.hxx b/writerfilter/source/doctok/WW8BinTableImpl.hxx index 7c43fcd4aeef..d3119c13dd20 100644 --- a/writerfilter/source/doctok/WW8BinTableImpl.hxx +++ b/writerfilter/source/doctok/WW8BinTableImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8BinTableImpl.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8Clx.cxx b/writerfilter/source/doctok/WW8Clx.cxx index f0650598260a..d794afd3ce60 100644 --- a/writerfilter/source/doctok/WW8Clx.cxx +++ b/writerfilter/source/doctok/WW8Clx.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Clx.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8Clx.hxx b/writerfilter/source/doctok/WW8Clx.hxx index 26bea0e77a69..7085965a689a 100644 --- a/writerfilter/source/doctok/WW8Clx.hxx +++ b/writerfilter/source/doctok/WW8Clx.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Clx.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8CpAndFc.cxx b/writerfilter/source/doctok/WW8CpAndFc.cxx index 45ede93f7128..ecf5f895e91f 100644 --- a/writerfilter/source/doctok/WW8CpAndFc.cxx +++ b/writerfilter/source/doctok/WW8CpAndFc.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8CpAndFc.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8CpAndFc.hxx b/writerfilter/source/doctok/WW8CpAndFc.hxx index 6c92266ed45e..86a8b971a7d6 100644 --- a/writerfilter/source/doctok/WW8CpAndFc.hxx +++ b/writerfilter/source/doctok/WW8CpAndFc.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8CpAndFc.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index 489cd120f8a0..cda79dad1cdf 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8DocumentImpl.cxx,v $ - * $Revision: 1.20 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -231,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."); @@ -969,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; @@ -1436,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); } @@ -1621,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) { @@ -1688,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 fd820ed1efb0..9b123ae54cde 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.hxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8DocumentImpl.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -302,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; @@ -398,8 +398,6 @@ public: virtual WW8Stream::Sequence getText(const CpAndFc & rStart); - WW8Fib::Pointer_t getFib() const; - /** Returns the document stream. */ @@ -530,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/WW8FKP.hxx b/writerfilter/source/doctok/WW8FKP.hxx index f458df4a7ff8..af0af1b8e303 100644 --- a/writerfilter/source/doctok/WW8FKP.hxx +++ b/writerfilter/source/doctok/WW8FKP.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8FKP.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8FKPImpl.cxx b/writerfilter/source/doctok/WW8FKPImpl.cxx index 4627a98ac734..354159bced0c 100644 --- a/writerfilter/source/doctok/WW8FKPImpl.cxx +++ b/writerfilter/source/doctok/WW8FKPImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8FKPImpl.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8FKPImpl.hxx b/writerfilter/source/doctok/WW8FKPImpl.hxx index 99a6b46947f1..a7e59a33b1b2 100644 --- a/writerfilter/source/doctok/WW8FKPImpl.hxx +++ b/writerfilter/source/doctok/WW8FKPImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8FKPImpl.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8FontTable.cxx b/writerfilter/source/doctok/WW8FontTable.cxx index 2e04a107884d..f29d2ea4a343 100644 --- a/writerfilter/source/doctok/WW8FontTable.cxx +++ b/writerfilter/source/doctok/WW8FontTable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8FontTable.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8LFOTable.cxx b/writerfilter/source/doctok/WW8LFOTable.cxx index 7acdfd8d1144..2164c4887c8b 100644 --- a/writerfilter/source/doctok/WW8LFOTable.cxx +++ b/writerfilter/source/doctok/WW8LFOTable.cxx @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8LFOTable.cxx,v $ - * - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -39,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; } @@ -90,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) { @@ -106,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 2dddb931ad9b..f70c7740dff2 100644 --- a/writerfilter/source/doctok/WW8ListTable.cxx +++ b/writerfilter/source/doctok/WW8ListTable.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8ListTable.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -29,6 +26,7 @@ ************************************************************************/ #include +#include namespace writerfilter { namespace doctok { @@ -56,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()) @@ -115,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(); @@ -136,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() @@ -150,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/WW8OutputWithDepth.cxx b/writerfilter/source/doctok/WW8OutputWithDepth.cxx index 6e9190bd26ee..c795ec11bb56 100644 --- a/writerfilter/source/doctok/WW8OutputWithDepth.cxx +++ b/writerfilter/source/doctok/WW8OutputWithDepth.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8OutputWithDepth.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8OutputWithDepth.hxx b/writerfilter/source/doctok/WW8OutputWithDepth.hxx index fcff0df6fe30..2165abab4a65 100644 --- a/writerfilter/source/doctok/WW8OutputWithDepth.hxx +++ b/writerfilter/source/doctok/WW8OutputWithDepth.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8OutputWithDepth.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8Picture.cxx b/writerfilter/source/doctok/WW8Picture.cxx index 6b5261a9a9b3..3e2f6d1ced25 100644 --- a/writerfilter/source/doctok/WW8Picture.cxx +++ b/writerfilter/source/doctok/WW8Picture.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Picture.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8PieceTable.hxx b/writerfilter/source/doctok/WW8PieceTable.hxx index 41557fae995f..9e09dd448f88 100644 --- a/writerfilter/source/doctok/WW8PieceTable.hxx +++ b/writerfilter/source/doctok/WW8PieceTable.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8PieceTable.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8PieceTableImpl.cxx b/writerfilter/source/doctok/WW8PieceTableImpl.cxx index c33727bdc521..869964aac67e 100644 --- a/writerfilter/source/doctok/WW8PieceTableImpl.cxx +++ b/writerfilter/source/doctok/WW8PieceTableImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8PieceTableImpl.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8PieceTableImpl.hxx b/writerfilter/source/doctok/WW8PieceTableImpl.hxx index d4aaf5d45490..3d7a5e9ede79 100644 --- a/writerfilter/source/doctok/WW8PieceTableImpl.hxx +++ b/writerfilter/source/doctok/WW8PieceTableImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8PieceTableImpl.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8PropertySetImpl.cxx b/writerfilter/source/doctok/WW8PropertySetImpl.cxx index 0f7c7d7225ba..7b0cf28282c7 100644 --- a/writerfilter/source/doctok/WW8PropertySetImpl.cxx +++ b/writerfilter/source/doctok/WW8PropertySetImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8PropertySetImpl.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -150,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; } @@ -317,7 +322,7 @@ string WW8PropertySetImpl::getType() const return "WW8PropertySetImpl"; } -void WW8PropertySetImpl::resolveLocal(Sprm & sprm) +void WW8PropertySetImpl::resolveLocal(Sprm & sprm, Properties & rHandler) { switch (sprm.getId()) { @@ -332,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; } @@ -356,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 39af89cc6dbb..2f7bb0f34708 100644 --- a/writerfilter/source/doctok/WW8PropertySetImpl.hxx +++ b/writerfilter/source/doctok/WW8PropertySetImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8PropertySetImpl.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -107,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/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx index 6a69b40d94a8..a576640905ce 100644 --- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx +++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8ResourceModelImpl.cxx,v $ - * $Revision: 1.15 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.hxx b/writerfilter/source/doctok/WW8ResourceModelImpl.hxx index b8094b3ab67c..d7eba5ba67a2 100644 --- a/writerfilter/source/doctok/WW8ResourceModelImpl.hxx +++ b/writerfilter/source/doctok/WW8ResourceModelImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8ResourceModelImpl.hxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8StreamImpl.cxx b/writerfilter/source/doctok/WW8StreamImpl.cxx index 3cc08b99c303..4418839919d4 100644 --- a/writerfilter/source/doctok/WW8StreamImpl.cxx +++ b/writerfilter/source/doctok/WW8StreamImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8StreamImpl.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8StreamImpl.hxx b/writerfilter/source/doctok/WW8StreamImpl.hxx index aac7fbd62dfa..2f1a0b0b234e 100644 --- a/writerfilter/source/doctok/WW8StreamImpl.hxx +++ b/writerfilter/source/doctok/WW8StreamImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8StreamImpl.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8StructBase.cxx b/writerfilter/source/doctok/WW8StructBase.cxx index ef0d29f34b53..7d03e8763c69 100644 --- a/writerfilter/source/doctok/WW8StructBase.cxx +++ b/writerfilter/source/doctok/WW8StructBase.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8StructBase.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -118,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/WW8StructBase.hxx b/writerfilter/source/doctok/WW8StructBase.hxx index aa2b43ad87d4..0a1f7949fabf 100644 --- a/writerfilter/source/doctok/WW8StructBase.hxx +++ b/writerfilter/source/doctok/WW8StructBase.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8StructBase.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8Sttbf.cxx b/writerfilter/source/doctok/WW8Sttbf.cxx index b154898f651c..36e2e805436d 100644 --- a/writerfilter/source/doctok/WW8Sttbf.cxx +++ b/writerfilter/source/doctok/WW8Sttbf.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Sttbf.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -29,6 +26,7 @@ ************************************************************************/ #include +#include namespace writerfilter { namespace doctok @@ -89,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 6d369766e8d9..5c82d94723a9 100644 --- a/writerfilter/source/doctok/WW8Sttbf.hxx +++ b/writerfilter/source/doctok/WW8Sttbf.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Sttbf.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -32,6 +29,7 @@ #define INCLUDED_WW8_STTBF_HXX #include +#include #include #include @@ -102,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/WW8StyleSheet.cxx b/writerfilter/source/doctok/WW8StyleSheet.cxx index b9856f3d61e2..797554f984e3 100644 --- a/writerfilter/source/doctok/WW8StyleSheet.cxx +++ b/writerfilter/source/doctok/WW8StyleSheet.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8StyleSheet.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8Table.cxx b/writerfilter/source/doctok/WW8Table.cxx index 68ecba2d888c..34765de5accb 100644 --- a/writerfilter/source/doctok/WW8Table.cxx +++ b/writerfilter/source/doctok/WW8Table.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Table.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8Text.cxx b/writerfilter/source/doctok/WW8Text.cxx index 83e8e3635e8a..746cf4547288 100644 --- a/writerfilter/source/doctok/WW8Text.cxx +++ b/writerfilter/source/doctok/WW8Text.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Text.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/WW8inc.xsl b/writerfilter/source/doctok/WW8inc.xsl index 9d860dcc7db2..956e2cad24be 100644 --- a/writerfilter/source/doctok/WW8inc.xsl +++ b/writerfilter/source/doctok/WW8inc.xsl @@ -2,14 +2,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: WW8inc.xsl,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ diff --git a/writerfilter/source/doctok/WW8sprms.xsl b/writerfilter/source/doctok/WW8sprms.xsl index 7b82454eae25..80afb9c853ee 100644 --- a/writerfilter/source/doctok/WW8sprms.xsl +++ b/writerfilter/source/doctok/WW8sprms.xsl @@ -2,14 +2,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: WW8sprms.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ for a copy of the LGPLv3 License. - + ************************************************************************/ --> diff --git a/writerfilter/source/doctok/XNoteHelper.hxx b/writerfilter/source/doctok/XNoteHelper.hxx index 55474d046101..faa7f3bb038d 100644 --- a/writerfilter/source/doctok/XNoteHelper.hxx +++ b/writerfilter/source/doctok/XNoteHelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XNoteHelper.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/XNoteHelperImpl.hxx b/writerfilter/source/doctok/XNoteHelperImpl.hxx index 278f15fa36dd..4cd70b984f24 100644 --- a/writerfilter/source/doctok/XNoteHelperImpl.hxx +++ b/writerfilter/source/doctok/XNoteHelperImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XNoteHelperImpl.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/analyzer.xsl b/writerfilter/source/doctok/analyzer.xsl index b64ec75d130e..ce645bdbe064 100644 --- a/writerfilter/source/doctok/analyzer.xsl +++ b/writerfilter/source/doctok/analyzer.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: header.hxx,v $ - - $Revision: 1.1 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> 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/doctokLoggers.hxx b/writerfilter/source/doctok/doctokLoggers.hxx index 50ad9ddd28c0..8df90348a249 100644 --- a/writerfilter/source/doctok/doctokLoggers.hxx +++ b/writerfilter/source/doctok/doctokLoggers.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doctokLoggers.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/doctokutil.cxx b/writerfilter/source/doctok/doctokutil.cxx index 4a2fbd018994..7d94b525550b 100644 --- a/writerfilter/source/doctok/doctokutil.cxx +++ b/writerfilter/source/doctok/doctokutil.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: doctokutil.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/escherdoc.xsl b/writerfilter/source/doctok/escherdoc.xsl index 7191973c7f06..04a63865e9c3 100644 --- a/writerfilter/source/doctok/escherdoc.xsl +++ b/writerfilter/source/doctok/escherdoc.xsl @@ -2,14 +2,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: escherdoc.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ for a copy of the LGPLv3 License. - + ************************************************************************/ --> diff --git a/writerfilter/source/doctok/qnametostrheader b/writerfilter/source/doctok/qnametostrheader index 74f95dda876a..07ce47387153 100644 --- a/writerfilter/source/doctok/qnametostrheader +++ b/writerfilter/source/doctok/qnametostrheader @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: qnametostrheader,v $ - * - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/resourceidmapper.xsl b/writerfilter/source/doctok/resourceidmapper.xsl index 936f5116bf9e..83892770685a 100644 --- a/writerfilter/source/doctok/resourceidmapper.xsl +++ b/writerfilter/source/doctok/resourceidmapper.xsl @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourceidmapper.xsl,v $ - * - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -44,9 +40,6 @@ THIS FILE IS GENERATED AUTOMATICALLY! DO NOT EDIT! - $RCSfile: resourceidmapper.xsl,v $ - - $Revision: 1.3 $ */ package analyze; diff --git a/writerfilter/source/doctok/resourceidmapperback.xsl b/writerfilter/source/doctok/resourceidmapperback.xsl index d2e1b8bf3607..8f00e76d7dc1 100644 --- a/writerfilter/source/doctok/resourceidmapperback.xsl +++ b/writerfilter/source/doctok/resourceidmapperback.xsl @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourceidmapperback.xsl,v $ - * - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -44,9 +40,6 @@ THIS FILE IS GENERATED AUTOMATICALLY! DO NOT EDIT! - $RCSfile: resourceidmapperback.xsl,v $ - - $Revision: 1.3 $ */ package analyze; diff --git a/writerfilter/source/doctok/resourceids.xsl b/writerfilter/source/doctok/resourceids.xsl index e4495183891b..fb9895c1c1c6 100644 --- a/writerfilter/source/doctok/resourceids.xsl +++ b/writerfilter/source/doctok/resourceids.xsl @@ -3,14 +3,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourceids.xsl,v $ - * - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -46,14 +42,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourceids.xsl,v $ - * - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 28df89e6686e..e1fc68ba5323 100644 --- a/writerfilter/source/doctok/resources.xsl +++ b/writerfilter/source/doctok/resources.xsl @@ -3,14 +3,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resources.xsl,v $ - * - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -42,14 +38,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resources.xsl,v $ - * - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -488,7 +480,6 @@ class - 0x diff --git a/writerfilter/source/doctok/resourcesimpl.xsl b/writerfilter/source/doctok/resourcesimpl.xsl index 2a52b58c4ab7..75684e76c95e 100644 --- a/writerfilter/source/doctok/resourcesimpl.xsl +++ b/writerfilter/source/doctok/resourcesimpl.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: resourcesimpl.xsl,v $ - - $Revision: 1.12 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> diff --git a/writerfilter/source/doctok/resourcetools.xsl b/writerfilter/source/doctok/resourcetools.xsl index 8c1ef9d7703d..75d124a3eedb 100644 --- a/writerfilter/source/doctok/resourcetools.xsl +++ b/writerfilter/source/doctok/resourcetools.xsl @@ -3,14 +3,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourcetools.xsl,v $ - * - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -538,14 +534,10 @@ void doctokidsToXML(::std::ostream & out) * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourcetools.xsl,v $ - * - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/sprmcodetostr.xsl b/writerfilter/source/doctok/sprmcodetostr.xsl index 41de8387ac2e..98cf02919959 100644 --- a/writerfilter/source/doctok/sprmcodetostr.xsl +++ b/writerfilter/source/doctok/sprmcodetostr.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: sprmcodetostr.xsl,v $ - - $Revision: 1.2 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> diff --git a/writerfilter/source/doctok/sprmids.xsl b/writerfilter/source/doctok/sprmids.xsl index af3f1335f18f..2ca8826e94dc 100644 --- a/writerfilter/source/doctok/sprmids.xsl +++ b/writerfilter/source/doctok/sprmids.xsl @@ -3,14 +3,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sprmids.xsl,v $ - * - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -44,14 +40,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sprmids.xsl,v $ - * - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/doctok/tidyxmi.xsl b/writerfilter/source/doctok/tidyxmi.xsl index 1c470039bf7c..6371fb05b696 100644 --- a/writerfilter/source/doctok/tidyxmi.xsl +++ b/writerfilter/source/doctok/tidyxmi.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: tidyxmi.xsl,v $ - - $Revision: 1.5 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> diff --git a/writerfilter/source/doctok/util.hxx b/writerfilter/source/doctok/util.hxx index a1c065f26c91..df534b28a5bc 100644 --- a/writerfilter/source/doctok/util.hxx +++ b/writerfilter/source/doctok/util.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: util.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/doctok/xmistat.xsl b/writerfilter/source/doctok/xmistat.xsl index 5452b76341c4..842e0f0361e2 100644 --- a/writerfilter/source/doctok/xmistat.xsl +++ b/writerfilter/source/doctok/xmistat.xsl @@ -2,14 +2,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: xmistat.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ diff --git a/writerfilter/source/doctok/xmitocpp b/writerfilter/source/doctok/xmitocpp index 25d3f26cbb69..ec06b400eb80 100755 --- a/writerfilter/source/doctok/xmitocpp +++ b/writerfilter/source/doctok/xmitocpp @@ -3,14 +3,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: xmitocpp,v $ -# -# $Revision: 1.10 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index af27bac94540..911689996b07 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ImportFilter.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -130,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/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx index d09df79d2017..71a97d72f391 100644 --- a/writerfilter/source/filter/WriterFilter.cxx +++ b/writerfilter/source/filter/WriterFilter.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WriterFilter.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/filter/WriterFilter.hxx b/writerfilter/source/filter/WriterFilter.hxx index 02fde305086e..0d4cb7a3a711 100644 --- a/writerfilter/source/filter/WriterFilter.hxx +++ b/writerfilter/source/filter/WriterFilter.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WriterFilter.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx index 4be325b74945..a712cc14fffa 100644 --- a/writerfilter/source/filter/WriterFilterDetection.cxx +++ b/writerfilter/source/filter/WriterFilterDetection.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WriterFilterDetection.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/filter/WriterFilterDetection.hxx b/writerfilter/source/filter/WriterFilterDetection.hxx index 07c895d787ef..a5e8149d68c2 100644 --- a/writerfilter/source/filter/WriterFilterDetection.hxx +++ b/writerfilter/source/filter/WriterFilterDetection.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WriterFilterDetection.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/filter/makefile.mk b/writerfilter/source/filter/makefile.mk index f8edfa4aac36..f578e2853243 100644 --- a/writerfilter/source/filter/makefile.mk +++ b/writerfilter/source/filter/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/Handler.cxx b/writerfilter/source/ooxml/Handler.cxx index 7560d3cf4c50..1b4fb6eb0525 100644 --- a/writerfilter/source/ooxml/Handler.cxx +++ b/writerfilter/source/ooxml/Handler.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Handler.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/Handler.hxx b/writerfilter/source/ooxml/Handler.hxx index 8b1650af234c..372683c0b0cf 100644 --- a/writerfilter/source/ooxml/Handler.hxx +++ b/writerfilter/source/ooxml/Handler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Handler.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx index 0bb71f6cfbee..d034a145a5bf 100644 --- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx +++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLBinaryObjectReference.cxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx index 0f36cfd46711..833c93bae9db 100644 --- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx +++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLBinaryObjectReference.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index fef00e4cef43..90c878e3b8e2 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLDocumentImpl.cxx,v $ - * $Revision: 1.19 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,6 +27,7 @@ #include +#include #include #include #include "OOXMLDocumentImpl.hxx" @@ -40,6 +38,7 @@ #include +using ::com::sun::star::xml::sax::SAXException; namespace writerfilter { namespace ooxml { @@ -305,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()); @@ -333,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/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index ca2c91994f58..7fdeb69b8bb8 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLDocumentImpl.hxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 53f0c423bc9c..51960959d185 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -2,17 +2,14 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLFastContextHandler.cxx,v $ - * $Revision: 1.12 $ - * * 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, @@ -36,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 }; @@ -108,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; } @@ -127,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), @@ -298,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 @@ -313,7 +317,7 @@ void OOXMLFastContextHandler::lcl_endFastElement debug_logger->endElement("token"); #endif - endAction(Element); + OOXMLFactory::getInstance()->endAction(this, Element); } void SAL_CALL OOXMLFastContextHandler::endUnknownElement @@ -350,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 @@ -389,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() @@ -425,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) @@ -441,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) @@ -456,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 @@ -521,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)); @@ -536,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; @@ -606,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); } @@ -623,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() @@ -948,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) @@ -988,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); @@ -1024,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(); @@ -1086,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()); @@ -1096,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 > @@ -1232,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(); } } @@ -1428,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 */ @@ -1655,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() @@ -1717,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(); } /* @@ -1756,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); } @@ -1792,12 +1874,10 @@ OOXMLFastContextHandlerTextTableRow::OOXMLFastContextHandlerTextTableRow (OOXMLFastContextHandler * pContext) : OOXMLFastContextHandler(pContext) { - startRow(); } OOXMLFastContextHandlerTextTableRow::~OOXMLFastContextHandlerTextTableRow() { - endRow(); } void OOXMLFastContextHandlerTextTableRow::startRow() @@ -1815,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); } @@ -1841,7 +1921,6 @@ void OOXMLFastContextHandlerTextTableRow::endRow() #endif mpStream->props(writerfilter::Reference::Pointer_t(pProps)); - mpParserState->resolveTableProperties(*mpStream); } startCharacterGroup(); @@ -1849,6 +1928,7 @@ void OOXMLFastContextHandlerTextTableRow::endRow() if (isForwardEvents()) mpStream->utext(s0xd, 1); + endCharacterGroup(); endParagraphGroup(); } @@ -1864,6 +1944,7 @@ OOXMLFastContextHandlerTextTable::OOXMLFastContextHandlerTextTable OOXMLFastContextHandlerTextTable::~OOXMLFastContextHandlerTextTable() { + clearTableProps(); } void OOXMLFastContextHandlerTextTable::lcl_startFastElement @@ -1871,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 ); @@ -1893,6 +1975,7 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement endAction(Element); mnTableDepth--; + mpParserState->endTable(); } /* @@ -1967,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()) @@ -2059,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; + } } } } @@ -2078,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( ); } @@ -2106,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()) @@ -2290,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 e8fb0efc0f7b..b67f86fda3e7 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLFastContextHandler.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -133,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; @@ -171,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); @@ -179,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; @@ -191,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 @@ -241,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; @@ -371,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 @@ -491,6 +435,8 @@ protected: virtual ResourceEnum_t getResource() const { return TABLE; } + virtual string getType() const { return "Table"; } + void addCurrentChild(); }; @@ -500,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; @@ -523,6 +472,8 @@ public: (OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerTextTableCell(); + virtual string getType() const { return "TextTableCell"; } + void startCell(); void endCell(); }; @@ -534,6 +485,8 @@ public: (OOXMLFastContextHandler * pContext); virtual ~OOXMLFastContextHandlerTextTableRow(); + virtual string getType() const { return "TextTableRow"; } + void startRow(); void endRow(); }; @@ -546,6 +499,8 @@ public: virtual ~OOXMLFastContextHandlerTextTable(); + virtual string getType() const { return "TextTable"; } + protected: virtual void lcl_startFastElement (Token_t Element, @@ -560,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 aee2be60ad47..f4feddf341ac 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLFastDocumentHandler.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,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 @@ -138,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 @@ -147,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 @@ -212,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 92e173749620..86f835c5c0a4 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLFastDocumentHandler.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -107,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 964876f5a35a..2d21083487ff 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLFastHelper.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -49,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); @@ -75,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); @@ -94,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; } @@ -141,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", @@ -154,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); @@ -167,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/OOXMLFastTokenHandler.cxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx index 6d6692b671fc..bb44111195d2 100644 --- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLFastTokenHandler.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx index bb534dd5d955..5debd7224cb9 100644 --- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLFastTokenHandler.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index e475416db489..e38593777a55 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLParserState.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -194,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 } } @@ -216,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 ef050ce8b8c3..affdd7dbe61c 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLParserState.hxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,6 +27,7 @@ #ifndef INCLUDE_OOXML_PARSER_STATE_HXX #define INCLUDE_OOXML_PARSER_STATE_HXX +#include #include #include #include "OOXMLPropertySetImpl.hxx" @@ -38,6 +36,8 @@ namespace writerfilter { namespace ooxml { +using ::std::stack; + class OOXMLParserState { bool mbInSectionGroup; @@ -51,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; @@ -93,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/OOXMLPropertySet.hxx b/writerfilter/source/ooxml/OOXMLPropertySet.hxx index 9ec28719c1d8..d448b58cc304 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySet.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySet.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLPropertySet.hxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index 936ef27de272..2f8844f1af01 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLPropertySetImpl.cxx,v $ - * $Revision: 1.27 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -32,7 +29,10 @@ #include #include #include +#include #include +#include +#include "ooxmlLoggers.hxx" //#define DEBUG_RESOLVE @@ -128,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; } @@ -158,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; } } @@ -459,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) @@ -691,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(); @@ -702,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/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx index 4b2bdd118814..78c39b79d515 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLPropertySetImpl.hxx,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index 1de3acfcbfba..91188eeda701 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLStreamImpl.cxx,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx index f6733e9c405f..64682fab250c 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLStreamImpl.hxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/RefAndPointer.hxx b/writerfilter/source/ooxml/RefAndPointer.hxx index de3fcf69d6c7..c997d302fd33 100644 --- a/writerfilter/source/ooxml/RefAndPointer.hxx +++ b/writerfilter/source/ooxml/RefAndPointer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RefAndPointer.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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 100316a0c7a2..000000000000 --- a/writerfilter/source/ooxml/analyzer.xsl +++ /dev/null @@ -1,50 +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/checkmodel.xsl b/writerfilter/source/ooxml/checkmodel.xsl index 9768bb5ebfc3..b40544f796cf 100644 --- a/writerfilter/source/ooxml/checkmodel.xsl +++ b/writerfilter/source/ooxml/checkmodel.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: checkmodel.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> diff --git a/writerfilter/source/ooxml/dummyannotate.xsl b/writerfilter/source/ooxml/dummyannotate.xsl index 52a960e73a28..029fd6aef569 100644 --- a/writerfilter/source/ooxml/dummyannotate.xsl +++ b/writerfilter/source/ooxml/dummyannotate.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: dummyannotate.xsl,v $ - - $Revision: 1.10 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> 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 86% rename from writerfilter/source/ooxml/values.xsl rename to writerfilter/source/ooxml/factory.xsl index 414bd89aa0af..544c150021c8 100644 --- a/writerfilter/source/ooxml/values.xsl +++ b/writerfilter/source/ooxml/factory.xsl @@ -7,7 +7,7 @@ OpenOffice.org - a multi-platform office productivity suite - $RCSfile: values.xsl,v $ + $RCSfile: fastresources_wml.xsl,v $ $Revision: 1.3 $ @@ -65,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-chartDrawing.xsl b/writerfilter/source/ooxml/factory_ns.xsl similarity index 53% rename from writerfilter/source/ooxml/fastresources_dml-chartDrawing.xsl rename to writerfilter/source/ooxml/factory_ns.xsl index 08b525bc3c6a..44b5c824859f 100644 --- a/writerfilter/source/ooxml/fastresources_dml-chartDrawing.xsl +++ b/writerfilter/source/ooxml/factory_ns.xsl @@ -7,7 +7,7 @@ OpenOffice.org - a multi-platform office productivity suite - $RCSfile: fastresources_dml-chartDrawing.xsl,v $ + $RCSfile: fastresources_wml.xsl,v $ $Revision: 1.3 $ @@ -65,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_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" +#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-chartDrawing - + + + /// @endcond }} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_CHARTDRAWING_HXX - +#endif // + + + - - + \ No newline at end of file diff --git a/writerfilter/source/ooxml/fastresources_wml.xsl b/writerfilter/source/ooxml/factory_values.xsl similarity index 78% rename from writerfilter/source/ooxml/fastresources_wml.xsl rename to writerfilter/source/ooxml/factory_values.xsl index 4bb5528f3bc4..4960f58e6b67 100644 --- a/writerfilter/source/ooxml/fastresources_wml.xsl +++ b/writerfilter/source/ooxml/factory_values.xsl @@ -65,38 +65,36 @@ - + - - + + -#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 +extern rtl::OUString - - wml + + - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_WML_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_dml-stylesheet.xsl b/writerfilter/source/ooxml/factoryimpl_values.xsl similarity index 77% rename from writerfilter/source/ooxml/fastresources_dml-stylesheet.xsl rename to writerfilter/source/ooxml/factoryimpl_values.xsl index c75f65687a50..465923d41769 100644 --- a/writerfilter/source/ooxml/fastresources_dml-stylesheet.xsl +++ b/writerfilter/source/ooxml/factoryimpl_values.xsl @@ -7,7 +7,7 @@ OpenOffice.org - a multi-platform office productivity suite - $RCSfile: fastresources_dml-stylesheet.xsl,v $ + $RCSfile: fastresources_wml.xsl,v $ $Revision: 1.3 $ @@ -65,38 +65,34 @@ - + - - + + -#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 +rtl::OUString + + + +(RTL_CONSTASCII_USTRINGPARAM("")); + + +rtl::OUString + + + +(RTL_CONSTASCII_USTRINGPARAM(" + +")); + - + + +#include "OOXMLFactory_values.hxx" + + + diff --git a/writerfilter/source/ooxml/fastresources_dml-shape3DStyles.xsl b/writerfilter/source/ooxml/factoryinc.xsl similarity index 77% rename from writerfilter/source/ooxml/fastresources_dml-shape3DStyles.xsl rename to writerfilter/source/ooxml/factoryinc.xsl index 38ac7c343ced..aa54a5c297ca 100644 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DStyles.xsl +++ b/writerfilter/source/ooxml/factoryinc.xsl @@ -7,7 +7,7 @@ OpenOffice.org - a multi-platform office productivity suite - $RCSfile: fastresources_dml-shape3DStyles.xsl,v $ + $RCSfile: fastresources_wml.xsl,v $ $Revision: 1.3 $ @@ -65,38 +65,48 @@ - + + + + + + +extern const Id + +; + + + + + + + +const Id + + = + + << 16; + + - -#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" +#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-shape3DStyles - + + /// @endcond }} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSTYLES_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 7e537d1881f4..000000000000 --- a/writerfilter/source/ooxml/fastresources.xsl +++ /dev/null @@ -1,120 +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_.xsl b/writerfilter/source/ooxml/fastresources_.xsl deleted file mode 100644 index 5d24a01fd240..000000000000 --- a/writerfilter/source/ooxml/fastresources_.xsl +++ /dev/null @@ -1,103 +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; -using namespace doctok; - -/// @cond GENERATED - - - wml - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_WML_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-baseStylesheet.xsl b/writerfilter/source/ooxml/fastresources_dml-baseStylesheet.xsl deleted file mode 100644 index 71b42789d4d0..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-baseStylesheet.xsl +++ /dev/null @@ -1,102 +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 7baa6f375953..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-baseTypes.xsl +++ /dev/null @@ -1,102 +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 65ad69879937..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-documentProperties.xsl +++ /dev/null @@ -1,102 +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 4484a64e96c5..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-graphicalObject.xsl +++ /dev/null @@ -1,102 +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-shape3DCamera.xsl b/writerfilter/source/ooxml/fastresources_dml-shape3DCamera.xsl deleted file mode 100644 index 4aebb13ae4dc..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DCamera.xsl +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - -#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" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shape3DCamera - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DCAMERA_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shape3DLighting.xsl b/writerfilter/source/ooxml/fastresources_dml-shape3DLighting.xsl deleted file mode 100644 index 9e09e2bcdcca..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DLighting.xsl +++ /dev/null @@ -1,102 +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-shape3DScene.xsl b/writerfilter/source/ooxml/fastresources_dml-shape3DScene.xsl deleted file mode 100644 index 5883356adad1..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shape3DScene.xsl +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - -#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" - -namespace writerfilter { -namespace ooxml { -using namespace ::std; -using namespace ::com::sun::star; - -/// @cond GENERATED - - - dml-shape3DScene - - -/// @endcond -}} -#endif //INCLUDED_OOXML_FASTRESOURCES_DML_SHAPE3DSCENE_HXX - - - - diff --git a/writerfilter/source/ooxml/fastresources_dml-shapeEffects.xsl b/writerfilter/source/ooxml/fastresources_dml-shapeEffects.xsl deleted file mode 100644 index 990cd56e86f9..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeEffects.xsl +++ /dev/null @@ -1,102 +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 cacdc21893b8..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeGeometry.xsl +++ /dev/null @@ -1,102 +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 5758a4778635..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeLineProperties.xsl +++ /dev/null @@ -1,102 +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 ab57edb39de3..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-shapeProperties.xsl +++ /dev/null @@ -1,102 +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 61d0cf55131f..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-styleDefaults.xsl +++ /dev/null @@ -1,102 +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-textCharacter.xsl b/writerfilter/source/ooxml/fastresources_dml-textCharacter.xsl deleted file mode 100644 index ef187284fd18..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-textCharacter.xsl +++ /dev/null @@ -1,102 +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 469bb7c54b4f..000000000000 --- a/writerfilter/source/ooxml/fastresources_dml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,102 +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 9c81393d342a..000000000000 --- a/writerfilter/source/ooxml/fastresources_shared-math.xsl +++ /dev/null @@ -1,102 +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 3ea854603820..000000000000 --- a/writerfilter/source/ooxml/fastresources_shared-relationshipReference.xsl +++ /dev/null @@ -1,102 +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 d41c5911c9a6..000000000000 --- a/writerfilter/source/ooxml/fastresources_sml-customXmlMappings.xsl +++ /dev/null @@ -1,102 +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 756d51ee6bac..000000000000 --- a/writerfilter/source/ooxml/fastresources_vml-main.xsl +++ /dev/null @@ -1,102 +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 3022e3792cfc..000000000000 --- a/writerfilter/source/ooxml/fastresources_vml-officeDrawing.xsl +++ /dev/null @@ -1,102 +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 7d7495f51e29..000000000000 --- a/writerfilter/source/ooxml/fastresources_vml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,102 +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/fastresourcesimpl.xsl b/writerfilter/source/ooxml/fastresourcesimpl.xsl deleted file mode 100644 index 7b5e6429a032..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl.xsl +++ /dev/null @@ -1,99 +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 a25c6d640002..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-baseStylesheet.xsl +++ /dev/null @@ -1,97 +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 cf671edf0023..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-baseTypes.xsl +++ /dev/null @@ -1,97 +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 8b4d3ff3eb59..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-chartDrawing.xsl +++ /dev/null @@ -1,97 +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 fba716a8ee5e..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-documentProperties.xsl +++ /dev/null @@ -1,97 +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 517f1e7a1071..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-graphicalObject.xsl +++ /dev/null @@ -1,97 +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 85bc0745dbfd..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DCamera.xsl +++ /dev/null @@ -1,97 +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 ac65d2e71064..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DLighting.xsl +++ /dev/null @@ -1,97 +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 c52d02df0064..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DScene.xsl +++ /dev/null @@ -1,97 +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 e508b8fe6a4c..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shape3DStyles.xsl +++ /dev/null @@ -1,97 +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 e8e1bdb83fe1..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeEffects.xsl +++ /dev/null @@ -1,97 +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 a7d2b4c695f0..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeGeometry.xsl +++ /dev/null @@ -1,97 +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 6b0b1c6ffcd7..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeLineProperties.xsl +++ /dev/null @@ -1,97 +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-shapeProperties.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl index ca6f6530ed52..9904907317cc 100644 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl +++ b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: fastresourcesimpl_dml-shapeProperties.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-styleDefaults.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-styleDefaults.xsl deleted file mode 100644 index a67dfe448761..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-styleDefaults.xsl +++ /dev/null @@ -1,97 +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 f49380d2a9db..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-stylesheet.xsl +++ /dev/null @@ -1,97 +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 045b7ea3816e..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-textCharacter.xsl +++ /dev/null @@ -1,97 +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 4ea6dd6be5d0..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,98 +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 c14762ddf27b..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_shared-math.xsl +++ /dev/null @@ -1,97 +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 16040a39f3c2..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_shared-relationshipReference.xsl +++ /dev/null @@ -1,97 +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 5d27f167ee6e..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_sml-customXmlMappings.xsl +++ /dev/null @@ -1,97 +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 581cf53e1159..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_vml-main.xsl +++ /dev/null @@ -1,98 +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 69d2f1ffc1fc..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_vml-officeDrawing.xsl +++ /dev/null @@ -1,98 +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 2638ce409330..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_vml-wordprocessingDrawing.xsl +++ /dev/null @@ -1,98 +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 b1052f7d8080..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_wml.xsl +++ /dev/null @@ -1,98 +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 7bc54f7361e7..4014df0eec91 100644 --- a/writerfilter/source/ooxml/fasttokens.xsl +++ b/writerfilter/source/ooxml/fasttokens.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: fasttokens.xsl,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -65,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 bb89590c9f47..000000000000 --- a/writerfilter/source/ooxml/fasttokensimpl.xsl +++ /dev/null @@ -1,81 +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 7b44f4403952..d14db0486b5d 100644 --- a/writerfilter/source/ooxml/gperffasttokenhandler.xsl +++ b/writerfilter/source/ooxml/gperffasttokenhandler.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: gperffasttokenhandler.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -67,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 e154a29b01c0..c6a40b4cc5d1 100644 --- a/writerfilter/source/ooxml/makefile.mk +++ b/writerfilter/source/ooxml/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.17 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -72,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 \ @@ -89,7 +87,6 @@ SLOFILES= \ $(SLO)$/OOXMLFastContextHandler.obj \ $(SLO)$/OOXMLFastTokenHandler.obj - SHL1TARGET=$(TARGET) .IF "$(GUI)"=="UNX" || "$(GUI)"=="MAC" @@ -131,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) @@ -189,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 @@ - @@ -38,7 +34,7 @@ xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes = "xalan" xml:indent="true"> - + + + + + + String + + + Boolean + + + Integer + + + String + + + Integer + + + Float + + + Hex + + + Integer + + + Integer + + + Integer + + + String + + + Integer + + + Integer + + + Integer + + + Unknown + + + + + + + + + + + + + + + + + + + + + Value + yes + + + + + Boolean + + + String + + + + + + + + + + + + ooxml: + + _ + + + + setValue + + + + + + setDefault + + Value + + + + + + + @@ -101,10 +207,8 @@ - - - StringValue - + + diff --git a/writerfilter/source/ooxml/modelpreprocess.xsl b/writerfilter/source/ooxml/modelpreprocess.xsl index 90376fc08903..0b898e63f933 100644 --- a/writerfilter/source/ooxml/modelpreprocess.xsl +++ b/writerfilter/source/ooxml/modelpreprocess.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: modelpreprocess.xsl,v $ - - $Revision: 1.7 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -64,8 +60,6 @@ xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default"> - - @@ -104,7 +98,7 @@ - + @@ -114,7 +108,7 @@ - + @@ -144,6 +138,9 @@ + + FAST_TOKENS_END + diff --git a/writerfilter/source/ooxml/namespaceids.xsl b/writerfilter/source/ooxml/namespaceids.xsl index cf47ad6e0d10..45828761da0c 100644 --- a/writerfilter/source/ooxml/namespaceids.xsl +++ b/writerfilter/source/ooxml/namespaceids.xsl @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: namespaceids.xsl,v $ - - $Revision: 1.2 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> - + + + + + +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/ooxmlLoggers.hxx b/writerfilter/source/ooxml/ooxmlLoggers.hxx index c7deae030ae1..b58a41bdabcd 100644 --- a/writerfilter/source/ooxml/ooxmlLoggers.hxx +++ b/writerfilter/source/ooxml/ooxmlLoggers.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * 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 diff --git a/writerfilter/source/ooxml/qnametostr.xsl b/writerfilter/source/ooxml/qnametostr.xsl index 9327926b3c19..1c0a706df56d 100644 --- a/writerfilter/source/ooxml/qnametostr.xsl +++ b/writerfilter/source/ooxml/qnametostr.xsl @@ -3,14 +3,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: qnametostr.xsl,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -67,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 d89cf53cfbf9..23ee6ffaad60 100644 --- a/writerfilter/source/ooxml/resourceids.xsl +++ b/writerfilter/source/ooxml/resourceids.xsl @@ -4,14 +4,10 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: resourceids.xsl,v $ - - $Revision: 1.5 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + ************************************************************************/ --> @@ -68,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 7296cbd34154..000000000000 --- a/writerfilter/source/ooxml/resourcestools.xsl +++ /dev/null @@ -1,2342 +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 c4b40b71fd2d..000000000000 --- a/writerfilter/source/ooxml/valuesimpl.xsl +++ /dev/null @@ -1,89 +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 0afbc1986cff..1d9b23623e56 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TagLogger.cxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -45,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()) @@ -191,6 +202,7 @@ namespace writerfilter { XMLTag::Pointer_t pTag(new XMLTag("root")); mTags.push(pTag); + mpRoot = pTag; } void TagLogger::element(const string & name) @@ -213,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) @@ -233,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() @@ -255,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) @@ -273,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/WW8Analyzer.cxx b/writerfilter/source/resourcemodel/WW8Analyzer.cxx index 15a8470bac8b..75691b5f1483 100644 --- a/writerfilter/source/resourcemodel/WW8Analyzer.cxx +++ b/writerfilter/source/resourcemodel/WW8Analyzer.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Analyzer.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/resourcemodel/WW8Analyzer.hxx b/writerfilter/source/resourcemodel/WW8Analyzer.hxx index 339b7adeab61..a2fc9e4d4b3d 100644 --- a/writerfilter/source/resourcemodel/WW8Analyzer.hxx +++ b/writerfilter/source/resourcemodel/WW8Analyzer.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WW8Analyzer.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/resourcemodel/analyzerheader b/writerfilter/source/resourcemodel/analyzerheader index 15fc71c50ad2..1b4e2674ffab 100644 --- a/writerfilter/source/resourcemodel/analyzerheader +++ b/writerfilter/source/resourcemodel/analyzerheader @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: analyzerheader,v $ - * - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/resourcemodel/genqnametostr b/writerfilter/source/resourcemodel/genqnametostr index f38aeb886511..12bad07b9b85 100755 --- a/writerfilter/source/resourcemodel/genqnametostr +++ b/writerfilter/source/resourcemodel/genqnametostr @@ -3,14 +3,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: genqnametostr,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/resourcemodel/makefile.mk b/writerfilter/source/resourcemodel/makefile.mk index b85443266320..f3869f30611b 100644 --- a/writerfilter/source/resourcemodel/makefile.mk +++ b/writerfilter/source/resourcemodel/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.13 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -58,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" @@ -105,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 @@ -117,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 @@ -128,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) \ @@ -139,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) $< > $@ @@ -164,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/qnametostrheader b/writerfilter/source/resourcemodel/qnametostrheader index fa497bd996d8..6cbd0b3fec10 100644 --- a/writerfilter/source/resourcemodel/qnametostrheader +++ b/writerfilter/source/resourcemodel/qnametostrheader @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: qnametostrheader,v $ - * - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx index 0bfa9845ffe8..9b45834c5ce3 100644 --- a/writerfilter/source/resourcemodel/resourcemodel.cxx +++ b/writerfilter/source/resourcemodel/resourcemodel.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourcemodel.cxx,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/resourcemodel/resourcemodel.hxx b/writerfilter/source/resourcemodel/resourcemodel.hxx index 314cc4a83c8f..b316f4c912f9 100644 --- a/writerfilter/source/resourcemodel/resourcemodel.hxx +++ b/writerfilter/source/resourcemodel/resourcemodel.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: resourcemodel.hxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify 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/sprmcodetostrheader b/writerfilter/source/resourcemodel/sprmcodetostrheader index aeb7efdcff27..ff0663e30bde 100644 --- a/writerfilter/source/resourcemodel/sprmcodetostrheader +++ b/writerfilter/source/resourcemodel/sprmcodetostrheader @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: sprmcodetostrheader,v $ - * - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/resourcemodel/util.cxx b/writerfilter/source/resourcemodel/util.cxx index 00c25be41c42..47d325654d5b 100644 --- a/writerfilter/source/resourcemodel/util.cxx +++ b/writerfilter/source/resourcemodel/util.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: util.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -40,6 +37,7 @@ #include #include #include +#include namespace writerfilter { @@ -400,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/source/rtftok/FlexLexer.h b/writerfilter/source/rtftok/FlexLexer.h index 471f138604ea..309cd30ffe1a 100644 --- a/writerfilter/source/rtftok/FlexLexer.h +++ b/writerfilter/source/rtftok/FlexLexer.h @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FlexLexer.h,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/rtftok/RTFParseException.cxx b/writerfilter/source/rtftok/RTFParseException.cxx index 32e91c6e9277..75212471e02f 100644 --- a/writerfilter/source/rtftok/RTFParseException.cxx +++ b/writerfilter/source/rtftok/RTFParseException.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RTFParseException.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #include writerfilter::rtftok::RTFParseException::RTFParseException(char * /*message*/) diff --git a/writerfilter/source/rtftok/RTFScanner.lex b/writerfilter/source/rtftok/RTFScanner.lex index 32fee7a14092..e5b4c63b397a 100644 --- a/writerfilter/source/rtftok/RTFScanner.lex +++ b/writerfilter/source/rtftok/RTFScanner.lex @@ -2,14 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RTFScanner.lex,v $ - * - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/source/rtftok/makefile.mk b/writerfilter/source/rtftok/makefile.mk index 9c27d2179b66..61399f051e15 100644 --- a/writerfilter/source/rtftok/makefile.mk +++ b/writerfilter/source/rtftok/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.6 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,9 +24,6 @@ # for a copy of the LGPLv3 License. # # ***********************************************************************/ -# -# Copyright 2005 Sun Microsystems, Inc. -# PRJ=..$/.. PRJNAME=writerfilter diff --git a/writerfilter/unocomponent/component.cxx b/writerfilter/unocomponent/component.cxx index 677d4e10a1a3..327e61e41a21 100644 --- a/writerfilter/unocomponent/component.cxx +++ b/writerfilter/unocomponent/component.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: component.cxx,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #ifndef _CPPUHELPTER_FACTORY_ #include #endif diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx index a65030f00407..9ff3253a161d 100644 --- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx +++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocTokAnalyzeService.cxx,v $ - * $Revision: 1.12 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #include "DocTokAnalyzeService.hxx" #include #include diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.hxx b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.hxx index 653bb877a97f..5aac9bfba90b 100644 --- a/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.hxx +++ b/writerfilter/unocomponent/debugservices/doctok/DocTokAnalyzeService.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocTokAnalyzeService.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. -*/ - #ifndef INCLUDED_DOCTOK_ANALYZESERVICE_HXX #define INCLUDED_DOCTOK_ANALYZESERVICE_HXX diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.cxx b/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.cxx index b2cbcd3982f1..02a7eddd7a33 100644 --- a/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.cxx +++ b/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocTokTestService.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #include "DocTokTestService.hxx" #include #include diff --git a/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.hxx b/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.hxx index 23969f637c0f..4fbcfc5b60b6 100644 --- a/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.hxx +++ b/writerfilter/unocomponent/debugservices/doctok/DocTokTestService.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocTokTestService.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. -*/ - #ifndef INCLUDED_DOCTOK_SCANNERTESTSERVICE_HXX #define INCLUDED_DOCTOK_SCANNERTESTSERVICE_HXX diff --git a/writerfilter/unocomponent/debugservices/doctok/makefile.mk b/writerfilter/unocomponent/debugservices/doctok/makefile.mk index dc2554a603e2..989be1baa3de 100644 --- a/writerfilter/unocomponent/debugservices/doctok/makefile.mk +++ b/writerfilter/unocomponent/debugservices/doctok/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx index 6d0fbedbb9f7..19f7855acb26 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx +++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLAnalyzeService.cxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #include #include "OOXMLAnalyzeService.hxx" diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.hxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.hxx index dda27e6e7911..6acacbac871a 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.hxx +++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLAnalyzeService.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLAnalyzeService.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. -*/ - #ifndef INCLUDED_OOXML_ANALYZE_SERVICE_HXX #define INCLUDED_OOXML_ANALYZE_SERVICE_HXX diff --git a/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx index efe03491db7d..7a3f80ea22d9 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx +++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLTestService.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #include #include #include @@ -71,6 +64,7 @@ #include #include #include +#include #include @@ -98,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); @@ -143,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/unocomponent/debugservices/ooxml/OOXMLTestService.hxx b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.hxx index 880a76668e58..10bbb2a569a4 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.hxx +++ b/writerfilter/unocomponent/debugservices/ooxml/OOXMLTestService.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OOXMLTestService.hxx,v $ - * $Revision: 1.2 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. -*/ - #ifndef INCLUDED_OOXML_SCANNERTESTSERVICE_HXX #define INCLUDED_OOXML_SCANNERTESTSERVICE_HXX diff --git a/writerfilter/unocomponent/debugservices/ooxml/makefile.mk b/writerfilter/unocomponent/debugservices/ooxml/makefile.mk index 3ff48b3ae2c2..25835aede106 100644 --- a/writerfilter/unocomponent/debugservices/ooxml/makefile.mk +++ b/writerfilter/unocomponent/debugservices/ooxml/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx index 5c63e4deb115..1b02fab37dd6 100644 --- a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx +++ b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ScannerTestService.cxx,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #include "ScannerTestService.hxx" #include #include diff --git a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.hxx b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.hxx index f6e5b0113bce..9577a4c81553 100644 --- a/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.hxx +++ b/writerfilter/unocomponent/debugservices/rtftok/ScannerTestService.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ScannerTestService.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. -*/ - #ifndef INCLUDED_RTFTOK_SCANNERTESTSERVICE_HXX #define INCLUDED_RTFTOK_SCANNERTESTSERVICE_HXX diff --git a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx index 46935c9b536e..a4a845959afe 100644 --- a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx +++ b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLScanner.cxx,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. - */ - #include "XMLScanner.hxx" #include #include diff --git a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.hxx b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.hxx index 2136472bf366..d489b7400f2d 100644 --- a/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.hxx +++ b/writerfilter/unocomponent/debugservices/rtftok/XMLScanner.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMLScanner.hxx,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,10 +25,6 @@ * ************************************************************************/ -/** - Copyright 2005 Sun Microsystems, Inc. -*/ - #ifndef INCLUDED_RTFTOK_XMLSCANNER_HXX #define INCLUDED_RTFTOK_XMLSCANNER_HXX diff --git a/writerfilter/unocomponent/debugservices/rtftok/makefile.mk b/writerfilter/unocomponent/debugservices/rtftok/makefile.mk index c5edb808a898..66c54a8707cd 100644 --- a/writerfilter/unocomponent/debugservices/rtftok/makefile.mk +++ b/writerfilter/unocomponent/debugservices/rtftok/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/writerfilter/unocomponent/makefile.mk b/writerfilter/unocomponent/makefile.mk index 45dc37bb2540..a01d391e88fb 100644 --- a/writerfilter/unocomponent/makefile.mk +++ b/writerfilter/unocomponent/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.10 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify 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 4e99764c688f..f5981222743c 100644 --- a/writerfilter/util/makefile.mk +++ b/writerfilter/util/makefile.mk @@ -1,15 +1,11 @@ #************************************************************************ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2008 by Sun Microsystems, Inc. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.8 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify @@ -70,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: - *; -}; diff --git a/xmerge/build.xml b/xmerge/build.xml index ea99053d6dd7..5878c1acf0b9 100644 --- a/xmerge/build.xml +++ b/xmerge/build.xml @@ -2,14 +2,10 @@ org.openoffice.xmerge.converter.palm package diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java b/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java index 4c0ab0ffaeaf..36397691b011 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PalmDB.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java b/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java index d26b2d5ef7e9..fdf2c69a37aa 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PalmDocument.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java index 0eed10bd3417..b67ff036761b 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbDecoder.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java index 5a1d81a475b9..2cd084786878 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbEncoder.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java index 40a54730a320..7311ce956aba 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbHeader.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java index 69cae6d69e58..f911b583589a 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbUtil.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java b/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java index 41b2a289a8c5..aa2101d6159e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Record.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/build.xml b/xmerge/java/org/openoffice/xmerge/converter/palm/build.xml index 21e3905c1445..b2f9a9946a9a 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/palm/makefile.mk index 23caa32f98a3..4f7eb3026a72 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/package.html b/xmerge/java/org/openoffice/xmerge/converter/palm/package.html index 89fbd4580c9c..5f8325d36301 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/bin/verify_sane.pl b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/bin/verify_sane.pl index e0f5e4605cc3..6b1f598d6444 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/bin/verify_sane.pl +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/bin/verify_sane.pl @@ -3,14 +3,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: verify_sane.pl,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_comparator.pl b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_comparator.pl index 67ab1d43dbcd..5e9838c103d1 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_comparator.pl +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_comparator.pl @@ -3,14 +3,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: qa_comparator.pl,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_test_driver.pl b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_test_driver.pl index f3ca7195b975..d8eea81b5388 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_test_driver.pl +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/qa_test_driver.pl @@ -3,14 +3,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: qa_test_driver.pl,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/run-convtest b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/run-convtest index 8b97b3ec71d3..0931ca77539d 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/run-convtest +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/bin/run-convtest @@ -3,14 +3,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: run-convtest,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd index c1d585a7b0a9..f7bb8eb321bb 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: Blocklist.dtd,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod index 31bf7a464c77..11bc8a8e40b7 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: datastyl.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod index d200a39fe7f9..aa0a25822a45 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: drawing.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod index 1cdd7bf50785..e4d640d012c8 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: dtypes.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/form.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/form.mod index 7c39fe5fd43b..77a91206c451 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/form.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/form.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: form.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod index 3dd3c4177c82..b7f6b64140a6 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: nmspace.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd index ef73319720b1..9bcd37edf325 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.dtd,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.mod index ed543b22a520..f8e3775fa6da 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/office.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod index 5ba8f38f3ba6..bb9224237fa8 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: settings.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/style.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/style.mod index 5c5b3dca3c4b..21a3d9d17dd1 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/style.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/style.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: style.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/table.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/table.mod index f0371a6023ae..6d9f3cdb2a8f 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/table.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/table.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: table.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/text.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/text.mod index fd90aff575cd..792b0fdde55e 100755 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/text.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa-wrapper/results/baseline/xml-base/text.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: text.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/datastyl.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/datastyl.mod index 31bf7a464c77..11bc8a8e40b7 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/datastyl.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/datastyl.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: datastyl.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/drawing.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/drawing.mod index d200a39fe7f9..aa0a25822a45 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/drawing.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/drawing.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: drawing.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/dtypes.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/dtypes.mod index 1cdd7bf50785..e4d640d012c8 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/dtypes.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/dtypes.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: dtypes.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/form.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/form.mod index 7c39fe5fd43b..77a91206c451 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/form.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/form.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: form.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/nmspace.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/nmspace.mod index 3dd3c4177c82..b7f6b64140a6 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/nmspace.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/nmspace.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: nmspace.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.dtd b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.dtd index ef73319720b1..9bcd37edf325 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.dtd +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.dtd @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.dtd,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.mod index ed543b22a520..f8e3775fa6da 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/office.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/settings.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/settings.mod index 5ba8f38f3ba6..bb9224237fa8 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/settings.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/settings.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: settings.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/style.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/style.mod index 5c5b3dca3c4b..21a3d9d17dd1 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/style.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/style.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: style.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/table.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/table.mod index f0371a6023ae..6d9f3cdb2a8f 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/table.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/table.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: table.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/text.mod b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/text.mod index fd90aff575cd..792b0fdde55e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/text.mod +++ b/xmerge/java/org/openoffice/xmerge/converter/palm/palmtests/qa/comparator/dtd/text.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: text.mod,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java index 3643654ca906..0155224a5740 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BookSettings.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java index 5d4eae4da4b4..4882d7e09d80 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CellStyle.java,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java index a179633de71c..c8511ed81ef3 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColumnRowInfo.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java index 2b9c169ff352..bc730d6b880b 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColumnStyle.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java index 3ae4f16acfcf..eb4e03216fca 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java index 8e58ea0dd968..7f6dee011253 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Format.java,v $ - * $Revision: 1.13 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java index 65f0979c4ed2..99aa3dd625ec 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NameDefinition.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java index 71839e238d43..aecb3cec3001 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RowStyle.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java index 765da090611c..08339773be30 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SheetSettings.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java index 5a6408ba6694..a0ec6cc305bd 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SpreadsheetDecoder.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java index 81e6914b1bfe..7d0d1f615849 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SpreadsheetEncoder.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java index 793fe47bfc23..7c9fff61a2e6 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java index 8a76b4260fc5..d435479842c6 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java index 01e9987172b4..2415c9385d62 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentDeserializer.java,v $ - * $Revision: 1.14 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java index bf0516c5345c..9e0d30831d24 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentSerializer.java,v $ - * $Revision: 1.22 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java index 5ad490f332dc..4bdaad8e009c 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcPluginFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/build.xml index d8219c1f46a5..5805a5253993 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.9 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/makefile.mk index 1c2e06d1ef57..abc309279f0f 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java index 54ce2e236a4d..07b0c751b93d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java index c14178ee96e1..07530013ea84 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcConstants.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java index 77bfe75539b8..140dfde1881b 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcDataString.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java index 1df98ae65455..a165a25f9fbf 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcDecoder.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java index 60f68474554d..70014a8af93e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcEncoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java index a3b1d53abaff..82f39a8e60aa 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java index 1161b5522ca1..db3bcdeb91c5 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentDeserializerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java index 69b584fadf09..1c1c8fe2e6bd 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentSerializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/build.xml index c1898c2fa3d5..6a4092250009 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/converter.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/converter.xml index 263021fa324d..39b28ffbf944 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/converter.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/converter.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/makefile.mk index 78d4211e162d..8d6716d32b74 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html index 191ed77ec344..034af32e581b 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html index 258d0158af1d..bfa0d5a53dbc 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/ConverterCapabilitiesImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/ConverterCapabilitiesImpl.java index 2e51ee685e21..c8de9e99b5da 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/ConverterCapabilitiesImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PluginFactoryImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PluginFactoryImpl.java index 389b0169e49b..e7b08e097614 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PluginFactoryImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelConstants.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelConstants.java index 22382e0faf8c..1e2abbf937cb 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelConstants.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PocketExcelConstants.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java index c5f263766da2..3e23a87aa20f 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PocketExcelDecoder.java,v $ - * $Revision: 1.23 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java index 44e9de76394d..062260aa3664 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/PocketExcelEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PocketExcelEncoder.java,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java index 5bca66b92b92..777506515629 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentDeserializerImpl.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java index ff3de98c3478..df2d9c6befa1 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/SxcDocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentSerializerImpl.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/build.xml index 02c1e44a9ea7..d0b036da0454 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.5 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/converter.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/converter.xml index 1d6627afe49c..85efdab4f83d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/converter.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/converter.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/makefile.mk index c8d22159c375..9e5308e04a11 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/package.html index c7da1abfbc56..b13666af6920 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java index 685d6153c621..e55778c8e04f 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BIFFRecord.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java index a7b328f6cf8a..fadaea5e30d7 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BeginningOfFile.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java index 3bd70f0c7a91..5844f4a6b57b 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BlankCell.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java index 6fca4ddd57d2..b9226885be2d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BoolErrCell.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java index db34aa600fb9..743853013ac6 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BoundSheet.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java index 2bb22b35666f..3c4d875a923a 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CellValue.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java index 55184582ebdb..34c2dccdfb10 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CodePage.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java index d3e61e1b4fec..fc2e9c5f7fbb 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColInfo.java,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java index 12a451334386..35650f0278f3 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DefColWidth.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java index d924f339fe37..7e933d9b8978 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DefRowHeight.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java index 3fad2410162e..38d47b8adbc5 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DefinedName.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java index 77a4e97835cf..fbb216caad08 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Eof.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java index 254c2f2bddf4..dc4780de9efe 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ExtendedFormat.java,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java index db80eccb9cb8..9399b22fc6ad 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FloatNumber.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java index 50ff9e5e64d7..559853206593 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FontDescription.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java index b2f74f1f6be9..97bea77f0811 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Formula.java,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java index aafe992cad47..b398e1bf519c 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: LabelCell.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java index 0735b401a6b8..e226ebad0203 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NumberFormat.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java index 4155a658ae40..7af0a11e800e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Pane.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java index 5ffb49da45d5..5e5ce6ce74df 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Row.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java index bafafc9c371f..dac0c2986a14 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Selection.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java index 772affb2e817..540d1d8e6ad1 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: StringValue.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java index 2446e86089ed..3acfd9ec2011 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: UnsupportedFormulaException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java index 24b8aa92f580..c1c1d6ba44c0 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Window1.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java index e587de7ea3b4..3595c1b47d37 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Window2.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java index d29efd8d9938..70068253f7cf 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Workbook.java,v $ - * $Revision: 1.17 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java index d0e4f829722a..722cc7ccd0fb 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Worksheet.java,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/build.xml index a30c348c84f3..f57eb799491c 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.6 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java index 49474e5de25f..aad14dae21b3 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaCompiler.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java index 2e4e773a5f27..1752d0e6336e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaHelper.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java index 2422a5297b96..ead9a974d23d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaParser.java,v $ - * $Revision: 1.11 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java index f961bcbf49a0..631244ad0d96 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaParsingException.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java index c8205b6d4754..b4f7dab3a681 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FunctionLookup.java,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java index e8a547d1b9d6..67f79c561234 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OperandLookup.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java index 0e376a6d0152..03d09f917a18 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OperatorLookup.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java index 41912b046e7c..e78234ca1adc 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ParseToken.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java index 265334f553f1..fbe24bb4fff2 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PrecedenceTable.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java index 9c9ba638b448..1399c57d2875 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SymbolLookup.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java index 4ec1884dae8b..bfd9933936f5 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Token.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java index b8b37be7772e..4fd90c6a234e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenConstants.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java index 3390463e3756..694e3b796710 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenDecoder.java,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java index d2002df2819a..23af0689d040 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenEncoder.java,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java index 427b56383dfc..23efd62cd2ce 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenFactory.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java index 6eeae73cb0b8..dcd2bf61a0c4 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: UnsupportedFunctionException.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/build.xml index 05865f52c740..fa3737f9dc63 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/makefile.mk index 47db7a258006..c549fec7ebeb 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html index 7e719f53bebe..649879a407f6 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html @@ -5,14 +5,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -29,7 +25,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> org.openoffice.xmerge.converter.xml.sxc.pexcel.records.formula package diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html index 79188bf45310..7d803d1feba8 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html @@ -5,14 +5,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -29,7 +25,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> org.openoffice.xmerge.converter.xml.sxc.pexcel.records package diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java index 4888357a6de2..839a63e8bec9 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxwDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java index 06af85d94431..23e2608c242e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxwPluginFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java index 852f8f6f4b49..671ae420bcfc 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java index 6f097636a9ba..86627c6d7ed3 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocConstants.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java index f8631cccc78e..9651e5b10b4d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocDecoder.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java index cd08b9921a17..90cf0e5cd1f1 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocEncoder.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java index a819f82c14c3..98022bcf47d9 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java index 50fcfee02178..23b236b41e6a 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java index 75edfbd78d7f..a2652df792b3 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java index 3f6f9e26cd50..d1de0b19a6ab 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/build.xml index 5b34dc29ad9d..b6efd3e2bec3 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/converter.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/converter.xml index 04ab76384dd0..7942295c004a 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/converter.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/converter.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/makefile.mk index efbf2869009b..5b3f3fea509d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html index 9d5d1bdc00cb..78cfe79bfbbf 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/build.xml index 4a1c7fba5dca..02936516e7c9 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/makefile.mk index 03db799f178c..c4953812ef58 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html index 47a7e940fc36..409f041fffb2 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java index bc57ccc776ea..4e4aaf164e7a 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java index 312762308df1..3e5f6e6827ff 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDescriptor.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java index 0378006661c1..373df77886f8 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java index ae087d65b6a2..c6a14ba2877d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java index 2a715a7871cd..2604e903c564 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java index 3dee1eeff3b5..c2249766b5e5 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Paragraph.java,v $ - * $Revision: 1.9 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java index d2a460037771..442cbf2f53dc 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ParagraphTextSegment.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java index 35e6b89a9ec6..d02c9eeddf53 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java index 03af731f2122..de67eeec31a7 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PocketWordConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java index 8d4ad63fa82a..9026d8866113 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PocketWordDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/build.xml index f12db13e755c..9253aa503359 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.6 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/converter.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/converter.xml index e9ee658d27f3..aaa0dcc32e0d 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/converter.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/converter.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html index 65454f24773c..ecc7d6105d83 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java index 5470025a934f..510f983e8248 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java index ef066386d4a4..546d3060eb9b 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DOCConstants.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java index 4c6c48822093..ad90541afbbb 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java index 09c2b998f5c1..c6dd88589fe5 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java index 207f38d263a3..edbf7f5b4370 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java index 56dd2a4fb53f..f8df638bd69f 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java index 77ba70f6ac2a..07e8ea97ea43 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WSDecoder.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java index 58df6112a8f4..476e34c72e1f 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WSEncoder.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java index 1df80a427594..778ff5d38f57 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Wse.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java index 8d36c5d8a9a8..e5af0337283b 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseColorTable.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java index 120dfb86a16f..d5e7a84fb6bf 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseFontTable.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java index 009f1a975b2f..52fffba259a8 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseHeader.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java index 8947aa7a1f47..91530174211f 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WsePara.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java index b1b6fa934e78..86626dd4d2c7 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseTextRun.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/build.xml index 5b48ae6ddc1e..aa889d4d3f2e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/makefile.mk index 6cfbb307ba85..c64e26894dac 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java index 0083899dce0e..7651767920fc 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textRecord.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java index d123c0a72b56..0c1af8d5a8ec 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: util.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java index f292bc78f40a..079437336f8e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java index 236afccd5646..08d294982537 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.8 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java index 042e4c37a377..a320080a43cb 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java index ec41df8d5945..b4b1650f97f6 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.10 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java index 636f3caa453a..d2b98819c87a 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GenericOfficeDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java index 12f9cbec4e79..cb3a9c507b82 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties index 434824138fc6..32f3771fc492 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: XsltPlugin.properties,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/build.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/build.xml index d39f31baaa31..43db663b2820 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/build.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.5 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/converter.xml b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/converter.xml index e374786b53ec..3baf857406ca 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/converter.xml +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/converter.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/DBFilter.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/DBFilter.java index 6d472e61e44c..eae4a03c5bc6 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/DBFilter.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/DBFilter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DBFilter.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/makefile.mk b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/makefile.mk index 6b695eced864..9f5a92570565 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbookfilter/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbooktosoffheadings.xsl b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbooktosoffheadings.xsl index 831cea906b57..7bb99da2f735 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbooktosoffheadings.xsl +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/docbooktosoffheadings.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: docbooktosoffheadings.xsl,v $ - - $Revision: 1.7 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/literallayout.java b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/literallayout.java index 0559a77418c5..c2dbc2396d94 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/literallayout.java +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/literallayout.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: literallayout.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_article.xsl b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_article.xsl index a3dd877706fb..649869eca225 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_article.xsl +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_article.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: sofftodocbookheadings_article.xsl,v $ - - $Revision: 1.6 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_chapter.xsl b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_chapter.xsl index 5b2cb54347d0..efb03f0a741c 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_chapter.xsl +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/docbook/sofftodocbookheadings_chapter.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: sofftodocbookheadings_chapter.xsl,v $ - - $Revision: 1.6 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/htmltosoff.xsl b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/htmltosoff.xsl index 3181681af6e9..baf160c1449e 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/htmltosoff.xsl +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/htmltosoff.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: htmltosoff.xsl,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/sofftohtml.xsl b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/sofftohtml.xsl index c51d998f548e..761a66a3f6e4 100644 --- a/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/sofftohtml.xsl +++ b/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/sofftohtml.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: sofftohtml.xsl,v $ - - $Revision: 1.5 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,6 +23,6 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> p.{ } p.{ font-weight :bold;font-style:italic; } td.{ font-weight :bold;font-style:italic; } font-weight :; font-style :; font-family :; font-size : ; text-decoration :underline; text-decoration:line-through; text-align :left text-align :center text-align :right
<td class=" "> </td>
<p class=" Table-Heading "> </p>
diff --git a/xmerge/java/org/openoffice/xmerge/makefile.mk b/xmerge/java/org/openoffice/xmerge/makefile.mk index 5e63e9a93883..79aa6109dce0 100644 --- a/xmerge/java/org/openoffice/xmerge/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java b/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java index 76ecf1eb3a2b..0d7cb7c75f28 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java +++ b/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DiffAlgorithm.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/Difference.java b/xmerge/java/org/openoffice/xmerge/merger/Difference.java index 27f1aac15e3d..4b84c66edb90 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/Difference.java +++ b/xmerge/java/org/openoffice/xmerge/merger/Difference.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Difference.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/Iterator.java b/xmerge/java/org/openoffice/xmerge/merger/Iterator.java index 4af80ed90a34..ccd8dca77e12 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/Iterator.java +++ b/xmerge/java/org/openoffice/xmerge/merger/Iterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Iterator.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java b/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java index c21aac35bd9c..3ee7ba7ad6c1 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java +++ b/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MergeAlgorithm.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java b/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java index 21b9c08719b3..1511d9827081 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java +++ b/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NodeMergeAlgorithm.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/build.xml b/xmerge/java/org/openoffice/xmerge/merger/build.xml index 76b79dc41374..cb5131faecb4 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/build.xml +++ b/xmerge/java/org/openoffice/xmerge/merger/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java b/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java index f39b818d9831..62431df5da3b 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CellNodeIterator.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java b/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java index 9a7b09a4da61..b54f0ee8a8da 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CharArrayLCSAlgorithm.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java b/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java index 0546c128e64b..ad7c3990f263 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CharacterParser.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java b/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java index 8f3f6f03636c..7cc7c60b0439 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IteratorLCSAlgorithm.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java b/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java index a3a24fe1c15b..aff0e44d5325 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IteratorRowCompare.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java b/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java index 49c6b3db3403..3799539e5c6d 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NodeIterator.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java b/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java index 4faaf8b657b6..e69a3714871a 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ObjectArrayIterator.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java b/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java index 8465fa1f7a0a..b3ad49016233 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ParaNodeIterator.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java b/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java index 0122bac87bc6..2f748ca8d41c 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RowIterator.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java b/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java index 71b1c668a998..6a0d8a6d946c 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TextNodeEntry.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java b/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java index f0e29fbe9b07..41274bd6074f 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TextNodeIterator.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/build.xml b/xmerge/java/org/openoffice/xmerge/merger/diff/build.xml index 5a1e450919a8..22ff4c74786e 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/build.xml +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/makefile.mk b/xmerge/java/org/openoffice/xmerge/merger/diff/makefile.mk index 490ac59ef76a..f4690cabb5d0 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/diff/package.html b/xmerge/java/org/openoffice/xmerge/merger/diff/package.html index 7ae7d3419fc2..48c850e2d2b0 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/diff/package.html +++ b/xmerge/java/org/openoffice/xmerge/merger/diff/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/merger/makefile.mk b/xmerge/java/org/openoffice/xmerge/merger/makefile.mk index 9b17e72ae2e8..10eaf50df249 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/merger/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java b/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java index 3864723d0427..e9334221f3b4 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CharacterBaseParagraphMerge.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java b/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java index e0765f8b88fa..4842ca433e04 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMerge.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java b/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java index 0683733eb00d..96bfa0c2b1d9 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PositionBaseRowMerge.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java b/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java index ad957552f424..a2aa154a7e3a 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SheetMerge.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java b/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java index a90a3a8a1fc3..7ec99af85324 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SheetUtil.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/build.xml b/xmerge/java/org/openoffice/xmerge/merger/merge/build.xml index 0ff5dae91a5f..d93c81805bc9 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/build.xml +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/makefile.mk b/xmerge/java/org/openoffice/xmerge/merger/merge/makefile.mk index 43bf6119cd51..5bb3dbecf955 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/merger/merge/package.html b/xmerge/java/org/openoffice/xmerge/merger/merge/package.html index cf9abdc7b8f6..183ef913f405 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/merge/package.html +++ b/xmerge/java/org/openoffice/xmerge/merger/merge/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/merger/package.html b/xmerge/java/org/openoffice/xmerge/merger/package.html index a565a37cbd83..49d5b54f59c8 100644 --- a/xmerge/java/org/openoffice/xmerge/merger/package.html +++ b/xmerge/java/org/openoffice/xmerge/merger/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/package.html b/xmerge/java/org/openoffice/xmerge/package.html index 5df455e1882b..d1a36fc1488a 100644 --- a/xmerge/java/org/openoffice/xmerge/package.html +++ b/xmerge/java/org/openoffice/xmerge/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java b/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java index 7a0f4c410b51..d5389372cdc0 100644 --- a/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java +++ b/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfoList.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties b/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties index 88392d16af9f..d8bf3483b95d 100644 --- a/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties +++ b/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: ConverterInfoList.properties,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/test/Driver.java b/xmerge/java/org/openoffice/xmerge/test/Driver.java index 709a6c4a2c95..446dabfa65f8 100644 --- a/xmerge/java/org/openoffice/xmerge/test/Driver.java +++ b/xmerge/java/org/openoffice/xmerge/test/Driver.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Driver.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/test/build.xml b/xmerge/java/org/openoffice/xmerge/test/build.xml index 1cffe0cfbfd9..7c3a9d9e8319 100644 --- a/xmerge/java/org/openoffice/xmerge/test/build.xml +++ b/xmerge/java/org/openoffice/xmerge/test/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/test/makefile.mk b/xmerge/java/org/openoffice/xmerge/test/makefile.mk index c97c4e170d8e..cbb251658697 100644 --- a/xmerge/java/org/openoffice/xmerge/test/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/test/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java b/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java index ed98b69610e9..9a1f42eeb3c8 100644 --- a/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java +++ b/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ActiveSyncDriver.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java b/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java index ffd18bc4e786..345a4e76ef6f 100644 --- a/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java +++ b/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColourConverter.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/Debug.java b/xmerge/java/org/openoffice/xmerge/util/Debug.java index 031233d8b5c7..dcd5b0c8e1b0 100644 --- a/xmerge/java/org/openoffice/xmerge/util/Debug.java +++ b/xmerge/java/org/openoffice/xmerge/util/Debug.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Debug.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/Debug.properties b/xmerge/java/org/openoffice/xmerge/util/Debug.properties index 3312df559afb..4be4427837a7 100644 --- a/xmerge/java/org/openoffice/xmerge/util/Debug.properties +++ b/xmerge/java/org/openoffice/xmerge/util/Debug.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: Debug.properties,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java b/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java index f88fb9e8c2e7..353bee82efdc 100644 --- a/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java +++ b/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: EndianConverter.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java b/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java index adcae4a4512b..41fa1ce6085b 100644 --- a/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java +++ b/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IntArrayList.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java b/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java index f33468653e7d..206581c0da61 100644 --- a/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java +++ b/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OfficeUtil.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/Resources.java b/xmerge/java/org/openoffice/xmerge/util/Resources.java index 9e140e1de71f..b94eb70e3605 100644 --- a/xmerge/java/org/openoffice/xmerge/util/Resources.java +++ b/xmerge/java/org/openoffice/xmerge/util/Resources.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Resources.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java b/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java index 776c34c6f856..c587ada48be1 100644 --- a/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java +++ b/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TwipsConverter.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java b/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java index 74539d16c1e3..1abdba9a95c3 100644 --- a/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java +++ b/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XmlUtil.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/build.xml b/xmerge/java/org/openoffice/xmerge/util/build.xml index 2f5e7a6b9737..d4c375799e15 100644 --- a/xmerge/java/org/openoffice/xmerge/util/build.xml +++ b/xmerge/java/org/openoffice/xmerge/util/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.8 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/makefile.mk b/xmerge/java/org/openoffice/xmerge/util/makefile.mk index ee3e4d43cae8..c2eb64b9ff3d 100644 --- a/xmerge/java/org/openoffice/xmerge/util/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/util/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/package.html b/xmerge/java/org/openoffice/xmerge/util/package.html index b439e752827f..e562149c82bc 100644 --- a/xmerge/java/org/openoffice/xmerge/util/package.html +++ b/xmerge/java/org/openoffice/xmerge/util/package.html @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java b/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java index d71bd82fd606..0d662294b4b7 100644 --- a/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java +++ b/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfo.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java b/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java index b03d12adbe56..7aff201a30e6 100644 --- a/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java +++ b/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfoMgr.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java b/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java index 77c3ed757447..4300f6f0a3bd 100644 --- a/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java +++ b/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfoReader.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java b/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java index 7c139caff463..c4fbfb856090 100644 --- a/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java +++ b/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RegistryException.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/registry/build.xml b/xmerge/java/org/openoffice/xmerge/util/registry/build.xml index da337bc8207c..e7bf0da9c93c 100644 --- a/xmerge/java/org/openoffice/xmerge/util/registry/build.xml +++ b/xmerge/java/org/openoffice/xmerge/util/registry/build.xml @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/util/registry/converter.dtd b/xmerge/java/org/openoffice/xmerge/util/registry/converter.dtd index 778dc6af1e0e..84e4ed34892c 100644 --- a/xmerge/java/org/openoffice/xmerge/util/registry/converter.dtd +++ b/xmerge/java/org/openoffice/xmerge/util/registry/converter.dtd @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.dtd,v $ - - $Revision: 1.3 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/java/org/openoffice/xmerge/util/resources.properties b/xmerge/java/org/openoffice/xmerge/util/resources.properties index 3f9e4cf84fe4..dd7938723e30 100644 --- a/xmerge/java/org/openoffice/xmerge/util/resources.properties +++ b/xmerge/java/org/openoffice/xmerge/util/resources.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: resources.properties,v $ -# -# $Revision: 1.3 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/FlatXml.cxx b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/FlatXml.cxx index 7deb5f00097d..3aa3c7be2ad5 100644 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/FlatXml.cxx +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/FlatXml.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FlatXml.cxx,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/makefile.mk b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/makefile.mk index a82480e67177..f93616bcf4e1 100644 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/cpp/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XFilterAdapter.idl b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XFilterAdapter.idl index 92ecbf086785..2fa9fd8269d4 100755 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XFilterAdapter.idl +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XFilterAdapter.idl @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XFilterAdapter.idl,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XInputStreamToInputStreamAdapter.java b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XInputStreamToInputStreamAdapter.java index 1eaecf4eaa42..a5b3c1ee18ea 100644 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XInputStreamToInputStreamAdapter.java +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XInputStreamToInputStreamAdapter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XInputStreamToInputStreamAdapter.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XOutputStreamToOutputStreamAdapter.java b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XOutputStreamToOutputStreamAdapter.java index 81f93c3d12ff..e1037432c8d0 100644 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XOutputStreamToOutputStreamAdapter.java +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/XOutputStreamToOutputStreamAdapter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XOutputStreamToOutputStreamAdapter.java,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/makefile.mk b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/makefile.mk index bd0afda3bbcc..91efa423d9db 100755 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/makefile.mk +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5.10.1 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.cxx b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.cxx index f3ab2b3f131d..71c9bcd04e4c 100755 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.cxx +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: streamwrap.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.hxx b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.hxx index e3d8f3b3ed86..d31721f3825f 100755 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.hxx +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/FlatXml/java/streamwrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: streamwrap.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/TestStream.java b/xmerge/java/org/openoffice/xmerge/xmergebridge/TestStream.java index c251cae1f9cc..9add577f45ef 100644 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/TestStream.java +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/TestStream.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TestStream.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/XMergeBridge.java b/xmerge/java/org/openoffice/xmerge/xmergebridge/XMergeBridge.java index 23ce5693c163..0163f497d9e2 100755 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/XMergeBridge.java +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/XMergeBridge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMergeBridge.java,v $ - * $Revision: 1.18 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.cxx b/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.cxx index f3ab2b3f131d..71c9bcd04e4c 100755 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.cxx +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.cxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: streamwrap.cxx,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.hxx b/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.hxx index e3d8f3b3ed86..d31721f3825f 100755 --- a/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.hxx +++ b/xmerge/java/org/openoffice/xmerge/xmergebridge/streamwrap.hxx @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: streamwrap.hxx,v $ - * $Revision: 1.3 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/activesync/makefile.mk b/xmerge/source/activesync/makefile.mk index 94c5cb79151e..18d904f5e158 100644 --- a/xmerge/source/activesync/makefile.mk +++ b/xmerge/source/activesync/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.5 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/build.xml b/xmerge/source/aportisdoc/build.xml index f45ae7af6e10..6e9d22b84b9a 100644 --- a/xmerge/source/aportisdoc/build.xml +++ b/xmerge/source/aportisdoc/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/converter.xml b/xmerge/source/aportisdoc/converter.xml index f5153f0ac253..3124e1e3876e 100644 --- a/xmerge/source/aportisdoc/converter.xml +++ b/xmerge/source/aportisdoc/converter.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java index e75242744c1a..733450bedad8 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java index a938b5d929de..f022250bca10 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java index a1e96b12124c..aea2f7cd1ac4 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocDecoder.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java index 18c9f2f4efb9..b1cb1cbe9905 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocEncoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java index 486e118c9128..2d29f8784dc5 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java index 051b56797d7c..8c8b3c9333b3 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java index f50a00a10c6e..dc1fb4c4a1a3 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java index 40fa7ab33f94..3a497cc0b5b7 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html index 48834909aaf1..ce4c4a28ae9f 100644 --- a/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html +++ b/xmerge/source/aportisdoc/java/org/openoffice/xmerge/converter/xml/sxw/aportisdoc/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/aportisdoc/makefile.mk b/xmerge/source/aportisdoc/makefile.mk index 67d763faa344..dad48f952b51 100644 --- a/xmerge/source/aportisdoc/makefile.mk +++ b/xmerge/source/aportisdoc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/bridge/build.xml b/xmerge/source/bridge/build.xml index 1785964c031b..ad0aa33d0f0f 100644 --- a/xmerge/source/bridge/build.xml +++ b/xmerge/source/bridge/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.5 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/bridge/java/XMergeBridge.java b/xmerge/source/bridge/java/XMergeBridge.java index 4be1fdc11617..38503d3b49ff 100644 --- a/xmerge/source/bridge/java/XMergeBridge.java +++ b/xmerge/source/bridge/java/XMergeBridge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XMergeBridge.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/bridge/makefile.mk b/xmerge/source/bridge/makefile.mk index b0dc37169a4b..77a39a568966 100644 --- a/xmerge/source/bridge/makefile.mk +++ b/xmerge/source/bridge/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/htmlsoff/build.xml b/xmerge/source/htmlsoff/build.xml index 859c9e31611a..90cbcbb4beae 100644 --- a/xmerge/source/htmlsoff/build.xml +++ b/xmerge/source/htmlsoff/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/htmlsoff/converter.xml b/xmerge/source/htmlsoff/converter.xml index ec4ba29a63f9..3038d5b70d73 100644 --- a/xmerge/source/htmlsoff/converter.xml +++ b/xmerge/source/htmlsoff/converter.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/htmlsoff/htmltosoff.xsl b/xmerge/source/htmlsoff/htmltosoff.xsl index 509849dd01ed..4a06a77f52aa 100644 --- a/xmerge/source/htmlsoff/htmltosoff.xsl +++ b/xmerge/source/htmlsoff/htmltosoff.xsl @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: htmltosoff.xsl,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/htmlsoff/sofftohtml.xsl b/xmerge/source/htmlsoff/sofftohtml.xsl index db2e38e66af7..b01c4691c71a 100644 --- a/xmerge/source/htmlsoff/sofftohtml.xsl +++ b/xmerge/source/htmlsoff/sofftohtml.xsl @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: sofftohtml.xsl,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/minicalc/build.xml b/xmerge/source/minicalc/build.xml index 9f124d09096d..1332fa05cd9a 100644 --- a/xmerge/source/minicalc/build.xml +++ b/xmerge/source/minicalc/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/converter.xml b/xmerge/source/minicalc/converter.xml index eee44992cc72..65d1fb774423 100644 --- a/xmerge/source/minicalc/converter.xml +++ b/xmerge/source/minicalc/converter.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java index 8b5a4e7d6091..a1dc67a443e0 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java index d62e6509d208..78d48a5e4ee9 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java index 684daebddc06..974e9d1b3079 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDataString.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcDataString.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java index f899088109ff..37768fa4fb02 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcDecoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java index 986d0b57f65c..14e256918886 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/MinicalcEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MinicalcEncoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java index f730865ee59e..037347d4c44c 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java index c5435f97ece1..61680e73f3a1 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentDeserializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java index 80e9a91abe32..25ad6dda73f4 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/SxcDocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentSerializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html index 5d6cfc49acd1..2adb11ed36d4 100644 --- a/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html +++ b/xmerge/source/minicalc/java/org/openoffice/xmerge/converter/xml/sxc/minicalc/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/minicalc/makefile.mk b/xmerge/source/minicalc/makefile.mk index 73bd22a773cb..fd05a5b21929 100644 --- a/xmerge/source/minicalc/makefile.mk +++ b/xmerge/source/minicalc/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/palmtests/bin/verify_sane.pl b/xmerge/source/palmtests/bin/verify_sane.pl index 5e2419203ab2..dc085f3ddc44 100755 --- a/xmerge/source/palmtests/bin/verify_sane.pl +++ b/xmerge/source/palmtests/bin/verify_sane.pl @@ -5,14 +5,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: verify_sane.pl,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/palmtests/qa-wrapper/bin/qa_comparator.pl b/xmerge/source/palmtests/qa-wrapper/bin/qa_comparator.pl index 4103825a4588..6cc49da3570b 100755 --- a/xmerge/source/palmtests/qa-wrapper/bin/qa_comparator.pl +++ b/xmerge/source/palmtests/qa-wrapper/bin/qa_comparator.pl @@ -5,14 +5,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: qa_comparator.pl,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/palmtests/qa-wrapper/bin/qa_test_driver.pl b/xmerge/source/palmtests/qa-wrapper/bin/qa_test_driver.pl index d287147da433..fd57512fd171 100755 --- a/xmerge/source/palmtests/qa-wrapper/bin/qa_test_driver.pl +++ b/xmerge/source/palmtests/qa-wrapper/bin/qa_test_driver.pl @@ -5,14 +5,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: qa_test_driver.pl,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/palmtests/qa-wrapper/bin/run-convtest b/xmerge/source/palmtests/qa-wrapper/bin/run-convtest index fa75a39c9f9f..56c12509e215 100755 --- a/xmerge/source/palmtests/qa-wrapper/bin/run-convtest +++ b/xmerge/source/palmtests/qa-wrapper/bin/run-convtest @@ -5,14 +5,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: run-convtest,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd index e1551fc31133..f7bb8eb321bb 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/Blocklist.dtd @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: Blocklist.dtd,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod index 231532fcf50e..11bc8a8e40b7 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/datastyl.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: datastyl.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod index 4349eda537c8..aa0a25822a45 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/drawing.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: drawing.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod index 164c3ba3e874..e4d640d012c8 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/dtypes.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: dtypes.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/form.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/form.mod index ba0cde5afcf5..77a91206c451 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/form.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/form.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: form.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod index 448d6de1aeba..b7f6b64140a6 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/nmspace.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: nmspace.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd index bdf3bae73a34..9bcd37edf325 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.dtd @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.dtd,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.mod index 6b525e89a3dd..f8e3775fa6da 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/office.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod index 58297320f5c4..bb9224237fa8 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/settings.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: settings.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/style.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/style.mod index d0fb8740ec8d..21a3d9d17dd1 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/style.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/style.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: style.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/table.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/table.mod index c6534feead5d..6d9f3cdb2a8f 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/table.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/table.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: table.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/text.mod b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/text.mod index 8e30dcdde40c..792b0fdde55e 100644 --- a/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/text.mod +++ b/xmerge/source/palmtests/qa-wrapper/results/baseline/xml-base/text.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: text.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/datastyl.mod b/xmerge/source/palmtests/qa/comparator/dtd/datastyl.mod index 231532fcf50e..11bc8a8e40b7 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/datastyl.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/datastyl.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: datastyl.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/drawing.mod b/xmerge/source/palmtests/qa/comparator/dtd/drawing.mod index 4349eda537c8..aa0a25822a45 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/drawing.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/drawing.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: drawing.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/dtypes.mod b/xmerge/source/palmtests/qa/comparator/dtd/dtypes.mod index 164c3ba3e874..e4d640d012c8 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/dtypes.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/dtypes.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: dtypes.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/form.mod b/xmerge/source/palmtests/qa/comparator/dtd/form.mod index ba0cde5afcf5..77a91206c451 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/form.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/form.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: form.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/nmspace.mod b/xmerge/source/palmtests/qa/comparator/dtd/nmspace.mod index 448d6de1aeba..b7f6b64140a6 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/nmspace.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/nmspace.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: nmspace.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/office.dtd b/xmerge/source/palmtests/qa/comparator/dtd/office.dtd index bdf3bae73a34..9bcd37edf325 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/office.dtd +++ b/xmerge/source/palmtests/qa/comparator/dtd/office.dtd @@ -3,14 +3,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.dtd,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/office.mod b/xmerge/source/palmtests/qa/comparator/dtd/office.mod index 6b525e89a3dd..f8e3775fa6da 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/office.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/office.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: office.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/settings.mod b/xmerge/source/palmtests/qa/comparator/dtd/settings.mod index 58297320f5c4..bb9224237fa8 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/settings.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/settings.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: settings.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/style.mod b/xmerge/source/palmtests/qa/comparator/dtd/style.mod index d0fb8740ec8d..21a3d9d17dd1 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/style.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/style.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: style.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/table.mod b/xmerge/source/palmtests/qa/comparator/dtd/table.mod index c6534feead5d..6d9f3cdb2a8f 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/table.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/table.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: table.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> diff --git a/xmerge/source/palmtests/qa/comparator/dtd/text.mod b/xmerge/source/palmtests/qa/comparator/dtd/text.mod index 8e30dcdde40c..792b0fdde55e 100644 --- a/xmerge/source/palmtests/qa/comparator/dtd/text.mod +++ b/xmerge/source/palmtests/qa/comparator/dtd/text.mod @@ -2,14 +2,10 @@ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: text.mod,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,7 +22,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + --> for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java index 73c6fc4c9f75..190cb0925c21 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BIFFRecord.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BIFFRecord.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java index 771dcfba8b0d..df45b708d89c 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BeginningOfFile.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BeginningOfFile.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java index da45208ee090..da826a8d9058 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BlankCell.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BlankCell.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java index 1782ba5de159..9a370ccd8a59 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoolErrCell.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BoolErrCell.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java index 85c917190576..679224634bfa 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/BoundSheet.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BoundSheet.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java index 2b5c68b4399c..c09cde5a32c1 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CellValue.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CellValue.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java index 7f8dbe1428b0..91186fa27c3c 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/CodePage.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CodePage.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java index 61196889802c..6ce59c7ca72c 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ColInfo.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColInfo.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java index e11d56847c57..b3e3a8e6b0e3 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefColWidth.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DefColWidth.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java index 286f69151cde..454a5ed87520 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefRowHeight.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DefRowHeight.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java index 6da880b3b6ff..0f8c535a9b92 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/DefinedName.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DefinedName.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java index 059ccd7dd4dd..d0a2fec3e90e 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Eof.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Eof.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java index f71edcb339cb..5165efd84460 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/ExtendedFormat.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ExtendedFormat.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java index c433a7397182..8d702640a500 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FloatNumber.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FloatNumber.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java index 6ac78b67c7af..61d9746c80d3 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/FontDescription.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FontDescription.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java index 0bd23789f799..a073883b2e8e 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Formula.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Formula.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java index 17530ccfdba1..d4ad28cc7e2b 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/LabelCell.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: LabelCell.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java index 18b21114ad55..342d9b676bcd 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/NumberFormat.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NumberFormat.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java index 82b7370eae96..b65d1027f969 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Pane.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Pane.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java index a561907dd0f1..8e3067d26c6b 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Row.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Row.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java index 075321b79f26..308eae29227e 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Selection.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Selection.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java index 400ac890f077..c516eca69b1b 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/StringValue.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: StringValue.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java index 5028d5767fd1..e6f941d46556 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/UnsupportedFormulaException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: UnsupportedFormulaException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java index 13a601d9ed82..c060db90d60d 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window1.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Window1.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java index 3ab42d0364d2..4c49a941219c 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Window2.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Window2.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java index 5abf0bd27937..5a9f329e4667 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Workbook.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Workbook.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java index 51cb2d9b094a..6ab57189f39f 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/Worksheet.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Worksheet.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java index 0812d3c8b60a..2e060ca0a148 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaCompiler.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaCompiler.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java index 9890a20f3c70..208feb030f36 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaHelper.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaHelper.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java index 55314c3559c0..0ab40ec53fd2 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParser.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaParser.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java index 295f58faba3c..e8465391e6ff 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FormulaParsingException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FormulaParsingException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java index 43f34c33351f..42c06d88754a 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/FunctionLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: FunctionLookup.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java index d35db126005c..6ad1876e5358 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperandLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OperandLookup.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java index 08b557e3a6d3..de9ed23d8a24 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/OperatorLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OperatorLookup.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java index 38b4e29b7858..053266c8008b 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/ParseToken.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ParseToken.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java index 1cdee4558371..551b77cf6e7f 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/PrecedenceTable.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PrecedenceTable.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java index cdb2741ebb8b..bf7722b973e4 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/SymbolLookup.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SymbolLookup.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java index a16a8af4d3fe..48d35dcef5d1 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/Token.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Token.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java index 2bbfdd8b1791..1a636f9ae1f1 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java index a390704302ba..e18c1d10cc04 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenDecoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java index a00a3f1ec31c..249e14ac620f 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenEncoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java index aa9c92c101d6..e745c7c0f970 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/TokenFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TokenFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java index 211d580b2d7d..ca2794d3f73d 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/UnsupportedFunctionException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: UnsupportedFunctionException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html index 4620217619ca..6239c2b5b625 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/formula/package.html @@ -6,14 +6,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,7 +26,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html index 87cb66844b37..ef06a251cfaa 100644 --- a/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html +++ b/xmerge/source/pexcel/java/org/openoffice/xmerge/converter/xml/sxc/pexcel/records/package.html @@ -6,14 +6,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,7 +26,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/pexcel/makefile.mk b/xmerge/source/pexcel/makefile.mk index c0fdb53a676c..7f51a43e7530 100644 --- a/xmerge/source/pexcel/makefile.mk +++ b/xmerge/source/pexcel/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/build.xml b/xmerge/source/pocketword/build.xml index 5b5c31c9adc6..51b198c329af 100644 --- a/xmerge/source/pocketword/build.xml +++ b/xmerge/source/pocketword/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/converter.xml b/xmerge/source/pocketword/converter.xml index 7714e10f7971..56fcebfba6b1 100644 --- a/xmerge/source/pocketword/converter.xml +++ b/xmerge/source/pocketword/converter.xml @@ -5,14 +5,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java index 26899e9d4a67..13437cc7bb7c 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java index c467a4081a37..5e2f8a06e3a0 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDescriptor.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDescriptor.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java index 2a2a905b1131..6d7873cca96b 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java index 04ca8e851456..e3d09b5c2bcc 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java index de1ae3429836..08424a073803 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java index 216248d54efd..0302a5d6efba 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/Paragraph.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Paragraph.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java index 56cd1262189b..e17617f467c7 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/ParagraphTextSegment.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ParagraphTextSegment.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java index 82a83540cc10..963e7f489726 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java index 1bf7d2132e82..207627398ca1 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PocketWordConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java index 9026732fa064..bc77e0fa6988 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/PocketWordDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PocketWordDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html index d767b245254a..e32357b85ef7 100644 --- a/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html +++ b/xmerge/source/pocketword/java/org/openoffice/xmerge/converter/xml/sxw/pocketword/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/pocketword/makefile.mk b/xmerge/source/pocketword/makefile.mk index 24f6e45cfd24..9db2d15000c6 100644 --- a/xmerge/source/pocketword/makefile.mk +++ b/xmerge/source/pocketword/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/regutil/makefile.mk b/xmerge/source/regutil/makefile.mk index 4d34ce6cfe02..4886fe0057b0 100644 --- a/xmerge/source/regutil/makefile.mk +++ b/xmerge/source/regutil/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/build.xml b/xmerge/source/wordsmith/build.xml index 2333a0bb40c5..9a0c1aef7563 100644 --- a/xmerge/source/wordsmith/build.xml +++ b/xmerge/source/wordsmith/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java index 432f3e863f3a..11e264a07cfb 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java index 779b51550c6b..415392933c2c 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DOCConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DOCConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java index 2eb4455d279e..29098b72cc17 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java index 0a239bd8e2ec..b338c9adb6ff 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java index 250c6543fff0..bca91fa53415 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java index 94246a744f4d..d7e84d69f34c 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java index eef0cb0f368c..5ac9bc01c725 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WSDecoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java index f91864c779d1..15cf4ed36544 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WSEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WSEncoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java index c254d05ea59a..4f1a7141f348 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/Wse.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Wse.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java index 8046f7945127..bbb22952a24a 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseColorTable.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseColorTable.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java index 4da223c37cc2..d7bc6edd8bc2 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseFontTable.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseFontTable.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java index c1ca588f0dd6..c80e03eca043 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseHeader.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseHeader.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java index 77ee6759cdcc..36b21e21b931 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WsePara.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WsePara.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java index 0c93468c0199..7a4bb325e051 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/WseTextRun.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: WseTextRun.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java index 87b89a24eda2..01276ce79a94 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/textRecord.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: textRecord.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java index eba3403bbcb6..9dcb178197da 100644 --- a/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java +++ b/xmerge/source/wordsmith/java/org/openoffice/xmerge/converter/xml/sxw/wordsmith/util.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: util.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/wordsmith/makefile.mk b/xmerge/source/wordsmith/makefile.mk index de0d62a9ecaf..9edb4e758878 100644 --- a/xmerge/source/wordsmith/makefile.mk +++ b/xmerge/source/wordsmith/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/build.xml b/xmerge/source/xmerge/build.xml index a01ac6ae1912..8c46b46ea747 100644 --- a/xmerge/source/xmerge/build.xml +++ b/xmerge/source/xmerge/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.7 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/converter.dtd b/xmerge/source/xmerge/converter.dtd index c447baa809e8..a73ce946fa56 100644 --- a/xmerge/source/xmerge/converter.dtd +++ b/xmerge/source/xmerge/converter.dtd @@ -3,14 +3,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: converter.dtd,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -27,7 +23,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java index 8631321b0bdb..59b6db6aa84c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Convert.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Convert.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java index 8787e445ac0d..b2da0e3f3e4c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertData.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConvertData.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java index 2aac2be8bda4..5065ca20ca10 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConvertException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConvertException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java index 67f9073c0f7d..b26e0d5559b8 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterCapabilities.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilities.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java index 673276457253..b6afe0d42bfa 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java index c632f8db268f..786050a42a0e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Document.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Document.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java index 96cbb26595fd..4c26453a982b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializer.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java index 9f8f3f239212..417144b7ac49 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializer2.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializer2.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java index b45744e739cf..315ebc0cf051 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentDeserializerFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java index a78f2596e7ac..3f29b2dad7f2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMerger.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMerger.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java index b6184f12f61e..3daa41db4b99 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentMergerFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java index becd9d2e5117..d46e5baca765 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializer.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java index 8e95f8b83f49..dd3ee25460a6 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializer2.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializer2.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java index 688a5130a596..6d6f47078b5e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/DocumentSerializerFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java index 2885adddb333..8c649c8fa6cf 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/MergeException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MergeException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java index e9fda033833a..de7baba4683f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/PluginFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java index 2af9f9eb08dd..b639d95a8116 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Version.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java index 83c2270e5e61..f7df881b1061 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/DOMDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DOMDocument.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/package.html index 31b21e19cc5c..0198fdd4576f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/dom/package.html @@ -6,14 +6,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -30,7 +26,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java index 00f0f91a1691..11286ee824ce 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDB.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PalmDB.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java index f039dab382ee..668bfdb7f155 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PalmDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PalmDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java index f6df00664b27..68e7c66beb11 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbDecoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java index 2081290ccf47..46433e88ec2e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbEncoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java index c79acf6d20bb..2f9d389e80cc 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbHeader.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbHeader.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java index cb50b9d7cb76..d0714d677960 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/PdbUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PdbUtil.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java index 6475fdbc9537..23690792bdbf 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/Record.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Record.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/package.html index 8f5159b23d6d..f2628bb0b235 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/palm/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedBinaryObject.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedBinaryObject.java index 30052140bdae..ac82675b229d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedBinaryObject.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedBinaryObject.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: EmbeddedBinaryObject.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedObject.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedObject.java index 00a3e55d5493..11240b4bceac 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedObject.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedObject.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: EmbeddedObject.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java index b3f8f5769b7d..6e5f123ded53 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: EmbeddedXMLObject.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java index 020546141ad5..afa889cb9e3f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OfficeConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java index bc62cc0a7e2a..d3372be5a757 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OfficeDocument.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocumentException.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocumentException.java index b6a77d6d57f7..2c8ae71f2af3 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocumentException.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeDocumentException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OfficeDocumentException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java index 1ce1e3bba90a..9752650533a1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OfficeZip.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java index 69d4f66f1164..662a542d0e7b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ParaStyle.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java index 6d464671f1af..cc1e1d3d530c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/Style.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Style.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java index 32732b65f4a3..c783d366a68b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/StyleCatalog.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: StyleCatalog.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java index 06f2bc778210..91926310776c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TextStyle.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/package.html index e0336ce04643..9d4d0f5bd5cf 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java index b3d99fa0d5b6..9c1ae2768524 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/BookSettings.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: BookSettings.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java index 131e8aa35613..2e3e34b6d620 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CellStyle.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java index 038cb2b8950c..14c1dbfc8e77 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnRowInfo.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColumnRowInfo.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java index e7c1cb2ce354..76c742b57496 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColumnStyle.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java index df190ed83396..2fa5f22303b2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java index 55690658de07..2bb836a7303d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Format.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java index f5b485eeb636..de83543fd86e 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/NameDefinition.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NameDefinition.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java index 4f5ee01f91e3..2b4ce04a13f0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RowStyle.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java index c0074e5a8bbd..4258e1a5e035 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SheetSettings.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SheetSettings.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java index f01f40ff98e9..169f54a65845 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetDecoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SpreadsheetDecoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java index 01ce78322c09..fc965bcd88b1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SpreadsheetEncoder.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SpreadsheetEncoder.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java index ecf4bd26de9b..32fd85fa071a 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcConstants.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcConstants.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java index f5b2977839d8..5561ef3c9d9c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java index ab6a941a60f4..2eb507d09b7b 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentDeserializer.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentDeserializer.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java index 9fb29e5504a4..b0cfc09893bc 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcDocumentSerializer.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcDocumentSerializer.java,v $ - * $Revision: 1.5 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java index abd12130057b..401bdff1f533 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/SxcPluginFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxcPluginFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html index ee33c0c58794..d350ea262303 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java index c530868910d9..0485c4a435c0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxwDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java index 9051769e04c8..a1f53bfd9ede 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/SxwPluginFactory.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SxwPluginFactory.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html index 93ffa03dc0b4..a9ced174ff5a 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxw/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java index a4c238e4d625..5f6e4ac38ce2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/ConverterCapabilitiesImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterCapabilitiesImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java index cfdfe9ea1cdf..e118cc690ea0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentDeserializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentDeserializerImpl.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java index 3d5d28737a68..6416d0d531a0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentMergerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMergerImpl.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java index 2293cb0be74f..5bf8d4983da1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/DocumentSerializerImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentSerializerImpl.java,v $ - * $Revision: 1.6 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java index a996bf7f07bf..d0ecb2c943ac 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/GenericOfficeDocument.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: GenericOfficeDocument.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java index 9f5d39d6ea37..36872751e999 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/PluginFactoryImpl.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PluginFactoryImpl.java,v $ - * $Revision: 1.7 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties index 013f457b8ec9..32f3771fc492 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/XsltPlugin.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: XsltPlugin.properties,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/package.html index 5f4de34878a0..30c71b15655f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/xslt/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java index 8e58f8b67e57..76158a7053c0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/DiffAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DiffAlgorithm.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java index 33e4ffe4ecab..31977b36f377 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Difference.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Difference.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java index 9b5ae86fff0c..5ebfa7b2f499 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/Iterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Iterator.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java index 3c971aea60ce..b1d4d5b510fd 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/MergeAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: MergeAlgorithm.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java index e83a08cf9e74..9337816c64ab 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/NodeMergeAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NodeMergeAlgorithm.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java index e15112a57218..95fddea14cb9 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CellNodeIterator.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java index 46af77d1e19b..9026303ca3d3 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharArrayLCSAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CharArrayLCSAlgorithm.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java index 1901c1877baa..1a047d130a03 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CharacterParser.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CharacterParser.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java index 6ad7a4dbd4f4..ae90274bfaf1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorLCSAlgorithm.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IteratorLCSAlgorithm.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java index 319c9558d70e..fa6642432838 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/IteratorRowCompare.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IteratorRowCompare.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java index 237ee44fad53..308affeb130a 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: NodeIterator.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java index baa2aad22230..d52b53fd78a7 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ObjectArrayIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ObjectArrayIterator.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java index bf73d6e51602..2e16275e0e44 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/ParaNodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ParaNodeIterator.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java index a0311a156c64..0e514209e2f0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/RowIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RowIterator.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java index 4cd42490cefa..8840585b2b92 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeEntry.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TextNodeEntry.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java index 5c7e8b3f572b..b1da7bcdcdaf 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/TextNodeIterator.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TextNodeIterator.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/package.html index ac1b0f349261..f9d1b12a5f39 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java index 199b604835e5..adcd483dd44a 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/CharacterBaseParagraphMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: CharacterBaseParagraphMerge.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java index 1a9b54bbf482..5c293000a964 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: DocumentMerge.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java index 47736c061bb3..4d912d1c8a56 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/PositionBaseRowMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: PositionBaseRowMerge.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java index 323530adcddb..edb95cfd9cb2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetMerge.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SheetMerge.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java index 7d92a442f4d0..0329434105b8 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/SheetUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: SheetUtil.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/package.html index c7af8cfd1cc3..d54b7c37a0ef 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/package.html index 2f1ff6a2ba08..e5cd65c3f357 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/package.html index 75193f08b158..ea56e3b6c118 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java index c55dec4ea839..f9742c48a743 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfoList.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties index 88392d16af9f..d8bf3483b95d 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: ConverterInfoList.properties,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java index 86ec98e83732..5855727364ef 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/Driver.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Driver.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java index b0ed4818d216..fb7941a15ae0 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ActiveSyncDriver.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ActiveSyncDriver.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java index 19d08f651f0d..33ef294d4ae8 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/ColourConverter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ColourConverter.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java index 7e96e50e6f29..8b9f06eb4e86 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Debug.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.properties b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.properties index 21b5f49a630d..4be4427837a7 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.properties +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Debug.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: Debug.properties,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java index 01a8d3530152..c41a428dd0c2 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/EndianConverter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: EndianConverter.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java index 633bb9b5be8d..a317fa2997e1 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/IntArrayList.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: IntArrayList.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java index c3370ec129b1..64a37037c406 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/OfficeUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: OfficeUtil.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java index f69b2ad4beeb..44db518b3389 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/Resources.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: Resources.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java index 3abe377457d9..fe3931a5aadf 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/TwipsConverter.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: TwipsConverter.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java index 93b1eb076c3f..9b3ec402b2e8 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/XmlUtil.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: XmlUtil.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/package.html index 2e78b7350b4a..1caffdbe41d4 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java index 15293f923bfd..359bcbfeb222 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfo.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfo.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java index 13efabf85769..0993924c129f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfoMgr.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java index 53417b7f0152..238fd59f9608 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoReader.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: ConverterInfoReader.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java index b5542d8f5e66..ea370d386c1c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/RegistryException.java @@ -2,13 +2,10 @@ * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2008 by Sun Microsystems, Inc. + * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * - * $RCSfile: RegistryException.java,v $ - * $Revision: 1.4 $ - * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/build.xml b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/build.xml index 4a1c0cdf7263..525546d2f7fc 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/build.xml +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/build.xml @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: build.xml,v $ - - $Revision: 1.6 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/package.html b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/package.html index 04d9f158945f..b6af6262cc5c 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/package.html +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/package.html @@ -4,14 +4,10 @@ # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - Copyright 2008 by Sun Microsystems, Inc. + Copyright 2000, 2010 Oracle and/or its affiliates. OpenOffice.org - a multi-platform office productivity suite - $RCSfile: package.html,v $ - - $Revision: 1.4 $ - This file is part of OpenOffice.org. OpenOffice.org is free software: you can redistribute it and/or modify @@ -28,7 +24,7 @@ version 3 along with OpenOffice.org. If not, see for a copy of the LGPLv3 License. - + #************************************************************************* --> diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/resources.properties b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/resources.properties index 805a2016667e..dd7938723e30 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/resources.properties +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/resources.properties @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: resources.properties,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/source/xmerge/makefile.mk b/xmerge/source/xmerge/makefile.mk index 7420f886ed38..8ff18ad94d5d 100644 --- a/xmerge/source/xmerge/makefile.mk +++ b/xmerge/source/xmerge/makefile.mk @@ -2,14 +2,10 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2008 by Sun Microsystems, Inc. +# Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite # -# $RCSfile: makefile.mk,v $ -# -# $Revision: 1.4 $ -# # This file is part of OpenOffice.org. # # OpenOffice.org is free software: you can redistribute it and/or modify diff --git a/xmerge/util/build.xml b/xmerge/util/build.xml index 89a41211165f..f15ad3acff08 100644 --- a/xmerge/util/build.xml +++ b/xmerge/util/build.xml @@ -2,14 +2,10 @@