summaryrefslogtreecommitdiff
path: root/oox/inc
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-09-12 11:11:30 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-09-14 11:29:22 +0200
commitfce166376335b97bf26bcd895ae785070f393878 (patch)
treea41102d59ab12c8cbc2c91690aee129bd32163bd /oox/inc
parentdf344855e1c90e6be333afc143044bb04114c683 (diff)
Move oox/drawingml/*hxx internal headers to oox/inc.
Do not export LinePropertiesContext class as visible. And move GraphicProperties to its own header. Change-Id: I047c181e9f2adc7e59885f59663ea56c7eb898ed
Diffstat (limited to 'oox/inc')
-rw-r--r--oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx40
-rw-r--r--oox/inc/drawingml/chart/axismodel.hxx1
-rw-r--r--oox/inc/drawingml/clrschemecontext.hxx62
-rw-r--r--oox/inc/drawingml/colorchoicecontext.hxx77
-rw-r--r--oox/inc/drawingml/customshapegeometry.hxx71
-rw-r--r--oox/inc/drawingml/customshapeproperties.hxx169
-rw-r--r--oox/inc/drawingml/embeddedwavaudiofile.hxx51
-rw-r--r--oox/inc/drawingml/fillpropertiesgroupcontext.hxx253
-rw-r--r--oox/inc/drawingml/graphicproperties.hxx57
-rw-r--r--oox/inc/drawingml/guidcontext.hxx41
-rw-r--r--oox/inc/drawingml/linepropertiescontext.hxx50
-rw-r--r--oox/inc/drawingml/objectdefaultcontext.hxx43
-rw-r--r--oox/inc/drawingml/scene3dcontext.hxx67
-rw-r--r--oox/inc/drawingml/shape3dproperties.hxx98
-rw-r--r--oox/inc/drawingml/shapepropertiescontext.hxx43
-rw-r--r--oox/inc/drawingml/shapestylecontext.hxx44
-rw-r--r--oox/inc/drawingml/spdefcontext.hxx42
-rw-r--r--oox/inc/drawingml/table/tablecell.hxx2
-rw-r--r--oox/inc/drawingml/table/tablestylepart.hxx2
-rw-r--r--oox/inc/drawingml/table/tablestyletextstylecontext.hxx2
-rw-r--r--oox/inc/drawingml/textbody.hxx73
-rw-r--r--oox/inc/drawingml/textbodycontext.hxx62
-rw-r--r--oox/inc/drawingml/textbodyproperties.hxx59
-rw-r--r--oox/inc/drawingml/textbodypropertiescontext.hxx46
-rw-r--r--oox/inc/drawingml/textcharacterproperties.hxx92
-rw-r--r--oox/inc/drawingml/textcharacterpropertiescontext.hxx47
-rw-r--r--oox/inc/drawingml/texteffectscontext.hxx50
-rw-r--r--oox/inc/drawingml/textfield.hxx63
-rw-r--r--oox/inc/drawingml/textfieldcontext.hxx50
-rw-r--r--oox/inc/drawingml/textfont.hxx76
-rw-r--r--oox/inc/drawingml/textliststyle.hxx62
-rw-r--r--oox/inc/drawingml/textliststylecontext.hxx44
-rw-r--r--oox/inc/drawingml/textparagraph.hxx72
-rw-r--r--oox/inc/drawingml/textparagraphproperties.hxx132
-rw-r--r--oox/inc/drawingml/textparagraphpropertiescontext.hxx55
-rw-r--r--oox/inc/drawingml/textrun.hxx63
-rw-r--r--oox/inc/drawingml/textspacing.hxx70
-rw-r--r--oox/inc/drawingml/themeelementscontext.hxx46
-rw-r--r--oox/inc/drawingml/transform2dcontext.hxx48
39 files changed, 2422 insertions, 3 deletions
diff --git a/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx b/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
new file mode 100644
index 000000000000..827cf5a52f55
--- /dev/null
+++ b/oox/inc/drawingml/ThemeOverrideFragmentHandler.hxx
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_THEMEOVERRICEFRAGMENTHANDLER_HXX
+#define INCLUDED_OOX_DRAWINGML_THEMEOVERRICEFRAGMENTHANDLER_HXX
+
+#include <oox/core/fragmenthandler2.hxx>
+
+namespace oox {
+namespace drawingml {
+
+class Theme;
+
+class ThemeOverrideFragmentHandler : public ::oox::core::FragmentHandler2
+{
+public:
+ explicit ThemeOverrideFragmentHandler(
+ ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ Theme& rTheme );
+ virtual ~ThemeOverrideFragmentHandler();
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ Theme& mrTheme;
+};
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/chart/axismodel.hxx b/oox/inc/drawingml/chart/axismodel.hxx
index c4ba8d4f295c..57ecbf49de0a 100644
--- a/oox/inc/drawingml/chart/axismodel.hxx
+++ b/oox/inc/drawingml/chart/axismodel.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_OOX_DRAWINGML_CHART_AXISMODEL_HXX
#include <oox/drawingml/shape.hxx>
+#include <oox/token/tokens.hxx>
#include <drawingml/chart/titlemodel.hxx>
namespace oox {
diff --git a/oox/inc/drawingml/clrschemecontext.hxx b/oox/inc/drawingml/clrschemecontext.hxx
new file mode 100644
index 000000000000..38efe30d22fb
--- /dev/null
+++ b/oox/inc/drawingml/clrschemecontext.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/clrscheme.hxx>
+#include <oox/drawingml/color.hxx>
+#include <drawingml/colorchoicecontext.hxx>
+
+namespace oox { namespace drawingml {
+
+class clrMapContext : public oox::core::ContextHandler2
+{
+public:
+ clrMapContext( ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttributes, ClrMap& rClrMap );
+};
+
+class clrSchemeColorContext : private Color, public ColorContext
+{
+public:
+ clrSchemeColorContext( ::oox::core::ContextHandler2Helper& rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken );
+ virtual ~clrSchemeColorContext();
+
+private:
+ ClrScheme& mrClrScheme;
+ sal_Int32 mnColorToken;
+};
+
+class clrSchemeContext : public oox::core::ContextHandler2
+{
+public:
+ clrSchemeContext( ::oox::core::ContextHandler2Helper& rParent, ClrScheme& rClrScheme );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ ClrScheme& mrClrScheme;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/colorchoicecontext.hxx b/oox/inc/drawingml/colorchoicecontext.hxx
new file mode 100644
index 000000000000..8f283dd85285
--- /dev/null
+++ b/oox/inc/drawingml/colorchoicecontext.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_COLORCHOICECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_COLORCHOICECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox {
+namespace drawingml {
+
+class Color;
+
+
+
+/** Context handler for the different color value elements (a:scrgbClr,
+ a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr). */
+class ColorValueContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ColorValueContext( ::oox::core::ContextHandler2Helper& rParent, Color& rColor );
+
+
+ virtual void onStartElement(
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ Color& mrColor;
+};
+
+
+
+/** Context handler for elements that *contain* a color value element
+ (a:scrgbClr, a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr). */
+class ColorContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ColorContext( ::oox::core::ContextHandler2Helper& rParent, Color& rColor );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ Color& mrColor;
+};
+
+
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/customshapegeometry.hxx b/oox/inc/drawingml/customshapegeometry.hxx
new file mode 100644
index 000000000000..15fc22a440d5
--- /dev/null
+++ b/oox/inc/drawingml/customshapegeometry.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEGEOMETRY_HXX
+#define INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEGEOMETRY_HXX
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <oox/helper/propertymap.hxx>
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/shape.hxx>
+
+namespace oox { namespace drawingml {
+
+
+
+// CT_CustomGeometry2D
+class CustomShapeGeometryContext : public ::oox::core::ContextHandler2
+{
+public:
+ CustomShapeGeometryContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+
+// CT_PresetGeometry2D
+class PresetShapeGeometryContext : public ::oox::core::ContextHandler2
+{
+public:
+ PresetShapeGeometryContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+
+// CT_PresetTextShape
+class PresetTextShapeContext : public ::oox::core::ContextHandler2
+{
+public:
+ PresetTextShapeContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ CustomShapeProperties& mrCustomShapeProperties;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEGEOMETRY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/customshapeproperties.hxx b/oox/inc/drawingml/customshapeproperties.hxx
new file mode 100644
index 000000000000..d27fc661c0a2
--- /dev/null
+++ b/oox/inc/drawingml/customshapeproperties.hxx
@@ -0,0 +1,169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX
+
+#include <boost/shared_ptr.hpp>
+#include <boost/unordered_map.hpp>
+#include <vector>
+#include <map>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
+#include <com/sun/star/beans/PropertyValues.hpp>
+#include <com/sun/star/drawing/ProjectionMode.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
+#include <oox/core/xmlfilterbase.hxx>
+#include <oox/drawingml/color.hxx>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/token/tokens.hxx>
+
+namespace oox { namespace drawingml {
+
+class CustomShapeProperties;
+
+typedef boost::shared_ptr< CustomShapeProperties > CustomShapePropertiesPtr;
+
+struct CustomShapeGuide
+{
+ OUString maName;
+ OUString maFormula;
+};
+
+struct AdjustHandle
+{
+ bool polar;
+ com::sun::star::drawing::EnhancedCustomShapeParameterPair
+ pos;
+
+ // depending to the type (polar or not):
+ OptValue< OUString > gdRef1; // gdRefX or gdRefR
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ min1; // minX or minR
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ max1; // maxX or maxR
+ OptValue< OUString > gdRef2; // gdRefY or gdRefAng
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ min2; // minX or minAng
+ OptValue< com::sun::star::drawing::EnhancedCustomShapeParameter >
+ max2; // maxY or maxAng
+
+ AdjustHandle( bool bPolar ) : polar( bPolar ) {};
+};
+
+struct ConnectionSite
+{
+ com::sun::star::drawing::EnhancedCustomShapeParameterPair
+ pos;
+ com::sun::star::drawing::EnhancedCustomShapeParameter
+ ang;
+};
+
+struct GeomRect
+{
+ com::sun::star::drawing::EnhancedCustomShapeParameter l;
+ com::sun::star::drawing::EnhancedCustomShapeParameter t;
+ com::sun::star::drawing::EnhancedCustomShapeParameter r;
+ com::sun::star::drawing::EnhancedCustomShapeParameter b;
+};
+
+struct Path2D
+{
+ sal_Int64 w;
+ sal_Int64 h;
+ sal_Int32 fill;
+ bool stroke;
+ bool extrusionOk;
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeParameterPair > parameter;
+
+ Path2D() : w( 0 ), h( 0 ), fill( XML_norm ), stroke( true ), extrusionOk( true ) {};
+};
+
+
+class CustomShapeProperties
+{
+public:
+
+ CustomShapeProperties();
+ virtual ~CustomShapeProperties();
+
+ void pushToPropSet( const ::oox::core::FilterBase& rFilterBase,
+ 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 ::com::sun::star::awt::Size &aSize );
+
+ sal_Int32 getShapePresetType() const { return mnShapePresetType; }
+ OUString getShapePresetTypeName() const;
+ void setShapePresetType( sal_Int32 nShapePresetType ){ mnShapePresetType = nShapePresetType; };
+ bool getShapeTypeOverride(){ return mbShapeTypeOverride; };
+ void setShapeTypeOverride( bool bShapeTypeOverride ) { mbShapeTypeOverride = bShapeTypeOverride; };
+
+ std::vector< CustomShapeGuide >& getAdjustmentGuideList(){ return maAdjustmentGuideList; };
+ std::vector< CustomShapeGuide >& getGuideList(){ return maGuideList; };
+ std::vector< AdjustHandle >& getAdjustHandleList(){ return maAdjustHandleList; };
+ std::vector< ConnectionSite >& getConnectionSiteList(){ return maConnectionSiteList; };
+ OptValue< GeomRect >& getTextRect(){ return maTextRect; };
+ std::vector< Path2D >& getPath2DList(){ return maPath2DList; };
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& getSegments(){ return maSegments; };
+ void setMirroredX( bool bMirroredX ) { mbMirroredX = bMirroredX; };
+ void setMirroredY( bool bMirroredY ) { mbMirroredY = bMirroredY; };
+ void setTextRotateAngle( sal_Int32 nAngle ) { mnTextRotateAngle = nAngle; };
+
+ static sal_Int32 SetCustomShapeGuideValue( std::vector< CustomShapeGuide >& rGuideList, const CustomShapeGuide& rGuide );
+ static sal_Int32 GetCustomShapeGuideValue( const std::vector< CustomShapeGuide >& rGuideList, const OUString& rFormulaName );
+
+ sal_Int32 getArcNum() { return mnArcNum++; }
+
+private:
+
+ sal_Int32 mnShapePresetType;
+ bool mbShapeTypeOverride;
+ std::vector< CustomShapeGuide > maAdjustmentGuideList;
+ std::vector< CustomShapeGuide > maGuideList;
+ std::vector< AdjustHandle > maAdjustHandleList;
+ std::vector< ConnectionSite > maConnectionSiteList;
+ OptValue< GeomRect > maTextRect;
+ std::vector< Path2D > maPath2DList;
+
+ std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >
+ maSegments;
+ bool mbMirroredX;
+ bool mbMirroredY;
+ sal_Int32 mnTextRotateAngle;
+
+ typedef boost::unordered_map< sal_Int32, PropertyMap > PresetDataMap;
+
+ static PresetDataMap maPresetDataMap;
+ static void initializePresetDataMap();
+
+ sal_Int32 mnArcNum;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_CUSTOMSHAPEPROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/embeddedwavaudiofile.hxx b/oox/inc/drawingml/embeddedwavaudiofile.hxx
new file mode 100644
index 000000000000..c1b199243f87
--- /dev/null
+++ b/oox/inc/drawingml/embeddedwavaudiofile.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_EMBEDDEDWAVAUDIOFILE_HXX
+#define INCLUDED_OOX_DRAWINGML_EMBEDDEDWAVAUDIOFILE_HXX
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/xml/sax/XFastAttributeList.hpp>
+
+#include <oox/core/fragmenthandler.hxx>
+
+namespace oox { namespace drawingml {
+
+ struct EmbeddedWAVAudioFile
+ {
+ EmbeddedWAVAudioFile()
+ : mbBuiltIn(false)
+ {
+ }
+ bool mbBuiltIn;
+ OUString msName;
+ OUString msEmbed;
+ };
+
+ void getEmbeddedWAVAudioFile(
+ const ::oox::core::Relations& rRelations,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs,
+ EmbeddedWAVAudioFile & aAudio );
+
+} }
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/fillpropertiesgroupcontext.hxx b/oox/inc/drawingml/fillpropertiesgroupcontext.hxx
new file mode 100644
index 000000000000..5387b340dcc3
--- /dev/null
+++ b/oox/inc/drawingml/fillpropertiesgroupcontext.hxx
@@ -0,0 +1,253 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_FILLPROPERTIESGROUPCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_FILLPROPERTIESGROUPCONTEXT_HXX
+
+#include <drawingml/colorchoicecontext.hxx>
+#include <oox/drawingml/fillproperties.hxx>
+
+namespace oox {
+namespace drawingml {
+
+
+
+/** Context handler that imports the a:solidFill element. */
+class SolidFillContext : public ColorContext
+{
+public:
+ explicit SolidFillContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ FillProperties& rFillProps );
+};
+
+
+
+/** Context handler that imports the a:gradFill element. */
+class GradientFillContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit GradientFillContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ GradientFillProperties& rGradientProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ GradientFillProperties& mrGradientProps;
+};
+
+/** Context handler that imports the a:pattFill element. */
+class PatternFillContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit PatternFillContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ PatternFillProperties& rPatternProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ PatternFillProperties& mrPatternProps;
+};
+
+
+
+/** Context handler that imports a14:imgProps, a14:imgLayer, a14:imgEffect containers
+ and the a14:artistic* effect tags defined in the MS-ODRAWXML extension. */
+class ArtisticEffectContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ArtisticEffectContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ ArtisticEffectProperties& rEffect );
+ virtual ~ArtisticEffectContext();
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ ArtisticEffectProperties& maEffect;
+};
+
+
+
+/** Context handler that imports the a:extLst element inside a:blip and its
+ children a:ext, which can contain transformations to the bitmap. */
+class BlipExtensionContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit BlipExtensionContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ BlipFillProperties& rBlipProps );
+ virtual ~BlipExtensionContext();
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ BlipFillProperties& mrBlipProps;
+};
+
+
+
+/** Context handler that imports the a:duotone element containing the colors
+ of a bitmap duotone transformation. */
+class DuotoneContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit DuotoneContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ BlipFillProperties& rBlipProps );
+ virtual ~DuotoneContext();
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ BlipFillProperties& mrBlipProps;
+ int mnColorIndex;
+};
+
+
+
+/** Context handler that imports the a:clrChange element containing the colors
+ of a bitmap color change transformation. */
+class ColorChangeContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit ColorChangeContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ BlipFillProperties& rBlipProps );
+ virtual ~ColorChangeContext();
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ BlipFillProperties& mrBlipProps;
+ bool mbUseAlpha;
+};
+
+/** Context handler that imports the a:blip element containing the fill bitmap
+ and bitmap color transformation settings. */
+class BlipContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit BlipContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ BlipFillProperties& rBlipProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ BlipFillProperties& mrBlipProps;
+};
+
+/** Context handler that imports the a:blipFill element. */
+class BlipFillContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit BlipFillContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ BlipFillProperties& rBlipProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ BlipFillProperties& mrBlipProps;
+};
+
+/** Context handler for elements that contain a fill property element
+ (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill). */
+class FillPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ explicit FillPropertiesContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ FillProperties& rFillProps );
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+ static ::oox::core::ContextHandlerRef
+ createFillContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs,
+ FillProperties& rFillProps );
+
+protected:
+ FillProperties& mrFillProps;
+};
+
+/** Context handler for elements that contain a fill property element
+ (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill).
+
+ This context handler takes a simple color instead of a fill properties
+ struct. The imported fill properties are converted automatically to the
+ best fitting solid color.
+ */
+class SimpleFillPropertiesContext : private FillProperties, public FillPropertiesContext
+{
+public:
+ explicit SimpleFillPropertiesContext(
+ ::oox::core::ContextHandler2Helper& rParent,
+ Color& rColor );
+ virtual ~SimpleFillPropertiesContext();
+
+protected:
+ Color& mrColor;
+};
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/graphicproperties.hxx b/oox/inc/drawingml/graphicproperties.hxx
new file mode 100644
index 000000000000..626fe5f0f9b8
--- /dev/null
+++ b/oox/inc/drawingml/graphicproperties.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_GRAPHICPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_GRAPHICPROPERTIES_HXX
+
+#include <sal/config.h>
+
+#include <oox/drawingml/fillproperties.hxx>
+#include <oox/helper/helper.hxx>
+#include <drawingml/embeddedwavaudiofile.hxx>
+
+namespace oox {
+ class GraphicHelper;
+ class PropertyMap;
+}
+
+namespace oox {
+namespace drawingml {
+
+struct GraphicProperties
+{
+ BlipFillProperties maBlipProps; /// Properties for the graphic.
+ EmbeddedWAVAudioFile maAudio; /// Audio file details
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const GraphicProperties& rSourceProps );
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(
+ PropertyMap& rPropMap,
+ const GraphicHelper& rGraphicHelper,
+ sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
+};
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/guidcontext.hxx b/oox/inc/drawingml/guidcontext.hxx
new file mode 100644
index 000000000000..285a5677ef4d
--- /dev/null
+++ b/oox/inc/drawingml/guidcontext.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_GUIDCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_GUIDCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+ class GuidContext : public ::oox::core::ContextHandler2
+ {
+
+ public:
+ GuidContext( ::oox::core::ContextHandler2Helper& rParent, OUString& rGuidId );
+ virtual void onCharacters( const OUString& aChars ) SAL_OVERRIDE;
+
+ private:
+ OUString& mrGuidId;
+ };
+} }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/linepropertiescontext.hxx b/oox/inc/drawingml/linepropertiescontext.hxx
new file mode 100644
index 000000000000..21e7810505d4
--- /dev/null
+++ b/oox/inc/drawingml/linepropertiescontext.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+
+
+struct LineProperties;
+
+class LinePropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ LinePropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttributes,
+ LineProperties& rLineProperties ) throw();
+ virtual ~LinePropertiesContext();
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ LineProperties& mrLineProperties;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/objectdefaultcontext.hxx b/oox/inc/drawingml/objectdefaultcontext.hxx
new file mode 100644
index 000000000000..f92e245d154c
--- /dev/null
+++ b/oox/inc/drawingml/objectdefaultcontext.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+class Theme;
+
+class objectDefaultContext : public oox::core::ContextHandler2
+{
+public:
+ objectDefaultContext( ::oox::core::ContextHandler2Helper& rParent, Theme& rTheme );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ Theme& mrTheme;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/scene3dcontext.hxx b/oox/inc/drawingml/scene3dcontext.hxx
new file mode 100644
index 000000000000..edd92e8df1d0
--- /dev/null
+++ b/oox/inc/drawingml/scene3dcontext.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SCENE3DCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SCENE3DCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include "drawingml/shape3dproperties.hxx"
+
+namespace oox { namespace drawingml {
+
+struct Shape3DProperties;
+
+class Scene3DRotationPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ Scene3DRotationPropertiesContext( ::oox::core::ContextHandler2Helper& rParent, RotationProperties& rRotationProperties ) throw();
+
+ ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ RotationProperties& mrRotationProperties;
+};
+
+class Scene3DPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ Scene3DPropertiesContext( ::oox::core::ContextHandler2Helper& rParent, Shape3DProperties& r3DProperties ) throw();
+
+ ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ Shape3DProperties& mr3DProperties;
+};
+
+class Shape3DPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ Shape3DPropertiesContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttribs, Shape3DProperties& r3DProperties ) throw();
+
+ ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ Shape3DProperties& mr3DProperties;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_SCENE3DCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/shape3dproperties.hxx b/oox/inc/drawingml/shape3dproperties.hxx
new file mode 100644
index 000000000000..5c3eaa00ead2
--- /dev/null
+++ b/oox/inc/drawingml/shape3dproperties.hxx
@@ -0,0 +1,98 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SHAPE3DPROPERTIES_HXX
+#define INCLUDED_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 RotationProperties
+{
+ OptValue< sal_Int32 > mnLatitude;
+ OptValue< sal_Int32 > mnLongitude;
+ OptValue< sal_Int32 > mnRevolution;
+};
+
+struct BevelProperties
+{
+ OptValue< sal_Int32 > mnPreset;
+ OptValue< sal_Int32 > mnWidth;
+ OptValue< sal_Int32 > mnHeight;
+};
+
+struct Shape3DProperties
+{
+ OptValue< sal_Int32 > mnPreset;
+ OptValue< float > mfFieldOfVision;
+ OptValue< float > mfZoom;
+ OptValue< sal_Int32 > mnLightRigDirection;
+ OptValue< sal_Int32 > mnLightRigType;
+ RotationProperties maCameraRotation;
+ RotationProperties maLightRigRotation;
+
+ OptValue< sal_Int32 > mnExtrusionH;
+ OptValue< sal_Int32 > mnContourW;
+ OptValue< sal_Int32 > mnShapeZ;
+ OptValue< sal_Int32 > mnMaterial;
+ Color maExtrusionColor;
+ Color maContourColor;
+
+ OptValue< BevelProperties > maTopBevelProperties;
+ OptValue< BevelProperties > maBottomBevelProperties;
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const Shape3DProperties& rSourceProps );
+
+ OUString getCameraPrstName( sal_Int32 nElement );
+ OUString getLightRigName( sal_Int32 nElement );
+ OUString getLightRigDirName( sal_Int32 nElement );
+ OUString getBevelPresetTypeString( sal_Int32 nType );
+ OUString getPresetMaterialTypeString( sal_Int32 nType );
+
+ css::uno::Sequence< css::beans::PropertyValue > getCameraAttributes();
+ css::uno::Sequence< css::beans::PropertyValue > getLightRigAttributes();
+ css::uno::Sequence< css::beans::PropertyValue > getShape3DAttributes(
+ const GraphicHelper& rGraphicHelper, sal_Int32 rPhClr = API_RGB_TRANSPARENT );
+ css::uno::Sequence< css::beans::PropertyValue > getBevelAttributes( BevelProperties rProps );
+ css::uno::Sequence< css::beans::PropertyValue > getColorAttributes(
+ const Color& rColor, const GraphicHelper& rGraphicHelper, sal_Int32 rPhClr );
+};
+
+
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/shapepropertiescontext.hxx b/oox/inc/drawingml/shapepropertiescontext.hxx
new file mode 100644
index 000000000000..4718e3b9a05d
--- /dev/null
+++ b/oox/inc/drawingml/shapepropertiescontext.hxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <oox/drawingml/shape.hxx>
+
+namespace oox { namespace drawingml {
+
+class ShapePropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ ShapePropertiesContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rShape );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ Shape& mrShape;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/shapestylecontext.hxx b/oox/inc/drawingml/shapestylecontext.hxx
new file mode 100644
index 000000000000..b7a479124560
--- /dev/null
+++ b/oox/inc/drawingml/shapestylecontext.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+class ShapeStyleContext : public ::oox::core::ContextHandler2
+{
+public:
+ ShapeStyleContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rShape );
+ virtual ~ShapeStyleContext();
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ Shape& mrShape;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/spdefcontext.hxx b/oox/inc/drawingml/spdefcontext.hxx
new file mode 100644
index 000000000000..2488197cac51
--- /dev/null
+++ b/oox/inc/drawingml/spdefcontext.hxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_SPDEFCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_SPDEFCONTEXT_HXX
+
+#include <oox/drawingml/shape.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+class spDefContext : public oox::core::ContextHandler2
+{
+public:
+ spDefContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rDefaultObject );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ Shape& mrDefaultObject;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_SPDEFCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablecell.hxx b/oox/inc/drawingml/table/tablecell.hxx
index c484ed20ba02..e6502104ffc8 100644
--- a/oox/inc/drawingml/table/tablecell.hxx
+++ b/oox/inc/drawingml/table/tablecell.hxx
@@ -25,7 +25,7 @@
#include <oox/drawingml/drawingmltypes.hxx>
#include <oox/drawingml/lineproperties.hxx>
#include <oox/drawingml/fillproperties.hxx>
-#include <oox/drawingml/textliststyle.hxx>
+#include <drawingml/textliststyle.hxx>
#include <com/sun/star/table/XCell.hpp>
#include <boost/shared_ptr.hpp>
diff --git a/oox/inc/drawingml/table/tablestylepart.hxx b/oox/inc/drawingml/table/tablestylepart.hxx
index 7177deb5b982..8c29518d46c9 100644
--- a/oox/inc/drawingml/table/tablestylepart.hxx
+++ b/oox/inc/drawingml/table/tablestylepart.hxx
@@ -23,7 +23,7 @@
#include <rtl/ustring.hxx>
#include <boost/optional.hpp>
#include <oox/drawingml/color.hxx>
-#include <oox/drawingml/textfont.hxx>
+#include <drawingml/textfont.hxx>
#include <oox/drawingml/fillproperties.hxx>
#include <oox/drawingml/lineproperties.hxx>
#include <oox/drawingml/shape.hxx>
diff --git a/oox/inc/drawingml/table/tablestyletextstylecontext.hxx b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx
index 56f190c505f5..0768bc0b4924 100644
--- a/oox/inc/drawingml/table/tablestyletextstylecontext.hxx
+++ b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX
#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX
-#include <oox/core/contexthandler.hxx>
+#include <oox/core/contexthandler2.hxx>
#include <drawingml/table/tablestylepart.hxx>
namespace oox { namespace drawingml { namespace table {
diff --git a/oox/inc/drawingml/textbody.hxx b/oox/inc/drawingml/textbody.hxx
new file mode 100644
index 000000000000..ea9bca7e586d
--- /dev/null
+++ b/oox/inc/drawingml/textbody.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textbodyproperties.hxx>
+#include <drawingml/textliststyle.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XText; }
+ namespace text { class XTextCursor; }
+} } }
+
+namespace oox { namespace core { class XmlFilterBase; } }
+
+namespace oox { namespace drawingml {
+
+class TextParagraph;
+typedef RefVector< TextParagraph > TextParagraphVector;
+
+class TextBody
+{
+public:
+ TextBody();
+ TextBody( TextBodyPtr pBody );
+ ~TextBody();
+
+ const TextParagraphVector& getParagraphs() const { return maParagraphs; }
+ TextParagraph& addParagraph();
+
+ const TextListStyle& getTextListStyle() const { return maTextListStyle; }
+ TextListStyle& getTextListStyle() { return maTextListStyle; }
+
+ const TextBodyProperties& getTextProperties() const { return maTextProperties; }
+ TextBodyProperties& getTextProperties() { return maTextProperties; }
+
+ /** insert the text body at the text cursor */
+ void insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > & xText,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextCursor > & xAt,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStylePtr& pMasterTextListStyle ) const;
+ bool isEmpty();
+protected:
+ TextParagraphVector maParagraphs;
+ TextBodyProperties maTextProperties;
+ TextListStyle maTextListStyle;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTBODY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textbodycontext.hxx b/oox/inc/drawingml/textbodycontext.hxx
new file mode 100644
index 000000000000..43e80af578c9
--- /dev/null
+++ b/oox/inc/drawingml/textbodycontext.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX
+
+#include <com/sun/star/text/XText.hpp>
+
+#include <drawingml/textbody.hxx>
+#include <drawingml/textrun.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+class TextBodyContext : public ::oox::core::ContextHandler2
+{
+public:
+ TextBodyContext( ::oox::core::ContextHandler2Helper& rParent, TextBody& rTextBody );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ TextBody& mrTextBody;
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxText;
+};
+
+// CT_RegularTextRun
+class RegularTextRunContext : public ::oox::core::ContextHandler2
+{
+public:
+ RegularTextRunContext( ::oox::core::ContextHandler2Helper& rParent, TextRunPtr pRunPtr );
+
+ virtual void onEndElement() SAL_OVERRIDE;
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+ virtual void onCharacters( const OUString& aChars ) SAL_OVERRIDE;
+
+protected:
+ TextRunPtr mpRunPtr;
+ bool mbIsInText;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTBODYCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textbodyproperties.hxx b/oox/inc/drawingml/textbodyproperties.hxx
new file mode 100644
index 000000000000..e6ed0fc19011
--- /dev/null
+++ b/oox/inc/drawingml/textbodyproperties.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIES_HXX
+
+#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <boost/optional.hpp>
+
+namespace oox {
+namespace drawingml {
+
+
+
+struct TextBodyProperties
+{
+ PropertyMap maPropertyMap;
+ OptValue< sal_Int32 > moRotation;
+ bool mbAnchorCtr;
+ OptValue< sal_Int32 > moVert;
+ boost::optional< sal_Int32 > moInsets[4];
+ boost::optional< sal_Int32 > moTextOffUpper;
+ boost::optional< sal_Int32 > moTextOffLeft;
+ boost::optional< sal_Int32 > moTextOffLower;
+ boost::optional< sal_Int32 > moTextOffRight;
+ ::com::sun::star::drawing::TextVerticalAdjust meVA;
+
+ explicit TextBodyProperties();
+
+ void pushRotationAdjustments( sal_Int32 nRotation );
+ void pushVertSimulation();
+};
+
+
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textbodypropertiescontext.hxx b/oox/inc/drawingml/textbodypropertiescontext.hxx
new file mode 100644
index 000000000000..b3ec0326d0b4
--- /dev/null
+++ b/oox/inc/drawingml/textbodypropertiescontext.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+struct TextBodyProperties;
+
+class TextBodyPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ TextBodyPropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttributes,
+ TextBodyProperties& rTextBodyProp );
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ TextBodyProperties& mrTextBodyProp;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textcharacterproperties.hxx b/oox/inc/drawingml/textcharacterproperties.hxx
new file mode 100644
index 000000000000..b873c8838f85
--- /dev/null
+++ b/oox/inc/drawingml/textcharacterproperties.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
+
+#include <oox/helper/helper.hxx>
+#include <oox/helper/propertymap.hxx>
+#include <oox/drawingml/color.hxx>
+#include <drawingml/textfont.hxx>
+#include <oox/drawingml/fillproperties.hxx>
+
+namespace oox { class PropertySet; }
+
+namespace oox {
+namespace drawingml {
+
+
+
+struct TextCharacterProperties
+{
+ PropertyMap maHyperlinkPropertyMap;
+ TextFont maLatinFont;
+ TextFont maLatinThemeFont;
+ TextFont maAsianFont;
+ TextFont maAsianThemeFont;
+ TextFont maComplexFont;
+ TextFont maComplexThemeFont;
+ TextFont maSymbolFont;
+ Color maCharColor;
+ Color maUnderlineColor;
+ Color maHighlightColor;
+ OptValue< OUString > moLang;
+ OptValue< sal_Int32 > moHeight;
+ OptValue< sal_Int32 > moSpacing;
+ OptValue< sal_Int32 > moUnderline;
+ OptValue< sal_Int32 > moBaseline;
+ OptValue< sal_Int32 > moStrikeout;
+ OptValue< sal_Int32 > moCaseMap;
+ OptValue< bool > moBold;
+ OptValue< bool > moItalic;
+ OptValue< bool > moUnderlineLineFollowText;
+ OptValue< bool > moUnderlineFillFollowText;
+ GradientFillProperties maGradientProps; /// Properties for gradient text colors
+
+ std::vector<css::beans::PropertyValue> maTextEffectsProperties;
+
+ /** Overwrites all members that are explicitly set in rSourceProps. */
+ void assignUsed( const TextCharacterProperties& rSourceProps );
+
+ /** Returns the current character size. If possible the masterstyle should
+ have been applied before, otherwise the character size can be zero and
+ the default value is returned. */
+ float getCharHeightPoints( float fDefault ) const;
+
+ /** Writes the properties to the passed property map. */
+ void pushToPropMap(
+ PropertyMap& rPropMap,
+ const ::oox::core::XmlFilterBase& rFilter,
+ bool bUseOptional = false ) const;
+
+ /** Writes the properties to the passed property set. */
+ void pushToPropSet(
+ PropertySet& rPropSet,
+ const ::oox::core::XmlFilterBase& rFilter,
+ bool bUseOptional = false ) const;
+};
+
+
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textcharacterpropertiescontext.hxx b/oox/inc/drawingml/textcharacterpropertiescontext.hxx
new file mode 100644
index 000000000000..d44227c96320
--- /dev/null
+++ b/oox/inc/drawingml/textcharacterpropertiescontext.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+struct TextCharacterProperties;
+
+class TextCharacterPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ TextCharacterPropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttribs,
+ TextCharacterProperties& rTextCharacterProperties );
+ virtual ~TextCharacterPropertiesContext();
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ TextCharacterProperties& mrTextCharacterProperties;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/texteffectscontext.hxx b/oox/inc/drawingml/texteffectscontext.hxx
new file mode 100644
index 000000000000..b8e3aeb4a4a0
--- /dev/null
+++ b/oox/inc/drawingml/texteffectscontext.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTEFFECTSCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTEFFECTSCONTEXT_HXX
+
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+#include <oox/helper/grabbagstack.hxx>
+#include <oox/core/contexthandler2.hxx>
+#include <boost/scoped_ptr.hpp>
+#include <vector>
+
+namespace oox { namespace drawingml {
+
+class TextEffectsContext : public oox::core::ContextHandler2
+{
+public:
+ TextEffectsContext(oox::core::ContextHandler2Helper& rParent,
+ sal_Int32 aElementToken,
+ std::vector<css::beans::PropertyValue>& rTextEffectsProperties);
+ virtual ~TextEffectsContext();
+
+ virtual void onStartElement(const oox::AttributeList& rAttribs) SAL_OVERRIDE;
+ virtual void onEndElement() SAL_OVERRIDE;
+
+ virtual oox::core::ContextHandlerRef onCreateContext(sal_Int32 Element, const oox::AttributeList& rAttribs) SAL_OVERRIDE;
+
+protected:
+ std::vector<css::beans::PropertyValue>& mrTextEffectsProperties;
+ boost::scoped_ptr<oox::GrabBagStack> mpGrabBagStack;
+ sal_Int32 mnCurrentElement;
+
+private:
+ void processAttributes(const AttributeList& rAttribs);
+ void pushAttributeToGrabBag (const sal_Int32& aAttributeId, const OUString& rElementName, const AttributeList& rAttribs);
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTEFFECTSCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textfield.hxx b/oox/inc/drawingml/textfield.hxx
new file mode 100644
index 000000000000..80ac53f0e7f2
--- /dev/null
+++ b/oox/inc/drawingml/textfield.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTFIELD_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTFIELD_HXX
+
+#include <boost/shared_ptr.hpp>
+
+#include <drawingml/textrun.hxx>
+#include <drawingml/textparagraphproperties.hxx>
+
+namespace oox { namespace drawingml {
+
+struct TextCharacterProperties;
+
+class TextField
+ : public TextRun
+{
+public:
+ TextField();
+
+ TextParagraphProperties& getTextParagraphProperties() { return maTextParagraphProperties; }
+ const TextParagraphProperties& getTextParagraphProperties() const { return maTextParagraphProperties; }
+
+ void setType( const OUString& sType ) { msType = sType; }
+ void setUuid( const OUString & sUuid ) { msUuid = sUuid; }
+
+ virtual sal_Int32 insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > & xText,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextCursor > &xAt,
+ const TextCharacterProperties& rTextCharacterStyle,
+ float nDefaultCharHeight) const SAL_OVERRIDE;
+
+private:
+ TextParagraphProperties maTextParagraphProperties;
+ OUString msType;
+ OUString msUuid;
+};
+
+typedef boost::shared_ptr< TextField > TextFieldPtr;
+
+} }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textfieldcontext.hxx b/oox/inc/drawingml/textfieldcontext.hxx
new file mode 100644
index 000000000000..425122497c57
--- /dev/null
+++ b/oox/inc/drawingml/textfieldcontext.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+class TextField;
+
+class TextFieldContext
+ : public ::oox::core::ContextHandler2
+{
+public:
+ TextFieldContext( ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttributes,
+ TextField& rTextField);
+ virtual void onEndElement( ) SAL_OVERRIDE;
+ virtual void onCharacters( const OUString& aChars ) SAL_OVERRIDE;
+ virtual ::oox::core::ContextHandlerRef onCreateContext(
+ sal_Int32 aElementToken, const ::oox::AttributeList& rAttributes ) SAL_OVERRIDE;
+
+private:
+ TextField& mrTextField;
+ bool mbIsInText;
+};
+
+} }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textfont.hxx b/oox/inc/drawingml/textfont.hxx
new file mode 100644
index 000000000000..bb6ae6d2af82
--- /dev/null
+++ b/oox/inc/drawingml/textfont.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTFONT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTFONT_HXX
+
+#include <rtl/ustring.hxx>
+
+namespace oox { class AttributeList; }
+namespace oox { namespace core { class XmlFilterBase; } }
+
+namespace oox {
+namespace drawingml {
+
+
+
+/** carries a CT_TextFont*/
+class TextFont
+{
+public:
+ explicit TextFont();
+
+ /** Sets attributes from the passed attribute list. */
+ void setAttributes( const AttributeList& rAttribs );
+
+ /** Sets font name and init other attributes. */
+ void setAttributes( const OUString& rFontName );
+
+ /** Overwrites this text font with the passed text font, if it is used. */
+ void assignIfUsed( const TextFont& rTextFont );
+
+ /** Returns the font name, pitch, and family; tries to resolve theme
+ placeholder names, e.g. '+mj-lt' for the major latin theme font. */
+ bool getFontData(
+ OUString& rFontName,
+ sal_Int16& rnFontPitch,
+ sal_Int16& rnFontFamily,
+ const ::oox::core::XmlFilterBase& rFilter ) const;
+
+private:
+ bool implGetFontData(
+ OUString& rFontName,
+ sal_Int16& rnFontPitch,
+ sal_Int16& rnFontFamily ) const;
+
+private:
+ OUString maTypeface;
+ OUString maPanose;
+ sal_Int32 mnPitch;
+ sal_Int32 mnCharset;
+};
+
+
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textliststyle.hxx b/oox/inc/drawingml/textliststyle.hxx
new file mode 100644
index 000000000000..1f3c6a0254d0
--- /dev/null
+++ b/oox/inc/drawingml/textliststyle.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
+
+#include <drawingml/textparagraphproperties.hxx>
+#include <oox/helper/refvector.hxx>
+
+namespace oox { namespace drawingml {
+
+typedef RefVector< TextParagraphProperties > TextParagraphPropertiesVector;
+
+class TextListStyle
+{
+public:
+
+ TextListStyle();
+ ~TextListStyle();
+
+ TextListStyle(const TextListStyle& rStyle);
+ TextListStyle& operator=(const TextListStyle& rStyle);
+
+ void apply( const TextListStyle& rTextListStyle );
+
+ const TextParagraphPropertiesVector& getListStyle() const { return maListStyle; };
+ TextParagraphPropertiesVector& getListStyle() { return maListStyle; };
+
+ const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; };
+ TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; };
+
+#if defined(DBG_UTIL) && OSL_DEBUG_LEVEL > 1
+ void dump() const;
+#endif
+
+protected:
+
+ TextParagraphPropertiesVector maListStyle;
+ TextParagraphPropertiesVector maAggregationListStyle;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textliststylecontext.hxx b/oox/inc/drawingml/textliststylecontext.hxx
new file mode 100644
index 000000000000..f71fc899cb0f
--- /dev/null
+++ b/oox/inc/drawingml/textliststylecontext.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
+
+#include <drawingml/textliststyle.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+class TextListStyleContext : public ::oox::core::ContextHandler2
+{
+public:
+ TextListStyleContext( ::oox::core::ContextHandler2Helper& rParent, TextListStyle& rTextListStyle );
+ virtual ~TextListStyleContext();
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ TextListStyle& mrTextListStyle;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textparagraph.hxx b/oox/inc/drawingml/textparagraph.hxx
new file mode 100644
index 000000000000..c419a65d8cff
--- /dev/null
+++ b/oox/inc/drawingml/textparagraph.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
+
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/XText.hpp>
+
+#include <oox/core/xmlfilterbase.hxx>
+#include <drawingml/textrun.hxx>
+#include <drawingml/textliststyle.hxx>
+#include <drawingml/textparagraphproperties.hxx>
+
+namespace oox { namespace drawingml {
+
+typedef RefVector< TextRun > TextRunVector;
+
+class TextParagraph
+{
+public:
+ TextParagraph();
+ ~TextParagraph();
+
+ TextRunVector& getRuns() { return maRuns; }
+ const TextRunVector& getRuns() const { return maRuns; }
+ void addRun( const TextRunPtr & pRun ) { maRuns.push_back( pRun ); }
+
+ TextParagraphProperties& getProperties() { return maProperties; }
+ const TextParagraphProperties& getProperties() const { return maProperties; }
+
+ TextCharacterProperties& getEndProperties() { return maEndProperties; }
+ const TextCharacterProperties& getEndProperties() const { return maEndProperties; }
+
+ void insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XText > & xText,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextCursor > &xAt,
+ const TextCharacterProperties& rTextStyleProperties,
+ const TextListStyle& rTextListStyle,
+ bool bFirst = false,
+ float nDefaultCharHeight = 0) const;
+
+private:
+ TextParagraphProperties maProperties;
+ TextCharacterProperties maEndProperties;
+ TextRunVector maRuns;
+};
+
+typedef boost::shared_ptr< TextParagraph > TextParagraphPtr;
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPH_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textparagraphproperties.hxx b/oox/inc/drawingml/textparagraphproperties.hxx
new file mode 100644
index 000000000000..e6ba58987bd3
--- /dev/null
+++ b/oox/inc/drawingml/textparagraphproperties.hxx
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <drawingml/fillpropertiesgroupcontext.hxx>
+#include <drawingml/textcharacterproperties.hxx>
+#include <com/sun/star/style/NumberingType.hpp>
+#include <drawingml/textfont.hxx>
+#include <drawingml/textspacing.hxx>
+#include <boost/optional.hpp>
+
+namespace com { namespace sun { namespace star {
+ namespace graphic { class XGraphic; }
+} } }
+
+namespace oox { namespace drawingml {
+
+class TextParagraphProperties;
+
+typedef boost::shared_ptr< TextParagraphProperties > TextParagraphPropertiesPtr;
+
+class BulletList
+{
+public:
+ BulletList( );
+ bool is() const;
+ void apply( const BulletList& );
+ void pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, PropertyMap& xPropMap ) const;
+ void setBulletChar( const OUString & sChar );
+ void setStartAt( sal_Int32 nStartAt ){ mnStartAt <<= static_cast< sal_Int16 >( nStartAt ); }
+ void setType( sal_Int32 nType );
+ void setNone( );
+ void setSuffixParenBoth();
+ void setSuffixParenRight();
+ void setSuffixPeriod();
+ void setSuffixNone();
+ void setSuffixMinusRight();
+ void setBulletSize(sal_Int16 nSize);
+ void setFontSize(sal_Int16 nSize);
+ void setStyleName( const OUString& rStyleName ) { maStyleName <<= rStyleName; }
+ void setGraphic( ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& rXGraphic );
+
+ ::oox::drawingml::ColorPtr maBulletColorPtr;
+ ::com::sun::star::uno::Any mbBulletColorFollowText;
+ ::com::sun::star::uno::Any mbBulletFontFollowText;
+ ::oox::drawingml::TextFont maBulletFont;
+ ::com::sun::star::uno::Any msBulletChar;
+ ::com::sun::star::uno::Any mnStartAt;
+ ::com::sun::star::uno::Any mnNumberingType;
+ ::com::sun::star::uno::Any msNumberingPrefix;
+ ::com::sun::star::uno::Any msNumberingSuffix;
+ ::com::sun::star::uno::Any mnSize;
+ ::com::sun::star::uno::Any mnFontSize;
+ ::com::sun::star::uno::Any maStyleName;
+ ::com::sun::star::uno::Any maGraphic;
+ boost::optional< float > maFollowFontSize;
+};
+
+class TextParagraphProperties
+{
+public:
+
+ TextParagraphProperties();
+ ~TextParagraphProperties();
+
+ void setLevel( sal_Int16 nLevel ) { mnLevel = nLevel; }
+ sal_Int16 getLevel( ) const { return mnLevel; }
+ PropertyMap& getTextParagraphPropertyMap() { return maTextParagraphPropertyMap; }
+ BulletList& getBulletList() { return maBulletList; }
+ TextCharacterProperties& getTextCharacterProperties() { return maTextCharacterProperties; }
+ const TextCharacterProperties& getTextCharacterProperties() const { return maTextCharacterProperties; }
+
+ TextSpacing& getParaTopMargin() { return maParaTopMargin; }
+ TextSpacing& getParaBottomMargin() { return maParaBottomMargin; }
+ boost::optional< sal_Int32 >& getParaLeftMargin(){ return moParaLeftMargin; }
+ boost::optional< sal_Int32 >& getFirstLineIndentation(){ return moFirstLineIndentation; }
+
+ boost::optional< sal_Int16 >& getParaAdjust() { return moParaAdjust; }
+ void setParaAdjust( sal_Int16 nParaAdjust ) { moParaAdjust = nParaAdjust; }
+
+ void apply( const TextParagraphProperties& rSourceProps );
+ void pushToPropSet( const ::oox::core::XmlFilterBase* pFilterBase,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet,
+ PropertyMap& rioBulletList, const BulletList* pMasterBuList, bool bApplyBulletList, float fFontSize, bool bPushDefaultValues = false ) const;
+ void pushToPropSet( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & xPropSet) const;
+
+ /** Returns the largest character size of this paragraph. If possible the
+ masterstyle should have been applied before, otherwise the character
+ size can be zero and the default value is returned. */
+ float getCharHeightPoints( float fDefault ) const;
+
+#ifdef DBG_UTIL
+ void dump() const;
+#endif
+
+protected:
+
+ TextCharacterProperties maTextCharacterProperties;
+ PropertyMap maTextParagraphPropertyMap;
+ BulletList maBulletList;
+ TextSpacing maParaTopMargin;
+ TextSpacing maParaBottomMargin;
+ boost::optional< sal_Int32 > moParaLeftMargin;
+ boost::optional< sal_Int32 > moFirstLineIndentation;
+ boost::optional< sal_Int16 > moParaAdjust;
+ sal_Int16 mnLevel;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textparagraphpropertiescontext.hxx b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
new file mode 100644
index 000000000000..6f5fbc5983ed
--- /dev/null
+++ b/oox/inc/drawingml/textparagraphpropertiescontext.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX
+
+#include <list>
+
+#include <com/sun/star/style/TabStop.hpp>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textparagraphproperties.hxx>
+#include <drawingml/textspacing.hxx>
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox { namespace drawingml {
+
+class TextParagraphPropertiesContext : public ::oox::core::ContextHandler2
+{
+public:
+ TextParagraphPropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttributes,
+ TextParagraphProperties& rTextParagraphProperties );
+ virtual ~TextParagraphPropertiesContext();
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ TextParagraphProperties& mrTextParagraphProperties;
+ TextSpacing maLineSpacing;
+ BulletList& mrBulletList;
+ ::std::list< ::com::sun::star::style::TabStop > maTabList;
+ ::boost::shared_ptr< BlipFillProperties > mxBlipProps;
+};
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTPARAGRAPHPROPERTIESCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textrun.hxx b/oox/inc/drawingml/textrun.hxx
new file mode 100644
index 000000000000..1b77465f08ed
--- /dev/null
+++ b/oox/inc/drawingml/textrun.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTRUN_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTRUN_HXX
+
+#include <com/sun/star/text/XTextCursor.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <drawingml/textcharacterproperties.hxx>
+
+namespace oox { namespace drawingml {
+
+class TextRun
+{
+public:
+ TextRun();
+ virtual ~TextRun();
+
+ OUString& getText() { return msText; }
+ const OUString& getText() const { return msText; }
+
+ TextCharacterProperties& getTextCharacterProperties() { return maTextCharacterProperties; }
+ const TextCharacterProperties& getTextCharacterProperties() const { return maTextCharacterProperties; }
+
+ void setLineBreak() { mbIsLineBreak = true; }
+
+ virtual sal_Int32 insertAt(
+ const ::oox::core::XmlFilterBase& rFilterBase,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XText >& xText,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextCursor >& xAt,
+ const TextCharacterProperties& rTextCharacterStyle,
+ float nDefaultCharHeight) const;
+
+private:
+ OUString msText;
+ TextCharacterProperties maTextCharacterProperties;
+ bool mbIsLineBreak;
+};
+
+typedef boost::shared_ptr< TextRun > TextRunPtr;
+
+} }
+
+#endif // INCLUDED_OOX_DRAWINGML_TEXTRUN_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/textspacing.hxx b/oox/inc/drawingml/textspacing.hxx
new file mode 100644
index 000000000000..4c859d706057
--- /dev/null
+++ b/oox/inc/drawingml/textspacing.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TEXTSPACING_HXX
+#define INCLUDED_OOX_DRAWINGML_TEXTSPACING_HXX
+
+#include <rtl/ustring.hxx>
+
+#include <com/sun/star/style/LineSpacing.hpp>
+#include <com/sun/star/style/LineSpacingMode.hpp>
+#include <oox/drawingml/drawingmltypes.hxx>
+
+namespace oox { namespace drawingml {
+
+
+ /** carries a CT_TextSpacing */
+ class TextSpacing
+ {
+ public:
+ enum {
+ POINTS = 0,
+ PERCENT
+ };
+ TextSpacing()
+ : nUnit( POINTS ), nValue( 0 ), bHasValue( false )
+ {
+ }
+ TextSpacing( sal_Int32 nPoints ) : nUnit( POINTS ), nValue( nPoints ), bHasValue( true ){};
+ ::com::sun::star::style::LineSpacing toLineSpacing() const
+ {
+ ::com::sun::star::style::LineSpacing aSpacing;
+ aSpacing.Mode = ( nUnit == PERCENT
+ ? ::com::sun::star::style::LineSpacingMode::PROP
+ : ::com::sun::star::style::LineSpacingMode::MINIMUM );
+ aSpacing.Height = static_cast< sal_Int16 >( nUnit == PERCENT ? nValue / 1000 : nValue );
+ return aSpacing;
+ }
+ sal_Int32 toMargin( float fFontSize ) const
+ {
+ if ( nUnit == PERCENT )
+ return GetTextSpacingPoint(static_cast<sal_Int32>((fFontSize*nValue)/1000));
+ else
+ return nValue;
+ }
+ sal_Int32 nUnit;
+ sal_Int32 nValue;
+ bool bHasValue;
+ };
+
+} }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/themeelementscontext.hxx b/oox/inc/drawingml/themeelementscontext.hxx
new file mode 100644
index 000000000000..47acdc9a6290
--- /dev/null
+++ b/oox/inc/drawingml/themeelementscontext.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox {
+namespace drawingml {
+
+class Theme;
+
+class ThemeElementsContext : public oox::core::ContextHandler2
+{
+public:
+ ThemeElementsContext( ::oox::core::ContextHandler2Helper& rParent, Theme& rTheme );
+ virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement,
+ const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+private:
+ Theme& mrTheme;
+};
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/transform2dcontext.hxx b/oox/inc/drawingml/transform2dcontext.hxx
new file mode 100644
index 000000000000..dfe49cb0fc08
--- /dev/null
+++ b/oox/inc/drawingml/transform2dcontext.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TRANSFORM2DCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TRANSFORM2DCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox {
+namespace drawingml {
+
+class Shape;
+
+/** context to import a CT_Transform2D */
+class Transform2DContext : public ::oox::core::ContextHandler2
+{
+public:
+ Transform2DContext( ::oox::core::ContextHandler2Helper& rParent,
+ const ::oox::AttributeList& rAttributes, Shape& rShape, bool btxXfrm = false ) throw();
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+protected:
+ Shape& mrShape;
+ bool mbtxXfrm;
+};
+
+} // namespace drawingml
+} // namespace oox
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */