diff options
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/chart/converterbase.cxx | 10 | ||||
-rw-r--r-- | oox/source/drawingml/chart/seriesconverter.cxx | 18 | ||||
-rw-r--r-- | oox/source/drawingml/customshapeproperties.cxx | 3 | ||||
-rw-r--r-- | oox/source/drawingml/fillproperties.cxx | 5 | ||||
-rw-r--r-- | oox/source/drawingml/fillpropertiesgroupcontext.cxx | 5 | ||||
-rw-r--r-- | oox/source/drawingml/graphicshapecontext.cxx | 6 | ||||
-rw-r--r-- | oox/source/drawingml/shape.cxx | 6 | ||||
-rw-r--r-- | oox/source/drawingml/textbody.cxx | 3 | ||||
-rw-r--r-- | oox/source/drawingml/textparagraph.cxx | 3 | ||||
-rw-r--r-- | oox/source/drawingml/theme.cxx | 35 |
10 files changed, 62 insertions, 32 deletions
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index f8ffd5500317..c9b91e308414 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -8,7 +8,7 @@ * * $RCSfile: converterbase.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.4.6.1 $ * * This file is part of OpenOffice.org. * @@ -30,12 +30,12 @@ ************************************************************************/ #include "oox/drawingml/chart/converterbase.hxx" -#include "oox/drawingml/theme.hxx" #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/frame/XModel.hpp> #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/LineStyle.hpp> -#include <comphelper/processfactory.hxx> +#include "oox/core/xmlfilterbase.hxx" +#include "oox/drawingml/theme.hxx" using ::rtl::OUString; using ::com::sun::star::uno::Reference; @@ -135,9 +135,9 @@ Reference< XInterface > ConverterRoot::createInstance( return xInt; } -Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceName ) +Reference< XInterface > ConverterRoot::createInstance( const OUString& rServiceName ) const { - return createInstance( ::comphelper::getProcessServiceFactory(), rServiceName ); + return createInstance( mxData->mrFilter.getGlobalFactory(), rServiceName ); } XmlFilterBase& ConverterRoot::getFilter() const diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 9ed373e52b74..621108a2d019 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -8,7 +8,7 @@ * * $RCSfile: seriesconverter.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.4.6.2 $ * * This file is part of OpenOffice.org. * @@ -90,7 +90,7 @@ Reference< XLabeledDataSequence > lclCreateLabeledDataSequence( Reference< XLabeledDataSequence > xLabeledSeq; if( xValueSeq.is() || xTitleSeq.is() ) { - xLabeledSeq.set( ConverterRoot::createInstance( CREATE_OUSTRING( "com.sun.star.chart2.data.LabeledDataSequence" ) ), UNO_QUERY ); + xLabeledSeq.set( rParent.createInstance( CREATE_OUSTRING( "com.sun.star.chart2.data.LabeledDataSequence" ) ), UNO_QUERY ); if( xLabeledSeq.is() ) { xLabeledSeq->setValues( xValueSeq ); @@ -526,23 +526,27 @@ Reference< XDataSeries > SeriesConverter::createDataSeries( const TypeGroupConve ObjectType eObjType = rTypeGroup.getSeriesObjectType(); rFormatter.convertFrameFormatting( aSeriesProp, mrModel.mxShapeProp, eObjType, mrModel.mnIndex ); - // set the property default value used by the Chart2 templates (true for pie/doughnut charts) - aSeriesProp.setProperty( CREATE_OUSTRING( "VaryColorsByPoint" ), rTypeInfo.meTypeCategory == TYPECATEGORY_PIE ); + // set the (unused) property default value used by the Chart2 templates (true for pie/doughnut charts) + bool bIsPie = rTypeInfo.meTypeCategory == TYPECATEGORY_PIE; + aSeriesProp.setProperty( CREATE_OUSTRING( "VaryColorsByPoint" ), bIsPie ); + // own area formatting for every data point (TODO: varying line color not supported) - if( bVaryColorsByPoint && rTypeGroup.isSeriesFrameFormat() && ObjectFormatter::isAutomaticFill( mrModel.mxShapeProp ) ) + // #i91271# always set area formatting for every point in pie/doughnut charts to override their automatic point formatting + if( bIsPie || (bVaryColorsByPoint && rTypeGroup.isSeriesFrameFormat() && ObjectFormatter::isAutomaticFill( mrModel.mxShapeProp )) ) { /* Set the series point number as color cycle size at the object formatter to get correct start-shade/end-tint. TODO: in doughnut charts, the sizes of the series may vary, need to use the maximum point count of all series. */ sal_Int32 nOldMax = rFormatter.getMaxSeriesIndex(); - rFormatter.setMaxSeriesIndex( nDataPointCount - 1 ); + if( bVaryColorsByPoint ) + rFormatter.setMaxSeriesIndex( nDataPointCount - 1 ); for( sal_Int32 nIndex = 0; nIndex < nDataPointCount; ++nIndex ) { try { PropertySet aPointProp( xDataSeries->getDataPointByIndex( nIndex ) ); - rFormatter.convertAutomaticFill( aPointProp, eObjType, nIndex ); + rFormatter.convertAutomaticFill( aPointProp, eObjType, bVaryColorsByPoint ? nIndex : mrModel.mnIndex ); } catch( Exception& ) { diff --git a/oox/source/drawingml/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx index 340b61e59d3c..b6c440e63a3a 100644 --- a/oox/source/drawingml/customshapeproperties.cxx +++ b/oox/source/drawingml/customshapeproperties.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: customshapeproperties.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.4.1 $ * * This file is part of OpenOffice.org. * @@ -28,7 +28,6 @@ * ************************************************************************/ -#include <comphelper/processfactory.hxx> #include "oox/drawingml/customshapeproperties.hxx" #include "oox/helper/helper.hxx" #include "oox/helper/propertyset.hxx" diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index a051f4ec4a24..836b44621546 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fillproperties.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.6.1 $ * * This file is part of OpenOffice.org. * @@ -115,8 +115,7 @@ const awt::DeviceInfo& lclGetDeviceInfo( const XmlFilterBase& rFilter ) { try { - Reference< lang::XMultiServiceFactory > xMSFT( rFilter.getServiceFactory(), UNO_QUERY_THROW ); - Reference< frame::XFramesSupplier > xDesktop( xMSFT->createInstance( + Reference< frame::XFramesSupplier > xDesktop( rFilter.getGlobalFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.frame.Desktop" ) ), UNO_QUERY_THROW ); Reference< frame::XFrame > xFrame( xDesktop->getActiveFrame() ); Reference< awt::XWindow > xWindow( xFrame->getContainerWindow() ); diff --git a/oox/source/drawingml/fillpropertiesgroupcontext.cxx b/oox/source/drawingml/fillpropertiesgroupcontext.cxx index c326aac26e32..623762df7e4d 100644 --- a/oox/source/drawingml/fillpropertiesgroupcontext.cxx +++ b/oox/source/drawingml/fillpropertiesgroupcontext.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fillpropertiesgroupcontext.cxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.6.1 $ * * This file is part of OpenOffice.org. * @@ -299,8 +299,7 @@ void BlipFillPropertiesContext::endFastElement( sal_Int32 ) throw (SAXException, // load the fill bitmap into an XGraphic with the GraphicProvider static const OUString sGraphicProvider = CREATE_OUSTRING( "com.sun.star.graphic.GraphicProvider" ); - Reference< lang::XMultiServiceFactory > xMSFT( rFilter.getServiceFactory(), UNO_QUERY_THROW ); - Reference< graphic::XGraphicProvider > xGraphicProvider( xMSFT->createInstance( sGraphicProvider ), UNO_QUERY_THROW ); + Reference< graphic::XGraphicProvider > xGraphicProvider( rFilter.getGlobalFactory()->createInstance( sGraphicProvider ), UNO_QUERY_THROW ); static const OUString sInputStream = CREATE_OUSTRING( "InputStream" ); beans::PropertyValues aMediaProperties(1); diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx index 18f3e12a30d8..ed41e31ea2e9 100644 --- a/oox/source/drawingml/graphicshapecontext.cxx +++ b/oox/source/drawingml/graphicshapecontext.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: graphicshapecontext.cxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.6.1 $ * * This file is part of OpenOffice.org. * @@ -43,7 +43,6 @@ #include "oox/drawingml/chart/chartspacefragment.hxx" #include "oox/drawingml/chart/chartspacemodel.hxx" #include "tokens.hxx" -#include <comphelper/processfactory.hxx> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/io/XStream.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -207,9 +206,8 @@ PresentationOle2006Context::~PresentationOle2006Context() { try { - Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference< io::XInputStream > xInputStream( rFilter.openInputStream( aGraphicURL ), UNO_QUERY_THROW ); - Reference< graphic::XGraphicProvider > xGraphicProvider( xMSF->createInstance( CREATE_OUSTRING( "com.sun.star.graphic.GraphicProvider" ) ), UNO_QUERY_THROW ); + Reference< graphic::XGraphicProvider > xGraphicProvider( rFilter.getGlobalFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.graphic.GraphicProvider" ) ), UNO_QUERY_THROW ); Sequence< PropertyValue > aArgs( 1 ); const OUString sInputStream = CREATE_OUSTRING( "InputStream" ); aArgs[ 0 ].Name = sInputStream; diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 568be03b6dae..6d2dcf0f677b 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: shape.cxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.6.1 $ * * This file is part of OpenOffice.org. * @@ -360,10 +360,10 @@ Reference< XShape > Shape::createAndInsert( rxShapes->add( mxShape ); LineProperties aLineProperties; - aLineProperties.maLineFill.moFillType = XML_none; + aLineProperties.maLineFill.moFillType = XML_noFill; sal_Int32 nLinePhClr = -1; FillProperties aFillProperties; - aFillProperties.moFillType = XML_none; + aFillProperties.moFillType = XML_noFill; sal_Int32 nFillPhClr = -1; if( rxTheme.get() ) diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx index 2e3d19a09542..61a478ff9644 100644 --- a/oox/source/drawingml/textbody.cxx +++ b/oox/source/drawingml/textbody.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: textbody.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.6.1 $ * * This file is part of OpenOffice.org. * @@ -71,7 +71,6 @@ void TextBody::insertAt( while( aIter != rListStyle.end() ) { (*aIter)->getTextParagraphPropertyMap().dump_debug("TextParagraph paragraph props"); - (*aIter)->getTextCharacterProperties()->getTextCharacterPropertyMap().dump_debug("TextParagraph paragraph props"); aIter++; } } diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx index 33f4c0302b80..383d02d987f3 100644 --- a/oox/source/drawingml/textparagraph.cxx +++ b/oox/source/drawingml/textparagraph.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: textparagraph.cxx,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.6.1 $ * * This file is part of OpenOffice.org. * @@ -35,7 +35,6 @@ #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/text/ControlCharacter.hpp> -#include <comphelper/processfactory.hxx> using ::rtl::OUString; using namespace ::com::sun::star::text; diff --git a/oox/source/drawingml/theme.cxx b/oox/source/drawingml/theme.cxx index 1a8b0049bd71..e1a7f634fa21 100644 --- a/oox/source/drawingml/theme.cxx +++ b/oox/source/drawingml/theme.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: theme.cxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.6.1 $ * * This file is part of OpenOffice.org. * @@ -45,6 +45,39 @@ Theme::~Theme() { } +namespace { + +template< typename Type > +const Type* lclGetStyleElement( const RefVector< Type >& rVector, sal_Int32 nIndex ) +{ + return (rVector.empty() || (nIndex < 1)) ? 0 : + rVector.get( ::std::min( static_cast< sal_Int32 >( nIndex - 1 ), static_cast< sal_Int32 >( rVector.size() - 1 ) ) ).get(); +} + +} // namespace + +const FillProperties* Theme::getFillStyle( sal_Int32 nIndex ) const +{ + return (nIndex >= 1000) ? + lclGetStyleElement( maBgFillStyleList, nIndex - 1000 ) : + lclGetStyleElement( maFillStyleList, nIndex ); +} + +const LineProperties* Theme::getLineStyle( sal_Int32 nIndex ) const +{ + return lclGetStyleElement( maLineStyleList, nIndex ); +} + +const PropertyMap* Theme::getEffectStyle( sal_Int32 nIndex ) const +{ + return lclGetStyleElement( maEffectStyleList, nIndex ); +} + +const TextCharacterProperties* Theme::getFontStyle( sal_Int32 nSchemeType ) const +{ + return maFontScheme.get( nSchemeType ).get(); +} + const TextFont* Theme::resolveFont( const OUString& rName ) const { /* Resolves the following names: |