summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/converterbase.cxx9
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx4
2 files changed, 7 insertions, 6 deletions
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index 67f0a68a05d6..65d813d307c2 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/chart/XSecondAxisTitleSupplier.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>
@@ -72,7 +71,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.
@@ -90,7 +89,9 @@ void TitleLayoutInfo::convertTitlePos( ConverterRoot& rRoot, const Reference< cs
// try to get the title shape
Reference< XShape > xTitleShape( mpGetShape( rxChart1Doc ), UNO_SET_THROW );
// 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 );
@@ -270,7 +271,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 );