diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-19 16:00:39 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-19 16:03:28 -0400 |
commit | 2fc4f5cd750cc3899ffc6b2f831edcb01e7773b4 (patch) | |
tree | 050d146a6cf1639453a98581d2801e132d2d4ada /sfx2 | |
parent | 0d361388060741fe8e2f1ba059fba95707bdc233 (diff) |
Register OpenGL windows to ScGridWindow upon file load.
Change-Id: I6fdce232ef41079f20a983dc72da032196078858
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/frmload.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 5 |
3 files changed, 22 insertions, 2 deletions
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 535121251e74..afbf092142f6 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -50,6 +50,7 @@ #include <com/sun/star/frame/XController2.hpp> #include <com/sun/star/frame/XModel2.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XInitialization.hpp> #include <comphelper/interaction.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -71,6 +72,7 @@ #include <ucbhelper/simpleinteractionrequest.hxx> #include <osl/mutex.hxx> +using namespace com::sun::star; using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::container::XContainerQuery; using ::com::sun::star::container::XEnumeration; @@ -720,7 +722,16 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::load( const Sequence< PropertyValue >& rA const OUString sViewName( xDoc->GetFactory().GetViewFactory( nViewNo ).GetAPIViewName() ); // plug the document into the frame - impl_createDocumentView( xModel, _rTargetFrame, aViewCreationArgs, sViewName ); + Reference<XController2> xController = + impl_createDocumentView( xModel, _rTargetFrame, aViewCreationArgs, sViewName ); + + Reference<lang::XInitialization> xInit(xController, UNO_QUERY); + if (xInit.is()) + { + uno::Sequence<uno::Any> aArgs; // empty for now. + xInit->initialize(aArgs); + } + bLoadSuccess = true; } catch ( Exception& ) diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index bd7d5da26030..cc4930afc594 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1524,4 +1524,10 @@ void SAL_CALL SfxBaseController::removeTitleChangeListener(const Reference< fram xBroadcaster->removeTitleChangeListener (xListener); } +void SfxBaseController::initialize( const ::css::uno::Sequence< ::css::uno::Any >& /*aArguments*/ ) +{ + if (m_pData->m_pViewShell) + m_pData->m_pViewShell->Initialize(); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 7bb2d4cedd63..c8b8eb7e26fe 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1269,7 +1269,10 @@ SfxViewShell::~SfxViewShell() DELETEZ( pIPClientList ); } - +void SfxViewShell::Initialize() +{ + // overloaded by the application. +} bool SfxViewShell::PrepareClose ( |