diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2012-12-30 13:07:28 -0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-01-03 10:07:39 +0100 |
commit | c40cd8a4f203a4f817a77ab850e5027f8bae9b91 (patch) | |
tree | ee6c7cc0ca9fc79570898f31ff5b96dfc3b8d31a /basic/source | |
parent | 329f3cd02546dfe58bf00f6ad3b71bc84a8d4320 (diff) |
Remove all occurences of RTL_* and ::rtl prefix from basic
This is a big commit, so thanks for your time reviewing this :)
Conflicts:
basic/source/sbx/sbxscan.cxx
Change-Id: Ib9bc710b87475b5695764557321e5dcef25e5933
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'basic/source')
49 files changed, 528 insertions, 542 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 7175fe93ebe3..2d281dc3ab64 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -291,14 +291,14 @@ namespace basic OUString aAppBasicDir( aPathCFG.GetBasicPath() ); if ( aAppBasicDir.isEmpty() ) { - aPathCFG.SetBasicPath(rtl::OUString("$(prog)")); + aPathCFG.SetBasicPath(OUString("$(prog)")); } // soffice.new search only in user dir => first dir OUString aAppFirstBasicDir = aAppBasicDir.getToken(1, ';'); // Create basic and load it // AppBasicDir is now a PATH - INetURLObject aAppBasic( SvtPathOptions().SubstituteVariable(rtl::OUString("$(progurl)")) ); + INetURLObject aAppBasic( SvtPathOptions().SubstituteVariable(OUString("$(progurl)")) ); aAppBasic.insertName( Application::GetAppName() ); BasicManager* pBasicManager = new BasicManager( new StarBASIC, &aAppBasicDir ); @@ -308,8 +308,8 @@ namespace basic OUString aFileName( aAppBasic.getName() ); aAppBasic = INetURLObject( aAppBasicDir.getToken(1, ';') ); DBG_ASSERT(aAppBasic.GetProtocol() != INET_PROT_NOT_VALID, - rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM("Invalid URL: \"")). - append(rtl::OUStringToOString(aAppBasicDir, + OStringBuffer("Invalid URL: \""). + append(OUStringToOString(aAppBasicDir, osl_getThreadTextEncoding())). append('"').getStr() ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 14ffe0902826..ec9c9d6be22c 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -1652,7 +1652,7 @@ uno::Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const if ( !pStandardLib ) return aOldValue; - OUString sVarName( ::rtl::OUString::createFromAscii( _pAsciiName ) ); + OUString sVarName( OUString::createFromAscii( _pAsciiName ) ); // obtain the old value SbxVariable* pVariable = pStandardLib->Find( sVarName, SbxCLASS_OBJECT ); @@ -1988,7 +1988,7 @@ uno::Any ModuleContainer_Impl::getByName( const OUString& aName ) if( !pMod ) throw container::NoSuchElementException(); uno::Reference< script::XStarBasicModuleInfo > xMod = (XStarBasicModuleInfo*)new ModuleInfo_Impl - ( aName, ::rtl::OUString::createFromAscii( szScriptLanguage ), pMod->GetSource32() ); + ( aName, OUString::createFromAscii( szScriptLanguage ), pMod->GetSource32() ); uno::Any aRetAny; aRetAny <<= xMod; return aRetAny; diff --git a/basic/source/basmgr/vbahelper.cxx b/basic/source/basmgr/vbahelper.cxx index d1c34e4025c8..8f870bb143d4 100644 --- a/basic/source/basmgr/vbahelper.cxx +++ b/basic/source/basmgr/vbahelper.cxx @@ -69,7 +69,7 @@ DocumentsEnumeration::DocumentsEnumeration( const uno::Reference< frame::XModel try { uno::Reference< frame::XModuleManager2 > xModuleManager( lclCreateModuleManager() ); - ::rtl::OUString aIdentifier = xModuleManager->identify( rxModel ); + OUString aIdentifier = xModuleManager->identify( rxModel ); uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( ::comphelper::getProcessComponentContext() ); uno::Reference< container::XEnumerationAccess > xComponentsEA( xDesktop->getComponents(), uno::UNO_SET_THROW ); uno::Reference< container::XEnumeration > xEnumeration( xComponentsEA->createEnumeration(), uno::UNO_SET_THROW ); @@ -173,7 +173,7 @@ void lclIterateDocuments( ModifyDocumentFunc pModifyDocumentFunc, const uno::Ref struct CurrDirPool { ::osl::Mutex maMutex; - ::std::map< ::rtl::OUString, ::rtl::OUString > maCurrDirs; + ::std::map< OUString, OUString > maCurrDirs; }; struct StaticCurrDirPool : public ::rtl::Static< CurrDirPool, StaticCurrDirPool > {}; @@ -196,7 +196,7 @@ void enableContainerWindowsOfAllDocuments( const uno::Reference< frame::XModel > // ============================================================================ -void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, const ::rtl::OUString& rPath ) +void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, const OUString& rPath ) { if( !rPath.isEmpty() ) { @@ -205,7 +205,7 @@ void registerCurrentDirectory( const uno::Reference< frame::XModel >& rxModel, c try { uno::Reference< frame::XModuleManager2 > xModuleManager( lclCreateModuleManager() ); - ::rtl::OUString aIdentifier = xModuleManager->identify( rxModel ); + OUString aIdentifier = xModuleManager->identify( rxModel ); if( !aIdentifier.isEmpty() ) rPool.maCurrDirs[ aIdentifier ] = rPath; } diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index 557295769fda..19e9cb87d20e 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -31,9 +31,9 @@ typedef ::cppu::WeakImplHelper2< vba::XErrObject, script::XDefaultProperty > Err class ErrObject : public ErrObjectImpl_BASE { - rtl::OUString m_sHelpFile; - rtl::OUString m_sSource; - rtl::OUString m_sDescription; + OUString m_sHelpFile; + OUString m_sSource; + OUString m_sDescription; sal_Int32 m_nNumber; sal_Int32 m_nHelpContext; @@ -45,18 +45,18 @@ public: virtual void SAL_CALL setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException); virtual ::sal_Int32 SAL_CALL getHelpContext() throw (uno::RuntimeException); virtual void SAL_CALL setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getHelpFile() throw (uno::RuntimeException); - virtual void SAL_CALL setHelpFile( const ::rtl::OUString& _helpfile ) throw (uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getDescription() throw (uno::RuntimeException); - virtual void SAL_CALL setDescription( const ::rtl::OUString& _description ) throw (uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getSource() throw (uno::RuntimeException); - virtual void SAL_CALL setSource( const ::rtl::OUString& _source ) throw (uno::RuntimeException); + virtual OUString SAL_CALL getHelpFile() throw (uno::RuntimeException); + virtual void SAL_CALL setHelpFile( const OUString& _helpfile ) throw (uno::RuntimeException); + virtual OUString SAL_CALL getDescription() throw (uno::RuntimeException); + virtual void SAL_CALL setDescription( const OUString& _description ) throw (uno::RuntimeException); + virtual OUString SAL_CALL getSource() throw (uno::RuntimeException); + virtual void SAL_CALL setSource( const OUString& _source ) throw (uno::RuntimeException); // Methods virtual void SAL_CALL Clear( ) throw (uno::RuntimeException); virtual void SAL_CALL Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException); // XDefaultProperty - virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException); + virtual OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException); // Helper method void setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, @@ -82,7 +82,7 @@ void SAL_CALL ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException) { GetSbData()->pInst->setErrorVB( _number, String() ); - ::rtl::OUString _description = GetSbData()->pInst->GetErrorMsg(); + OUString _description = GetSbData()->pInst->GetErrorMsg(); setData( uno::makeAny( _number ), uno::Any(), uno::makeAny( _description ), uno::Any(), uno::Any() ); } @@ -97,38 +97,38 @@ ErrObject::setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeExcepti m_nHelpContext = _helpcontext; } -::rtl::OUString SAL_CALL +OUString SAL_CALL ErrObject::getHelpFile() throw (uno::RuntimeException) { return m_sHelpFile; } void SAL_CALL -ErrObject::setHelpFile( const ::rtl::OUString& _helpfile ) throw (uno::RuntimeException) +ErrObject::setHelpFile( const OUString& _helpfile ) throw (uno::RuntimeException) { m_sHelpFile = _helpfile; } -::rtl::OUString SAL_CALL +OUString SAL_CALL ErrObject::getDescription() throw (uno::RuntimeException) { return m_sDescription; } void SAL_CALL -ErrObject::setDescription( const ::rtl::OUString& _description ) throw (uno::RuntimeException) +ErrObject::setDescription( const OUString& _description ) throw (uno::RuntimeException) { m_sDescription = _description; } -::rtl::OUString SAL_CALL +OUString SAL_CALL ErrObject::getSource() throw (uno::RuntimeException) { return m_sSource; } void SAL_CALL -ErrObject::setSource( const ::rtl::OUString& _source ) throw (uno::RuntimeException) +ErrObject::setSource( const OUString& _source ) throw (uno::RuntimeException) { m_sSource = _source; } @@ -137,7 +137,7 @@ ErrObject::setSource( const ::rtl::OUString& _source ) throw (uno::RuntimeExcept void SAL_CALL ErrObject::Clear( ) throw (uno::RuntimeException) { - m_sHelpFile = rtl::OUString(); + m_sHelpFile = OUString(); m_sSource = m_sHelpFile; m_sDescription = m_sSource; m_nNumber = 0; @@ -153,10 +153,10 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any } // XDefaultProperty -::rtl::OUString SAL_CALL +OUString SAL_CALL ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException) { - static rtl::OUString sDfltPropName( "Number" ); + static OUString sDfltPropName( "Number" ); return sDfltPropName; } @@ -164,7 +164,7 @@ void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const u throw (uno::RuntimeException) { if ( !Number.hasValue() ) - throw uno::RuntimeException( rtl::OUString("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException( OUString("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); Number >>= m_nNumber; Description >>= m_sDescription; Source >>= m_sSource; diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index d3da40a5a4a6..7eb79f3650f0 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -80,7 +80,7 @@ using namespace ::osl; void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Reference< frame::XModel >& xModel ) { OSL_TRACE("SFURL_firing_impl() processing script url %s", - ::rtl::OUStringToOString( aScriptEvent.ScriptCode, + OUStringToOString( aScriptEvent.ScriptCode, RTL_TEXTENCODING_ASCII_US ).pData->buffer ); try { @@ -137,13 +137,13 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, Any* pRet, const Refere catch ( const RuntimeException& re ) { OSL_TRACE("SFURL_firing_impl() Caught RuntimeException reason %s.", - ::rtl::OUStringToOString( re.Message, + OUStringToOString( re.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer ); } catch ( const Exception& e ) { OSL_TRACE("SFURL_firing_impl() Caught Exception reason %s.", - ::rtl::OUStringToOString( e.Message, + OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).pData->buffer ); } @@ -206,7 +206,7 @@ void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any if( comphelper::string::getTokenCount(aMacro, '.') == 3 ) { sal_Int32 nLast = 0; - ::rtl::OUString aFullLibName = aMacro.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast ); + OUString aFullLibName = aMacro.getToken( (sal_Int32)0, (sal_Unicode)'.', nLast ); sal_Int32 nIndex = aFullLibName.indexOf( (sal_Unicode)':' ); if (nIndex >= 0) @@ -343,7 +343,7 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic ) { Any aRetDlgLibAny; - SbxVariable* pDlgLibContVar = pBasic->Find(rtl::OUString("DialogLibraries"), SbxCLASS_OBJECT); + SbxVariable* pDlgLibContVar = pBasic->Find(OUString("DialogLibraries"), SbxCLASS_OBJECT); if( pDlgLibContVar && pDlgLibContVar->ISA(SbUnoObject) ) { SbUnoObject* pDlgLibContUnoObj = (SbUnoObject*)(SbxBase*)pDlgLibContVar; @@ -353,8 +353,8 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic ) OSL_ENSURE( xDlgLibContNameAccess.is(), "implFindDialogLibForDialog: no lib container for the given dialog!" ); if( xDlgLibContNameAccess.is() ) { - Sequence< ::rtl::OUString > aLibNames = xDlgLibContNameAccess->getElementNames(); - const ::rtl::OUString* pLibNames = aLibNames.getConstArray(); + Sequence< OUString > aLibNames = xDlgLibContNameAccess->getElementNames(); + const OUString* pLibNames = aLibNames.getConstArray(); sal_Int32 nLibNameCount = aLibNames.getLength(); for( sal_Int32 iLib = 0 ; iLib < nLibNameCount ; iLib++ ) @@ -369,8 +369,8 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic ) OSL_ENSURE( xDlgLibNameAccess.is(), "implFindDialogLibForDialog: invalid dialog lib!" ); if( xDlgLibNameAccess.is() ) { - Sequence< ::rtl::OUString > aDlgNames = xDlgLibNameAccess->getElementNames(); - const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray(); + Sequence< OUString > aDlgNames = xDlgLibNameAccess->getElementNames(); + const OUString* pDlgNames = aDlgNames.getConstArray(); sal_Int32 nDlgNameCount = aDlgNames.getLength(); for( sal_Int32 iDlg = 0 ; iDlg < nDlgNameCount ; iDlg++ ) @@ -460,7 +460,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrit // Create new uno dialog Reference< XNameContainer > xDialogModel( xMSF->createInstance( - ::rtl::OUString("com.sun.star.awt.UnoControlDialogModel")), UNO_QUERY ); + OUString("com.sun.star.awt.UnoControlDialogModel")), UNO_QUERY ); if( !xDialogModel.is() ) { return; diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx index fe08435e3b45..bbde71325960 100644 --- a/basic/source/classes/propacc.cxx +++ b/basic/source/classes/propacc.cxx @@ -52,11 +52,11 @@ int CDECL SbCompare_PropertyValues_Impl( const void *arg1, const void *arg2 ) struct SbCompare_UString_PropertyValue_Impl { - bool operator() (const ::rtl::OUString& lhs, PropertyValue const & rhs) + bool operator() (const OUString& lhs, PropertyValue const & rhs) { return lhs.compareTo(rhs.Name) < 0; } - bool operator() (PropertyValue const & lhs, const ::rtl::OUString& rhs) + bool operator() (PropertyValue const & lhs, const OUString& rhs) { return lhs.Name.compareTo(rhs) < 0; } @@ -69,7 +69,7 @@ int CDECL SbCompare_Properties_Impl( const void *arg1, const void *arg2 ) extern "C" int CDECL SbCompare_UString_Property_Impl( const void *arg1, const void *arg2 ) { - const ::rtl::OUString *pArg1 = (::rtl::OUString*) arg1; + const OUString *pArg1 = (OUString*) arg1; const Property *pArg2 = (Property*) arg2; return pArg1->compareTo( pArg2->Name ); } @@ -102,7 +102,7 @@ Reference< XPropertySetInfo > SbPropertyValues::getPropertySetInfo(void) throw( //------------------------------------------------------------------------- -size_t SbPropertyValues::GetIndex_Impl( const ::rtl::OUString &rPropName ) const +size_t SbPropertyValues::GetIndex_Impl( const OUString &rPropName ) const { SbPropertyValueArr_Impl::const_iterator it = std::lower_bound( m_aPropVals.begin(), m_aPropVals.end(), rPropName, @@ -119,7 +119,7 @@ size_t SbPropertyValues::GetIndex_Impl( const ::rtl::OUString &rPropName ) const //---------------------------------------------------------------------------- void SbPropertyValues::setPropertyValue( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const Any& aValue) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, @@ -135,7 +135,7 @@ void SbPropertyValues::setPropertyValue( //---------------------------------------------------------------------------- Any SbPropertyValues::getPropertyValue( - const ::rtl::OUString& aPropertyName) + const OUString& aPropertyName) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) @@ -147,7 +147,7 @@ Any SbPropertyValues::getPropertyValue( //---------------------------------------------------------------------------- void SbPropertyValues::addPropertyChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const Reference< XPropertyChangeListener >& ) throw () { @@ -157,7 +157,7 @@ void SbPropertyValues::addPropertyChangeListener( //---------------------------------------------------------------------------- void SbPropertyValues::removePropertyChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const Reference< XPropertyChangeListener >& ) throw () { @@ -167,7 +167,7 @@ void SbPropertyValues::removePropertyChangeListener( //---------------------------------------------------------------------------- void SbPropertyValues::addVetoableChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const Reference< XVetoableChangeListener >& ) throw() { @@ -177,7 +177,7 @@ void SbPropertyValues::addVetoableChangeListener( //---------------------------------------------------------------------------- void SbPropertyValues::removeVetoableChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const Reference< XVetoableChangeListener >& ) throw() { @@ -221,7 +221,7 @@ PropertySetInfoImpl::PropertySetInfoImpl() { } -sal_Int32 PropertySetInfoImpl::GetIndex_Impl( const ::rtl::OUString &rPropName ) const +sal_Int32 PropertySetInfoImpl::GetIndex_Impl( const OUString &rPropName ) const { Property *pP; pP = (Property*) @@ -236,7 +236,7 @@ Sequence< Property > PropertySetInfoImpl::getProperties(void) throw() return _aProps; } -Property PropertySetInfoImpl::getPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException ) +Property PropertySetInfoImpl::getPropertyByName(const OUString& Name) throw( RuntimeException ) { sal_Int32 nIndex = GetIndex_Impl( Name ); if( USHRT_MAX != nIndex ) @@ -244,7 +244,7 @@ Property PropertySetInfoImpl::getPropertyByName(const ::rtl::OUString& Name) thr return Property(); } -sal_Bool PropertySetInfoImpl::hasPropertyByName(const ::rtl::OUString& Name) throw( RuntimeException ) +sal_Bool PropertySetInfoImpl::hasPropertyByName(const OUString& Name) throw( RuntimeException ) { sal_Int32 nIndex = GetIndex_Impl( Name ); return USHRT_MAX != nIndex; @@ -280,13 +280,13 @@ Sequence< Property > SbPropertySetInfo::getProperties(void) throw( RuntimeExcept return aImpl.getProperties(); } -Property SbPropertySetInfo::getPropertyByName(const ::rtl::OUString& Name) +Property SbPropertySetInfo::getPropertyByName(const OUString& Name) throw( RuntimeException ) { return aImpl.getPropertyByName( Name ); } -sal_Bool SbPropertySetInfo::hasPropertyByName(const ::rtl::OUString& Name) +sal_Bool SbPropertySetInfo::hasPropertyByName(const OUString& Name) throw( RuntimeException ) { return aImpl.hasPropertyByName( Name ); @@ -308,7 +308,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWr } // Get class names of struct - ::rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM("stardiv.uno.beans.PropertySet") ); + OUString aServiceName( "stardiv.uno.beans.PropertySet"); Reference< XInterface > xInterface = (OWeakObject*) new SbPropertyValues(); diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 990651568e99..48a2c6612780 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -221,7 +221,7 @@ SbxObject* StarBASIC::getVBAGlobals( ) { try { - xDocFac->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAGlobals" ) ) ); + xDocFac->createInstance( OUString( "ooo.vba.VBAGlobals" ) ); } catch(const Exception& ) { @@ -236,7 +236,7 @@ SbxObject* StarBASIC::getVBAGlobals( ) } // i#i68894# -SbxVariable* StarBASIC::VBAFind( const rtl::OUString& rName, SbxClassType t ) +SbxVariable* StarBASIC::VBAFind( const OUString& rName, SbxClassType t ) { if( rName == "ThisComponent" ) { @@ -1175,7 +1175,7 @@ struct ClassModuleRunInitItem // to allow forward declaration in sbmod.hxx class ModuleInitDependencyMap : public boost::unordered_map< OUString, ClassModuleRunInitItem, - ::rtl::OUStringHash, ::std::equal_to< OUString > > + OUStringHash, ::std::equal_to< OUString > > {}; void SbModule::implProcessModuleRunInit( ModuleInitDependencyMap& rMap, ClassModuleRunInitItem& rItem ) diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 54d2a26e2006..30f5c9fcec4a 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -157,7 +157,7 @@ void SetSbUnoObjectDfltPropName( SbxObject* pObj ) if ( SbUnoObject::getDefaultPropName( pUnoObj, sDfltPropName ) ) { - OSL_TRACE("SetSbUnoObjectDfltPropName setting dflt prop for %s", rtl::OUStringToOString( pObj->GetName(), RTL_TEXTENCODING_UTF8 ).getStr() ); + OSL_TRACE("SetSbUnoObjectDfltPropName setting dflt prop for %s", OUStringToOString( pObj->GetName(), RTL_TEXTENCODING_UTF8 ).getStr() ); pUnoObj->SetDfltProperty( sDfltPropName ); } } @@ -955,7 +955,7 @@ Type getUnoTypeForSbxValue( SbxValue* pVal ) } OUStringBuffer aSeqTypeName; - aSeqTypeName.appendAscii(RTL_CONSTASCII_STRINGPARAM(aSeqLevelStr)) + aSeqTypeName.appendAscii(aSeqLevelStr) .append(aElementType.getTypeName()); aRetType = Type( TypeClass_SEQUENCE, aSeqTypeName.makeStringAndClear() ); } @@ -996,7 +996,7 @@ Type getUnoTypeForSbxValue( SbxValue* pVal ) OUStringBuffer aSeqTypeName; for( short iDim = 0 ; iDim < nDims ; iDim++ ) { - aSeqTypeName.appendAscii(RTL_CONSTASCII_STRINGPARAM(aSeqLevelStr)); + aSeqTypeName.appendAscii(aSeqLevelStr); } aSeqTypeName.append(aElementType.getTypeName()); aRetType = Type( TypeClass_SEQUENCE, aSeqTypeName.makeStringAndClear() ); @@ -1137,7 +1137,7 @@ static Any implRekMultiDimArrayToSequence( SbxDimArray* pArray, sal_Int32 i; for( i = 0 ; i < nSeqLevel ; i++ ) { - aSeqTypeName.appendAscii(RTL_CONSTASCII_STRINGPARAM(aSeqLevelStr)); + aSeqTypeName.appendAscii(aSeqLevelStr); } aSeqTypeName.append(aElemType.getTypeName()); Type aSeqType( TypeClass_SEQUENCE, aSeqTypeName.makeStringAndClear() ); @@ -1672,7 +1672,7 @@ OUString getDbgObjectName( SbUnoObject* pUnoObj ) { OUString aName = getDbgObjectNameImpl( pUnoObj ); if( aName.isEmpty() ) - aName += ::rtl::OUString("Unknown"); + aName += OUString("Unknown"); OUStringBuffer aRet; if( aName.getLength() > 20 ) @@ -1736,7 +1736,7 @@ bool checkUnoObjectType( SbUnoObject* pUnoObj, const OUString& rClass ) } else { - aClassName += ::rtl::OUString( sal_Unicode( 'X' ) ) + rClass; + aClassName += OUString( sal_Unicode( 'X' ) ) + rClass; } Sequence< Type > aTypeSeq = xTypeProvider->getTypes(); const Type* pTypeArray = aTypeSeq.getConstArray(); @@ -1797,7 +1797,7 @@ OUString Impl_GetSupportedInterfaces( SbUnoObject* pUnoObj ) OUStringBuffer aRet; if( eType != TypeClass_INTERFACE ) { - aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM(ID_DBG_SUPPORTEDINTERFACES) ); + aRet.appendAscii( ID_DBG_SUPPORTEDINTERFACES ); aRet.appendAscii( " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" ); } else @@ -3303,7 +3303,7 @@ Reference< XTypeDescriptionEnumeration > getTypeDescriptorEnumeration( const OUS return xEnum; } -typedef boost::unordered_map< OUString, Any, ::rtl::OUStringHash, ::std::equal_to< OUString > > VBAConstantsHash; +typedef boost::unordered_map< OUString, Any, OUStringHash, ::std::equal_to< OUString > > VBAConstantsHash; VBAConstantHelper& VBAConstantHelper::instance() @@ -3436,7 +3436,7 @@ SbxVariable* SbUnoClass::Find( const OUString& rName, SbxClassType ) if( m_xClass.is() ) { // Is it a field(?) - ::rtl::OUString aUStr( rName ); + OUString aUStr( rName ); Reference< XIdlField > xField = m_xClass->getField( aUStr ); Reference< XIdlClass > xClass; if( xField.is() ) @@ -5047,7 +5047,7 @@ void SbUnoStructRefObject::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId& rBCTyp if( nId == -1 ) // Property ID_DBG_SUPPORTEDINTERFACES" { OUStringBuffer aRet; - aRet.appendAscii( RTL_CONSTASCII_STRINGPARAM(ID_DBG_SUPPORTEDINTERFACES) ); + aRet.appendAscii( ID_DBG_SUPPORTEDINTERFACES ); aRet.appendAscii( " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" ); pVar->PutString( aRet.makeStringAndClear() ); @@ -5124,7 +5124,7 @@ OUString SbUnoStructRefObject::getDbgObjectName() OUString aName = GetClassName(); if( aName.isEmpty() ) { - aName += ::rtl::OUString("Unknown"); + aName += OUString("Unknown"); } OUStringBuffer aRet; if( aName.getLength() > 20 ) diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx index 2fb50913cea3..55877b065205 100644 --- a/basic/source/comp/io.cxx +++ b/basic/source/comp/io.cxx @@ -115,7 +115,7 @@ void SbiParser::Line() aGen.Statement(); KeywordSymbolInfo aInfo; - aInfo.m_aKeywordSymbol = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "line" ) ); + aInfo.m_aKeywordSymbol = OUString( "line" ); aInfo.m_eSbxDataType = GetType(); aInfo.m_eTok = SYMBOL; @@ -247,7 +247,7 @@ void SbiParser::Open() if( Peek() == SYMBOL ) { Next(); - if( aSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("LEN")) ) + if( aSym.equalsIgnoreAsciiCase("LEN") ) { TestToken( EQ ); pLen = new SbiExpression( this ); @@ -278,7 +278,7 @@ void SbiParser::Name() aGen.Statement(); KeywordSymbolInfo aInfo; - aInfo.m_aKeywordSymbol = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "name" ) ); + aInfo.m_aKeywordSymbol = OUString( "name" ); aInfo.m_eSbxDataType = GetType(); aInfo.m_eTok = SYMBOL; diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index a4a4501077d9..28c553fb999d 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -134,7 +134,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) bSingleLineIf = bExplicit = false; bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::CLASS ); - OSL_TRACE("Parser - %s, bClassModule %d", rtl::OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); + OSL_TRACE("Parser - %s, bClassModule %d", OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); pPool = &aPublics; for( short i = 0; i < 26; i++ ) eDefTypes[ i ] = SbxVARIANT; // no explicit default type @@ -783,7 +783,7 @@ void SbiParser::Option() { bText = false; } - else if( eTok == SYMBOL && GetSym().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("text")) ) + else if( eTok == SYMBOL && GetSym().equalsIgnoreAsciiCase("text") ) { bText = true; } @@ -837,7 +837,7 @@ void addStringConst( SbiSymPool& rPool, const char* pSym, const OUString& rStr ) inline void addStringConst( SbiSymPool& rPool, const char* pSym, const char* pStr ) { - addStringConst( rPool, pSym, rtl::OUString::createFromAscii( pStr ) ); + addStringConst( rPool, pSym, OUString::createFromAscii( pStr ) ); } void SbiParser::AddConstants( void ) diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx index c7f048f6c3fa..8f1f0812bce5 100644 --- a/basic/source/comp/sbcomp.cxx +++ b/basic/source/comp/sbcomp.cxx @@ -227,7 +227,7 @@ struct TraceTextData rtl::OString m_aTraceStr_PCode; }; typedef std::hash_map< sal_Int32, TraceTextData > PCToTextDataMap; -typedef std::hash_map< ::rtl::OUString, PCToTextDataMap*, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleTraceMap; +typedef std::hash_map< OUString, PCToTextDataMap*, OUStringHash, ::std::equal_to< OUString > > ModuleTraceMap; ModuleTraceMap GaModuleTraceMap; ModuleTraceMap& rModuleTraceMap = GaModuleTraceMap; @@ -261,7 +261,7 @@ static rtl::OString lcl_toOStringSkipLeadingWhites( const OUString& aStr ) { static sal_Char Buffer[1000]; - rtl::OString aOStr = OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ); + rtl::OString aOStr = OUStringToOString( OUString( aStr ), RTL_TEXTENCODING_ASCII_US ); const sal_Char* pStr = aOStr.getStr(); // Skip whitespace @@ -365,7 +365,7 @@ struct FunctionItem , m_bBlockSteps( false ) {} }; -typedef std::hash_map< ::rtl::OUString, FunctionItem*, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > FunctionItemMap; +typedef std::hash_map< OUString, FunctionItem*, OUStringHash, ::std::equal_to< OUString > > FunctionItemMap; static std::stack< double > GaCallEnterTimeStack; static std::stack< FunctionItem* > GaFunctionItemStack; @@ -525,7 +525,7 @@ void dbg_tracePrint( const OUString& aStr, sal_Int32 nCallLvl, bool bCallLvlRela nCallLvl += GnLastCallLvl; } int nIndent = nCallLvl * GnIndentPerCallLevel; - lcl_lineOut( OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr(), lcl_getSpaces( nIndent ) ); + lcl_lineOut( OUStringToOString( OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr(), lcl_getSpaces( nIndent ) ); } void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) @@ -564,7 +564,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) ModuleTraceMap::iterator it = rModuleTraceMap.find( aModuleName ); if( it == rModuleTraceMap.end() ) { - const char* pModuleNameStr = OUStringToOString( rtl::OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); + const char* pModuleNameStr = OUStringToOString( OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); char Buffer[200]; sprintf( Buffer, "TRACE ERROR: Unknown module \"%s\"", pModuleNameStr ); lcl_lineOut( Buffer ); @@ -581,7 +581,7 @@ void dbg_traceStep( SbModule* pModule, sal_uInt32 nPC, sal_Int32 nCallLvl ) PCToTextDataMap::iterator itInner = pInnerMap->find( nPC ); if( itInner == pInnerMap->end() ) { - const char* pModuleNameStr = OUStringToOString( rtl::OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); + const char* pModuleNameStr = OUStringToOString( OUString( aModuleName ), RTL_TEXTENCODING_ASCII_US ).getStr(); char Buffer[200]; sprintf( Buffer, "TRACE ERROR: No info for PC = %d in module \"%s\"", (int)nPC, pModuleNameStr ); lcl_lineOut( Buffer ); @@ -803,7 +803,7 @@ void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, sal_Int32 nCallL pPostStr = TimeBuffer; } #endif - lcl_lineOut( (!bLeave || !bOwnBlockSteps) ? OUStringToOString( rtl::OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr() : "}", + lcl_lineOut( (!bLeave || !bOwnBlockSteps) ? OUStringToOString( OUString( aStr ), RTL_TEXTENCODING_ASCII_US ).getStr() : "}", lcl_getSpaces( nIndent ), pPostStr ); if( !bLeave ) { @@ -836,7 +836,7 @@ void dbg_traceNotifyError( SbError nTraceErr, const OUString& aTraceErrMsg, #endif GnLastCallLvl = nCallLvl; - rtl::OString aOTraceErrMsg = OUStringToOString( rtl::OUString( aTraceErrMsg ), RTL_TEXTENCODING_ASCII_US ); + rtl::OString aOTraceErrMsg = OUStringToOString( OUString( aTraceErrMsg ), RTL_TEXTENCODING_ASCII_US ); char Buffer[200]; const char* pHandledStr = bTraceErrHandled ? " / HANDLED" : ""; @@ -922,7 +922,7 @@ void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite ) } char Buffer[500]; - const char* pValStr = OUStringToOString( rtl::OUString( aValStr ), RTL_TEXTENCODING_ASCII_US ).getStr(); + const char* pValStr = OUStringToOString( OUString( aValStr ), RTL_TEXTENCODING_ASCII_US ).getStr(); sprintf( Buffer, "### TRACE_PRINT: %s ###", pValStr ); int nIndent = GnLastCallLvl * GnIndentPerCallLevel; diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx index 87265e7839e2..5fbdcef097cf 100644 --- a/basic/source/comp/scanner.cxx +++ b/basic/source/comp/scanner.cxx @@ -22,7 +22,7 @@ #include <vcl/svapp.hxx> -SbiScanner::SbiScanner( const ::rtl::OUString& rBuf, StarBASIC* p ) : aBuf( rBuf ) +SbiScanner::SbiScanner( const OUString& rBuf, StarBASIC* p ) : aBuf( rBuf ) { pBasic = p; pLine = NULL; @@ -156,10 +156,10 @@ void SbiScanner::scanGoto() if(n + 1 < aLine.getLength()) { - ::rtl::OUString aTemp = aLine.copy(n, 2); - if(aTemp.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("to"))) + OUString aTemp = aLine.copy(n, 2); + if(aTemp.equalsIgnoreAsciiCase("to")) { - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("goto")); + aSym = OUString("goto"); pLine += n + 2 - nCol; nCol = n + 2; } @@ -209,7 +209,7 @@ bool SbiScanner::NextSym() sal_Unicode buf[ BUF_SIZE ], *p = buf; eScanType = SbxVARIANT; - aSym = ::rtl::OUString(); + aSym = OUString(); bHash = bSymbol = bNumber = bSpaces = false; // read in line? @@ -261,7 +261,7 @@ bool SbiScanner::NextSym() scanAlphanumeric(); // Special handling for "go to" - if(nCol < aLine.getLength() && bCompatible && aSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("go"))) + if(nCol < aLine.getLength() && bCompatible && aSym.equalsIgnoreAsciiCase("go")) scanGoto(); // replace closing '_' by space when end of line is following @@ -270,7 +270,7 @@ bool SbiScanner::NextSym() { // We are going to modify a potentially shared string, so force // a copy, so that aSym is not modified by the following operation - ::rtl::OUString aSymCopy( aSym.getStr(), aSym.getLength() ); + OUString aSymCopy( aSym.getStr(), aSym.getLength() ); aSym = aSymCopy; // HACK: modifying a potentially shared string here! @@ -358,7 +358,7 @@ bool SbiScanner::NextSym() aSym = p; bNumber = true; if( comma > 1 || exp > 1 ) - { aError = ::rtl::OUString('.'); + { aError = OUString('.'); GenError( SbERR_BAD_CHAR_IN_NUMBER ); } // #57844 use localized function @@ -406,7 +406,7 @@ bool SbiScanner::NextSym() default : // treated as an operator --pLine; --nCol; nCol1 = nCol-1; - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("&")); + aSym = OUString("&"); return true; } bNumber = true; @@ -421,11 +421,11 @@ bool SbiScanner::NextSym() // from 4.1.1996: buffer full, go on scanning empty if( (p-buf) == (BUF_SIZE-1) ) bBufOverflow = true; - else if( rtl::OUString( cmp ).indexOf( ch ) != -1 ) + else if( OUString( cmp ).indexOf( ch ) != -1 ) *p++ = ch; else { - aError = ::rtl::OUString(ch); + aError = OUString(ch); GenError( SbERR_BAD_CHAR_IN_NUMBER ); } } @@ -462,7 +462,7 @@ bool SbiScanner::NextSym() { pLine++; nCol++; if( *pLine != cSep || cSep == ']' ) break; - } else aError = ::rtl::OUString(cSep), GenError( SbERR_EXPECTED ); + } else aError = OUString(cSep), GenError( SbERR_EXPECTED ); } // If VBA Interop then doen't eat the [] chars if ( cSep == ']' && bVBASupportOn ) @@ -470,7 +470,7 @@ bool SbiScanner::NextSym() else aSym = aLine.copy( n, nCol - n - 1 ); // get out duplicate string delimiters - ::rtl::OUStringBuffer aSymBuf; + OUStringBuffer aSymBuf; for ( sal_Int32 i = 0, len = aSym.getLength(); i < len; ++i ) { aSymBuf.append( aSym[i] ); @@ -505,10 +505,10 @@ bool SbiScanner::NextSym() PrevLineCommentLbl: if( bPrevLineExtentsComment || (eScanType != SbxSTRING && - ( aSym[0] == '\'' || aSym.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("REM") ) ) ) ) + ( aSym[0] == '\'' || aSym.equalsIgnoreAsciiCase( "REM" ) ) ) ) { bPrevLineExtentsComment = false; - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REM")); + aSym = OUString("REM"); sal_Int32 nLen = rtl_ustr_getLength(pLine); if( bCompatible && pLine[ nLen - 1 ] == '_' && pLine[ nLen - 2 ] == ' ' ) bPrevLineExtentsComment = true; @@ -539,7 +539,7 @@ eoln: nLine = nOldLine; nCol1 = nOldCol1; nCol2 = nOldCol2; - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")); + aSym = OUString("\n"); nColLock = 0; return true; } diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index e0dc9fda3ac6..0da1c51476d9 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -210,7 +210,7 @@ TokenLabelInfo::~TokenLabelInfo() // the constructor detects the length of the token table -SbiTokenizer::SbiTokenizer( const ::rtl::OUString& rSrc, StarBASIC* pb ) +SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb ) : SbiScanner( rSrc, pb ) { pTokTable = aTokTable_Basic; @@ -240,11 +240,11 @@ void SbiTokenizer::Push( SbiToken t ) void SbiTokenizer::Error( SbError code, const char* pMsg ) { - aError = ::rtl::OUString::createFromAscii( pMsg ); + aError = OUString::createFromAscii( pMsg ); Error( code ); } -void SbiTokenizer::Error( SbError code, const ::rtl::OUString &aMsg ) +void SbiTokenizer::Error( SbError code, const OUString &aMsg ) { aError = aMsg; Error( code ); @@ -275,24 +275,24 @@ SbiToken SbiTokenizer::Peek() // For decompilation. Numbers and symbols return an empty string. -const ::rtl::OUString& SbiTokenizer::Symbol( SbiToken t ) +const OUString& SbiTokenizer::Symbol( SbiToken t ) { // character token? if( t < FIRSTKWD ) { - aSym = ::rtl::OUString::valueOf(sal::static_int_cast<sal_Unicode>(t)); + aSym = OUString::valueOf(sal::static_int_cast<sal_Unicode>(t)); return aSym; } switch( t ) { case NEG : - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-")); + aSym = OUString("-"); return aSym; case EOS : - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":/CRLF")); + aSym = OUString(":/CRLF"); return aSym; case EOLN : - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CRLF")); + aSym = OUString("CRLF"); return aSym; default: break; @@ -302,14 +302,14 @@ const ::rtl::OUString& SbiTokenizer::Symbol( SbiToken t ) { if( tp->t == t ) { - aSym = ::rtl::OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US); + aSym = OStringToOUString(tp->s, RTL_TEXTENCODING_ASCII_US); return aSym; } } const sal_Unicode *p = aSym.getStr(); if (*p <= ' ') { - aSym = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("???")); + aSym = OUString("???"); } return aSym; } @@ -506,7 +506,7 @@ special: if( bCompatible ) { // #129904 Suppress system - if( eTok == STOP && aSym.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("system")) ) + if( eTok == STOP && aSym.equalsIgnoreAsciiCase("system") ) { eCurTok = SYMBOL; } diff --git a/basic/source/inc/dlgcont.hxx b/basic/source/inc/dlgcont.hxx index 3a50d5aaac5e..7b7fcdd31d95 100644 --- a/basic/source/inc/dlgcont.hxx +++ b/basic/source/inc/dlgcont.hxx @@ -36,16 +36,16 @@ namespace basic class SfxDialogLibraryContainer : public SfxLibraryContainer { // Methods to distinguish between different library types - virtual SfxLibrary* SAL_CALL implCreateLibrary( const ::rtl::OUString& aName ); + virtual SfxLibrary* SAL_CALL implCreateLibrary( const OUString& aName ); virtual SfxLibrary* SAL_CALL implCreateLibraryLink - ( const ::rtl::OUString& aName, const ::rtl::OUString& aLibInfoFileURL, - const ::rtl::OUString& StorageURL, sal_Bool ReadOnly ); + ( const OUString& aName, const OUString& aLibInfoFileURL, + const OUString& StorageURL, sal_Bool ReadOnly ); virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void ); virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const; virtual void SAL_CALL writeLibraryElement ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, + const OUString& aElementName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutput ) throw(::com::sun::star::uno::Exception); @@ -53,11 +53,11 @@ class SfxDialogLibraryContainer : public SfxLibraryContainer virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, - const ::rtl::OUString& aFile, + const OUString& aElementName, + const OUString& aFile, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xElementStream ); - virtual void SAL_CALL importFromOldStorage( const ::rtl::OUString& aFile ); + virtual void SAL_CALL importFromOldStorage( const OUString& aFile ); virtual SfxLibraryContainer* createInstanceImpl( void ); @@ -82,16 +82,16 @@ public: implCreateStringResource( class SfxDialogLibrary* pDialog ); // Methods XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) + virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) + virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); // XLibraryQueryExecutable - virtual sal_Bool SAL_CALL HasExecutableCode(const rtl::OUString&) + virtual sal_Bool SAL_CALL HasExecutableCode(const OUString&) throw (::com::sun::star::uno::RuntimeException); // Service - static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(); - static ::rtl::OUString getImplementationName_static(); + static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static(); + static OUString getImplementationName_static(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager ) throw( ::com::sun::star::uno::Exception ); @@ -108,13 +108,13 @@ class SfxDialogLibrary :public SfxLibrary SfxDialogLibraryContainer* m_pParent; ::com::sun::star::uno::Reference < ::com::sun::star::resource::XStringResourcePersistence> m_xStringResourcePersistence; - ::rtl::OUString m_aName; + OUString m_aName; // Provide modify state including resources virtual sal_Bool isModified( void ); virtual void storeResources( void ); - virtual void storeResourcesAsURL( const ::rtl::OUString& URL, const ::rtl::OUString& NewName ); - virtual void storeResourcesToURL( const ::rtl::OUString& URL, + virtual void storeResourcesAsURL( const OUString& URL, const OUString& NewName ); + virtual void storeResourcesToURL( const OUString& URL, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); virtual void storeResourcesToStorage( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage >& xStorage ); @@ -123,7 +123,7 @@ public: SfxDialogLibrary ( ModifiableHelper& _rModifiable, - const ::rtl::OUString& aName, + const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI, SfxDialogLibraryContainer* pParent @@ -132,10 +132,10 @@ public: SfxDialogLibrary ( ModifiableHelper& _rModifiable, - const ::rtl::OUString& aName, + const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI, - const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly, + const OUString& aLibInfoFileURL, const OUString& aStorageURL, sal_Bool ReadOnly, SfxDialogLibraryContainer* pParent ); @@ -146,7 +146,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceResolver > SAL_CALL getStringResource( ) throw (::com::sun::star::uno::RuntimeException); - ::rtl::OUString getName( void ) + OUString getName( void ) { return m_aName; } ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourcePersistence > diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 893990e95568..8db283971053 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -71,7 +71,7 @@ typedef ::cppu::WeakImplHelper3< class NameContainer : public ::cppu::BaseMutex, public NameContainer_BASE { - typedef boost::unordered_map < OUString, sal_Int32, ::rtl::OUStringHash > NameContainerNameMap; + typedef boost::unordered_map < OUString, sal_Int32, OUStringHash > NameContainerNameMap; NameContainerNameMap mHashMap; ::com::sun::star::uno::Sequence< OUString > mNames; diff --git a/basic/source/inc/propacc.hxx b/basic/source/inc/propacc.hxx index 596256da77fd..934d4ef30183 100644 --- a/basic/source/inc/propacc.hxx +++ b/basic/source/inc/propacc.hxx @@ -43,7 +43,7 @@ class SbPropertyValues: public SbPropertyValuesHelper ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > m_xInfo; private: - size_t GetIndex_Impl( const ::rtl::OUString &rPropName ) const; + size_t GetIndex_Impl( const OUString &rPropName ) const; public: SbPropertyValues(); @@ -53,31 +53,31 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(void) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setPropertyValue( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& ) throw (); virtual void SAL_CALL removePropertyChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& ) throw (); virtual void SAL_CALL addVetoableChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& ) throw (); virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& ) throw (); @@ -97,7 +97,7 @@ class PropertySetInfoImpl ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > _aProps; - sal_Int32 GetIndex_Impl( const ::rtl::OUString &rPropName ) const; + sal_Int32 GetIndex_Impl( const OUString &rPropName ) const; public: PropertySetInfoImpl(); @@ -105,9 +105,9 @@ public: // XPropertySetInfo ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void) throw (); - ::com::sun::star::beans::Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name) + ::com::sun::star::beans::Property SAL_CALL getPropertyByName(const OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); - sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name) + sal_Bool SAL_CALL hasPropertyByName(const OUString& Name) throw ( ::com::sun::star::uno::RuntimeException ); }; @@ -122,9 +122,9 @@ public: // XPropertySetInfo virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName(const ::rtl::OUString& Name) + virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName(const OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& Name) + virtual sal_Bool SAL_CALL hasPropertyByName(const OUString& Name) throw( ::com::sun::star::uno::RuntimeException ); }; diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index fd5313775ded..d63c7d335e81 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -115,7 +115,7 @@ public: OUString sFullNameToBeChecked; WildCard* pWildCard; - Sequence< ::rtl::OUString > aDirSeq; + Sequence< OUString > aDirSeq; SbiRTLData(); ~SbiRTLData(); diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index a90197e73409..9bf887654645 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -391,7 +391,7 @@ public: virtual void Clear(); }; -typedef boost::unordered_map< OUString, ::com::sun::star::uno::Any, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > VBAConstantsHash; +typedef boost::unordered_map< OUString, ::com::sun::star::uno::Any, OUStringHash, ::std::equal_to< OUString > > VBAConstantsHash; typedef std::vector< OUString > VBAConstantsVector; diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index 79a98f5c524d..7ee288b95a2a 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -31,8 +31,8 @@ class StarBASIC; class SbiScanner { - ::rtl::OUString aBuf; // input buffer - ::rtl::OUString aLine; + OUString aBuf; // input buffer + OUString aLine; const sal_Unicode* pLine; const sal_Unicode* pSaveLine; @@ -40,8 +40,8 @@ class SbiScanner void scanGoto(); bool readLine(); protected: - ::rtl::OUString aSym; - ::rtl::OUString aError; + OUString aSym; + OUString aError; SbxDataType eScanType; StarBASIC* pBasic; // instance for error callbacks double nVal; // numeric value @@ -66,7 +66,7 @@ protected: bool bInStatement; void GenError( SbError ); public: - SbiScanner( const ::rtl::OUString&, StarBASIC* = NULL ); + SbiScanner( const OUString&, StarBASIC* = NULL ); ~SbiScanner(); void EnableErrors() { bError = false; } @@ -89,7 +89,7 @@ public: bool DoesColonFollow(); bool NextSym(); - const ::rtl::OUString& GetSym() { return aSym; } + const OUString& GetSym() { return aSym; } SbxDataType GetType() { return eScanType; } double GetDbl() { return nVal; } }; diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index 5b063d3d66cb..f33261264d25 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -32,20 +32,20 @@ namespace basic class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPassword { - ::rtl::OUString maScriptLanguage; + OUString maScriptLanguage; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxCodeNameAccess; // Methods to distinguish between deffirent library types - virtual SfxLibrary* SAL_CALL implCreateLibrary( const ::rtl::OUString& aName ); + virtual SfxLibrary* SAL_CALL implCreateLibrary( const OUString& aName ); virtual SfxLibrary* SAL_CALL implCreateLibraryLink - ( const ::rtl::OUString& aName, const ::rtl::OUString& aLibInfoFileURL, - const ::rtl::OUString& StorageURL, sal_Bool ReadOnly ); + ( const OUString& aName, const OUString& aLibInfoFileURL, + const OUString& StorageURL, sal_Bool ReadOnly ); virtual ::com::sun::star::uno::Any SAL_CALL createEmptyLibraryElement( void ); virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const; virtual void SAL_CALL writeLibraryElement ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, + const OUString& aElementName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& xOutput ) throw(::com::sun::star::uno::Exception); @@ -53,26 +53,26 @@ class SfxScriptLibraryContainer : public SfxLibraryContainer, public OldBasicPas virtual ::com::sun::star::uno::Any SAL_CALL importLibraryElement ( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer>& xLibrary, - const ::rtl::OUString& aElementName, - const ::rtl::OUString& aFile, + const OUString& aElementName, + const OUString& aFile, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xElementStream ); - virtual void SAL_CALL importFromOldStorage( const ::rtl::OUString& aFile ); + virtual void SAL_CALL importFromOldStorage( const OUString& aFile ); virtual SfxLibraryContainer* createInstanceImpl( void ); // Password encryption - virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, + virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage>& xStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); // New variant for library export - virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, + virtual sal_Bool implStorePasswordLibrary( SfxLibrary* pLib, const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, - const ::rtl::OUString& aTargetURL, + const OUString& aTargetURL, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler ); - virtual sal_Bool implLoadPasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& Name, + virtual sal_Bool implLoadPasswordLibrary( SfxLibrary* pLib, const OUString& Name, sal_Bool bVerifyPasswordOnly=false ) throw(::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); @@ -97,34 +97,34 @@ public: // Methods XLibraryContainerPassword - virtual sal_Bool SAL_CALL isLibraryPasswordProtected( const ::rtl::OUString& Name ) + virtual sal_Bool SAL_CALL isLibraryPasswordProtected( const OUString& Name ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isLibraryPasswordVerified( const ::rtl::OUString& Name ) + virtual sal_Bool SAL_CALL isLibraryPasswordVerified( const OUString& Name ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL verifyLibraryPassword( const ::rtl::OUString& Name, const ::rtl::OUString& Password ) + virtual sal_Bool SAL_CALL verifyLibraryPassword( const OUString& Name, const OUString& Password ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL changeLibraryPassword( const ::rtl::OUString& Name, - const ::rtl::OUString& OldPassword, const ::rtl::OUString& NewPassword ) + virtual void SAL_CALL changeLibraryPassword( const OUString& Name, + const OUString& OldPassword, const OUString& NewPassword ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); // XLibraryQueryExecutable - virtual sal_Bool SAL_CALL HasExecutableCode(const rtl::OUString&) + virtual sal_Bool SAL_CALL HasExecutableCode(const OUString&) throw (::com::sun::star::uno::RuntimeException); // Methods XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) + virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) + virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); // Service - static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(); - static ::rtl::OUString getImplementationName_static(); + static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_static(); + static OUString getImplementationName_static(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceManager ) throw( ::com::sun::star::uno::Exception ); @@ -132,7 +132,7 @@ public: }; //============================================================================ -typedef boost::unordered_map< ::rtl::OUString, ::com::sun::star::script::ModuleInfo, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleInfoMap; +typedef boost::unordered_map< OUString, ::com::sun::star::script::ModuleInfo, OUStringHash, ::std::equal_to< OUString > > ModuleInfoMap; typedef ::cppu::ImplHelper1< ::com::sun::star::script::vba::XVBAModuleInfo > SfxScriptLibrary_BASE; @@ -140,7 +140,7 @@ class SfxScriptLibrary : public SfxLibrary, public SfxScriptLibrary_BASE { friend class SfxScriptLibraryContainer; - typedef boost::unordered_map< ::rtl::OUString, ::com::sun::star::script::ModuleInfo, ::rtl::OUStringHash > ModuleInfoMap; + typedef boost::unordered_map< OUString, ::com::sun::star::script::ModuleInfo, OUStringHash > ModuleInfoMap; bool mbLoadedSource; bool mbLoadedBinary; @@ -149,8 +149,8 @@ class SfxScriptLibrary : public SfxLibrary, public SfxScriptLibrary_BASE // Provide modify state including resources virtual sal_Bool isModified( void ); virtual void storeResources( void ); - virtual void storeResourcesAsURL( const ::rtl::OUString& URL, const ::rtl::OUString& NewName ); - virtual void storeResourcesToURL( const ::rtl::OUString& URL, + virtual void storeResourcesAsURL( const OUString& URL, const OUString& NewName ); + virtual void storeResourcesToURL( const OUString& URL, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ); virtual void storeResourcesToStorage( const ::com::sun::star::uno::Reference < ::com::sun::star::embed::XStorage >& xStorage ); @@ -168,17 +168,17 @@ public: ModifiableHelper& _rModifiable, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xMSF, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess3 >& xSFI, - const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly + const OUString& aLibInfoFileURL, const OUString& aStorageURL, sal_Bool ReadOnly ); DECLARE_XINTERFACE() DECLARE_XTYPEPROVIDER() // XVBAModuleInfo - virtual ::com::sun::star::script::ModuleInfo SAL_CALL getModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertModuleInfo( const ::rtl::OUString& ModuleName, const ::com::sun::star::script::ModuleInfo& ModuleInfo ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::script::ModuleInfo SAL_CALL getModuleInfo( const OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasModuleInfo( const OUString& ModuleName ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertModuleInfo( const OUString& ModuleName, const ::com::sun::star::script::ModuleInfo& ModuleInfo ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeModuleInfo( const OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); static bool containsValidModule( const ::com::sun::star::uno::Any& _rElement ); diff --git a/basic/source/inc/token.hxx b/basic/source/inc/token.hxx index 5054bd9a440d..0ce9cf443f58 100644 --- a/basic/source/inc/token.hxx +++ b/basic/source/inc/token.hxx @@ -143,14 +143,14 @@ protected: bool bAs; // last keyword was AS bool bErrorIsSymbol; // Handle Error token as Symbol, not keyword public: - SbiTokenizer( const ::rtl::OUString&, StarBASIC* = NULL ); + SbiTokenizer( const OUString&, StarBASIC* = NULL ); ~SbiTokenizer(); inline bool IsEof() { return bEof; } inline bool IsEos() { return bEos; } void Push( SbiToken ); - const ::rtl::OUString& Symbol( SbiToken ); // reconversion + const OUString& Symbol( SbiToken ); // reconversion SbiToken Peek(); // read the next token SbiToken Next(); // read a token @@ -159,7 +159,7 @@ public: void Error( SbError c ) { GenError( c ); } void Error( SbError, SbiToken ); void Error( SbError, const char* ); - void Error( SbError, const ::rtl::OUString &); + void Error( SbError, const OUString &); static bool IsEoln( SbiToken t ) { return t == EOS || t == EOLN || t == REM; } diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx index 14d782ac68be..b1caceb3af06 100644 --- a/basic/source/runtime/dllmgr-x64.cxx +++ b/basic/source/runtime/dllmgr-x64.cxx @@ -62,7 +62,7 @@ char * address(std::vector< char > & blob) { return blob.empty() ? 0 : &blob[0]; } -SbError convert(rtl::OUString const & source, rtl::OString * target) { +SbError convert(OUString const & source, OString * target) { return source.convertToString( target, osl_getThreadTextEncoding(), @@ -72,7 +72,7 @@ SbError convert(rtl::OUString const & source, rtl::OString * target) { //TODO: more specific errcode? } -SbError convert(char const * source, sal_Int32 length, rtl::OUString * target) { +SbError convert(char const * source, sal_Int32 length, OUString * target) { return rtl_convertStringToUString( &target->pData, source, length, osl_getThreadTextEncoding(), @@ -184,7 +184,7 @@ SbError marshalString( SbxVariable * variable, bool special, MarshalData & data, void ** buffer) { OSL_ASSERT(variable != 0 && buffer != 0); - rtl::OString str; + OString str; SbError e = convert(variable->GetOUString(), &str); if (e != ERRCODE_NONE) { return e; @@ -430,7 +430,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) { } SbError unmarshalString(StringData const & data, SbxVariable & result) { - rtl::OUString str; + OUString str; if (data.buffer != 0) { char const * p = static_cast< char const * >(data.buffer); sal_Int32 len; @@ -453,12 +453,12 @@ SbError unmarshalString(StringData const & data, SbxVariable & result) { } struct ProcData { - rtl::OString name; + OString name; FARPROC proc; }; SbError call( - rtl::OUString const & dll, ProcData const & proc, SbxArray * arguments, + OUString const & dll, ProcData const & proc, SbxArray * arguments, SbxVariable & result) { if (arguments->Count() > 20) @@ -472,10 +472,8 @@ SbError call( // requires special handling in unmarshalString; other functions might // require similar treatment, too: bool special = - dll.equalsIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("KERNEL32.DLL")) && - (proc.name == - rtl::OString(RTL_CONSTASCII_STRINGPARAM("GetLogicalDriveStringsA"))); + dll.equalsIgnoreAsciiCase("KERNEL32.DLL") && + (proc.name == OString("GetLogicalDriveStringsA")); for (int i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) { SbError e = marshal( true, arguments->Get(i), special && i == 2, stack, stack.size(), @@ -570,7 +568,7 @@ SbError call( case SbxSTRING: { char const * s1 = reinterpret_cast< char const * >(iRetVal); - rtl::OUString s2; + OUString s2; SbError e = convert(s1, rtl_str_getLength(s1), &s2); if (e != ERRCODE_NONE) { return e; @@ -611,7 +609,7 @@ SbError call( return ERRCODE_NONE; } -SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) +SbError getProcData(HMODULE handle, OUString const & name, ProcData * proc) { OSL_ASSERT(proc != 0); if (name.getLength() != 0 && name[0] == '@') { //TODO: "@" vs. "#"??? @@ -621,13 +619,12 @@ SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) } FARPROC p = GetProcAddress(handle, reinterpret_cast< LPCSTR >(n)); if (p != 0) { - proc->name = rtl::OString(RTL_CONSTASCII_STRINGPARAM("#")) + - rtl::OString::valueOf(n); + proc->name = OString("#") + OString::valueOf(n); proc->proc = p; return ERRCODE_NONE; } } else { - rtl::OString name8; + OString name8; SbError e = convert(name, &name8); if (e != ERRCODE_NONE) { return e; @@ -648,15 +645,14 @@ SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) return ERRCODE_NONE; } } - rtl::OString real( - rtl::OString(RTL_CONSTASCII_STRINGPARAM("_")) + name8); + OString real(OString("_") + name8); p = GetProcAddress(handle, real.getStr()); if (p != 0) { proc->name = real; proc->proc = p; return ERRCODE_NONE; } - real = name8 + rtl::OString(RTL_CONSTASCII_STRINGPARAM("A")); + real = name8 + OString("A"); p = GetProcAddress(handle, real.getStr()); if (p != 0) { proc->name = real; @@ -669,14 +665,14 @@ SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) struct Dll: public salhelper::SimpleReferenceObject { private: - typedef std::map< rtl::OUString, ProcData > Procs; + typedef std::map< OUString, ProcData > Procs; virtual ~Dll(); public: Dll(): handle(0) {} - SbError getProc(rtl::OUString const & name, ProcData * proc); + SbError getProc(OUString const & name, ProcData * proc); HMODULE handle; Procs procs; @@ -688,7 +684,7 @@ Dll::~Dll() { } } -SbError Dll::getProc(rtl::OUString const & name, ProcData * proc) { +SbError Dll::getProc(OUString const & name, ProcData * proc) { Procs::iterator i(procs.find(name)); if (i != procs.end()) { *proc = i->second; @@ -701,10 +697,10 @@ SbError Dll::getProc(rtl::OUString const & name, ProcData * proc) { return e; } -rtl::OUString fullDllName(rtl::OUString const & name) { - rtl::OUString full(name); +OUString fullDllName(OUString const & name) { + OUString full(name); if (full.indexOf('.') == -1) { - full += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".DLL")); + full += OUString(".DLL"); } return full; } @@ -713,15 +709,15 @@ rtl::OUString fullDllName(rtl::OUString const & name) { struct SbiDllMgr::Impl: private boost::noncopyable { private: - typedef std::map< rtl::OUString, rtl::Reference< Dll > > Dlls; + typedef std::map< OUString, Reference< Dll > > Dlls; public: - Dll * getDll(rtl::OUString const & name); + Dll * getDll(OUString const & name); Dlls dlls; }; -Dll * SbiDllMgr::Impl::getDll(rtl::OUString const & name) { +Dll * SbiDllMgr::Impl::getDll(OUString const & name) { Dlls::iterator i(dlls.find(name)); if (i == dlls.end()) { i = dlls.insert(Dlls::value_type(name, new Dll)).first; @@ -736,13 +732,13 @@ Dll * SbiDllMgr::Impl::getDll(rtl::OUString const & name) { } SbError SbiDllMgr::Call( - rtl::OUString const & function, rtl::OUString const & library, + OUString const & function, OUString const & library, SbxArray * arguments, SbxVariable & result, bool cdeclConvention) { if (cdeclConvention) { return ERRCODE_BASIC_NOT_IMPLEMENTED; } - rtl::OUString dllName(fullDllName(library)); + OUString dllName(fullDllName(library)); Dll * dll = impl_->getDll(dllName); if (dll == 0) { return ERRCODE_BASIC_BAD_DLL_LOAD; @@ -755,7 +751,7 @@ SbError SbiDllMgr::Call( return call(dllName, proc, arguments, result); } -void SbiDllMgr::FreeDll(rtl::OUString const & library) { +void SbiDllMgr::FreeDll(OUString const & library) { impl_->dlls.erase(library); } diff --git a/basic/source/runtime/dllmgr-x86.cxx b/basic/source/runtime/dllmgr-x86.cxx index 1e6bec350237..777a18e99b7f 100644 --- a/basic/source/runtime/dllmgr-x86.cxx +++ b/basic/source/runtime/dllmgr-x86.cxx @@ -70,7 +70,7 @@ char * address(std::vector< char > & blob) { return blob.empty() ? 0 : &blob[0]; } -SbError convert(rtl::OUString const & source, rtl::OString * target) { +SbError convert(OUString const & source, OString * target) { return source.convertToString( target, osl_getThreadTextEncoding(), @@ -80,7 +80,7 @@ SbError convert(rtl::OUString const & source, rtl::OString * target) { //TODO: more specific errcode? } -SbError convert(char const * source, sal_Int32 length, rtl::OUString * target) { +SbError convert(char const * source, sal_Int32 length, OUString * target) { return rtl_convertStringToUString( &target->pData, source, length, osl_getThreadTextEncoding(), @@ -192,7 +192,7 @@ SbError marshalString( SbxVariable * variable, bool special, MarshalData & data, void ** buffer) { OSL_ASSERT(variable != 0 && buffer != 0); - rtl::OString str; + OString str; SbError e = convert(variable->GetOUString(), &str); if (e != ERRCODE_NONE) { return e; @@ -445,7 +445,7 @@ void const * unmarshal(SbxVariable * variable, void const * data) { } SbError unmarshalString(StringData const & data, SbxVariable & result) { - rtl::OUString str; + OUString str; if (data.buffer != 0) { char const * p = static_cast< char const * >(data.buffer); sal_Int32 len; @@ -468,12 +468,12 @@ SbError unmarshalString(StringData const & data, SbxVariable & result) { } struct ProcData { - rtl::OString name; + OString name; FARPROC proc; }; SbError call( - rtl::OUString const & dll, ProcData const & proc, SbxArray * arguments, + OUString const & dll, ProcData const & proc, SbxArray * arguments, SbxVariable & result) { std::vector< char > stack; @@ -482,11 +482,8 @@ SbError call( // from kernel32, upon return, filled lpBuffer length is result DWORD, which // requires special handling in unmarshalString; other functions might // require similar treatment, too: - bool special = - dll.equalsIgnoreAsciiCaseAsciiL( - RTL_CONSTASCII_STRINGPARAM("KERNEL32.DLL")) && - (proc.name == - rtl::OString(RTL_CONSTASCII_STRINGPARAM("GetLogicalDriveStringsA"))); + bool special = dll.equalsIgnoreAsciiCase("KERNEL32.DLL") && + (proc.name == OString("GetLogicalDriveStringsA")); for (sal_uInt16 i = 1; i < (arguments == 0 ? 0 : arguments->Count()); ++i) { SbError e = marshal( true, arguments->Get(i), special && i == 2, stack, stack.size(), @@ -523,7 +520,7 @@ SbError call( { char const * s1 = reinterpret_cast< char const * >( DllMgr_call32(proc.proc, address(stack), stack.size())); - rtl::OUString s2; + OUString s2; SbError e = convert(s1, rtl_str_getLength(s1), &s2); if (e != ERRCODE_NONE) { return e; @@ -569,7 +566,7 @@ SbError call( return ERRCODE_NONE; } -SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) +SbError getProcData(HMODULE handle, OUString const & name, ProcData * proc) { OSL_ASSERT(proc != 0); if (name.getLength() != 0 && name[0] == '@') { //TODO: "@" vs. "#"??? @@ -579,13 +576,12 @@ SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) } FARPROC p = GetProcAddress(handle, reinterpret_cast< LPCSTR >(n)); if (p != 0) { - proc->name = rtl::OString(RTL_CONSTASCII_STRINGPARAM("#")) + - rtl::OString::valueOf(n); + proc->name = OString("#") + OString::valueOf(n); proc->proc = p; return ERRCODE_NONE; } } else { - rtl::OString name8; + OString name8; SbError e = convert(name, &name8); if (e != ERRCODE_NONE) { return e; @@ -606,15 +602,14 @@ SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) return ERRCODE_NONE; } } - rtl::OString real( - rtl::OString(RTL_CONSTASCII_STRINGPARAM("_")) + name8); + OString real(OString("_") + name8); p = GetProcAddress(handle, real.getStr()); if (p != 0) { proc->name = real; proc->proc = p; return ERRCODE_NONE; } - real = name8 + rtl::OString(RTL_CONSTASCII_STRINGPARAM("A")); + real = name8 + OString("A"); p = GetProcAddress(handle, real.getStr()); if (p != 0) { proc->name = real; @@ -627,14 +622,14 @@ SbError getProcData(HMODULE handle, rtl::OUString const & name, ProcData * proc) struct Dll: public salhelper::SimpleReferenceObject { private: - typedef std::map< rtl::OUString, ProcData > Procs; + typedef std::map< OUString, ProcData > Procs; virtual ~Dll(); public: Dll(): handle(0) {} - SbError getProc(rtl::OUString const & name, ProcData * proc); + SbError getProc(OUString const & name, ProcData * proc); HMODULE handle; Procs procs; @@ -646,7 +641,7 @@ Dll::~Dll() { } } -SbError Dll::getProc(rtl::OUString const & name, ProcData * proc) { +SbError Dll::getProc(OUString const & name, ProcData * proc) { Procs::iterator i(procs.find(name)); if (i != procs.end()) { *proc = i->second; @@ -659,10 +654,10 @@ SbError Dll::getProc(rtl::OUString const & name, ProcData * proc) { return e; } -rtl::OUString fullDllName(rtl::OUString const & name) { - rtl::OUString full(name); +OUString fullDllName(OUString const & name) { + OUString full(name); if (full.indexOf('.') == -1) { - full += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".DLL")); + full += OUString(".DLL"); } return full; } @@ -671,15 +666,15 @@ rtl::OUString fullDllName(rtl::OUString const & name) { struct SbiDllMgr::Impl: private boost::noncopyable { private: - typedef std::map< rtl::OUString, rtl::Reference< Dll > > Dlls; + typedef std::map< OUString, Reference< Dll > > Dlls; public: - Dll * getDll(rtl::OUString const & name); + Dll * getDll(OUString const & name); Dlls dlls; }; -Dll * SbiDllMgr::Impl::getDll(rtl::OUString const & name) { +Dll * SbiDllMgr::Impl::getDll(OUString const & name) { Dlls::iterator i(dlls.find(name)); if (i == dlls.end()) { i = dlls.insert(Dlls::value_type(name, new Dll)).first; @@ -694,13 +689,13 @@ Dll * SbiDllMgr::Impl::getDll(rtl::OUString const & name) { } SbError SbiDllMgr::Call( - rtl::OUString const & function, rtl::OUString const & library, + OUString const & function, OUString const & library, SbxArray * arguments, SbxVariable & result, bool cdeclConvention) { if (cdeclConvention) { return ERRCODE_BASIC_NOT_IMPLEMENTED; } - rtl::OUString dllName(fullDllName(library)); + OUString dllName(fullDllName(library)); Dll * dll = impl_->getDll(dllName); if (dll == 0) { return ERRCODE_BASIC_BAD_DLL_LOAD; @@ -713,7 +708,7 @@ SbError SbiDllMgr::Call( return call(dllName, proc, arguments, result); } -void SbiDllMgr::FreeDll(rtl::OUString const & library) { +void SbiDllMgr::FreeDll(OUString const & library) { impl_->dlls.erase(library); } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 60ed9145612e..bc4d78a08836 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -173,7 +173,7 @@ void SbiStream::MapError() // TODO: Code is copied from daemons2/source/uno/asciiEncoder.cxx -OUString findUserInDescription( const ::rtl::OUString& aDescription ) +OUString findUserInDescription( const OUString& aDescription ) { OUString user; @@ -287,7 +287,7 @@ bool hasUno( void ) { Reference< XUniversalContentBroker > xManager = UniversalContentBroker::create(xContext); - if ( !( xManager->queryContentProvider( ::rtl::OUString("file:///" ) ).is() ) ) + if ( !( xManager->queryContentProvider( OUString("file:///" ) ).is() ) ) { // No UCB bRetVal = false; @@ -841,7 +841,7 @@ void SbiIoSystem::Shutdown() // anything left to PRINT? if( !aOut.isEmpty() ) { - rtl::OUString aOutStr(rtl::OStringToOUString(aOut, osl_getThreadTextEncoding())); + OUString aOutStr(rtl::OStringToOUString(aOut, osl_getThreadTextEncoding())); #if defined __GNUC__ Window* pParent = Application::GetDefDialogParent(); MessBox( pParent, WinBits( WB_OK ), OUString(), aOutStr ).Execute(); @@ -951,7 +951,7 @@ void SbiIoSystem::ReadCon(rtl::OString& rIn) SbiInputDialog aDlg( NULL, aPromptStr ); if( aDlg.Execute() ) { - rIn = rtl::OUStringToOString(aDlg.GetInput(), osl_getThreadTextEncoding()); + rIn = OUStringToOString(aDlg.GetInput(), osl_getThreadTextEncoding()); } else { diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 20fee906bd03..45e59a6b4b81 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -120,7 +120,7 @@ static void FilterWhiteSpace( OUString& rStr ) { return; } - rtl::OUStringBuffer aRet; + OUStringBuffer aRet; for (sal_Int32 i = 0; i < rStr.getLength(); ++i) { @@ -372,7 +372,7 @@ void implChr( SbxArray& rPar, bool bChrW ) if( !bChrW && SbiRuntime::isVBAEnabled() ) { sal_Char c = static_cast<sal_Char>(pArg->GetByte()); - aStr = rtl::OUString(&c, 1, osl_getThreadTextEncoding()); + aStr = OUString(&c, 1, osl_getThreadTextEncoding()); } else { @@ -444,7 +444,7 @@ RTLFUNC(CurDir) char* pBuffer = new char[ _MAX_PATH ]; if ( _getdcwd( nCurDir, pBuffer, _MAX_PATH ) != 0 ) { - rPar.Get(0)->PutString( rtl::OUString::createFromAscii( pBuffer ) ); + rPar.Get(0)->PutString( OUString::createFromAscii( pBuffer ) ); } else { @@ -466,7 +466,7 @@ RTLFUNC(CurDir) } if( getcwd( pMem, nSize-1 ) != NULL ) { - rPar.Get(0)->PutString( rtl::OUString::createFromAscii(pMem) ); + rPar.Get(0)->PutString( OUString::createFromAscii(pMem) ); delete [] pMem; return; } @@ -868,7 +868,7 @@ RTLFUNC(Hex) sal_uInt32 nVal = pArg->IsInteger() ? static_cast<sal_uInt16>(pArg->GetInteger()) : static_cast<sal_uInt32>(pArg->GetLong()); - rtl::OUString aStr(rtl::OUString::valueOf( sal_Int64(nVal), 16 )); + OUString aStr(OUString::valueOf( sal_Int64(nVal), 16 )); aStr = aStr.toAsciiUpperCase(); rPar.Get(0)->PutString( aStr ); } @@ -1315,7 +1315,7 @@ RTLFUNC(Oct) { snprintf( aBuffer, sizeof(aBuffer), "%lo", static_cast<long unsigned int>(pArg->GetLong()) ); } - rPar.Get(0)->PutString( rtl::OUString::createFromAscii( aBuffer ) ); + rPar.Get(0)->PutString( OUString::createFromAscii( aBuffer ) ); } } @@ -1777,7 +1777,7 @@ RTLFUNC(Val) } if ( nRadix != 10 ) { - OString aByteStr(rtl::OUStringToOString(aStr, osl_getThreadTextEncoding())); + OString aByteStr(OUStringToOString(aStr, osl_getThreadTextEncoding())); sal_Int16 nlResult = (sal_Int16)strtol( aByteStr.getStr()+2, &pEndPtr, nRadix); nResult = (double)nlResult; } @@ -1839,7 +1839,7 @@ RTLFUNC(CDateToIso) implGetDateYear( aDate ), implGetDateMonth( aDate ), implGetDateDay( aDate ) ); - OUString aRetStr = rtl::OUString::createFromAscii( Buffer ); + OUString aRetStr = OUString::createFromAscii( Buffer ); rPar.Get(0)->PutString( aRetStr ); } else @@ -2219,7 +2219,7 @@ RTLFUNC(Time) char buf[ 20 ]; snprintf( buf, sizeof(buf), "%02d:%02d:%02d", aTime.GetHour(), aTime.GetMin(), aTime.GetSec() ); - aRes = rtl::OUString::createFromAscii( buf ); + aRes = OUString::createFromAscii( buf ); } else { @@ -2749,11 +2749,11 @@ RTLFUNC(Dir) { if( pRTLData->nCurDirPos == -2 ) { - aPath = ::rtl::OUString("." ); + aPath = OUString("." ); } else if( pRTLData->nCurDirPos == -1 ) { - aPath = ::rtl::OUString(".." ); + aPath = OUString(".." ); } pRTLData->nCurDirPos++; } @@ -2865,11 +2865,11 @@ RTLFUNC(Dir) { if( pRTLData->nCurDirPos == -2 ) { - aPath = ::rtl::OUString("." ); + aPath = OUString("." ); } else if( pRTLData->nCurDirPos == -1 ) { - aPath = ::rtl::OUString(".." ); + aPath = OUString(".." ); } pRTLData->nCurDirPos++; } @@ -2935,7 +2935,7 @@ RTLFUNC(GetAttr) aEntry.ToAbs(); // #57064 extract the real-path for virtual URLs - OString aByteStrFullPath(rtl::OUStringToOString(aEntry.GetFull(), + OString aByteStrFullPath(OUStringToOString(aEntry.GetFull(), osl_getThreadTextEncoding())); DWORD nRealFlags = GetFileAttributes (aByteStrFullPath.getStr()); if (nRealFlags != 0xffffffff) @@ -3620,7 +3620,7 @@ OUString getBasicTypeName( SbxDataType eType ) { nPos = nTypeNameCount - 1; } - return rtl::OUString::createFromAscii(pTypeNames[nPos]); + return OUString::createFromAscii(pTypeNames[nPos]); } String getObjectTypeName( SbxVariable* pVar ) @@ -3655,7 +3655,7 @@ String getObjectTypeName( SbxVariable* pVar ) { // is this a VBA object ? uno::Reference< ooo::vba::XHelperInterface > xVBA( aObj, uno::UNO_QUERY ); - Sequence< rtl::OUString > sServices = xServInfo->getSupportedServiceNames(); + Sequence< OUString > sServices = xServInfo->getSupportedServiceNames(); if ( sServices.getLength() ) { sRet = sServices[ 0 ]; @@ -3671,7 +3671,7 @@ String getObjectTypeName( SbxVariable* pVar ) { try { - xInv->getValue( rtl::OUString( "$GetTypeName" ) ) >>= sRet; + xInv->getValue( OUString( "$GetTypeName" ) ) >>= sRet; } catch(const Exception& ) { @@ -4149,11 +4149,11 @@ RTLFUNC(StrConv) } } pChar[nSize] = '\0'; - ::rtl::OString aOStr(pChar); + OString aOStr(pChar); delete[] pChar; // there is no concept about default codepage in unix. so it is incorrectly in unix - OUString aOUStr = ::rtl::OStringToOUString(aOStr, osl_getThreadTextEncoding()); + OUString aOUStr = OStringToOUString(aOStr, osl_getThreadTextEncoding()); rPar.Get(0)->PutString( aOUStr ); return; } @@ -4161,7 +4161,7 @@ RTLFUNC(StrConv) { OUString aOUStr(aNewStr); // there is no concept about default codepage in unix. so it is incorrectly in unix - ::rtl::OString aOStr = ::rtl::OUStringToOString(aNewStr,osl_getThreadTextEncoding()); + OString aOStr = OUStringToOString(aNewStr,osl_getThreadTextEncoding()); const sal_Char* pChar = aOStr.getStr(); sal_Int32 nArraySize = aOStr.getLength(); SbxDimArray* pArray = new SbxDimArray(SbxBYTE); @@ -4619,8 +4619,8 @@ RTLFUNC(Partition) // will be handled properly during any subsequent sort operation. // calculate the maximun number of characters before lowervalue and uppervalue - OUString aBeforeStart = ::rtl::OUString::valueOf( nStart - 1 ); - OUString aAfterStop = ::rtl::OUString::valueOf( nStop + 1 ); + OUString aBeforeStart = OUString::valueOf( nStart - 1 ); + OUString aAfterStop = OUString::valueOf( nStop + 1 ); sal_Int32 nLen1 = aBeforeStart.getLength(); sal_Int32 nLen2 = aAfterStop.getLength(); sal_Int32 nLen = nLen1 >= nLen2 ? nLen1:nLen2; @@ -4645,8 +4645,8 @@ RTLFUNC(Partition) nLowerValue = ((( nNumber - nStart ) / nInterval ) * nInterval ) + nStart; nUpperValue = nLowerValue + nInterval - 1; } - aLowerValue = ::rtl::OUString::valueOf( nLowerValue ); - aUpperValue = ::rtl::OUString::valueOf( nUpperValue ); + aLowerValue = OUString::valueOf( nLowerValue ); + aUpperValue = OUString::valueOf( nUpperValue ); } nLen1 = aLowerValue.getLength(); diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index feee72c0db8c..4f1397044673 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -148,7 +148,7 @@ void SbiRuntime::StepPAD( sal_uInt32 nOp1 ) sal_Int32 nLen(nOp1); if( s.getLength() != nLen ) { - rtl::OUStringBuffer aBuf(s); + OUStringBuffer aBuf(s); if (aBuf.getLength() > nLen) { comphelper::string::truncateToLength(aBuf, nLen); @@ -435,7 +435,7 @@ bool SbiRuntime::implIsClass( SbxObject* pObj, const OUString& aClass ) { bRet = pObj->IsClass( aClass ); if( !bRet ) - bRet = aClass.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM("object") ); + bRet = aClass.equalsIgnoreAsciiCase( "object" ); if( !bRet ) { OUString aObjClass = pObj->GetClassName(); diff --git a/basic/source/runtime/step2.cxx b/basic/source/runtime/step2.cxx index 0f6c07bd2b67..d7f2a8dd9308 100644 --- a/basic/source/runtime/step2.cxx +++ b/basic/source/runtime/step2.cxx @@ -616,7 +616,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) } else if( xIndexAccess.is() ) { - sDefaultMethod = OUString( RTL_CONSTASCII_USTRINGPARAM( "getByIndex" ) ); + sDefaultMethod = OUString( "getByIndex" ); } if ( !sDefaultMethod.isEmpty() ) { @@ -979,7 +979,7 @@ void SbiRuntime::StepOPEN( sal_uInt32 nOp1, sal_uInt32 nOp2 ) SbxVariableRef pLen = PopVar(); short nBlkLen = pLen->GetInteger(); short nChan = pChan->GetInteger(); - OString aName(rtl::OUStringToOString(pName->GetOUString(), osl_getThreadTextEncoding())); + OString aName(OUStringToOString(pName->GetOUString(), osl_getThreadTextEncoding())); pIosys->Open( nChan, aName, static_cast<short>( nOp1 ), static_cast<short>( nOp2 ), nBlkLen ); Error( pIosys->GetError() ); diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx index 1716037b36ca..426552da7ec5 100644 --- a/basic/source/sbx/sbxbool.cxx +++ b/basic/source/sbx/sbxbool.cxx @@ -174,7 +174,7 @@ void ImpPutBool( SbxValues* p, sal_Int16 n ) case SbxSTRING: case SbxLPSTR: if ( !p->pOUString ) - p->pOUString = new ::rtl::OUString( SbxRes( n ? STRING_TRUE : STRING_FALSE ) ); + p->pOUString = new OUString( SbxRes( n ? STRING_TRUE : STRING_FALSE ) ); else *p->pOUString = SbxRes( n ? STRING_TRUE : STRING_FALSE ); break; diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx index bcfebdaaf97d..9c9522294023 100644 --- a/basic/source/sbx/sbxbyte.cxx +++ b/basic/source/sbx/sbxbyte.cxx @@ -259,7 +259,7 @@ void ImpPutByte( SbxValues* p, sal_uInt8 n ) case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx index 6ab71a64524a..9628be2cbe91 100644 --- a/basic/source/sbx/sbxchar.cxx +++ b/basic/source/sbx/sbxchar.cxx @@ -249,9 +249,9 @@ start: case SbxSTRING: case SbxLPSTR: if ( !p->pOUString ) - p->pOUString = new ::rtl::OUString( n ); + p->pOUString = new OUString( n ); else - *p->pOUString = ::rtl::OUString( n ); + *p->pOUString = OUString( n ); break; case SbxOBJECT: { diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx index 4b369ce70768..433de01ca0e4 100644 --- a/basic/source/sbx/sbxconv.hxx +++ b/basic/source/sbx/sbxconv.hxx @@ -25,13 +25,13 @@ class SbxArray; // SBXSCAN.CXX -extern void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreString=false ); +extern void ImpCvtNum( double nNum, short nPrec, OUString& rRes, bool bCoreString=false ); extern SbxError ImpScan - ( const ::rtl::OUString& rSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, + ( const OUString& rSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, bool bAllowIntntl=false, bool bOnlyIntntl=false ); // with advanced evaluation (International, "TRUE"/"FALSE") -extern bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ); +extern bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType ); void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep ); @@ -93,9 +93,9 @@ void ImpPutDate( SbxValues*, double ); // SBXSTR.CXX -::rtl::OUString ImpGetString( const SbxValues* ); -::rtl::OUString ImpGetCoreString( const SbxValues* ); -void ImpPutString( SbxValues*, const ::rtl::OUString* ); +OUString ImpGetString( const SbxValues* ); +OUString ImpGetCoreString( const SbxValues* ); +void ImpPutString( SbxValues*, const OUString* ); // SBXCHAR.CXX @@ -122,8 +122,8 @@ enum SbxBOOL ImpGetBool( const SbxValues* ); void ImpPutBool( SbxValues*, sal_Int16 ); // ByteArray <--> String -SbxArray* StringToByteArray(const ::rtl::OUString& rStr); -::rtl::OUString ByteArrayToString(SbxArray* pArr); +SbxArray* StringToByteArray(const OUString& rStr); +OUString ByteArrayToString(SbxArray* pArr); #endif diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx index 4add26a22a8a..e349a946c337 100644 --- a/basic/source/sbx/sbxdbl.cxx +++ b/basic/source/sbx/sbxdbl.cxx @@ -194,7 +194,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 14, *p->pOUString, bCoreString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 0343d5966f6d..276b78857e56 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -192,7 +192,7 @@ void SbxDecimal::setUInt( unsigned int val ) setULong( (sal_uInt32)val ); } -bool SbxDecimal::setString( ::rtl::OUString* pOUString ) +bool SbxDecimal::setString( OUString* pOUString ) { static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ); @@ -332,7 +332,7 @@ bool SbxDecimal::setSingle( float val ) { (void)val; return false; } bool SbxDecimal::setDouble( double val ) { (void)val; return false; } void SbxDecimal::setInt( int val ) { (void)val; } void SbxDecimal::setUInt( unsigned int val ) { (void)val; } -bool SbxDecimal::setString( ::rtl::OUString* pOUString ) { (void)pOUString; return false; } +bool SbxDecimal::setString( OUString* pOUString ) { (void)pOUString; return false; } bool SbxDecimal::getChar( sal_Unicode& rVal ) { (void)rVal; return false; } bool SbxDecimal::getShort( sal_Int16& rVal ) { (void)rVal; return false; } @@ -344,7 +344,7 @@ bool SbxDecimal::getDouble( double& rVal ) { (void)rVal; return false; } #endif -bool SbxDecimal::getString( ::rtl::OUString& rString ) +bool SbxDecimal::getString( OUString& rString ) { #ifdef WIN32 static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ); @@ -589,7 +589,7 @@ start: case SbxSTRING: case SbxBYREF | SbxSTRING: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; pDec->getString( *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx index 89977091d764..73ba5732e4e3 100644 --- a/basic/source/sbx/sbxdec.hxx +++ b/basic/source/sbx/sbxdec.hxx @@ -75,7 +75,7 @@ public: bool setDouble( double val ); void setInt( int val ); void setUInt( unsigned int val ); - bool setString( ::rtl::OUString* pOUString ); + bool setString( OUString* pOUString ); void setDecimal( SbxDecimal* pDecimal ) { #ifdef WIN32 @@ -95,7 +95,7 @@ public: bool getDouble( double& rVal ); bool getInt( int& rVal ); bool getUInt( unsigned int& rVal ); - bool getString( ::rtl::OUString& rString ); + bool getString( OUString& rString ); bool operator -= ( const SbxDecimal &r ); bool operator += ( const SbxDecimal &r ); diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx index 61b601e3aec8..dc8cd944ba63 100644 --- a/basic/source/sbx/sbxint.cxx +++ b/basic/source/sbx/sbxint.cxx @@ -264,7 +264,7 @@ start: case SbxSTRING: case SbxBYREF | SbxSTRING: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: @@ -433,7 +433,7 @@ start: nRes = 0; else { - ::rtl::OString aOStr = ::rtl::OUStringToOString + ::OString aOStr = OUStringToOString ( *p->pOUString, RTL_TEXTENCODING_ASCII_US ); nRes = aOStr.toInt64(); if( nRes == 0 ) @@ -541,10 +541,10 @@ start: case SbxLPSTR: { if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; - ::rtl::OString aOStr = ::rtl::OString::valueOf( n ); - (*p->pOUString) = ::rtl::OStringToOUString + ::OString aOStr = ::OString::valueOf( n ); + (*p->pOUString) = ::OStringToOUString ( aOStr, RTL_TEXTENCODING_ASCII_US ); break; } @@ -694,7 +694,7 @@ start: nRes = 0; else { - ::rtl::OString aOStr = ::rtl::OUStringToOString + ::OString aOStr = OUStringToOString ( *p->pOUString, RTL_TEXTENCODING_ASCII_US ); sal_Int64 n64 = aOStr.toInt64(); if( n64 == 0 ) @@ -816,13 +816,13 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; if( n > SbxMAXSALINT64 ) SbxBase::SetError( SbxERR_CONVERSION ); else { - ::rtl::OString aOStr = ::rtl::OString::valueOf( (sal_Int64)n ); - (*p->pOUString) = ::rtl::OStringToOUString + ::OString aOStr = ::OString::valueOf( (sal_Int64)n ); + (*p->pOUString) = ::OStringToOUString ( aOStr, RTL_TEXTENCODING_ASCII_US ); } break; diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx index 90cf5f9e0038..5b633cb0e1e3 100644 --- a/basic/source/sbx/sbxlng.cxx +++ b/basic/source/sbx/sbxlng.cxx @@ -225,7 +225,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx index e72a2821c5f0..2ce01fc4d4ed 100644 --- a/basic/source/sbx/sbxobj.cxx +++ b/basic/source/sbx/sbxobj.cxx @@ -39,8 +39,8 @@ SbxObject::SbxObject( const OUString& rClass ) aData.pObj = this; if( !nNameHash ) { - pNameProp = ::rtl::OUString::createFromAscii(GetSbxRes( STRING_NAMEPROP )); - pParentProp = ::rtl::OUString::createFromAscii(GetSbxRes( STRING_PARENTPROP )); + pNameProp = OUString::createFromAscii(GetSbxRes( STRING_NAMEPROP )); + pParentProp = OUString::createFromAscii(GetSbxRes( STRING_PARENTPROP )); nNameHash = MakeHashCode( pNameProp ); nParentHash = MakeHashCode( pParentProp ); } @@ -214,8 +214,8 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) #ifdef DBG_UTIL static sal_uInt16 nLvl = 0; static const char* pCls[] = { "DontCare","Array","Value","Variable","Method","Property","Object" }; - rtl::OString aNameStr1(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Search %.*s %s %s in %s", nLvl++, " ", ( t >= SbxCLASS_DONTCARE && t <= SbxCLASS_OBJECT ) @@ -283,8 +283,8 @@ SbxVariable* SbxObject::Find( const OUString& rName, SbxClassType t ) nLvl--; if( pRes ) { - rtl::OString aNameStr3(rtl::OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr4(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr3(OUStringToOString(rName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr4(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Found %.*s %s in %s", nLvl, " ", aNameStr3.getStr(), aNameStr4.getStr() ); } @@ -499,8 +499,8 @@ void SbxObject::Insert( SbxVariable* pVar ) { aVarName = PTR_CAST(SbxObject,pVar)->GetClassName(); } - rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Insert %s %s in %s", ( pVar->GetClass() >= SbxCLASS_DONTCARE && pVar->GetClass() <= SbxCLASS_OBJECT ) @@ -542,8 +542,8 @@ void SbxObject::QuickInsert( SbxVariable* pVar ) { aVarName = PTR_CAST(SbxObject,pVar)->GetClassName(); } - rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); DbgOutf( "SBX: Insert %s %s in %s", ( pVar->GetClass() >= SbxCLASS_DONTCARE && pVar->GetClass() <= SbxCLASS_OBJECT ) @@ -569,8 +569,8 @@ void SbxObject::Remove( SbxVariable* pVar ) { aVarName = PTR_CAST(SbxObject,pVar)->GetClassName(); } - rtl::OString aNameStr1(rtl::OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); - rtl::OString aNameStr2(rtl::OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr1(OUStringToOString(aVarName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr2(OUStringToOString(SbxVariable::GetName(), RTL_TEXTENCODING_ASCII_US)); #endif SbxVariableRef pVar_ = pArray->Get( nIdx ); if( pVar_->IsBroadcaster() ) @@ -823,8 +823,8 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill ) GetAll( SbxCLASS_DONTCARE ); } // Output the data of the object itself - rtl::OString aNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); - rtl::OString aClassNameStr(rtl::OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aClassNameStr(OUStringToOString(aClassName, RTL_TEXTENCODING_ASCII_US)); rStrm << "Object( " << rtl::OString::valueOf(reinterpret_cast<sal_Int64>(this)).getStr()<< "=='" << ( aNameStr.isEmpty() ? "<unnamed>" : aNameStr.getStr() ) << "', " @@ -834,7 +834,7 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill ) << " refs, "; if ( GetParent() ) { - rtl::OString aParentNameStr(rtl::OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); + rtl::OString aParentNameStr(OUStringToOString(GetName(), RTL_TEXTENCODING_ASCII_US)); rStrm << "in parent " << rtl::OString::valueOf(reinterpret_cast<sal_Int64>(GetParent())).getStr() << "=='" << ( aParentNameStr.isEmpty() ? "<unnamed>" : aParentNameStr.getStr() ) << "'"; @@ -844,14 +844,14 @@ void SbxObject::Dump( SvStream& rStrm, sal_Bool bFill ) rStrm << "no parent "; } rStrm << " )" << endl; - rtl::OString aIndentNameStr(rtl::OUStringToOString(aIndent, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aIndentNameStr(OUStringToOString(aIndent, RTL_TEXTENCODING_ASCII_US)); rStrm << aIndentNameStr.getStr() << "{" << endl; // Flags OUString aAttrs; if( CollectAttrs( this, aAttrs ) ) { - rtl::OString aAttrStr(rtl::OUStringToOString(aAttrs, RTL_TEXTENCODING_ASCII_US)); + rtl::OString aAttrStr(OUStringToOString(aAttrs, RTL_TEXTENCODING_ASCII_US)); rStrm << aIndentNameStr.getStr() << "- Flags: " << aAttrStr.getStr() << endl; } diff --git a/basic/source/sbx/sbxres.cxx b/basic/source/sbx/sbxres.cxx index 3f4ccd9fdfbb..1f588251dab0 100644 --- a/basic/source/sbx/sbxres.cxx +++ b/basic/source/sbx/sbxres.cxx @@ -78,7 +78,7 @@ const char* GetSbxRes( sal_uInt16 nId ) } SbxRes::SbxRes( sal_uInt16 nId ) - : ::rtl::OUString( ::rtl::OUString::createFromAscii( GetSbxRes( nId ) ) ) + : OUString( OUString::createFromAscii( GetSbxRes( nId ) ) ) {} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basic/source/sbx/sbxres.hxx b/basic/source/sbx/sbxres.hxx index 386fcd238c2e..e2e6eb41660e 100644 --- a/basic/source/sbx/sbxres.hxx +++ b/basic/source/sbx/sbxres.hxx @@ -67,7 +67,7 @@ #define SBXRES_MAX 44 -class SbxRes : public ::rtl::OUString +class SbxRes : public OUString { public: SbxRes( sal_uInt16 ); diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 4f080dd86ea0..4febd4c27935 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -59,10 +59,10 @@ void ImpGetIntntlSep( sal_Unicode& rcDecimalSep, sal_Unicode& rcThousandSep ) // but exponent may also be a D, so data type is SbxDOUBLED // conversion error if data type is fixed and it doesn't fit -SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType, +SbxError ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, bool bAllowIntntl, bool bOnlyIntntl ) { - ::rtl::OString aBStr( ::rtl::OUStringToOString( rWSrc, RTL_TEXTENCODING_ASCII_US ) ); + OString aBStr( OUStringToOString( rWSrc, RTL_TEXTENCODING_ASCII_US ) ); char cIntntlComma, cIntntl1000; char cNonIntntlComma = '.'; @@ -104,7 +104,7 @@ SbxError ImpScan( const ::rtl::OUString& rWSrc, double& nVal, SbxDataType& rType short comma = 0; short ndig = 0; short ncdig = 0; // number of digits after decimal point - rtl::OStringBuffer aSearchStr(RTL_CONSTASCII_STRINGPARAM("0123456789DEde")); + OStringBuffer aSearchStr("0123456789DEde"); aSearchStr.append(cNonIntntlComma); if( cIntntlComma != cNonIntntlComma ) aSearchStr.append(cIntntlComma); @@ -370,7 +370,7 @@ static void myftoa( double nNum, char * pBuf, short nPrec, short nExpWidth, // This routine is public because it's also used by the Put-functions // in the class SbxImpSTRING. -void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreString ) +void ImpCvtNum( double nNum, short nPrec, OUString& rRes, bool bCoreString ) { char *q; char cBuf[ 40 ], *p = cBuf; @@ -394,13 +394,13 @@ void ImpCvtNum( double nNum, short nPrec, ::rtl::OUString& rRes, bool bCoreStrin if( *p == cDecimalSep ) p--; while( *q ) *++p = *q++; *++p = 0; - rRes = ::rtl::OUString::createFromAscii( cBuf ); + rRes = OUString::createFromAscii( cBuf ); } -bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) +bool ImpConvStringExt( OUString& rSrc, SbxDataType eTargetType ) { bool bChanged = false; - ::rtl::OUString aNewString; + OUString aNewString; // only special cases are handled, nothing on default switch( eTargetType ) @@ -410,7 +410,7 @@ bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) case SbxDOUBLE: case SbxCURRENCY: { - ::rtl::OString aBStr( ::rtl::OUStringToOString( rSrc, RTL_TEXTENCODING_ASCII_US ) ); + OString aBStr( OUStringToOString( rSrc, RTL_TEXTENCODING_ASCII_US ) ); sal_Unicode cDecimalSep, cThousandSep; ImpGetIntntlSep( cDecimalSep, cThousandSep ); @@ -432,15 +432,15 @@ bool ImpConvStringExt( ::rtl::OUString& rSrc, SbxDataType eTargetType ) // check as string in case of sal_Bool sal_True and sal_False case SbxBOOL: { - if( rSrc.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ) + if( rSrc.equalsIgnoreAsciiCase("true") ) { - aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxTRUE ); + aNewString = OUString::valueOf( (sal_Int32)SbxTRUE ); bChanged = true; } else - if( rSrc.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("false")) ) + if( rSrc.equalsIgnoreAsciiCase("false") ) { - aNewString = ::rtl::OUString::valueOf( (sal_Int32)SbxFALSE ); + aNewString = OUString::valueOf( (sal_Int32)SbxFALSE ); bChanged = true; } break; @@ -742,7 +742,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const } else { - aFmtStr = rtl::OUString::createFromAscii(pInfo->mpOOoFormat); + aFmtStr = OUString::createFromAscii(pInfo->mpOOoFormat); aFormatter.PutandConvertEntry( aFmtStr, nCheckPos, nType, nIndex, LANGUAGE_ENGLISH, eLangType ); } aFormatter.GetOutputString( nNumber, nIndex, rRes, &pCol ); @@ -789,13 +789,13 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const } else { - rRes = rtl::OUString::valueOf(nMin); + rRes = OUString::valueOf(nMin); } } else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_W )) { sal_Int32 nWeekDay = implGetWeekDay( nNumber ); - rRes = rtl::OUString::valueOf(nWeekDay); + rRes = OUString::valueOf(nWeekDay); } else if( aFmtStr.equalsIgnoreAsciiCase( VBAFORMAT_Y )) { @@ -803,7 +803,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const double dBaseDate; implDateSerial( nYear, 1, 1, dBaseDate ); sal_Int32 nYear32 = 1 + sal_Int32( nNumber - dBaseDate ); - rRes = rtl::OUString::valueOf(nYear32); + rRes = OUString::valueOf(nYear32); } else { diff --git a/basic/source/sbx/sbxsng.cxx b/basic/source/sbx/sbxsng.cxx index f48d185e2829..a90dd61784c6 100644 --- a/basic/source/sbx/sbxsng.cxx +++ b/basic/source/sbx/sbxsng.cxx @@ -217,7 +217,7 @@ start: case SbxLPSTR: { if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 6, *p->pOUString ); break; } diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx index e0306fcfb6a3..24175fb1138d 100644 --- a/basic/source/sbx/sbxstr.cxx +++ b/basic/source/sbx/sbxstr.cxx @@ -27,10 +27,10 @@ // The conversion of an item onto String was handled via the Put-Methods // of the several data types to avoid double code. -::rtl::OUString ImpGetString( const SbxValues* p ) +OUString ImpGetString( const SbxValues* p ) { SbxValues aTmp; - ::rtl::OUString aRes; + OUString aRes; aTmp.eType = SbxSTRING; aTmp.pOUString = &aRes; switch( +p->eType ) @@ -100,7 +100,7 @@ case SbxERROR: // Here will be created the String "Error n" aRes = SbxRes( STRING_ERRORMSG ); - aRes += ::rtl::OUString( p->nUShort ); break; + aRes += OUString( p->nUShort ); break; case SbxDATE: ImpPutDate( &aTmp, p->nDouble ); break; @@ -136,13 +136,13 @@ } // From 1997-04-10, new function for SbxValue::GetCoreString() -::rtl::OUString ImpGetCoreString( const SbxValues* p ) +OUString ImpGetCoreString( const SbxValues* p ) { // For now only for double if( ( p->eType & (~SbxBYREF) ) == SbxDOUBLE ) { SbxValues aTmp; - rtl::OUString aRes; + OUString aRes; aTmp.eType = SbxSTRING; aTmp.pOUString = &aRes; if( p->eType == SbxDOUBLE ) @@ -155,15 +155,15 @@ return ImpGetString( p ); } -void ImpPutString( SbxValues* p, const ::rtl::OUString* n ) +void ImpPutString( SbxValues* p, const OUString* n ) { SbxValues aTmp; aTmp.eType = SbxSTRING; - ::rtl::OUString* pTmp = NULL; + OUString* pTmp = NULL; // as a precaution, if a NULL-Ptr appears if( !n ) - n = pTmp = new ::rtl::OUString; - aTmp.pOUString = (::rtl::OUString*)n; + n = pTmp = new OUString; + aTmp.pOUString = (OUString*)n; switch( +p->eType ) { case SbxCHAR: @@ -203,7 +203,7 @@ void ImpPutString( SbxValues* p, const ::rtl::OUString* n ) if( !n->isEmpty() ) { if( !p->pOUString ) - p->pOUString = new ::rtl::OUString( *n ); + p->pOUString = new OUString( *n ); else *p->pOUString = *n; } @@ -255,7 +255,7 @@ void ImpPutString( SbxValues* p, const ::rtl::OUString* n ) // Convert string to an array of bytes, preserving unicode (2bytes per character) -SbxArray* StringToByteArray(const ::rtl::OUString& rStr) +SbxArray* StringToByteArray(const OUString& rStr) { sal_Int32 nArraySize = rStr.getLength() * 2; const sal_Unicode* pSrc = rStr.getStr(); @@ -291,10 +291,10 @@ SbxArray* StringToByteArray(const ::rtl::OUString& rStr) } // Convert an array of bytes to string (2bytes per character) -::rtl::OUString ByteArrayToString(SbxArray* pArr) +OUString ByteArrayToString(SbxArray* pArr) { sal_uInt16 nCount = pArr->Count(); - ::rtl::OUStringBuffer aStrBuf; + OUStringBuffer aStrBuf; sal_Unicode aChar = 0; for( sal_uInt16 i = 0 ; i < nCount ; i++ ) { diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx index d9080c760069..e5f62f287cbd 100644 --- a/basic/source/sbx/sbxuint.cxx +++ b/basic/source/sbx/sbxuint.cxx @@ -258,7 +258,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxulng.cxx b/basic/source/sbx/sbxulng.cxx index 53b8958221c6..b96d8b41a420 100644 --- a/basic/source/sbx/sbxulng.cxx +++ b/basic/source/sbx/sbxulng.cxx @@ -223,7 +223,7 @@ start: case SbxSTRING: case SbxLPSTR: if( !p->pOUString ) - p->pOUString = new ::rtl::OUString; + p->pOUString = new OUString; ImpCvtNum( (double) n, 0, *p->pOUString ); break; case SbxOBJECT: diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index b14735c9890a..6b486669ac49 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -54,7 +54,7 @@ SbxValue::SbxValue( SbxDataType t, void* p ) : SbxBase() case SbxSINGLE: n |= SbxBYREF; aData.pSingle = (float*) p; break; case SbxDATE: case SbxDOUBLE: n |= SbxBYREF; aData.pDouble = (double*) p; break; - case SbxSTRING: n |= SbxBYREF; aData.pOUString = (::rtl::OUString*) p; break; + case SbxSTRING: n |= SbxBYREF; aData.pOUString = (OUString*) p; break; case SbxERROR: case SbxUSHORT: case SbxBOOL: n |= SbxBYREF; aData.pUShort = (sal_uInt16*) p; break; @@ -99,7 +99,7 @@ SbxValue::SbxValue( const SbxValue& r ) { case SbxSTRING: if( aData.pOUString ) - aData.pOUString = new ::rtl::OUString( *aData.pOUString ); + aData.pOUString = new OUString( *aData.pOUString ); break; case SbxOBJECT: if( aData.pObj ) @@ -141,7 +141,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r ) SbxArray* pArr = PTR_CAST(SbxArray, pObj); if( pArr ) { - ::rtl::OUString aStr = ByteArrayToString( pArr ); + OUString aStr = ByteArrayToString( pArr ); PutString(aStr); return *this; } @@ -579,10 +579,10 @@ sal_Bool SbxValue::Put( const SbxValues& rVal ) // if Float were declared with ',' as the decimal seperator or BOOl // explicit with "TRUE" or "FALSE". // Implementation in ImpConvStringExt (SBXSCAN.CXX) -sal_Bool SbxValue::PutStringExt( const ::rtl::OUString& r ) +sal_Bool SbxValue::PutStringExt( const OUString& r ) { // Copy; if it is Unicode convert it immediately - ::rtl::OUString aStr( r ); + OUString aStr( r ); // Identify the own type (not as in Put() with TheRealValue(), // Objects are not handled anyway) @@ -596,9 +596,9 @@ sal_Bool SbxValue::PutStringExt( const ::rtl::OUString& r ) // elsewise take the original (Unicode remain) sal_Bool bRet; if( ImpConvStringExt( aStr, eTargetType ) ) - aRes.pOUString = (::rtl::OUString*)&aStr; + aRes.pOUString = (OUString*)&aStr; else - aRes.pOUString = (::rtl::OUString*)&r; + aRes.pOUString = (OUString*)&r; // #34939: Set a Fixed-Flag at Strings. which contain a number, and // if this has a Num-Type, so that the type will not be changed @@ -673,11 +673,11 @@ sal_Bool SbxValue::fillAutomationDecimal } -sal_Bool SbxValue::PutString( const ::rtl::OUString& r ) +sal_Bool SbxValue::PutString( const OUString& r ) { SbxValues aRes; aRes.eType = SbxSTRING; - aRes.pOUString = (::rtl::OUString*) &r; + aRes.pOUString = (OUString*) &r; Put( aRes ); return sal_Bool( !IsError() ); } @@ -739,7 +739,7 @@ sal_Bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const { if( aData.pOUString ) { - ::rtl::OUString s( *aData.pOUString ); + OUString s( *aData.pOUString ); double n; SbxDataType t2; sal_uInt16 nLen = 0; @@ -924,7 +924,7 @@ sal_Bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) // Not even Left OK? else if( aL.pOUString == NULL ) { - aL.pOUString = new ::rtl::OUString(); + aL.pOUString = new OUString(); } Put( aL ); } @@ -1465,136 +1465,136 @@ sal_Bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) } case SbxSTRING: { - rtl::OUString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r, + OUString aVal = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(r, RTL_TEXTENCODING_ASCII_US); if( aVal.getLength() ) - aData.pOUString = new ::rtl::OUString( aVal ); - else - aData.pOUString = NULL; // JSM 1995-09-22 - break; - } - case SbxERROR: - case SbxUSHORT: - r >> aData.nUShort; break; - case SbxOBJECT: - { - sal_uInt8 nMode; - r >> nMode; - switch( nMode ) + aData.pOUString = new OUString( aVal ); + else + aData.pOUString = NULL; // JSM 1995-09-22 + break; + } + case SbxERROR: + case SbxUSHORT: + r >> aData.nUShort; break; + case SbxOBJECT: { - case 0: - aData.pObj = NULL; - break; - case 1: - aData.pObj = SbxBase::Load( r ); - return sal_Bool( aData.pObj != NULL ); - case 2: - aData.pObj = this; - break; + sal_uInt8 nMode; + r >> nMode; + switch( nMode ) + { + case 0: + aData.pObj = NULL; + break; + case 1: + aData.pObj = SbxBase::Load( r ); + return sal_Bool( aData.pObj != NULL ); + case 2: + aData.pObj = this; + break; + } + break; } - break; - } - case SbxCHAR: - { - char c; - r >> c; - aData.nChar = c; - break; - } - case SbxBYTE: - r >> aData.nByte; break; - case SbxULONG: - r >> aData.nULong; break; - case SbxINT: - { - sal_uInt8 n; - r >> n; - // Match the Int on this system? - if( n > SAL_TYPES_SIZEOFINT ) - r >> aData.nLong, aData.eType = SbxLONG; - else { - sal_Int32 nInt; - r >> nInt; - aData.nInt = nInt; + case SbxCHAR: + { + char c; + r >> c; + aData.nChar = c; + break; } - break; - } - case SbxUINT: - { - sal_uInt8 n; - r >> n; - // Match the UInt on this system? - if( n > SAL_TYPES_SIZEOFINT ) - r >> aData.nULong, aData.eType = SbxULONG; - else { - sal_uInt32 nUInt; - r >> nUInt; - aData.nUInt = nUInt; + case SbxBYTE: + r >> aData.nByte; break; + case SbxULONG: + r >> aData.nULong; break; + case SbxINT: + { + sal_uInt8 n; + r >> n; + // Match the Int on this system? + if( n > SAL_TYPES_SIZEOFINT ) + r >> aData.nLong, aData.eType = SbxLONG; + else { + sal_Int32 nInt; + r >> nInt; + aData.nInt = nInt; + } + break; } - break; + case SbxUINT: + { + sal_uInt8 n; + r >> n; + // Match the UInt on this system? + if( n > SAL_TYPES_SIZEOFINT ) + r >> aData.nULong, aData.eType = SbxULONG; + else { + sal_uInt32 nUInt; + r >> nUInt; + aData.nUInt = nUInt; + } + break; + } + case SbxEMPTY: + case SbxNULL: + case SbxVOID: + break; + case SbxDATAOBJECT: + r >> aData.nLong; + break; + // #78919 For backwards compatibility + case SbxWSTRING: + case SbxWCHAR: + break; + default: + memset (&aData,0,sizeof(aData)); + ResetFlag(SBX_FIXED); + aData.eType = SbxNULL; + DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" ); + return sal_False; } - case SbxEMPTY: - case SbxNULL: - case SbxVOID: - break; - case SbxDATAOBJECT: - r >> aData.nLong; - break; - // #78919 For backwards compatibility - case SbxWSTRING: - case SbxWCHAR: - break; - default: - memset (&aData,0,sizeof(aData)); - ResetFlag(SBX_FIXED); - aData.eType = SbxNULL; - DBG_ASSERT( !this, "Nicht unterstuetzer Datentyp geladen" ); - return sal_False; + return sal_True; } - return sal_True; -} -sal_Bool SbxValue::StoreData( SvStream& r ) const -{ - sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(aData.eType); - r << nType; - switch( nType & 0x0FFF ) + sal_Bool SbxValue::StoreData( SvStream& r ) const { - case SbxBOOL: - case SbxINTEGER: - r << aData.nInteger; break; - case SbxLONG: - r << aData.nLong; break; - case SbxDATE: - // #49935: Save as double, elsewise an error during the read in - ((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE ); - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); - ((SbxValue*)this)->aData.eType = (SbxDataType)nType; - break; - case SbxSINGLE: - case SbxDOUBLE: - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); - break; - case SbxSALUINT64: - case SbxSALINT64: - // see comment in SbxValue::StoreData - r << aData.uInt64; - break; - case SbxCURRENCY: + sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(aData.eType); + r << nType; + switch( nType & 0x0FFF ) { - sal_Int32 tmpHi = ( (aData.nInt64 >> 32) & 0xFFFFFFFF ); - sal_Int32 tmpLo = ( sal_Int32 )aData.nInt64; - r << tmpHi << tmpLo; - break; - } - case SbxSTRING: - if( aData.pOUString ) + case SbxBOOL: + case SbxINTEGER: + r << aData.nInteger; break; + case SbxLONG: + r << aData.nLong; break; + case SbxDATE: + // #49935: Save as double, elsewise an error during the read in + ((SbxValue*)this)->aData.eType = (SbxDataType)( ( nType & 0xF000 ) | SbxDOUBLE ); + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); + ((SbxValue*)this)->aData.eType = (SbxDataType)nType; + break; + case SbxSINGLE: + case SbxDOUBLE: + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, GetCoreString(), RTL_TEXTENCODING_ASCII_US); + break; + case SbxSALUINT64: + case SbxSALINT64: + // see comment in SbxValue::StoreData + r << aData.uInt64; + break; + case SbxCURRENCY: { - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US); + sal_Int32 tmpHi = ( (aData.nInt64 >> 32) & 0xFFFFFFFF ); + sal_Int32 tmpLo = ( sal_Int32 )aData.nInt64; + r << tmpHi << tmpLo; + break; } - else - { - write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, rtl::OUString(), RTL_TEXTENCODING_ASCII_US); + case SbxSTRING: + if( aData.pOUString ) + { + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, *aData.pOUString, RTL_TEXTENCODING_ASCII_US); + } + else + { + write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(r, OUString(), RTL_TEXTENCODING_ASCII_US); } break; case SbxERROR: diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 4be2ef2d9afa..d5bcedc85a64 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -62,8 +62,6 @@ using namespace com::sun::star; using namespace cppu; using namespace osl; -using ::rtl::OUString; - using com::sun::star::uno::Reference; //============================================================================ @@ -87,14 +85,14 @@ SfxDialogLibraryContainer::SfxDialogLibraryContainer( const uno::Reference< embe } // Methods to get library instances of the correct type -SfxLibrary* SfxDialogLibraryContainer::implCreateLibrary( const ::rtl::OUString& aName ) +SfxLibrary* SfxDialogLibraryContainer::implCreateLibrary( const OUString& aName ) { SfxLibrary* pRet = new SfxDialogLibrary( maModifiable, aName, mxMSF, mxSFI, this ); return pRet; } SfxLibrary* SfxDialogLibraryContainer::implCreateLibraryLink - ( const ::rtl::OUString& aName, const OUString& aLibInfoFileURL, + ( const OUString& aName, const OUString& aLibInfoFileURL, const OUString& StorageURL, sal_Bool ReadOnly ) { SfxLibrary* pRet = new SfxDialogLibrary @@ -135,8 +133,7 @@ bool writeOasis2OOoLibraryElement( Reference< xml::sax::XDocumentHandler > xHandler( xSMgr->createInstanceWithArgumentsAndContext( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.comp.Oasis2OOoTransformer" ) ), + OUString("com.sun.star.comp.Oasis2OOoTransformer" ) , aArgs, xContext ), UNO_QUERY ); @@ -144,7 +141,7 @@ bool writeOasis2OOoLibraryElement( xml::sax::InputSource source; source.aInputStream = xInput; - source.sSystemId = OUString(RTL_CONSTASCII_USTRINGPARAM("virtual file")); + source.sSystemId = OUString("virtual file"); xParser->parseStream( source ); @@ -240,20 +237,20 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference< e { Reference< io::XInputStream > xInput( xISP->createInputStream() ); Reference< XNameContainer > xDialogModel( mxMSF->createInstance - ( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY ); + ( OUString( "com.sun.star.awt.UnoControlDialogModel" ) ) , UNO_QUERY ); Reference< XComponentContext > xContext( comphelper::getComponentContext( mxMSF ) ); ::xmlscript::importDialogModel( xInput, xDialogModel, xContext, mxOwnerDocument ); - std::vector< rtl::OUString > vEmbeddedImageURLs; + std::vector< OUString > vEmbeddedImageURLs; GraphicObject::InspectForGraphicObjectImageURL( Reference< XInterface >( xDialogModel, UNO_QUERY ), vEmbeddedImageURLs ); if ( !vEmbeddedImageURLs.empty() ) { // Export the images to the storage Sequence< Any > aArgs( 1 ); aArgs[ 0 ] <<= xStorage; - Reference< document::XGraphicObjectResolver > xGraphicResolver( mxMSF->createInstanceWithArguments( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Svx.GraphicExportHelper" ) ), aArgs ), UNO_QUERY ); - std::vector< rtl::OUString >::iterator it = vEmbeddedImageURLs.begin(); - std::vector< rtl::OUString >::iterator it_end = vEmbeddedImageURLs.end(); + Reference< document::XGraphicObjectResolver > xGraphicResolver( mxMSF->createInstanceWithArguments( OUString("com.sun.star.comp.Svx.GraphicExportHelper" ), aArgs ), UNO_QUERY ); + std::vector< OUString >::iterator it = vEmbeddedImageURLs.begin(); + std::vector< OUString >::iterator it_end = vEmbeddedImageURLs.end(); if ( xGraphicResolver.is() ) { for ( sal_Int32 count = 0; it != it_end; ++it, ++count ) @@ -286,7 +283,7 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement Reference< XParser > xParser = xml::sax::Parser::create( comphelper::getComponentContext(mxMSF) ); Reference< XNameContainer > xDialogModel( mxMSF->createInstance - ( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY ); + ( OUString( "com.sun.star.awt.UnoControlDialogModel" ) ), UNO_QUERY ); if( !xDialogModel.is() ) { OSL_FAIL( "### couldn't create com.sun.star.awt.UnoControlDialogModel component\n" ); @@ -378,12 +375,12 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence > Sequence<Any> aArgs( 5 ); aArgs[1] <<= bReadOnly; aArgs[2] <<= aLocale; - aArgs[3] <<= rtl::OUString(aResourceFileNameBase); + aArgs[3] <<= OUString(aResourceFileNameBase); aArgs[4] <<= aComment; // TODO: Ctor xRet = Reference< resource::XStringResourcePersistence >( mxMSF->createInstance - ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithStorage")) ), UNO_QUERY ); + ( OUString("com.sun.star.resource.StringResourceWithStorage") ), UNO_QUERY ); uno::Reference< embed::XStorage > xLibrariesStor; uno::Reference< embed::XStorage > xLibraryStor; @@ -422,7 +419,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence > aArgs[0] <<= aLocation; aArgs[1] <<= bReadOnly; aArgs[2] <<= aLocale; - aArgs[3] <<= rtl::OUString(aResourceFileNameBase); + aArgs[3] <<= OUString(aResourceFileNameBase); aArgs[4] <<= aComment; // TODO: Real handler? @@ -431,7 +428,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence > // TODO: Ctor xRet = Reference< resource::XStringResourcePersistence >( mxMSF->createInstance - ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithLocation")) ), UNO_QUERY ); + ( OUString("com.sun.star.resource.StringResourceWithLocation") ), UNO_QUERY ); // TODO: Ctor if( xRet.is() ) @@ -488,7 +485,7 @@ void SfxDialogLibraryContainer::onNewRootStorage() } sal_Bool SAL_CALL -SfxDialogLibraryContainer:: HasExecutableCode( const ::rtl::OUString& /*Library*/ ) throw (uno::RuntimeException) +SfxDialogLibraryContainer:: HasExecutableCode( const OUString& /*Library*/ ) throw (uno::RuntimeException) { return sal_False; // dialog library has no executable code } @@ -500,12 +497,12 @@ void createRegistryInfo_SfxDialogLibraryContainer() static OAutoRegistration< SfxDialogLibraryContainer > aAutoRegistration; } -::rtl::OUString SAL_CALL SfxDialogLibraryContainer::getImplementationName( ) throw (RuntimeException) +OUString SAL_CALL SfxDialogLibraryContainer::getImplementationName( ) throw (RuntimeException) { return getImplementationName_static(); } -Sequence< ::rtl::OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceNames( ) throw (RuntimeException) +Sequence< OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServiceNames( ) throw (RuntimeException) { return getSupportedServiceNames_static(); } @@ -513,9 +510,9 @@ Sequence< ::rtl::OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServ Sequence< OUString > SfxDialogLibraryContainer::getSupportedServiceNames_static() { Sequence< OUString > aServiceNames( 2 ); - aServiceNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.DocumentDialogLibraryContainer")); + aServiceNames[0] = OUString("com.sun.star.script.DocumentDialogLibraryContainer"); // plus, for compatibility: - aServiceNames[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.DialogLibraryContainer")); + aServiceNames[1] = OUString("com.sun.star.script.DialogLibraryContainer"); return aServiceNames; } @@ -537,7 +534,7 @@ Reference< XInterface > SAL_CALL SfxDialogLibraryContainer::Create( const Refere // Ctor SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, - const ::rtl::OUString& aName, + const OUString& aName, const Reference< XMultiServiceFactory >& xMSF, const Reference< XSimpleFileAccess3 >& xSFI, SfxDialogLibraryContainer* pParent ) @@ -548,7 +545,7 @@ SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, } SfxDialogLibrary::SfxDialogLibrary( ModifiableHelper& _rModifiable, - const ::rtl::OUString& aName, + const OUString& aName, const Reference< XMultiServiceFactory >& xMSF, const Reference< XSimpleFileAccess3 >& xSFI, const OUString& aLibInfoFileURL, @@ -584,7 +581,7 @@ void SfxDialogLibrary::storeResources( void ) } void SfxDialogLibrary::storeResourcesAsURL - ( const ::rtl::OUString& URL, const ::rtl::OUString& NewName ) + ( const OUString& URL, const OUString& NewName ) { OUString aComment(aResourceFileCommentBase); m_aName = NewName; @@ -610,7 +607,7 @@ void SfxDialogLibrary::storeResourcesToURL( const OUString& URL, if( m_xStringResourcePersistence.is() ) { m_xStringResourcePersistence->storeToURL - ( URL, rtl::OUString(aResourceFileNameBase), aComment, xHandler ); + ( URL, OUString(aResourceFileNameBase), aComment, xHandler ); } } @@ -623,7 +620,7 @@ void SfxDialogLibrary::storeResourcesToStorage( const ::com::sun::star::uno::Ref if( m_xStringResourcePersistence.is() ) { m_xStringResourcePersistence->storeToStorage - ( xStorage, rtl::OUString(aResourceFileNameBase), aComment ); + ( xStorage, OUString(aResourceFileNameBase), aComment ); } } diff --git a/basic/source/uno/modsizeexceeded.cxx b/basic/source/uno/modsizeexceeded.cxx index 6c95fc74b0a0..025e7c01cd57 100644 --- a/basic/source/uno/modsizeexceeded.cxx +++ b/basic/source/uno/modsizeexceeded.cxx @@ -26,9 +26,7 @@ using namespace com::sun::star; using namespace cppu; using namespace osl; -using ::rtl::OUString; - -ModuleSizeExceeded::ModuleSizeExceeded( const uno::Sequence< ::rtl::OUString >& sModules ) +ModuleSizeExceeded::ModuleSizeExceeded( const uno::Sequence< OUString >& sModules ) { script::ModuleSizeExceededRequest aReq; aReq.Names = sModules; diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index c9a67b64e627..92b38c6f3836 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1022,7 +1022,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL, if( meInitMode == DEFAULT ) { INetURLObject aUserBasicInetObj( maLibraryPath.getToken(1, (sal_Unicode)';') ); - OUString aStandardStr( RTL_CONSTASCII_USTRINGPARAM("Standard") ); + OUString aStandardStr("Standard"); static char const strPrevFolderName_1[] = "__basic_80"; static char const strPrevFolderName_2[] = "__basic_80_2"; @@ -1573,7 +1573,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, const ::xmlscript::LibDescriptor& rLib, const uno::Reference< embed::XStorage >& xStorage, - const ::rtl::OUString& aTargetURL, + const OUString& aTargetURL, Reference< XSimpleFileAccess3 > xToUseSFI ) { // Create sax writer @@ -1634,7 +1634,7 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib, xSFI->createFolder( aLibDirPath ); } aInetObj.insertName( maInfoFileName, sal_False, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); - aInetObj.setExtension( OUString( RTL_CONSTASCII_USTRINGPARAM("xlb") ) ); + aInetObj.setExtension( OUString( "xlb" ) ); aLibInfoPath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); } else @@ -1693,7 +1693,7 @@ bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib, if( bStorage ) { aLibInfoPath = maInfoFileName; - aLibInfoPath += String( RTL_CONSTASCII_USTRINGPARAM("-lb.xml") ); + aLibInfoPath += String( "-lb.xml" ); try { @@ -2845,7 +2845,7 @@ void SAL_CALL SfxLibraryContainer::exportLibrary( const OUString& Name, const OU OUString SfxLibraryContainer::expand_url( const OUString& url ) throw(::com::sun::star::uno::RuntimeException) { - if (0 == url.compareToAscii( RTL_CONSTASCII_STRINGPARAM(EXPAND_PROTOCOL ":") )) + if (0 == url.compareTo( EXPAND_PROTOCOL ":" )) { if( !mxMacroExpander.is() ) { diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 40bbef1afba1..ad5849923fd1 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -323,7 +323,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement { Reference<frame::XModel > xModel( mxOwnerDocument ); Reference< XMultiServiceFactory> xSF( xModel, UNO_QUERY_THROW ); - mxCodeNameAccess.set( xSF->createInstance( rtl::OUString("ooo.vba.VBAObjectModuleObjectProvider" ) ), UNO_QUERY ); + mxCodeNameAccess.set( xSF->createInstance( OUString("ooo.vba.VBAObjectModuleObjectProvider" ) ), UNO_QUERY ); } catch(const Exception& ) {} @@ -335,7 +335,7 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement } catch(const uno::Exception&) { - OSL_TRACE("Failed to get documument object for %s", rtl::OUStringToOString( aElementName, RTL_TEXTENCODING_UTF8 ).getStr() ); + OSL_TRACE("Failed to get documument object for %s", OUStringToOString( aElementName, RTL_TEXTENCODING_UTF8 ).getStr() ); } } } @@ -359,7 +359,7 @@ SfxLibraryContainer* SfxScriptLibraryContainer::createInstanceImpl( void ) return new SfxScriptLibraryContainer(); } -void SAL_CALL SfxScriptLibraryContainer::importFromOldStorage( const ::rtl::OUString& aFile ) +void SAL_CALL SfxScriptLibraryContainer::importFromOldStorage( const OUString& aFile ) { // TODO: move loading from old storage to binary filters? SotStorageRef xStorage = new SotStorage( sal_False, aFile ); @@ -564,7 +564,7 @@ void SAL_CALL SfxScriptLibraryContainer::changeLibraryPassword( const OUString& } -void setStreamKey( uno::Reference< io::XStream > xStream, const ::rtl::OUString& aPass ) +void setStreamKey( uno::Reference< io::XStream > xStream, const OUString& aPass ) { uno::Reference< embed::XEncryptionProtectedSource > xEncrStream( xStream, uno::UNO_QUERY ); if ( xEncrStream.is() ) @@ -576,7 +576,7 @@ void setStreamKey( uno::Reference< io::XStream > xStream, const ::rtl::OUString& // Impl methods sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, - const ::rtl::OUString& aName, + const OUString& aName, const uno::Reference< embed::XStorage >& xStorage, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) { @@ -585,9 +585,9 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, return implStorePasswordLibrary( pLib, aName, xStorage, aDummyLocation, xDummySFA, xHandler ); } -sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, const ::rtl::OUString& aName, +sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, - const ::rtl::OUString& aTargetURL, + const OUString& aTargetURL, const Reference< XSimpleFileAccess3 > xToUseSFI, const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) { @@ -602,7 +602,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, // Only need to handle the export case here, // save/saveas etc are handled in sfxbasemodel::storeSelf & // sfxbasemodel::impl_store - uno::Sequence<rtl::OUString> aNames; + uno::Sequence<OUString> aNames; if ( bExport && pBasicMgr->LegacyPsswdBinaryLimitExceeded(aNames) ) { if ( xHandler.is() ) @@ -678,9 +678,9 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, if( !isLibraryElementValid( pLib->getByName( aElementName ) ) ) { #if OSL_DEBUG_LEVEL > 0 - ::rtl::OStringBuffer aMessage; + OStringBuffer aMessage; aMessage.append( "invalid library element '" ); - aMessage.append( ::rtl::OUStringToOString( aElementName, osl_getThreadTextEncoding() ) ); + aMessage.append( OUStringToOString( aElementName, osl_getThreadTextEncoding() ) ); aMessage.append( "'." ); OSL_FAIL( aMessage.makeStringAndClear().getStr() ); #endif @@ -701,7 +701,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, throw uno::RuntimeException(); } OUString aMime( "text/xml" ); - xProps->setPropertyValue( rtl::OUString("MediaType"), uno::makeAny( aMime ) ); + xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) ); // Set encryption key setStreamKey( xSourceStream, pLib->maPassword ); @@ -767,9 +767,9 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, if( !isLibraryElementValid( pLib->getByName( aElementName ) ) ) { #if OSL_DEBUG_LEVEL > 0 - ::rtl::OStringBuffer aMessage; + OStringBuffer aMessage; aMessage.append( "invalid library element '" ); - aMessage.append( ::rtl::OUStringToOString( aElementName, osl_getThreadTextEncoding() ) ); + aMessage.append( OUStringToOString( aElementName, osl_getThreadTextEncoding() ) ); aMessage.append( "'." ); OSL_FAIL( aMessage.makeStringAndClear().getStr() ); #endif @@ -846,7 +846,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, throw uno::RuntimeException(); } OUString aMime( "text/xml" ); - xProps->setPropertyValue( rtl::OUString("MediaType"), uno::makeAny( aMime ) ); + xProps->setPropertyValue( OUString("MediaType"), uno::makeAny( aMime ) ); Reference< XOutputStream > xOut = xSourceStream->getOutputStream(); Reference< XNameContainer > xLib( pLib ); @@ -982,7 +982,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary { sal_Int32 nError = pStream ? pStream->GetError() : ERRCODE_IO_GENERAL; delete pStream; - throw task::ErrorCodeIOException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), nError ); + throw task::ErrorCodeIOException( OUString(), uno::Reference< uno::XInterface >(), nError ); } /*sal_Bool bRet = */pMod->LoadBinaryData( *pStream ); @@ -1096,7 +1096,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary { sal_Int32 nError = pStream ? pStream->GetError() : ERRCODE_IO_GENERAL; delete pStream; - throw task::ErrorCodeIOException( ::rtl::OUString(), + throw task::ErrorCodeIOException( OUString(), uno::Reference< uno::XInterface >(), nError ); } @@ -1175,7 +1175,7 @@ void SfxScriptLibraryContainer::onNewRootStorage() { } -sal_Bool SAL_CALL SfxScriptLibraryContainer:: HasExecutableCode( const ::rtl::OUString& Library ) +sal_Bool SAL_CALL SfxScriptLibraryContainer:: HasExecutableCode( const OUString& Library ) throw (uno::RuntimeException) { BasicManager* pBasicMgr = getBasicManager(); @@ -1265,7 +1265,7 @@ void SfxScriptLibrary::storeResources( void ) // No resources } -void SfxScriptLibrary::storeResourcesToURL( const ::rtl::OUString& URL, +void SfxScriptLibrary::storeResourcesToURL( const OUString& URL, const Reference< task::XInteractionHandler >& Handler ) { (void)URL; @@ -1273,7 +1273,7 @@ void SfxScriptLibrary::storeResourcesToURL( const ::rtl::OUString& URL, } void SfxScriptLibrary::storeResourcesAsURL - ( const ::rtl::OUString& URL, const ::rtl::OUString& NewName ) + ( const OUString& URL, const OUString& NewName ) { (void)URL; (void)NewName; |