summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-01-07 15:23:54 +0200
committerNoel Grandin <noel@peralex.com>2013-01-15 09:56:00 +0200
commit435989ad0616a36d03975096919721e8506f5516 (patch)
tree3c5c37d6f41cd64ce64d44668593a9fab89f3b75
parent1e618a8df61fd585d9e546148790b3856bf9c68d (diff)
fdo#46808, use service constructor for awt::TabController
Change-Id: Id02a77bf58dac179aae6df4df72e56e41c8693d4
-rw-r--r--svx/source/form/formcontroller.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 600c8ff38ba4..2e2aa6f0950e 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -36,6 +36,7 @@
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <com/sun/star/awt/TabController.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/container/XIdentifierReplace.hpp>
@@ -107,6 +108,7 @@ namespace svxform
using ::com::sun::star::sdb::XColumn;
using ::com::sun::star::awt::XControl;
using ::com::sun::star::awt::XTabController;
+ using ::com::sun::star::awt::TabController;
using ::com::sun::star::awt::XToolkit;
using ::com::sun::star::awt::XWindowPeer;
using ::com::sun::star::form::XGrid;
@@ -587,17 +589,9 @@ FormController::FormController(const Reference< XMultiServiceFactory > & _rxORB
::comphelper::increment(m_refCount);
{
- {
- m_xAggregate = Reference< XAggregation >(
- m_aContext.createComponent( "com.sun.star.awt.TabController" ),
- UNO_QUERY
- );
- DBG_ASSERT( m_xAggregate.is(), "FormController::FormController : could not create my aggregate !" );
- m_xTabController = Reference< XTabController >( m_xAggregate, UNO_QUERY );
- }
-
- if ( m_xAggregate.is() )
- m_xAggregate->setDelegator( *this );
+ m_xTabController = TabController::create( m_aContext.getUNOContext() );
+ m_xAggregate = Reference< XAggregation >( m_xTabController, UNO_QUERY_THROW );
+ m_xAggregate->setDelegator( *this );
}
::comphelper::decrement(m_refCount);