diff options
author | Noel Grandin <noel@peralex.com> | 2013-03-22 09:24:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-04-08 13:53:04 +0200 |
commit | b248624126c271c88381d3dad6e04fc954f65779 (patch) | |
tree | 989f9131b865ea470ced1317834b91de06efd9e4 /extensions | |
parent | c68b934cd03e60ab6e0579108089b0e834ac47ad (diff) |
fdo#46808, Convert frame::Frame to new style
Change-Id: I74427d1e0059808f04960c648b93245b06c20f7f
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/nsplugin/source/so_instance.cxx | 14 | ||||
-rw-r--r-- | extensions/source/nsplugin/source/so_instance.hxx | 5 |
2 files changed, 7 insertions, 12 deletions
diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 23cd49ec4f63..0045da3f5bad 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/DispatchHelper.hpp> #include <com/sun/star/frame/XDispatchProviderInterception.hpp> +#include <com/sun/star/frame/Frame.hpp> #include <com/sun/star/lang/SystemDependent.hpp> #include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/awt/XVclWindowPeer.hpp> @@ -172,14 +173,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) m_nX, m_nY, m_nWidth, m_nHeight, m_nFlag); // create frame - m_xFrame = Reference< frame::XFrame >( - mxRemoteMSF->createInstance( OUString("com.sun.star.frame.Frame")), - uno::UNO_QUERY ); - if (!m_xFrame.is()) - { - debug_fprintf(NSP_LOG_APPEND, "can not create frame\n"); - return sal_False; - } + m_xFrame = frame::Frame::create( xContext ); // initialize frame m_xFrame->initialize( m_xUnoWin ); @@ -208,7 +202,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) } // append m_xFrame to m_xFrames - m_xFrames->append( m_xFrame ); + m_xFrames->append( Reference<frame::XFrame>(m_xFrame, uno::UNO_QUERY_THROW) ); // create XComponentLoader Reference< frame::XComponentLoader > xLoader( m_xFrame, uno::UNO_QUERY ); @@ -425,7 +419,7 @@ sal_Bool SoPluginInstance::Destroy(void) m_xUnoWin = Reference< awt::XWindow >(); m_xComponent = Reference< XComponent >(); - m_xFrame = Reference< frame::XFrame >(); + m_xFrame = Reference< frame::XFrame2 >(); m_xFrames = Reference< frame::XFrames >(); m_xDispatcher = Reference< frame::XDispatchHelper >(); m_xDispatchProvider = Reference< frame::XDispatchProvider >(); diff --git a/extensions/source/nsplugin/source/so_instance.hxx b/extensions/source/nsplugin/source/so_instance.hxx index 1af9146a1605..92b771ed5c5c 100644 --- a/extensions/source/nsplugin/source/so_instance.hxx +++ b/extensions/source/nsplugin/source/so_instance.hxx @@ -37,6 +37,7 @@ #include <com/sun/star/uno/XNamingService.hpp> #include <com/sun/star/connection/ConnectionSetupException.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> +#include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/util/URL.hpp> #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/io/XSeekable.hpp> @@ -47,7 +48,7 @@ #include <com/sun/star/awt/WindowDescriptor.hpp> #include <rtl/ustring.hxx> #include <com/sun/star/awt/XWindow.hpp> -#include <com/sun/star/frame/XFrame.hpp> +#include <com/sun/star/frame/XFrame2.hpp> #include <com/sun/star/frame/XDispatchHelper.hpp> #include "ns_debug.hxx" @@ -77,7 +78,7 @@ private: // StarOffice component window ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xComponent; // StarOffice frame for this Plugin - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xFrame; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 > m_xFrame; // Frames of StarOffice ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrames > m_xFrames; // Dispatcher of frame |