diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-12 12:23:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-12 12:23:58 +0100 |
commit | 45fe77164c90cf15b78cd8b99adc043e2dd26be1 (patch) | |
tree | c1b55843aebe28b167c087b51e7ba110180cf600 /toolkit | |
parent | e965798caf75054d8fc826a4cfa33524cbbcec42 (diff) |
toolkit: Use appropriate OUString functions on string constants
Change-Id: I3bb1e560eb325046f5b170da0c4c46c1139f3225
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 104 | ||||
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 14 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrol.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrol.hxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 16 | ||||
-rw-r--r-- | toolkit/source/helper/property.cxx | 10 | ||||
-rw-r--r-- | toolkit/source/helper/servicenames.cxx | 55 |
7 files changed, 74 insertions, 133 deletions
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index a8bd68f8dc8f..289b804c27fd 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -332,61 +332,61 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const OUStrin OGeometryControlModel_Base* pNewModel = NULL; - if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlEditModel ) ) + if ( aServiceSpecifier == "com.sun.star.awt.UnoControlEditModel" ) pNewModel = new OGeometryControlModel< UnoControlEditModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlFormattedFieldModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlFormattedFieldModel" ) pNewModel = new OGeometryControlModel< UnoControlFormattedFieldModel >( m_xContext); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlFileControlModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlFileControlModel" ) pNewModel = new OGeometryControlModel< UnoControlFileControlModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlButtonModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlButtonModel" ) pNewModel = new OGeometryControlModel< UnoControlButtonModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlImageControlModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlImageControlModel" ) pNewModel = new OGeometryControlModel< UnoControlImageControlModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlRadioButtonModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlRadioButtonModel" ) pNewModel = new OGeometryControlModel< UnoControlRadioButtonModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlCheckBoxModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlCheckBoxModel" ) pNewModel = new OGeometryControlModel< UnoControlCheckBoxModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoControlFixedHyperlinkModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlFixedHyperlinkModel" ) pNewModel = new OGeometryControlModel< UnoControlFixedHyperlinkModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoControlFixedTextModel ) ) + else if ( aServiceSpecifier == "stardiv.vcl.controlmodel.FixedText" ) pNewModel = new OGeometryControlModel< UnoControlFixedTextModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlGroupBoxModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlGroupBoxModel" ) pNewModel = new OGeometryControlModel< UnoControlGroupBoxModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlListBoxModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlListBoxModel" ) pNewModel = new OGeometryControlModel< UnoControlListBoxModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlComboBoxModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlComboBoxModel" ) pNewModel = new OGeometryControlModel< UnoControlComboBoxModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlDateFieldModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlDateFieldModel" ) pNewModel = new OGeometryControlModel< UnoControlDateFieldModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlTimeFieldModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlTimeFieldModel" ) pNewModel = new OGeometryControlModel< UnoControlTimeFieldModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlNumericFieldModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlNumericFieldModel" ) pNewModel = new OGeometryControlModel< UnoControlNumericFieldModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlCurrencyFieldModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlCurrencyFieldModel" ) pNewModel = new OGeometryControlModel< UnoControlCurrencyFieldModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlPatternFieldModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlPatternFieldModel" ) pNewModel = new OGeometryControlModel< UnoControlPatternFieldModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlProgressBarModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlProgressBarModel" ) pNewModel = new OGeometryControlModel< UnoControlProgressBarModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlScrollBarModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlScrollBarModel" ) pNewModel = new OGeometryControlModel< UnoControlScrollBarModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlFixedLineModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlFixedLineModel" ) pNewModel = new OGeometryControlModel< UnoControlFixedLineModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlRoadmapModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoControlRoadmapModel" ) pNewModel = new OGeometryControlModel< UnoControlRoadmapModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_TreeControlModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.tree.TreeControlModel" ) pNewModel = new OGeometryControlModel< UnoTreeModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_GridControlModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.grid.UnoControlGridModel" ) pNewModel = new OGeometryControlModel< UnoGridModel >( m_xContext ); else if ( aServiceSpecifier == "com.sun.star.awt.tab.UnoControlTabPageContainerModel" ) pNewModel = new OGeometryControlModel< UnoControlTabPageContainerModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoMultiPageModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoMultiPageModel" ) pNewModel = new OGeometryControlModel< UnoMultiPageModel >( m_xContext ); else if ( aServiceSpecifier == "com.sun.star.awt.tab.UnoControlTabPageModel" ) pNewModel = new OGeometryControlModel< UnoControlTabPageModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoPageModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoPageModel" ) pNewModel = new OGeometryControlModel< UnoPageModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoFrameModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.UnoFrameModel" ) pNewModel = new OGeometryControlModel< UnoFrameModel >( m_xContext ); if ( !pNewModel ) @@ -429,32 +429,28 @@ Sequence< OUString > ControlModelContainerBase::getAvailableServiceNames() throw { pNamesSeq = new Sequence< OUString >( 26 ); OUString* pNames = pNamesSeq->getArray(); - pNames[0] = OUString::createFromAscii( szServiceName2_UnoControlEditModel ); - pNames[1] = OUString::createFromAscii( szServiceName2_UnoControlFormattedFieldModel ); - pNames[2] = OUString::createFromAscii( szServiceName2_UnoControlFileControlModel ); - pNames[3] = OUString::createFromAscii( szServiceName2_UnoControlButtonModel ); - pNames[4] = OUString::createFromAscii( szServiceName2_UnoControlImageControlModel ); - pNames[5] = OUString::createFromAscii( szServiceName2_UnoControlRadioButtonModel ); - pNames[6] = OUString::createFromAscii( szServiceName2_UnoControlCheckBoxModel ); - pNames[7] = OUString::createFromAscii( szServiceName2_UnoControlFixedTextModel ); - pNames[8] = OUString::createFromAscii( szServiceName2_UnoControlGroupBoxModel ); - pNames[9] = OUString::createFromAscii( szServiceName2_UnoControlListBoxModel ); - pNames[10] = OUString::createFromAscii( szServiceName2_UnoControlComboBoxModel ); - pNames[11] = OUString::createFromAscii( szServiceName2_UnoControlDateFieldModel ); - pNames[12] = OUString::createFromAscii( szServiceName2_UnoControlTimeFieldModel ); - pNames[13] = OUString::createFromAscii( szServiceName2_UnoControlNumericFieldModel ); - pNames[14] = OUString::createFromAscii( szServiceName2_UnoControlCurrencyFieldModel ); - pNames[15] = OUString::createFromAscii( szServiceName2_UnoControlPatternFieldModel ); - pNames[16] = OUString::createFromAscii( szServiceName2_UnoControlProgressBarModel ); - pNames[17] = OUString::createFromAscii( szServiceName2_UnoControlScrollBarModel ); - pNames[18] = OUString::createFromAscii( szServiceName2_UnoControlFixedLineModel ); - pNames[19] = OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel ); - pNames[20] = OUString::createFromAscii( szServiceName_TreeControlModel ); - pNames[21] = OUString::createFromAscii( szServiceName_GridControlModel ); - pNames[22] = OUString( "com.sun.star.awt.tab.UnoControlTabPageContainerModel"); - pNames[23] = OUString( "com.sun.star.awt.tab.UnoControlTabPageModel" ); - pNames[24] = OUString::createFromAscii( szServiceName_UnoMultiPageModel ); - pNames[25] = OUString::createFromAscii( szServiceName_UnoFrameModel ); + pNames[0] = "com.sun.star.awt.UnoControlEditModel"; + pNames[1] = "com.sun.star.awt.UnoControlFormattedFieldModel"; + pNames[2] = "com.sun.star.awt.UnoControlFileControlModel"; + pNames[3] = "com.sun.star.awt.UnoControlButtonModel"; + pNames[4] = "com.sun.star.awt.UnoControlImageControlModel"; + pNames[5] = "com.sun.star.awt.UnoControlRadioButtonModel"; + pNames[6] = "com.sun.star.awt.UnoControlCheckBoxModel"; + pNames[7] = "com.sun.star.awt.UnoControlFixedTextModel"; + pNames[8] = "com.sun.star.awt.UnoControlGroupBoxModel"; + pNames[9] = "com.sun.star.awt.UnoControlListBoxModel"; + pNames[10] = "com.sun.star.awt.UnoControlComboBoxModel"; + pNames[11] = "com.sun.star.awt.UnoControlDateFieldModel"; + pNames[12] = "com.sun.star.awt.UnoControlTimeFieldModel"; + pNames[13] = "com.sun.star.awt.UnoControlNumericFieldModel"; + pNames[14] = "com.sun.star.awt.UnoControlCurrencyFieldModel"; + pNames[15] = "com.sun.star.awt.UnoControlPatternFieldModel"; + pNames[16] = "com.sun.star.awt.tree.TreeControlModel"; + pNames[21] = "com.sun.star.awt.grid.UnoControlGridModel"; + pNames[22] = "com.sun.star.awt.tab.UnoControlTabPageContainerModel"; + pNames[23] = "com.sun.star.awt.tab.UnoControlTabPageModel"; + pNames[24] = "com.sun.star.awt.UnoMultiPageModel"; + pNames[25] = "com.sun.star.awt.UnoFrameModel"; } return *pNamesSeq; } @@ -966,7 +962,7 @@ void ControlModelContainerBase::implUpdateGroupStructure() { // we'll need this in every state xModelSI.set(*pControlModels, css::uno::UNO_QUERY); - bIsRadioButton = xModelSI.is() && xModelSI->supportsService( OUString::createFromAscii( szServiceName2_UnoControlRadioButtonModel ) ); + bIsRadioButton = xModelSI.is() && xModelSI->supportsService( "com.sun.star.awt.UnoControlRadioButtonModel" ); switch ( eState ) { @@ -1072,7 +1068,7 @@ void SAL_CALL ControlModelContainerBase::propertyChange( const PropertyChangeEve { SolarMutexGuard aGuard; - DBG_ASSERT( _rEvent.PropertyName.equalsAscii( "TabIndex" ), + DBG_ASSERT( _rEvent.PropertyName == "TabIndex", "ControlModelContainerBase::propertyChange: not listening for this property!" ); // the accessor for the changed element diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index 95592918e520..eae95dab7ed7 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -899,7 +899,7 @@ UnoMultiPageModel::Clone() const OUString UnoMultiPageModel::getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) { - return OUString::createFromAscii( szServiceName_UnoMultiPageModel ); + return OUString( "com.sun.star.awt.UnoMultiPageModel" ); } uno::Any UnoMultiPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -907,7 +907,7 @@ uno::Any UnoMultiPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) { uno::Any aAny; - aAny <<= OUString::createFromAscii( szServiceName_UnoMultiPageControl ); + aAny <<= OUString( "com.sun.star.awt.UnoControlMultiPage" ); return aAny; } return ControlModelContainerBase::ImplGetDefaultValue( nPropId ); @@ -940,7 +940,7 @@ void UnoMultiPageModel::insertByName( const OUString& aName, const Any& aElement throw IllegalArgumentException(); // Only a Page model can be inserted into the multipage - if ( !xInfo->supportsService( OUString::createFromAscii( szServiceName_UnoPageModel ) ) ) + if ( !xInfo->supportsService( "com.sun.star.awt.UnoPageModel" ) ) throw IllegalArgumentException(); return ControlModelContainerBase::insertByName( aName, aElement ); @@ -1019,7 +1019,7 @@ UnoPageModel::Clone() const OUString UnoPageModel::getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) { - return OUString::createFromAscii( szServiceName_UnoPageModel ); + return OUString( "com.sun.star.awt.UnoPageModel" ); } uno::Any UnoPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -1027,7 +1027,7 @@ uno::Any UnoPageModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) { uno::Any aAny; - aAny <<= OUString::createFromAscii( szServiceName_UnoPageControl ); + aAny <<= OUString( "com.sun.star.awt.UnoControlPage" ); return aAny; } return ControlModelContainerBase::ImplGetDefaultValue( nPropId ); @@ -1184,7 +1184,7 @@ UnoFrameModel::Clone() const OUString UnoFrameModel::getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) { - return OUString::createFromAscii( szServiceName_UnoFrameModel ); + return OUString( "com.sun.star.awt.UnoFrameModel" ); } uno::Any UnoFrameModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -1194,7 +1194,7 @@ uno::Any UnoFrameModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const { case BASEPROPERTY_DEFAULTCONTROL: { - aAny <<= OUString::createFromAscii( szServiceName_UnoFrameControl ); + aAny <<= OUString( "com.sun.star.awt.UnoControlFrame" ); return aAny; } case BASEPROPERTY_SCROLLWIDTH: diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index b5af991c644f..54df3a0f1ba8 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -80,7 +80,7 @@ UnoControlModel* UnoTreeModel::Clone() const OUString UnoTreeModel::getServiceName() throw(RuntimeException, std::exception) { - return OUString::createFromAscii( szServiceName_TreeControlModel ); + return OUString( "com.sun.star.awt.tree.TreeControlModel" ); } Any UnoTreeModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -101,7 +101,7 @@ Any UnoTreeModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_TREE_SHOWSHANDLES: return Any( sal_True ); case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString::createFromAscii( szServiceName_TreeControl ) ); + return uno::makeAny( OUString( "com.sun.star.awt.tree.TreeControl" ) ); default: return UnoControlModel::ImplGetDefaultValue( nPropId ); } @@ -180,7 +180,7 @@ public: virtual void SAL_CALL removeTreeEditListener( const css::uno::Reference< css::awt::tree::XTreeEditListener >& Listener ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // css::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoTreeControl, UnoControlBase, szServiceName_TreeControl ) + DECLIMPL_SERVICEINFO_DERIVED( UnoTreeControl, UnoControlBase, "com.sun.star.awt.tree.TreeControl" ) using UnoControl::getPeer; private: diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index 97eb4cca7330..f6bed0357c9b 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -51,7 +51,7 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoTreeModel, UnoControlModel, szServiceName_TreeControlModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoTreeModel, UnoControlModel, "com.sun.star.awt.tree.TreeControlModel" ) }; } // toolkit diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 2a7abdf0947b..4d5636e115c9 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -77,7 +77,7 @@ using namespace ::toolkit; { \ ::com::sun::star::uno::Sequence< OUString > aNames = BaseClass::getSupportedServiceNames( ); \ aNames.realloc( aNames.getLength() + 1 ); \ - aNames[ aNames.getLength() - 1 ] = OUString::createFromAscii( ServiceName ); \ + aNames[ aNames.getLength() - 1 ] = ServiceName; \ return aNames; \ } \ @@ -1455,7 +1455,7 @@ UnoControlFixedHyperlinkModel::UnoControlFixedHyperlinkModel( const Reference< X OUString UnoControlFixedHyperlinkModel::getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) { - return OUString::createFromAscii( szServiceName_UnoControlFixedHyperlinkModel ); + return OUString( "com.sun.star.awt.UnoControlFixedHyperlinkModel" ); } uno::Any UnoControlFixedHyperlinkModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -1463,7 +1463,7 @@ uno::Any UnoControlFixedHyperlinkModel::ImplGetDefaultValue( sal_uInt16 nPropId if ( nPropId == BASEPROPERTY_DEFAULTCONTROL ) { uno::Any aAny; - aAny <<= OUString::createFromAscii( szServiceName_UnoControlFixedHyperlink ); + aAny <<= OUString( "com.sun.star.awt.UnoControlFixedHyperlink" ); return aAny; } else if ( nPropId == BASEPROPERTY_BORDER ) @@ -1658,7 +1658,7 @@ UnoControlFixedTextModel::UnoControlFixedTextModel( const Reference< XComponentC OUString UnoControlFixedTextModel::getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) { - return OUString::createFromAscii( szServiceName_UnoControlFixedTextModel ); + return OUString( "stardiv.vcl.controlmodel.FixedText" ); } uno::Any UnoControlFixedTextModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -2009,7 +2009,7 @@ UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_ UnoControlListBoxModel::~UnoControlListBoxModel() { } -IMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, szServiceName2_UnoControlListBoxModel ) +IMPL_SERVICEINFO_DERIVED( UnoControlListBoxModel, UnoControlModel, "com.sun.star.awt.UnoControlListBoxModel" ) OUString UnoControlListBoxModel::getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) { @@ -2452,7 +2452,7 @@ OUString UnoListBoxControl::GetComponentServiceName() { return OUString("listbox"); } -IMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, szServiceName2_UnoControlListBox ) +IMPL_SERVICEINFO_DERIVED( UnoListBoxControl, UnoControlBase, "com.sun.star.awt.UnoControlListBox" ) void UnoListBoxControl::dispose() throw(uno::RuntimeException, std::exception) { @@ -2877,7 +2877,7 @@ UnoControlComboBoxModel::UnoControlComboBoxModel( const Reference< XComponentCon UNO_CONTROL_MODEL_REGISTER_PROPERTIES( VCLXComboBox ); } -IMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, szServiceName2_UnoControlComboBoxModel ) +IMPL_SERVICEINFO_DERIVED( UnoControlComboBoxModel, UnoControlModel, "com.sun.star.awt.UnoControlComboBoxModel" ) uno::Reference< beans::XPropertySetInfo > UnoControlComboBoxModel::getPropertySetInfo( ) throw(uno::RuntimeException, std::exception) { @@ -2963,7 +2963,7 @@ UnoComboBoxControl::UnoComboBoxControl() maComponentInfos.nWidth = 100; maComponentInfos.nHeight = 12; } -IMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, szServiceName2_UnoControlComboBox ) +IMPL_SERVICEINFO_DERIVED( UnoComboBoxControl, UnoEditControl, "com.sun.star.awt.UnoControlComboBox" ) OUString UnoComboBoxControl::GetComponentServiceName() { diff --git a/toolkit/source/helper/property.cxx b/toolkit/source/helper/property.cxx index f1d715565445..49df534f6faa 100644 --- a/toolkit/source/helper/property.cxx +++ b/toolkit/source/helper/property.cxx @@ -80,16 +80,16 @@ struct ImplPropertyInfo }; #define DECL_PROP_1( asciiname, id, type, attrib1 ) \ - ImplPropertyInfo( OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 ) + ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 ) #define DECL_PROP_2( asciiname, id, type, attrib1, attrib2 ) \ - ImplPropertyInfo( OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 ) + ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 ) #define DECL_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \ - ImplPropertyInfo( OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3 ) + ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3 ) #define DECL_DEP_PROP_2( asciiname, id, type, attrib1, attrib2 ) \ - ImplPropertyInfo( OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2, true ) + ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2, true ) #define DECL_DEP_PROP_3( asciiname, id, type, attrib1, attrib2, attrib3 ) \ - ImplPropertyInfo( OUString::createFromAscii( asciiname ), BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3, true ) + ImplPropertyInfo( asciiname, BASEPROPERTY_##id, ::getCppuType( static_cast< const type* >( NULL ) ), ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3, true ) ImplPropertyInfo* ImplGetPropertyInfos( sal_uInt16& rElementCount ) { diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index 30f3afac0512..94a802e631fb 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -29,11 +29,7 @@ const sal_Char szServiceName2_MenuBar[] = "com.sun.star.awt.MenuBar"; const sal_Char szServiceName_Pointer[] = "stardiv.vcl.Pointer"; const sal_Char szServiceName2_Pointer[] = "com.sun.star.awt.Pointer"; const sal_Char szServiceName_UnoControlContainer[] = "stardiv.vcl.control.ControlContainer"; -const sal_Char szServiceName2_UnoControlContainer[] = "com.sun.star.awt.UnoControlContainer"; - - const sal_Char szServiceName_UnoControlContainerModel[] = "stardiv.vcl.controlmodel.ControlContainer"; -const sal_Char szServiceName2_UnoControlContainerModel[] = "com.sun.star.awt.UnoControlContainerModel"; const sal_Char szServiceName_TabController[] = "stardiv.vcl.control.TabController"; const sal_Char szServiceName2_TabController[] = "com.sun.star.awt.TabController"; const sal_Char szServiceName_TabControllerModel[] = "stardiv.vcl.controlmodel.TabController"; @@ -45,105 +41,54 @@ const sal_Char szServiceName2_UnoControlDialogModel[] = "com.sun.star.awt.UnoCon const sal_Char szServiceName_UnoControlEdit[] = "stardiv.vcl.control.Edit"; const sal_Char szServiceName2_UnoControlEdit[] = "com.sun.star.awt.UnoControlEdit"; const sal_Char szServiceName_UnoControlEditModel[] = "stardiv.vcl.controlmodel.Edit"; -const sal_Char szServiceName2_UnoControlEditModel[] = "com.sun.star.awt.UnoControlEditModel"; const sal_Char szServiceName_UnoControlFileControl[] = "stardiv.vcl.control.FileControl"; -const sal_Char szServiceName2_UnoControlFileControl[] = "com.sun.star.awt.UnoControlFileControl"; const sal_Char szServiceName_UnoControlFileControlModel[] = "stardiv.vcl.controlmodel.FileControl"; -const sal_Char szServiceName2_UnoControlFileControlModel[] = "com.sun.star.awt.UnoControlFileControlModel"; const sal_Char szServiceName_UnoControlButton[] = "stardiv.vcl.control.Button"; -const sal_Char szServiceName2_UnoControlButton[] = "com.sun.star.awt.UnoControlButton"; const sal_Char szServiceName_UnoControlButtonModel[] = "stardiv.vcl.controlmodel.Button"; -const sal_Char szServiceName2_UnoControlButtonModel[] = "com.sun.star.awt.UnoControlButtonModel"; const sal_Char szServiceName_UnoControlImageButton[] = "stardiv.vcl.control.ImageButton"; const sal_Char szServiceName2_UnoControlImageButton[] = "com.sun.star.awt.UnoControlImageButton"; const sal_Char szServiceName_UnoControlImageButtonModel[] = "stardiv.vcl.controlmodel.ImageButton"; const sal_Char szServiceName2_UnoControlImageButtonModel[] = "com.sun.star.awt.UnoControlImageButtonModel"; const sal_Char szServiceName_UnoControlImageControl[] = "stardiv.vcl.control.ImageControl"; -const sal_Char szServiceName2_UnoControlImageControl[] = "com.sun.star.awt.UnoControlImageControl"; const sal_Char szServiceName_UnoControlImageControlModel[] = "stardiv.vcl.controlmodel.ImageControl"; -const sal_Char szServiceName2_UnoControlImageControlModel[] = "com.sun.star.awt.UnoControlImageControlModel"; const sal_Char szServiceName_UnoControlRadioButton[] = "stardiv.vcl.control.RadioButton"; -const sal_Char szServiceName2_UnoControlRadioButton[] = "com.sun.star.awt.UnoControlRadioButton"; const sal_Char szServiceName_UnoControlRadioButtonModel[] = "stardiv.vcl.controlmodel.RadioButton"; -const sal_Char szServiceName2_UnoControlRadioButtonModel[] = "com.sun.star.awt.UnoControlRadioButtonModel"; const sal_Char szServiceName_UnoControlCheckBox[] = "stardiv.vcl.control.CheckBox"; -const sal_Char szServiceName2_UnoControlCheckBox[] = "com.sun.star.awt.UnoControlCheckBox"; const sal_Char szServiceName_UnoControlCheckBoxModel[] = "stardiv.vcl.controlmodel.CheckBox"; -const sal_Char szServiceName2_UnoControlCheckBoxModel[] = "com.sun.star.awt.UnoControlCheckBoxModel"; const sal_Char szServiceName_UnoControlListBox[] = "stardiv.vcl.control.ListBox"; -const sal_Char szServiceName2_UnoControlListBox[] = "com.sun.star.awt.UnoControlListBox"; const sal_Char szServiceName_UnoControlListBoxModel[] = "stardiv.vcl.controlmodel.ListBox"; -const sal_Char szServiceName2_UnoControlListBoxModel[] = "com.sun.star.awt.UnoControlListBoxModel"; const sal_Char szServiceName_UnoControlComboBox[] = "stardiv.vcl.control.ComboBox"; -const sal_Char szServiceName2_UnoControlComboBox[] = "com.sun.star.awt.UnoControlComboBox"; const sal_Char szServiceName_UnoControlComboBoxModel[] = "stardiv.vcl.controlmodel.ComboBox"; -const sal_Char szServiceName2_UnoControlComboBoxModel[] = "com.sun.star.awt.UnoControlComboBoxModel"; const sal_Char szServiceName_UnoControlFixedText[] = "stardiv.vcl.control.FixedText"; -const sal_Char szServiceName2_UnoControlFixedText[] = "com.sun.star.awt.UnoControlFixedText"; -const sal_Char szServiceName_UnoControlFixedTextModel[] = "stardiv.vcl.controlmodel.FixedText"; -const sal_Char szServiceName2_UnoControlFixedTextModel[] = "com.sun.star.awt.UnoControlFixedTextModel"; const sal_Char szServiceName_UnoControlGroupBox[] = "stardiv.vcl.control.GroupBox"; -const sal_Char szServiceName2_UnoControlGroupBox[] = "com.sun.star.awt.UnoControlGroupBox"; const sal_Char szServiceName_UnoControlGroupBoxModel[] = "stardiv.vcl.controlmodel.GroupBox"; -const sal_Char szServiceName2_UnoControlGroupBoxModel[] = "com.sun.star.awt.UnoControlGroupBoxModel"; const sal_Char szServiceName_UnoControlDateField[] = "stardiv.vcl.control.DateField"; -const sal_Char szServiceName2_UnoControlDateField[] = "com.sun.star.awt.UnoControlDateField"; const sal_Char szServiceName_UnoControlDateFieldModel[] = "stardiv.vcl.controlmodel.DateField"; -const sal_Char szServiceName2_UnoControlDateFieldModel[] = "com.sun.star.awt.UnoControlDateFieldModel"; const sal_Char szServiceName_UnoControlTimeField[] = "stardiv.vcl.control.TimeField"; -const sal_Char szServiceName2_UnoControlTimeField[] = "com.sun.star.awt.UnoControlTimeField"; const sal_Char szServiceName_UnoControlTimeFieldModel[] = "stardiv.vcl.controlmodel.TimeField"; -const sal_Char szServiceName2_UnoControlTimeFieldModel[] = "com.sun.star.awt.UnoControlTimeFieldModel"; const sal_Char szServiceName_UnoControlNumericField[] = "stardiv.vcl.control.NumericField"; -const sal_Char szServiceName2_UnoControlNumericField[] = "com.sun.star.awt.UnoControlNumericField"; const sal_Char szServiceName_UnoControlNumericFieldModel[] = "stardiv.vcl.controlmodel.NumericField"; -const sal_Char szServiceName2_UnoControlNumericFieldModel[] = "com.sun.star.awt.UnoControlNumericFieldModel"; const sal_Char szServiceName_UnoControlCurrencyField[] = "stardiv.vcl.control.CurrencyField"; -const sal_Char szServiceName2_UnoControlCurrencyField[] = "com.sun.star.awt.UnoControlCurrencyField"; const sal_Char szServiceName_UnoControlCurrencyFieldModel[] = "stardiv.vcl.controlmodel.CurrencyField"; -const sal_Char szServiceName2_UnoControlCurrencyFieldModel[] = "com.sun.star.awt.UnoControlCurrencyFieldModel"; const sal_Char szServiceName_UnoControlPatternField[] = "stardiv.vcl.control.PatternField"; -const sal_Char szServiceName2_UnoControlPatternField[] = "com.sun.star.awt.UnoControlPatternField"; const sal_Char szServiceName_UnoControlPatternFieldModel[] = "stardiv.vcl.controlmodel.PatternField"; -const sal_Char szServiceName2_UnoControlPatternFieldModel[] = "com.sun.star.awt.UnoControlPatternFieldModel"; const sal_Char szServiceName_UnoControlFormattedField[] = "stardiv.vcl.control.FormattedField"; -const sal_Char szServiceName2_UnoControlFormattedField[] = "com.sun.star.awt.UnoControlFormattedField"; const sal_Char szServiceName_UnoControlFormattedFieldModel[] = "stardiv.vcl.controlmodel.FormattedField"; -const sal_Char szServiceName2_UnoControlFormattedFieldModel[] = "com.sun.star.awt.UnoControlFormattedFieldModel"; const sal_Char szServiceName_MVCIntrospection[] = "stardiv.vcl.MVCIntrospection"; const sal_Char szServiceName2_MVCIntrospection[] = "com.sun.star.awt.MVCIntrospection"; const sal_Char szServiceName_PrinterServer[] = "stardiv.vcl.PrinterServer"; const sal_Char szServiceName2_PrinterServer[] = "com.sun.star.awt.PrinterServer"; const sal_Char szServiceName_UnoControlProgressBar[] = "stardiv.vcl.control.ProgressBar"; -const sal_Char szServiceName2_UnoControlProgressBar[] = "com.sun.star.awt.UnoControlProgressBar"; const sal_Char szServiceName_UnoControlProgressBarModel[] = "stardiv.vcl.controlmodel.ProgressBar"; -const sal_Char szServiceName2_UnoControlProgressBarModel[] = "com.sun.star.awt.UnoControlProgressBarModel"; const sal_Char szServiceName_UnoControlScrollBar[] = "stardiv.vcl.control.ScrollBar"; -const sal_Char szServiceName2_UnoControlScrollBar[] = "com.sun.star.awt.UnoControlScrollBar"; const sal_Char szServiceName_UnoControlScrollBarModel[] = "stardiv.vcl.controlmodel.ScrollBar"; -const sal_Char szServiceName2_UnoControlScrollBarModel[] = "com.sun.star.awt.UnoControlScrollBarModel"; const sal_Char szServiceName_UnoControlFixedLine[] = "stardiv.vcl.control.FixedLine"; -const sal_Char szServiceName2_UnoControlFixedLine[] = "com.sun.star.awt.UnoControlFixedLine"; const sal_Char szServiceName_UnoControlFixedLineModel[] = "stardiv.vcl.controlmodel.FixedLine"; -const sal_Char szServiceName2_UnoControlFixedLineModel[] = "com.sun.star.awt.UnoControlFixedLineModel"; const sal_Char szServiceName_UnoControlRoadmap[] = "stardiv.vcl.control.Roadmap"; -const sal_Char szServiceName2_UnoControlRoadmap[] = "com.sun.star.awt.UnoControlRoadmap"; const sal_Char szServiceName_UnoControlRoadmapModel[] = "stardiv.vcl.controlmodel.Roadmap"; -const sal_Char szServiceName2_UnoControlRoadmapModel[] = "com.sun.star.awt.UnoControlRoadmapModel"; const sal_Char szServiceName_UnoSpinButtonControl[] = "com.sun.star.awt.UnoControlSpinButton"; const sal_Char szServiceName_UnoSpinButtonModel[] = "com.sun.star.awt.UnoControlSpinButtonModel"; -const sal_Char szServiceName_UnoMultiPageControl[] = "com.sun.star.awt.UnoControlMultiPage"; -const sal_Char szServiceName_UnoMultiPageModel[] = "com.sun.star.awt.UnoMultiPageModel"; -const sal_Char szServiceName_UnoPageControl[] = "com.sun.star.awt.UnoControlPage"; -const sal_Char szServiceName_UnoPageModel[] = "com.sun.star.awt.UnoPageModel"; -const sal_Char szServiceName_UnoFrameControl[] = "com.sun.star.awt.UnoControlFrame"; -const sal_Char szServiceName_UnoFrameModel[] = "com.sun.star.awt.UnoFrameModel"; -const sal_Char szServiceName_TreeControl[] = "com.sun.star.awt.tree.TreeControl"; -const sal_Char szServiceName_TreeControlModel[] = "com.sun.star.awt.tree.TreeControlModel"; -const sal_Char szServiceName_UnoControlFixedHyperlink[] = "com.sun.star.awt.UnoControlFixedHyperlink"; -const sal_Char szServiceName_UnoControlFixedHyperlinkModel[] = "com.sun.star.awt.UnoControlFixedHyperlinkModel"; const sal_Char szServiceName_GridControl[] = "com.sun.star.awt.grid.UnoControlGrid"; -const sal_Char szServiceName_GridControlModel[] = "com.sun.star.awt.grid.UnoControlGridModel"; const sal_Char szServiceName_DefaultGridDataModel[] = "com.sun.star.awt.grid.DefaultGridDataModel"; const sal_Char szServiceName_DefaultGridColumnModel[] = "com.sun.star.awt.grid.DefaultGridColumnModel"; const sal_Char szServiceName_GridColumn[] = "com.sun.star.awt.grid.GridColumn"; |