summaryrefslogtreecommitdiff
path: root/chart2/source/controller/dialogs
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2025-04-22 13:56:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2025-04-22 15:45:50 +0200
commit796f8ff3327c82233e495eb4fcad4314d706a3b0 (patch)
treea31cd3e6732235bb3d273511d374e85aa48d2464 /chart2/source/controller/dialogs
parent3418a3648fe05169e96532039d01f20e959bacb6 (diff)
Revert "use more concrete UNO in chart2"
This reverts commit 1886ecf7ee10cc51ca90fe1365e4a8ef2a1b6f27. because reportdesign will pass in a OReportDefinition* and not a SvNumberFormatsSupplierObj* Change-Id: Ic0068d18a10ce24ed74bb86cfef4cb9f34e9eeb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184437 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/controller/dialogs')
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx4
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx8
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx2
3 files changed, 8 insertions, 6 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index a06c82f69061..4238396c4d19 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -713,7 +713,7 @@ OUString DataBrowser::GetCellText( sal_Int32 nRow, sal_uInt16 nColumnId ) const
// getDateTimeInputNumberFormat() instead of doing the
// guess work.
sal_Int32 nNumberFormat = DiagramHelper::getDateTimeInputNumberFormat(
- m_xChartDoc->getNumberFormatsSupplier(), fDouble );
+ m_xChartDoc, fDouble );
Color nLabelColor;
bool bColorChanged = false;
aResult = m_spNumberFormatterWrapper->getFormattedString(
@@ -831,7 +831,7 @@ void DataBrowser::SetDataFromModel(
m_apDataBrowserModel.reset( new DataBrowserModel( m_xChartDoc ));
m_spNumberFormatterWrapper =
- std::make_shared<NumberFormatterWrapper>(m_xChartDoc->getNumberFormatsSupplier());
+ std::make_shared<NumberFormatterWrapper>(m_xChartDoc);
Formatter& rFormatter = m_aNumberEditField->get_formatter();
rFormatter.SetFormatter( m_spNumberFormatterWrapper->getSvNumberFormatter() );
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 6ddddfffad23..ef9893ca7ddb 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -99,7 +99,7 @@ void lcl_addText( OUString& rOut, std::u16string_view rSeparator, std::u16string
OUString lcl_getDataPointValueText( const rtl::Reference< DataSeries >& xSeries, sal_Int32 nPointIndex,
const rtl::Reference< BaseCoordinateSystem >& xCooSys,
- const rtl::Reference<::chart::ChartModel>& xChartModel )
+ const Reference< frame::XModel >& xChartModel )
{
OUString aRet;
@@ -112,7 +112,8 @@ OUString lcl_getDataPointValueText( const rtl::Reference< DataSeries >& xSeries,
OUString aX, aY, aY_Min, aY_Max, aY_First, aY_Last, a_Size;
double fValue = 0;
- NumberFormatterWrapper aNumberFormatterWrapper( xChartModel->getNumberFormatsSupplier() );
+ uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( xChartModel, uno::UNO_QUERY );
+ NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
Color nLabelColor;//dummy
bool bColorChanged;//dummy
@@ -191,7 +192,8 @@ OUString lcl_getDataPointValueText( const rtl::Reference< DataSeries >& xSeries,
if( aX.isEmpty() )
{
- aRet = ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, *xChartModel, nPointIndex );
+ ChartModel& rModel = dynamic_cast<ChartModel&>(*xChartModel);
+ aRet = ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, rModel, nPointIndex );
}
else
{
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index f678b051bc02..fabe013ff27d 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -329,7 +329,7 @@ SchAttribTabDlg::SchAttribTabDlg(weld::Window* pParent,
const SfxItemSet* pAttr,
const ObjectPropertiesDialogParameter* pDialogParameter,
const ViewElementListProvider* pViewElementListProvider,
- const rtl::Reference< SvNumberFormatsSupplierObj >& xNumberFormatsSupplier)
+ const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier)
: SfxTabDialogController(pParent, u"modules/schart/ui/attributedialog.ui"_ustr, u"AttributeDialog"_ustr, pAttr)
, m_pParameter( pDialogParameter )
, m_pViewElementListProvider( pViewElementListProvider )