merge DEV300_m77

This commit is contained in:
Michael Stahl 2010-04-28 17:52:28 +02:00
commit 8424f481e0
295 changed files with 17857 additions and 15220 deletions

View file

@ -28,7 +28,9 @@
#ifndef _SVX_ESCHEREX_HXX
#define _SVX_ESCHEREX_HXX
#include <memory>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <tools/solar.h>
#include <tools/gen.hxx>
#include <tools/list.hxx>
@ -945,13 +947,13 @@ enum ESCHER_LineCap
#define ESCHER_Persist_PrivateEntry 0x80000000
#define ESCHER_Persist_Dgg 0x00010000
#define ESCHER_Persist_Dgg_FIDCL 0x00010001
#define ESCHER_Persist_Dg 0x00020000
#define ESCHER_Persist_BlibStoreContainer 0x00030000
#define ESCHER_Persist_CurrentPosition 0x00040000
#define ESCHER_Persist_Grouping_Snap 0x00050000
#define ESCHER_Persist_Grouping_Logic 0x00060000
const sal_uInt32 DFF_DGG_CLUSTER_SIZE = 0x00000400; /// Shape IDs per cluster in DGG atom.
// ---------------------------------------------------------------------------------------------
namespace com { namespace sun { namespace star {
@ -961,6 +963,7 @@ namespace com { namespace sun { namespace star {
namespace drawing {
struct EnhancedCustomShapeAdjustmentValue;
class XShape;
class XShapes;
}
}}}
@ -1030,13 +1033,11 @@ struct EscherPersistEntry
// ---------------------------------------------------------------------------------------------
class SvMemoryStream;
class EscherBlibEntry
{
friend class EscherGraphicProvider;
friend class EscherEx;
friend class _EscherEx;
protected:
@ -1344,52 +1345,137 @@ public:
};
// ============================================================================
/** Instance for global DFF data, shared through various instances of EscherEx. */
class MSFILTER_DLLPUBLIC EscherExGlobal : public EscherGraphicProvider
{
public:
explicit EscherExGlobal( sal_uInt32 nGraphicProvFlags = _E_GRAPH_PROV_DO_NOT_ROTATE_METAFILES );
virtual ~EscherExGlobal();
/** Returns a new drawing ID for a new drawing container (DGCONTAINER). */
sal_uInt32 GenerateDrawingId();
/** Creates and returns a new shape identifier, updates the internal shape
counters and registers the identifier in the DGG cluster table.
@param nDrawingId Drawing identifier has to be passed to be able to
generate shape identifiers for multiple drawings simultaniously. */
sal_uInt32 GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpgr );
/** Returns the number of shapes in the current drawing, based on number of
calls to the GenerateShapeId() function. */
sal_uInt32 GetDrawingShapeCount( sal_uInt32 nDrawingId ) const;
/** Returns the last shape identifier generated by the GenerateShapeId()
function. */
sal_uInt32 GetLastShapeId( sal_uInt32 nDrawingId ) const;
/** Sets the flag indicating that the DGGCONTAINER exists. */
inline void SetDggContainer() { mbHasDggCont = true; }
/** Sets the flag indicating that the DGGCONTAINER exists. */
inline bool HasDggContainer() const { return mbHasDggCont; }
/** Returns the total size of the DGG atom (including header). */
sal_uInt32 GetDggAtomSize() const;
/** Writes the complete DGG atom to the passed stream (overwrites existing data!). */
void WriteDggAtom( SvStream& rStrm ) const;
/** Called if a picture shall be written and no picture stream is set at
class ImplEscherExSdr.
On first invokation, this function calls the virtual member function
ImplQueryPictureStream(). The return value will be cached internally
for subsequent calls and for the GetPictureStream() function.
*/
SvStream* QueryPictureStream();
/** Returns the picture stream if existing (queried), otherwise null. */
inline SvStream* GetPictureStream() { return mpPicStrm; }
private:
/** Derived classes may implement to create a new stream used to store the
picture data.
The implementation has to take care about lifetime of the returned
stream (it will not be destructed automatically). This function is
called exactly once. The return value will be cached internally for
repeated calls of the public QueryPictureStream() function.
*/
virtual SvStream* ImplQueryPictureStream();
private:
struct ClusterEntry
{
sal_uInt32 mnDrawingId; /// Identifier of drawing this cluster belongs to (one-based index into maDrawingInfos).
sal_uInt32 mnNextShapeId; /// Next free shape identifier in this cluster.
inline explicit ClusterEntry( sal_uInt32 nDrawingId ) : mnDrawingId( nDrawingId ), mnNextShapeId( 0 ) {}
};
typedef ::std::vector< ClusterEntry > ClusterTable;
struct DrawingInfo
{
sal_uInt32 mnClusterId; /// Currently used cluster (one-based index into maClusterTable).
sal_uInt32 mnShapeCount; /// Current number of shapes in this drawing.
sal_uInt32 mnLastShapeId; /// Last shape identifier generated for this drawing.
inline explicit DrawingInfo( sal_uInt32 nClusterId ) : mnClusterId( nClusterId ), mnShapeCount( 0 ), mnLastShapeId( 0 ) {}
};
typedef ::std::vector< DrawingInfo > DrawingInfoVector;
ClusterTable maClusterTable; /// List with cluster IDs (used object IDs in drawings).
DrawingInfoVector maDrawingInfos; /// Data about all used drawings.
SvStream* mpPicStrm; /// Cached result of ImplQueryPictureStream().
bool mbHasDggCont; /// True = the DGGCONTAINER has been initialized.
bool mbPicStrmQueried; /// True = ImplQueryPictureStream() has been called.
};
typedef ::boost::shared_ptr< EscherExGlobal > EscherExGlobalRef;
// ---------------------------------------------------------------------------------------------
class SdrObject;
class SdrPage;
class ImplEscherExSdr;
class Color;
class Graphic;
class SvMemoryStream;
class SvStream;
class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGraphicProvider
class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable
{
protected :
protected:
typedef ::std::auto_ptr< ImplEscherExSdr > ImplEscherExSdrPtr;
EscherExGlobalRef mxGlobal;
ImplEscherExSdrPtr mpImplEscherExSdr;
SvStream* mpOutStrm;
ImplEscherExSdr* mpImplEscherExSdr;
UINT32 mnStrmStartOfs;
std::vector< sal_uInt32 > mOffsets;
std::vector< sal_uInt16 > mRecTypes;
UINT32 mnDrawings;
UINT32 mnFIDCLs; // anzahl der cluster ID's
UINT32 mnCurrentDg;
UINT32 mnCurrentShapeID; // die naechste freie ID
UINT32 mnCurrentShapeMaximumID; // die hoechste und auch benutzte ID
UINT32 mnTotalShapesDg; // anzahl der shapes im Dg
UINT32 mnTotalShapeIdUsedDg; // anzahl der benutzten shape Id's im Dg
UINT32 mnTotalShapesDgg; // anzahl der shapes im Dgg
UINT32 mnCountOfs;
UINT32 mnGroupLevel;
UINT16 mnHellLayerId;
BOOL mbEscherSpgr;
BOOL mbEscherDgg;
BOOL mbEscherDg;
BOOL mbOleEmf; // OLE is EMF instead of WMF
virtual BOOL DoSeek( UINT32 nKey );
public:
public:
explicit EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm );
virtual ~EscherEx();
EscherEx( SvStream& rOut, UINT32 nDrawings );
/** Creates and returns a new shape identifier, updates the internal shape
counters and registers the identifier in the DGG cluster table. */
inline sal_uInt32 GenerateShapeId() { return mxGlobal->GenerateShapeId( mnCurrentDg, mbEscherSpgr ); }
/** Returns the graphic provider from the global object that has been
passed to the constructor.
*/
inline EscherGraphicProvider&
GetGraphicProvider() { return *mxGlobal; }
/** Called if a picture shall be written and no picture stream is set at
class ImplEscherExSdr.
*/
inline SvStream* QueryPictureStream() { return mxGlobal->QueryPictureStream(); }
/// Fuegt in den EscherStream interne Daten ein, dieser Vorgang
/// darf und muss nur einmal ausgefuehrt werden.
@ -1398,14 +1484,29 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap
/// gemerged, wie es fuer Excel (und Word?) benoetigt wird.
virtual void Flush( SvStream* pPicStreamMergeBSE = NULL );
virtual ~EscherEx();
/** Inserts the passed number of bytes at the current position of the
output stream.
// Application may overload this function to maintain an offset
// table for specific regions but MUST call this function too.
virtual void InsertAtCurrentPos( UINT32 nBytes, BOOL bCont = FALSE );// es werden nBytes an der aktuellen Stream Position eingefuegt,
// die PersistantTable und interne Zeiger angepasst
Inserts dummy bytes and moves all following stream data, and updates
all internal stream offsets stored in the PersistTable and the affected
container sizes, which makes this operation very expensive. (!)
@param nBytes The number of bytes to be inserted into the stream.
@param bExpandEndOfAtom If set to true, an atom that currently ends
exactly at the current stream position will be expanded to include
the inserted data. If set to false, an atom that currently ends
exactly at the current stream position will not be expanded to
include the inserted data (used to insert e.g. a new atom after an
existing atom). Note that containers that end exactly at the
current stream position are always expanded to include the inserted
data.
*/
void InsertAtCurrentPos( sal_uInt32 nBytes, bool bExpandEndOfAtom );
void InsertPersistOffset( UINT32 nKey, UINT32 nOffset ); // Es wird nicht geprueft, ob sich jener schluessel schon in der PersistantTable befindet
void ReplacePersistOffset( UINT32 nKey, UINT32 nOffset );
UINT32 GetPersistOffset( UINT32 nKey );
BOOL SeekToPersistOffset( UINT32 nKey );
virtual BOOL InsertAtPersistOffset( UINT32 nKey, UINT32 nValue );// nValue wird im Stream an entrsprechender Stelle eingefuegt(overwrite modus), ohne dass sich die
// aktuelle StreamPosition aendert
@ -1440,21 +1541,16 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap
// ein ESCHER_Sp wird geschrieben ( Ein ESCHER_DgContainer muss dazu geoeffnet sein !!)
virtual void AddShape( UINT32 nShpInstance, UINT32 nFlagIds, UINT32 nShapeID = 0 );
// reserviert eine ShapeId
UINT32 GetShapeID();
virtual void Commit( EscherPropertyContainer& rProps, const Rectangle& rRect );
UINT32 GetColor( const UINT32 nColor, BOOL bSwap = TRUE );
UINT32 GetColor( const Color& rColor, BOOL bSwap = TRUE );
// OLE is written as EMF instead of WMF (default WMF)
void SetOleEmf( BOOL bVal ) { mbOleEmf = bVal; }
BOOL IsOleEmf() const { return mbOleEmf; }
// ...Sdr... implemented in eschesdo.cxx
void AddSdrPage( const SdrPage& rPage );
void AddUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
/// returns the ShapeID
UINT32 AddSdrObject( const SdrObject& rObj );
@ -1467,7 +1563,9 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap
/// Called before a shape is written, application supplies
/// ClientRecords. May set AppData::bDontWriteShape so the
/// shape is ignored.
virtual EscherExHostAppData* StartShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape );
virtual EscherExHostAppData* StartShape(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rShape,
const Rectangle* pChildAnchor );
/// Called after a shape is written to inform the application
/// of the resulted shape type and ID.
@ -1491,10 +1589,6 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap
/// the same functionality as an ordinary recursive group.
virtual EscherExHostAppData* EnterAdditionalTextGroup();
/// Called if a picture shall be written and no PicStream is
/// set at ImplEscherExSdr
virtual SvStream* QueryPicStream();
/// Called if an ESCHER_Prop_lTxid shall be written
virtual UINT32 QueryTextID( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >&, UINT32 nShapeId );
// add an dummy rectangle shape into the escher stream
@ -1504,6 +1598,14 @@ class MSFILTER_DLLPUBLIC EscherEx : public EscherPersistTable, public EscherGrap
void SetHellLayerId( UINT16 nId ) { mnHellLayerId = nId; }
UINT16 GetHellLayerId() const { return mnHellLayerId; }
private:
EscherEx( const EscherEx& );
EscherEx& operator=( const EscherEx& );
// prevent C-style cast to former base class EscherGraphicProvider
operator EscherGraphicProvider&();
operator EscherGraphicProvider const&();
};

View file

@ -81,10 +81,6 @@ CT_APP = org.openoffice.Runner
$(CLASSDIR)$/$(PACKAGE)$/files.csv : ALLDEP
.ENDIF
TST:
@echo "$(USE_SHELL)"
.INCLUDE : target.mk
$(CLASSDIR)$/$(PACKAGE)$/preselectedFilter.csv : preselectedFilter.csv
@ -109,16 +105,9 @@ $(CLASSDIR)$/$(PACKAGE)$/TypeDetection.props : TypeDetection.props
# --- chmod --------------------------------------------------------
.IF "$(USE_SHELL)" != "4nt"
CHMOD :
chmod 444 $(CLASSDIR)$/$(PACKAGE)$/*.csv
chmod 666 $(CLASSDIR)$/$(PACKAGE)$/*.props
.ELSE
CHMOD :
echo erstmanix
.ENDIF
RUN: run

View file

@ -1,10 +0,0 @@
UDK_3_0_0 {
global:
GetVersionInfo;
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -56,7 +56,7 @@ LateInitListener::LateInitListener(const css::uno::Reference< css::lang::XMultiS
// important to do so ...
// Otherwhise the temp. reference to ourselves
// will kill us at realeasing time!
++m_refCount;
osl_incrementInterlockedCount( &m_refCount );
m_xBroadcaster = css::uno::Reference< css::document::XEventBroadcaster >(
m_xSMGR->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster")),
@ -64,7 +64,7 @@ LateInitListener::LateInitListener(const css::uno::Reference< css::lang::XMultiS
m_xBroadcaster->addEventListener(static_cast< css::document::XEventListener* >(this));
--m_refCount;
osl_decrementInterlockedCount( &m_refCount );
}
/*-----------------------------------------------
@ -92,6 +92,16 @@ void SAL_CALL LateInitListener::notifyEvent(const css::document::EventObject& aE
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
if ( !m_xBroadcaster.is() )
// the beauty of multi-threading ... OnLoad can be notified synchronously or asynchronously. In particular,
// SFX-based documents notify it synchronously, database documents do it asynchronously.
// Now if multiple documents are opened "at the same time", it is well possible that we get two events from
// different threads, where upon the first event, we already remove ourself from m_xBroadcaster, and start
// the thread, nonetheless there's also a second notification "in the queue", which will arrive short
// thereafter.
// In such a case, simply ignore this second event.
return;
m_xBroadcaster->removeEventListener(static_cast< css::document::XEventListener* >(this));
m_xBroadcaster.clear();

View file

@ -72,7 +72,7 @@ DEF1NAME= $(SHL1TARGET)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
SHL1DEPN=
SHL1IMPLIB= i$(SHL1TARGET)
SHL1VERSIONMAP= exports.map
SHL1VERSIONMAP= $(SOLARENV)/src/component.map
# --- Targets ----------------------------------

View file

@ -1,6 +1,6 @@
<node oor:name="HTML (StarCalc)" oor:op="replace">
<prop oor:name="Flags"><value>IMPORT EXPORT ALIEN</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="Flags"><value>IMPORT EXPORT ALIEN USEOPTIONS</value></prop>
<prop oor:name="UIComponent"><value>com.sun.star.comp.Calc.FilterOptionsDialog</value></prop>
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>

View file

@ -1,6 +1,6 @@
<node oor:name="calc_HTML_WebQuery" oor:op="replace">
<prop oor:name="Flags"><value>IMPORT ALIEN</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="Flags"><value>IMPORT ALIEN USEOPTIONS</value></prop>
<prop oor:name="UIComponent"><value>com.sun.star.comp.Calc.FilterOptionsDialog</value></prop>
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value></value></prop>
<prop oor:name="FileFormatVersion"><value>0</value></prop>

View file

@ -1,5 +1,5 @@
<node oor:name="writerglobal8_writer" oor:op="replace">
<prop oor:name="Flags"><value>EXPORT TEMPLATE</value></prop>
<prop oor:name="Flags"><value>EXPORT TEMPLATE DEFAULT</value></prop>
<prop oor:name="UIComponent"/>
<prop oor:name="FilterService"/>
<prop oor:name="UserData"><value>CXML</value></prop>

View file

@ -187,7 +187,7 @@ MERGE:=python ../tools/merge/pyAltFCFGMerge
MERGE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/python ../tools/merge/pyAltFCFGMerge
.ENDIF
.ELSE
MERGE := $(JAVAI) -jar $(SOLARBINDIR)$/FCFGMerge.jar
MERGE := $(JAVAI) $(JAVAIFLAGS) -jar $(SOLARBINDIR)$/FCFGMerge.jar
.ENDIF
PACKLANG := $(XSLTPROC) --nonet

View file

@ -2,7 +2,7 @@
<prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
<prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>pcd</value></prop>
<prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>>
<prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>
<prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>draw_PCD_Photo_CD_Base</value></prop>
<prop oor:name="UIName">

View file

@ -2,7 +2,7 @@
<prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
<prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>pcd</value></prop>
<prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>>
<prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>
<prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>draw_PCD_Photo_CD_Base16</value></prop>
<prop oor:name="UIName">

View file

@ -2,7 +2,7 @@
<prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
<prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>pcd</value></prop>
<prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>>
<prop oor:name="MediaType"><value>image/x-photo-cd</value></prop>
<prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>draw_PCD_Photo_CD_Base4</value></prop>
<prop oor:name="UIName">

View file

@ -2,7 +2,7 @@
<prop oor:name="DetectService"><value>com.sun.star.comp.draw.FormatDetector</value></prop>
<prop oor:name="URLPattern"/>
<prop oor:name="Extensions"><value>svm</value></prop>
<prop oor:name="MediaType"><value>image/x-svm</value></prop>>
<prop oor:name="MediaType"><value>image/x-svm</value></prop>
<prop oor:name="Preferred"><value>false</value></prop>
<prop oor:name="PreferredFilter"><value>SVM - StarView Metafile</value></prop>
<prop oor:name="UIName">

View file

@ -438,7 +438,6 @@ def generateHeader(sVersion, sEncoding, sPath, sPackage, bLanguagePack):
sHeader += " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\""
sHeader += " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n"
else:
sHeader += "<!DOCTYPE oor:component-data SYSTEM \"../../../../component-update.dtd\">\n"
sHeader += "<oor:component-data xmlns:oor=\"http://openoffice.org/2001/registry\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" oor:package=\""
sHeader += sPath
sHeader += "\" oor:name=\""

View file

@ -1,9 +0,0 @@
FLASH_1_0 {
global:
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -86,7 +86,7 @@ SHL1STDLIBS+=\
SHL1DEPN=
SHL1IMPLIB= i$(SHL1TARGET)
SHL1VERSIONMAP=exports.map
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1LIBS= $(SLB)$/$(TARGET).lib
SHL1DEF= $(MISC)$/$(SHL1TARGET).def

View file

@ -1,4 +1,4 @@
GIFEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;
DoExportDialog;

View file

@ -1,4 +1,4 @@
METEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;
DoExportDialog;

View file

@ -1,4 +1,4 @@
PBMEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;
DoExportDialog;

View file

@ -1,4 +1,4 @@
PGMEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;
DoExportDialog;

View file

@ -1,4 +1,4 @@
PICTEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;
DoExportDialog;

View file

@ -1,4 +1,4 @@
PPMEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;
DoExportDialog;

View file

@ -1,4 +1,4 @@
EPSEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;
DoExportDialog;

View file

@ -1,4 +1,4 @@
RASEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;

View file

@ -1,4 +1,4 @@
TIFEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;

View file

@ -1,4 +1,4 @@
XPMEXPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicExport;

View file

@ -1,4 +1,4 @@
CGMIMPORTER_1_0 {
UDK_3_0_0 {
global:
ImportCGM;

View file

@ -1,4 +1,4 @@
DXFIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
EPSIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
METIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
PBMIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
PCDIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
PCXIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
PICTIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
PSDIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
RASIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
TGAIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -1,4 +1,4 @@
TIFIMPORTER_1_0 {
UDK_3_0_0 {
global:
GraphicImport;

View file

@ -3669,13 +3669,13 @@ void EscherGraphicProvider::WriteBlibStoreContainer( SvStream& rSt, SvStream* pM
// record type
*pMergePicStreamBSE >> n16;
rSt << UINT16( ESCHER_BlipFirst + nBlibType );
DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherEx::Flush: BLIP record types differ" );
DBG_ASSERT( n16 == ESCHER_BlipFirst + nBlibType , "EscherGraphicProvider::WriteBlibStoreContainer: BLIP record types differ" );
UINT32 n32;
// record size
*pMergePicStreamBSE >> n32;
nBlipSize -= 8;
rSt << nBlipSize;
DBG_ASSERT( nBlipSize == n32, "EscherEx::Flush: BLIP sizes differ" );
DBG_ASSERT( nBlipSize == n32, "EscherGraphicProvider::WriteBlibStoreContainer: BLIP sizes differ" );
// record
while ( nBlipSize )
{
@ -4289,64 +4289,190 @@ void EscherSolverContainer::WriteSolver( SvStream& rStrm )
}
}
// ---------------------------------------------------------------------------------------------
EscherExGlobal::EscherExGlobal( sal_uInt32 nGraphicProvFlags ) :
EscherGraphicProvider( nGraphicProvFlags ),
mpPicStrm( 0 ),
mbHasDggCont( false ),
mbPicStrmQueried( false )
{
}
EscherExGlobal::~EscherExGlobal()
{
}
sal_uInt32 EscherExGlobal::GenerateDrawingId()
{
// new drawing starts a new cluster in the cluster table (cluster identifiers are one-based)
sal_uInt32 nClusterId = static_cast< sal_uInt32 >( maClusterTable.size() + 1 );
// drawing identifiers are one-based
sal_uInt32 nDrawingId = static_cast< sal_uInt32 >( maDrawingInfos.size() + 1 );
// prepare new entries in the tables
maClusterTable.push_back( ClusterEntry( nDrawingId ) );
maDrawingInfos.push_back( DrawingInfo( nClusterId ) );
// return the new drawing identifier
return nDrawingId;
}
sal_uInt32 EscherExGlobal::GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpgr )
{
// drawing identifier is one-based
size_t nDrawingIdx = nDrawingId - 1;
OSL_ENSURE( nDrawingIdx < maDrawingInfos.size(), "EscherExGlobal::GenerateShapeId - invalid drawing ID" );
if( nDrawingIdx >= maDrawingInfos.size() )
return 0;
DrawingInfo& rDrawingInfo = maDrawingInfos[ nDrawingIdx ];
// cluster identifier in drawing info struct is one-based
ClusterEntry* pClusterEntry = &maClusterTable[ rDrawingInfo.mnClusterId - 1 ];
// check cluster overflow, create new cluster entry
if( pClusterEntry->mnNextShapeId == DFF_DGG_CLUSTER_SIZE )
{
// start a new cluster in the cluster table
maClusterTable.push_back( ClusterEntry( nDrawingId ) );
pClusterEntry = &maClusterTable.back();
// new size of maClusterTable is equal to one-based identifier of the new cluster
rDrawingInfo.mnClusterId = static_cast< sal_uInt32 >( maClusterTable.size() );
}
// build shape identifier from cluster identifier and next free cluster shape identifier
rDrawingInfo.mnLastShapeId = static_cast< sal_uInt32 >( rDrawingInfo.mnClusterId * DFF_DGG_CLUSTER_SIZE + pClusterEntry->mnNextShapeId );
// update free shape identifier in cluster entry
++pClusterEntry->mnNextShapeId;
/* Old code has counted the shapes only, if we are in a SPGRCONTAINER. Is
this really intended? Maybe it's always true... */
if( bIsInSpgr )
++rDrawingInfo.mnShapeCount;
// return the new shape identifier
return rDrawingInfo.mnLastShapeId;
}
sal_uInt32 EscherExGlobal::GetDrawingShapeCount( sal_uInt32 nDrawingId ) const
{
size_t nDrawingIdx = nDrawingId - 1;
OSL_ENSURE( nDrawingIdx < maDrawingInfos.size(), "EscherExGlobal::GetDrawingShapeCount - invalid drawing ID" );
return (nDrawingIdx < maDrawingInfos.size()) ? maDrawingInfos[ nDrawingIdx ].mnShapeCount : 0;
}
sal_uInt32 EscherExGlobal::GetLastShapeId( sal_uInt32 nDrawingId ) const
{
size_t nDrawingIdx = nDrawingId - 1;
OSL_ENSURE( nDrawingIdx < maDrawingInfos.size(), "EscherExGlobal::GetLastShapeId - invalid drawing ID" );
return (nDrawingIdx < maDrawingInfos.size()) ? maDrawingInfos[ nDrawingIdx ].mnLastShapeId : 0;
}
sal_uInt32 EscherExGlobal::GetDggAtomSize() const
{
// 8 bytes header, 16 bytes fixed DGG data, 8 bytes for each cluster
return static_cast< sal_uInt32 >( 24 + 8 * maClusterTable.size() );
}
void EscherExGlobal::WriteDggAtom( SvStream& rStrm ) const
{
sal_uInt32 nDggSize = GetDggAtomSize();
// write the DGG record header (do not include the 8 bytes of the header in the data size)
rStrm << static_cast< sal_uInt32 >( ESCHER_Dgg << 16 ) << static_cast< sal_uInt32 >( nDggSize - 8 );
// claculate and write the fixed DGG data
sal_uInt32 nShapeCount = 0;
sal_uInt32 nLastShapeId = 0;
for( DrawingInfoVector::const_iterator aIt = maDrawingInfos.begin(), aEnd = maDrawingInfos.end(); aIt != aEnd; ++aIt )
{
nShapeCount += aIt->mnShapeCount;
nLastShapeId = ::std::max( nLastShapeId, aIt->mnLastShapeId );
}
// the non-existing cluster with index #0 is counted too
sal_uInt32 nClusterCount = static_cast< sal_uInt32 >( maClusterTable.size() + 1 );
sal_uInt32 nDrawingCount = static_cast< sal_uInt32 >( maDrawingInfos.size() );
rStrm << nLastShapeId << nClusterCount << nShapeCount << nDrawingCount;
// write the cluster table
for( ClusterTable::const_iterator aIt = maClusterTable.begin(), aEnd = maClusterTable.end(); aIt != aEnd; ++aIt )
rStrm << aIt->mnDrawingId << aIt->mnNextShapeId;
}
SvStream* EscherExGlobal::QueryPictureStream()
{
if( !mbPicStrmQueried )
{
mpPicStrm = ImplQueryPictureStream();
mbPicStrmQueried = true;
}
return mpPicStrm;
}
SvStream* EscherExGlobal::ImplQueryPictureStream()
{
return 0;
}
// ---------------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------
// ---------------------------------------------------------------------------------------------
EscherEx::EscherEx( SvStream& rOutStrm, UINT32 nDrawings ) :
EscherGraphicProvider ( 0 ),
EscherEx::EscherEx( const EscherExGlobalRef& rxGlobal, SvStream& rOutStrm ) :
mxGlobal ( rxGlobal ),
mpOutStrm ( &rOutStrm ),
mnDrawings ( nDrawings ),
mnGroupLevel ( 0 ),
mnHellLayerId ( USHRT_MAX ),
mbEscherSpgr ( FALSE ),
mbEscherDgg ( FALSE ), // TRUE, wenn jemals ein ESCHER_Dgg angelegt wurde, dieser wird dann im Dest. aktualisiert
mbEscherDg ( FALSE ),
mbOleEmf ( FALSE )
mbEscherDg ( FALSE )
{
mnStrmStartOfs = mpOutStrm->Tell();
mpImplEscherExSdr = new ImplEscherExSdr( *this );
mpImplEscherExSdr.reset( new ImplEscherExSdr( *this ) );
}
EscherEx::~EscherEx()
{
}
// ---------------------------------------------------------------------------------------------
void EscherEx::Flush( SvStream* pPicStreamMergeBSE /* = NULL */ )
{
if ( mbEscherDgg ) // ESCHER_Dgg anpassen
if ( mxGlobal->HasDggContainer() )
{
// store the current stream position at ESCHER_Persist_CurrentPosition key
PtReplaceOrInsert( ESCHER_Persist_CurrentPosition, mpOutStrm->Tell() );
if ( DoSeek( ESCHER_Persist_Dgg ) )
{
*mpOutStrm << mnCurrentShapeID << (UINT32)( mnFIDCLs + 1 ) << mnTotalShapesDgg << mnDrawings;
}
if ( HasGraphics() )
{
if ( DoSeek( ESCHER_Persist_BlibStoreContainer ) ) // ESCHER_BlibStoreContainer schreiben
/* The DGG record is still not written. ESCHER_Persist_Dgg seeks
to the place where the complete record has to be inserted. */
InsertAtCurrentPos( mxGlobal->GetDggAtomSize(), false );
mxGlobal->WriteDggAtom( *mpOutStrm );
if ( mxGlobal->HasGraphics() )
{
sal_uInt32 nAddBytes = GetBlibStoreContainerSize( pPicStreamMergeBSE );
if ( nAddBytes )
/* Calculate the total size of the BSTORECONTAINER including
all BSE records containing the picture data contained in
the passed in pPicStreamMergeBSE. */
sal_uInt32 nBSCSize = mxGlobal->GetBlibStoreContainerSize( pPicStreamMergeBSE );
if ( nBSCSize > 0 )
{
InsertAtCurrentPos( nAddBytes, TRUE ); // platz schaffen fuer Blib Container samt seinen Blib Atomen
WriteBlibStoreContainer( *mpOutStrm, pPicStreamMergeBSE );
InsertAtCurrentPos( nBSCSize, false );
mxGlobal->WriteBlibStoreContainer( *mpOutStrm, pPicStreamMergeBSE );
}
}
/* Forget the stream position stored for the DGG which is invalid
after the call to InsertAtCurrentPos() anyway. */
PtDelete( ESCHER_Persist_Dgg );
}
// seek to initial position (may be different due to inserted DGG and BLIPs)
mpOutStrm->Seek( PtGetOffsetByID( ESCHER_Persist_CurrentPosition ) );
}
}
// ---------------------------------------------------------------------------------------------
EscherEx::~EscherEx()
{
delete mpImplEscherExSdr;
}
// ---------------------------------------------------------------------------------------------
void EscherEx::InsertAtCurrentPos( UINT32 nBytes, BOOL bContainer )
void EscherEx::InsertAtCurrentPos( UINT32 nBytes, bool bExpandEndOfAtom )
{
UINT32 nSize, nType, nSource, nBufSize, nToCopy, nCurPos = mpOutStrm->Tell();
BYTE* pBuf;
@ -4364,11 +4490,16 @@ void EscherEx::InsertAtCurrentPos( UINT32 nBytes, BOOL bContainer )
while ( mpOutStrm->Tell() < nCurPos )
{
*mpOutStrm >> nType >> nSize;
if ( ( mpOutStrm->Tell() + nSize ) >= ( ( bContainer ) ? nCurPos + 1 : nCurPos ) )
sal_uInt32 nEndOfRecord = mpOutStrm->Tell() + nSize;
bool bContainer = (nType & 0x0F) == 0x0F;
/* Expand the record, if the insertion position is inside, or if the
position is at the end of a container (expands always), or at the
end of an atom and bExpandEndOfAtom is set. */
if ( (nCurPos < nEndOfRecord) || ((nCurPos == nEndOfRecord) && (bContainer || bExpandEndOfAtom)) )
{
mpOutStrm->SeekRel( -4 );
*mpOutStrm << (UINT32)( nSize + nBytes );
if ( ( nType & 0xf ) != 0xf )
if ( !bContainer )
mpOutStrm->SeekRel( nSize );
}
else
@ -4428,6 +4559,16 @@ void EscherEx::InsertPersistOffset( UINT32 nKey, UINT32 nOffset )
PtInsert( ESCHER_Persist_PrivateEntry | nKey, nOffset );
}
void EscherEx::ReplacePersistOffset( UINT32 nKey, UINT32 nOffset )
{
PtReplace( ESCHER_Persist_PrivateEntry | nKey, nOffset );
}
UINT32 EscherEx::GetPersistOffset( UINT32 nKey )
{
return PtGetOffsetByID( ESCHER_Persist_PrivateEntry | nKey );
}
// ---------------------------------------------------------------------------------------------
BOOL EscherEx::DoSeek( UINT32 nKey )
@ -4476,39 +4617,25 @@ void EscherEx::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
{
case ESCHER_DggContainer :
{
mbEscherDgg = TRUE;
mnFIDCLs = mnDrawings;
mxGlobal->SetDggContainer();
mnCurrentDg = 0;
mnCurrentShapeID = 0;
mnTotalShapesDgg = 0;
mnCurrentShapeMaximumID = 0;
AddAtom( 16 + ( mnDrawings << 3 ), ESCHER_Dgg ); // an FDGG and several FIDCLs
/* Remember the current position as start position of the DGG
record and BSTORECONTAINER, but do not write them actually.
This will be done later in Flush() when the number of drawings,
the size and contents of the FIDCL cluster table, and the size
of the BLIP container are known. */
PtReplaceOrInsert( ESCHER_Persist_Dgg, mpOutStrm->Tell() );
*mpOutStrm << (UINT32)0 // the current maximum shape ID
<< (UINT32)0 // the number of ID clusters + 1
<< (UINT32)0 // the number of total shapes saved
<< (UINT32)0; // the total number of drawings saved
PtReplaceOrInsert( ESCHER_Persist_Dgg_FIDCL, mpOutStrm->Tell() );
for ( UINT32 i = 0; i < mnFIDCLs; i++ ) // Dummy FIDCLs einfuegen
{
*mpOutStrm << (UINT32)0 << (UINT32)0; // Drawing Nummer, Anzahl der Shapes in diesem IDCL
}
PtReplaceOrInsert( ESCHER_Persist_BlibStoreContainer, mpOutStrm->Tell() );
}
break;
case ESCHER_DgContainer :
{
if ( mbEscherDgg )
if ( mxGlobal->HasDggContainer() )
{
if ( !mbEscherDg )
{
mbEscherDg = TRUE;
mnCurrentDg++;
mnTotalShapesDg = 0;
mnTotalShapeIdUsedDg = 0;
mnCurrentShapeID = ( mnCurrentShapeMaximumID &~0x3ff ) + 0x400; // eine neue Seite bekommt immer eine neue ShapeId die ein vielfaches von 1024 ist,
// damit ist erste aktuelle Shape ID 0x400
mnCurrentDg = mxGlobal->GenerateDrawingId();
AddAtom( 8, ESCHER_Dg, 0, mnCurrentDg );
PtReplaceOrInsert( ESCHER_Persist_Dg | mnCurrentDg, mpOutStrm->Tell() );
*mpOutStrm << (UINT32)0 // The number of shapes in this drawing
@ -4554,48 +4681,7 @@ void EscherEx::CloseContainer()
{
mbEscherDg = FALSE;
if ( DoSeek( ESCHER_Persist_Dg | mnCurrentDg ) )
{
// shapeanzahl des drawings setzen
mnTotalShapesDgg += mnTotalShapesDg;
*mpOutStrm << mnTotalShapesDg << mnCurrentShapeMaximumID;
if ( DoSeek( ESCHER_Persist_Dgg_FIDCL ) )
{
if ( mnTotalShapesDg == 0 )
{
mpOutStrm->SeekRel( 8 );
}
else
{
if ( mnTotalShapeIdUsedDg )
{
// die benutzten Shape Ids des drawings in die fidcls setzen
UINT32 i, nFIDCL = ( ( mnTotalShapeIdUsedDg - 1 ) / 0x400 );
if ( nFIDCL )
{
if ( nPos > mpOutStrm->Tell() )
nPos += ( nFIDCL << 3 );
mnFIDCLs += nFIDCL;
InsertAtCurrentPos( nFIDCL << 3 ); // platz schaffen fuer weitere FIDCL's
}
for ( i = 0; i <= nFIDCL; i++ )
{
*mpOutStrm << mnCurrentDg;
if ( i < nFIDCL )
*mpOutStrm << (UINT32)0x400;
else
{
UINT32 nShapesLeft = mnTotalShapeIdUsedDg % 0x400;
if ( !nShapesLeft )
nShapesLeft = 0x400;
*mpOutStrm << (UINT32)nShapesLeft;
}
}
}
}
PtReplaceOrInsert( ESCHER_Persist_Dgg_FIDCL, mpOutStrm->Tell() ); // neuen FIDCL Offset fuer naechste Seite
}
}
*mpOutStrm << mxGlobal->GetDrawingShapeCount( mnCurrentDg ) << mxGlobal->GetLastShapeId( mnCurrentDg );
}
}
break;
@ -4649,10 +4735,10 @@ void EscherEx::AddAtom( UINT32 nAtomSize, UINT16 nRecType, int nRecVersion, int
void EscherEx::AddChildAnchor( const Rectangle& rRect )
{
AddAtom( 16, ESCHER_ChildAnchor );
GetStream() << (INT32)rRect.Left()
<< (INT32)rRect.Top()
<< (INT32)rRect.Right()
<< (INT32)rRect.Bottom();
*mpOutStrm << (sal_Int32)rRect.Left()
<< (sal_Int32)rRect.Top()
<< (sal_Int32)rRect.Right()
<< (sal_Int32)rRect.Bottom();
}
// ---------------------------------------------------------------------------------------------
@ -4691,7 +4777,7 @@ UINT32 EscherEx::EnterGroup( const String& rShapeName, const Rectangle* pBoundRe
<< (INT32)aRect.Right()
<< (INT32)aRect.Bottom();
UINT32 nShapeId = GetShapeID();
sal_uInt32 nShapeId = GenerateShapeId();
if ( !mnGroupLevel )
AddShape( ESCHER_ShpInst_Min, 5, nShapeId ); // Flags: Group | Patriarch
else
@ -4782,7 +4868,7 @@ void EscherEx::AddShape( UINT32 nShpInstance, UINT32 nFlags, UINT32 nShapeID )
AddAtom( 8, ESCHER_Sp, 2, nShpInstance );
if ( !nShapeID )
nShapeID = GetShapeID();
nShapeID = GenerateShapeId();
if ( nFlags ^ 1 ) // is this a group shape ?
{ // if not
@ -4790,19 +4876,6 @@ void EscherEx::AddShape( UINT32 nShpInstance, UINT32 nFlags, UINT32 nShapeID )
nFlags |= 2; // this not a topmost shape
}
*mpOutStrm << nShapeID << nFlags;
if ( mbEscherSpgr )
mnTotalShapesDg++;
}
// ---------------------------------------------------------------------------------------------
UINT32 EscherEx::GetShapeID()
{
mnCurrentShapeMaximumID = mnCurrentShapeID; // maximum setzen
mnCurrentShapeID++; // mnCurrentShape ID auf nachste freie ID
mnTotalShapeIdUsedDg++;
return mnCurrentShapeMaximumID;
}
// ---------------------------------------------------------------------------------------------
@ -4842,3 +4915,4 @@ UINT32 EscherEx::GetColor( const Color& rSOColor, BOOL bSwap )
}
// ---------------------------------------------------------------------------------------------

View file

@ -146,7 +146,7 @@ void ImplEESdrWriter::ImplFlipBoundingBox( ImplEESdrObject& rObj, EscherProperty
#define ADD_SHAPE( nType, nFlags ) \
{ \
nShapeType = nType; \
nShapeID = mpEscherEx->GetShapeID(); \
nShapeID = mpEscherEx->GenerateShapeId(); \
rObj.SetShapeId( nShapeID ); \
mpEscherEx->AddShape( (UINT32)nType, (UINT32)nFlags, nShapeID ); \
rSolverContainer.AddShape( rObj.GetShapeRef(), nShapeID ); \
@ -182,7 +182,7 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
UINT32 nGrpShapeID = 0;
do {
mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef() );
mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 );
if ( mpHostAppData && mpHostAppData->DontWriteShape() )
break;
@ -238,8 +238,8 @@ UINT32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
const ::com::sun::star::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() );
Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) );
if ( !mpPicStrm )
mpPicStrm = mpEscherEx->QueryPicStream();
EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpEscherEx, mpPicStrm, aRect100thmm );
mpPicStrm = mpEscherEx->QueryPictureStream();
EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm );
// #i51348# shape name
if( aShapeName.Len() > 0 )
@ -764,7 +764,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
UINT16 nShapeType = 0;
do
{
mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef() );
mpHostAppData = mpEscherEx->StartShape( rObj.GetShapeRef(), (mpEscherEx->GetGroupLevel() > 1) ? &rObj.GetRect() : 0 );
if ( mpHostAppData && mpHostAppData->DontWriteShape() )
break;
@ -772,8 +772,8 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
const ::com::sun::star::awt::Point aPoint100thmm( rObj.GetShapeRef()->getPosition() );
Rectangle aRect100thmm( Point( aPoint100thmm.X, aPoint100thmm.Y ), Size( aSize100thmm.Width, aSize100thmm.Height ) );
if ( !mpPicStrm )
mpPicStrm = mpEscherEx->QueryPicStream();
EscherPropertyContainer aPropOpt( (EscherGraphicProvider&)*mpEscherEx, mpPicStrm, aRect100thmm );
mpPicStrm = mpEscherEx->QueryPictureStream();
EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm );
rObj.SetAngle( rObj.ImplGetInt32PropertyValue( ::rtl::OUString::createFromAscii("RotateAngle")));
INT32 nAngle = rObj.GetAngle();
if( rObj.GetType().EqualsAscii( "drawing.Line" ))
@ -802,7 +802,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj,
else
{
mpEscherEx->OpenContainer( ESCHER_SpContainer );
nShapeID = mpEscherEx->GetShapeID();
nShapeID = mpEscherEx->GenerateShapeId();
mpEscherEx->AddShape( nShapeType = ESCHER_ShpInst_TextBox, 0xa00, nShapeID );
if ( rObj.ImplGetText() )
aPropOpt.CreateTextProperties( rObj.mXPropSet,
@ -862,7 +862,7 @@ UINT32 ImplEESdrWriter::ImplEnterAdditionalTextGroup( const Reference< XShape >&
{
mpHostAppData = mpEscherEx->EnterAdditionalTextGroup();
UINT32 nGrpId = mpEscherEx->EnterGroup( pBoundRect );
mpHostAppData = mpEscherEx->StartShape( rShape );
mpHostAppData = mpEscherEx->StartShape( rShape, pBoundRect );
return nGrpId;
}
@ -934,7 +934,7 @@ ImplEscherExSdr::~ImplEscherExSdr()
// -------------------------------------------------------------------
SvxDrawPage* ImplEscherExSdr::ImplInitPage( const SdrPage& rPage )
bool ImplEscherExSdr::ImplInitPage( const SdrPage& rPage )
{
do
{
@ -960,12 +960,32 @@ SvxDrawPage* ImplEscherExSdr::ImplInitPage( const SdrPage& rPage )
else
pSvxDrawPage = SvxDrawPage::getImplementation(mXDrawPage);
return pSvxDrawPage;
return pSvxDrawPage != 0;
} while ( 0 );
return NULL;
return false;
}
// -------------------------------------------------------------------
bool ImplEscherExSdr::ImplInitUnoShapes( const Reference< XShapes >& rxShapes )
{
// eventually write SolverContainer of current page, deletes the Solver
ImplFlushSolverContainer();
if( !rxShapes.is() )
return false;
mpSdrPage = 0;
mXDrawPage.clear();
mXShapes = rxShapes;
if( !ImplInitPageValues() ) // ImplEESdrWriter
return false;
mpSolverContainer = new EscherSolverContainer;
return true;
}
// -------------------------------------------------------------------
@ -1020,6 +1040,13 @@ void EscherEx::AddSdrPage( const SdrPage& rPage )
mpImplEscherExSdr->ImplWriteCurrentPage();
}
// -------------------------------------------------------------------
void EscherEx::AddUnoShapes( const Reference< XShapes >& rxShapes )
{
if ( mpImplEscherExSdr->ImplInitUnoShapes( rxShapes ) )
mpImplEscherExSdr->ImplWriteCurrentPage();
}
// -------------------------------------------------------------------
@ -1041,7 +1068,7 @@ void EscherEx::EndSdrObjectPage()
// -------------------------------------------------------------------
EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */ )
EscherExHostAppData* EscherEx::StartShape( const Reference< XShape >& /* rShape */, const Rectangle* /*pChildAnchor*/ )
{
return NULL;
}
@ -1054,13 +1081,6 @@ void EscherEx::EndShape( UINT16 /* nShapeType */, UINT32 /* nShapeID */ )
// -------------------------------------------------------------------
SvStream* EscherEx::QueryPicStream()
{
return NULL;
}
// -------------------------------------------------------------------
UINT32 EscherEx::QueryTextID( const Reference< XShape >&, UINT32 )
{
return 0;
@ -1071,7 +1091,7 @@ UINT32 EscherEx::QueryTextID( const Reference< XShape >&, UINT32 )
UINT32 EscherEx::AddDummyShape()
{
OpenContainer( ESCHER_SpContainer );
UINT32 nShapeID = GetShapeID();
UINT32 nShapeID = GenerateShapeId();
AddShape( ESCHER_ShpInst_Rectangle, 0xa00, nShapeID );
//?? aSolverContainer.AddShape( mXShape, nShapeID );
CloseContainer();
@ -1109,16 +1129,12 @@ ImplEESdrObject::ImplEESdrObject( ImplEscherExSdr& rEx,
{
SdrPage* pPage = rObj.GetPage();
DBG_ASSERT( pPage, "ImplEESdrObject::ImplEESdrObject: no SdrPage" );
if( pPage )
if( pPage && rEx.ImplInitPage( *pPage ) )
{
SvxDrawPage* pSvxDrawPage = rEx.ImplInitPage( *pPage );
if( pSvxDrawPage )
{
// why not declare a const parameter if the object will
// not be modified?
mXShape = uno::Reference< drawing::XShape >::query( ((SdrObject*)&rObj)->getUnoShape() );;
Init( rEx );
}
// why not declare a const parameter if the object will
// not be modified?
mXShape = uno::Reference< drawing::XShape >::query( ((SdrObject*)&rObj)->getUnoShape() );;
Init( rEx );
}
}

View file

@ -191,7 +191,8 @@ public:
ImplEscherExSdr( EscherEx& rEx );
virtual ~ImplEscherExSdr();
SvxDrawPage* ImplInitPage( const SdrPage& rPage );
bool ImplInitPage( const SdrPage& rPage );
bool ImplInitUnoShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes );
void ImplWriteCurrentPage();
UINT32 ImplWriteTheShape( ImplEESdrObject& rObj );

View file

@ -5374,6 +5374,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
((SdrEdgeObj*)pRet)->SetEdgeTrackPath( aPoly );
}
pRet->SetMergedItemSet( aSet );
}
}

