diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-06 06:16:56 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-07 21:22:28 +0200 |
commit | a28bcb6e57aef0a05e04195c9bdc52a4bc39bba1 (patch) | |
tree | e015cd138ac869c678f4b8c72b5fac6363e93f69 /chart2 | |
parent | 42a47cd66eb6d277e5560efa341efa423f9e8fff (diff) |
provide the OpenGL window
This approach looks much better. We get size and position correct
without much work and can easily plug the window into the sc window
hierarchy.
We still have a crash on exit as the ScGridWindow goes out of scope and
the SystemChildWindow is still alive. We need to fix it and bind the
lifecycle of the SystemChildWindow to ScGridWindow.
Another open item is the OpenGL context work. Right now it looks like
the best way forward is to create a subclass of SystemChildWindow that
contains the OpenGLContext.
Change-Id: Ie0a74531e1b818cea92912345464c8fa219bbae2
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/inc/ChartModel.hxx | 14 | ||||
-rw-r--r-- | chart2/source/model/main/ChartModel.cxx | 10 |
2 files changed, 20 insertions, 4 deletions
diff --git a/chart2/inc/ChartModel.hxx b/chart2/inc/ChartModel.hxx index 38735d983f6f..fc0741d06a42 100644 --- a/chart2/inc/ChartModel.hxx +++ b/chart2/inc/ChartModel.hxx @@ -50,15 +50,16 @@ #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XTitled.hpp> +#include <com/sun/star/chart2/X3DChartWindowProvider.hpp> #include <com/sun/star/frame/XLoadable.hpp> #include <com/sun/star/embed/XEmbeddedObject.hpp> #include <com/sun/star/embed/XStorage.hpp> #include <com/sun/star/datatransfer/XTransferable.hpp> -#ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_22 -#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_22 -#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 22 +#ifndef INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_23 +#define INCLUDED_COMPHELPER_IMPLBASE_VAR_HXX_23 +#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 23 #include "comphelper/implbase_var.hxx" #endif #include <osl/mutex.hxx> @@ -77,7 +78,7 @@ namespace impl { // Note: needed for queryInterface (if it calls the base-class implementation) -typedef ::comphelper::WeakImplHelper22< +typedef ::comphelper::WeakImplHelper23< // ::com::sun::star::frame::XModel //comprehends XComponent (required interface), base of XChartDocument ::com::sun::star::util::XCloseable //comprehends XCloseBroadcaster ,::com::sun::star::frame::XStorable2 //(extension of XStorable) @@ -100,6 +101,7 @@ typedef ::comphelper::WeakImplHelper22< ,::com::sun::star::document::XDocumentPropertiesSupplier ,::com::sun::star::chart2::data::XDataSource ,::com::sun::star::document::XUndoManagerSupplier + ,::com::sun::star::chart2::X3DChartWindowProvider ,::com::sun::star::qa::XDumper > ChartModel_Base; @@ -573,6 +575,10 @@ public: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // X3DChartWindowProvider + virtual void SAL_CALL setWindow( const sal_uInt64 nWindowPtr ) + throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + // XDumper virtual OUString SAL_CALL dump() throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index e386d7f41a79..a16f435ad069 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -33,6 +33,8 @@ #include "UndoManager.hxx" #include "ChartView.hxx" +#include <vcl/window.hxx> + #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <comphelper/InlineContainer.hxx> @@ -1407,6 +1409,14 @@ uno::Reference< uno::XInterface > ChartModel::getChartView() return xChartView; } +void ChartModel::setWindow( const sal_uInt64 nWindowPtr ) + throw (uno::RuntimeException, std::exception) +{ + void* pPtr = (void*)nWindowPtr; + Window* pWindow = reinterpret_cast<Window*>(pPtr); + assert(pWindow); +} + } // namespace chart /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |