summaryrefslogtreecommitdiff
path: root/oox/source/drawingml
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r--oox/source/drawingml/chart/chartdrawingfragment.cxx6
-rw-r--r--oox/source/drawingml/chart/objectformatter.cxx8
-rw-r--r--oox/source/drawingml/clrschemecontext.cxx2
-rw-r--r--oox/source/drawingml/color.cxx12
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx5
-rw-r--r--oox/source/drawingml/fillproperties.cxx54
-rw-r--r--oox/source/drawingml/fillpropertiesgroupcontext.cxx12
-rw-r--r--oox/source/drawingml/lineproperties.cxx15
-rw-r--r--oox/source/drawingml/linepropertiescontext.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx17
-rw-r--r--oox/source/drawingml/table/tablecell.cxx4
-rw-r--r--oox/source/drawingml/textcharacterproperties.cxx4
-rw-r--r--oox/source/drawingml/textfont.cxx4
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx2
14 files changed, 69 insertions, 78 deletions
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx
index 9df064125457..fcc350b583c3 100644
--- a/oox/source/drawingml/chart/chartdrawingfragment.cxx
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -2,14 +2,10 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
- * Copyright 2008 by Sun Microsystems, Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
- * $RCSfile: chartdrawingfragment.cxx,v $
- *
- * $Revision: 1.1 $
- *
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index 08ca5f44bec3..5b898d4da6ed 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -847,7 +847,7 @@ sal_Int32 DetailFormatterBase::getPhColor( sal_Int32 nSeriesIdx ) const
Color aColor;
aColor.setSrgbClr( nPhClr );
aColor.addChartTintTransformation( fShadeTint );
- nPhClr = aColor.getColor( mrData.mrFilter );
+ nPhClr = aColor.getColor( mrData.mrFilter.getGraphicHelper() );
}
return nPhClr;
@@ -859,7 +859,7 @@ sal_Int32 DetailFormatterBase::getSchemeColor( sal_Int32 nColorToken, sal_Int32
aColor.setSchemeClr( nColorToken );
if( nModToken != XML_TOKEN_INVALID )
aColor.addTransformation( nModToken, nModValue );
- return aColor.getColor( mrData.mrFilter );
+ return aColor.getColor( mrData.mrFilter.getGraphicHelper() );
}
// ============================================================================
@@ -888,7 +888,7 @@ void LineFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< Sh
aLineProps.assignUsed( *mxAutoLine );
if( rxShapeProp.is() )
aLineProps.assignUsed( rxShapeProp->getLineProperties() );
- aLineProps.pushToPropSet( rPropSet, mrData.mrFilter, mrData.maModelObjHelper, mrLinePropIds, getPhColor( nSeriesIdx ) );
+ aLineProps.pushToPropSet( rPropSet, mrData.maModelObjHelper, mrData.mrFilter.getGraphicHelper(), mrLinePropIds, getPhColor( nSeriesIdx ) );
}
// ============================================================================
@@ -916,7 +916,7 @@ void FillFormatter::convertFormatting( PropertySet& rPropSet, const ModelRef< Sh
aFillProps.assignUsed( rxShapeProp->getFillProperties() );
if( pPicOptions )
lclConvertPictureOptions( aFillProps, *pPicOptions );
- aFillProps.pushToPropSet( rPropSet, mrData.mrFilter, mrData.maModelObjHelper, mrFillPropIds, 0, getPhColor( nSeriesIdx ) );
+ aFillProps.pushToPropSet( rPropSet, mrData.maModelObjHelper, mrData.mrFilter.getGraphicHelper(), mrFillPropIds, 0, getPhColor( nSeriesIdx ) );
}
// ============================================================================
diff --git a/oox/source/drawingml/clrschemecontext.cxx b/oox/source/drawingml/clrschemecontext.cxx
index d91f15c56e18..996ddef2ab0f 100644
--- a/oox/source/drawingml/clrschemecontext.cxx
+++ b/oox/source/drawingml/clrschemecontext.cxx
@@ -73,7 +73,7 @@ clrSchemeColorContext::clrSchemeColorContext( ContextHandler& rParent, ClrScheme
clrSchemeColorContext::~clrSchemeColorContext()
{
- mrClrScheme.setColor( mnColorToken, getColor( getFilter() ) );
+ mrClrScheme.setColor( mnColorToken, getColor( getFilter().getGraphicHelper() ) );
}
clrSchemeContext::clrSchemeContext( ContextHandler& rParent, ClrScheme& rClrScheme ) :
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index ebf62f17a01e..8653d787517d 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -30,8 +30,8 @@
#include <math.h>
#include "tokens.hxx"
#include "oox/helper/containerhelper.hxx"
+#include "oox/helper/graphichelper.hxx"
#include "oox/core/namespaces.hxx"
-#include "oox/core/filterbase.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
using ::rtl::OUString;
@@ -350,7 +350,7 @@ void Color::clearTransparence()
mnAlpha = MAX_PERCENT;
}
-sal_Int32 Color::getColor( const ::oox::core::FilterBase& rFilter, sal_Int32 nPhClr ) const
+sal_Int32 Color::getColor( const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const
{
/* Special handling for theme style list placeholder colors (state
COLOR_PH), Color::getColor() may be called with different placeholder
@@ -368,10 +368,10 @@ sal_Int32 Color::getColor( const ::oox::core::FilterBase& rFilter, sal_Int32 nPh
case COLOR_CRGB: break; // nothing to do
case COLOR_HSL: break; // nothing to do
- case COLOR_SCHEME: setResolvedRgb( rFilter.getSchemeColor( mnC1 ) ); break;
- case COLOR_PALETTE: setResolvedRgb( rFilter.getPaletteColor( mnC1 ) ); break;
- case COLOR_SYSTEM: setResolvedRgb( rFilter.getSystemColor( mnC1, mnC2 ) ); break;
- case COLOR_PH: setResolvedRgb( nPhClr ); bIsPh = true; break;
+ case COLOR_SCHEME: setResolvedRgb( rGraphicHelper.getSchemeColor( mnC1 ) ); break;
+ case COLOR_PALETTE: setResolvedRgb( rGraphicHelper.getPaletteColor( mnC1 ) ); break;
+ case COLOR_SYSTEM: setResolvedRgb( rGraphicHelper.getSystemColor( mnC1, mnC2 ) ); break;
+ case COLOR_PH: setResolvedRgb( nPhClr ); bIsPh = true; break;
case COLOR_FINAL: return mnC1;
}
diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 28e84e72e2cc..4459c5936cfa 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -39,7 +39,6 @@
#include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
using rtl::OUString;
-using namespace ::oox::core;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -60,8 +59,8 @@ void CustomShapeProperties::apply( const CustomShapePropertiesPtr& /* rSourceCus
// not sure if this needs to be implemented
}
-void CustomShapeProperties::pushToPropSet( const ::oox::core::FilterBase& /* rFilterBase */,
- const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const
+void CustomShapeProperties::pushToPropSet(
+ const Reference < XPropertySet >& xPropSet, const Reference < XShape > & xShape ) const
{
if ( maShapePresetType.getLength() )
{
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 0e4d56a6634b..168055935104 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -41,7 +41,6 @@
#include "oox/helper/modelobjecthelper.hxx"
#include "oox/helper/propertymap.hxx"
#include "oox/helper/propertyset.hxx"
-#include "oox/core/filterbase.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
using namespace ::com::sun::star;
@@ -54,7 +53,6 @@ using ::com::sun::star::uno::Exception;
using ::com::sun::star::uno::UNO_QUERY;
using ::com::sun::star::uno::UNO_QUERY_THROW;
using ::com::sun::star::geometry::IntegerRectangle2D;
-using ::oox::core::FilterBase;
namespace oox {
namespace drawingml {
@@ -105,30 +103,26 @@ RectanglePoint lclGetRectanglePoint( sal_Int32 nToken )
return RectanglePoint_LEFT_TOP;
}
-const awt::Size lclGetOriginalSize( const FilterBase& rFilter, const Reference< XGraphic >& rxGraphic )
+const awt::Size lclGetOriginalSize( const GraphicHelper& rGraphicHelper, const Reference< XGraphic >& rxGraphic )
{
- awt::Size aSize100thMM( 0, 0 );
+ awt::Size aSizeHmm( 0, 0 );
try
{
Reference< beans::XPropertySet > xGraphicPropertySet( rxGraphic, UNO_QUERY_THROW );
- if( xGraphicPropertySet->getPropertyValue( CREATE_OUSTRING( "Size100thMM" ) ) >>= aSize100thMM )
+ if( xGraphicPropertySet->getPropertyValue( CREATE_OUSTRING( "Size100thMM" ) ) >>= aSizeHmm )
{
- if( !aSize100thMM.Width && !aSize100thMM.Height )
+ if( !aSizeHmm.Width && !aSizeHmm.Height )
{ // MAPMODE_PIXEL USED :-(
awt::Size aSourceSizePixel( 0, 0 );
if( xGraphicPropertySet->getPropertyValue( CREATE_OUSTRING( "SizePixel" ) ) >>= aSourceSizePixel )
- {
- aSize100thMM = awt::Size(
- rFilter.convertScreenPixelX( aSourceSizePixel.Width ),
- rFilter.convertScreenPixelY( aSourceSizePixel.Height ) );
- }
+ aSizeHmm = rGraphicHelper.convertScreenPixelToHmm( aSourceSizePixel );
}
}
}
catch( Exception& )
{
}
- return aSize100thMM;
+ return aSizeHmm;
}
} // namespace
@@ -221,8 +215,8 @@ Color FillProperties::getBestSolidColor() const
return aSolidColor;
}
-void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFilter,
- ModelObjectHelper& rModelObjHelper, const FillPropertyIds& rPropIds,
+void FillProperties::pushToPropMap( PropertyMap& rPropMap, ModelObjectHelper& rModelObjHelper,
+ const GraphicHelper& rGraphicHelper, const FillPropertyIds& rPropIds,
sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const
{
if( moFillType.has() )
@@ -237,7 +231,7 @@ void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
case XML_solidFill:
if( maFillColor.isUsed() )
{
- rPropMap.setProperty( rPropIds[ FillColorId ], maFillColor.getColor( rFilter, nPhClr ) );
+ rPropMap.setProperty( rPropIds[ FillColorId ], maFillColor.getColor( rGraphicHelper, nPhClr ) );
if( maFillColor.hasTransparence() )
rPropMap.setProperty( rPropIds[ FillTransparenceId ], maFillColor.getTransparence() );
eFillStyle = FillStyle_SOLID;
@@ -256,8 +250,8 @@ void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
size_t nColorCount = maGradientProps.maGradientStops.size();
if( nColorCount > 1 )
{
- aGradient.StartColor = maGradientProps.maGradientStops.begin()->second.getColor( rFilter, nPhClr );
- aGradient.EndColor = maGradientProps.maGradientStops.rbegin()->second.getColor( rFilter, nPhClr );
+ aGradient.StartColor = maGradientProps.maGradientStops.begin()->second.getColor( rGraphicHelper, nPhClr );
+ aGradient.EndColor = maGradientProps.maGradientStops.rbegin()->second.getColor( rGraphicHelper, nPhClr );
}
// "rotate with shape" not set, or set to false -> do not rotate
@@ -288,7 +282,7 @@ void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
{
GradientFillProperties::GradientStopMap::const_iterator aIt = maGradientProps.maGradientStops.begin();
// API StartColor is inner color in axial gradient
- aGradient.StartColor = (++aIt)->second.getColor( rFilter, nPhClr );
+ aGradient.StartColor = (++aIt)->second.getColor( rGraphicHelper, nPhClr );
}
nDmlAngle = maGradientProps.moShadeAngle.get( 0 ) - nShapeRotation;
}
@@ -319,7 +313,7 @@ void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
{
// TODO: "rotate with shape" is not possible with our current core
- OUString aGraphicUrl = rFilter.getGraphicHelper().createGraphicObject( maBlipProps.mxGraphic );
+ OUString aGraphicUrl = rGraphicHelper.createGraphicObject( maBlipProps.mxGraphic );
if( aGraphicUrl.getLength() > 0 )
{
// push bitmap or named bitmap to property map
@@ -353,7 +347,7 @@ void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
RectanglePoint eRectPoint = lclGetRectanglePoint( maBlipProps.moTileAlign.get( XML_tl ) );
rPropMap.setProperty( rPropIds[ FillBitmapRectanglePointId ], eRectPoint );
- awt::Size aOriginalSize = lclGetOriginalSize( rFilter, maBlipProps.mxGraphic );
+ awt::Size aOriginalSize = lclGetOriginalSize( rGraphicHelper, maBlipProps.mxGraphic );
if( (aOriginalSize.Width > 0) && (aOriginalSize.Height > 0) )
{
// size of one bitmap tile (given as 1/1000 percent of bitmap size), convert to 1/100 mm
@@ -381,7 +375,7 @@ void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
Color aColor = getBestSolidColor();
if( aColor.isUsed() )
{
- rPropMap.setProperty( rPropIds[ FillColorId ], aColor.getColor( rFilter, nPhClr ) );
+ rPropMap.setProperty( rPropIds[ FillColorId ], aColor.getColor( rGraphicHelper, nPhClr ) );
if( aColor.hasTransparence() )
rPropMap.setProperty( rPropIds[ FillTransparenceId ], aColor.getTransparence() );
eFillStyle = FillStyle_SOLID;
@@ -400,12 +394,12 @@ void FillProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
}
}
-void FillProperties::pushToPropSet( PropertySet& rPropSet, const FilterBase& rFilter,
- ModelObjectHelper& rModelObjHelper, const FillPropertyIds& rPropIds,
+void FillProperties::pushToPropSet( PropertySet& rPropSet, ModelObjectHelper& rModelObjHelper,
+ const GraphicHelper& rGraphicHelper, const FillPropertyIds& rPropIds,
sal_Int32 nShapeRotation, sal_Int32 nPhClr ) const
{
PropertyMap aPropMap;
- pushToPropMap( aPropMap, rFilter, rModelObjHelper, rPropIds, nShapeRotation, nPhClr );
+ pushToPropMap( aPropMap, rModelObjHelper, rGraphicHelper, rPropIds, nShapeRotation, nPhClr );
rPropSet.setProperties( aPropMap );
}
@@ -416,7 +410,7 @@ void GraphicProperties::assignUsed( const GraphicProperties& rSourceProps )
maBlipProps.assignUsed( rSourceProps.maBlipProps );
}
-void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFilter, sal_Int32 nPhClr ) const
+void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const
{
if( maBlipProps.mxGraphic.is() )
{
@@ -424,8 +418,8 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase&
Reference< XGraphic > xGraphic = maBlipProps.mxGraphic;
if( maBlipProps.maColorChangeFrom.isUsed() && maBlipProps.maColorChangeTo.isUsed() )
{
- sal_Int32 nFromColor = maBlipProps.maColorChangeFrom.getColor( rFilter, nPhClr );
- sal_Int32 nToColor = maBlipProps.maColorChangeTo.getColor( rFilter, nPhClr );
+ sal_Int32 nFromColor = maBlipProps.maColorChangeFrom.getColor( rGraphicHelper, nPhClr );
+ sal_Int32 nToColor = maBlipProps.maColorChangeTo.getColor( rGraphicHelper, nPhClr );
if ( (nFromColor != nToColor) || maBlipProps.maColorChangeTo.hasTransparence() ) try
{
sal_Int16 nToTransparence = maBlipProps.maColorChangeTo.getTransparence();
@@ -438,7 +432,7 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase&
}
}
- OUString aGraphicUrl = rFilter.getGraphicHelper().createGraphicObject( xGraphic );
+ OUString aGraphicUrl = rGraphicHelper.createGraphicObject( xGraphic );
if( aGraphicUrl.getLength() > 0 )
rPropMap[ PROP_GraphicURL ] <<= aGraphicUrl;
}
@@ -461,10 +455,10 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase&
rPropMap[ PROP_AdjustContrast ] <<= nContrast;
}
-void GraphicProperties::pushToPropSet( PropertySet& rPropSet, const FilterBase& rFilter, sal_Int32 nPhClr ) const
+void GraphicProperties::pushToPropSet( PropertySet& rPropSet, const GraphicHelper& rGraphicHelper, sal_Int32 nPhClr ) const
{
PropertyMap aPropMap;
- pushToPropMap( aPropMap, rFilter, nPhClr );
+ pushToPropMap( aPropMap, rGraphicHelper, nPhClr );
rPropSet.setProperties( aPropMap );
}
diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
index 454222bc52e6..8adffb265240 100644
--- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx
+++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx
@@ -270,12 +270,12 @@ Reference< XFastContextHandler > FillPropertiesContext::createFastChildContext(
{
switch( nElement )
{
- case A_TOKEN( noFill ): { rFillProps.moFillType = getToken( nElement ); return 0; };
- case A_TOKEN( solidFill ): { rFillProps.moFillType = getToken( nElement ); return new SolidFillContext( rParent, rxAttribs, rFillProps ); };
- case A_TOKEN( gradFill ): { rFillProps.moFillType = getToken( nElement ); return new GradientFillContext( rParent, rxAttribs, rFillProps.maGradientProps ); };
- case A_TOKEN( pattFill ): { rFillProps.moFillType = getToken( nElement ); return new PatternFillContext( rParent, rxAttribs, rFillProps.maPatternProps ); };
- case A_TOKEN( blipFill ): { rFillProps.moFillType = getToken( nElement ); return new BlipFillContext( rParent, rxAttribs, rFillProps.maBlipProps ); };
- case A_TOKEN( grpFill ): { rFillProps.moFillType = getToken( nElement ); return 0; }; // TODO
+ case A_TOKEN( noFill ): { rFillProps.moFillType = getToken( nElement ); return 0; };
+ case A_TOKEN( solidFill ): { rFillProps.moFillType = getToken( nElement ); return new SolidFillContext( rParent, rxAttribs, rFillProps ); };
+ case A_TOKEN( gradFill ): { rFillProps.moFillType = getToken( nElement ); return new GradientFillContext( rParent, rxAttribs, rFillProps.maGradientProps ); };
+ case A_TOKEN( pattFill ): { rFillProps.moFillType = getToken( nElement ); return new PatternFillContext( rParent, rxAttribs, rFillProps.maPatternProps ); };
+ case A_TOKEN( blipFill ): { rFillProps.moFillType = getToken( nElement ); return new BlipFillContext( rParent, rxAttribs, rFillProps.maBlipProps ); };
+ case A_TOKEN( grpFill ): { rFillProps.moFillType = getToken( nElement ); return 0; }; // TODO
}
return 0;
}
diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx
index 4a9a0d04e1e5..9f23cf466d30 100644
--- a/oox/source/drawingml/lineproperties.cxx
+++ b/oox/source/drawingml/lineproperties.cxx
@@ -37,10 +37,10 @@
#include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp>
#include "properties.hxx"
#include "tokens.hxx"
+#include "oox/helper/graphichelper.hxx"
#include "oox/helper/modelobjecthelper.hxx"
#include "oox/helper/propertymap.hxx"
#include "oox/helper/propertyset.hxx"
-#include "oox/core/filterbase.hxx"
#include "oox/core/namespaces.hxx"
#include "oox/drawingml/drawingmltypes.hxx"
@@ -52,7 +52,6 @@ using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::awt::Point;
using ::com::sun::star::container::XNameContainer;
-using ::oox::core::FilterBase;
namespace oox {
namespace drawingml {
@@ -395,8 +394,8 @@ void LineProperties::assignUsed( const LineProperties& rSourceProps )
moLineJoint.assignIfUsed( rSourceProps.moLineJoint );
}
-void LineProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFilter,
- ModelObjectHelper& rModelObjHelper, const LinePropertyIds& rPropIds, sal_Int32 nPhClr ) const
+void LineProperties::pushToPropMap( PropertyMap& rPropMap, ModelObjectHelper& rModelObjHelper,
+ const GraphicHelper& rGraphicHelper, const LinePropertyIds& rPropIds, sal_Int32 nPhClr ) const
{
// line fill type must exist, otherwise ignore other properties
if( maLineFill.moFillType.has() )
@@ -453,7 +452,7 @@ void LineProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
Color aLineColor = maLineFill.getBestSolidColor();
if( aLineColor.isUsed() )
{
- rPropMap.setProperty( rPropIds[ LineColorId ], aLineColor.getColor( rFilter, nPhClr ) );
+ rPropMap.setProperty( rPropIds[ LineColorId ], aLineColor.getColor( rGraphicHelper, nPhClr ) );
if( aLineColor.hasTransparence() )
rPropMap.setProperty( rPropIds[ LineTransparenceId ], aLineColor.getTransparence() );
}
@@ -464,11 +463,11 @@ void LineProperties::pushToPropMap( PropertyMap& rPropMap, const FilterBase& rFi
}
}
-void LineProperties::pushToPropSet( PropertySet& rPropSet, const FilterBase& rFilter,
- ModelObjectHelper& rModelObjHelper, const LinePropertyIds& rPropIds, sal_Int32 nPhClr ) const
+void LineProperties::pushToPropSet( PropertySet& rPropSet, ModelObjectHelper& rModelObjHelper,
+ const GraphicHelper& rGraphicHelper, const LinePropertyIds& rPropIds, sal_Int32 nPhClr ) const
{
PropertyMap aPropMap;
- pushToPropMap( aPropMap, rFilter, rModelObjHelper, rPropIds, nPhClr );
+ pushToPropMap( aPropMap, rModelObjHelper, rGraphicHelper, rPropIds, nPhClr );
rPropSet.setProperties( aPropMap );
}
diff --git a/oox/source/drawingml/linepropertiescontext.cxx b/oox/source/drawingml/linepropertiescontext.cxx
index 200af2eb6fb5..a2cf4111a524 100644
--- a/oox/source/drawingml/linepropertiescontext.cxx
+++ b/oox/source/drawingml/linepropertiescontext.cxx
@@ -93,7 +93,7 @@ Reference< XFastContextHandler > LinePropertiesContext::createFastChildContext(
case A_TOKEN( headEnd ): // CT_LineEndProperties
case A_TOKEN( tailEnd ): // CT_LineEndProperties
- { // ST_LineEndType
+ { // ST_LineEndType
bool bTailEnd = nElement == A_TOKEN( tailEnd );
LineArrowProperties& rArrowProps = bTailEnd ? mrLineProperties.maEndArrow : mrLineProperties.maStartArrow;
rArrowProps.moArrowType = aAttribs.getToken( XML_type );
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 15c390a8162e..59b3f35dc8cc 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -384,6 +384,9 @@ Reference< XShape > Shape::createAndInsert(
}
}
+ ModelObjectHelper& rModelObjectHelper = rFilterBase.getModelObjectHelper();
+ const GraphicHelper& rGraphicHelper = rFilterBase.getGraphicHelper();
+
LineProperties aLineProperties;
aLineProperties.maLineFill.moFillType = XML_noFill;
sal_Int32 nLinePhClr = -1;
@@ -397,19 +400,19 @@ Reference< XShape > Shape::createAndInsert(
{
if( const LineProperties* pLineProps = pTheme->getLineStyle( pLineRef->mnThemedIdx ) )
aLineProperties.assignUsed( *pLineProps );
- nLinePhClr = pLineRef->maPhClr.getColor( rFilterBase );
+ nLinePhClr = pLineRef->maPhClr.getColor( rGraphicHelper );
}
if( const ShapeStyleRef* pFillRef = getShapeStyleRef( XML_fillRef ) )
{
if( const FillProperties* pFillProps = pTheme->getFillStyle( pFillRef->mnThemedIdx ) )
aFillProperties.assignUsed( *pFillProps );
- nFillPhClr = pFillRef->maPhClr.getColor( rFilterBase );
+ nFillPhClr = pFillRef->maPhClr.getColor( rGraphicHelper );
}
// if( const ShapeStyleRef* pEffectRef = getShapeStyleRef( XML_fillRef ) )
// {
// if( const EffectProperties* pEffectProps = pTheme->getEffectStyle( pEffectRef->mnThemedIdx ) )
// aEffectProperties.assignUsed( *pEffectProps );
-// nEffectPhClr = pEffectRef->maPhClr.getColor( rFilterBase );
+// nEffectPhClr = pEffectRef->maPhClr.getColor( rGraphicHelper );
// }
}
@@ -438,11 +441,11 @@ Reference< XShape > Shape::createAndInsert(
// applying properties
PropertySet aPropSet( xSet );
if ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.GraphicObjectShape" ) )
- mpGraphicPropertiesPtr->pushToPropSet( aPropSet, rFilterBase );
+ mpGraphicPropertiesPtr->pushToPropSet( aPropSet, rGraphicHelper );
if ( mpTablePropertiesPtr.get() && ( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.TableShape" ) ) )
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
- aFillProperties.pushToPropSet( aPropSet, rFilterBase, rFilterBase.getModelObjectHelper(), FillProperties::DEFAULT_IDS, mnRotation, nFillPhClr );
- aLineProperties.pushToPropSet( aPropSet, rFilterBase, rFilterBase.getModelObjectHelper(), LineProperties::DEFAULT_IDS, nLinePhClr );
+ aFillProperties.pushToPropSet( aPropSet, rModelObjectHelper, rGraphicHelper, FillProperties::DEFAULT_IDS, mnRotation, nFillPhClr );
+ aLineProperties.pushToPropSet( aPropSet, rModelObjectHelper, rGraphicHelper, LineProperties::DEFAULT_IDS, nLinePhClr );
// applying autogrowheight property before setting shape size, because
// the shape size might be changed if currently autogrowheight is true
@@ -458,7 +461,7 @@ Reference< XShape > Shape::createAndInsert(
aPropSet.setProperties( aShapeProperties );
if( aServiceName == OUString::createFromAscii( "com.sun.star.drawing.CustomShape" ) )
- mpCustomShapePropertiesPtr->pushToPropSet( rFilterBase, xSet, mxShape );
+ mpCustomShapePropertiesPtr->pushToPropSet( xSet, mxShape );
// in some cases, we don't have any text body.
if( getTextBody() )
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 1684414eea2b..ee3ac495f4d6 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -80,7 +80,7 @@ void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
if( rLineProperties.maLineFill.moFillType.differsFrom( XML_noFill ) )
{
Color aColor = rLineProperties.maLineFill.getBestSolidColor();
- aBorderLine.Color = aColor.getColor( rFilterBase );
+ aBorderLine.Color = aColor.getColor( rFilterBase.getGraphicHelper() );
aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
aBorderLine.LineDistance = 0;
@@ -360,7 +360,7 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oo
aFillProperties.assignUsed( maFillProperties );
PropertySet aPropSet( xPropSet );
// TODO: phClr?
- aFillProperties.pushToPropSet( aPropSet, rFilterBase, rFilterBase.getModelObjectHelper() );
+ aFillProperties.pushToPropSet( aPropSet, rFilterBase.getModelObjectHelper(), rFilterBase.getGraphicHelper() );
}
} } }
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx
index aa08218053ac..4dbd632b2191 100644
--- a/oox/source/drawingml/textcharacterproperties.cxx
+++ b/oox/source/drawingml/textcharacterproperties.cxx
@@ -98,7 +98,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
// symbol font not supported
if( maCharColor.isUsed() )
- rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter );
+ rPropMap[ PROP_CharColor ] <<= maCharColor.getColor( rFilter.getGraphicHelper() );
if( moLang.has() && (moLang.get().getLength() > 0) )
{
@@ -144,7 +144,7 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil
if( moUnderline.has() && maUnderlineColor.isUsed() && !bUnderlineFillFollowText )
{
rPropMap[ PROP_CharUnderlineHasColor ] <<= true;
- rPropMap[ PROP_CharUnderlineColor ] <<= maUnderlineColor.getColor( rFilter );
+ rPropMap[ PROP_CharUnderlineColor ] <<= maUnderlineColor.getColor( rFilter.getGraphicHelper() );
}
}
diff --git a/oox/source/drawingml/textfont.cxx b/oox/source/drawingml/textfont.cxx
index f20c9b53511b..8d58787e544a 100644
--- a/oox/source/drawingml/textfont.cxx
+++ b/oox/source/drawingml/textfont.cxx
@@ -63,7 +63,7 @@ sal_Int16 lclGetFontFamily( sal_Int32 nOoxValue )
TextFont::TextFont() :
mnPitch( 0 ),
- mnCharset( 0 )
+ mnCharset( WINDOWS_CHARSET_ANSI )
{
}
@@ -72,7 +72,7 @@ void TextFont::setAttributes( const AttributeList& rAttribs )
maTypeface = rAttribs.getString( XML_typeface, OUString() );
maPanose = rAttribs.getString( XML_panose, OUString() );
mnPitch = rAttribs.getInteger( XML_pitchFamily, 0 );
- mnCharset = rAttribs.getInteger( XML_charset, 1 );
+ mnCharset = rAttribs.getInteger( XML_charset, WINDOWS_CHARSET_DEFAULT );
}
void TextFont::assignIfUsed( const TextFont& rTextFont )
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index 3416d4918e7b..2f5954168d37 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -322,7 +322,7 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase& rFilterBase, P
if ( maStyleName.hasValue() )
rPropMap[ PROP_CharStyleName ] <<= maStyleName;
if ( maBulletColorPtr->isUsed() )
- rPropMap[ PROP_BulletColor ] <<= maBulletColorPtr->getColor( rFilterBase );
+ rPropMap[ PROP_BulletColor ] <<= maBulletColorPtr->getColor( rFilterBase.getGraphicHelper() );
}
TextParagraphProperties::TextParagraphProperties()