View file

@ -2323,8 +2323,8 @@ sal_Bool OCX_ToggleButton::Import(com::sun::star::uno::Reference<
if (pValue)
{
INT16 nTmp=pValue[0]-0x30;
aTmp <<= nTmp;
rPropSet->setPropertyValue( WW8_ASCII2STR("State"), aTmp);
aTmp <<= nTmp == 1;
rPropSet->setPropertyValue( WW8_ASCII2STR("DefaultState"), aTmp);
}
if (pCaption)
@ -2444,9 +2444,9 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents,
WriteAlign(rContents,4);
nValueLen = 1|SVX_MSOCX_COMPRESSED;
aTmp = rPropSet->getPropertyValue(WW8_ASCII2STR("State"));
sal_Int16 nDefault = sal_Int16();
aTmp >>= nDefault;
bool bDefault = false;
rPropSet->getPropertyValue(WW8_ASCII2STR("DefaultState")) >>= bDefault;
sal_uInt8 nDefault = static_cast< sal_uInt8 >( bDefault ? '1' : '0' );
*rContents << nValueLen;
pBlockFlags[2] |= 0x40;
@ -2459,8 +2459,7 @@ sal_Bool OCX_ToggleButton::WriteContents(SvStorageStreamRef &rContents,
*rContents << rSize.Width;
*rContents << rSize.Height;
nDefault += 0x30;
*rContents << sal_uInt8(nDefault);
*rContents << nDefault;
*rContents << sal_uInt8(0x00);
aCaption.WriteCharArray( *rContents );

View file

@ -1,9 +0,0 @@
PPTIMPORTER_1_0 {
global:
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -54,7 +54,7 @@ SHL1STDLIBS=\
SHL1DEPN=
SHL1IMPLIB= i$(SHL1TARGET)
SHL1LIBS= $(SLB)$/$(TARGET).lib
SHL1VERSIONMAP=exports.map
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)

View file

@ -3127,10 +3127,12 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
}
if ( rSlidePersist.pBObj )
{
if ( rSlidePersist.bBObjIsTemporary )
SdrObject::Free( rSlidePersist.pBObj );
else
pRet->SetBackgroundObj( rSlidePersist.pBObj );
// #i99386# transfer the attributes from the temporary BackgroundObject
// to the Page and delete it. Maybe rSlidePersist.bBObjIsTemporary is
// obsolete here, too.
pRet->getSdrPageProperties().ClearItem();
pRet->getSdrPageProperties().PutItemSet(rSlidePersist.pBObj->GetMergedItemSet());
SdrObject::Free( rSlidePersist.pBObj );
}
}
}

