diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-17 14:00:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-17 14:03:26 +0100 |
commit | 5dcf536b69848b56f1199b81e4b7ed87a0a3864d (patch) | |
tree | 86f28d6db1963680549b6111ca99f95ca580f763 /dbaccess/source | |
parent | acd9cda35457f0a839bf9713c261022c39cd8269 (diff) |
merge the 5 ConstAsciiString duplicate classes together
a) merge them together and move it into comphelper
b) turn it into a POD rather than having vast amounts
of destructors registered into the cxa_atexit chain
Change-Id: I04d3b9d7804f8e233013c916df9d617a0f84f96a
Diffstat (limited to 'dbaccess/source')
21 files changed, 48 insertions, 92 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 4a72dbdd2a93..01d8cbd06268 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -322,7 +322,7 @@ void SAL_CALL OSingleSelectQueryComposer::disposing(void) clearCurrentCollections(); } IMPLEMENT_FORWARD_XINTERFACE3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer) -IMPLEMENT_SERVICE_INFO1(OSingleSelectQueryComposer,"org.openoffice.comp.dba.OSingleSelectQueryComposer",SERVICE_NAME_SINGLESELECTQUERYCOMPOSER) +IMPLEMENT_SERVICE_INFO1(OSingleSelectQueryComposer,"org.openoffice.comp.dba.OSingleSelectQueryComposer",SERVICE_NAME_SINGLESELECTQUERYCOMPOSER.ascii) IMPLEMENT_TYPEPROVIDER3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer) IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(OSingleSelectQueryComposer) diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index a1bf1fa9cf5e..34654282d632 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -352,17 +352,17 @@ void ODBTableDecorator::construct() Property* pEnd = pIter + aTableProps.getLength(); for (;pIter != pEnd ; ++pIter) { - if (0 == pIter->Name.compareToAscii(PROPERTY_CATALOGNAME)) + if (pIter->Name.equalsAsciiL(PROPERTY_CATALOGNAME.ascii, PROPERTY_CATALOGNAME.length)) pIter->Handle = PROPERTY_ID_CATALOGNAME; - else if (0 ==pIter->Name.compareToAscii(PROPERTY_SCHEMANAME)) + else if (pIter->Name.equalsAsciiL(PROPERTY_SCHEMANAME.ascii, PROPERTY_SCHEMANAME.length)) pIter->Handle = PROPERTY_ID_SCHEMANAME; - else if (0 ==pIter->Name.compareToAscii(PROPERTY_NAME)) + else if (pIter->Name.equalsAsciiL(PROPERTY_NAME.ascii, PROPERTY_NAME.length)) pIter->Handle = PROPERTY_ID_NAME; - else if (0 ==pIter->Name.compareToAscii(PROPERTY_DESCRIPTION)) + else if (pIter->Name.equalsAsciiL(PROPERTY_DESCRIPTION.ascii, PROPERTY_DESCRIPTION.length)) pIter->Handle = PROPERTY_ID_DESCRIPTION; - else if (0 ==pIter->Name.compareToAscii(PROPERTY_TYPE)) + else if (pIter->Name.equalsAsciiL(PROPERTY_TYPE.ascii, PROPERTY_TYPE.length)) pIter->Handle = PROPERTY_ID_TYPE; - else if (0 ==pIter->Name.compareToAscii(PROPERTY_PRIVILEGES)) + else if (pIter->Name.equalsAsciiL(PROPERTY_PRIVILEGES.ascii, PROPERTY_PRIVILEGES.length)) pIter->Handle = PROPERTY_ID_PRIVILEGES; } @@ -390,7 +390,7 @@ void ODBTableDecorator::construct() } // XServiceInfo -IMPLEMENT_SERVICE_INFO1(ODBTableDecorator, "com.sun.star.sdb.dbaccess.ODBTableDecorator", SERVICE_SDBCX_TABLE) +IMPLEMENT_SERVICE_INFO1(ODBTableDecorator, "com.sun.star.sdb.dbaccess.ODBTableDecorator", SERVICE_SDBCX_TABLE.ascii) Any SAL_CALL ODBTableDecorator::queryInterface( const Type & rType ) throw(RuntimeException) { diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index 274885c3920e..a64516f3f09d 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -228,7 +228,7 @@ void OQuery::rebuildColumns() } // XServiceInfo -IMPLEMENT_SERVICE_INFO3(OQuery, "com.sun.star.sdb.dbaccess.OQuery", SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERY, SERVICE_SDB_QUERYDEFINITION) +IMPLEMENT_SERVICE_INFO3(OQuery, "com.sun.star.sdb.dbaccess.OQuery", SERVICE_SDB_DATASETTINGS.ascii, SERVICE_SDB_QUERY.ascii, SERVICE_SDB_QUERYDEFINITION.ascii) // ::com::sun::star::beans::XPropertyChangeListener void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource ) throw(RuntimeException) diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index dfa6a5edde9d..77e4a3e11963 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -149,7 +149,7 @@ void OQueryContainer::disposing() } // XServiceInfo -IMPLEMENT_SERVICE_INFO2(OQueryContainer, "com.sun.star.sdb.dbaccess.OQueryContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDB_QUERIES) +IMPLEMENT_SERVICE_INFO2(OQueryContainer, "com.sun.star.sdb.dbaccess.OQueryContainer", SERVICE_SDBCX_CONTAINER.ascii, SERVICE_SDB_QUERIES.ascii) // XDataDescriptorFactory Reference< XPropertySet > SAL_CALL OQueryContainer::createDataDescriptor( ) throw(RuntimeException) diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 6452b1156271..284efec407ea 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -265,13 +265,13 @@ void ODBTable::construct() Property* pEnd = pIter + aProps.getLength(); for(;pIter != pEnd;++pIter) { - if (0 == pIter->Name.compareToAscii(PROPERTY_CATALOGNAME)) + if (pIter->Name.equalsAsciiL(PROPERTY_CATALOGNAME.ascii, PROPERTY_CATALOGNAME.length)) pIter->Attributes = PropertyAttribute::READONLY; - else if (0 == pIter->Name.compareToAscii(PROPERTY_SCHEMANAME)) + else if (pIter->Name.equalsAsciiL(PROPERTY_SCHEMANAME.ascii, PROPERTY_SCHEMANAME.length)) pIter->Attributes = PropertyAttribute::READONLY; - else if (0 == pIter->Name.compareToAscii(PROPERTY_DESCRIPTION)) + else if (pIter->Name.equalsAsciiL(PROPERTY_DESCRIPTION.ascii, PROPERTY_DESCRIPTION.length)) pIter->Attributes = PropertyAttribute::READONLY; - else if (0 == pIter->Name.compareToAscii(PROPERTY_NAME)) + else if (pIter->Name.equalsAsciiL(PROPERTY_NAME.ascii, PROPERTY_NAME.length)) pIter->Attributes = PropertyAttribute::READONLY; } } @@ -285,7 +285,7 @@ void ODBTable::construct() } // XServiceInfo -IMPLEMENT_SERVICE_INFO1(ODBTable, "com.sun.star.sdb.dbaccess.ODBTable", SERVICE_SDBCX_TABLE) +IMPLEMENT_SERVICE_INFO1(ODBTable, "com.sun.star.sdb.dbaccess.ODBTable", SERVICE_SDBCX_TABLE.ascii) Any SAL_CALL ODBTable::queryInterface( const Type & rType ) throw(RuntimeException) { diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 8a306e9f6d65..54ca2f77721c 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -151,7 +151,7 @@ void OTableContainer::removeMasterContainerListener() } // XServiceInfo -IMPLEMENT_SERVICE_INFO2(OTableContainer, "com.sun.star.sdb.dbaccess.OTableContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDBCX_TABLES) +IMPLEMENT_SERVICE_INFO2(OTableContainer, "com.sun.star.sdb.dbaccess.OTableContainer", SERVICE_SDBCX_CONTAINER.ascii, SERVICE_SDBCX_TABLES.ascii) namespace { diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index 4f004e1e70bf..105c5df7cfee 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -90,7 +90,7 @@ OViewContainer::~OViewContainer() } // XServiceInfo -IMPLEMENT_SERVICE_INFO2(OViewContainer, "com.sun.star.sdb.dbaccess.OViewContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDBCX_TABLES) +IMPLEMENT_SERVICE_INFO2(OViewContainer, "com.sun.star.sdb.dbaccess.OViewContainer", SERVICE_SDBCX_CONTAINER.ascii, SERVICE_SDBCX_TABLES.ascii) ObjectType OViewContainer::createObject(const ::rtl::OUString& _rName) { diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 8e959d9cae65..2bb580a59cbb 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -326,11 +326,11 @@ void SAL_CALL OContentHelper::initialize( const Sequence< Any >& _aArguments ) t { m_xParentContainer.set(aValue.Value,UNO_QUERY); } - else if ( aValue.Name.equalsAscii(PROPERTY_NAME) ) + else if ( aValue.Name.equalsAsciiL(PROPERTY_NAME.ascii, PROPERTY_NAME.length) ) { aValue.Value >>= m_pImpl->m_aProps.aTitle; } - else if ( aValue.Name.equalsAscii(PROPERTY_PERSISTENT_NAME) ) + else if ( aValue.Name.equalsAsciiL(PROPERTY_PERSISTENT_NAME.ascii, PROPERTY_PERSISTENT_NAME.length) ) { aValue.Value >>= m_pImpl->m_aProps.sPersistentName; } diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx index 85c615de2181..9f421f401a6c 100644 --- a/dbaccess/source/core/dataaccess/documentcontainer.cxx +++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx @@ -320,11 +320,11 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments for(;pBegin != pEnd;++pBegin) { *pBegin >>= aValue; - if ( aValue.Name.equalsAscii(PROPERTY_NAME) ) + if ( aValue.Name.equalsAsciiL(PROPERTY_NAME.ascii, PROPERTY_NAME.length) ) { aValue.Value >>= sName; } - else if ( aValue.Name.equalsAscii(PROPERTY_EMBEDDEDOBJECT) ) + else if ( aValue.Name.equalsAsciiL(PROPERTY_EMBEDDEDOBJECT.ascii, PROPERTY_EMBEDDEDOBJECT.length) ) { xCopyFrom.set(aValue.Value,UNO_QUERY); } diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index f8393f17ebed..a6f3e73be15e 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -523,7 +523,7 @@ void SAL_CALL ODocumentDefinition::disposing() IMPLEMENT_TYPEPROVIDER3(ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base); IMPLEMENT_FORWARD_XINTERFACE3( ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base) -IMPLEMENT_SERVICE_INFO1(ODocumentDefinition,"com.sun.star.comp.dba.ODocumentDefinition",SERVICE_SDB_DOCUMENTDEFINITION) +IMPLEMENT_SERVICE_INFO1(ODocumentDefinition,"com.sun.star.comp.dba.ODocumentDefinition",SERVICE_SDB_DOCUMENTDEFINITION.ascii) void ODocumentDefinition::registerProperties() { diff --git a/dbaccess/source/inc/constasciistring.hxx b/dbaccess/source/inc/constasciistring.hxx index 2179e2d7ffdd..80ead8e75597 100644 --- a/dbaccess/source/inc/constasciistring.hxx +++ b/dbaccess/source/inc/constasciistring.hxx @@ -6,58 +6,14 @@ #error "don't include this file directly! use stringconstants.hrc instead!" #endif -// no namespaces. This file is included from several other files _within_ a namespace. - -//============================================================ -//= a helper for static ascii pseudo-unicode strings -//============================================================ -// string constants -struct ConstAsciiString -{ - const sal_Char* ascii; - sal_Int32 length; - - inline operator const ::rtl::OUString& () const; - inline operator const sal_Char* () const { return ascii; } - - inline ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength); - inline ~ConstAsciiString(); - -private: - mutable ::rtl::OUString* ustring; -}; -//------------------------------------------------------------ -inline ConstAsciiString::ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength) - :ascii(_pAsciiZeroTerminated) - ,length(_nLength) - ,ustring(NULL) -{ -} - -//------------------------------------------------------------ -inline ConstAsciiString::~ConstAsciiString() -{ - delete ustring; - ustring = NULL; -} - -//------------------------------------------------------------ -inline ConstAsciiString::operator const ::rtl::OUString& () const -{ - if (!ustring) - ustring = new ::rtl::OUString(ascii, length, RTL_TEXTENCODING_ASCII_US); - return *ustring; -} - -//============================================================ +// no namespaces. This file is included from several other files _within_ a namespace. #define DECLARE_CONSTASCII_USTRING( name ) \ extern const ConstAsciiString name #define IMPLEMENT_CONSTASCII_USTRING( name, string ) \ - const ConstAsciiString name(string, sizeof(string)-1) - + const ConstAsciiString name = {RTL_CONSTASCII_STRINGPARAM(string)} #endif // _DBASHARED_CONSTASCIISTRING_HXX_ diff --git a/dbaccess/source/inc/dbastrings.hrc b/dbaccess/source/inc/dbastrings.hrc index eb6b98d5bd8b..9a98721777df 100644 --- a/dbaccess/source/inc/dbastrings.hrc +++ b/dbaccess/source/inc/dbastrings.hrc @@ -27,9 +27,9 @@ #ifndef DBACCESS_SHARED_DBASTRINGS_HRC #define DBACCESS_SHARED_DBASTRINGS_HRC -#ifndef _RTL_USTRING_HXX_ #include <rtl/ustring.hxx> -#endif +#include <comphelper/string.hxx> +using comphelper::string::ConstAsciiString; namespace dbaccess { diff --git a/dbaccess/source/inc/dbustrings.hrc b/dbaccess/source/inc/dbustrings.hrc index aeef19d752dd..84e8c3021a4a 100644 --- a/dbaccess/source/inc/dbustrings.hrc +++ b/dbaccess/source/inc/dbustrings.hrc @@ -27,9 +27,9 @@ #ifndef DBACCESS_SHARED_DBUSTRINGS_HRC #define DBACCESS_SHARED_DBUSTRINGS_HRC -#ifndef _RTL_USTRING_HXX_ #include <rtl/ustring.hxx> -#endif +#include <comphelper/string.hxx> +using comphelper::string::ConstAsciiString; namespace dbaui { diff --git a/dbaccess/source/inc/sdbtstrings.hrc b/dbaccess/source/inc/sdbtstrings.hrc index c4837f52bce1..f14854a7f596 100644 --- a/dbaccess/source/inc/sdbtstrings.hrc +++ b/dbaccess/source/inc/sdbtstrings.hrc @@ -27,9 +27,9 @@ #ifndef DBACCESS_SHARED_SDBTSTRINGS_HRC #define DBACCESS_SHARED_SDBTSTRINGS_HRC -#ifndef _RTL_USTRING_HXX_ #include <rtl/ustring.hxx> -#endif +#include <comphelper/string.hxx> +using comphelper::string::ConstAsciiString; namespace sdbtools { diff --git a/dbaccess/source/inc/xmlstrings.hrc b/dbaccess/source/inc/xmlstrings.hrc index db5a729e2ea6..e1e891e31f7d 100644 --- a/dbaccess/source/inc/xmlstrings.hrc +++ b/dbaccess/source/inc/xmlstrings.hrc @@ -27,9 +27,9 @@ #ifndef DBACCESS_SHARED_XMLSTRINGS_HRC #define DBACCESS_SHARED_XMLSTRINGS_HRC -#ifndef _RTL_USTRING_HXX_ #include <rtl/ustring.hxx> -#endif +#include <comphelper/string.hxx> +using comphelper::string::ConstAsciiString; namespace dbaxml { diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index a3557049e853..0caddb29b98c 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -204,12 +204,12 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const :: { } } aImplementations[] = { - ServiceNameToImplName( URL_COMPONENT_FORMGRIDVIEW, "org.openoffice.comp.dbu.OFormGridView" ), - ServiceNameToImplName( URL_COMPONENT_DATASOURCEBROWSER, "org.openoffice.comp.dbu.ODatasourceBrowser" ), - ServiceNameToImplName( URL_COMPONENT_QUERYDESIGN, "org.openoffice.comp.dbu.OQueryDesign" ), - ServiceNameToImplName( URL_COMPONENT_TABLEDESIGN, "org.openoffice.comp.dbu.OTableDesign" ), - ServiceNameToImplName( URL_COMPONENT_RELATIONDESIGN, "org.openoffice.comp.dbu.ORelationDesign" ), - ServiceNameToImplName( URL_COMPONENT_VIEWDESIGN, "org.openoffice.comp.dbu.OViewDesign" ) + ServiceNameToImplName( URL_COMPONENT_FORMGRIDVIEW.ascii, "org.openoffice.comp.dbu.OFormGridView" ), + ServiceNameToImplName( URL_COMPONENT_DATASOURCEBROWSER.ascii, "org.openoffice.comp.dbu.ODatasourceBrowser" ), + ServiceNameToImplName( URL_COMPONENT_QUERYDESIGN.ascii, "org.openoffice.comp.dbu.OQueryDesign" ), + ServiceNameToImplName( URL_COMPONENT_TABLEDESIGN.ascii, "org.openoffice.comp.dbu.OTableDesign" ), + ServiceNameToImplName( URL_COMPONENT_RELATIONDESIGN.ascii, "org.openoffice.comp.dbu.ORelationDesign" ), + ServiceNameToImplName( URL_COMPONENT_VIEWDESIGN.ascii, "org.openoffice.comp.dbu.OViewDesign" ) }; INetURLObject aParser( rURL ); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 5e60e7ca24b0..ed2f8717ec7c 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -1162,18 +1162,18 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId // check if SQL92 name checking is enabled sal_Bool isSQL92CheckEnabled(const Reference<XConnection>& _xConnection) { - return ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_ENABLESQL92CHECK ); + return ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_ENABLESQL92CHECK.ascii ); } // ----------------------------------------------------------------------------- sal_Bool isAppendTableAliasEnabled(const Reference<XConnection>& _xConnection) { - return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_APPEND_TABLE_ALIAS ); + return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_APPEND_TABLE_ALIAS.ascii ); } // ----------------------------------------------------------------------------- sal_Bool generateAsBeforeTableAlias(const Reference<XConnection>& _xConnection) { - return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_AS_BEFORE_CORRELATION_NAME ); + return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_AS_BEFORE_CORRELATION_NAME.ascii ); } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 751145add512..d6a28725ec37 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -1055,7 +1055,7 @@ namespace aMulti.insert(::std::multimap<sal_Int32 , OTableWindow*>::value_type(aCountIter->second,aCountIter->first)); } - const sal_Bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE ); + const sal_Bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE.ascii ); ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aRIter = aMulti.rbegin(); ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aREnd = aMulti.rend(); for(;aRIter != aREnd;++aRIter) diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx index 16dec735db19..9c240e448712 100644 --- a/dbaccess/source/ui/uno/ColumnControl.cxx +++ b/dbaccess/source/ui/uno/ColumnControl.cxx @@ -52,7 +52,7 @@ OColumnControl::OColumnControl(const Reference<XMultiServiceFactory>& _rxFactory { } // ----------------------------------------------------------------------------- -IMPLEMENT_SERVICE_INFO2_STATIC(OColumnControl,SERVICE_CONTROLDEFAULT,"com.sun.star.awt.UnoControl","com.sun.star.sdb.ColumnDescriptorControl") +IMPLEMENT_SERVICE_INFO2_STATIC(OColumnControl,SERVICE_CONTROLDEFAULT.ascii,"com.sun.star.awt.UnoControl","com.sun.star.sdb.ColumnDescriptorControl") // ----------------------------------------------------------------------------- ::rtl::OUString OColumnControl::GetComponentServiceName() { diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx index 07902e808b81..4b583571bcc2 100644 --- a/dbaccess/source/ui/uno/ColumnPeer.cxx +++ b/dbaccess/source/ui/uno/ColumnPeer.cxx @@ -126,12 +126,12 @@ void OColumnPeer::setProperty( const ::rtl::OUString& _rPropertyName, const Any& { SolarMutexGuard aGuard; - if ( 0 == _rPropertyName.compareToAscii( PROPERTY_COLUMN ) ) + if (_rPropertyName.equalsAsciiL(PROPERTY_COLUMN.ascii, PROPERTY_COLUMN.length) ) { Reference<XPropertySet> xProp(Value,UNO_QUERY); setColumn(xProp); } - else if ( 0 == _rPropertyName.compareToAscii( PROPERTY_ACTIVE_CONNECTION ) ) + else if (_rPropertyName.equalsAsciiL(PROPERTY_ACTIVE_CONNECTION.ascii, PROPERTY_ACTIVE_CONNECTION.length) ) { Reference<XConnection> xCon(Value,UNO_QUERY); setConnection(xCon); @@ -144,11 +144,11 @@ Any OColumnPeer::getProperty( const ::rtl::OUString& _rPropertyName ) throw( Run { Any aProp; OFieldDescControl* pFieldControl = static_cast<OFieldDescControl*>( GetWindow() ); - if ( pFieldControl && 0 == _rPropertyName.compareToAscii( PROPERTY_COLUMN ) ) + if (pFieldControl && _rPropertyName.equalsAsciiL(PROPERTY_COLUMN.ascii, PROPERTY_COLUMN.length)) { aProp <<= m_xColumn; } - else if ( pFieldControl && 0 == _rPropertyName.compareToAscii( PROPERTY_ACTIVE_CONNECTION ) ) + else if (pFieldControl && _rPropertyName.equalsAsciiL(PROPERTY_ACTIVE_CONNECTION.ascii, PROPERTY_ACTIVE_CONNECTION.length)) { aProp <<= pFieldControl->getConnection(); } diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx index 90219f268d31..931862f97287 100644 --- a/dbaccess/source/ui/uno/unoDirectSql.cxx +++ b/dbaccess/source/ui/uno/unoDirectSql.cxx @@ -80,7 +80,7 @@ DBG_NAME(ODirectSQLDialog) IMPLEMENT_IMPLEMENTATION_ID( ODirectSQLDialog ) //--------------------------------------------------------------------- - IMPLEMENT_SERVICE_INFO1_STATIC( ODirectSQLDialog, "com.sun.star.comp.sdb.DirectSQLDialog", SERVICE_SDB_DIRECTSQLDIALOG ) + IMPLEMENT_SERVICE_INFO1_STATIC( ODirectSQLDialog, "com.sun.star.comp.sdb.DirectSQLDialog", SERVICE_SDB_DIRECTSQLDIALOG.ascii ) //--------------------------------------------------------------------- IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ODirectSQLDialog ) |