summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl2
-rw-r--r--offapi/com/sun/star/awt/tab/UnoControlTabPage.idl2
-rw-r--r--offapi/com/sun/star/awt/tab/UnoControlTabPageContainer.idl2
-rw-r--r--offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl2
-rw-r--r--offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl2
-rw-r--r--offapi/com/sun/star/awt/tab/XTabPage.idl2
-rw-r--r--offapi/com/sun/star/awt/tab/XTabPageContainer.idl8
-rw-r--r--offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl2
-rw-r--r--offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl19
-rw-r--r--offapi/com/sun/star/awt/tab/XTabPageModel.idl4
-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
20 files changed, 125 insertions, 127 deletions
diff --git a/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl b/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl
index 6bb2cf8ccbae..62273c3bdba4 100644
--- a/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl
+++ b/offapi/com/sun/star/awt/tab/TabPageActivatedEvent.idl
@@ -38,7 +38,7 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-struct TabPageActivatedEvent: com::sun::star::lang::EventObject
+published struct TabPageActivatedEvent: com::sun::star::lang::EventObject
{
/** Contains the ID of the tab page
*/
diff --git a/offapi/com/sun/star/awt/tab/UnoControlTabPage.idl b/offapi/com/sun/star/awt/tab/UnoControlTabPage.idl
index 8d89f5fcce2e..bac55e9aad92 100644
--- a/offapi/com/sun/star/awt/tab/UnoControlTabPage.idl
+++ b/offapi/com/sun/star/awt/tab/UnoControlTabPage.idl
@@ -40,7 +40,7 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-service UnoControlTabPage
+published service UnoControlTabPage
{
service com::sun::star::awt::UnoControlContainer;
diff --git a/offapi/com/sun/star/awt/tab/UnoControlTabPageContainer.idl b/offapi/com/sun/star/awt/tab/UnoControlTabPageContainer.idl
index ab67699a34c5..9db7ecd584dd 100644
--- a/offapi/com/sun/star/awt/tab/UnoControlTabPageContainer.idl
+++ b/offapi/com/sun/star/awt/tab/UnoControlTabPageContainer.idl
@@ -39,7 +39,7 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-service UnoControlTabPageContainer
+published service UnoControlTabPageContainer
{
service com::sun::star::awt::UnoControl;
diff --git a/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl b/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl
index 93b6f6adf391..6c127f53aac4 100644
--- a/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl
+++ b/offapi/com/sun/star/awt/tab/UnoControlTabPageContainerModel.idl
@@ -39,7 +39,7 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-service UnoControlTabPageContainerModel
+published service UnoControlTabPageContainerModel
{
service com::sun::star::awt::UnoControlModel;
diff --git a/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl b/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl
index 83f5256044f5..25fa1bcd8f38 100644
--- a/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl
+++ b/offapi/com/sun/star/awt/tab/UnoControlTabPageModel.idl
@@ -37,7 +37,7 @@ module com { module sun { module star { module awt { module tab {
/** specifies the standard model of a XTabPageModel.
@since OOo 3.4
*/
-service UnoControlTabPageModel : XTabPageModel
+published service UnoControlTabPageModel : XTabPageModel
{
/** Creates a new XTabPageModel with a given ID.
*/
diff --git a/offapi/com/sun/star/awt/tab/XTabPage.idl b/offapi/com/sun/star/awt/tab/XTabPage.idl
index fa40989d2495..6cfb7edef9e2 100644
--- a/offapi/com/sun/star/awt/tab/XTabPage.idl
+++ b/offapi/com/sun/star/awt/tab/XTabPage.idl
@@ -39,7 +39,7 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-interface XTabPage
+published interface XTabPage
{
};
diff --git a/offapi/com/sun/star/awt/tab/XTabPageContainer.idl b/offapi/com/sun/star/awt/tab/XTabPageContainer.idl
index f4bc4591dbe3..6a580ef520a2 100644
--- a/offapi/com/sun/star/awt/tab/XTabPageContainer.idl
+++ b/offapi/com/sun/star/awt/tab/XTabPageContainer.idl
@@ -40,13 +40,13 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-interface XTabPageContainer
+published interface XTabPageContainer
{
/** Returns the number of tab pages.
@returns
the number of tab pages.
*/
- long getTabPageCount();
+ short getTabPageCount();
/** Checks whether a tab page is activated.
@@ -81,14 +81,14 @@ interface XTabPageContainer
@param listener
the listener to add.
*/
- [oneway] void addTabPageListener( [in] XTabPageContainerListener listener);
+ [oneway] void addTabPageContainerListener( [in] XTabPageContainerListener listener);
/** Removes a listener previously added with <method>addTabPageListener()</method>.
@param listener
the listener to remove.
*/
- [oneway] void removeTabPageListener( [in] XTabPageContainerListener listener);
+ [oneway] void removeTabPageContainerListener( [in] XTabPageContainerListener listener);
/** Specifies the ID of the current active tab page.
*/
diff --git a/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl b/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl
index 0ec24845e4ed..2c2eef53d2b3 100644
--- a/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl
+++ b/offapi/com/sun/star/awt/tab/XTabPageContainerListener.idl
@@ -40,7 +40,7 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-interface XTabPageContainerListener: com::sun::star::lang::XEventListener
+published interface XTabPageContainerListener: com::sun::star::lang::XEventListener
{
/** Invoked after a tab page was activated.
*/
diff --git a/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl b/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl
index 124760f00179..357aff08277a 100644
--- a/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl
+++ b/offapi/com/sun/star/awt/tab/XTabPageContainerModel.idl
@@ -34,15 +34,32 @@
module com { module sun { module star { module awt { module tab {
+published interface XTabPageModel;
+
/** specifies an interface for a UnoControlTabPageContainerModel.
@since OOo 3.4
*/
-interface XTabPageContainerModel
+published interface XTabPageContainerModel
{
interface com::sun::star::container::XIndexContainer;
interface com::sun::star::container::XContainer;
+
+ /** creates a TabPageModel which can be inserted into the container.
+ @param TabPageID
+ the id of the tab page
+ */
+ XTabPageModel createTabPage( [in] short TabPageID );
+
+ /** creates a TabPageModel which can be inserted into the container, by loading it from a user interface
+ resource file.
+ @param TabPageID
+ the id of the tab page
+ @param ResourceURL
+ the URL of the user interface resource to load
+ */
+ XTabPageModel loadTabPage( [in] short TabPageID, [in] string ResourceURL );
};
diff --git a/offapi/com/sun/star/awt/tab/XTabPageModel.idl b/offapi/com/sun/star/awt/tab/XTabPageModel.idl
index 92eb263b0958..7f04aa363dc2 100644
--- a/offapi/com/sun/star/awt/tab/XTabPageModel.idl
+++ b/offapi/com/sun/star/awt/tab/XTabPageModel.idl
@@ -42,7 +42,7 @@ module com { module sun { module star { module awt { module tab {
@since OOo 3.4
*/
-interface XTabPageModel
+published interface XTabPageModel
{
//interface com::sun::star::lang::XMultiServiceFactory;
@@ -71,7 +71,7 @@ interface XTabPageModel
/** specifies a tooltip text that should be displayed in the tab bar.
*/
- [attribute] string Tooltip;
+ [attribute] string ToolTip;
};
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 )