summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-09-03 12:57:23 -0500
committerMiklos Vajna <vmiklos@suse.cz>2012-09-14 07:44:40 +0000
commit1df082e4dc16a397d894e5b7f1a846bac63aa4e3 (patch)
tree8e8f89654267ceb81d4e8c3d15047a1d18372ecf /toolkit
parentf00bba4305cbe666593141a0be9295ef39c1f754 (diff)
gridfixes: #i117549# finalize css.awt.tab API
Change-Id: Ia7a555fb2551675605414189174eae8f65c70db7 Reviewed-on: https://gerrit.libreoffice.org/547 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
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.hxx18
-rw-r--r--toolkit/inc/toolkit/controls/tabpagemodel.hxx4
-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, 113 deletions
diff --git a/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx b/toolkit/inc/toolkit/awt/vclxtabpagecontainer.hxx
index b68b1f5f0780..3ef370dd1377 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 0c0cee1cb297..ebf63960502a 100644
--- a/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx
+++ b/toolkit/inc/toolkit/awt/vclxtabpagemodel.hxx
@@ -73,8 +73,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 1135138e863b..f494845633db 100644
--- a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -177,8 +177,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 0de305e2eac9..0212a0e1c337 100644
--- a/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
+++ b/toolkit/inc/toolkit/controls/tabpagecontainer.hxx
@@ -77,25 +77,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);
-
virtual sal_Bool SAL_CALL hasElements() throw (::com::sun::star::uno::RuntimeException);
// ::com::sun::star::container::XContainer
@@ -123,12 +127,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 f4439e215cbe..79451e4b6cc9 100644
--- a/toolkit/inc/toolkit/controls/tabpagemodel.hxx
+++ b/toolkit/inc/toolkit/controls/tabpagemodel.hxx
@@ -42,10 +42,6 @@
#include <list>
#include <cppuhelper/implbase2.hxx>
-// ----------------------------------------------------
-// class UnoControlTabPageModel
-// ----------------------------------------------------
-
class UnoControlTabPageModel : public ControlModelContainerBase
{
protected:
diff --git a/toolkit/source/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
index 2af2e05fe666..8329eb508240 100644
--- a/toolkit/source/awt/vclxtabpagecontainer.cxx
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -114,7 +114,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;
@@ -145,11 +145,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 );
}
@@ -196,7 +196,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 bd5f6db84fc5..7e0faac16d13 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();
}
-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 e56edd51edd7..1fd299636f29 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -824,11 +824,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 b6cb33cb031b..0175ecca79eb 100644
--- a/toolkit/source/controls/tabpagecontainer.cxx
+++ b/toolkit/source/controls/tabpagecontainer.cxx
@@ -27,18 +27,20 @@
************************************************************************/
+#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 <vcl/svapp.hxx>
-#include <com/sun/star/awt/XControlModel.hpp>
#include <tools/diagnose_ex.h>
+#include <vcl/svapp.hxx>
using ::rtl::OUString;
using namespace ::com::sun::star;
@@ -47,6 +49,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!"
// ----------------------------------------------------
@@ -87,13 +90,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)
{
@@ -101,17 +104,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)
{
SolarMutexGuard aSolarGuard;
- 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 );
}
@@ -165,12 +212,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 );
}
// ----------------------------------------------------
@@ -201,7 +248,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);
}
// -------------------------------------------------------------------
@@ -219,7 +266,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)
{
SolarMutexGuard aSolarGuard;
Reference< XTabPageContainer > xTPContainer( getPeer(), UNO_QUERY_THROW );
@@ -243,21 +290,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 55d9a6d90eab..6192c92ce5d4 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -71,72 +71,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 )