View file

@ -1,9 +0,0 @@
PDFFILTER_1_0 {
global:
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -61,6 +61,7 @@ SHL1STDLIBS=\
$(TKLIB) \
$(VCLLIB) \
$(SVLLIB) \
$(BASEGFXLIB) \
$(SFX2LIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
@ -73,7 +74,7 @@ SHL1DEPN=
SHL1IMPLIB= i$(SHL1TARGET)
SHL1LIBS= $(SLB)$/$(TARGET).lib
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
SHL1VERSIONMAP=exports.map
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
DEF1NAME=$(SHL1TARGET)

View file

@ -50,6 +50,9 @@
#include <svtools/filter.hxx>
#include <svl/solar.hrc>
#include <comphelper/string.hxx>
#include "basegfx/polygon/b2dpolygon.hxx"
#include "basegfx/polygon/b2dpolypolygon.hxx"
#include "basegfx/polygon/b2dpolygontools.hxx"
#include <unotools/saveopt.hxx> // only for testing of relative saving options in PDF
@ -940,7 +943,8 @@ sal_Bool PDFExport::ImplExportPage( PDFWriter& rWriter, PDFExtOutDevData& rPDFEx
rWriter.NewPage( aSizePDF.Width(), aSizePDF.Height() );
rWriter.SetMapMode( rMtf.GetPrefMapMode() );
rWriter.SetClipRegion( aPageRect );
basegfx::B2DRectangle aB2DRect( aPageRect.Left(), aPageRect.Top(), aPageRect.Right(), aPageRect.Bottom() );
rWriter.SetClipRegion( basegfx::B2DPolyPolygon( basegfx::tools::createPolygonFromRect( aB2DRect ) ) );
bRet = ImplWriteActions( rWriter, &rPDFExtOutDevData, rMtf, aDummyVDev );
rPDFExtOutDevData.ResetSyncData();
@ -1643,7 +1647,15 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF
const MetaClipRegionAction* pA = (const MetaClipRegionAction*) pAction;
if( pA->IsClipping() )
rWriter.SetClipRegion( pA->GetRegion() );
{
if( pA->GetRegion().IsEmpty() )
rWriter.SetClipRegion( basegfx::B2DPolyPolygon() );
else
{
Region aReg( pA->GetRegion() );
rWriter.SetClipRegion( aReg.ConvertToB2DPolyPolygon() );
}
}
else
rWriter.SetClipRegion();
}
@ -1658,8 +1670,9 @@ sal_Bool PDFExport::ImplWriteActions( PDFWriter& rWriter, PDFExtOutDevData* pPDF
case( META_ISECTREGIONCLIPREGION_ACTION ):
{
const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pAction;
rWriter.IntersectClipRegion( pA->GetRegion() );
const MetaISectRegionClipRegionAction* pA = (const MetaISectRegionClipRegionAction*) pAction;
Region aReg( pA->GetRegion() );
rWriter.IntersectClipRegion( aReg.ConvertToB2DPolyPolygon() );
}
break;
@ -1829,7 +1842,7 @@ void PDFExport::ImplWriteGradient( PDFWriter& rWriter, const PolyPolygon& rPolyP
rDummyVDev.AddGradientActions( rPolyPoly.GetBoundRect(), rGradient, aTmpMtf );
rWriter.Push();
rWriter.IntersectClipRegion( rPolyPoly );
rWriter.IntersectClipRegion( rPolyPoly.getB2DPolyPolygon() );
ImplWriteActions( rWriter, NULL, aTmpMtf, rDummyVDev );
rWriter.Pop();
}

View file

@ -53,7 +53,7 @@ SHL1STDLIBS= \
$(CPPULIB) \
$(CPPUHELPERLIB) \
$(SALLIB)
SHL1VERSIONMAP=$(TARGET).map
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEPN=
SHL1IMPLIB= i$(TARGET)

View file

@ -1,8 +0,0 @@
UDK_3_0_0 {
global:
component_getImplementationEnvironment;
component_writeInfo;
component_getFactory;
local:
*;
};

View file

@ -1,9 +0,0 @@
PDFFILTER_1_0 {
global:
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -73,7 +73,7 @@ SHL1STDLIBS+=\
SHL1DEPN=
SHL1IMPLIB= i$(SHL1TARGET)
SHL1LIBS= $(SLB)$/$(TARGET).lib
SHL1VERSIONMAP=exports.map
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)

View file

@ -47,7 +47,7 @@ SHL1TARGETDEPN=makefile.mk
SHL1OBJS=$(SLOFILES)
SHL1TARGET=$(LIBNAME)$(DLLPOSTFIX)
SHL1IMPLIB=i$(LIBNAME)
SHL1VERSIONMAP=$(LIBNAME).map
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
#SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)

View file

@ -1,8 +0,0 @@
T602IMP_1_0 {
global:
component_getImplementationEnvironment;
component_writeInfo;
component_getFactory;
local:
*;
};

View file

@ -44,7 +44,7 @@ CDEFS+=-DCOMPMOD_NAMESPACE=framework
SHL1TARGET= xmlfa$(DLLPOSTFIX)
SHL1IMPLIB= i$(SHL1TARGET)
SHL1VERSIONMAP= xmlfa.map
SHL1VERSIONMAP= $(SOLARENV)/src/component.map
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME= $(SHL1TARGET)

View file

@ -1,10 +0,0 @@
UDK_3_0_0 {
global:
GetVersionInfo;
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -45,7 +45,7 @@ CDEFS+=-DCOMPMOD_NAMESPACE=framework
SHL1TARGET= xmlfd$(DLLPOSTFIX)
SHL1IMPLIB= i$(SHL1TARGET)
SHL1VERSIONMAP= xmlfd.map
SHL1VERSIONMAP= $(SOLARENV)/src/component.map
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME= $(SHL1TARGET)

View file

@ -1,10 +0,0 @@
UDK_3_0_0 {
global:
GetVersionInfo;
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -78,6 +78,8 @@ import com.sun.star.uno.UnoRuntime;
import com.sun.star.lib.uno.adapter.XInputStreamToInputStreamAdapter;
import com.sun.star.lib.uno.adapter.XOutputStreamToOutputStreamAdapter;
import net.sf.saxon.FeatureKeys;
/** This outer class provides an inner class to implement the service
* description, a method to instantiate the
* component on demand (__getServiceFactory()), and a method to give
@ -291,6 +293,9 @@ public class XSLTransformer
// create new transformer for this stylesheet
TransformerFactory tfactory = TransformerFactory.newInstance();
debug("TransformerFactory is '" + tfactory.getClass().getName() + "'");
// some external saxons (Debian, Ubuntu, ...) have this disabled
// per default
tfactory.setAttribute(FeatureKeys.ALLOW_EXTERNAL_FUNCTIONS, new Boolean(true));
transformer = tfactory.newTransformer(new StreamSource(stylesheeturl));
transformer.setOutputProperty("encoding", "UTF-8");
// transformer.setURIResolver(XSLTransformer.this);

View file

@ -1,10 +0,0 @@
UDK_3_0_0 {
global:
GetVersionInfo;
component_getImplementationEnvironment;
component_getFactory;
component_writeInfo;
local:
*;
};

View file

@ -33,9 +33,6 @@ LIBTARGET=NO
# --- Settings -----------------------------------------------------
CLASSDIR!:=$(CLASSDIR)$/$(TARGET)
.IF "$(XML_CLASSPATH)" != ""
XCLASSPATH+=":$(XML_CLASSPATH)"
.ENDIF
.INCLUDE: settings.mk
SLOFILES=$(SLO)$/XSLTFilter.obj $(SLO)$/fla.obj
@ -44,7 +41,7 @@ SHL1TARGETDEPN=makefile.mk
SHL1OBJS=$(SLOFILES)
SHL1TARGET=$(LIBNAME)$(DLLPOSTFIX)
SHL1IMPLIB=i$(LIBNAME)
SHL1VERSIONMAP=exports.map
SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
@ -68,6 +65,12 @@ JARCOMPRESS = TRUE
JARCLASSDIRS = XSLTransformer*.class XSLTFilterOLEExtracter*.class
JARTARGET = $(TARGET).jar
.IF "$(SYSTEM_SAXON)" == "YES"
XCLASSPATH+=$(SAXON_JAR)
.ELSE
JARFILES += saxon9.jar
.ENDIF
# --- Files --------------------------------------------------------
JAVACLASSFILES=$(CLASSDIR)$/XSLTransformer.class $(CLASSDIR)$/XSLTFilterOLEExtracter.class
.ENDIF

View file

@ -39,13 +39,13 @@ CLASSDIR!:=$(CLASSDIR)$/$(TARGET)
JARFILES = ridl.jar unoil.jar jurt.jar juh.jar crimson.jar
.IF "$(SYSTEM_XALAN)" == "YES"
XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(XALAN_JAR)
EXTRAJARFILES += $(XALAN_JAR)
.ELSE
JARFILES += xalan.jar
.ENDIF
.IF "$(SYSTEM_XML_APIS)" == "YES"
XCLASSPATH!:=$(XCLASSPATH)$(PATH_SEPERATOR)$(XML_APIS_JAR)
EXTRAJARFILES += $(XML_APIS_JAR)
.ELSE
JARFILES += xml-apis.jar
.ENDIF

View file

@ -1,8 +0,0 @@
UDK_3_0_0 {
global:
component_getImplementationEnvironment;
component_writeInfo;
component_getFactory;
local:
*;
};

View file

@ -88,7 +88,7 @@ SHL1STDLIBS+= \
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
SHL1LIBS= $(SLB)$/$(TARGET).lib
SHL1VERSIONMAP = hwp.map
SHL1VERSIONMAP = $(SOLARENV)/src/component.map
DEF1NAME=$(SHL1TARGET)

View file

@ -32,14 +32,15 @@
#include <oox/dllapi.h>
namespace com { namespace sun { namespace star {
namespace awt { struct Point; }
namespace awt { struct Size; }
namespace drawing { class XShapes; }
namespace chart2 { class XChartDocument; }
namespace chart2 { namespace data { class XDataProvider; } }
namespace chart2 { namespace data { class XDataSequence; } }
} } }
namespace oox { namespace core {
class XmlFilterBase;
} }
namespace oox { namespace core { class XmlFilterBase; } }
namespace oox {
namespace drawingml {
@ -56,11 +57,32 @@ public:
explicit ChartConverter();
virtual ~ChartConverter();
/** Converts the passed OOXML chart model to the passed chart2 document. */
/** Converts the passed OOXML chart model to the passed chart2 document.
@param rChartModel The filled MSOOXML chart model structure.
@param rxChartDoc The UNO chart document model to be initialized.
@param rxExternalPage If null, all embedded shapes will be inserted
into the internal drawing page of the chart document. If not null,
all embedded shapes will be inserted into this shapes collection.
@param rChartPos The position of the chart shape in its drawing page,
in 1/100 mm. Will be used only, if parameter rxExternalPage is not
null, for correct positioning of the embedded shapes in the
external drawing page.
@param rChartSize The size of the chart shape in 1/100 mm. Needed for
calculation of position and size of the chart elements (diagram,
titles, legend, etc.) and embedded shapes.
*/
void convertFromModel(
::oox::core::XmlFilterBase& rFilter,
ChartSpaceModel& rModel,
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc );
ChartSpaceModel& rChartModel,
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxExternalPage,
const ::com::sun::star::awt::Point& rChartPos,
const ::com::sun::star::awt::Size& rChartSize );
/** Creates an internal data provider. Derived classes may override this
function to create an external data provider. */

View file

@ -0,0 +1,126 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chartdrawingfragment.hxx,v $
*
* $Revision: 1.1 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX
#define OOX_DRAWINGML_CHART_CHARTDRAWINGFRAGMENT_HXX
#include "oox/core/fragmenthandler2.hxx"
#include "oox/drawingml/shape.hxx"
namespace oox {
namespace drawingml {
namespace chart {
// ============================================================================
/** Relative shape position in a chart object. */
struct AnchorPosModel
{
double mfX; /// X coordinate relative to chart object (0.0 to 1.0).
double mfY; /// Y coordinate relative to chart object (0.0 to 1.0).
inline explicit AnchorPosModel() : mfX( -1.0 ), mfY( -1.0 ) {}
inline bool isValid() const { return (0.0 <= mfX) && (mfX <= 1.0) && (0.0 <= mfY) && (mfY <= 1.0); }
};
// ----------------------------------------------------------------------------
/** Absolute shape size in a chart object (in EMUs). */
struct AnchorSizeModel : public EmuSize
{
inline explicit AnchorSizeModel() : EmuSize( -1, -1 ) {}
inline bool isValid() const { return (Width >= 0) && (Height >= 0); }
};
// ============================================================================
/** Contains the position of a shape in the chart object. Supports different
shape anchor modes (absolute, relative).
*/
class ShapeAnchor
{
public:
explicit ShapeAnchor( bool bRelSize );
/** Imports the absolute anchor size from the cdr:ext element. */
void importExt( const AttributeList& rAttribs );
/** Sets an the relative anchor position from the cdr:from or cdr:to element. */
void setPos( sal_Int32 nElement, sal_Int32 nParentContext, const ::rtl::OUString& rValue );
/** Calculates the resulting shape anchor in EMUs. */
::com::sun::star::awt::Rectangle
calcEmuLocation( const EmuRectangle& rEmuChartRect ) const;
private:
AnchorPosModel maFrom; /// Top-left position relative to chart object.
AnchorPosModel maTo; /// Bottom-right position relative to chart object.
AnchorSizeModel maSize; /// Shape size, if anchor has absolute size.
bool mbRelSize; /// True = relative size, false = absolute size.
};
typedef ::boost::shared_ptr< ShapeAnchor > ShapeAnchorRef;
// ============================================================================
/** Handler for a chart drawing fragment (c:userShapes root element).
*/
class ChartDrawingFragment : public ::oox::core::FragmentHandler2
{
public:
explicit ChartDrawingFragment(
::oox::core::XmlFilterBase& rFilter,
const ::rtl::OUString& rFragmentPath,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxDrawPage,
const ::com::sun::star::awt::Size& rChartSize,
const ::com::sun::star::awt::Point& rShapesOffset,
bool bOleSupport );
virtual ~ChartDrawingFragment();
virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
virtual void onEndElement( const ::rtl::OUString& rChars );
private:
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
mxDrawPage; /// Drawing page of this sheet.
::oox::drawingml::ShapePtr mxShape; /// Current top-level shape.
ShapeAnchorRef mxAnchor; /// Current anchor of top-level shape.
EmuRectangle maEmuChartRect; /// Position and size of the chart object for embedded shapes (in EMUs).
bool mbOleSupport; /// True = allow to insert OLE objects into the drawing page.
};
// ============================================================================
} // namespace chart
} // namespace drawingml
} // namespace oox
#endif

View file

@ -30,6 +30,10 @@
#include "oox/drawingml/chart/converterbase.hxx"
namespace com { namespace sun { namespace star {
namespace drawing { class XShapes; }
} } }
namespace oox {
namespace drawingml {
namespace chart {
@ -45,7 +49,9 @@ public:
virtual ~ChartSpaceConverter();
/** Converts the contained OOXML chart model to a chart2 document. */
void convertFromModel();
void convertFromModel(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxExternalPage,
const ::com::sun::star::awt::Point& rChartPos );
};
// ============================================================================

View file

@ -57,6 +57,7 @@ struct ChartSpaceModel
View3DRef mxView3D; /// 3D settings.
TitleRef mxTitle; /// Chart main title.
LegendRef mxLegend; /// Chart legend.
::rtl::OUString maDrawingPath; /// Path to drawing fragment with embedded shapes.
sal_Int32 mnDispBlanksAs; /// Mode how to display blank values.
sal_Int32 mnStyle; /// Index to default formatting.
bool mbAutoTitleDel; /// True = automatic title deleted manually.

View file

@ -32,6 +32,7 @@
#include "oox/drawingml/chart/objectformatter.hxx"
namespace com { namespace sun { namespace star {
namespace awt { struct Size; }
namespace lang { class XMultiServiceFactory; }
namespace chart2 { class XChartDocument; }
} } }
@ -57,8 +58,9 @@ public:
explicit ConverterRoot(
::oox::core::XmlFilterBase& rFilter,
ChartConverter& rChartConverter,
const ChartSpaceModel& rChartModel,
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& rxChartDoc,
const ChartSpaceModel& rChartSpace );
const ::com::sun::star::awt::Size& rChartSize );
virtual ~ConverterRoot();
/** Creates an instance for the passed service name, using the passed service factory. */
@ -79,6 +81,8 @@ protected:
/** Returns the API chart document model. */
::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >
getChartDocument() const;
/** Returns the position and size of the chart shape in 1/100 mm. */
const ::com::sun::star::awt::Size& getChartSize() const;
/** Returns the object formatter. */
ObjectFormatter& getFormatter() const;

View file

@ -146,6 +146,37 @@ IndexRange GetIndexRange( const ::com::sun::star::uno::Reference< ::com::sun::st
// ============================================================================
struct EmuPoint
{
sal_Int64 X;
sal_Int64 Y;
inline explicit EmuPoint() : X( 0 ), Y( 0 ) {}
inline explicit EmuPoint( sal_Int64 nX, sal_Int64 nY ) : X( nX ), Y( nY ) {}
};
// ============================================================================
struct EmuSize
{
sal_Int64 Width;
sal_Int64 Height;
inline explicit EmuSize() : Width( 0 ), Height( 0 ) {}
inline explicit EmuSize( sal_Int64 nWidth, sal_Int64 nHeight ) : Width( nWidth ), Height( nHeight ) {}
};
// ============================================================================
struct EmuRectangle : public EmuPoint, public EmuSize
{
inline explicit EmuRectangle() {}
inline explicit EmuRectangle( const EmuPoint& rPos, const EmuSize& rSize ) : EmuPoint( rPos ), EmuSize( rSize ) {}
inline explicit EmuRectangle( sal_Int64 nX, sal_Int64 nY, sal_Int64 nWidth, sal_Int64 nHeight ) : EmuPoint( nX, nY ), EmuSize( nWidth, nHeight ) {}
};
// ============================================================================
} // namespace drawingml
} // namespace oox

View file

@ -50,10 +50,12 @@ public:
class GraphicalObjectFrameContext : public ShapeContext
{
public:
GraphicalObjectFrameContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr );
GraphicalObjectFrameContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
private:
bool mbEmbedShapesInChart;
};
// ====================================================================
@ -95,13 +97,16 @@ class ChartGraphicDataContext : public ShapeContext
public:
explicit ChartGraphicDataContext(
::oox::core::ContextHandler& rParent,
const ShapePtr& rxShape );
const ShapePtr& rxShape, bool bEmbedShapes );
virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
createFastChildContext(
sal_Int32 nElement,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
private:
bool mbEmbedShapes;
};
// ====================================================================

View file

@ -69,7 +69,8 @@ public:
const ::com::sun::star::awt::Rectangle& rShapeRect );
virtual void onXShapeCreated(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape ) const;
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes ) const;
inline const PropertyMap& getShapeProperties() const { return maShapeProps; }
@ -124,7 +125,8 @@ public:
void setId( const rtl::OUString& rId ) { msId = rId; }
void setSubType( sal_uInt32 nSubType ) { mnSubType = nSubType; }
sal_Int32 getSubType() const { return mnSubType; }
void setIndex( sal_uInt32 nIndex ) { mnIndex = nIndex; }
void setSubTypeIndex( sal_uInt32 nSubTypeIndex ) { mnSubTypeIndex = nSubTypeIndex; }
sal_Int32 getSubTypeIndex() const { return mnSubTypeIndex; }
// setDefaults has to be called if styles are imported (OfficeXML is not storing properties having the default value)
void setDefaults();
@ -143,7 +145,7 @@ public:
// addShape is creating and inserting the corresponding XShape.
void addShape(
const oox::core::XmlFilterBase& rFilterBase,
const ThemePtr& rxTheme,
const Theme* pTheme,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
const ::com::sun::star::awt::Rectangle* pShapeRect = 0,
ShapeIdMap* pShapeMap = 0 );
@ -161,7 +163,7 @@ protected:
createAndInsert(
const ::oox::core::XmlFilterBase& rFilterBase,
const ::rtl::OUString& rServiceName,
const ThemePtr& rxTheme,
const Theme* pTheme,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
const ::com::sun::star::awt::Rectangle* pShapeRect,
sal_Bool bClearText );
@ -169,7 +171,7 @@ protected:
void addChildren(
const ::oox::core::XmlFilterBase& rFilterBase,
Shape& rMaster,
const ThemePtr& rxTheme,
const Theme* pTheme,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
const ::com::sun::star::awt::Rectangle& rClientRect,
ShapeIdMap* pShapeMap );
@ -185,11 +187,11 @@ protected:
TextListStylePtr mpMasterTextListStyle;
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxShape;
rtl::OUString msServiceName;
rtl::OUString msName;
rtl::OUString msId;
sal_uInt32 mnSubType; // if this type is not zero, then the shape is a placeholder
sal_uInt32 mnIndex;
rtl::OUString msServiceName;
rtl::OUString msName;
rtl::OUString msId;
sal_uInt32 mnSubType; // if this type is not zero, then the shape is a placeholder
sal_uInt32 mnSubTypeIndex;
ShapeStyleRefMap maShapeStyleRefs;

