Kaydet (Commit) a1808e0d authored tarafından Marcos Paulo de Souza's avatar Marcos Paulo de Souza Kaydeden (comit) Olivier Hallot

Remove more STRINGPARAM macros form dbaccess

Change-Id: I283ccd03dc811dda2f10963f400cd517f42ea7b3
Reviewed-on: https://gerrit.libreoffice.org/1878Reviewed-by: 's avatarOlivier Hallot <olivier.hallot@alta.org.br>
Tested-by: 's avatarOlivier Hallot <olivier.hallot@alta.org.br>
üst 3d033a84
...@@ -204,10 +204,9 @@ ODatabaseContext::~ODatabaseContext() ...@@ -204,10 +204,9 @@ ODatabaseContext::~ODatabaseContext()
} }
// Helper // Helper
rtl::OUString ODatabaseContext::getImplementationName_static() throw( RuntimeException ) OUString ODatabaseContext::getImplementationName_static() throw( RuntimeException )
{ {
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.ODatabaseContext")); return OUString("com.sun.star.comp.dba.ODatabaseContext");
} }
Reference< XInterface > ODatabaseContext::Create(const Reference< XComponentContext >& _rxContext) Reference< XInterface > ODatabaseContext::Create(const Reference< XComponentContext >& _rxContext)
......
...@@ -53,21 +53,21 @@ namespace dbaccess ...@@ -53,21 +53,21 @@ namespace dbaccess
using ::com::sun::star::uno::XAggregation; using ::com::sun::star::uno::XAggregation;
/** === end UNO using === **/ /** === end UNO using === **/
static const ::rtl::OUString& getConfigurationRootPath() static const OUString& getConfigurationRootPath()
{ {
static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess/RegisteredNames")); static OUString s_sNodeName("org.openoffice.Office.DataAccess/RegisteredNames");
return s_sNodeName; return s_sNodeName;
} }
const ::rtl::OUString& getLocationNodeName() const OUString& getLocationNodeName()
{ {
static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("Location")); static OUString s_sNodeName("Location");
return s_sNodeName; return s_sNodeName;
} }
const ::rtl::OUString& getNameNodeName() const OUString& getNameNodeName()
{ {
static ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("Name")); static OUString s_sNodeName("Name");
return s_sNodeName; return s_sNodeName;
} }
......
...@@ -159,16 +159,16 @@ ODefinitionContainer::~ODefinitionContainer() ...@@ -159,16 +159,16 @@ ODefinitionContainer::~ODefinitionContainer()
IMPLEMENT_FORWARD_XINTERFACE2( ODefinitionContainer,OContentHelper,ODefinitionContainer_Base) IMPLEMENT_FORWARD_XINTERFACE2( ODefinitionContainer,OContentHelper,ODefinitionContainer_Base)
IMPLEMENT_TYPEPROVIDER2(ODefinitionContainer,OContentHelper,ODefinitionContainer_Base); IMPLEMENT_TYPEPROVIDER2(ODefinitionContainer,OContentHelper,ODefinitionContainer_Base);
// XServiceInfo // XServiceInfo
::rtl::OUString SAL_CALL ODefinitionContainer::getImplementationName( ) throw(RuntimeException) OUString SAL_CALL ODefinitionContainer::getImplementationName( ) throw(RuntimeException)
{ {
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ODefinitionContainer")); return OUString("com.sun.star.sdb.ODefinitionContainer");
} }
Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNames( ) throw(RuntimeException) Sequence< OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNames( ) throw(RuntimeException)
{ {
Sequence< ::rtl::OUString > aReturn(2); Sequence< OUString > aReturn(2);
aReturn.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.DefinitionContainer")); aReturn.getArray()[0] = "com.sun.star.sdb.DefinitionContainer";
aReturn.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Content")); aReturn.getArray()[1] = "com.sun.star.ucb.Content";
return aReturn; return aReturn;
} }
......
...@@ -733,7 +733,7 @@ void SAL_CALL ODocumentContainer::removeByName( const OUString& _rName ) throw(N ...@@ -733,7 +733,7 @@ void SAL_CALL ODocumentContainer::removeByName( const OUString& _rName ) throw(N
{ {
Command aCommand; Command aCommand;
aCommand.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("delete")); aCommand.Name = "delete";
xContent->execute(aCommand,xContent->createCommandIdentifier(),Reference< XCommandEnvironment >()); xContent->execute(aCommand,xContent->createCommandIdentifier(),Reference< XCommandEnvironment >());
} }
......
...@@ -86,12 +86,12 @@ OInterceptor::OInterceptor( ODocumentDefinition* _pContentHolder ) ...@@ -86,12 +86,12 @@ OInterceptor::OInterceptor( ODocumentDefinition* _pContentHolder )
OSL_ENSURE(DISPATCH_RELOAD < m_aInterceptedURL.getLength(),"Illegal size."); OSL_ENSURE(DISPATCH_RELOAD < m_aInterceptedURL.getLength(),"Illegal size.");
m_aInterceptedURL[DISPATCH_SAVEAS] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SaveAs")); m_aInterceptedURL[DISPATCH_SAVEAS] = ".uno:SaveAs";
m_aInterceptedURL[DISPATCH_SAVE] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Save")); m_aInterceptedURL[DISPATCH_SAVE] = ".uno:Save";
m_aInterceptedURL[DISPATCH_CLOSEDOC] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CloseDoc")); m_aInterceptedURL[DISPATCH_CLOSEDOC] = ".uno:CloseDoc";
m_aInterceptedURL[DISPATCH_CLOSEWIN] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CloseWin")); m_aInterceptedURL[DISPATCH_CLOSEWIN] = ".uno:CloseWin";
m_aInterceptedURL[DISPATCH_CLOSEFRAME] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CloseFrame")); m_aInterceptedURL[DISPATCH_CLOSEFRAME] = ".uno:CloseFrame";
m_aInterceptedURL[DISPATCH_RELOAD] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:Reload")); m_aInterceptedURL[DISPATCH_RELOAD] = ".uno:Reload";
} }
...@@ -159,12 +159,11 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyVal ...@@ -159,12 +159,11 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyVal
if ( nInd == aNewArgs.getLength() ) if ( nInd == aNewArgs.getLength() )
{ {
aNewArgs.realloc( nInd + 1 ); aNewArgs.realloc( nInd + 1 );
aNewArgs[nInd].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveTo")); aNewArgs[nInd].Name = "SaveTo";
aNewArgs[nInd].Value <<= sal_True; aNewArgs[nInd].Value <<= sal_True;
} }
Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch( Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(_URL, "_self", 0 );
_URL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0 );
if ( xDispatch.is() ) if ( xDispatch.is() )
xDispatch->dispatch( _URL, aNewArgs ); xDispatch->dispatch( _URL, aNewArgs );
} }
...@@ -191,8 +190,7 @@ IMPL_LINK( OInterceptor, OnDispatch, void*, _pDispatcher ) ...@@ -191,8 +190,7 @@ IMPL_LINK( OInterceptor, OnDispatch, void*, _pDispatcher )
{ {
if ( m_pContentHolder && m_pContentHolder->prepareClose() && m_xSlaveDispatchProvider.is() ) if ( m_pContentHolder && m_pContentHolder->prepareClose() && m_xSlaveDispatchProvider.is() )
{ {
Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch( Reference< XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch(pHelper->aURL, "_self", 0 );
pHelper->aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0 );
if ( xDispatch.is() ) if ( xDispatch.is() )
{ {
Reference< ::com::sun::star::document::XEventBroadcaster> xEvtB(m_pContentHolder->getComponent(),UNO_QUERY); Reference< ::com::sun::star::document::XEventBroadcaster> xEvtB(m_pContentHolder->getComponent(),UNO_QUERY);
...@@ -230,10 +228,10 @@ void SAL_CALL OInterceptor::addStatusListener( ...@@ -230,10 +228,10 @@ void SAL_CALL OInterceptor::addStatusListener(
{ {
FeatureStateEvent aStateEvent; FeatureStateEvent aStateEvent;
aStateEvent.FeatureURL.Complete = m_aInterceptedURL[DISPATCH_SAVEAS]; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[DISPATCH_SAVEAS];
aStateEvent.FeatureDescriptor = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveCopyTo")); aStateEvent.FeatureDescriptor = "SaveCopyTo";
aStateEvent.IsEnabled = sal_True; aStateEvent.IsEnabled = sal_True;
aStateEvent.Requery = sal_False; aStateEvent.Requery = sal_False;
aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($3)"))); aStateEvent.State <<= OUString("($3)");
Control->statusChanged(aStateEvent); Control->statusChanged(aStateEvent);
} }
...@@ -249,7 +247,7 @@ void SAL_CALL OInterceptor::addStatusListener( ...@@ -249,7 +247,7 @@ void SAL_CALL OInterceptor::addStatusListener(
{ // Save { // Save
FeatureStateEvent aStateEvent; FeatureStateEvent aStateEvent;
aStateEvent.FeatureURL.Complete = m_aInterceptedURL[DISPATCH_SAVE]; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[DISPATCH_SAVE];
aStateEvent.FeatureDescriptor = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Update")); aStateEvent.FeatureDescriptor = "Update";
aStateEvent.IsEnabled = m_pContentHolder != NULL && m_pContentHolder->isModified(); aStateEvent.IsEnabled = m_pContentHolder != NULL && m_pContentHolder->isModified();
aStateEvent.Requery = sal_False; aStateEvent.Requery = sal_False;
...@@ -275,8 +273,7 @@ void SAL_CALL OInterceptor::addStatusListener( ...@@ -275,8 +273,7 @@ void SAL_CALL OInterceptor::addStatusListener(
{ // Close and return { // Close and return
FeatureStateEvent aStateEvent; FeatureStateEvent aStateEvent;
aStateEvent.FeatureURL.Complete = m_aInterceptedURL[i]; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[i];
aStateEvent.FeatureDescriptor = rtl::OUString( aStateEvent.FeatureDescriptor = "Close and Return";
RTL_CONSTASCII_USTRINGPARAM("Close and Return"));
aStateEvent.IsEnabled = sal_True; aStateEvent.IsEnabled = sal_True;
aStateEvent.Requery = sal_False; aStateEvent.Requery = sal_False;
Control->statusChanged(aStateEvent); Control->statusChanged(aStateEvent);
...@@ -409,14 +406,14 @@ void SAL_CALL OInterceptor::setMasterDispatchProvider( ...@@ -409,14 +406,14 @@ void SAL_CALL OInterceptor::setMasterDispatchProvider(
void SAL_CALL OInterceptor::notifyEvent( const ::com::sun::star::document::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException) void SAL_CALL OInterceptor::notifyEvent( const ::com::sun::star::document::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException)
{ {
osl::ResettableMutexGuard _rGuard(m_aMutex); osl::ResettableMutexGuard _rGuard(m_aMutex);
if ( m_pStatCL && Event.EventName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnModifyChanged")) ) if ( m_pStatCL && Event.EventName == "OnModifyChanged" )
{ {
OInterfaceContainerHelper* pListener = m_pStatCL->getContainer(m_aInterceptedURL[DISPATCH_SAVE]); OInterfaceContainerHelper* pListener = m_pStatCL->getContainer(m_aInterceptedURL[DISPATCH_SAVE]);
if ( pListener ) if ( pListener )
{ {
FeatureStateEvent aEvt; FeatureStateEvent aEvt;
aEvt.FeatureURL.Complete = m_aInterceptedURL[DISPATCH_SAVE]; aEvt.FeatureURL.Complete = m_aInterceptedURL[DISPATCH_SAVE];
aEvt.FeatureDescriptor = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Update")); aEvt.FeatureDescriptor = "Update";
Reference<XModifiable> xModel(Event.Source,UNO_QUERY); Reference<XModifiable> xModel(Event.Source,UNO_QUERY);
aEvt.IsEnabled = xModel.is() && xModel->isModified(); aEvt.IsEnabled = xModel.is() && xModel->isModified();
aEvt.Requery = sal_False; aEvt.Requery = sal_False;
......
...@@ -141,11 +141,10 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex ) ...@@ -141,11 +141,10 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
if ( getResult( nIndex ) ) if ( getResult( nIndex ) )
{ {
rtl::OUString aId OUString aId = m_pImpl->m_xContent->getIdentifier()->getContentIdentifier();
= m_pImpl->m_xContent->getIdentifier()->getContentIdentifier();
if ( !aId.isEmpty() ) if ( !aId.isEmpty() )
aId += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); aId += "/";
aId += m_pImpl->m_aResults[ nIndex ]->rData.aTitle; aId += m_pImpl->m_aResults[ nIndex ]->rData.aTitle;
......
...@@ -301,24 +301,24 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const ::rtl::OUString& _sURL ) cons ...@@ -301,24 +301,24 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const ::rtl::OUString& _sURL ) cons
return aWildCard.Matches(_sURL); return aWildCard.Matches(_sURL);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
::rtl::OUString ODsnTypeCollection::getEmbeddedDatabase() const OUString ODsnTypeCollection::getEmbeddedDatabase() const
{ {
::rtl::OUString sEmbeddedDatabaseURL; OUString sEmbeddedDatabaseURL;
static const ::rtl::OUString s_sNodeName(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.DataAccess")); ///Installed static const OUString s_sNodeName("org.openoffice.Office.DataAccess"); ///Installed
const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY); const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
if ( aInstalled.isValid() ) if ( aInstalled.isValid() )
{ {
if ( aInstalled.hasByName("EmbeddedDatabases/DefaultEmbeddedDatabase/Value") ) if ( aInstalled.hasByName("EmbeddedDatabases/DefaultEmbeddedDatabase/Value") )
{ {
static const ::rtl::OUString s_sValue(RTL_CONSTASCII_USTRINGPARAM("EmbeddedDatabases/DefaultEmbeddedDatabase/Value")); static const OUString s_sValue("EmbeddedDatabases/DefaultEmbeddedDatabase/Value");
aInstalled.getNodeValue(s_sValue) >>= sEmbeddedDatabaseURL; aInstalled.getNodeValue(s_sValue) >>= sEmbeddedDatabaseURL;
if ( !sEmbeddedDatabaseURL.isEmpty() ) if ( !sEmbeddedDatabaseURL.isEmpty() )
aInstalled.getNodeValue(s_sValue + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")) + sEmbeddedDatabaseURL + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/URL"))) >>= sEmbeddedDatabaseURL; aInstalled.getNodeValue(s_sValue + "/" + sEmbeddedDatabaseURL + "/URL") >>= sEmbeddedDatabaseURL;
} }
} }
if ( sEmbeddedDatabaseURL.isEmpty() ) if ( sEmbeddedDatabaseURL.isEmpty() )
sEmbeddedDatabaseURL = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:embedded:hsqldb")); sEmbeddedDatabaseURL = "sdbc:embedded:hsqldb";
return sEmbeddedDatabaseURL; return sEmbeddedDatabaseURL;
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
......
...@@ -131,8 +131,7 @@ namespace dbaccess ...@@ -131,8 +131,7 @@ namespace dbaccess
try try
{ {
Reference< XPropertySet > xStorageProps( _rxStorage, UNO_QUERY_THROW ); Reference< XPropertySet > xStorageProps( _rxStorage, UNO_QUERY_THROW );
xStorageProps->getPropertyValue( xStorageProps->getPropertyValue( "OpenMode" ) >>= nMode;
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenMode" ) ) ) >>= nMode;
} }
catch( const Exception& ) catch( const Exception& )
{ {
......
...@@ -115,27 +115,24 @@ namespace dbaccess ...@@ -115,27 +115,24 @@ namespace dbaccess
return true; return true;
} }
// ......................................................................... static const OUString& lcl_getRecoveryDataSubStorageName()
static const ::rtl::OUString& lcl_getRecoveryDataSubStorageName()
{ {
static const ::rtl::OUString s_sRecDataStorName( RTL_CONSTASCII_USTRINGPARAM( "recovery" ) ); static const OUString s_sRecDataStorName( "recovery" );
return s_sRecDataStorName; return s_sRecDataStorName;
} }
// .........................................................................
static const ::rtl::OUString& lcl_getObjectMapStreamName() static const OUString& lcl_getObjectMapStreamName()
{ {
static const ::rtl::OUString s_sObjectMapStreamName( RTL_CONSTASCII_USTRINGPARAM( "storage-component-map.ini" ) ); static const OUString s_sObjectMapStreamName( "storage-component-map.ini" );
return s_sObjectMapStreamName; return s_sObjectMapStreamName;
} }
// ......................................................................... static const OUString& lcl_getMapStreamEncodingName()
static const ::rtl::OUString& lcl_getMapStreamEncodingName()
{ {
static const ::rtl::OUString s_sMapStreamEncodingName( RTL_CONSTASCII_USTRINGPARAM( "UTF-8" ) ); static const OUString s_sMapStreamEncodingName( "UTF-8" );
return s_sMapStreamEncodingName; return s_sMapStreamEncodingName;
} }
// .........................................................................
static void lcl_writeObjectMap_throw( const ::comphelper::ComponentContext& i_rContext, const Reference< XStorage >& i_rStorage, static void lcl_writeObjectMap_throw( const ::comphelper::ComponentContext& i_rContext, const Reference< XStorage >& i_rStorage,
const MapStringToCompDesc& i_mapStorageToCompDesc ) const MapStringToCompDesc& i_mapStorageToCompDesc )
{ {
...@@ -145,7 +142,7 @@ namespace dbaccess ...@@ -145,7 +142,7 @@ namespace dbaccess
StorageTextOutputStream aTextOutput( i_rContext, i_rStorage, lcl_getObjectMapStreamName() ); StorageTextOutputStream aTextOutput( i_rContext, i_rStorage, lcl_getObjectMapStreamName() );
aTextOutput.writeLine( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "[storages]" ) ) ); aTextOutput.writeLine( "[storages]" );
for ( MapStringToCompDesc::const_iterator stor = i_mapStorageToCompDesc.begin(); for ( MapStringToCompDesc::const_iterator stor = i_mapStorageToCompDesc.begin();
stor != i_mapStorageToCompDesc.end(); stor != i_mapStorageToCompDesc.end();
......
...@@ -57,13 +57,11 @@ namespace dbaccess ...@@ -57,13 +57,11 @@ namespace dbaccess
{ {
} }
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL SettingsImport::acquire() oslInterlockedCount SAL_CALL SettingsImport::acquire()
{ {
return osl_atomic_increment( &m_refCount ); return osl_atomic_increment( &m_refCount );
} }
//--------------------------------------------------------------------
oslInterlockedCount SAL_CALL SettingsImport::release() oslInterlockedCount SAL_CALL SettingsImport::release()
{ {
oslInterlockedCount newCount = osl_atomic_decrement( &m_refCount ); oslInterlockedCount newCount = osl_atomic_decrement( &m_refCount );
...@@ -72,29 +70,25 @@ namespace dbaccess ...@@ -72,29 +70,25 @@ namespace dbaccess
return newCount; return newCount;
} }
//--------------------------------------------------------------------
void SettingsImport::startElement( const Reference< XAttributeList >& i_rAttributes ) void SettingsImport::startElement( const Reference< XAttributeList >& i_rAttributes )
{ {
// find the name of the setting // find the name of the setting
if ( i_rAttributes.is() ) if ( i_rAttributes.is() )
{ {
m_sItemName = i_rAttributes->getValueByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "config:name" ) ) ); m_sItemName = i_rAttributes->getValueByName( "config:name" );
m_sItemType = i_rAttributes->getValueByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "config:type" ) ) ); m_sItemType = i_rAttributes->getValueByName( "config:type" );
} }
} }
//--------------------------------------------------------------------
void SettingsImport::endElement() void SettingsImport::endElement()
{ {
} }
//--------------------------------------------------------------------
void SettingsImport::characters( const ::rtl::OUString& i_rCharacters ) void SettingsImport::characters( const ::rtl::OUString& i_rCharacters )
{ {
m_aCharacters.append( i_rCharacters ); m_aCharacters.append( i_rCharacters );
} }
//--------------------------------------------------------------------
void SettingsImport::split( const ::rtl::OUString& i_rElementName, ::rtl::OUString& o_rNamespace, ::rtl::OUString& o_rLocalName ) void SettingsImport::split( const ::rtl::OUString& i_rElementName, ::rtl::OUString& o_rNamespace, ::rtl::OUString& o_rLocalName )
{ {
o_rNamespace = ::rtl::OUString(); o_rNamespace = ::rtl::OUString();
......
...@@ -62,9 +62,9 @@ namespace dbaccess ...@@ -62,9 +62,9 @@ namespace dbaccess
namespace namespace
{ {
//-------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------
static const ::rtl::OUString& lcl_getTextStreamEncodingName() static const OUString& lcl_getTextStreamEncodingName()
{ {
static const ::rtl::OUString s_sMapStreamEncodingName( RTL_CONSTASCII_USTRINGPARAM( "UTF-8" ) ); static const OUString s_sMapStreamEncodingName( "UTF-8" );
return s_sMapStreamEncodingName; return s_sMapStreamEncodingName;
} }
......
...@@ -88,7 +88,7 @@ namespace dbaccess ...@@ -88,7 +88,7 @@ namespace dbaccess
if ( i_rData.xDocDefCommands.is() ) if ( i_rData.xDocDefCommands.is() )
{ {
Command aCommandOpen; Command aCommandOpen;
aCommandOpen.Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "show" ) ); aCommandOpen.Name = "show";
const sal_Int32 nCommandIdentifier = i_rData.xDocDefCommands->createCommandIdentifier(); const sal_Int32 nCommandIdentifier = i_rData.xDocDefCommands->createCommandIdentifier();
i_rData.xDocDefCommands->execute( aCommandOpen, nCommandIdentifier, NULL ); i_rData.xDocDefCommands->execute( aCommandOpen, nCommandIdentifier, NULL );
......
...@@ -90,10 +90,10 @@ namespace dbaccess ...@@ -90,10 +90,10 @@ namespace dbaccess
// ......................................................................... // .........................................................................
static const ::rtl::OUString& lcl_getComponentStorageBaseName( const SubComponentType i_eType ) static const ::rtl::OUString& lcl_getComponentStorageBaseName( const SubComponentType i_eType )
{ {
static const ::rtl::OUString s_sFormBaseName( RTL_CONSTASCII_USTRINGPARAM( "form" ) ); static const OUString s_sFormBaseName( "form" );
static const ::rtl::OUString s_sReportBaseName( RTL_CONSTASCII_USTRINGPARAM( "report" ) ); static const OUString s_sReportBaseName( "report" );
static const ::rtl::OUString s_sTableBaseName( RTL_CONSTASCII_USTRINGPARAM( "table" ) ); static const OUString s_sTableBaseName( "table" );
static const ::rtl::OUString s_sQueryBaseName( RTL_CONSTASCII_USTRINGPARAM( "query" ) ); static const OUString s_sQueryBaseName( "query" );
switch ( i_eType ) switch ( i_eType )
{ {
...@@ -176,17 +176,15 @@ namespace dbaccess ...@@ -176,17 +176,15 @@ namespace dbaccess
return xCommandProcessor; return xCommandProcessor;
} }
// ......................................................................... static const OUString& lcl_getSettingsStreamName()
static const ::rtl::OUString& lcl_getSettingsStreamName()
{ {
static const ::rtl::OUString s_sStatementStreamName( RTL_CONSTASCII_USTRINGPARAM( "settings.xml" ) ); static const OUString s_sStatementStreamName( "settings.xml" );
return s_sStatementStreamName; return s_sStatementStreamName;
} }
// ......................................................................... static const OUString& lcl_getCurrentQueryDesignName()
static const ::rtl::OUString& lcl_getCurrentQueryDesignName()
{ {
static const ::rtl::OUString s_sQuerySettingsName( RTL_CONSTASCII_USTRINGPARAM( "ooo:current-query-design" ) ); static const OUString s_sQuerySettingsName( "ooo:current-query-design" );
return s_sQuerySettingsName; return s_sQuerySettingsName;
} }
} }
...@@ -249,7 +247,7 @@ namespace dbaccess ...@@ -249,7 +247,7 @@ namespace dbaccess
void SettingsExportContext::StartElement( enum ::xmloff::token::XMLTokenEnum i_eName, const sal_Bool i_bIgnoreWhitespace ) void SettingsExportContext::StartElement( enum ::xmloff::token::XMLTokenEnum i_eName, const sal_Bool i_bIgnoreWhitespace )
{ {
if ( i_bIgnoreWhitespace ) if ( i_bIgnoreWhitespace )
m_rDelegator.ignorableWhitespace( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ) ); m_rDelegator.ignorableWhitespace( " " );
m_rDelegator.startElement( impl_prefix( i_eName ) ); m_rDelegator.startElement( impl_prefix( i_eName ) );
} }
...@@ -258,7 +256,7 @@ namespace dbaccess ...@@ -258,7 +256,7 @@ namespace dbaccess
void SettingsExportContext::EndElement( const sal_Bool i_bIgnoreWhitespace ) void SettingsExportContext::EndElement( const sal_Bool i_bIgnoreWhitespace )
{ {
if ( i_bIgnoreWhitespace ) if ( i_bIgnoreWhitespace )
m_rDelegator.ignorableWhitespace( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ) ); m_rDelegator.ignorableWhitespace( " " );
m_rDelegator.endElement(); m_rDelegator.endElement();
} }
...@@ -398,11 +396,11 @@ namespace dbaccess ...@@ -398,11 +396,11 @@ namespace dbaccess
//-------------------------------------------------------------------- //--------------------------------------------------------------------
const ::rtl::OUString SubComponentRecovery::getComponentsStorageName( const SubComponentType i_eType ) const ::rtl::OUString SubComponentRecovery::getComponentsStorageName( const SubComponentType i_eType )
{ {
static const ::rtl::OUString s_sFormsStorageName( RTL_CONSTASCII_USTRINGPARAM( "forms" ) ); static const OUString s_sFormsStorageName( "forms" );
static const ::rtl::OUString s_sReportsStorageName( RTL_CONSTASCII_USTRINGPARAM( "reports" ) ); static const OUString s_sReportsStorageName( "reports" );
static const ::rtl::OUString s_sTablesStorageName( RTL_CONSTASCII_USTRINGPARAM( "tables" ) ); static const OUString s_sTablesStorageName( "tables" );
static const ::rtl::OUString s_sQueriesStorageName( RTL_CONSTASCII_USTRINGPARAM( "queries" ) ); static const OUString s_sQueriesStorageName( "queries" );
static const ::rtl::OUString s_sRelationsStorageName( RTL_CONSTASCII_USTRINGPARAM( "relations" ) ); static const OUString s_sRelationsStorageName( "relations" );
switch ( i_eType ) switch ( i_eType )
{ {
...@@ -487,11 +485,11 @@ namespace dbaccess ...@@ -487,11 +485,11 @@ namespace dbaccess
switch ( m_eType ) switch ( m_eType )
{ {
case TABLE: case TABLE:
m_aCompDesc.bForEditing = sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.TableDesign" ) ); m_aCompDesc.bForEditing = sModuleIdentifier == "com.sun.star.sdb.TableDesign";
break; break;
case QUERY: case QUERY:
m_aCompDesc.bForEditing = sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.QueryDesign" ) ); m_aCompDesc.bForEditing = sModuleIdentifier == "com.sun.star.sdb.QueryDesign";
break; break;
case REPORT: case REPORT:
...@@ -534,15 +532,15 @@ namespace dbaccess ...@@ -534,15 +532,15 @@ namespace dbaccess
// the latter is updated only upon successful save of the design) // the latter is updated only upon successful save of the design)
Reference< XPropertySet > xDesignerProps( m_xComponent, UNO_QUERY_THROW ); Reference< XPropertySet > xDesignerProps( m_xComponent, UNO_QUERY_THROW );
Sequence< PropertyValue > aCurrentQueryDesign; Sequence< PropertyValue > aCurrentQueryDesign;
OSL_VERIFY( xDesignerProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CurrentQueryDesign" ) ) ) >>= aCurrentQueryDesign ); OSL_VERIFY( xDesignerProps->getPropertyValue( "CurrentQueryDesign" ) >>= aCurrentQueryDesign );
// write the query design // write the query design
StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, lcl_getSettingsStreamName() ); StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, lcl_getSettingsStreamName() );
SettingsExportContext aSettingsExportContext( m_rContext, aDesignOutput ); SettingsExportContext aSettingsExportContext( m_rContext, aDesignOutput );
const ::rtl::OUString sWhitespace( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ) ); const OUString sWhitespace( " " );
aDesignOutput.startElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "office:settings" ) ) ); aDesignOutput.startElement( "office:settings" );
aDesignOutput.ignorableWhitespace( sWhitespace ); aDesignOutput.ignorableWhitespace( sWhitespace );
XMLSettingsExportHelper aSettingsExporter( aSettingsExportContext ); XMLSettingsExportHelper aSettingsExporter( aSettingsExportContext );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment