summaryrefslogtreecommitdiff
path: root/chart2/source/tools/TitleHelper.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-01-25 20:17:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-25 20:23:08 +0100
commit39f452953e12e24350e7a3740129fa4930aedfca (patch)
tree4561622298ab522d07b87f404b565ae271273656 /chart2/source/tools/TitleHelper.cxx
parentd1207a5f3a573dbe39a7874931ce373e5c88628d (diff)
use more concrete types in chart2, Diagram
Change-Id: I40cd39d0878dc56e4e86e05149c9744cb563d745 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/tools/TitleHelper.cxx')
-rw-r--r--chart2/source/tools/TitleHelper.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index 51f6ccf2a6b7..775b1241c65c 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -41,7 +41,7 @@ namespace {
uno::Reference< XTitled > lcl_getTitleParentFromDiagram(
TitleHelper::eTitleType nTitleIndex
- , const uno::Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
uno::Reference< XTitled > xResult;
@@ -61,7 +61,7 @@ uno::Reference< XTitled > lcl_getTitleParentFromDiagram(
{
case TitleHelper::SUB_TITLE:
if( xDiagram.is())
- xResult.set( xDiagram, uno::UNO_QUERY );
+ xResult = xDiagram;
break;
case TitleHelper::X_AXIS_TITLE:
if( xDiagram.is())
@@ -94,7 +94,7 @@ uno::Reference< XTitled > lcl_getTitleParentFromDiagram(
}
uno::Reference< XTitled > lcl_getTitleParent( TitleHelper::eTitleType nTitleIndex
- , const uno::Reference< XDiagram >& xDiagram )
+ , const rtl::Reference< Diagram >& xDiagram )
{
uno::Reference< XTitled > xResult;
switch( nTitleIndex )
@@ -128,10 +128,10 @@ uno::Reference< XTitled > lcl_getTitleParent( TitleHelper::eTitleType nTitleInde
return xModel;
}
- uno::Reference< XDiagram > xDiagram;
+ rtl::Reference< Diagram > xDiagram;
if( xModel.is())
- xDiagram.set( xModel->getFirstDiagram());
+ xDiagram = xModel->getFirstChartDiagram();
return lcl_getTitleParent( nTitleIndex, xDiagram );
}
@@ -144,7 +144,7 @@ uno::Reference< XTitle > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIn
if(nTitleIndex == TitleHelper::MAIN_TITLE)
return rModel.getTitleObject();
- uno::Reference< XDiagram > xDiagram = rModel.getFirstDiagram();
+ rtl::Reference< Diagram > xDiagram = rModel.getFirstChartDiagram();
uno::Reference< XTitled > xTitled( lcl_getTitleParent( nTitleIndex, xDiagram ) );
if( xTitled.is())
return xTitled->getTitleObject();
@@ -225,7 +225,7 @@ uno::Reference< XTitle > TitleHelper::createTitle(
if(xTitled.is())
{
- uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ) );
+ rtl::Reference< Diagram > xDiagram( ChartModelHelper::findDiagram( xModel ) );
xTitle.set( xContext->getServiceManager()->createInstanceWithContext(
"com.sun.star.chart2.Title",