summaryrefslogtreecommitdiff
path: root/reportdesign
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 /reportdesign
parentc68b934cd03e60ab6e0579108089b0e834ac47ad (diff)
fdo#46808, Convert frame::Frame to new style
Change-Id: I74427d1e0059808f04960c648b93245b06c20f7f
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/inc/propbrw.hxx9
-rw-r--r--reportdesign/source/ui/report/DesignView.cxx2
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx28
3 files changed, 17 insertions, 22 deletions
diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx
index 005d1d554a38..aae98d424d7e 100644
--- a/reportdesign/source/ui/inc/propbrw.hxx
+++ b/reportdesign/source/ui/inc/propbrw.hxx
@@ -20,10 +20,9 @@
#ifndef _REPORT_PROPBRW_HXX
#define _REPORT_PROPBRW_HXX
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/XControlContainer.hpp>
-#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
#include <com/sun/star/inspection/XObjectInspector.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <svl/brdcst.hxx>
@@ -48,9 +47,9 @@ private:
OModuleClient m_aModuleClient;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
m_xInspectorContext;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
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::inspection::XObjectInspector >
m_xBrowserController;
@@ -87,7 +86,7 @@ protected:
DECL_LINK( OnAsyncGetFocus, void* );
public:
- PropBrw(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+ PropBrw(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
,Window* pParent
,ODesignView* _pDesignView);
virtual ~PropBrw();
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 9d9ef89ea7c1..3ca115c83e62 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -460,7 +460,7 @@ void ODesignView::togglePropertyBrowser(sal_Bool _bToogleOn)
{
if ( !m_pPropWin && _bToogleOn )
{
- m_pPropWin = new PropBrw(Reference<XMultiServiceFactory>(getController().getORB()->getServiceManager(), UNO_QUERY_THROW), m_pTaskPane,this);
+ m_pPropWin = new PropBrw(getController().getORB(), m_pTaskPane,this);
m_pPropWin->Invalidate();
static_cast<OTaskWindow*>(m_pTaskPane)->setPropertyBrowser(m_pPropWin);
notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::AddWindow));
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index d7f4e22054dc..0b14f2a267cd 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -25,8 +25,13 @@
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/inspection/ObjectInspector.hpp>
#include <com/sun/star/inspection/DefaultHelpProvider.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/report/inspection/DefaultComponentInspectorModel.hpp>
#include <svx/svxids.hrc>
#include <vcl/stdtext.hxx>
#include <svx/svdview.hxx>
@@ -40,10 +45,6 @@
#include <comphelper/stl_types.hxx>
#include <comphelper/types.hxx>
#include <comphelper/sequence.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/awt/PosSize.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/report/inspection/DefaultComponentInspectorModel.hpp>
#include <comphelper/processfactory.hxx>
#include "SectionView.hxx"
#include "ReportSection.hxx"
@@ -92,7 +93,7 @@ DBG_NAME( rpt_PropBrw )
//----------------------------------------------------------------------------
-PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParent,ODesignView* _pDesignView)
+PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, Window* pParent, ODesignView* _pDesignView)
:DockingWindow(pParent,WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_3DLOOK|WB_ROLLABLE))
,m_xORB(_xORB)
,m_pDesignView(_pDesignView)
@@ -107,12 +108,9 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen
try
{
// create a frame wrapper for myself
- m_xMeAsFrame = Reference< XFrame >(m_xORB->createInstance(OUString("com.sun.star.frame.Frame")), UNO_QUERY);
- if (m_xMeAsFrame.is())
- {
- m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
- m_xMeAsFrame->setName(OUString("report property browser")); // change name!
- }
+ m_xMeAsFrame = Frame::create( m_xORB );
+ m_xMeAsFrame->initialize( VCLUnoHelper::GetInterface ( this ) );
+ m_xMeAsFrame->setName( OUString("report property browser") ); // change name!
}
catch (Exception&)
{
@@ -123,8 +121,6 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen
if (m_xMeAsFrame.is())
{
- Reference< XComponentContext > xOwnContext(
- comphelper::getComponentContext( m_xORB ) );
try
{
::cppu::ContextEntry_Init aHandlerContextInfo[] =
@@ -135,9 +131,9 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen
};
m_xInspectorContext.set(
::cppu::createComponentContext( aHandlerContextInfo, sizeof( aHandlerContextInfo ) / sizeof( aHandlerContextInfo[0] ),
- xOwnContext ) );
+ m_xORB ) );
// create a property browser controller
- bool bEnableHelpSection = lcl_shouldEnableHelpSection( xOwnContext );
+ bool bEnableHelpSection = lcl_shouldEnableHelpSection( m_xORB );
Reference< inspection::XObjectInspectorModel> xInspectorModel( bEnableHelpSection
? report::inspection::DefaultComponentInspectorModel::createWithHelpSection( m_xInspectorContext, 3, 8 )
: report::inspection::DefaultComponentInspectorModel::createDefault( m_xInspectorContext ) );
@@ -150,7 +146,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >& _xORB,Window* pParen
}
else
{
- m_xBrowserController->attachFrame(m_xMeAsFrame);
+ m_xBrowserController->attachFrame( Reference<XFrame>(m_xMeAsFrame, UNO_QUERY_THROW));
m_xBrowserComponentWindow = m_xMeAsFrame->getComponentWindow();
OSL_ENSURE(m_xBrowserComponentWindow.is(), "PropBrw::PropBrw: attached the controller, but have no component window!");
if ( bEnableHelpSection )