diff options
Diffstat (limited to 'chart2/source/controller/uitest/uiobject.cxx')
-rw-r--r-- | chart2/source/controller/uitest/uiobject.cxx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/chart2/source/controller/uitest/uiobject.cxx b/chart2/source/controller/uitest/uiobject.cxx index ef4f4d7112c8..c75f15c3885c 100644 --- a/chart2/source/controller/uitest/uiobject.cxx +++ b/chart2/source/controller/uitest/uiobject.cxx @@ -11,22 +11,21 @@ #include <uiobject.hxx> #include <ChartWindow.hxx> +#include <ChartView.hxx> #include <ChartController.hxx> #include <ChartModel.hxx> #include <ObjectHierarchy.hxx> #include <chartview/ExplicitValueProvider.hxx> -#include <com/sun/star/chart2/XChartDocument.hpp> - -#include <comphelper/servicehelper.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <algorithm> #include <iterator> ChartUIObject::ChartUIObject(const VclPtr<chart::ChartWindow>& xChartWindow, - const OUString& rCID): - maCID(rCID), + OUString aCID): + maCID(std::move(aCID)), mxChartWindow(xChartWindow) { } @@ -96,6 +95,14 @@ OUString ChartUIObject::get_type() const return "ChartUIObject for type: "; } +bool ChartUIObject::equals(const UIObject& rOther) const +{ + const ChartUIObject* pOther = dynamic_cast<const ChartUIObject*>(&rOther); + if (!pOther) + return false; + return mxChartWindow.get() == pOther->mxChartWindow.get(); +} + ChartWindowUIObject::ChartWindowUIObject(const VclPtr<chart::ChartWindow>& xChartWindow): WindowUIObject(xChartWindow), mxChartWindow(xChartWindow) @@ -173,10 +180,9 @@ std::set<OUString> ChartWindowUIObject::get_children() const if (!pController) return aChildren; - rtl::Reference<::chart::ChartModel> xChartDoc( pController->getChartModel() ); - - css::uno::Reference<css::uno::XInterface> xChartView = pController->getChartView(); - chart::ExplicitValueProvider* pValueProvider = comphelper::getFromUnoTunnel<chart::ExplicitValueProvider>( xChartView ); + rtl::Reference<::chart::ChartModel> xChartDoc = pController->getChartModel(); + rtl::Reference<::chart::ChartView> xChartView = pController->getChartView(); + chart::ExplicitValueProvider* pValueProvider = xChartView.get(); chart::ObjectHierarchy aHierarchy(xChartDoc, pValueProvider); chart::ObjectIdentifier aIdentifier = chart::ObjectHierarchy::getRootNodeOID(); aChildren.insert(aIdentifier.getObjectCID()); |