summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-27 22:10:51 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2011-03-27 22:10:51 +0200
commit36f99963c43c5d1ba517e74a28ffd5e6e198f5d9 (patch)
treedcc4398d5fd74defddbb55b358afb2dd065dee82 /toolkit
parent6cff2336809d144488780a621b45fd75ca1232f7 (diff)
gridfixes: #i117549# finalize css.awt.tab API
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx6
-rw-r--r--toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx4
-rw-r--r--toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx4
-rw-r--r--toolkit/inc/toolkit/controls/tabpagecontainer.hxx21
-rw-r--r--toolkit/inc/toolkit/controls/tabpagemodel.hxx49
-rw-r--r--toolkit/source/awt/vclxtabpagecontainer.cxx8
-rw-r--r--toolkit/source/awt/vclxtabpagemodel.cxx4
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx4
-rw-r--r--toolkit/source/controls/tabpagecontainer.cxx89
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx66
10 files changed, 94 insertions, 161 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx b/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx
index d4fe2a727b43..f9c7b01da551 100644
--- a/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx
+++ b/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx
@@ -63,12 +63,12 @@ public:
// ::com::sun::star::awt::grid::XTabPageContainer
virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addTabPageContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTabPageContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
static void ImplGetPropertyIds( std::list< sal_uInt16 > &aIds );
virtual void GetPropertyIds( std::list< sal_uInt16 > &aIds ) { return ImplGetPropertyIds( aIds ); }
diff --git a/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx b/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx
index 670ed25c0f2d..5d8237f2cacc 100644
--- a/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx
+++ b/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx
@@ -74,8 +74,8 @@ public:
virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getToolTip() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setToolTip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
protected:
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
};
diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
index 3090eba68749..c607a48f66cd 100644
--- a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -173,8 +173,8 @@ public:
virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getToolTip() throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setToolTip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
protected:
void startControlListening( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxChildModel );
diff --git a/toolkit/inc/toolkit/controls/tabpagecontainer.hxx b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
index c7a2e3b8ef90..c660edf2e3e9 100644
--- a/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
+++ b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
@@ -76,28 +76,29 @@ public:
// ::com::sun::star::lang::XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainerModel, UnoControlModel, szServiceName_UnoControlTabPageContainerModel )
+
+ // XTabPageContainerModel
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageModel > SAL_CALL createTabPage( ::sal_Int16 TabPageID ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageModel > SAL_CALL loadTabPage( ::sal_Int16 TabPageID, const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::uno::RuntimeException);
+
// XIndexContainer
virtual void SAL_CALL insertByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeByIndex( sal_Int32 Index )
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- // XIndexReplace
+ // XIndexReplace
virtual void SAL_CALL replaceByIndex( sal_Int32 Index, const ::com::sun::star::uno::Any& Element )
throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- // XIndexAccess
+ // XIndexAccess
virtual sal_Int32 SAL_CALL getCount() throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
- // XElementAccess
+ // XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType() throw (::com::sun::star::uno::RuntimeException);
- //{
- //return ::getCppuType((com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >*)0);
- //}
-
virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::container::XContainer
@@ -125,12 +126,12 @@ public:
// ::com::sun::star::awt::tab::XTabPageContainer
virtual ::sal_Int16 SAL_CALL getActiveTabPageID() throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setActiveTabPageID( ::sal_Int16 _activetabpageid ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Int32 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getTabPageCount( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isTabPageActive( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPage( ::sal_Int16 tabPageIndex ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL getTabPageByID( ::sal_Int16 tabPageID ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeTabPageListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addTabPageContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeTabPageContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL addControl( const ::rtl::OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& Control ) throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::lang::XServiceInfo
diff --git a/toolkit/inc/toolkit/controls/tabpagemodel.hxx b/toolkit/inc/toolkit/controls/tabpagemodel.hxx
index 8d180deb2f97..68924b831af4 100644
--- a/toolkit/inc/toolkit/controls/tabpagemodel.hxx
+++ b/toolkit/inc/toolkit/controls/tabpagemodel.hxx
@@ -40,55 +40,6 @@
#include <list>
#include <cppuhelper/implbase2.hxx>
-// ----------------------------------------------------
-// class TabPageModel
-// ----------------------------------------------------
-//typedef ::cppu::ImplHelper2< ::com::sun::star::awt::tab::XTabPageModel,
-// ::com::sun::star::lang::XInitialization
-// > TabPageAccess_BASE;
-//
-//class TabPageModel : public TabPageAccess_BASE
-//{
-//
-//private:
-// bool m_bEnabled;
-// ::rtl::OUString m_sTitle;
-// ::rtl::OUString m_sImageURL;
-// ::rtl::OUString m_sTooltip;
-// sal_Int16 m_nTabPageId;
-//
-//public:
-// TabPageModel();
-// explicit TabPageModel( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xCompContext);
-// ~TabPageModel();
-//
-// // XInitialization
-// virtual void SAL_CALL initialize (const com::sun::star::uno::Sequence<com::sun::star::uno::Any>& rArguments)
-// throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
-//
-// ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-// void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
-// void SAL_CALL release() throw() { OWeakAggObject::release(); }
-//
-// // ::com::sun::star::lang::XTypeProvider
-// //::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
-// //::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-//
-// // ::com::sun::star::awt::tab::XTabPageModel
-// virtual ::sal_Int16 SAL_CALL getTabPageID() throw (::com::sun::star::uno::RuntimeException);
-// virtual ::sal_Bool SAL_CALL getEnabled() throw (::com::sun::star::uno::RuntimeException);
-// virtual void SAL_CALL setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException);
-// virtual ::rtl::OUString SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException);
-// virtual void SAL_CALL setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException);
-// virtual ::rtl::OUString SAL_CALL getImageURL() throw (::com::sun::star::uno::RuntimeException);
-// virtual void SAL_CALL setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException);
-// virtual ::rtl::OUString SAL_CALL getTooltip() throw (::com::sun::star::uno::RuntimeException);
-// virtual void SAL_CALL setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException);
-//};
-// ----------------------------------------------------
-// class UnoControlTabPageModel
-// ----------------------------------------------------
-
class UnoControlTabPageModel : public ControlModelContainerBase
//public TabPageModel
{
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
index d4f7a5048701..64337153dac1 100644
--- a/toolkit/source/awt/vclxtabpagecontainer.cxx
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -126,7 +126,7 @@ void SAL_CALL VCLXTabPageContainer::setActiveTabPageID( ::sal_Int16 _activetabpa
if ( pTabCtrl )
pTabCtrl->SelectTabPage(_activetabpageid);
}
-::sal_Int32 SAL_CALL VCLXTabPageContainer::getTabPageCount( ) throw (RuntimeException)
+::sal_Int16 SAL_CALL VCLXTabPageContainer::getTabPageCount( ) throw (RuntimeException)
{
TabControl* pTabCtrl = (TabControl*)GetWindow();
return pTabCtrl != NULL ? pTabCtrl->GetPageCount() : 0;
@@ -157,11 +157,11 @@ Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL VCLXTabPageContainer:
}
return xTabPage;
}
-void SAL_CALL VCLXTabPageContainer::addTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+void SAL_CALL VCLXTabPageContainer::addTabPageContainerListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
{
m_aTabPageListeners.addInterface( listener );
}
-void SAL_CALL VCLXTabPageContainer::removeTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+void SAL_CALL VCLXTabPageContainer::removeTabPageContainerListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
{
m_aTabPageListeners.removeInterface( listener );
}
@@ -209,7 +209,7 @@ void SAL_CALL VCLXTabPageContainer::elementInserted( const ::com::sun::star::con
pPage->Hide();
pTabCtrl->SetTabPage(nPageID,pPage);
- pTabCtrl->SetHelpText(nPageID,xP->getTooltip());
+ pTabCtrl->SetHelpText(nPageID,xP->getToolTip());
pTabCtrl->SetPageImage(nPageID,TkResMgr::getImageFromURL(xP->getImageURL()));
pTabCtrl->SelectTabPage(nPageID);
m_aTabPages.push_back(xTabPage);
diff --git a/toolkit/source/awt/vclxtabpagemodel.cxx b/toolkit/source/awt/vclxtabpagemodel.cxx
index c7145992bd7f..936a2301dcb4 100644
--- a/toolkit/source/awt/vclxtabpagemodel.cxx
+++ b/toolkit/source/awt/vclxtabpagemodel.cxx
@@ -124,12 +124,12 @@ void SAL_CALL VCLXTabPageModel::setImageURL( const ::rtl::OUString& /*_imageurl*
{
//m_sImageURL = _imageurl;
}
-::rtl::OUString SAL_CALL VCLXTabPageModel::getTooltip() throw (::com::sun::star::uno::RuntimeException)
+::rtl::OUString SAL_CALL VCLXTabPageModel::getToolTip() throw (::com::sun::star::uno::RuntimeException)
{
//return m_sTooltip;
return ::rtl::OUString::createFromAscii("");
}
-void SAL_CALL VCLXTabPageModel::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL VCLXTabPageModel::setToolTip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
{
(void)_tooltip;
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 1cd40032b31f..3041da60af89 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -785,11 +785,11 @@ void SAL_CALL ControlModelContainerBase::setImageURL( const ::rtl::OUString& _im
{
m_sImageURL = _imageurl;
}
-::rtl::OUString SAL_CALL ControlModelContainerBase::getTooltip() throw (::com::sun::star::uno::RuntimeException)
+::rtl::OUString SAL_CALL ControlModelContainerBase::getToolTip() throw (::com::sun::star::uno::RuntimeException)
{
return m_sTooltip;
}
-void SAL_CALL ControlModelContainerBase::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL ControlModelContainerBase::setToolTip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
{
m_sTooltip = _tooltip;
}
diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx
index 808feca02e8a..387e5a50b033 100644
--- a/toolkit/source/controls/tabpagecontainer.cxx
+++ b/toolkit/source/controls/tabpagecontainer.cxx
@@ -28,19 +28,21 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_toolkit.hxx"
+#include <toolkit/controls/geometrycontrolmodel.hxx>
#include <toolkit/controls/tabpagecontainer.hxx>
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <toolkit/helper/unopropertyarrayhelper.hxx>
+#include <toolkit/controls/tabpagemodel.hxx>
#include <toolkit/helper/property.hxx>
-#include <toolkit/controls/geometrycontrolmodel.hxx>
+#include <toolkit/helper/unopropertyarrayhelper.hxx>
+
+#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
+#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
-#include <com/sun/star/awt/XControlModel.hpp>
-#include <tools/diagnose_ex.h>
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -49,6 +51,7 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::view;
+using ::com::sun::star::awt::tab::XTabPageModel;
#define WRONG_TYPE_EXCEPTION "Type must be ::com::sun::star::awt::tab::XTabPageModel!"
// ----------------------------------------------------
@@ -89,13 +92,13 @@ uno::Any UnoControlTabPageContainerModel::ImplGetDefaultValue( sal_uInt16 nPropI
::cppu::IPropertyArrayHelper& UnoControlTabPageContainerModel::getInfoHelper()
{
- static UnoPropertyArrayHelper* pHelper = NULL;
- if ( !pHelper )
- {
+ static UnoPropertyArrayHelper* pHelper = NULL;
+ if ( !pHelper )
+ {
com::sun::star::uno::Sequence<sal_Int32> aIDs = ImplGetPropertyIds();
- pHelper = new UnoPropertyArrayHelper( aIDs );
+ pHelper = new UnoPropertyArrayHelper( aIDs );
}
- return *pHelper;
+ return *pHelper;
}
Reference< ::com::sun::star::beans::XPropertySetInfo > UnoControlTabPageContainerModel::getPropertySetInfo( ) throw(RuntimeException)
{
@@ -103,17 +106,61 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > UnoControlTabPageContaine
return xInfo;
}
+namespace
+{
+ Reference< XTabPageModel > lcl_createTabPageModel( ::comphelper::ComponentContext const & i_context,
+ Sequence< Any > const & i_initArguments )
+ {
+ try
+ {
+ Reference< XTabPageModel > const xTabPageModel(
+ *( new OGeometryControlModel< UnoControlTabPageModel >( i_context.getLegacyServiceFactory() ) ),
+ UNO_QUERY_THROW
+ );
+
+ Reference< XInitialization > const xInit( xTabPageModel, UNO_QUERY_THROW );
+ xInit->initialize( i_initArguments );
+
+ return xTabPageModel;
+ }
+ catch( const RuntimeException& )
+ {
+ throw;
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ return NULL;
+ }
+}
+
+Reference< XTabPageModel > SAL_CALL UnoControlTabPageContainerModel::createTabPage( ::sal_Int16 i_tabPageID ) throw (RuntimeException)
+{
+ Sequence< Any > aInitArgs(1);
+ aInitArgs[0] <<= i_tabPageID;
+ return lcl_createTabPageModel( maContext, aInitArgs );
+}
+
+Reference< XTabPageModel > SAL_CALL UnoControlTabPageContainerModel::loadTabPage( ::sal_Int16 i_tabPageID, const ::rtl::OUString& i_resourceURL ) throw (RuntimeException)
+{
+ Sequence< Any > aInitArgs(2);
+ aInitArgs[0] <<= i_tabPageID;
+ aInitArgs[1] <<= i_resourceURL;
+ return lcl_createTabPageModel( maContext, aInitArgs );
+}
+
void SAL_CALL UnoControlTabPageContainerModel::insertByIndex( ::sal_Int32 nIndex, const com::sun::star::uno::Any& aElement) throw (IllegalArgumentException, IndexOutOfBoundsException, WrappedTargetException, uno::RuntimeException)
{
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
- uno::Reference < ::awt::tab::XTabPageModel > xTabPageModel;
+ uno::Reference < XTabPageModel > xTabPageModel;
if(aElement >>= xTabPageModel)
{
if ( sal_Int32( m_aTabPageVector.size()) ==nIndex )
m_aTabPageVector.push_back( xTabPageModel );
else if ( sal_Int32( m_aTabPageVector.size()) > nIndex )
{
- std::vector< uno::Reference< ::awt::tab::XTabPageModel > >::iterator aIter = m_aTabPageVector.begin();
+ std::vector< uno::Reference< XTabPageModel > >::iterator aIter = m_aTabPageVector.begin();
aIter += nIndex;
m_aTabPageVector.insert( aIter, xTabPageModel );
}
@@ -167,12 +214,12 @@ uno::Type SAL_CALL UnoControlTabPageContainerModel::getElementType( ) throw (un
// XContainer
void UnoControlTabPageContainerModel::addContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
{
- maContainerListeners.addInterface( l );
+ maContainerListeners.addInterface( l );
}
void UnoControlTabPageContainerModel::removeContainerListener( const Reference< XContainerListener >& l ) throw(RuntimeException)
{
- maContainerListeners.removeInterface( l );
+ maContainerListeners.removeInterface( l );
}
// ----------------------------------------------------
@@ -203,7 +250,7 @@ void UnoControlTabPageContainer::createPeer( const uno::Reference< awt::XToolkit
Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
if ( m_aTabPageListeners.getLength() )
- xTPContainer->addTabPageListener(&m_aTabPageListeners);
+ xTPContainer->addTabPageContainerListener(&m_aTabPageListeners);
}
// -------------------------------------------------------------------
@@ -221,7 +268,7 @@ void SAL_CALL UnoControlTabPageContainer::setActiveTabPageID( ::sal_Int16 _activ
Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
xTPContainer->setActiveTabPageID(_activetabpageid);
}
-::sal_Int32 SAL_CALL UnoControlTabPageContainer::getTabPageCount( ) throw (RuntimeException)
+::sal_Int16 SAL_CALL UnoControlTabPageContainer::getTabPageCount( ) throw (RuntimeException)
{
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
@@ -245,21 +292,21 @@ Reference< ::com::sun::star::awt::tab::XTabPage > SAL_CALL UnoControlTabPageCont
Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
return xTPContainer->getTabPageByID(tabPageID);
}
-void SAL_CALL UnoControlTabPageContainer::addTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+void SAL_CALL UnoControlTabPageContainer::addTabPageContainerListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
{
m_aTabPageListeners.addInterface( listener );
if( getPeer().is() && m_aTabPageListeners.getLength() == 1 )
{
uno::Reference < awt::tab::XTabPageContainer > xTabPageContainer( getPeer(), uno::UNO_QUERY );
- xTabPageContainer->addTabPageListener( &m_aTabPageListeners );
+ xTabPageContainer->addTabPageContainerListener( &m_aTabPageListeners );
}
}
-void SAL_CALL UnoControlTabPageContainer::removeTabPageListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
+void SAL_CALL UnoControlTabPageContainer::removeTabPageContainerListener( const Reference< ::com::sun::star::awt::tab::XTabPageContainerListener >& listener ) throw (RuntimeException)
{
if( getPeer().is() && m_aTabPageListeners.getLength() == 1 )
{
uno::Reference < awt::tab::XTabPageContainer > xTabPageContainer( getPeer(), uno::UNO_QUERY );
- xTabPageContainer->addTabPageListener( &m_aTabPageListeners );
+ xTabPageContainer->addTabPageContainerListener( &m_aTabPageListeners );
}
m_aTabPageListeners.removeInterface( listener );
}
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index f498fefd761b..834b7f92e013 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -75,72 +75,6 @@ using namespace ::com::sun::star::util;
::rtl::OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl );
// ----------------------------------------------------
-// class TabPageModel
-// ----------------------------------------------------
-
-//TabPageModel::TabPageModel()
-//{
-//}
-//TabPageModel::TabPageModel( uno::Reference< uno::XComponentContext > const & xCompContext)
-//{
-// (void) xCompContext;
-//}
-//
-//TabPageModel::~TabPageModel()
-//{
-//}
-//
-//////----- XInitialization -------------------------------------------------------------------
-//void SAL_CALL TabPageModel::initialize (const Sequence<Any>& rArguments)
-//{
-// sal_Int16 nPageId;
-// if ( rArguments.getLength() == 1 )
-// {
-// if ( !( rArguments[ 0 ] >>= nPageId ))
-// throw lang::IllegalArgumentException();
-// m_nTabPageId = nPageId;
-// }
-// else
-// m_nTabPageId = -1;
-//}
-//::sal_Int16 SAL_CALL TabPageModel::getTabPageID() throw (::com::sun::star::uno::RuntimeException)
-//{
-// return m_nTabPageId;
-//}
-//::sal_Bool SAL_CALL TabPageModel::getEnabled() throw (::com::sun::star::uno::RuntimeException)
-//{
-// return m_bEnabled;
-//}
-//void SAL_CALL TabPageModel::setEnabled( ::sal_Bool _enabled ) throw (::com::sun::star::uno::RuntimeException)
-//{
-// m_bEnabled = _enabled;
-//}
-//::rtl::OUString SAL_CALL TabPageModel::getTitle() throw (::com::sun::star::uno::RuntimeException)
-//{
-// return m_sTitle;
-//}
-//void SAL_CALL TabPageModel::setTitle( const ::rtl::OUString& _title ) throw (::com::sun::star::uno::RuntimeException)
-//{
-// m_sTitle = _title;
-//}
-//::rtl::OUString SAL_CALL TabPageModel::getImageURL() throw (::com::sun::star::uno::RuntimeException)
-//{
-// return m_sImageURL;
-//}
-//void SAL_CALL TabPageModel::setImageURL( const ::rtl::OUString& _imageurl ) throw (::com::sun::star::uno::RuntimeException)
-//{
-// m_sImageURL = _imageurl;
-//}
-//::rtl::OUString SAL_CALL TabPageModel::getTooltip() throw (::com::sun::star::uno::RuntimeException)
-//{
-// return m_sTooltip;
-//}
-//void SAL_CALL TabPageModel::setTooltip( const ::rtl::OUString& _tooltip ) throw (::com::sun::star::uno::RuntimeException)
-//{
-// m_sTooltip = _tooltip;
-//}
-
-// ----------------------------------------------------
// class UnoControlTabPageModel
// ----------------------------------------------------
UnoControlTabPageModel::UnoControlTabPageModel( Reference< XMultiServiceFactory > const & i_factory )