diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-05-23 10:11:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-05-23 10:39:21 +0200 |
commit | f30399c540f01f16f097b86ff518251324d558d7 (patch) | |
tree | df07a63621fc81cb3824d3f8b6a00b50dd596387 /oox | |
parent | bf4fb4d4146ca51bd706ef8094adef628f3a48ec (diff) |
Revert "fdo#46808, Convert chart2::Title service to new style"
This reverts commit d256dbede60533369d1aac64cca34721183f6a8a:
For one, the new css.chart2.XTitle2 looked unfinished, in that it transfered the
direct properties of the old-style css.chart2.Title service into attributes, but
left out all the properties inherited by the old-style service from
css.style.ParagraphProperties, css.drawing.FillProperties,
css.drawing.LineProperties (and that missing FIXME css.layout.LayoutElement,
whatever that is supposed to be). This needs more thought, to either make
available all propertiers as attributes, or none.
For another, this broke JunitTest_chart2_unoapi (sch.ChXChartDocument,
sch.ChartTitle), for hard-to-debug reasons.
Conflicts:
chart2/source/model/main/Title.cxx
chart2/source/model/main/Title.hxx
offapi/com/sun/star/chart2/XTitle2.idl
sc/source/filter/inc/xlchart.hxx
Change-Id: I4747208a13984904d0e409ea49a73b0f667c86c7
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/converterbase.cxx | 9 | ||||
-rw-r--r-- | oox/source/drawingml/chart/titleconverter.cxx | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index fde8d67d9009..cba883f84d00 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -27,7 +27,6 @@ #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> #include <com/sun/star/chart2/RelativeSize.hpp> -#include <com/sun/star/chart2/XTitle2.hpp> #include <com/sun/star/drawing/FillStyle.hpp> #include <com/sun/star/drawing/LineStyle.hpp> #include <com/sun/star/frame/XModel.hpp> @@ -73,7 +72,7 @@ struct TitleLayoutInfo { typedef Reference< XShape > (*GetShapeFunc)( const Reference< cssc::XChartDocument >& ); - Reference< XTitle2 > mxTitle; /// The API title object. + Reference< XTitle > mxTitle; /// The API title object. ModelRef< LayoutModel > mxLayout; /// The layout model, if existing. GetShapeFunc mpGetShape; /// Helper function to receive the title shape. @@ -91,7 +90,9 @@ void TitleLayoutInfo::convertTitlePos( ConverterRoot& rRoot, const Reference< cs // try to get the title shape Reference< XShape > xTitleShape = mpGetShape( rxChart1Doc ); // get title rotation angle, needed for correction of position of top-left edge - double fAngle = mxTitle->getTextRotation(); + double fAngle = 0.0; + PropertySet aTitleProp( mxTitle ); + aTitleProp.getProperty( fAngle, PROP_TextRotation ); // convert the position LayoutModel& rLayout = mxLayout.getOrCreate(); LayoutConverter aLayoutConv( rRoot, rLayout ); @@ -271,7 +272,7 @@ ObjectFormatter& ConverterRoot::getFormatter() const return mxData->maFormatter; } -void ConverterRoot::registerTitleLayout( const Reference< XTitle2 >& rxTitle, +void ConverterRoot::registerTitleLayout( const Reference< XTitle >& rxTitle, const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType, sal_Int32 nMainIdx, sal_Int32 nSubIdx ) { OSL_ENSURE( rxTitle.is(), "ConverterRoot::registerTitleLayout - missing title object" ); diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index c34ad9a663f3..32fb37f39f18 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -22,9 +22,9 @@ #include <com/sun/star/chart/ChartLegendExpansion.hpp> #include <com/sun/star/chart2/FormattedString.hpp> #include <com/sun/star/chart2/LegendPosition.hpp> -#include <com/sun/star/chart2/Title.hpp> #include <com/sun/star/chart2/XDiagram.hpp> #include <com/sun/star/chart2/XLegend.hpp> +#include <com/sun/star/chart2/XTitle.hpp> #include <com/sun/star/chart2/XTitled.hpp> #include "oox/drawingml/textbody.hxx" #include "oox/drawingml/textparagraph.hxx" @@ -152,7 +152,7 @@ void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, con if( aStringSeq.hasElements() ) try { // create the title object and set the string data - Reference< XTitle2 > xTitle = Title::create( getComponentContext() ); + Reference< XTitle > xTitle( createInstance( "com.sun.star.chart2.Title" ), UNO_QUERY_THROW ); xTitle->setText( aStringSeq ); rxTitled->setTitleObject( xTitle ); |