From ee395cc711f6edcdc1d5a81aaa7c57cc9ef7255a Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Wed, 7 Oct 2009 14:13:55 +0000 Subject: #i105452# Added alternative service names for the throbber --- toolkit/inc/toolkit/helper/servicenames.hxx | 6 ++++-- toolkit/source/controls/tksimpleanimation.cxx | 5 +++-- toolkit/source/controls/tkthrobber.cxx | 10 ++++++---- toolkit/source/helper/registerservices.cxx | 16 ++++++++-------- toolkit/source/helper/servicenames.cxx | 8 ++++---- 5 files changed, 25 insertions(+), 20 deletions(-) (limited to 'toolkit') diff --git a/toolkit/inc/toolkit/helper/servicenames.hxx b/toolkit/inc/toolkit/helper/servicenames.hxx index 31513f0f2358..a6573fff6966 100644 --- a/toolkit/inc/toolkit/helper/servicenames.hxx +++ b/toolkit/inc/toolkit/helper/servicenames.hxx @@ -95,8 +95,10 @@ extern const sal_Char __FAR_DATA szServiceName_TreeControl[]; extern const sal_Char __FAR_DATA szServiceName_TreeControlModel[]; extern const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName_UnoSimpleAnimationControlModel[]; -extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName_UnoThrobberControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[], szServiceName2_UnoSimpleAnimationControl[]; +extern const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[], szServiceName2_UnoSimpleAnimationControlModel[]; +extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[], szServiceName2_UnoThrobberControl[]; +extern const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[], szServiceName2_UnoThrobberControlModel[]; extern const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[], szServiceName_UnoControlFixedHyperlinkModel[]; // ExtUnoWrapper: diff --git a/toolkit/source/controls/tksimpleanimation.cxx b/toolkit/source/controls/tksimpleanimation.cxx index 8d83b3a953d9..15d20a557396 100644 --- a/toolkit/source/controls/tksimpleanimation.cxx +++ b/toolkit/source/controls/tksimpleanimation.cxx @@ -112,8 +112,9 @@ namespace toolkit throw( uno::RuntimeException ) { uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() ); - aServices.realloc( aServices.getLength() + 1 ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel ); + aServices.realloc( aServices.getLength() + 2 ); + aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoSimpleAnimationControlModel ); + aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel ); return aServices; } diff --git a/toolkit/source/controls/tkthrobber.cxx b/toolkit/source/controls/tkthrobber.cxx index 153a19bf38c9..bea8f90a8b17 100644 --- a/toolkit/source/controls/tkthrobber.cxx +++ b/toolkit/source/controls/tkthrobber.cxx @@ -103,8 +103,9 @@ namespace toolkit throw( uno::RuntimeException ) { uno::Sequence< ::rtl::OUString > aServices( UnoControlModel::getSupportedServiceNames() ); - aServices.realloc( aServices.getLength() + 1 ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel ); + aServices.realloc( aServices.getLength() + 2 ); + aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControlModel ); + aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel ); return aServices; } @@ -154,8 +155,9 @@ namespace toolkit throw( uno::RuntimeException ) { uno::Sequence< ::rtl::OUString > aServices( UnoControlBase::getSupportedServiceNames() ); - aServices.realloc( aServices.getLength() + 1 ); - aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl ); + aServices.realloc( aServices.getLength() + 2 ); + aServices[ aServices.getLength() - 2 ] = ::rtl::OUString::createFromAscii( szServiceName_UnoThrobberControl ); + aServices[ aServices.getLength() - 1 ] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControl ); return aServices; } diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index d9264f22cb51..d66ff3dd3610 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -281,10 +281,10 @@ TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( void* _pServiceManager, registerServices( xRegistryKey, "TreeControl", szServiceName_TreeControl ); registerServices( xRegistryKey, "TreeControlModel", szServiceName_TreeControlModel ); registerServices( xRegistryKey, "MutableTreeDataModel", szServiceName_MutableTreeDataModel ); - registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel ); - registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl ); - registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel ); - registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl ); + registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel ); + registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl ); + registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel ); + registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl ); registerServices( xRegistryKey, "UnoFixedHyperlinkControl", szServiceName_UnoControlFixedHyperlink ); registerServices( xRegistryKey, "UnoControlFixedHyperlinkModel", szServiceName_UnoControlFixedHyperlinkModel ); @@ -363,10 +363,10 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplemen CHECKANDCREATEFACTORY( TreeControl, szServiceName_TreeControl, NULL ) CHECKANDCREATEFACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL ) CHECKANDCREATEFACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL ) - CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, NULL ) - CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, NULL ) - CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, NULL ) - CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, NULL ) + CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, szServiceName2_UnoSimpleAnimationControlModel ) + CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, szServiceName2_UnoSimpleAnimationControl ) + CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, szServiceName2_UnoThrobberControlModel ) + CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, szServiceName2_UnoThrobberControl ) CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL ) CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL ) diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index 903f18f95eae..f05540334e7e 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -95,10 +95,10 @@ const sal_Char __FAR_DATA szServiceName_UnoSpinButtonModel[] = "com.sun.star.awt const sal_Char __FAR_DATA szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl"; const sal_Char __FAR_DATA szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel"; const sal_Char __FAR_DATA szServiceName_MutableTreeDataModel[] = "com.sun.star.awt.tree.MutableTreeDataModel"; -const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel"; -const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl"; -const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel"; -const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl"; +const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoSimpleAnimationControlModel", szServiceName2_UnoSimpleAnimationControlModel[] = "com.sun.star.awt.UnoControlSimpleAnimationModel"; +const sal_Char __FAR_DATA szServiceName_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoSimpleAnimationControl", szServiceName2_UnoSimpleAnimationControl[] = "com.sun.star.awt.UnoControlSimpleAnimation"; +const sal_Char __FAR_DATA szServiceName_UnoThrobberControlModel[] = "com.sun.star.awt.UnoThrobberControlModel", szServiceName2_UnoThrobberControlModel[] = "com.sun.star.awt.UnoControlThrobberModel"; +const sal_Char __FAR_DATA szServiceName_UnoThrobberControl[] = "com.sun.star.awt.UnoThrobberControl", szServiceName2_UnoThrobberControl[] = "com.sun.star.awt.UnoControlThrobber"; const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink"; const sal_Char __FAR_DATA szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel"; -- cgit From 975d4e7e486714b4111fb69f8c1fa43dad97ef1e Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Wed, 4 Nov 2009 13:45:04 +0000 Subject: #i105452# Added Throbber to list of available service names of the dialog --- toolkit/source/controls/dialogcontrol.cxx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'toolkit') diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 07d459a6111a..e15267d5b258 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -46,6 +46,9 @@ #include "toolkit/controls/tkscrollbar.hxx" #endif #include +#include +#include + #include #include #include @@ -456,6 +459,10 @@ Reference< XInterface > UnoControlDialogModel::createInstance( const ::rtl::OUSt pNewModel = new OGeometryControlModel< UnoTreeModel >; else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 ) pNewModel = new OGeometryControlModel< UnoGridModel >; + else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoSimpleAnimationControlModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoSimpleAnimationControlModel >; + else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoThrobberControlModel ) == 0 ) + pNewModel = new OGeometryControlModel< UnoThrobberControlModel >; if ( !pNewModel ) { @@ -495,7 +502,7 @@ Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() th static Sequence< ::rtl::OUString >* pNamesSeq = NULL; if ( !pNamesSeq ) { - pNamesSeq = new Sequence< ::rtl::OUString >( 21 ); + pNamesSeq = new Sequence< ::rtl::OUString >( 24 ); ::rtl::OUString* pNames = pNamesSeq->getArray(); pNames[0] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlEditModel ); pNames[1] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel ); @@ -518,8 +525,9 @@ Sequence< ::rtl::OUString > UnoControlDialogModel::getAvailableServiceNames() th pNames[18] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel ); pNames[19] = ::rtl::OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel ); pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_TreeControlModel ); - pNames[20] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); - + pNames[21] = ::rtl::OUString::createFromAscii( szServiceName_GridControlModel ); + pNames[22] = ::rtl::OUString::createFromAscii( szServiceName2_UnoSimpleAnimationControlModel ); + pNames[23] = ::rtl::OUString::createFromAscii( szServiceName2_UnoThrobberControlModel ); } return *pNamesSeq; } -- cgit