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/source/view/frmload.cxx | |
parent | 0d361388060741fe8e2f1ba059fba95707bdc233 (diff) |
Register OpenGL windows to ScGridWindow upon file load.
Change-Id: I6fdce232ef41079f20a983dc72da032196078858
Diffstat (limited to 'sfx2/source/view/frmload.cxx')
-rw-r--r-- | sfx2/source/view/frmload.cxx | 13 |
1 files changed, 12 insertions, 1 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& ) |