diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-08-12 15:53:12 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-08-12 16:56:31 +0200 |
commit | a81327ff2faaf21c22f1a902bea170942d5207e6 (patch) | |
tree | 907c30a7a582308957d7b2bacbef1877cb03b21a /oox/inc | |
parent | f418927e6fc5228d9d08a2d11e0234661038374c (diff) |
Import SmartArt graphics to Impress
Extending the existing functionality to
* properly parse and model the declarative shapes
* provide means for round-tripping, and re-rendering the
shapes from xml snippets
* implements the layouts composite, cycle, linear, and the
special 'text' node
This is based on the initial smartart work from hfiguiere@novell.com
Diffstat (limited to 'oox/inc')
19 files changed, 401 insertions, 561 deletions
diff --git a/oox/inc/oox/core/fastparser.hxx b/oox/inc/oox/core/fastparser.hxx index 01dc2f0a12e8..3d13a4949db6 100644 --- a/oox/inc/oox/core/fastparser.hxx +++ b/oox/inc/oox/core/fastparser.hxx @@ -84,9 +84,14 @@ public: sal_Int32 getNamespaceId( const ::rtl::OUString& aUrl ); + ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler > + getTokenHandler() const { return mxTokenHandler; } + private: ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastParser > mxParser; + ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastTokenHandler > + mxTokenHandler; const NamespaceMap& mrNamespaceMap; }; diff --git a/oox/inc/oox/core/filterbase.hxx b/oox/inc/oox/core/filterbase.hxx index 4a58cc5ec9d9..cbc93791b089 100644 --- a/oox/inc/oox/core/filterbase.hxx +++ b/oox/inc/oox/core/filterbase.hxx @@ -49,6 +49,7 @@ namespace com { namespace sun { namespace star { namespace awt { struct DeviceInfo; } namespace frame { class XFrame; } namespace frame { class XModel; } + namespace drawing { class XShape; } namespace graphic { class XGraphic; } namespace io { class XInputStream; } namespace io { class XOutputStream; } @@ -147,6 +148,10 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& getTargetFrame() const; + /// Returns the parent shape to load into (if any) + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& + getParentShape() const; + /** Returns the status indicator (may be null). */ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator >& getStatusIndicator() const; diff --git a/oox/inc/oox/core/xmlfilterbase.hxx b/oox/inc/oox/core/xmlfilterbase.hxx index 17f8367becc1..0e015da7fa0b 100644 --- a/oox/inc/oox/core/xmlfilterbase.hxx +++ b/oox/inc/oox/core/xmlfilterbase.hxx @@ -43,8 +43,10 @@ namespace com { namespace sun { namespace star { namespace container { class XNameContainer; } namespace document { class XDocumentProperties; } + namespace xml { namespace dom { class XDocument; } } namespace xml { namespace sax { class XLocator; } } namespace xml { namespace sax { class XFastDocumentHandler; } } + namespace xml { namespace sax { class XFastSAXSerializable; } } } } } namespace oox { @@ -95,7 +97,7 @@ public: /** Has to be implemented by each filter, returns a filter-specific chart converter object, that should be global per imported document. */ - virtual ::oox::drawingml::chart::ChartConverter& getChartConverter() = 0; + virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() = 0; /** Has to be implemented by each filter to return the table style list. */ virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() = 0; @@ -113,6 +115,31 @@ public: */ bool importFragment( const ::rtl::Reference< FragmentHandler >& rxHandler ); + /** Imports a fragment into an xml::dom::XDocument. + + @param rFragmentPath path to fragment + + @return a non-empty reference to the XDocument, if the + fragment could be imported. + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument> importFragment( const ::rtl::OUString& rFragmentPath ); + + /** Imports a fragment from an xml::dom::XDocument using the + passed fragment handler + + @param rxHandler fragment handler; path to fragment is + ignored, input source is the rxSerializer + + @param rxSerializer usually retrieved from a + xml::dom::XDocument, will get serialized into rxHandler + + @return true, if the fragment could be imported. + */ + bool importFragment( const ::rtl::Reference< FragmentHandler >& rxHandler, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XFastSAXSerializable >& rxSerializer ); + /** Imports the relations fragment associated with the specified fragment. @return The relations collection of the specified fragment. diff --git a/oox/inc/oox/drawingml/chart/converterbase.hxx b/oox/inc/oox/drawingml/chart/converterbase.hxx index 3c50680edbd9..ba7566e1cd77 100644 --- a/oox/inc/oox/drawingml/chart/converterbase.hxx +++ b/oox/inc/oox/drawingml/chart/converterbase.hxx @@ -82,7 +82,7 @@ protected: /** Returns the filter object of the imported/exported document. */ ::oox::core::XmlFilterBase& getFilter() const; /** Returns the chart converter. */ - ChartConverter& getChartConverter() const; + ChartConverter* getChartConverter() const; /** Returns the API chart document model. */ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > getChartDocument() const; diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index 112a337a8ceb..413b2a76357f 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -123,6 +123,7 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet, const ::com::sun::star::uno::Reference < ::com::sun::star::drawing::XShape > & xShape) const; + const rtl::OUString& getShapePresetType() const { return maShapePresetType; } void setShapePresetType( const rtl::OUString& rShapePresetType ){ maShapePresetType = rShapePresetType; }; std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; }; diff --git a/oox/inc/oox/drawingml/diagram/diagram.hxx b/oox/inc/oox/drawingml/diagram/diagram.hxx index f0b77c48b8f6..9b75667f631a 100644 --- a/oox/inc/oox/drawingml/diagram/diagram.hxx +++ b/oox/inc/oox/drawingml/diagram/diagram.hxx @@ -26,232 +26,40 @@ * ************************************************************************/ - - #ifndef OOX_DRAWINGML_DIAGRAM_HXX #define OOX_DRAWINGML_DIAGRAM_HXX -#include <vector> -#include <boost/shared_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> +#include <rtl/ustring.hxx> #include "oox/drawingml/shape.hxx" -#include "oox/drawingml/diagram/diagramlayoutatoms.hxx" - -namespace oox { namespace drawingml { - -namespace dgm { +#include "oox/core/xmlfilterbase.hxx" -/** A Connection - */ -class Connection -{ -public: - Connection() - : mnType( 0 ) - , mnSourceOrder( 0 ) - , mnDestOrder( 0 ) - { - } +#include <com/sun/star/xml/dom/XDocument.hpp> - void dump(); - - sal_Int32 mnType; - ::rtl::OUString msModelId; - ::rtl::OUString msSourceId; - ::rtl::OUString msDestId; - ::rtl::OUString msParTransId; - ::rtl::OUString msPresId; - ::rtl::OUString msSibTransId; - sal_Int32 mnSourceOrder; - sal_Int32 mnDestOrder; - -}; - -typedef boost::shared_ptr< Connection > ConnectionPtr; -typedef std::vector< ConnectionPtr > Connections; +namespace oox { namespace drawingml { -class Point; +/** load diagram data, and put resulting graphic into shape -typedef boost::shared_ptr< Point > PointPtr; -typedef std::vector< PointPtr > Points; -/** A point + This method loads the diagram data fragments from the given paths, + generate and layout the shapes, and push it as children into the + referenced shape. */ -class Point -{ -public: - Point(); - ShapePtr & getShape( ) - { return mpShape; } - - void setCnxId( const ::rtl::OUString & sCnxId ) - { msCnxId = sCnxId; } - void setModelId( const ::rtl::OUString & sModelId ); - const ::rtl::OUString & getModelId() const - { return msModelId; } - void setType( const sal_Int32 nType ) - { mnType = nType; } - sal_Int32 getType() const - { return mnType; } - - void dump(); -private: - ShapePtr mpShape; - ::rtl::OUString msCnxId; - ::rtl::OUString msModelId; - sal_Int32 mnType; -}; - - -class PointsTree; -typedef boost::shared_ptr< PointsTree > PointsTreePtr; - -/** a points tree node */ -class PointsTree - : public boost::enable_shared_from_this< PointsTree > -{ -public: - typedef std::vector< PointsTreePtr > Childrens; - PointsTree() - {}; - PointsTree( const PointPtr & pPoint ) - : mpNode( pPoint ) - { } - bool addChild( const PointsTreePtr & pChild ); - const PointPtr & getPoint() const - { return mpNode; } - PointsTreePtr getParent() const; - Childrens::const_iterator beginChild() const - { return maChildrens.begin(); } - Childrens::const_iterator endChild() const - { return maChildrens.end(); } -private: - PointPtr mpNode; - boost::weak_ptr< PointsTree > mpParent; - Childrens maChildrens; -}; - -} - -//////////////////// - -class DiagramData -{ -public: - - DiagramData(); - FillPropertiesPtr & getFillProperties() - { return mpFillProperties; } - dgm::Connections & getConnections() - { return maConnections; } - dgm::Points & getPoints() - { return maPoints; } - void dump(); -private: - FillPropertiesPtr mpFillProperties; - dgm::Connections maConnections; - dgm::Points maPoints; -}; - -typedef boost::shared_ptr< DiagramData > DiagramDataPtr; - - - -//////////////////// - -class DiagramLayout -{ -public: - void setDefStyle( const ::rtl::OUString & sDefStyle ) - { msDefStyle = sDefStyle; } - void setMinVer( const ::rtl::OUString & sMinVer ) - { msMinVer = sMinVer; } - void setUniqueId( const ::rtl::OUString & sUniqueId ) - { msUniqueId = sUniqueId; } - const ::rtl::OUString & getUniqueId() - { return msUniqueId; } - void setTitle( const ::rtl::OUString & sTitle ) - { msTitle = sTitle; } - void setDesc( const ::rtl::OUString & sDesc ) - { msDesc = sDesc; } - - LayoutNodePtr & getNode() - { return mpNode; } - const LayoutNodePtr & getNode() const - { return mpNode; } - DiagramDataPtr & getSampData() - { return mpSampData; } - const DiagramDataPtr & getSampData() const - { return mpSampData; } - DiagramDataPtr & getStyleData() - { return mpStyleData; } - const DiagramDataPtr & getStyleData() const - { return mpStyleData; } - - void layout( const dgm::PointsTreePtr & pTree, const com::sun::star::awt::Point & pt ); -private: - ::rtl::OUString msDefStyle; - ::rtl::OUString msMinVer; - ::rtl::OUString msUniqueId; - - ::rtl::OUString msTitle; - ::rtl::OUString msDesc; - LayoutNodePtr mpNode; - DiagramDataPtr mpSampData; - DiagramDataPtr mpStyleData; - // TODO - // catLst - // clrData -}; - -typedef boost::shared_ptr< DiagramLayout > DiagramLayoutPtr; - -/////////////////////// - -class DiagramQStyles -{ - -}; - -typedef boost::shared_ptr< DiagramQStyles > DiagramQStylesPtr; - -/////////////////////// - -class DiagramColors -{ - -}; - -typedef boost::shared_ptr< DiagramColors > DiagramColorsPtr; - -/////////////////////// - -class Diagram -{ -public: - void setData( const DiagramDataPtr & ); - void setLayout( const DiagramLayoutPtr & ); - DiagramLayoutPtr getLayout() const - { - return mpLayout; - } - void setQStyles( const DiagramQStylesPtr & ); - void setColors( const DiagramColorsPtr & ); - - void addTo( const ShapePtr & pShape ); - ::rtl::OUString getLayoutId() const; -private: - void build( ); - DiagramDataPtr mpData; - DiagramLayoutPtr mpLayout; - DiagramQStylesPtr mpQStyles; - DiagramColorsPtr mpColors; - std::map< ::rtl::OUString, ShapePtr > maShapeMap; - dgm::PointsTreePtr mpRoot; -}; - - -typedef boost::shared_ptr< Diagram > DiagramPtr; - +void loadDiagram( const ShapePtr& pShape, + core::XmlFilterBase& rFilter, + const ::rtl::OUString& rDataModelPath, + const ::rtl::OUString& rLayoutPath, + const ::rtl::OUString& rQStylePath, + const ::rtl::OUString& rColorStylePath ); + +void loadDiagram( const ShapePtr& pShape, + core::XmlFilterBase& rFilter, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument>& rXDataModelDom, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument>& rXLayoutDom, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument>& rXQStyleDom, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument>& rXColorStyleDom ); } } #endif diff --git a/oox/inc/oox/drawingml/diagram/diagramfragmenthandler.hxx b/oox/inc/oox/drawingml/diagram/diagramfragmenthandler.hxx deleted file mode 100644 index 6186efbe4056..000000000000 --- a/oox/inc/oox/drawingml/diagram/diagramfragmenthandler.hxx +++ /dev/null @@ -1,103 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#ifndef OOX_DRAWINGML_DIAGRAMFRAGMENTHANDLER -#define OOX_DRAWINGML_DIAGRAMFRAGMENTHANDLER - -#include "oox/core/fragmenthandler.hxx" -#include "oox/drawingml/diagram/diagram.hxx" - -namespace oox { namespace drawingml { - - -class DiagramDataFragmentHandler : public ::oox::core::FragmentHandler -{ -public: - DiagramDataFragmentHandler( oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath, const DiagramDataPtr pDataPtr ) throw(); - virtual ~DiagramDataFragmentHandler() throw(); - - virtual void SAL_CALL endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); - 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: - - DiagramDataPtr mpDataPtr; -}; - - - -class DiagramLayoutFragmentHandler : public ::oox::core::FragmentHandler -{ -public: - DiagramLayoutFragmentHandler( oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath, const DiagramLayoutPtr pDataPtr ) throw(); - virtual ~DiagramLayoutFragmentHandler() throw(); - - virtual void SAL_CALL endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); - 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: - - DiagramLayoutPtr mpDataPtr; -}; - -class DiagramQStylesFragmentHandler : public ::oox::core::FragmentHandler -{ -public: - DiagramQStylesFragmentHandler( oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath, const DiagramQStylesPtr pDataPtr ) throw(); - virtual ~DiagramQStylesFragmentHandler() throw(); - - virtual void SAL_CALL endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); - 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: - - DiagramQStylesPtr mpDataPtr; -}; - - -class DiagramColorsFragmentHandler : public ::oox::core::FragmentHandler -{ -public: - DiagramColorsFragmentHandler( ::oox::core::XmlFilterBase& rFilter, const ::rtl::OUString& rFragmentPath, const DiagramColorsPtr pDataPtr ) throw(); - virtual ~DiagramColorsFragmentHandler() throw(); - - virtual void SAL_CALL endDocument() throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); - 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: - - DiagramColorsPtr mpDataPtr; -}; - -} } - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/oox/drawingml/diagram/diagramlayoutatoms.hxx b/oox/inc/oox/drawingml/diagram/diagramlayoutatoms.hxx deleted file mode 100644 index 44a46a8de395..000000000000 --- a/oox/inc/oox/drawingml/diagram/diagramlayoutatoms.hxx +++ /dev/null @@ -1,212 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - - - - -#ifndef OOX_DRAWINGML_DIAGRAMLAYOUTATOMS_HXX -#define OOX_DRAWINGML_DIAGRAMLAYOUTATOMS_HXX - -#include <map> -#include <string> - -#include <boost/shared_ptr.hpp> -#include <boost/array.hpp> - -#include <com/sun/star/uno/Any.hxx> -#include <com/sun/star/xml/sax/XFastAttributeList.hpp> - -#include "oox/drawingml/shape.hxx" - - -namespace oox { namespace drawingml { - - -// AG_IteratorAttributes -class IteratorAttr -{ -public: - IteratorAttr(); - - // not sure this belong here, but wth - void loadFromXAttr( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes ); - -private: - sal_Int32 mnAxis; - sal_Int32 mnCnt; - sal_Bool mbHideLastTrans; - sal_Int32 mnPtType; - sal_Int32 mnSt; - sal_Int32 mnStep; -}; - -class ConditionAttr -{ -public: - ConditionAttr(); - - // not sure this belong here, but wth - void loadFromXAttr( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes ); - -private: - sal_Int32 mnFunc; - sal_Int32 mnArg; - sal_Int32 mnOp; - ::rtl::OUString msVal; -}; - -class LayoutAtom; - -typedef boost::shared_ptr< LayoutAtom > LayoutAtomPtr; - -/** abstract Atom for the layout */ -class LayoutAtom -{ -public: - virtual ~LayoutAtom() - {} - // TODO change signature to the proper one - virtual void processAtom() = 0; - void setName( const ::rtl::OUString & sName ) - { msName = sName; } - void addChild( const LayoutAtomPtr & pNode ) - { mpChildNodes.push_back( pNode ); } - - // dump for debug - virtual void dump(int level = 0); -protected: - std::vector< LayoutAtomPtr > mpChildNodes; - ::rtl::OUString msName; -}; - -class AlgAtom - : public LayoutAtom -{ -public: - virtual ~AlgAtom() - {} - typedef std::map< std::string, ::com::sun::star::uno::Any > ParamMap; - - virtual void processAtom() - {} -private: - ParamMap mParams; -}; - - -class ForEachAtom - : public LayoutAtom -{ -public: - virtual ~ForEachAtom() - {} - - IteratorAttr & iterator() - { return maIter; } - virtual void processAtom(); -private: - IteratorAttr maIter; -}; - -typedef boost::shared_ptr< ForEachAtom > ForEachAtomPtr; - - -class ConditionAtom - : public LayoutAtom -{ -public: - ConditionAtom( bool bElse = false ) - : LayoutAtom( ) - , mbElse( bElse ) - {} - virtual ~ConditionAtom() - {} - bool test(); - virtual void processAtom() - {} - IteratorAttr & iterator() - { return maIter; } - ConditionAttr & cond() - { return maCond; } -private: - bool mbElse; - IteratorAttr maIter; - ConditionAttr maCond; -}; - -typedef boost::shared_ptr< ConditionAtom > ConditionAtomPtr; - - -/** "choose" statements. Atoms will be tested in order. */ -class ChooseAtom - : public LayoutAtom -{ -public: - virtual ~ChooseAtom() - {} - virtual void processAtom(); -}; - -class LayoutNode - : public LayoutAtom -{ -public: - enum { - VAR_animLvl = 0, - VAR_animOne, - VAR_bulletEnabled, - VAR_chMax, - VAR_chPref, - VAR_dir, - VAR_hierBranch, - VAR_orgChart, - VAR_resizeHandles - }; - // we know that the array is of fixed size - // the use of Any allow having empty values - typedef boost::array< ::com::sun::star::uno::Any, 9 > VarMap; - - virtual ~LayoutNode() - {} - virtual void processAtom() - {} - VarMap & variables() - { return mVariables; } -private: - VarMap mVariables; - std::vector< ShapePtr > mpShapes; -}; - -typedef boost::shared_ptr< LayoutNode > LayoutNodePtr; - -} } - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/oox/inc/oox/drawingml/drawingmltypes.hxx b/oox/inc/oox/drawingml/drawingmltypes.hxx index 86a1ddb7bd23..c66d729c8aa3 100644 --- a/oox/inc/oox/drawingml/drawingmltypes.hxx +++ b/oox/inc/oox/drawingml/drawingmltypes.hxx @@ -60,6 +60,9 @@ typedef ::boost::shared_ptr< FillProperties > FillPropertiesPtr; struct GraphicProperties; typedef ::boost::shared_ptr< GraphicProperties > GraphicPropertiesPtr; +struct Shape3DProperties; +typedef ::boost::shared_ptr< Shape3DProperties > Shape3DPropertiesPtr; + struct TextCharacterProperties; typedef ::boost::shared_ptr< TextCharacterProperties > TextCharacterPropertiesPtr; diff --git a/oox/inc/oox/drawingml/graphicshapecontext.hxx b/oox/inc/oox/drawingml/graphicshapecontext.hxx index 45ac831aa1c8..0abfbaa12af6 100644 --- a/oox/inc/oox/drawingml/graphicshapecontext.hxx +++ b/oox/inc/oox/drawingml/graphicshapecontext.hxx @@ -31,7 +31,6 @@ #include "oox/drawingml/shape.hxx" #include "oox/drawingml/shapecontext.hxx" -#include "oox/drawingml/diagram/diagram.hxx" namespace oox { namespace vml { struct OleObjectInfo; } } @@ -74,6 +73,8 @@ private: // ==================================================================== +class Diagram; + class DiagramGraphicDataContext : public ShapeContext { @@ -83,8 +84,6 @@ public: 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: - DiagramPtr loadDiagram(); - ::rtl::OUString msDm; ::rtl::OUString msLo; ::rtl::OUString msQs; diff --git a/oox/inc/oox/drawingml/diagram/datamodelcontext.hxx b/oox/inc/oox/drawingml/scene3dcontext.hxx index 9e78a88f3696..c64bbf3358b2 100644 --- a/oox/inc/oox/drawingml/diagram/datamodelcontext.hxx +++ b/oox/inc/oox/drawingml/scene3dcontext.hxx @@ -1,12 +1,14 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * + * $RCSfile: fillpropertiesgroupcontext.hxx,v $ + * $Revision: 1.6 $ + * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify @@ -26,32 +28,29 @@ * ************************************************************************/ - -#ifndef OOX_DRAWINGML_SHAPECONTEXT_HXX -#define OOX_DRAWINGML_SHAPECONTEXT_HXX - -#include <com/sun/star/drawing/XShapes.hpp> +#ifndef OOX_DRAWINGML_SCENE3DPROPERTIESCONTEXT_HPP +#define OOX_DRAWINGML_SCENE3DPROPERTIESCONTEXT_HPP #include "oox/core/contexthandler.hxx" -#include "oox/drawingml/diagram/diagram.hxx" namespace oox { namespace drawingml { -// CT_DataModel -class DataModelContext : public ::oox::core::ContextHandler +struct Shape3DProperties; + +// --------------------------------------------------------------------- + +class Scene3DPropertiesContext : public ::oox::core::ContextHandler { public: - DataModelContext( ::oox::core::ContextHandler& rParent, const DiagramDataPtr & pDataModelPtr ); - virtual ~DataModelContext(); + Scene3DPropertiesContext( ::oox::core::ContextHandler& rParent, Shape3DProperties& r3DProperties ) throw(); - 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); + ::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 ); -protected: - DiagramDataPtr mpDataModel; +private: + Shape3DProperties& mr3DProperties; }; } } -#endif // OOX_DRAWINGML_SHAPEGROUPCONTEXT_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +#endif // OOX_DRAWINGML_SCENE3DPROPERTIESCONTEXT_HPP diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx index 486b8ef719fe..325af38c3ab8 100644 --- a/oox/inc/oox/drawingml/shape.hxx +++ b/oox/inc/oox/drawingml/shape.hxx @@ -33,6 +33,7 @@ #include "oox/drawingml/drawingmltypes.hxx" #include "oox/drawingml/customshapeproperties.hxx" #include "oox/drawingml/textliststyle.hxx" +#include "oox/drawingml/shape3dproperties.hxx" #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/drawing/XDrawPage.hpp> @@ -80,6 +81,7 @@ class Shape public: explicit Shape( const sal_Char* pServiceType = 0 ); + explicit Shape( const ShapePtr& pSourceShape ); virtual ~Shape(); rtl::OUString& getServiceName(){ return msServiceName; } @@ -98,13 +100,20 @@ public: CustomShapePropertiesPtr getCustomShapeProperties(){ return mpCustomShapePropertiesPtr; } + Shape3DProperties& get3DProperties() { return *mp3DPropertiesPtr; } + const Shape3DProperties& get3DProperties() const { return *mp3DPropertiesPtr; } + table::TablePropertiesPtr getTableProperties(); void setChildPosition( com::sun::star::awt::Point nPosition ){ maChPosition = nPosition; } void setChildSize( com::sun::star::awt::Size aSize ){ maChSize = aSize; } - void setPosition( com::sun::star::awt::Point nPosition ){ maPosition = nPosition; } - void setSize( com::sun::star::awt::Size aSize ){ maSize = aSize; } + void setPosition( com::sun::star::awt::Point nPosition ){ maPosition = nPosition; } + const com::sun::star::awt::Point& getPosition() const { return maPosition; } + + void setSize( com::sun::star::awt::Size aSize ){ maSize = aSize; } + const com::sun::star::awt::Size& getSize() const { return maSize; } + void setRotation( sal_Int32 nRotation ) { mnRotation = nRotation; } void setFlip( sal_Bool bFlipH, sal_Bool bFlipV ) { mbFlipH = bFlipH; mbFlipV = bFlipV; } void addChild( const ShapePtr pChildPtr ) { maChildren.push_back( pChildPtr ); } @@ -149,6 +158,14 @@ public: void dropChildren() { maChildren.clear(); } + void addChildren( + ::oox::core::XmlFilterBase& rFilterBase, + const Theme* pTheme, + const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& rxShapes, + basegfx::B2DHomMatrix& aTransformation, + const ::com::sun::star::awt::Rectangle* pShapeRect = 0, + ShapeIdMap* pShapeMap = 0 ); + void setXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rXShape ) { mxShape = rXShape; }; const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > & @@ -199,6 +216,7 @@ protected: GraphicPropertiesPtr mpGraphicPropertiesPtr; CustomShapePropertiesPtr mpCustomShapePropertiesPtr; table::TablePropertiesPtr mpTablePropertiesPtr; + Shape3DPropertiesPtr mp3DPropertiesPtr; PropertyMap maShapeProperties; PropertyMap maDefaultShapeProperties; TextListStylePtr mpMasterTextListStyle; @@ -238,7 +256,11 @@ private: sal_Bool mbHidden; }; -::rtl::OUString GetShapeType( sal_Int32 nType ); +// --------------------------------------------------------------------- + +/** Get custom shape preset string from xml token id + */ +::rtl::OUString GetShapePresetType( sal_Int32 nType ); // ============================================================================ diff --git a/oox/inc/oox/drawingml/shape3dproperties.hxx b/oox/inc/oox/drawingml/shape3dproperties.hxx new file mode 100644 index 000000000000..2fe82aad3f68 --- /dev/null +++ b/oox/inc/oox/drawingml/shape3dproperties.hxx @@ -0,0 +1,135 @@ +/************************************************************************* + * + * 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: fillproperties.hxx,v $ + * $Revision: 1.7 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * 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_SHAPE3DPROPERTIES_HXX +#define OOX_DRAWINGML_SHAPE3DPROPERTIES_HXX + +#include <map> +#include <com/sun/star/graphic/XGraphic.hpp> +#include <com/sun/star/geometry/IntegerRectangle2D.hpp> +#include "oox/core/xmlfilterbase.hxx" +#include "oox/drawingml/color.hxx" +#include "oox/helper/helper.hxx" + +namespace oox { class PropertyMap; } +namespace oox { class PropertySet; } +namespace oox { namespace core { class ModelObjectContainer; } } + +namespace oox { +namespace drawingml { + +// ============================================================================ + +struct Shape3DPropertyNames +{ + ::rtl::OUString maFillStyle; + ::rtl::OUString maFillColor; + ::rtl::OUString maFillTransparence; + ::rtl::OUString maFillGradient; + ::rtl::OUString maFillBitmap; + ::rtl::OUString maFillBitmapMode; + ::rtl::OUString maFillBitmapTile; + ::rtl::OUString maFillBitmapStretch; + ::rtl::OUString maFillBitmapLogicalSize; + ::rtl::OUString maFillBitmapSizeX; + ::rtl::OUString maFillBitmapSizeY; + ::rtl::OUString maFillBitmapOffsetX; + ::rtl::OUString maFillBitmapOffsetY; + ::rtl::OUString maFillBitmapRectanglePoint; + bool mbNamedFillGradient; + bool mbNamedFillBitmap; + bool mbTransformGraphic; + + Shape3DPropertyNames(); +}; + +// ============================================================================ + +struct Shape3DProperties +{ + typedef ::std::map< double, Color > GradientStopMap; + + OptValue< sal_Int32 > moFillType; /// Fill type (OOXML token). + OptValue< bool > moRotateWithShape; /// True = rotate gradient/bitmap with shape. + Color maFillColor; /// Solid fill color and transparence. + GradientStopMap maGradientStops; /// Gradient stops (colors/transparence). + OptValue< sal_Int32 > moGradientPath; /// If set, gradient follows rectangle, circle, or shape. + OptValue< sal_Int32 > moShadeAngle; /// Rotation angle of linear gradients. + OptValue< bool > moShadeScaled; + OptValue< sal_Int32 > moFlipModeToken; + OptValue< com::sun::star::geometry::IntegerRectangle2D > moFillToRect; + OptValue< com::sun::star::geometry::IntegerRectangle2D > moTileRect; + OptValue< sal_Int32 > moPattPreset; /// Preset pattern type. + Color maPattFgColor; /// Pattern foreground color. + Color maPattBgColor; /// Pattern background color. + ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > mxGraphic; + Color maColorChangeFrom; /// Start color of color transformation. + Color maColorChangeTo; /// Destination color of color transformation. + OptValue< sal_Int32 > moBitmapMode; /// Bitmap tile or stretch. + OptValue< sal_Int32 > moTileX; /// Width of bitmap tiles. + OptValue< sal_Int32 > moTileY; /// Height of bitmap tiles. + OptValue< sal_Int32 > moTileSX; + OptValue< sal_Int32 > moTileSY; + OptValue< sal_Int32 > moTileAlign; /// Anchor point inside bitmap. + + static Shape3DPropertyNames DEFAULTNAMES; /// Default fill property names for shape fill. + static Shape3DPropertyNames DEFAULTPICNAMES; /// Default fill property names for pictures. + + /** Overwrites all members that are explicitly set in rSourceProps. */ + void assignUsed( const Shape3DProperties& rSourceProps ); + + /** Tries to resolve current settings to a solid color, e.g. returns the + start color of a gradient. */ + Color getBestSolidColor() const; + + /** Writes the properties to the passed property map. */ + void pushToPropMap( + PropertyMap& rPropMap, + const Shape3DPropertyNames& rPropNames, + const ::oox::core::XmlFilterBase& rFilter, + ::oox::core::ModelObjectContainer& rObjContainer, + sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const; + + /** Writes the properties to the passed property set. */ + void pushToPropSet( + PropertySet& rPropSet, + const Shape3DPropertyNames& rPropNames, + const ::oox::core::XmlFilterBase& rFilter, + ::oox::core::ModelObjectContainer& rObjContainer, + sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const; +}; + +// ============================================================================ + +} // namespace drawingml +} // namespace oox + +#endif + diff --git a/oox/inc/oox/drawingml/theme.hxx b/oox/inc/oox/drawingml/theme.hxx index 81041be136d3..d6dbb2c57312 100644 --- a/oox/inc/oox/drawingml/theme.hxx +++ b/oox/inc/oox/drawingml/theme.hxx @@ -32,6 +32,7 @@ #include "oox/drawingml/clrscheme.hxx" #include "oox/drawingml/shape.hxx" #include "oox/drawingml/textfont.hxx" +#include <com/sun/star/xml/dom/XDocument.hpp> namespace oox { namespace drawingml { @@ -94,6 +95,11 @@ public: inline Shape& getTxDef() { return maTxDef; } inline const Shape& getTxDef() const { return maTxDef; } + void setFragment( const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument>& xRef ) { mxFragment=xRef; } + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument>& getFragment() const { return mxFragment; } + private: ::rtl::OUString maStyleName; ClrScheme maClrScheme; @@ -105,6 +111,8 @@ private: Shape maSpDef; Shape maLnDef; Shape maTxDef; + ::com::sun::star::uno::Reference< + ::com::sun::star::xml::dom::XDocument> mxFragment; }; // ============================================================================ diff --git a/oox/inc/oox/ppt/dgmimport.hxx b/oox/inc/oox/ppt/dgmimport.hxx new file mode 100644 index 000000000000..8541eb789586 --- /dev/null +++ b/oox/inc/oox/ppt/dgmimport.hxx @@ -0,0 +1,71 @@ +/************************************************************************* + * + * 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: pptimport.hxx,v $ + * $Revision: 1.6 $ + * + * 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_POWERPOINT_QUICKDIAGRAMMINGIMPORT_HXX +#define OOX_POWERPOINT_QUICKDIAGRAMMINGIMPORT_HXX + +#include "oox/core/xmlfilterbase.hxx" + +#include <com/sun/star/animations/XAnimationNode.hpp> +#include <oox/drawingml/theme.hxx> +#include "oox/ppt/presentationfragmenthandler.hxx" +#include "oox/ppt/slidepersist.hxx" +#include <vector> +#include <map> + +namespace oox { namespace ppt { + +// --------------------------------------------------------------------- + +class QuickDiagrammingImport : public oox::core::XmlFilterBase +{ +public: + + QuickDiagrammingImport( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); + + // from FilterBase + virtual bool importDocument() throw(); + virtual bool exportDocument() throw(); + + virtual const ::oox::drawingml::Theme* getCurrentTheme() const; + virtual sal_Int32 getSchemeClr( sal_Int32 nColorSchemeToken ) const; + virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); + + virtual oox::vml::Drawing* getVmlDrawing(); + virtual oox::drawingml::chart::ChartConverter* getChartConverter(); + +private: + virtual ::rtl::OUString implGetImplementationName() const; + virtual ::oox::ole::VbaProject* implCreateVbaProject() const; +}; + +} } + +#endif // OOX_POWERPOINT_QUICKDIAGRAMMINGIMPORT_HXX diff --git a/oox/inc/oox/ppt/dgmlayout.hxx b/oox/inc/oox/ppt/dgmlayout.hxx new file mode 100644 index 000000000000..6f8161eb3329 --- /dev/null +++ b/oox/inc/oox/ppt/dgmlayout.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * 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: pptimport.hxx,v $ + * $Revision: 1.6 $ + * + * 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_POWERPOINT_QUICKDIAGRAMMINGLAYOUT_HXX +#define OOX_POWERPOINT_QUICKDIAGRAMMINGLAYOUT_HXX + +#include "oox/core/xmlfilterbase.hxx" + +#include <com/sun/star/animations/XAnimationNode.hpp> +#include <oox/drawingml/theme.hxx> +#include "oox/ppt/presentationfragmenthandler.hxx" +#include "oox/ppt/slidepersist.hxx" +#include <vector> +#include <map> + +namespace oox { namespace ppt { + +// --------------------------------------------------------------------- + +class QuickDiagrammingLayout : public oox::core::XmlFilterBase +{ +public: + + QuickDiagrammingLayout( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ); + + // from FilterBase + virtual bool importDocument() throw(); + virtual bool exportDocument() throw(); + + virtual const ::oox::drawingml::Theme* getCurrentTheme() const; + virtual sal_Int32 getSchemeClr( sal_Int32 nColorSchemeToken ) const; + virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); + + virtual ::oox::vml::Drawing* getVmlDrawing(); + virtual ::oox::drawingml::chart::ChartConverter* getChartConverter(); + +private: + virtual ::rtl::OUString implGetImplementationName() const; + virtual ::oox::ole::VbaProject* implCreateVbaProject() const; + drawingml::ThemePtr mpThemePtr; +}; + +} } + +#endif // OOX_POWERPOINT_QUICKDIAGRAMMINGLAYOUT_HXX diff --git a/oox/inc/oox/ppt/pptimport.hxx b/oox/inc/oox/ppt/pptimport.hxx index 06f345ba0f8c..79df4219505b 100644 --- a/oox/inc/oox/ppt/pptimport.hxx +++ b/oox/inc/oox/ppt/pptimport.hxx @@ -57,7 +57,7 @@ public: virtual const ::oox::drawingml::Theme* getCurrentTheme() const; virtual ::oox::vml::Drawing* getVmlDrawing(); virtual const oox::drawingml::table::TableStyleListPtr getTableStyles(); - virtual ::oox::drawingml::chart::ChartConverter& getChartConverter(); + virtual ::oox::drawingml::chart::ChartConverter* getChartConverter(); void setActualSlidePersist( SlidePersistPtr pActualSlidePersist ){ mpActualSlidePersist = pActualSlidePersist; }; std::map< rtl::OUString, oox::drawingml::ThemePtr >& getThemes(){ return maThemes; }; diff --git a/oox/inc/oox/xls/excelfilter.hxx b/oox/inc/oox/xls/excelfilter.hxx index e4cc7679ca01..c15b6cc542cf 100644 --- a/oox/inc/oox/xls/excelfilter.hxx +++ b/oox/inc/oox/xls/excelfilter.hxx @@ -71,7 +71,7 @@ public: virtual const ::oox::drawingml::Theme* getCurrentTheme() const; virtual ::oox::vml::Drawing* getVmlDrawing(); virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles(); - virtual ::oox::drawingml::chart::ChartConverter& getChartConverter(); + virtual ::oox::drawingml::chart::ChartConverter* getChartConverter(); virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rDescriptor ) throw( ::com::sun::star::uno::RuntimeException ); diff --git a/oox/inc/oox/xls/workbookhelper.hxx b/oox/inc/oox/xls/workbookhelper.hxx index 8509e1372ee6..bb9a3d29e398 100644 --- a/oox/inc/oox/xls/workbookhelper.hxx +++ b/oox/inc/oox/xls/workbookhelper.hxx @@ -250,7 +250,7 @@ public: /** Returns the converter for string to cell address/range conversion. */ AddressConverter& getAddressConverter() const; /** Returns the chart object converter. */ - ExcelChartConverter& getChartConverter() const; + ExcelChartConverter* getChartConverter() const; /** Returns the page and print settings converter. */ PageSettingsConverter& getPageSettingsConverter() const; |