View file

@ -41,6 +41,10 @@ struct TextBodyProperties
PropertyMap maPropertyMap;
OptValue< sal_Int32 > moRotation;
OptValue< sal_Int32 > moVert;
explicit TextBodyProperties();
void pushToPropMap( PropertyMap& rPropMap ) const;
};
// ============================================================================

View file

@ -54,8 +54,8 @@ public:
inline TextParagraphProperties& getProperties() { return maProperties; }
inline const TextParagraphProperties& getProperties() const { return maProperties; }
inline TextParagraphProperties& getEndProperties() { return maEndProperties; }
inline const TextParagraphProperties& getEndProperties() const { return maEndProperties; }
inline TextCharacterProperties& getEndProperties() { return maEndProperties; }
inline const TextCharacterProperties& getEndProperties() const { return maEndProperties; }
//inline void setProperties( TextParagraphPropertiesPtr pProps ) { mpProperties = pProps; }
@ -69,7 +69,7 @@ public:
private:
TextParagraphProperties maProperties;
TextParagraphProperties maEndProperties;
TextCharacterProperties maEndProperties;
TextRunVector maRuns;
};

View file

@ -59,10 +59,15 @@ protected:
private:
void constructDffObj();
sal_uInt32 dumpDffSimpleColor( const String& rName );
sal_uInt32 dumpDffColor( const String& rName );
void dumpDffOpt();
sal_uInt16 dumpDffOptPropHeader();
void dumpDffOptPropValue( sal_uInt16 nPropId, sal_uInt32 nValue );
private:
ItemFormatMap maSimpleProps;
ItemFormatMap maComplexProps;
sal_uInt16 mnInstVer;
sal_Int32 mnRealSize;
};

View file

@ -101,6 +101,9 @@ const sal_Unicode OOX_DUMP_EMPTYVALUE = '~';
const sal_Unicode OOX_DUMP_CMDPROMPT = '?';
const sal_Unicode OOX_DUMP_PLACEHOLDER = '\x01';
typedef ::std::pair< ::rtl::OUString, ::rtl::OUString > OUStringPair;
typedef ::std::pair< sal_Int64, sal_Int64 > Int64Pair;
typedef ::std::vector< ::rtl::OUString > OUStringVector;
typedef ::std::vector< sal_Int64 > Int64Vector;
@ -406,6 +409,7 @@ public:
// string conversion ------------------------------------------------------
static ::rtl::OUString trimSpaces( const ::rtl::OUString& rStr );
static ::rtl::OUString trimTrailingNul( const ::rtl::OUString& rStr );
static ::rtl::OString convertToUtf8( const ::rtl::OUString& rStr );
static DataType convertToDataType( const ::rtl::OUString& rStr );
@ -418,6 +422,8 @@ public:
static bool convertStringToDouble( double& orfData, const ::rtl::OUString& rData );
static bool convertStringToBool( const ::rtl::OUString& rData );
static OUStringPair convertStringToPair( const ::rtl::OUString& rString, sal_Unicode cSep = '=' );
// string to list conversion ----------------------------------------------
static void convertStringToStringList( OUStringVector& orVec, const ::rtl::OUString& rData, bool bIgnoreEmpty );
@ -764,10 +770,10 @@ class FlagsList : public NameListBase
public:
explicit FlagsList( const SharedConfigData& rCfgData );
/** Returns the flags to be ignored on output. */
inline sal_Int64 getIgnoreFlags() const { return mnIgnore; }
/** Sets flags to be ignored on output. */
template< typename Type >
inline void setIgnoreFlags( Type nIgnore )
{ mnIgnore = static_cast< sal_Int64 >( nIgnore ); }
inline void setIgnoreFlags( sal_Int64 nIgnore ) { mnIgnore = nIgnore; }
protected:
virtual void implProcessConfigItemStr(
@ -804,12 +810,20 @@ protected:
virtual void implIncludeList( const NameListBase& rList );
private:
struct ExtItemFormatKey
{
sal_Int64 mnKey;
Int64Pair maFilter;
inline explicit ExtItemFormatKey( sal_Int64 nKey ) : mnKey( nKey ), maFilter( 0, 0 ) {}
bool operator<( const ExtItemFormatKey& rRight ) const;
};
struct ExtItemFormat : public ItemFormat
{
bool mbShiftValue;
inline explicit ExtItemFormat() : mbShiftValue( true ) {}
};
typedef ::std::map< sal_Int64, ExtItemFormat > ExtItemFormatMap;
typedef ::std::map< ExtItemFormatKey, ExtItemFormat > ExtItemFormatMap;
ExtItemFormatMap maFmtMap;
};
@ -858,6 +872,17 @@ private:
static const NameListWrapper NO_LIST;
// ============================================================================
class ItemFormatMap : public ::std::map< sal_Int64, ItemFormat >
{
public:
inline explicit ItemFormatMap() {}
inline explicit ItemFormatMap( const NameListRef& rxNameList ) { insertFormats( rxNameList ); }
void insertFormats( const NameListRef& rxNameList );
};
// ============================================================================
// ============================================================================
@ -1582,8 +1607,8 @@ protected:
sal_Unicode dumpChar( const String& rName, rtl_TextEncoding eTextEnc );
sal_Unicode dumpUnicode( const String& rName );
::rtl::OUString dumpCharArray( const String& rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc );
::rtl::OUString dumpUnicodeArray( const String& rName, sal_Int32 nLen );
::rtl::OUString dumpCharArray( const String& rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc, bool bHideTrailingNul = false );
::rtl::OUString dumpUnicodeArray( const String& rName, sal_Int32 nLen, bool bHideTrailingNul = false );
::rtl::OUString dumpNullCharArray( const String& rName, rtl_TextEncoding eTextEnc );
::rtl::OUString dumpNullUnicodeArray( const String& rName );

View file

@ -50,7 +50,7 @@ public:
void addShape(
const oox::core::XmlFilterBase& rFilterBase,
const SlidePersist& rPersist,
const oox::drawingml::ThemePtr& rxTheme,
const oox::drawingml::Theme* pTheme,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
const com::sun::star::awt::Rectangle* pShapeRect = 0,
::oox::drawingml::ShapeIdMap* pShapeMap = 0 );

View file

@ -41,25 +41,19 @@ namespace xls {
// ============================================================================
/** Absolute position in spreadsheet (in EMUs) independent from cells. */
struct AnchorPosModel
struct AnchorPosModel : public ::oox::drawingml::EmuPoint
{
sal_Int64 mnX; /// Absolute X coordinate (EMUs).
sal_Int64 mnY; /// Absolute Y coordinate (EMUs).
explicit AnchorPosModel();
inline bool isValid() const { return (mnX >= 0) && (mnY >= 0); }
inline explicit AnchorPosModel() : ::oox::drawingml::EmuPoint( -1, -1 ) {}
inline bool isValid() const { return (X >= 0) && (Y >= 0); }
};
// ----------------------------------------------------------------------------
/** Absolute size in spreadsheet (in EMUs). */
struct AnchorSizeModel
struct AnchorSizeModel : public ::oox::drawingml::EmuSize
{
sal_Int64 mnWidth; /// Total width (EMUs).
sal_Int64 mnHeight; /// Total height (EMUs).
explicit AnchorSizeModel();
inline bool isValid() const { return (mnWidth >= 0) && (mnHeight >= 0); }
inline explicit AnchorSizeModel() : ::oox::drawingml::EmuSize( -1, -1 ) {}
inline bool isValid() const { return (Width >= 0) && (Height >= 0); }
};
// ----------------------------------------------------------------------------

View file

@ -509,8 +509,13 @@ struct ApiBorderData
bool mbDiagUsed; /// True = diagonal line format used.
explicit ApiBorderData();
/** Returns true, if any of the outer border lines is visible. */
bool hasAnyOuterBorder() const;
};
bool operator==( const ApiBorderData& rLeft, const ApiBorderData& rRight );
// ============================================================================
class Border : public WorkbookHelper
@ -544,6 +549,11 @@ public:
/** Final processing after import of all style settings. */
void finalizeImport();
/** Returns the border model structure. */
inline const BorderModel& getModel() const { return maModel; }
/** Returns the converted API border data struct. */
inline const ApiBorderData& getApiData() const { return maApiData; }
/** Writes all border attributes to the passed property map. */
void writeToPropertyMap( PropertyMap& rPropMap ) const;
@ -619,6 +629,8 @@ struct ApiSolidFillData
explicit ApiSolidFillData();
};
bool operator==( const ApiSolidFillData& rLeft, const ApiSolidFillData& rRight );
// ============================================================================
/** Contains cell fill attributes, either a pattern fill or a gradient fill. */
@ -665,6 +677,13 @@ public:
/** Final processing after import of all style settings. */
void finalizeImport();
/** Returns the fill pattern model structure, if extant. */
inline const PatternFillModel* getPatternModel() const { return mxPatternModel.get(); }
/** Returns the fill gradient model structure, if extant. */
inline const GradientFillModel* getGradientModel() const { return mxGradientModel.get(); }
/** Returns the converted API fill data struct. */
inline const ApiSolidFillData& getApiData() const { return maApiData; }
/** Writes all fill attributes to the passed property map. */
void writeToPropertyMap( PropertyMap& rPropMap ) const;
@ -734,6 +753,9 @@ public:
/** Final processing after import of all style settings. */
void finalizeImport();
/** Returns true, if the XF is a cell XF, and false, if it is a style XF. */
inline bool isCellXf() const { return maModel.mbCellXf; }
/** Returns the referred font object. */
FontRef getFont() const;
/** Returns the alignment data of this style. */
@ -751,13 +773,13 @@ public:
private:
/** Sets 'attribute used' flags from the passed BIFF bit field. */
void setBiffUsedFlags( sal_uInt8 nUsedFlags );
/** Updates own used flags from the passed cell style XF. */
void updateUsedFlags( const Xf& rStyleXf );
private:
XfModel maModel; /// Cell XF or style XF model data.
Alignment maAlignment; /// Cell alignment data.
Protection maProtection; /// Cell protection data.
::com::sun::star::table::CellVertJustify
meRotationRef; /// Rotation reference dependent on border.
};
typedef ::boost::shared_ptr< Xf > XfRef;
@ -964,6 +986,8 @@ public:
sal_Int32 getPaletteColor( sal_Int32 nIndex ) const;
/** Returns the specified font object. */
FontRef getFont( sal_Int32 nFontId ) const;
/** Returns the specified border object. */
BorderRef getBorder( sal_Int32 nBorderId ) const;
/** Returns the specified cell format object. */
XfRef getCellXf( sal_Int32 nXfId ) const;
/** Returns the specified style format object. */
@ -978,6 +1002,11 @@ public:
/** Returns the model of the default application font (used in the "Normal" cell style). */
const FontModel& getDefaultFontModel() const;
/** Returns true, if the specified borders are equal. */
bool equalBorders( sal_Int32 nBorderId1, sal_Int32 nBorderId2 ) const;
/** Returns true, if the specified fills are equal. */
bool equalFills( sal_Int32 nFillId1, sal_Int32 nFillId2 ) const;
/** Returns the default style sheet for unused cells. */
::rtl::OUString getDefaultStyleName() const;
/** Creates the style sheet described by the style XF with the passed identifier. */

View file

@ -302,8 +302,6 @@ public:
WorksheetBuffer& getWorksheets() const;
/** Returns the office theme object read from the theme substorage. */
ThemeBuffer& getTheme() const;
/** Returns the office theme object reference read from the theme substorage. */
::boost::shared_ptr< ::oox::drawingml::Theme > getThemeRef() const;
/** Returns all cell formatting objects read from the styles substream. */
StylesBuffer& getStyles() const;
/** Returns the shared strings read from the shared strings substream. */

0
oox/source/core/filterbase.cxx Normal file → Executable file
View file

View file

@ -85,13 +85,25 @@ namespace core {
// ============================================================================
namespace {
bool lclHasSuffix( const OUString& rFragmentPath, const OUString& rSuffix )
{
sal_Int32 nSuffixPos = rFragmentPath.getLength() - rSuffix.getLength();
return (nSuffixPos >= 0) && rFragmentPath.match( rSuffix, nSuffixPos );
}
} // namespace
// ============================================================================
struct XmlFilterBaseImpl
{
typedef RefMap< OUString, Relations > RelationsMap;
Reference< XFastParser > mxFastParser;
OUString maBinSuffix;
Reference< XFastTokenHandler >
mxTokenHandler;
OUString maVmlSuffix;
RelationsMap maRelationsMap;
TextFieldStack maTextFieldStack;
explicit XmlFilterBaseImpl();
@ -101,7 +113,7 @@ struct XmlFilterBaseImpl
XmlFilterBaseImpl::XmlFilterBaseImpl() :
maBinSuffix( CREATE_OUSTRING( ".bin" ) ),
mxTokenHandler( new FastTokenHandler )
maVmlSuffix( CREATE_OUSTRING( ".vml" ) )
{
}
@ -113,6 +125,38 @@ XmlFilterBase::XmlFilterBase( const Reference< XMultiServiceFactory >& rxGlobalF
mnRelId( 1 ),
mnMaxDocId( 0 )
{
try
{
// create the fast parser
mxImpl->mxFastParser.set( rxGlobalFactory->createInstance( CREATE_OUSTRING( "com.sun.star.xml.sax.FastParser" ) ), UNO_QUERY_THROW );
mxImpl->mxFastParser->setTokenHandler( new FastTokenHandler );
// register XML namespaces
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://www.w3.org/XML/1998/namespace" ), NMSP_XML );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/package/2006/relationships" ), NMSP_PACKAGE_RELATIONSHIPS );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/officeDocument/2006/relationships" ), NMSP_RELATIONSHIPS );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/main" ), NMSP_DRAWINGML );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ), NMSP_DIAGRAM );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/chart" ), NMSP_CHART );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/chartDrawing" ), NMSP_CDR );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:vml" ), NMSP_VML );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:office" ), NMSP_OFFICE );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:word" ), NMSP_VML_DOC );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:excel" ), NMSP_VML_XLS );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:powerpoint" ), NMSP_VML_PPT );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/2006/activeX" ), NMSP_AX );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/spreadsheetml/2006/main"), NMSP_XLS );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" ), NMSP_XDR );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/excel/2006/main" ), NMSP_XM );
mxImpl->mxFastParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/presentationml/2006/main"), NMSP_PPT );
}
catch( Exception& )
{
}
}
XmlFilterBase::~XmlFilterBase()
@ -140,8 +184,7 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& r
return false;
// try to import binary streams (fragment extension must be '.bin')
sal_Int32 nBinSuffixPos = aFragmentPath.getLength() - mxImpl->maBinSuffix.getLength();
if( (nBinSuffixPos >= 0) && aFragmentPath.match( mxImpl->maBinSuffix, nBinSuffixPos ) )
if( lclHasSuffix( aFragmentPath, mxImpl->maBinSuffix ) )
{
try
{
@ -170,40 +213,16 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& r
if( !xDocHandler.is() )
return false;
// check that the fast parser exists
if( !mxImpl->mxFastParser.is() )
return false;
// try to import XML stream
try
{
// try to open the fragment stream (this may fail - do not assert)
Reference< XInputStream > xInStrm( rxHandler->openFragmentStream(), UNO_SET_THROW );
// create the fast parser
Reference< XFastParser > xParser( getGlobalFactory()->createInstance(
CREATE_OUSTRING( "com.sun.star.xml.sax.FastParser" ) ), UNO_QUERY_THROW );
xParser->setFastDocumentHandler( xDocHandler );
xParser->setTokenHandler( mxImpl->mxTokenHandler );
// register XML namespaces
xParser->registerNamespace( CREATE_OUSTRING( "http://www.w3.org/XML/1998/namespace" ), NMSP_XML );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/package/2006/relationships" ), NMSP_PACKAGE_RELATIONSHIPS );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/officeDocument/2006/relationships" ), NMSP_RELATIONSHIPS );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/main" ), NMSP_DRAWINGML );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ), NMSP_DIAGRAM );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/chart" ), NMSP_CHART );
xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:vml" ), NMSP_VML );
xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:office" ), NMSP_OFFICE );
xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:word" ), NMSP_VML_DOC );
xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:excel" ), NMSP_VML_XLS );
xParser->registerNamespace( CREATE_OUSTRING( "urn:schemas-microsoft-com:office:powerpoint" ), NMSP_VML_PPT );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/2006/activeX" ), NMSP_AX );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/spreadsheetml/2006/main"), NMSP_XLS );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" ), NMSP_XDR );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.microsoft.com/office/excel/2006/main" ), NMSP_XM );
xParser->registerNamespace( CREATE_OUSTRING( "http://schemas.openxmlformats.org/presentationml/2006/main"), NMSP_PPT );
// create the input source and parse the stream
InputSource aSource;
aSource.aInputStream = xInStrm;
@ -211,7 +230,8 @@ bool XmlFilterBase::importFragment( const ::rtl::Reference< FragmentHandler >& r
// own try/catch block for showing parser failure assertion with fragment path
try
{
xParser->parseStream( aSource );
mxImpl->mxFastParser->setFastDocumentHandler( xDocHandler );
mxImpl->mxFastParser->parseStream( aSource );
return true;
}
catch( Exception& )

View file

@ -33,6 +33,9 @@
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::awt::Point;
using ::com::sun::star::awt::Size;
using ::com::sun::star::drawing::XShapes;
using ::com::sun::star::chart2::XChartDocument;
using ::com::sun::star::chart2::data::XDataProvider;
using ::com::sun::star::chart2::data::XDataSequence;
@ -53,14 +56,15 @@ ChartConverter::~ChartConverter()
}
void ChartConverter::convertFromModel( XmlFilterBase& rFilter,
ChartSpaceModel& rModel, const Reference< XChartDocument >& rxChartDoc )
ChartSpaceModel& rChartModel, const Reference< XChartDocument >& rxChartDoc,
const Reference< XShapes >& rxExternalPage, const Point& rChartPos, const Size& rChartSize )
{
OSL_ENSURE( rxChartDoc.is(), "ChartConverter::convertFromModel - missing chart document" );
if( rxChartDoc.is() )
{
ConverterRoot aConvBase( rFilter, *this, rxChartDoc, rModel );
ChartSpaceConverter aSpaceConv( aConvBase, rModel );
aSpaceConv.convertFromModel();
ConverterRoot aConvBase( rFilter, *this, rChartModel, rxChartDoc, rChartSize );
ChartSpaceConverter aSpaceConv( aConvBase, rChartModel );
aSpaceConv.convertFromModel( rxExternalPage, rChartPos );
}
}

View file

@ -0,0 +1,239 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: chartdrawingfragment.cxx,v $
*
* $Revision: 1.1 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "oox/drawingml/chart/chartdrawingfragment.hxx"
#include "oox/core/xmlfilterbase.hxx"
#include "oox/drawingml/connectorshapecontext.hxx"
#include "oox/drawingml/graphicshapecontext.hxx"
#include "oox/drawingml/shapecontext.hxx"
#include "oox/drawingml/shapegroupcontext.hxx"
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::awt::Point;
using ::com::sun::star::awt::Rectangle;
using ::com::sun::star::awt::Size;
using ::com::sun::star::drawing::XShapes;
using ::oox::core::ContextHandlerRef;
using ::oox::core::FragmentHandler2;
using ::oox::core::XmlFilterBase;
namespace oox {
namespace drawingml {
namespace chart {
// ============================================================================
ShapeAnchor::ShapeAnchor( bool bRelSize ) :
mbRelSize( bRelSize )
{
}
void ShapeAnchor::importExt( const AttributeList& rAttribs )
{
OSL_ENSURE( !mbRelSize, "ShapeAnchor::importExt - unexpected 'cdr:ext' element" );
maSize.Width = rAttribs.getHyper( XML_cx, 0 );
maSize.Height = rAttribs.getHyper( XML_cy, 0 );
}
void ShapeAnchor::setPos( sal_Int32 nElement, sal_Int32 nParentContext, const OUString& rValue )
{
AnchorPosModel* pAnchorPos = 0;
switch( nParentContext )
{
case CDR_TOKEN( from ):
pAnchorPos = &maFrom;
break;
case CDR_TOKEN( to ):
OSL_ENSURE( mbRelSize, "ShapeAnchor::setPos - unexpected 'cdr:to' element" );
pAnchorPos = &maTo;
break;
default:
OSL_ENSURE( false, "ShapeAnchor::setPos - unexpected parent element" );
}
if( pAnchorPos ) switch( nElement )
{
case CDR_TOKEN( x ): pAnchorPos->mfX = rValue.toDouble(); break;
case CDR_TOKEN( y ): pAnchorPos->mfY = rValue.toDouble(); break;
default: OSL_ENSURE( false, "ShapeAnchor::setPos - unexpected element" );
}
}
Rectangle ShapeAnchor::calcEmuLocation( const EmuRectangle& rEmuChartRect ) const
{
Rectangle aLoc( -1, -1, -1, -1 );
OSL_ENSURE( maFrom.isValid(), "ShapeAnchor::calcEmuLocation - invalid from position" );
OSL_ENSURE( mbRelSize ? maTo.isValid() : maSize.isValid(), "ShapeAnchor::calcEmuLocation - invalid to/size" );
if( maFrom.isValid() && (mbRelSize ? maTo.isValid() : maSize.isValid()) )
{
// calculate shape position
aLoc.X = getLimitedValue< sal_Int32, double >( maFrom.mfX * rEmuChartRect.Width, 0, SAL_MAX_INT32 );
aLoc.Y = getLimitedValue< sal_Int32, double >( maFrom.mfY * rEmuChartRect.Height, 0, SAL_MAX_INT32 );
// calculate shape size
if( mbRelSize )
{
aLoc.Width = getLimitedValue< sal_Int32, double >( maTo.mfX * rEmuChartRect.Width, 0, SAL_MAX_INT32 ) - aLoc.X;
if( aLoc.Width < 0 )
{
aLoc.X += aLoc.Width;
aLoc.Width *= -1;
}
aLoc.Height = getLimitedValue< sal_Int32, double >( maTo.mfY * rEmuChartRect.Height, 0, SAL_MAX_INT32 ) - aLoc.Y;
if( aLoc.Height < 0 )
{
aLoc.Y += aLoc.Height;
aLoc.Height *= -1;
}
}
else
{
aLoc.Width = getLimitedValue< sal_Int32, sal_Int64 >( maSize.Width, 0, SAL_MAX_INT32 );
aLoc.Height = getLimitedValue< sal_Int32, sal_Int64 >( maSize.Height, 0, SAL_MAX_INT32 );
}
}
return aLoc;
}
// ============================================================================
ChartDrawingFragment::ChartDrawingFragment( XmlFilterBase& rFilter,
const OUString& rFragmentPath, const Reference< XShapes >& rxDrawPage,
const Size& rChartSize, const Point& rShapesOffset, bool bOleSupport ) :
FragmentHandler2( rFilter, rFragmentPath ),
mxDrawPage( rxDrawPage ),
mbOleSupport( bOleSupport )
{
maEmuChartRect.X = static_cast< sal_Int64 >( rShapesOffset.X ) * 360;
maEmuChartRect.Y = static_cast< sal_Int64 >( rShapesOffset.Y ) * 360;
maEmuChartRect.Width = static_cast< sal_Int64 >( rChartSize.Width ) * 360;
maEmuChartRect.Height = static_cast< sal_Int64 >( rChartSize.Height ) * 360;
}
ChartDrawingFragment::~ChartDrawingFragment()
{
}
ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
{
switch( getCurrentElement() )
{
case XML_ROOT_CONTEXT:
if( nElement == C_TOKEN( userShapes ) ) return this;
break;
case C_TOKEN( userShapes ):
switch( nElement )
{
case CDR_TOKEN( absSizeAnchor ):
mxAnchor.reset( new ShapeAnchor( false ) );
return this;
case CDR_TOKEN( relSizeAnchor ):
mxAnchor.reset( new ShapeAnchor( true ) );
return this;
}
break;
case CDR_TOKEN( absSizeAnchor ):
case CDR_TOKEN( relSizeAnchor ):
switch( nElement )
{
case CDR_TOKEN( sp ):
mxShape.reset( new Shape( "com.sun.star.drawing.CustomShape" ) );
return new ShapeContext( *this, ShapePtr(), mxShape );
case CDR_TOKEN( cxnSp ):
mxShape.reset( new Shape( "com.sun.star.drawing.ConnectorShape" ) );
return new ConnectorShapeContext( *this, ShapePtr(), mxShape );
case CDR_TOKEN( pic ):
mxShape.reset( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) );
return new GraphicShapeContext( *this, ShapePtr(), mxShape );
case CDR_TOKEN( graphicFrame ):
if( !mbOleSupport )
return 0;
mxShape.reset( new Shape( "com.sun.star.drawing.OLE2Shape" ) );
return new GraphicalObjectFrameContext( *this, ShapePtr(), mxShape, true );
case CDR_TOKEN( grpSp ):
mxShape.reset( new Shape( "com.sun.star.drawing.GroupShape" ) );
return new ShapeGroupContext( *this, ShapePtr(), mxShape );
case CDR_TOKEN( from ):
case CDR_TOKEN( to ):
return this;
case CDR_TOKEN( ext ):
if( mxAnchor.get() ) mxAnchor->importExt( rAttribs );
return 0;
}
break;
case CDR_TOKEN( from ):
case CDR_TOKEN( to ):
switch( nElement )
{
case CDR_TOKEN( x ):
case CDR_TOKEN( y ):
return this; // collect value in onEndElement()
}
break;
}
return 0;
}
void ChartDrawingFragment::onEndElement( const OUString& rChars )
{
switch( getCurrentElement() )
{
case CDR_TOKEN( x ):
case CDR_TOKEN( y ):
if( mxAnchor.get() ) mxAnchor->setPos( getCurrentElement(), getPreviousElement(), rChars );
break;
case CDR_TOKEN( absSizeAnchor ):
case CDR_TOKEN( relSizeAnchor ):
if( mxDrawPage.is() && mxShape.get() && mxAnchor.get() )
{
Rectangle aLoc = mxAnchor->calcEmuLocation( maEmuChartRect );
if( (aLoc.X >= 0) && (aLoc.Y >= 0) && (aLoc.Width >= 0) && (aLoc.Height >= 0) )
mxShape->addShape( getFilter(), getFilter().getCurrentTheme(), mxDrawPage, &aLoc );
}
mxShape.reset();
mxAnchor.reset();
break;
}
}
// ============================================================================
} // namespace chart
} // namespace drawingml
} // namespace oox

