diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-05-28 09:14:25 +0200 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-05-28 09:14:25 +0200 |
commit | 026c7e4aa36974f7ce0efeec70011bf745fab4a2 (patch) | |
tree | e48c98483e19a29cc6610781c6975d0338aa568b /oox | |
parent | aa2d6f3360a16f9066e8b83ddcd69e62996a6f53 (diff) | |
parent | cdac63817e9f570ebea893e9c488c198aff3026c (diff) |
CWS-TOOLING: integrate CWS ooxml10
Diffstat (limited to 'oox')
33 files changed, 463 insertions, 25 deletions
diff --git a/oox/inc/oox/drawingml/customshapegeometry.hxx b/oox/inc/oox/drawingml/customshapegeometry.hxx index 4fec38cf09eb..75a788acb609 100644 --- a/oox/inc/oox/drawingml/customshapegeometry.hxx +++ b/oox/inc/oox/drawingml/customshapegeometry.hxx @@ -41,11 +41,11 @@ namespace oox { namespace drawingml { class CustomShapeGeometryContext : public ::oox::core::ContextHandler { public: - CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, CustomShapeProperties& rCustomShapeProperties ); + CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, Shape& rShape ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); private: - CustomShapeProperties& mrCustomShapeProperties; + Shape& mrShape; }; // --------------------------------------------------------------------- diff --git a/oox/inc/oox/drawingml/customshapeproperties.hxx b/oox/inc/oox/drawingml/customshapeproperties.hxx index 44e91d6e797b..ff1f26533036 100644 --- a/oox/inc/oox/drawingml/customshapeproperties.hxx +++ b/oox/inc/oox/drawingml/customshapeproperties.hxx @@ -32,6 +32,7 @@ #include "oox/drawingml/color.hxx" #include <com/sun/star/graphic/XGraphic.hpp> #include <boost/shared_ptr.hpp> +#include <basegfx/polygon/b2dpolypolygon.hxx> #include "tokens.hxx" #include <vector> #include <map> @@ -74,11 +75,12 @@ public: std::vector< CustomShapeGuide >& getAdjustmentValues(){ return maAdjustmentValues; }; double getValue( const std::vector< CustomShapeGuide >&, sal_uInt32 nIndex ) const; - + ::basegfx::B2DPolyPolygon& getPolygon() { return maPolygon; } private: rtl::OUString maShapePresetType; std::vector< CustomShapeGuide > maAdjustmentValues; + ::basegfx::B2DPolyPolygon maPolygon; }; } } diff --git a/oox/inc/oox/drawingml/drawingmltypes.hxx b/oox/inc/oox/drawingml/drawingmltypes.hxx index ed4367e63857..f8bb4c91b5d5 100644 --- a/oox/inc/oox/drawingml/drawingmltypes.hxx +++ b/oox/inc/oox/drawingml/drawingmltypes.hxx @@ -30,6 +30,7 @@ #include <boost/shared_ptr.hpp> #include <com/sun/star/style/TabAlign.hpp> +#include <com/sun/star/drawing/TextVerticalAdjust.hpp> #include <com/sun/star/geometry/IntegerRectangle2D.hpp> #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/awt/Size.hpp> @@ -118,6 +119,9 @@ float GetTextSize( const ::rtl::OUString& rValue ); /** converts the ST_TextSpacingPoint to 1/100mm */ sal_Int32 GetTextSpacingPoint( const ::rtl::OUString& sValue ); +sal_Int32 GetTextSpacingPoint( const sal_Int32 nValue ); + +::com::sun::star::drawing::TextVerticalAdjust GetTextVerticalAdjust( sal_Int32 nToken ); /** */ ::com::sun::star::style::TabAlign GetTabAlign( ::sal_Int32 aToken ); diff --git a/oox/inc/oox/drawingml/shape.hxx b/oox/inc/oox/drawingml/shape.hxx index f4f5a5ee68fe..c951369dbf78 100644 --- a/oox/inc/oox/drawingml/shape.hxx +++ b/oox/inc/oox/drawingml/shape.hxx @@ -30,7 +30,7 @@ #include "oox/helper/propertymap.hxx" #include "oox/drawingml/drawingmltypes.hxx" -#include "oox/drawingml/customshapeproperties.hxx" +//#include "oox/drawingml/customshapeproperties.hxx" #include "oox/drawingml/textliststyle.hxx" #include <com/sun/star/frame/XModel.hpp> @@ -42,6 +42,9 @@ namespace oox { namespace drawingml { +class CustomShapeProperties; +typedef boost::shared_ptr< CustomShapeProperties > CustomShapePropertiesPtr; + typedef ::std::map< ::rtl::OUString, ShapePtr > ShapeIdMap; struct ShapeStyleRef diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx b/oox/inc/oox/drawingml/textcharacterproperties.hxx index 81cd95dddff2..6f4282471227 100644 --- a/oox/inc/oox/drawingml/textcharacterproperties.hxx +++ b/oox/inc/oox/drawingml/textcharacterproperties.hxx @@ -52,6 +52,7 @@ struct TextCharacterProperties Color maHighlightColor; OptValue< ::rtl::OUString > moLang; OptValue< sal_Int32 > moHeight; + OptValue< sal_Int32 > moSpacing; OptValue< sal_Int32 > moUnderline; OptValue< sal_Int32 > moStrikeout; OptValue< sal_Int32 > moCaseMap; diff --git a/oox/inc/oox/drawingml/textliststyle.hxx b/oox/inc/oox/drawingml/textliststyle.hxx index 6ba4cdf1d62a..1a8fca45bf25 100644 --- a/oox/inc/oox/drawingml/textliststyle.hxx +++ b/oox/inc/oox/drawingml/textliststyle.hxx @@ -50,6 +50,10 @@ public: inline const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; }; inline TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; }; +#if OSL_DEBUG_LEVEL > 0 + void dump( int nLevels=9 ); +#endif + protected: TextParagraphPropertiesVector maListStyle; diff --git a/oox/inc/oox/drawingml/textparagraphproperties.hxx b/oox/inc/oox/drawingml/textparagraphproperties.hxx index ef80af2d1c11..310df83212a0 100644 --- a/oox/inc/oox/drawingml/textparagraphproperties.hxx +++ b/oox/inc/oox/drawingml/textparagraphproperties.hxx @@ -112,6 +112,10 @@ public: size can be zero and the default value is returned. */ float getCharHeightPoints( float fDefault ) const; +#if OSL_DEBUG_LEVEL > 0 + void dump() { maTextParagraphPropertyMap.dump(); OSL_TRACE("character height: %f", maTextCharacterProperties.getCharHeightPoints(-1)); } +#endif + protected: TextCharacterProperties maTextCharacterProperties; diff --git a/oox/inc/oox/helper/propertymap.hxx b/oox/inc/oox/helper/propertymap.hxx index 30df15d7e5c6..150f5c3d9364 100644 --- a/oox/inc/oox/helper/propertymap.hxx +++ b/oox/inc/oox/helper/propertymap.hxx @@ -89,6 +89,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > makePropertySet() const; +#if OSL_DEBUG_LEVEL > 0 + static void dump( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rXPropSet); + void dump(); +#endif + private: const PropertyList* mpPropNames; }; diff --git a/oox/inc/oox/helper/propertyset.hxx b/oox/inc/oox/helper/propertyset.hxx index a1769374d959..8ddfaff44421 100644 --- a/oox/inc/oox/helper/propertyset.hxx +++ b/oox/inc/oox/helper/propertyset.hxx @@ -127,6 +127,10 @@ public: @param rPropertyMap The property map. */ void setProperties( const PropertyMap& rPropertyMap ); +#if OSL_DEBUG_LEVEL > 0 + void dump(); +#endif + // ------------------------------------------------------------------------ private: /** Gets the specified property from the property set. diff --git a/oox/inc/oox/ppt/pptshape.hxx b/oox/inc/oox/ppt/pptshape.hxx index 59f1beb39677..09c7830a96bb 100644 --- a/oox/inc/oox/ppt/pptshape.hxx +++ b/oox/inc/oox/ppt/pptshape.hxx @@ -61,9 +61,15 @@ public: ShapeLocation getShapeLocation() const { return meShapeLocation; }; sal_Bool isReferenced() const { return mbReferenced; }; void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; }; + void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; } + + static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ); + static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes ); + static oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ); protected: + oox::drawingml::ShapePtr mpPlaceholder; }; } } diff --git a/oox/inc/oox/ppt/slidetransition.hxx b/oox/inc/oox/ppt/slidetransition.hxx index 5427d90a5e35..df2eed4d6083 100644 --- a/oox/inc/oox/ppt/slidetransition.hxx +++ b/oox/inc/oox/ppt/slidetransition.hxx @@ -56,6 +56,8 @@ namespace oox { namespace ppt { static sal_Int16 ooxToOdpEightDirections( ::sal_Int32 nOoxType ); static sal_Int16 ooxToOdpCornerDirections( ::sal_Int32 nOoxType ); static sal_Int16 ooxToOdpBorderDirections( ::sal_Int32 nOoxType ); + static sal_Int16 ooxToOdpSideDirections( ::sal_Int32 nOoxType ); + static sal_Bool ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType ); void setOoxTransitionType( ::sal_Int32 OoxType, ::sal_Int32 param1, ::sal_Int32 param2 ); diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx index 82a22213b713..f69fde409c0e 100644 --- a/oox/source/drawingml/chart/plotareaconverter.cxx +++ b/oox/source/drawingml/chart/plotareaconverter.cxx @@ -27,6 +27,7 @@ #include "oox/drawingml/chart/plotareaconverter.hxx" #include <com/sun/star/drawing/Direction3D.hpp> +#include <com/sun/star/drawing/ProjectionMode.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx index decb759579f3..79c0c2e28d99 100644 --- a/oox/source/drawingml/customshapegeometry.cxx +++ b/oox/source/drawingml/customshapegeometry.cxx @@ -26,10 +26,12 @@ ************************************************************************/ #include "oox/drawingml/customshapegeometry.hxx" +#include "oox/drawingml/customshapeproperties.hxx" #include <com/sun/star/xml/sax/FastToken.hpp> #include <comphelper/stl_types.hxx> #include <hash_map> +#include <basegfx/polygon/b2dpolygon.hxx> #include "oox/helper/helper.hxx" #include "oox/helper/propertymap.hxx" @@ -37,6 +39,7 @@ #include "tokens.hxx" using ::rtl::OUString; +using namespace ::basegfx; using namespace ::oox::core; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; @@ -180,6 +183,88 @@ Reference< XFastContextHandler > AdjustmentValueContext::createFastChildContext( // --------------------------------------------------------------------- +class PathListContext : public ContextHandler +{ +public: + PathListContext( ContextHandler& rParent, Shape& rShape ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL endFastElement( sal_Int32 aElementToken ) throw (SAXException, RuntimeException); + +protected: + Shape& mrShape; + sal_Int32 maPointToken; + ::basegfx::B2DPolygon maPolygon; +}; + +PathListContext::PathListContext( ContextHandler& rParent, Shape& rShape ) +: ContextHandler( rParent ) +, mrShape( rShape ) +{ +} + +Reference< XFastContextHandler > PathListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException) +{ + switch( aElementToken ) { + case NMSP_DRAWINGML | XML_path: + maPolygon.clear(); + break; + case NMSP_DRAWINGML | XML_close: + maPolygon.setClosed( true ); + break; + case NMSP_DRAWINGML | XML_pt: + { + OUString sX, sY; + + sX = xAttribs->getOptionalValue( XML_x ); + sY = xAttribs->getOptionalValue( XML_y ); + + double dX, dY; + + dX = sX.toDouble(); + dY = sY.toDouble(); + + maPolygon.append( B2DPoint ( dX, dY ) ); + break; + } + case NMSP_DRAWINGML | XML_lnTo: + case NMSP_DRAWINGML | XML_moveTo: + maPointToken = aElementToken; + break; + } + + return this; +} + +void PathListContext::endFastElement( sal_Int32 aElementToken ) throw (SAXException, RuntimeException) +{ + switch( aElementToken ) { + case NMSP_DRAWINGML|XML_pathLst: + { + B2DPolyPolygon& rPoly = mrShape.getCustomShapeProperties()->getPolygon(); + if( rPoly.count() ) { + if( rPoly.areControlPointsUsed() ) { + if( rPoly.isClosed() ) + mrShape.setServiceName( "com.sun.star.drawing.ClosedBezierShape" ); + else + mrShape.setServiceName( "com.sun.star.drawing.OpenBezierShape" ); + } else { + if( rPoly.isClosed() ) + mrShape.setServiceName( "com.sun.star.drawing.PolyPolygonPathShape" ); + else + mrShape.setServiceName( "com.sun.star.drawing.PolyLinePathShape" ); + } + } + break; + } + case NMSP_DRAWINGML|XML_path: + if( maPolygon.count() > 0 ) + mrShape.getCustomShapeProperties()->getPolygon().append( maPolygon ); + break; + } +} + +// --------------------------------------------------------------------- + OUString GetShapeType( sal_Int32 nType ) { OUString sType; @@ -981,9 +1066,9 @@ static OUString GetTextShapeType( sal_Int32 nType ) // --------------------------------------------------------------------- // CT_CustomGeometry2D -CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler& rParent, const Reference< XFastAttributeList >& /* xAttribs */, CustomShapeProperties& rCustomShapeProperties ) +CustomShapeGeometryContext::CustomShapeGeometryContext( ContextHandler& rParent, const Reference< XFastAttributeList >& /* xAttribs */, Shape& rShape ) : ContextHandler( rParent ) -, mrCustomShapeProperties( rCustomShapeProperties ) +, mrShape( rShape ) { } @@ -997,8 +1082,9 @@ Reference< XFastContextHandler > CustomShapeGeometryContext::createFastChildCont case NMSP_DRAWINGML|XML_ahLst: // CT_AdjustHandleList adjust handle list case NMSP_DRAWINGML|XML_cxnLst: // CT_ConnectionSiteList connection site list case NMSP_DRAWINGML|XML_rect: // CT_GeomRectList geometry rect list + break; case NMSP_DRAWINGML|XML_pathLst: // CT_Path2DList 2d path list - break; + return new PathListContext( *this, mrShape ); } Reference< XFastContextHandler > xEmpty; diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx index 81c0d597afe2..53477211848e 100644 --- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx +++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx @@ -30,6 +30,7 @@ #include "oox/helper/helper.hxx" #include "layoutnodecontext.hxx" #include "oox/drawingml/diagram/datamodelcontext.hxx" +#include "tokens.hxx" using namespace ::oox::core; using namespace ::com::sun::star::uno; diff --git a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx index 0cad22660ab6..ac2e755bee40 100644 --- a/oox/source/drawingml/diagram/diagramfragmenthandler.cxx +++ b/oox/source/drawingml/diagram/diagramfragmenthandler.cxx @@ -31,7 +31,7 @@ #include "oox/drawingml/diagram/datamodelcontext.hxx" #include "oox/core/namespaces.hxx" #include "diagramdefinitioncontext.hxx" - +#include "tokens.hxx" using namespace ::oox::core; using namespace ::com::sun::star::xml::sax; diff --git a/oox/source/drawingml/drawingmltypes.cxx b/oox/source/drawingml/drawingmltypes.cxx index 6773c5d6149b..e5aef824bf54 100644 --- a/oox/source/drawingml/drawingmltypes.cxx +++ b/oox/source/drawingml/drawingmltypes.cxx @@ -37,8 +37,9 @@ using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::xml::sax::XFastAttributeList; using namespace ::com::sun::star::awt; -using namespace ::com::sun::star::style; +using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::geometry; +using namespace ::com::sun::star::style; namespace oox { namespace drawingml { @@ -125,10 +126,30 @@ sal_Int32 GetTextSpacingPoint( const OUString& sValue ) { sal_Int32 nRet; if( ::sax::Converter::convertNumber( nRet, sValue ) ) - nRet = ( nRet * 254 + 360 ) / 720; + nRet = GetTextSpacingPoint( nRet ); return nRet; } +sal_Int32 GetTextSpacingPoint( const sal_Int32 nValue ) +{ + return ( nValue * 254 + 360 ) / 720; +} + +TextVerticalAdjust GetTextVerticalAdjust( sal_Int32 nToken ) +{ + TextVerticalAdjust rVal = TextVerticalAdjust_TOP; + + switch( nToken ) { + case XML_b: + rVal = TextVerticalAdjust_BOTTOM; + break; + case XML_ctr: + rVal = TextVerticalAdjust_CENTER; + break; + } + + return rVal; +} float GetFontHeight( sal_Int32 nHeight ) { diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index a0335fe68ee2..8537017c2118 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/chart2/XChartDocument.hpp> #include "oox/drawingml/fillpropertiesgroupcontext.hxx" +#include "oox/drawingml/customshapeproperties.hxx" #include "oox/drawingml/diagram/diagramfragmenthandler.hxx" #include "oox/drawingml/table/tablecontext.hxx" #include "oox/core/namespaces.hxx" diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 59b3f35dc8cc..1a32d6a206a0 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -26,6 +26,7 @@ ************************************************************************/ #include "oox/drawingml/shape.hxx" +#include "oox/drawingml/customshapeproperties.hxx" #include "oox/drawingml/theme.hxx" #include "oox/drawingml/fillproperties.hxx" #include "oox/drawingml/lineproperties.hxx" @@ -218,8 +219,8 @@ void Shape::addChildren( aIter = rMaster.maChildren.begin(); while( aIter != rMaster.maChildren.end() ) { - Rectangle aShapeRect; - Rectangle* pShapeRect = 0; + awt::Rectangle aShapeRect; + awt::Rectangle* pShapeRect = 0; if ( ( nGlobalLeft != SAL_MAX_INT32 ) && ( nGlobalRight != SAL_MIN_INT32 ) && ( nGlobalTop != SAL_MAX_INT32 ) && ( nGlobalBottom != SAL_MIN_INT32 ) ) { sal_Int32 nGlobalWidth = nGlobalRight - nGlobalLeft; @@ -298,6 +299,35 @@ Reference< XShape > Shape::createAndInsert( aTransformation.translate( aPosition.X / 360.0, aPosition.Y / 360.0 ); } + if ( mpCustomShapePropertiesPtr && mpCustomShapePropertiesPtr->getPolygon().count() ) + { + ::basegfx::B2DPolyPolygon& rPolyPoly = mpCustomShapePropertiesPtr->getPolygon(); + + if( rPolyPoly.count() > 0 ) { + if( rPolyPoly.areControlPointsUsed() ) { + // TODO Beziers + } else { + uno::Sequence< uno::Sequence< awt::Point > > aPolyPolySequence( rPolyPoly.count() ); + + for (sal_uInt32 j = 0; j < rPolyPoly.count(); j++ ) { + ::basegfx::B2DPolygon aPoly = rPolyPoly.getB2DPolygon( j ); + + // now creating the corresponding PolyPolygon + sal_Int32 i, nNumPoints = aPoly.count(); + uno::Sequence< awt::Point > aPointSequence( nNumPoints ); + awt::Point* pPoints = aPointSequence.getArray(); + for( i = 0; i < nNumPoints; ++i ) + { + const ::basegfx::B2DPoint aPoint( aPoly.getB2DPoint( i ) ); + pPoints[ i ] = awt::Point( static_cast< sal_Int32 >( aPoint.getX() ), static_cast< sal_Int32 >( aPoint.getY() ) ); + } + aPolyPolySequence.getArray()[ j ] = aPointSequence; + } + maShapeProperties[ PROP_PolyPolygon ] <<= aPolyPolySequence; + } + } + } + // special for lineshape if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.LineShape" ) ) { @@ -422,7 +452,6 @@ Reference< XShape > Shape::createAndInsert( PropertyMap aShapeProperties; PropertyMap::const_iterator aShapePropIter; - aShapeProperties.insert( getShapeProperties().begin(), getShapeProperties().end() ); if( mxCreateCallback.get() ) { for ( aShapePropIter = mxCreateCallback->getShapeProperties().begin(); @@ -438,6 +467,7 @@ Reference< XShape > Shape::createAndInsert( aShapeProperties[ (*aShapePropIter).first ] = (*aShapePropIter).second; } + aShapeProperties.insert( getShapeProperties().begin(), getShapeProperties().end() ); // applying properties PropertySet aPropSet( xSet ); if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) ) diff --git a/oox/source/drawingml/shapepropertiescontext.cxx b/oox/source/drawingml/shapepropertiescontext.cxx index 68c8ed967159..7724ba9b44b2 100644 --- a/oox/source/drawingml/shapepropertiescontext.cxx +++ b/oox/source/drawingml/shapepropertiescontext.cxx @@ -74,7 +74,7 @@ Reference< XFastContextHandler > ShapePropertiesContext::createFastChildContext( // GeometryGroup case NMSP_DRAWINGML|XML_custGeom: // custom geometry "CT_CustomGeometry2D" - xRet.set( new CustomShapeGeometryContext( *this, xAttribs, *(mrShape.getCustomShapeProperties()) ) ); + xRet.set( new CustomShapeGeometryContext( *this, xAttribs, mrShape ) ); break; diff --git a/oox/source/drawingml/table/tablerowcontext.cxx b/oox/source/drawingml/table/tablerowcontext.cxx index 17881d89639b..7e0ff052bb4e 100644 --- a/oox/source/drawingml/table/tablerowcontext.cxx +++ b/oox/source/drawingml/table/tablerowcontext.cxx @@ -31,6 +31,7 @@ #include "oox/drawingml/table/tablecellcontext.hxx" #include "oox/drawingml/table/tablerow.hxx" #include "oox/core/namespaces.hxx" +#include "tokens.hxx" using namespace ::oox::core; using namespace ::com::sun::star; diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index ec605a3adadd..668266f2f679 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -27,7 +27,9 @@ #include "oox/drawingml/textbodypropertiescontext.hxx" +#include <com/sun/star/drawing/TextHorizontalAdjust.hpp> #include <com/sun/star/text/ControlCharacter.hpp> +#include <com/sun/star/text/WritingMode.hpp> #include <com/sun/star/drawing/TextVerticalAdjust.hpp> #include <com/sun/star/drawing/TextHorizontalAdjust.hpp> #include "oox/drawingml/textbodyproperties.hxx" @@ -41,8 +43,9 @@ using ::rtl::OUString; using namespace ::oox::core; using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::drawing; using namespace ::com::sun::star::text; +using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; namespace oox { namespace drawingml { @@ -64,21 +67,25 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, // ST_Coordinate OUString sValue; sValue = xAttributes->getOptionalValue( XML_lIns ); + if( sValue.getLength() ) { sal_Int32 nLeftInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextLeftDistance ] <<= static_cast< sal_Int32 >( nLeftInset ); - + } sValue = xAttributes->getOptionalValue( XML_tIns ); + if( sValue.getLength() ) { sal_Int32 nTopInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextUpperDistance ] <<= static_cast< sal_Int32 >( nTopInset ); - + } sValue = xAttributes->getOptionalValue( XML_rIns ); + if( sValue.getLength() ) { sal_Int32 nRightInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 91440 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextRightDistance ] <<= static_cast< sal_Int32 >( nRightInset ); - + } sValue = xAttributes->getOptionalValue( XML_bIns ); + if( sValue.getLength() ) { sal_Int32 nBottonInset = ( sValue.getLength() != 0 ? GetCoordinate( sValue ) : 45720 / 360 ); mrTextBodyProp.maPropertyMap[ PROP_TextLowerDistance ] <<= static_cast< sal_Int32 >( nBottonInset ); - + } // ST_TextAnchoringType drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP ); @@ -93,7 +100,10 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, } mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA; -// bool bAnchorCenter = aAttribs.getBool( XML_anchorCtr, false ); + bool bAnchorCenter = aAttribs.getBool( XML_anchorCtr, false ); + if( bAnchorCenter ) + mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= + TextHorizontalAdjust_CENTER; // bool bCompatLineSpacing = aAttribs.getBool( XML_compatLnSpc, false ); // bool bForceAA = aAttribs.getBool( XML_forceAA, false ); @@ -118,6 +128,18 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, // ST_TextVerticalType mrTextBodyProp.moVert = aAttribs.getToken( XML_vert ); + bool bRtl = aAttribs.getBool( XML_rtl, false ); + sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz ); + if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) { + mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ] + <<= WritingMode_TB_RL; + // workaround for TB_LR as using WritingMode2 doesn't work + if( !bAnchorCenter ) + mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= + TextHorizontalAdjust_LEFT; + } else + mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ] + <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB ); } // -------------------------------------------------------------------- @@ -143,6 +165,9 @@ Reference< XFastContextHandler > TextBodyPropertiesContext::createFastChildConte mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false; // CT_TextNoAutofit break; case NMSP_DRAWINGML|XML_normAutofit: // CT_TextNormalAutofit + mrTextBodyProp.maPropertyMap[ PROP_TextFitToSize ] <<= true; + mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= false; + break; case NMSP_DRAWINGML|XML_spAutoFit: mrTextBodyProp.maPropertyMap[ PROP_TextAutoGrowHeight ] <<= true; break; diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 4dbd632b2191..3ac5018c1dad 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -59,6 +59,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource maHighlightColor.assignIfUsed( rSourceProps.maHighlightColor ); maUnderlineColor.assignIfUsed( rSourceProps.maUnderlineColor ); moHeight.assignIfUsed( rSourceProps.moHeight ); + moSpacing.assignIfUsed( rSourceProps.moSpacing ); moUnderline.assignIfUsed( rSourceProps.moUnderline ); moStrikeout.assignIfUsed( rSourceProps.moStrikeout ); moCaseMap.assignIfUsed( rSourceProps.moCaseMap ); @@ -126,6 +127,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil rPropMap[ PROP_CharHeightComplex ] <<= fHeight; } + rPropMap[ PROP_CharKerning ] <<= (sal_Int16) GetTextSpacingPoint( moSpacing.get( 0 ) ); + rPropMap[ PROP_CharUnderline ] <<= GetFontUnderline( moUnderline.get( XML_none ) ); rPropMap[ PROP_CharStrikeout ] <<= GetFontStrikeout( moStrikeout.get( XML_noStrike ) ); rPropMap[ PROP_CharCaseMap ] <<= GetCaseMap( moCaseMap.get( XML_none ) ); diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx index 5d01a28c9cfd..07a71c0855a1 100644 --- a/oox/source/drawingml/textliststyle.cxx +++ b/oox/source/drawingml/textliststyle.cxx @@ -65,4 +65,15 @@ void TextListStyle::apply( const TextListStyle& rTextListStyle ) applyStyleList( rTextListStyle.getListStyle(), getListStyle() ); } +#if OSL_DEBUG_LEVEL > 0 +void TextListStyle::dump( int nLevels ) +{ + for ( int i = 0; i < nLevels; i++ ) + { + OSL_TRACE("level: %d", i); + maListStyle[ i ]->dump(); + } +} +#endif + } } diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx index b37ccdbaf13c..59245201eb61 100644 --- a/oox/source/drawingml/theme.cxx +++ b/oox/source/drawingml/theme.cxx @@ -26,6 +26,7 @@ ************************************************************************/ #include "oox/drawingml/theme.hxx" +#include "tokens.hxx" using ::rtl::OUString; diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx index 9ff791fd21f3..58e2d27bcb78 100644 --- a/oox/source/helper/propertymap.cxx +++ b/oox/source/helper/propertymap.cxx @@ -50,6 +50,19 @@ using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::beans::XPropertySetInfo; using ::com::sun::star::beans::XVetoableChangeListener; +#if OSL_DEBUG_LEVEL > 0 +#include <cstdio> +#include <com/sun/star/style/LineSpacing.hpp> +#include <com/sun/star/style/LineSpacingMode.hpp> +#include <com/sun/star/text/WritingMode.hpp> +#define USS(x) OUStringToOString( x, RTL_TEXTENCODING_UTF8 ).getStr() +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using ::rtl::OString; +using ::com::sun::star::style::LineSpacing; +using ::com::sun::star::text::WritingMode; +#endif + namespace oox { // ============================================================================ @@ -228,6 +241,66 @@ Reference< XPropertySet > PropertyMap::makePropertySet() const return new GenericPropertySet( *this ); } +#if OSL_DEBUG_LEVEL > 0 +void PropertyMap::dump( Reference< XPropertySet > rXPropSet ) +{ + Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo (); + Sequence< beans::Property > props = info->getProperties (); + + OSL_TRACE("dump props, len: %d", props.getLength ()); + + for (int i=0; i < props.getLength (); i++) { + OString name = OUStringToOString( props [i].Name, RTL_TEXTENCODING_UTF8); + fprintf (stderr,"%30s = ", name.getStr() ); + + try { + Any value = rXPropSet->getPropertyValue( props [i].Name ); + + OUString strValue; + sal_Int32 intValue; + sal_uInt32 uintValue; + sal_Int16 int16Value; + sal_uInt16 uint16Value; + bool boolValue; + LineSpacing spacing; +// RectanglePoint pointValue; + WritingMode aWritingMode; + + if( value >>= strValue ) + fprintf (stderr,"\"%s\"\n", USS( strValue ) ); + else if( value >>= intValue ) + fprintf (stderr,"%d (hex: %x)\n", intValue, intValue); + else if( value >>= uintValue ) + fprintf (stderr,"%d (hex: %x)\n", uintValue, uintValue); + else if( value >>= int16Value ) + fprintf (stderr,"%d (hex: %x)\n", int16Value, int16Value); + else if( value >>= uint16Value ) + fprintf (stderr,"%d (hex: %x)\n", uint16Value, uint16Value); + else if( value >>= boolValue ) + fprintf (stderr,"%d (bool)\n", boolValue); + else if( value >>= aWritingMode ) + fprintf (stderr, "%d writing mode\n", aWritingMode); + else if( value >>= spacing ) { + fprintf (stderr, "mode: %d value: %d\n", spacing.Mode, spacing.Height); + } else if( value.isExtractableTo(::getCppuType((const sal_Int32*)0))) { + fprintf (stderr,"is extractable to int32\n"); + } +// else if( value >>= pointValue ) +// fprintf (stderr,"%d (RectanglePoint)\n", pointValue); + else + fprintf (stderr,"??? <unhandled type %s>\n", USS(value.getValueTypeName())); + } catch(Exception e) { + fprintf (stderr,"unable to get '%s' value\n", USS(props [i].Name)); + } + } +} + +void PropertyMap::dump() +{ + dump( Reference< XPropertySet >( makePropertySet(), UNO_QUERY ) ); +} +#endif + // ============================================================================ } // namespace oox diff --git a/oox/source/helper/propertyset.cxx b/oox/source/helper/propertyset.cxx index c52872e50f2f..e7071ba402a2 100644 --- a/oox/source/helper/propertyset.cxx +++ b/oox/source/helper/propertyset.cxx @@ -172,6 +172,13 @@ void PropertySet::setAnyProperty( const OUString& rPropName, const Any& rValue ) } } +#if OSL_DEBUG_LEVEL > 0 +void PropertySet::dump() +{ + PropertyMap::dump( Reference< XPropertySet >( getXPropertySet(), UNO_QUERY ) ); +} +#endif + // ============================================================================ } // namespace oox diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index ed53992f944b..eb3b3503452e 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -28,6 +28,7 @@ #include "oox/ppt/pptshape.hxx" #include "oox/core/namespaces.hxx" #include "oox/core/xmlfilterbase.hxx" +#include "oox/drawingml/textbody.hxx" #include "tokens.hxx" #include <com/sun/star/container/XNamed.hpp> @@ -40,6 +41,7 @@ using rtl::OUString; using namespace ::oox::core; +using namespace ::oox::drawingml; using namespace ::com::sun::star; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::uno; @@ -97,6 +99,11 @@ void PPTShape::addShape( { if ( ( meShapeLocation == Master ) || ( meShapeLocation == Layout ) ) sServiceName = rtl::OUString(); + else { + const rtl::OUString sTitleShapeService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.presentation.SubtitleShape" ) ); + sServiceName = sTitleShapeService; + aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle(); + } } break; case XML_obj : @@ -162,6 +169,21 @@ void PPTShape::addShape( } } + // use placeholder index if possible + if( mnSubType && getSubTypeIndex() && rSlidePersist.getMasterPersist().get() ) { + oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex(), rSlidePersist.getMasterPersist()->getShapes()->getChildren() ); + if( pPlaceholder.get() && pPlaceholder->getTextBody() ) { + TextListStylePtr pNewTextListStyle ( new TextListStyle() ); + + pNewTextListStyle->apply( pPlaceholder->getTextBody()->getTextListStyle() ); + if( pPlaceholder->getMasterTextListStyle().get() ) + pNewTextListStyle->apply( *pPlaceholder->getMasterTextListStyle() ); + + aMasterTextListStyle = pNewTextListStyle; + } + } + + if ( sServiceName.getLength() ) { if ( !aMasterTextListStyle.get() ) @@ -209,4 +231,51 @@ void PPTShape::applyShapeReference( const oox::drawingml::Shape& rReferencedShap Shape::applyShapeReference( rReferencedShape ); } +oox::drawingml::ShapePtr PPTShape::findPlaceholder( const sal_Int32 nMasterPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ) +{ + oox::drawingml::ShapePtr aShapePtr; + std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() ); + while( aRevIter != rShapes.rend() ) + { + if ( (*aRevIter)->getSubType() == nMasterPlaceholder ) + { + aShapePtr = *aRevIter; + break; + } + std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren(); + aShapePtr = findPlaceholder( nMasterPlaceholder, rChildren ); + if ( aShapePtr.get() ) + break; + aRevIter++; + } + return aShapePtr; +} + +oox::drawingml::ShapePtr PPTShape::findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes ) +{ + oox::drawingml::ShapePtr aShapePtr; + std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() ); + while( aRevIter != rShapes.rend() ) + { + if ( (*aRevIter)->getSubTypeIndex() == nIdx ) + { + aShapePtr = *aRevIter; + break; + } + std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren(); + aShapePtr = findPlaceholderByIndex( nIdx, rChildren ); + if ( aShapePtr.get() ) + break; + aRevIter++; + } + return aShapePtr; +} + +// if nFirstPlaceholder can't be found, it will be searched for nSecondPlaceholder +oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, std::vector< oox::drawingml::ShapePtr >& rShapes ) +{ + oox::drawingml::ShapePtr pPlaceholder = findPlaceholder( nFirstPlaceholder, rShapes ); + return !nSecondPlaceholder || pPlaceholder.get() ? pPlaceholder : findPlaceholder( nSecondPlaceholder, rShapes ); +} + } } diff --git a/oox/source/ppt/pptshapecontext.cxx b/oox/source/ppt/pptshapecontext.cxx index 8379a6e95735..86e254088041 100644 --- a/oox/source/ppt/pptshapecontext.cxx +++ b/oox/source/ppt/pptshapecontext.cxx @@ -111,14 +111,27 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In { sal_Int32 nSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) ); mpShapePtr->setSubType( nSubType ); - mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() ); - if ( nSubType ) + OUString sIdx( xAttribs->getOptionalValue( XML_idx ) ); + sal_Bool bHasIdx = sIdx.getLength() > 0; + sal_Int32 nIdx = sIdx.toInt32(); + mpShapePtr->setSubTypeIndex( nIdx ); + + if ( nSubType || bHasIdx ) { PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() ); if ( pPPTShapePtr ) { oox::ppt::ShapeLocation eShapeLocation = pPPTShapePtr->getShapeLocation(); - if ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) + oox::drawingml::ShapePtr pPlaceholder; + + if ( bHasIdx && eShapeLocation == Slide ) + { + // TODO: use id to shape map + SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() ); + if ( pMasterPersist.get() ) + pPlaceholder = PPTShape::findPlaceholderByIndex( nIdx, pMasterPersist->getShapes()->getChildren() ); + } + if ( !pPlaceholder.get() && ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) ) { // inheriting properties from placeholder objects by cloning shape @@ -157,7 +170,6 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In } if ( nFirstPlaceholder ) { - oox::drawingml::ShapePtr pPlaceholder; if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, -1, mpSlidePersistPtr->getShapes()->getChildren() ); else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects @@ -176,6 +188,14 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In } } } + if ( pPlaceholder.get() ) + { + mpShapePtr->applyShapeReference( *pPlaceholder.get() ); + PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() ); + if ( pPPTShape ) + pPPTShape->setReferenced( sal_True ); + pPPTShapePtr->setPlaceholder( pPlaceholder ); + } } } break; diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx index 62fbc1a87725..69f32e01e7eb 100644 --- a/oox/source/ppt/slidefragmenthandler.cxx +++ b/oox/source/ppt/slidefragmenthandler.cxx @@ -32,6 +32,7 @@ #include <com/sun/star/container/XNamed.hpp> #include "tokens.hxx" +#include "properties.hxx" #include "oox/helper/propertyset.hxx" #include "oox/core/namespaces.hxx" #include "oox/core/xmlfilterbase.hxx" @@ -86,6 +87,18 @@ Reference< XFastContextHandler > SlideFragmentHandler::createFastChildContext( s case NMSP_PPT|XML_sldMaster: // CT_SlideMaster case NMSP_PPT|XML_handoutMaster: // CT_HandoutMaster case NMSP_PPT|XML_sld: // CT_CommonSlideData + { + AttributeList attribs( xAttribs ); + + Reference< XDrawPage > xSlide( mpSlidePersistPtr->getPage() ); + PropertyMap aPropMap; + PropertySet aSlideProp( xSlide ); + + aPropMap[ PROP_Visible ] = Any( attribs.getBool( XML_show, sal_True ) ); + aSlideProp.setProperties( aPropMap ); + + break; + } case NMSP_PPT|XML_notes: // CT_NotesSlide case NMSP_PPT|XML_notesMaster: // CT_NotesMaster break; diff --git a/oox/source/ppt/slidetransition.cxx b/oox/source/ppt/slidetransition.cxx index bdfc1621e486..ee889e13d840 100644 --- a/oox/source/ppt/slidetransition.cxx +++ b/oox/source/ppt/slidetransition.cxx @@ -176,6 +176,39 @@ namespace oox { namespace ppt { return nOdpDirection; } + sal_Int16 SlideTransition::ooxToOdpSideDirections( ::sal_Int32 nOoxType ) + { + sal_Int16 nOdpDirection; + switch( nOoxType ) + { + case XML_d: + case XML_u: + nOdpDirection = TransitionSubType::TOPTOBOTTOM; + break; + case XML_l: + case XML_r: + nOdpDirection = TransitionSubType::LEFTTORIGHT; + break; + default: + nOdpDirection= 0; + break; + } + return nOdpDirection; + } + + sal_Bool SlideTransition::ooxToOdpSideDirectionsDirectionNormal( ::sal_Int32 nOoxType ) + { + sal_Bool nOdpDirection = true; + switch( nOoxType ) + { + case XML_u: + case XML_l: + nOdpDirection = false; + break; + } + return nOdpDirection; + } + sal_Int16 SlideTransition::ooxToOdpCornerDirections( ::sal_Int32 nOoxType ) { sal_Int16 nOdpDirection; @@ -291,7 +324,8 @@ namespace oox { namespace ppt { break; case NMSP_PPT|XML_wipe: mnTransitionType = TransitionType::BARWIPE; - mnTransitionSubType = ooxToOdpBorderDirections( param1 ); + mnTransitionSubType = ooxToOdpSideDirections( param1 ); + mbTransitionDirectionNormal = ooxToOdpSideDirectionsDirectionNormal( param1 ); break; case NMSP_PPT|XML_split: mnTransitionType = TransitionType::BARNDOORWIPE; diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 42efee474d90..05734b65e2a7 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -29,6 +29,7 @@ #include "oox/vml/vmldrawingfragment.hxx" #include "oox/vml/vmlshape.hxx" #include "oox/vml/vmlshapecontainer.hxx" +#include "tokens.hxx" #if DEBUG #include <iostream> diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index 609eeda60cde..203ce4552e5d 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -58,6 +58,7 @@ CharFontPitchComplex CharHeight CharHeightAsian CharHeightComplex +CharKerning CharLocale CharLocaleAsian CharLocaleComplex @@ -380,6 +381,8 @@ Text TextAutoGrowHeight TextBreak TextColor +TextFitToSize +TextHorizontalAdjust TextLeftDistance TextLowerDistance TextOverlap @@ -413,6 +416,7 @@ VertJustify VerticalAlign VerticalSplitMode VerticalSplitPositionTwips +Visible VisibleSize VisualArea VisualEffect diff --git a/oox/source/xls/themebuffer.cxx b/oox/source/xls/themebuffer.cxx index 3aabd471742d..23617287dc57 100644 --- a/oox/source/xls/themebuffer.cxx +++ b/oox/source/xls/themebuffer.cxx @@ -27,6 +27,7 @@ #include "oox/xls/themebuffer.hxx" #include "oox/xls/stylesbuffer.hxx" +#include "tokens.hxx" using ::oox::drawingml::ClrScheme; |