summaryrefslogtreecommitdiff
path: root/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx')
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
index 1ce277c321ba..0598b4fd377f 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty.cxx
@@ -19,9 +19,10 @@
#include "WrappedNumberFormatProperty.hxx"
#include "Chart2ModelContact.hxx"
-#include <com/sun/star/chart2/XAxis.hpp>
+#include <Axis.hxx>
#include <com/sun/star/chart2/XDataSeries.hpp>
#include <unonames.hxx>
+#include <utility>
#include <osl/diagnose.h>
using namespace ::com::sun::star;
@@ -31,9 +32,9 @@ using ::com::sun::star::uno::Any;
namespace chart::wrapper
{
-WrappedNumberFormatProperty::WrappedNumberFormatProperty(const std::shared_ptr<Chart2ModelContact>& spChart2ModelContact)
+WrappedNumberFormatProperty::WrappedNumberFormatProperty(std::shared_ptr<Chart2ModelContact> spChart2ModelContact)
: WrappedDirectStateProperty( CHART_UNONAME_NUMFMT, CHART_UNONAME_NUMFMT )
- , m_spChart2ModelContact(spChart2ModelContact)
+ , m_spChart2ModelContact(std::move(spChart2ModelContact))
{
}
@@ -67,7 +68,8 @@ Any WrappedNumberFormatProperty::getPropertyValue( const Reference< beans::XProp
nKey = Chart2ModelContact::getExplicitNumberFormatKeyForSeries( xSeries );
else
{
- Reference< chart2::XAxis > xAxis( xInnerPropertySet, uno::UNO_QUERY );
+ rtl::Reference< Axis > xAxis = dynamic_cast<Axis*>(xInnerPropertySet.get());
+ assert(xAxis || !xInnerPropertySet);
nKey = m_spChart2ModelContact->getExplicitNumberFormatKeyForAxis( xAxis );
}
aRet <<= nKey;