View file

@ -26,24 +26,29 @@
************************************************************************/
#include "oox/drawingml/chart/chartspaceconverter.hxx"
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart2/data/XDataReceiver.hpp>
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include "oox/core/xmlfilterbase.hxx"
#include "oox/drawingml/chart/chartconverter.hxx"
#include "oox/drawingml/chart/chartdrawingfragment.hxx"
#include "oox/drawingml/chart/chartspacemodel.hxx"
#include "oox/drawingml/chart/plotareaconverter.hxx"
#include "oox/drawingml/chart/titleconverter.hxx"
#include "properties.hxx"
using ::rtl::OUString;
using ::com::sun::star::awt::Point;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::util::XNumberFormatsSupplier;
using ::com::sun::star::drawing::XDrawPageSupplier;
using ::com::sun::star::drawing::XShapes;
using ::com::sun::star::chart2::XDiagram;
using ::com::sun::star::chart2::XTitled;
using ::com::sun::star::chart2::data::XDataReceiver;
@ -63,7 +68,7 @@ ChartSpaceConverter::~ChartSpaceConverter()
{
}
void ChartSpaceConverter::convertFromModel()
void ChartSpaceConverter::convertFromModel( const Reference< XShapes >& rxExternalPage, const Point& rChartPos )
{
/* create data provider (virtual function in the ChartConverter class,
derived converters may create an external data provider) */
@ -81,8 +86,8 @@ void ChartSpaceConverter::convertFromModel()
}
// formatting of the chart background
PropertySet aPropSet( getChartDocument()->getPageBackground() );
getFormatter().convertFrameFormatting( aPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE );
PropertySet aBackPropSet( getChartDocument()->getPageBackground() );
getFormatter().convertFrameFormatting( aBackPropSet, mrModel.mxShapeProp, OBJECTTYPE_CHARTSPACE );
// convert plot area (container of all chart type groups)
PlotAreaConverter aPlotAreaConv( *this, mrModel.mxPlotArea.getOrCreate() );
@ -121,10 +126,10 @@ void ChartSpaceConverter::convertFromModel()
}
// legend
if( mrModel.mxLegend.is() )
if( xDiagram.is() && mrModel.mxLegend.is() )
{
LegendConverter aLegendConv( *this, *mrModel.mxLegend );
aLegendConv.convertFromModel( getChartDocument()->getFirstDiagram() );
aLegendConv.convertFromModel( xDiagram );
}
// treatment of missing values
@ -142,12 +147,48 @@ void ChartSpaceConverter::convertFromModel()
aDiaProp.setProperty( PROP_MissingValueTreatment, nMissingValues );
}
// set the IncludeHiddenCells property via the old API as only this ensures that the data provider and al created sequences get this flag correctly
Reference< com::sun::star::chart::XChartDocument > xStandardApiChartDoc( getChartDocument(), UNO_QUERY );
if( xStandardApiChartDoc.is() )
Reference< com::sun::star::chart::XChartDocument > xOldChartDoc( getChartDocument(), UNO_QUERY );
if( xOldChartDoc.is() )
{
/* Set the IncludeHiddenCells property via the old API as only this
ensures that the data provider and all created sequences get this
flag correctly. */
PropertySet aOldDiaProp( xOldChartDoc->getDiagram() );
aOldDiaProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly );
}
// embedded drawing shapes
if( mrModel.maDrawingPath.getLength() > 0 ) try
{
/* Get the internal draw page of the chart document, if no external
drawing page has been passed. */
Reference< XShapes > xShapes;
Point aShapesOffset( 0, 0 );
if( rxExternalPage.is() )
{
xShapes = rxExternalPage;
// offset for embedded shapes to move them inside the chart area
aShapesOffset = rChartPos;
}
else
{
Reference< XDrawPageSupplier > xDrawPageSupp( getChartDocument(), UNO_QUERY_THROW );
xShapes.set( xDrawPageSupp->getDrawPage(), UNO_QUERY_THROW );
}
/* If an external drawing page is passed, all embedded shapes will be
inserted there (used e.g. with 'chart sheets' in spreadsheet
documents). In this case, all types of shapes including OLE objects
are supported. If the shapes are inserted into the internal chart
drawing page instead, it is not possible to embed OLE objects. */
bool bOleSupport = rxExternalPage.is();
// now, xShapes is not null anymore
getFilter().importFragment( new ChartDrawingFragment(
getFilter(), mrModel.maDrawingPath, xShapes, getChartSize(), aShapesOffset, bOleSupport ) );
}
catch( Exception& )
{
PropertySet aStandardApiDiagramProp( xStandardApiChartDoc->getDiagram() );
aStandardApiDiagramProp.setProperty( PROP_IncludeHiddenCells, !mrModel.mbPlotVisOnly );
}
}

View file

@ -75,6 +75,9 @@ ContextHandlerRef ChartSpaceFragment::onCreateContext( sal_Int32 nElement, const
return 0;
case C_TOKEN( txPr ):
return new TextBodyContext( *this, mrModel.mxTextProp.create() );
case C_TOKEN( userShapes ):
mrModel.maDrawingPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
return 0;
}
break;

View file

