summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-22 09:24:15 +0200
committerNoel Grandin <noel@peralex.com>2013-04-08 13:53:04 +0200
commitb248624126c271c88381d3dad6e04fc954f65779 (patch)
tree989f9131b865ea470ced1317834b91de06efd9e4 /basctl
parentc68b934cd03e60ab6e0579108089b0e834ac47ad (diff)
fdo#46808, Convert frame::Frame to new style
Change-Id: I74427d1e0059808f04960c648b93245b06c20f7f
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/dlged/propbrw.cxx16
-rw-r--r--basctl/source/inc/propbrw.hxx8
2 files changed, 8 insertions, 16 deletions
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index a5f19ac76f4c..24ec2d76aa17 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -28,6 +28,7 @@
#include <svx/svxids.hrc>
#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/inspection/XObjectInspector.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <comphelper/types.hxx>
@@ -85,7 +86,6 @@ DBG_NAME(PropBrw)
PropBrw::PropBrw (DialogWindowLayout& rLayout_):
DockingWindow(&rLayout_),
m_bInitialStateChange(true),
- m_xORB(comphelper::getProcessServiceFactory()),
m_xContextDocument(SfxViewShell::Current() ? SfxViewShell::Current()->GetCurrentDocument() : Reference<XModel>()),
rLayout(rLayout_),
pView(0)
@@ -99,12 +99,9 @@ PropBrw::PropBrw (DialogWindowLayout& rLayout_):
try
{
// create a frame wrapper for myself
- m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance( "com.sun.star.frame.Frame" ), UNO_QUERY);
- if (m_xMeAsFrame.is())
- {
- m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
- m_xMeAsFrame->setName( "form property browser" ); // change name!
- }
+ m_xMeAsFrame = frame::Frame::create( comphelper::getProcessComponentContext() );
+ m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
+ m_xMeAsFrame->setName( "form property browser" ); // change name!
}
catch (const Exception&)
{
@@ -127,8 +124,7 @@ void PropBrw::ImplReCreateController()
try
{
- Reference< XComponentContext > xOwnContext(
- comphelper::getComponentContext( m_xORB ) );
+ Reference< XComponentContext > xOwnContext = comphelper::getProcessComponentContext();
// a ComponentContext for the
::cppu::ContextEntry_Init aHandlerContextInfo[] =
@@ -160,7 +156,7 @@ void PropBrw::ImplReCreateController()
}
else
{
- xAsXController->attachFrame(m_xMeAsFrame);
+ xAsXController->attachFrame( Reference<XFrame>(m_xMeAsFrame,UNO_QUERY_THROW) );
m_xBrowserComponentWindow = m_xMeAsFrame->getComponentWindow();
DBG_ASSERT(m_xBrowserComponentWindow.is(), "PropBrw::PropBrw: attached the controller, but have no component window!");
}
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index fe00cdd5e28b..76020e6c0e57 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -21,6 +21,7 @@
#define BASCTL_PROPBRW_HXX
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
#include <comphelper/stl_types.hxx>
#include <svl/lstner.hxx>
#include <svl/brdcst.hxx>
@@ -30,9 +31,6 @@
class SfxBindings;
class SdrView;
class SfxViewShell;
-namespace com { namespace sun { namespace star { namespace lang {
- class XMultiServiceFactory;
-}}}}
namespace basctl
{
@@ -44,9 +42,7 @@ class PropBrw : public DockingWindow, public SfxListener, public SfxBroadcaster
private:
bool m_bInitialStateChange;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
- m_xORB;
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame2 >
m_xMeAsFrame;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
m_xBrowserController;