@ -40,6 +40,7 @@ using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::frame::XModel;
using ::com::sun::star::awt::Size;
using ::com::sun::star::chart2::XChartDocument;
using ::oox::core::XmlFilterBase;
@ -51,16 +52,18 @@ namespace chart {
struct ConverterData
{
ObjectFormatter maFormatter;
XmlFilterBase& mrFilter;
ChartConverter& mrConverter;
Reference< XChartDocument > mxDoc;
ObjectFormatter maFormatter;
Size maSize;
explicit ConverterData(
XmlFilterBase& rFilter,
ChartConverter& rChartConverter,
const ChartSpaceModel& rChartModel,
const Reference< XChartDocument >& rxChartDoc,
const ChartSpaceModel& rChartSpace );
const Size& rChartSize );
~ConverterData();
};
@ -69,12 +72,14 @@ struct ConverterData
ConverterData::ConverterData(
XmlFilterBase& rFilter,
ChartConverter& rChartConverter,
const ChartSpaceModel& rChartModel,
const Reference< XChartDocument >& rxChartDoc,
const ChartSpaceModel& rChartSpace ) :
const Size& rChartSize ) :
maFormatter( rFilter, rxChartDoc, rChartModel ),
mrFilter( rFilter ),
mrConverter( rChartConverter ),
mxDoc( rxChartDoc ),
maFormatter( rFilter, rxChartDoc, rChartSpace )
maSize( rChartSize )
{
OSL_ENSURE( mxDoc.is(), "ConverterData::ConverterData - missing chart document" );
// lock the model to suppress internal updates during conversion
@ -106,9 +111,10 @@ ConverterData::~ConverterData()
ConverterRoot::ConverterRoot(
XmlFilterBase& rFilter,
ChartConverter& rChartConverter,
const ChartSpaceModel& rChartModel,
const Reference< XChartDocument >& rxChartDoc,
const ChartSpaceModel& rChartSpace ) :
mxData( new ConverterData( rFilter, rChartConverter, rxChartDoc, rChartSpace ) )
const Size& rChartSize ) :
mxData( new ConverterData( rFilter, rChartConverter, rChartModel, rxChartDoc, rChartSize ) )
{
}
@ -151,6 +157,11 @@ Reference< XChartDocument > ConverterRoot::getChartDocument() const
return mxData->mxDoc;
}
const Size& ConverterRoot::getChartSize() const
{
return mxData->maSize;
}
ObjectFormatter& ConverterRoot::getFormatter() const
{
return mxData->maFormatter;

View file

@ -46,6 +46,7 @@ SLOFILES = \
$(SLO)$/axismodel.obj \
$(SLO)$/chartcontextbase.obj \
$(SLO)$/chartconverter.obj \
$(SLO)$/chartdrawingfragment.obj \
$(SLO)$/chartspaceconverter.obj \
$(SLO)$/chartspacefragment.obj \
$(SLO)$/chartspacemodel.obj \

View file

@ -106,8 +106,9 @@ Reference< XFastContextHandler > GraphicShapeContext::createFastChildContext( sa
// ============================================================================
// CT_GraphicalObjectFrameContext
GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr )
: ShapeContext( rParent, pMasterShapePtr, pShapePtr )
GraphicalObjectFrameContext::GraphicalObjectFrameContext( ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr, bool bEmbedShapesInChart ) :
ShapeContext( rParent, pMasterShapePtr, pShapePtr ),
mbEmbedShapesInChart( bEmbedShapesInChart )
{
}
@ -135,7 +136,7 @@ Reference< XFastContextHandler > GraphicalObjectFrameContext::createFastChildCon
else if ( sUri.equalsAscii( "http://schemas.openxmlformats.org/drawingml/2006/diagram" ) )
xRet.set( new DiagramGraphicDataContext( *this, mpShapePtr ) );
else if ( sUri.equalsAscii( "http://schemas.openxmlformats.org/drawingml/2006/chart" ) )
xRet.set( new ChartGraphicDataContext( *this, mpShapePtr ) );
xRet.set( new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart ) );
else if ( sUri.compareToAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) == 0 )
xRet.set( new table::TableContext( *this, mpShapePtr ) );
else
@ -349,22 +350,24 @@ Reference< XFastContextHandler > DiagramGraphicDataContext::createFastChildConte
class CreateChartCallback : public CreateShapeCallback
{
public:
explicit CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath );
virtual void onXShapeCreated( const Reference< drawing::XShape >& rxShape ) const;
explicit CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEmbedShapes );
virtual void onXShapeCreated( const Reference< drawing::XShape >& rxShape, const Reference< drawing::XShapes >& rxShapes ) const;
private:
OUString maFragmentPath;
bool mbEmbedShapes;
};
// ----------------------------------------------------------------------------
CreateChartCallback::CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath ) :
CreateChartCallback::CreateChartCallback( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEmbedShapes ) :
CreateShapeCallback( rFilter ),
maFragmentPath( rFragmentPath )
maFragmentPath( rFragmentPath ),
mbEmbedShapes( bEmbedShapes )
{
}
void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& rxShape ) const
void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& rxShape, const Reference< drawing::XShapes >& rxShapes ) const
{
OSL_ENSURE( maFragmentPath.getLength() > 0, "CreateChartCallback::onXShapeCreated - missing chart fragment" );
if( maFragmentPath.getLength() > 0 ) try
@ -376,14 +379,17 @@ void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& r
// get the XModel interface of the embedded object from the OLE shape
Reference< frame::XModel > xDocModel;
aShapeProp.getProperty( xDocModel, PROP_Model );
Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW );
// load the chart data from the XML fragment
chart::ChartSpaceModel aModel;
mrFilter.importFragment( new chart::ChartSpaceFragment( mrFilter, maFragmentPath, aModel ) );
// convert imported chart model to chart document
Reference< chart2::XChartDocument > xChartDoc( xDocModel, UNO_QUERY_THROW );
mrFilter.getChartConverter().convertFromModel( mrFilter, aModel, xChartDoc );
Reference< drawing::XShapes > xExternalPage;
if( !mbEmbedShapes )
xExternalPage = rxShapes;
mrFilter.getChartConverter().convertFromModel( mrFilter, aModel, xChartDoc, xExternalPage, rxShape->getPosition(), rxShape->getSize() );
}
catch( Exception& )
{
@ -392,8 +398,9 @@ void CreateChartCallback::onXShapeCreated( const Reference< drawing::XShape >& r
// ============================================================================
ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler& rParent, const ShapePtr& rxShape ) :
ShapeContext( rParent, ShapePtr(), rxShape )
ChartGraphicDataContext::ChartGraphicDataContext( ContextHandler& rParent, const ShapePtr& rxShape, bool bEmbedShapes ) :
ShapeContext( rParent, ShapePtr(), rxShape ),
mbEmbedShapes( bEmbedShapes )
{
rxShape->setServiceName( "com.sun.star.drawing.OLE2Shape" );
}
@ -405,7 +412,7 @@ Reference< XFastContextHandler > ChartGraphicDataContext::createFastChildContext
{
AttributeList aAttribs( rxAttribs );
OUString aFragmentPath = getFragmentPathFromRelId( aAttribs.getString( R_TOKEN( id ), OUString() ) );
CreateShapeCallbackRef xCallback( new CreateChartCallback( getFilter(), aFragmentPath ) );
CreateShapeCallbackRef xCallback( new CreateChartCallback( getFilter(), aFragmentPath, mbEmbedShapes ) );
mpShapePtr->setCreateShapeCallback( xCallback );
}
return 0;

View file

@ -66,6 +66,7 @@ SLOFILES = \
$(SLO)$/spdefcontext.obj\
$(SLO)$/textbody.obj\
$(SLO)$/textbodycontext.obj\
$(SLO)$/textbodyproperties.obj\
$(SLO)$/textbodypropertiescontext.obj\
$(SLO)$/textcharacterproperties.obj\
$(SLO)$/textcharacterpropertiescontext.obj\

View file

@ -47,6 +47,7 @@
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <com/sun/star/document/XActionLockable.hpp>
using rtl::OUString;
using namespace ::oox::core;
@ -76,7 +77,7 @@ OUString CreateShapeCallback::onCreateXShape( const OUString& rServiceName, cons
return rServiceName;
}
void CreateShapeCallback::onXShapeCreated( const Reference< XShape >& ) const
void CreateShapeCallback::onXShapeCreated( const Reference< XShape >&, const Reference< XShapes >& ) const
{
}
@ -89,7 +90,7 @@ Shape::Shape( const sal_Char* pServiceName )
, mpCustomShapePropertiesPtr( new CustomShapeProperties )
, mpMasterTextListStyle( new TextListStyle )
, mnSubType( 0 )
, mnIndex( 0 )
, mnSubTypeIndex( -1 )
, mnRotation( 0 )
, mbFlipH( false )
, mbFlipV( false )
@ -135,7 +136,7 @@ const ShapeStyleRef* Shape::getShapeStyleRef( sal_Int32 nRefType ) const
void Shape::addShape(
const ::oox::core::XmlFilterBase& rFilterBase,
const ThemePtr& rxTheme,
const Theme* pTheme,
const Reference< XShapes >& rxShapes,
const awt::Rectangle* pShapeRect,
ShapeIdMap* pShapeMap )
@ -145,7 +146,7 @@ void Shape::addShape(
rtl::OUString sServiceName( msServiceName );
if( sServiceName.getLength() )
{
Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, rxTheme, rxShapes, pShapeRect, sal_False ) );
Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, pShapeRect, sal_False ) );
if( pShapeMap && msId.getLength() )
{
@ -155,7 +156,7 @@ void Shape::addShape(
// if this is a group shape, we have to add also each child shape
Reference< XShapes > xShapes( xShape, UNO_QUERY );
if ( xShapes.is() )
addChildren( rFilterBase, *this, rxTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap );
addChildren( rFilterBase, *this, pTheme, xShapes, pShapeRect ? *pShapeRect : awt::Rectangle( maPosition.X, maPosition.Y, maSize.Width, maSize.Height ), pShapeMap );
}
}
catch( const Exception& )
@ -184,7 +185,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape )
void Shape::addChildren(
const ::oox::core::XmlFilterBase& rFilterBase,
Shape& rMaster,
const ThemePtr& rxTheme,
const Theme* pTheme,
const Reference< XShapes >& rxShapes,
const awt::Rectangle& rClientRect,
ShapeIdMap* pShapeMap )
@ -235,14 +236,14 @@ void Shape::addChildren(
pShapeRect = &aShapeRect;
}
}
(*aIter++)->addShape( rFilterBase, rxTheme, rxShapes, pShapeRect, pShapeMap );
(*aIter++)->addShape( rFilterBase, pTheme, rxShapes, pShapeRect, pShapeMap );
}
}
Reference< XShape > Shape::createAndInsert(
const ::oox::core::XmlFilterBase& rFilterBase,
const rtl::OUString& rServiceName,
const ThemePtr& rxTheme,
const Theme* pTheme,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes,
const awt::Rectangle* pShapeRect,
sal_Bool bClearText )
@ -365,6 +366,10 @@ Reference< XShape > Shape::createAndInsert(
}
rxShapes->add( mxShape );
Reference< document::XActionLockable > xLockable( mxShape, UNO_QUERY );
if( xLockable.is() )
xLockable->addActionLock();
// sj: removing default text of placeholder objects such as SlideNumberShape or HeaderShape
if ( bClearText )
{
@ -383,23 +388,23 @@ Reference< XShape > Shape::createAndInsert(
aFillProperties.moFillType = XML_noFill;
sal_Int32 nFillPhClr = -1;
if( rxTheme.get() )
if( pTheme )
{
if( const ShapeStyleRef* pLineRef = getShapeStyleRef( XML_lnRef ) )
{
if( const LineProperties* pLineProps = rxTheme->getLineStyle( pLineRef->mnThemedIdx ) )
if( const LineProperties* pLineProps = pTheme->getLineStyle( pLineRef->mnThemedIdx ) )
aLineProperties.assignUsed( *pLineProps );
nLinePhClr = pLineRef->maPhClr.getColor( rFilterBase );
}
if( const ShapeStyleRef* pFillRef = getShapeStyleRef( XML_fillRef ) )
{
if( const FillProperties* pFillProps = rxTheme->getFillStyle( pFillRef->mnThemedIdx ) )
if( const FillProperties* pFillProps = pTheme->getFillStyle( pFillRef->mnThemedIdx ) )
aFillProperties.assignUsed( *pFillProps );
nFillPhClr = pFillRef->maPhClr.getColor( rFilterBase );
}
// if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_fillRef ) )
// {
// if( const EffectProperties* pEffectProps = rxTheme->getEffectStyle( pEffectRef->mnThemedIdx ) )
// if( const EffectProperties* pEffectProps = pTheme->getEffectStyle( pEffectRef->mnThemedIdx ) )
// aEffectProperties.assignUsed( *pEffectProps );
// nEffectPhClr = pEffectRef->maPhClr.getColor( rFilterBase );
// }
@ -409,13 +414,23 @@ Reference< XShape > Shape::createAndInsert(
aFillProperties.assignUsed( getFillProperties() );
PropertyMap aShapeProperties;
PropertyMap::const_iterator aShapePropIter;
aShapeProperties.insert( getShapeProperties().begin(), getShapeProperties().end() );
if( mxCreateCallback.get() )
aShapeProperties.insert( mxCreateCallback->getShapeProperties().begin(), mxCreateCallback->getShapeProperties().end() );
{
for ( aShapePropIter = mxCreateCallback->getShapeProperties().begin();
aShapePropIter != mxCreateCallback->getShapeProperties().end(); aShapePropIter++ )
aShapeProperties[ (*aShapePropIter).first ] = (*aShapePropIter).second;
}
// add properties from textbody to shape properties
if( mpTextBody.get() )
aShapeProperties.insert( mpTextBody->getTextProperties().maPropertyMap.begin(), mpTextBody->getTextProperties().maPropertyMap.end() );
{
for ( aShapePropIter = mpTextBody->getTextProperties().maPropertyMap.begin();
aShapePropIter != mpTextBody->getTextProperties().maPropertyMap.end(); aShapePropIter++ )
aShapeProperties[ (*aShapePropIter).first ] = (*aShapePropIter).second;
}
// applying properties
PropertySet aPropSet( xSet );
@ -451,8 +466,8 @@ Reference< XShape > Shape::createAndInsert(
TextCharacterProperties aCharStyleProperties;
if( const ShapeStyleRef* pFontRef = getShapeStyleRef( XML_fontRef ) )
{
if( rxTheme.get() )
if( const TextCharacterProperties* pCharProps = rxTheme->getFontStyle( pFontRef->mnThemedIdx ) )
if( pTheme )
if( const TextCharacterProperties* pCharProps = pTheme->getFontStyle( pFontRef->mnThemedIdx ) )
aCharStyleProperties.assignUsed( *pCharProps );
aCharStyleProperties.maCharColor.assignIfUsed( pFontRef->maPhClr );
}
@ -461,11 +476,13 @@ Reference< XShape > Shape::createAndInsert(
getTextBody()->insertAt( rFilterBase, xText, xAt, aCharStyleProperties, mpMasterTextListStyle );
}
}
if( xLockable.is() )
xLockable->removeActionLock();
}
// use a callback for further processing on the XShape (e.g. charts)
if( mxShape.is() && mxCreateCallback.get() )
mxCreateCallback->onXShapeCreated( mxShape );
mxCreateCallback->onXShapeCreated( mxShape, rxShapes );
return mxShape;
}

View file

@ -90,7 +90,7 @@ Reference< XFastContextHandler > ShapeContext::createFastChildContext( sal_Int32
break;
case XML_ph:
mpShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
mpShapePtr->setIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
break;
// nvSpPr CT_ShapeNonVisual end

View file

@ -75,7 +75,7 @@ Reference< XFastContextHandler > ShapeGroupContext::createFastChildContext( sal_
break;
case XML_ph:
mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) );
mpGroupShapePtr->setIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
break;
// nvSpPr CT_ShapeNonVisual end
@ -103,7 +103,7 @@ Reference< XFastContextHandler > ShapeGroupContext::createFastChildContext( sal_
xRet.set( new GraphicShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ) ) );
break;
case XML_graphicFrame: // CT_GraphicalObjectFrame
xRet.set( new GraphicalObjectFrameContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.OLE2Shape" ) ) ) );
xRet.set( new GraphicalObjectFrameContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.OLE2Shape" ) ), true ) );
break;
}
if( !xRet.is() )

View file

@ -109,7 +109,7 @@ Reference< XFastContextHandler > TextParagraphContext::createFastChildContext( s
xRet.set( new TextParagraphPropertiesContext( *this, xAttribs, mrParagraph.getProperties() ) );
break;
case NMSP_DRAWINGML|XML_endParaRPr:
xRet.set( new TextParagraphPropertiesContext( *this, xAttribs, mrParagraph.getEndProperties() ) );
xRet.set( new TextCharacterPropertiesContext( *this, xAttribs, mrParagraph.getEndProperties() ) );
break;
}

View file

@ -0,0 +1,58 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: textbodyproperties.cxx,v $
* $Revision: 1.1 $
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "oox/drawingml/textbodyproperties.hxx"
#include <com/sun/star/text/WritingMode.hpp>
#include "properties.hxx"
#include "tokens.hxx"
namespace oox {
namespace drawingml {
// ============================================================================
TextBodyProperties::TextBodyProperties()
{
}
void TextBodyProperties::pushToPropMap( PropertyMap& rPropMap ) const
{
rPropMap.insert( maPropertyMap.begin(), maPropertyMap.end() );
// #160799# fake different vertical text modes by top-bottom writing mode
if( moVert.get( XML_horz ) != XML_horz )
rPropMap[ PROP_TextWritingMode ] <<= ::com::sun::star::text::WritingMode_TB_RL;
}
// ============================================================================
} // namespace drawingml
} // namespace oox

View file

@ -28,6 +28,8 @@
#include "oox/drawingml/textbodypropertiescontext.hxx"
#include <com/sun/star/text/ControlCharacter.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
#include "oox/drawingml/textbodyproperties.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
#include "oox/helper/attributelist.hxx"
@ -38,6 +40,7 @@
using ::rtl::OUString;
using namespace ::oox::core;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::xml::sax;
@ -56,7 +59,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent,
// ST_TextWrappingType
sal_Int32 nWrappingType = aAttribs.getToken( XML_wrap, XML_square );
mrTextBodyProp.maPropertyMap[ PROP_TextWordWrap ] <<= (nWrappingType == XML_square);
mrTextBodyProp.maPropertyMap[ PROP_TextWordWrap ] <<= static_cast< sal_Bool >( nWrappingType == XML_square );
// ST_Coordinate
OUString sValue;
@ -78,7 +81,17 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent,
// ST_TextAnchoringType
// sal_Int32 nAnchoringType = xAttributes->getOptionalValueToken( XML_anchor, XML_t );
drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
switch( xAttributes->getOptionalValueToken( XML_anchor, XML_t ) )
{
case XML_b : eVA = drawing::TextVerticalAdjust_BOTTOM; break;
case XML_dist :
case XML_just :
case XML_ctr : eVA = drawing::TextVerticalAdjust_CENTER; break;
default:
case XML_t : eVA = drawing::TextVerticalAdjust_TOP; break;
}
mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA;
// bool bAnchorCenter = aAttribs.getBool( XML_anchorCtr, false );

View file

@ -56,13 +56,20 @@ TextCharacterPropertiesContext::TextCharacterPropertiesContext(
, mrTextCharacterProperties( rTextCharacterProperties )
{
AttributeList aAttribs( rXAttributes );
mrTextCharacterProperties.moLang = aAttribs.getString( XML_lang );
mrTextCharacterProperties.moHeight = aAttribs.getInteger( XML_sz );
mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u );
mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike );
// mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap );
mrTextCharacterProperties.moBold = aAttribs.getBool( XML_b );
mrTextCharacterProperties.moItalic = aAttribs.getBool( XML_i );
if ( aAttribs.hasAttribute( XML_lang ) )
mrTextCharacterProperties.moLang = aAttribs.getString( XML_lang );
if ( aAttribs.hasAttribute( XML_sz ) )
mrTextCharacterProperties.moHeight = aAttribs.getInteger( XML_sz );
if ( aAttribs.hasAttribute( XML_u ) )
mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u );
if ( aAttribs.hasAttribute( XML_strike ) )
mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike );
// mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap );
if ( aAttribs.hasAttribute( XML_b ) )
mrTextCharacterProperties.moBold = aAttribs.getBool( XML_b );
if ( aAttribs.hasAttribute( XML_i ) )
mrTextCharacterProperties.moItalic = aAttribs.getBool( XML_i );
// TODO
/* todo: we need to be able to iterate over the XFastAttributes

View file

@ -29,6 +29,7 @@
#include "oox/drawingml/drawingmltypes.hxx"
#include <rtl/ustring.hxx>
#include "oox/helper/propertyset.hxx"
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/text/XTextCursor.hpp>
#include <com/sun/star/text/ControlCharacter.hpp>
@ -78,11 +79,21 @@ void TextParagraph::insertAt(
xText->insertControlCharacter( xStart, ControlCharacter::APPEND_PARAGRAPH, sal_False );
xAt->gotoEnd( sal_True );
}
for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt )
if ( maRuns.begin() == maRuns.end() )
{
(*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle );
nParagraphSize += (*aIt)->getText().getLength();
PropertySet aPropSet( xStart );
TextCharacterProperties aTextCharacterProps( aTextCharacterStyle );
aTextCharacterProps.assignUsed( maEndProperties );
aTextCharacterProps.pushToPropSet( aPropSet, rFilterBase );
}
else
{
for( TextRunVector::const_iterator aIt = maRuns.begin(), aEnd = maRuns.end(); aIt != aEnd; ++aIt )
{
(*aIt)->insertAt( rFilterBase, xText, xAt, aTextCharacterStyle );
nParagraphSize += (*aIt)->getText().getLength();
}
}
xAt->gotoEnd( sal_True );
@ -94,7 +105,6 @@ void TextParagraph::insertAt(
pTextParagraphStyle->pushToPropSet( rFilterBase, xProps, aioBulletList, NULL, sal_False, fCharacterSize );
fCharacterSize = pTextParagraphStyle->getCharHeightPoints( 18 );
}
maProperties.pushToPropSet( rFilterBase, xProps, aioBulletList, &pTextParagraphStyle->getBulletList(), sal_True, fCharacterSize );
// empty paragraphs do not have bullets in ppt

View file

@ -358,7 +358,7 @@ multilist=RECORD-NAMES-BIFF5
# chart records
exclude=0x1004,0x102D,0x102F,0x1036,0x1037,0x1038,0x103B
0x1040=CHRADARAREA,CHAXESSET,,CHLEGENDENTRY,CHPROPERTIES,CHSERGROUP,CHUSEDAXESSETS,
0x1048=CHPIVOTREF,,CHSERPARENT,CHSERTRENDLINE,,,CHFORMAT,CHPOS
0x1048=CHPIVOTREF,,CHSERPARENT,CHSERTRENDLINE,,,CHFORMAT,CHFRAMEPOS
0x1050=CHFORMATRUNS,CHSOURCELINK,,,,,,
0x1058=,,,CHSERERRORBAR,,CHSERIESFORMAT,,
end
@ -976,10 +976,11 @@ end
shortlist=CHPROPERTIES-EMPTYCELLS,0,do-not-plot,as-zero,interpolated
flagslist=CHPROPERTIES-FLAGS
0x0001=manual-format
0x0001=manual-series
0x0002=plot-visible-only
0x0004=fixed-size
0x0008=manual-plotarea
0x0010=apply-plotarea-pos
end
# CHSCATTER ------------------------------------------------------------------
@ -1039,7 +1040,7 @@ shortlist=CHTEXT-HORALIGN,1,left,center,right,block,distribute
shortlist=CHTEXT-VERALIGN,1,top,center,bottom,block,distribute
shortlist=CHTEXT-FILLMODE,1,transparent,opaque
combilist=CHTEXT-FLAGS-BIFF2
flagslist=CHTEXT-FLAGS-BIFF2
0x0001=auto-color
0x0002=show-symbol
0x0004=show-value

Some files were not shown because too many files have changed in this diff Show more