diff options
Diffstat (limited to 'sfx2/source')
31 files changed, 73 insertions, 74 deletions
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 3ff93a293f47..833a99b0e3e0 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -141,7 +141,7 @@ SbxVariable* MakeVariable( StarBASIC *pBas, SbxObject *pObject, (void) eClassType; return 0; #else - SbxVariable *pVar = pBas->Make( String::CreateFromAscii(pName), eClassType, eType ); //SbxCLASS_PROPERTY + SbxVariable *pVar = pBas->Make( rtl::OUString::createFromAscii(pName), eClassType, eType ); //SbxCLASS_PROPERTY pVar->SetUserData( nSID ); pVar->SetFlag( SBX_DONTSTORE ); pObject->StartListening( pVar->GetBroadcaster() ); diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index f8d13aaf800c..7a105a34e2a6 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -435,8 +435,8 @@ sal_uIntPtr SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const String DBG_ASSERT( !xDoc.Is(), "Sorry, not implemented!" ); delete pSet; SfxStringItem aName( SID_FILE_NAME, rFileName ); - SfxStringItem aReferer( SID_REFERER, String::CreateFromAscii("private:user") ); - SfxStringItem aFlags( SID_OPTIONS, String::CreateFromAscii("T") ); + SfxStringItem aReferer( SID_REFERER, rtl::OUString("private:user") ); + SfxStringItem aFlags( SID_OPTIONS, rtl::OUString("T") ); SfxBoolItem aHidden( SID_HIDDEN, sal_True ); const SfxPoolItem *pRet = GetDispatcher_Impl()->Execute( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, &aName, &aHidden, &aReferer, &aFlags, 0L ); const SfxObjectItem *pObj = PTR_CAST( SfxObjectItem, pRet ); @@ -537,11 +537,11 @@ void SfxApplication::NewDocDirectExec_Impl( SfxRequest& rReq ) SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, GetPool() ); - String aFact = String::CreateFromAscii("private:factory/"); + String aFact = rtl::OUString("private:factory/"); aFact += aFactName; aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) ); aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, GetFrame() ) ); - aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_default" ) ) ); + aReq.AppendItem( SfxStringItem( SID_TARGETNAME, rtl::OUString( "_default" ) ) ); // TODO/LATER: Should the other arguments be transfered as well? SFX_REQUEST_ARG( rReq, pDefaultPathItem, SfxStringItem, SID_DEFAULTFILEPATH, sal_False); @@ -769,8 +769,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) rReq.SetArgs( *(SfxAllItemSet*)pSet ); if (aFilter.Len() >0 ) rReq.AppendItem( SfxStringItem( SID_FILTER_NAME, aFilter ) ); - rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) ); - rReq.AppendItem( SfxStringItem( SID_REFERER, String::CreateFromAscii(SFX_REFERER_USER) ) ); + rReq.AppendItem( SfxStringItem( SID_TARGETNAME, rtl::OUString("_default") ) ); + rReq.AppendItem( SfxStringItem( SID_REFERER, rtl::OUString(SFX_REFERER_USER) ) ); delete pSet; if(!pURLList.empty()) @@ -965,7 +965,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) { // don't dispatch mailto hyperlink to desktop dispatcher rReq.RemoveItem( SID_TARGETNAME ); - rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_self") ) ); + rReq.AppendItem( SfxStringItem( SID_TARGETNAME, rtl::OUString("_self") ) ); } else if ( aINetProtocol == INET_PROT_FTP || aINetProtocol == INET_PROT_HTTP || @@ -1043,7 +1043,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) catch ( ::com::sun::star::system::SystemShellExecuteException& ) { rReq.RemoveItem( SID_TARGETNAME ); - rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) ); + rReq.AppendItem( SfxStringItem( SID_TARGETNAME, rtl::OUString("_default") ) ); bLoadInternal = sal_True; } } @@ -1062,7 +1062,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) { // hyperlink document must be loaded into a new frame rReq.RemoveItem( SID_TARGETNAME ); - rReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_default") ) ); + rReq.AppendItem( SfxStringItem( SID_TARGETNAME, rtl::OUString("_default") ) ); } } } @@ -1137,12 +1137,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) { SFX_REQUEST_ARG( rReq, pNewViewItem, SfxBoolItem, SID_OPEN_NEW_VIEW, sal_False ); if ( pNewViewItem && pNewViewItem->GetValue() ) - aTarget = String::CreateFromAscii("_blank" ); + aTarget = rtl::OUString("_blank" ); } if ( bHidden ) { - aTarget = String::CreateFromAscii("_blank"); + aTarget = rtl::OUString("_blank"); DBG_ASSERT( rReq.IsSynchronCall() || pLinkItem, "Hidden load process must be done synchronously!" ); } diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index fb69193344b3..084a2d65ccd0 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -288,8 +288,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) return; } - String aName = String::CreateFromAscii("vnd.sun.star.cmd:logout"); - SfxStringItem aNameItem( SID_FILE_NAME, aName ); + SfxStringItem aNameItem( SID_FILE_NAME, rtl::OUString("vnd.sun.star.cmd:logout") ); SfxStringItem aReferer( SID_REFERER, DEFINE_CONST_UNICODE( "private/user" ) ); pAppData_Impl->pAppDispat->Execute( SID_OPENDOC, SFX_CALLMODE_SLOT, &aNameItem, &aReferer, 0L ); return; @@ -464,7 +463,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) Help* pHelp = Application::GetHelp(); if ( pHelp ) { - pHelp->Start( String::CreateFromAscii(".uno:HelpIndex"), NULL ); // show start page + pHelp->Start( rtl::OUString(".uno:HelpIndex"), NULL ); // show start page bDone = true; } break; @@ -1374,9 +1373,9 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) case SID_COMP_BIBLIOGRAPHY: { - SfxStringItem aURL(SID_FILE_NAME, String::CreateFromAscii(".component:Bibliography/View1")); - SfxStringItem aRef(SID_REFERER, String::CreateFromAscii("private:user")); - SfxStringItem aTarget(SID_TARGETNAME, String::CreateFromAscii("_blank")); + SfxStringItem aURL(SID_FILE_NAME, rtl::OUString(".component:Bibliography/View1")); + SfxStringItem aRef(SID_REFERER, rtl::OUString("private:user")); + SfxStringItem aTarget(SID_TARGETNAME, rtl::OUString("_blank")); SfxViewFrame::Current()->GetDispatcher()->Execute( SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, &aURL, &aRef, &aTarget, 0L); } break; diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index ca36ecf2323d..9a07f83625b0 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1283,7 +1283,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta sal_uInt16 nSubCount = pType->nAttribs; if ( !nSubCount ) { - pValue[nActProp].Name = String( String::CreateFromAscii( pSlot->pUnoName ) ) ; + pValue[nActProp].Name = rtl::OUString::createFromAscii(pSlot->pUnoName) ; if ( !pItem->QueryValue( pValue[nActProp].Value ) ) { rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( @@ -1302,9 +1302,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nSubId |= CONVERT_TWIPS; DBG_ASSERT(( pType->aAttrib[n-1].nAID ) <= 127, "Member ID out of range" ); - String aName( String::CreateFromAscii( pSlot->pUnoName ) ) ; + String aName( rtl::OUString::createFromAscii( pSlot->pUnoName ) ) ; aName += '.'; - aName += String( String::CreateFromAscii( pType->aAttrib[n-1].pName ) ) ; + aName += rtl::OUString::createFromAscii( pType->aAttrib[n-1].pName ) ; pValue[nActProp].Name = aName; if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) ) { @@ -1336,7 +1336,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta sal_uInt16 nSubCount = rArg.pType->nAttribs; if ( !nSubCount ) { - pValue[nActProp].Name = String( String::CreateFromAscii( rArg.pName ) ) ; + pValue[nActProp].Name = rtl::OUString::createFromAscii( rArg.pName ) ; if ( !pItem->QueryValue( pValue[nActProp++].Value ) ) { rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( @@ -1355,9 +1355,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta nSubId |= CONVERT_TWIPS; DBG_ASSERT((rArg.pType->aAttrib[n-1].nAID) <= 127, "Member ID out of range" ); - String aName( String::CreateFromAscii( rArg.pName ) ) ; + String aName( rtl::OUString::createFromAscii( rArg.pName ) ) ; aName += '.'; - aName += String( String::CreateFromAscii( rArg.pType->aAttrib[n-1].pName ) ) ; + aName += rtl::OUString::createFromAscii( rArg.pType->aAttrib[n-1].pName ) ; pValue[nActProp].Name = aName; if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) ) { diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 842a83ec0fa8..21ed30a178ce 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -590,7 +590,7 @@ void ImplDdeItem::AdviseLoop( sal_Bool bOpen ) // A connection is re-established if( OBJECT_DDE_EXTERN == pLink->GetObjType() ) { - pLink->GetObj()->AddDataAdvise( pLink, String::CreateFromAscii( "text/plain;charset=utf-16" ), ADVISEMODE_NODATA ); + pLink->GetObj()->AddDataAdvise( pLink, rtl::OUString("text/plain;charset=utf-16"), ADVISEMODE_NODATA ); pLink->GetObj()->AddConnectAdvise( pLink ); } } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 2af76a236f98..d9e5f8a1d36e 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2238,7 +2238,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText ) { // set module name in checkbox text String sText( aOnStartupText ); - sText.SearchAndReplace( String::CreateFromAscii( "%MODULENAME" ), sModuleName ); + sText.SearchAndReplace( rtl::OUString("%MODULENAME"), sModuleName ); aOnStartupCB.SetText( sText ); // and show it aOnStartupCB.Show(); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 62030ef3dc44..77a30465b4fb 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -529,11 +529,11 @@ String SfxHelp::CreateHelpURL_Impl( const String& aCommandURL, const String& rM if ( aModuleName.Len() == 0 ) aModuleName = getDefaultModule_Impl(); - aHelpURL = String::CreateFromAscii("vnd.sun.star.help://"); + aHelpURL = rtl::OUString("vnd.sun.star.help://"); aHelpURL += aModuleName; if ( !aCommandURL.Len() ) - aHelpURL += String::CreateFromAscii("/start"); + aHelpURL += rtl::OUString("/start"); else { aHelpURL += '/'; diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index dc3ca0258343..313aef390038 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -218,8 +218,8 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const String& rName const SfxFilter* pFilter = aMatcher.GetFilter4FilterName(sDefaultFilter); if ( - (pFilter) && - (pFilter->GetServiceName().CompareIgnoreCaseToAscii( sServiceName ) != COMPARE_EQUAL) + pFilter && + !pFilter->GetServiceName().equalsIgnoreAsciiCase(sServiceName) ) { pFilter = 0; @@ -235,7 +235,7 @@ const SfxFilter* SfxFilterContainer::GetDefaultFilter_Impl( const String& rName for ( size_t i = 0, n = pFilterArr->size(); i < n; ++i ) { const SfxFilter* pCheckFilter = pFilterArr->at( i ); - if ( pCheckFilter->GetServiceName().CompareIgnoreCaseToAscii( sServiceName ) == COMPARE_EQUAL ) + if ( pCheckFilter->GetServiceName().equalsIgnoreAsciiCase(sServiceName) ) { pFilter = pCheckFilter; break; @@ -336,7 +336,7 @@ void SfxFilterMatcher_Impl::Update() for ( size_t i = 0, n = pFilterArr->size(); i < n; ++i ) { SfxFilter* pFilter = pFilterArr->at( i ); - if ( pFilter->GetServiceName() == String(aName) ) + if ( pFilter->GetServiceName() == aName ) pList->push_back( pFilter ); } } @@ -638,7 +638,7 @@ const SfxFilter* SfxFilterMatcher::GetFilterForProps( const com::sun::star::uno: if ( !m_rImpl.aName.isEmpty() ) { // if this is not the global FilterMatcher: check if filter matches the document type - if ( pFilter->GetServiceName() != String(m_rImpl.aName) ) + if ( pFilter->GetServiceName() != m_rImpl.aName ) { // preferred filter belongs to another document type; now we must search the filter m_rImpl.InitForIterating(); diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx index 8720e53c7028..97b580a34054 100644 --- a/sfx2/source/bastyp/frmhtmlw.cxx +++ b/sfx2/source/bastyp/frmhtmlw.cxx @@ -105,7 +105,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL, if( pCharSet ) { - String aContentType = String::CreateFromAscii( sHTML_MIME_text_html ); + String aContentType = rtl::OUString(sHTML_MIME_text_html); aContentType.AppendAscii( pCharSet ); OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_content_type, aContentType, sal_True, eDestEnc, pNonConvertableChars ); diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index 50b9196950c2..24eb85640796 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -79,7 +79,7 @@ void AppendDateTime_Impl( const util::DateTime rDT, DateTime aDT( DateTime::EMPTY ); CONVERT_DATETIME( rDT, aDT ); String aDateStr = rWrapper.getDate( aDT ); - aDateStr += String::CreateFromAscii( ", " ); + aDateStr += rtl::OUString(", "); aDateStr += rWrapper.getTime( aDT ); rRow += aDateStr; } diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 3fb16f2014b6..ccc6b1bb9101 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -341,7 +341,7 @@ void SfxRequest_Impl::Record */ { - String aCommand = String::CreateFromAscii(".uno:"); + String aCommand = rtl::OUString(".uno:"); aCommand.AppendAscii( pSlot->GetUnoName() ); ::rtl::OUString aCmd( aCommand ); if(xRecorder.is()) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 7c9efe51d49e..b45ce723714d 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -959,7 +959,7 @@ void SfxDocumentPage::ImplUpdateSignatures() s = aMultiSignedStr; else if ( aInfos.getLength() == 1 ) { - String aCN_Id( String::CreateFromAscii( "CN" ) ); + rtl::OUString aCN_Id("CN"); const security::DocumentSignatureInformation& rInfo = aInfos[ 0 ]; s = GetDateTimeString( rInfo.SignatureDate, rInfo.SignatureTime ); s.AppendAscii( ", " ); @@ -1728,12 +1728,12 @@ void CustomPropertiesDurationField::SetDuration( const util::Duration& rDuration m_aDuration = rDuration; String sText(rDuration.Negative ? '-' : '+'); sText += m_pLine->m_sDurationFormat; - sText.SearchAndReplace(String::CreateFromAscii( "%1"), String::CreateFromInt32( rDuration.Years ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%2"), String::CreateFromInt32( rDuration.Months ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%3"), String::CreateFromInt32( rDuration.Days ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%4"), String::CreateFromInt32( rDuration.Hours ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%5"), String::CreateFromInt32( rDuration.Minutes) ); - sText.SearchAndReplace(String::CreateFromAscii( "%6"), String::CreateFromInt32( rDuration.Seconds) ); + sText.SearchAndReplace(rtl::OUString("%1"), String::CreateFromInt32( rDuration.Years ) ); + sText.SearchAndReplace(rtl::OUString("%2"), String::CreateFromInt32( rDuration.Months ) ); + sText.SearchAndReplace(rtl::OUString("%3"), String::CreateFromInt32( rDuration.Days ) ); + sText.SearchAndReplace(rtl::OUString("%4"), String::CreateFromInt32( rDuration.Hours ) ); + sText.SearchAndReplace(rtl::OUString("%5"), String::CreateFromInt32( rDuration.Minutes) ); + sText.SearchAndReplace(rtl::OUString("%6"), String::CreateFromInt32( rDuration.Seconds) ); SetText( sText ); } diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 4c3c68bb7344..7c08ca70dc06 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -190,7 +190,7 @@ namespace sfx2 sal_Int64 nFlags, sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG, Window* _pPreferredParentWindow = NULL, - const String& sStandardDir = String::CreateFromAscii( "" ), + const String& sStandardDir = rtl::OUString(), const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rBlackList = ::com::sun::star::uno::Sequence< ::rtl::OUString >() ); virtual ~FileDialogHelper_Impl(); diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index bfb4bdf9b075..f19569bd1942 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -207,7 +207,7 @@ void SfxPasswordDialog::SetPasswdText( ) else { maMainPwdStr = maMinLenPwdStr; - maMainPwdStr.SearchAndReplace( String::CreateFromAscii( "$(MINLEN)" ), String::CreateFromInt32((sal_Int32) mnMinLen ), 0); + maMainPwdStr.SearchAndReplace( rtl::OUString("$(MINLEN)"), String::CreateFromInt32((sal_Int32) mnMinLen ), 0); maMinLengthFT.SetText( maMainPwdStr ); maMinLengthFT.Show(); } diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 2df1151feea1..c0400cda6754 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -254,7 +254,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu void SfxCommonPrintOptionsTabPage::ImplSetAccessibleNames() { - static const String cSeparator = String::CreateFromAscii( " - " ); + const rtl::OUString cSeparator(" - "); String sReduceText = aReduceGB.GetDisplayText(); sReduceText += cSeparator; diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 72a043ad6f8d..1e3b37e56e1e 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -242,7 +242,7 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, if ( bWithButtons ) { // Read Configuration - String aWindowId = String::CreateFromAscii("SplitWindow"); + String aWindowId = rtl::OUString("SplitWindow"); aWindowId += String::CreateFromInt32( (sal_Int32) eTbxAlign ); SvtViewOptions aWinOpt( E_WINDOW, aWindowId ); String aWinData; @@ -344,7 +344,7 @@ void SfxSplitWindow::SaveConfig_Impl() aWinData += String::CreateFromInt32( pDock->nType); } - String aWindowId = String::CreateFromAscii("SplitWindow"); + String aWindowId = rtl::OUString("SplitWindow"); aWindowId += String::CreateFromInt32( (sal_Int32) GetAlign() ); SvtViewOptions aWinOpt( E_WINDOW, aWindowId ); aWinOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aWinData ) ) ); diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index ea90d62e731a..e2de2dd28713 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -1245,9 +1245,9 @@ namespace sfx2 pMenu->InsertSeparator(); #if OSL_DEBUG_LEVEL > 0 - pMenu->InsertItem( MID_LAYOUT_TABS, String::CreateFromAscii( "Tab-Layout (exp.)" ), MIB_CHECKABLE ); + pMenu->InsertItem( MID_LAYOUT_TABS, rtl::OUString("Tab-Layout (exp.)"), MIB_CHECKABLE ); pMenu->CheckItem( MID_LAYOUT_TABS, impl_getLayout() != LAYOUT_DRAWERS ); - pMenu->InsertItem( MID_LAYOUT_DRAWERS, String::CreateFromAscii( "Drawer-Layout" ), MIB_CHECKABLE ); + pMenu->InsertItem( MID_LAYOUT_DRAWERS, rtl::OUString("Drawer-Layout"), MIB_CHECKABLE ); pMenu->CheckItem( MID_LAYOUT_DRAWERS, impl_getLayout() == LAYOUT_DRAWERS ); pMenu->InsertSeparator(); diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx index 996278f446c1..3607949667cb 100644 --- a/sfx2/source/doc/docfac.cxx +++ b/sfx2/source/doc/docfac.cxx @@ -116,9 +116,9 @@ SfxObjectFactory::SfxObjectFactory nFlags( nFlagsP ) { DBG_CTOR(SfxObjectFactory, 0); - pImpl->pFilterContainer = new SfxFilterContainer( String::CreateFromAscii( pName ) ); + pImpl->pFilterContainer = new SfxFilterContainer( rtl::OUString::createFromAscii( pName ) ); - String aShortName( String::CreateFromAscii( pShortName ) ); + String aShortName( rtl::OUString::createFromAscii( pShortName ) ); aShortName.ToLowerAscii(); pImpl->aClassName = rName; if ( aShortName.EqualsAscii( "swriter" ) ) @@ -347,7 +347,7 @@ String SfxObjectFactory::GetStandardTemplate( const String& rServiceName ) const SfxFilter* SfxObjectFactory::GetTemplateFilter() const { sal_uInt16 nVersion=0; - SfxFilterMatcher aMatcher ( String::CreateFromAscii( pShortName ) ); + SfxFilterMatcher aMatcher ( rtl::OUString::createFromAscii( pShortName ) ); SfxFilterMatcherIter aIter( aMatcher ); const SfxFilter *pFilter = 0; const SfxFilter *pTemp = aIter.First(); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 6271acd84493..c9685077afc1 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1889,7 +1889,7 @@ void SfxMedium::Transfer_Impl() aAny <<= pSegmentSize->GetValue(); uno::Reference < beans::XPropertySet > xSet( pImp->xStorage, uno::UNO_QUERY ); - xSet->setPropertyValue( String::CreateFromAscii("SegmentSize"), aAny ); + xSet->setPropertyValue( rtl::OUString("SegmentSize"), aAny ); // copy the temporary storage into the disk spanned package GetStorage()->copyToStorage( xStor ); diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx index e428190c1a11..df06e3a3e2f5 100644 --- a/sfx2/source/doc/docfilt.cxx +++ b/sfx2/source/doc/docfilt.cxx @@ -170,7 +170,7 @@ String SfxFilter::GetTypeFromStorage( const SotStorage& rStg ) } } - return pType ? String::CreateFromAscii(pType) : String(); + return pType ? rtl::OUString::createFromAscii(pType) : rtl::OUString(); } String SfxFilter::GetTypeFromStorage( const com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, sal_Bool bTemplate, @@ -238,7 +238,7 @@ String SfxFilter::GetTypeFromStorage( const com::sun::star::uno::Reference< com: String aRet; if ( pType ) { - aRet = String::CreateFromAscii(pType); + aRet = rtl::OUString::createFromAscii(pType); if ( pFilterName ) *pFilterName = aMatcher.GetFilter4EA( aRet )->GetName(); } diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index b4e604fb7f15..73e3d79abaae 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -244,7 +244,7 @@ SfxOrganizeDlg_Impl::SfxOrganizeDlg_Impl( SfxTemplateOrganizeDlg* pParent, else { // fallback - String aProgURL = SvtPathOptions().SubstituteVariable( String::CreateFromAscii("$(PROGURL)") ); + String aProgURL = SvtPathOptions().SubstituteVariable( rtl::OUString("$(PROGURL)") ); INetURLObject aObj( aProgURL ); DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Illegal URL !" ); aLastDir = aObj.GetMainURL( INetURLObject::DECODE_TO_IURI ); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 8080ac39731f..d96dd1adb80b 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -941,7 +941,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) else if ( bCanUpdateFromTemplate == document::UpdateDocMode::ACCORDING_TO_CONFIG ) { String sMessage( SfxResId(STR_QRYTEMPL_MESSAGE).toString() ); - sMessage.SearchAndReplace( String::CreateFromAscii("$(ARG1)"), aTemplName ); + sMessage.SearchAndReplace( rtl::OUString("$(ARG1)"), aTemplName ); sfx2::QueryTemplateBox aBox( GetDialogParent(), sMessage ); if ( RET_YES == aBox.Execute() ) bLoad = sal_True; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index d9305809c8a1..a1826097b2e7 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -312,7 +312,7 @@ sal_Bool SfxObjectShell::APISaveAs_Impl SFX_ITEMSET_ARG( aParams, pContentTypeItem, SfxStringItem, SID_CONTENTTYPE, sal_False ); if ( pContentTypeItem ) { - const SfxFilter* pFilter = SfxFilterMatcher( String::CreateFromAscii(GetFactory().GetShortName()) ).GetFilter4Mime( pContentTypeItem->GetValue(), SFX_FILTER_EXPORT ); + const SfxFilter* pFilter = SfxFilterMatcher( rtl::OUString::createFromAscii(GetFactory().GetShortName()) ).GetFilter4Mime( pContentTypeItem->GetValue(), SFX_FILTER_EXPORT ); if ( pFilter ) aFilterName = pFilter->GetName(); } @@ -430,7 +430,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) else { aURL = DEFINE_CONST_UNICODE( "private:factory/" ); - aURL += String::CreateFromAscii( GetFactory().GetShortName() ); + aURL += rtl::OUString::createFromAscii( GetFactory().GetShortName() ); aTitle = GetTitle(); } diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index d3f713307a78..c2356bd70538 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2494,7 +2494,7 @@ sal_Bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet ) String aFilterName; const SfxFilter *pFilter = NULL; if ( pFilterItem ) - pFilter = SfxFilterMatcher( String::CreateFromAscii( GetFactory().GetShortName()) ).GetFilter4FilterName( aFilterName ); + pFilter = SfxFilterMatcher( rtl::OUString::createFromAscii( GetFactory().GetShortName()) ).GetFilter4FilterName( aFilterName ); SfxMedium *pMed = new SfxMedium( pSalvageItem->GetValue(), STREAM_READWRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC, pFilter ); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index a054c92c7599..6e82028f0299 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -998,7 +998,7 @@ String SfxObjectShell::GetServiceNameFromFactory( const String& rFact ) { //! Remove everything behind name! String aFact( rFact ); - String aPrefix = String::CreateFromAscii( "private:factory/" ); + String aPrefix = rtl::OUString("private:factory/"); if ( aPrefix.Len() == aFact.Match( aPrefix ) ) aFact.Erase( 0, aPrefix.Len() ); sal_uInt16 nPos = aFact.Search( '?' ); diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index f997c6fbf404..469cbb2f831c 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -248,7 +248,7 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) if ( pSlot && pSlot->pUnoName ) { aCommand = DEFINE_CONST_UNICODE(".uno:"); - aCommand += String::CreateFromAscii( pSlot->GetUnoName() ); + aCommand += rtl::OUString::createFromAscii( pSlot->GetUnoName() ); } } diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 21e9e6e382a8..9a4f534a9fdd 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -493,9 +493,9 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i if (!aLibrary.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("document"))) { if ( aLibrary.isEmpty() || (pDoc && ( String(aLibrary) == pDoc->GetTitle( SFX_TITLE_APINAME ) || String(aLibrary) == pDoc->GetTitle() )) ) - aLibrary = String::CreateFromAscii("document"); + aLibrary = rtl::OUString("document"); else - aLibrary = String::CreateFromAscii("application"); + aLibrary = rtl::OUString("application"); } o_normalizedDescriptor.put( PROP_SCRIPT, aScript ); diff --git a/sfx2/source/view/viewfac.cxx b/sfx2/source/view/viewfac.cxx index e591100bd8ab..9def56c2f0d2 100644 --- a/sfx2/source/view/viewfac.cxx +++ b/sfx2/source/view/viewfac.cxx @@ -54,7 +54,7 @@ String SfxViewFactory::GetAPIViewName() const return m_sViewName; if ( GetOrdinal() == 0 ) - return String::CreateFromAscii( "Default" ); + return rtl::OUString( "Default" ); return GetLegacyViewName(); } @@ -66,7 +66,7 @@ SfxViewFactory::SfxViewFactory( SfxViewCtor fnC, SfxViewInit fnI, fnCreate(fnC), fnInit(fnI), nOrd(nOrdinal), - m_sViewName( String::CreateFromAscii( asciiViewName ) ) + m_sViewName( rtl::OUString::createFromAscii( asciiViewName ) ) { DBG_CTOR(SfxViewFactory, 0); } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 589c6608628d..14cca707bcbf 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -366,7 +366,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) SfxAllItemSet aSet( pApp->GetPool() ); aSet.Put( SfxStringItem( SID_FILE_NAME, pMed->GetURLObject().GetMainURL(INetURLObject::NO_DECODE) ) ); aSet.Put( SfxBoolItem( SID_TEMPLATE, sal_True ) ); - aSet.Put( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_blank") ) ); + aSet.Put( SfxStringItem( SID_TARGETNAME, rtl::OUString("_blank") ) ); SFX_ITEMSET_ARG( pMed->GetItemSet(), pReferer, SfxStringItem, SID_REFERER, sal_False ); if ( pReferer ) aSet.Put( *pReferer ); @@ -767,7 +767,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) { SfxAllItemSet aSet( pApp->GetPool() ); aSet.Put( SfxStringItem( SID_FILE_NAME, pMedium->GetName() ) ); - aSet.Put( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii("_blank") ) ); + aSet.Put( SfxStringItem( SID_TARGETNAME, rtl::OUString("_blank") ) ); if ( pSavedOptions ) aSet.Put( *pSavedOptions ); if ( pSavedReferer ) diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index 7f2e6ca2c057..f5611793a277 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -131,7 +131,7 @@ void SfxViewFrame::UpdateTitle() DBG_CHKTHIS(SfxViewFrame, 0); const SfxObjectFactory &rFact = GetObjectShell()->GetFactory(); - pImp->aFactoryName = String::CreateFromAscii( rFact.GetShortName() ); + pImp->aFactoryName = rtl::OUString::createFromAscii(rFact.GetShortName()); SfxObjectShell *pObjSh = GetObjectShell(); if ( !pObjSh ) @@ -230,11 +230,11 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) } SfxRequest aReq( SID_OPENDOC, SFX_CALLMODE_SYNCHRON, GetPool() ); - String aFact = String::CreateFromAscii("private:factory/"); + String aFact = rtl::OUString("private:factory/"); aFact += aFactName; aReq.AppendItem( SfxStringItem( SID_FILE_NAME, aFact ) ); aReq.AppendItem( SfxFrameItem( SID_DOCFRAME, &GetFrame() ) ); - aReq.AppendItem( SfxStringItem( SID_TARGETNAME, String::CreateFromAscii( "_blank" ) ) ); + aReq.AppendItem( SfxStringItem( SID_TARGETNAME, rtl::OUString( "_blank" ) ) ); SFX_APP()->ExecuteSlot( aReq ); const SfxViewFrameItem* pItem = PTR_CAST( SfxViewFrameItem, aReq.GetReturnValue() ); if ( pItem ) @@ -307,7 +307,7 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet ) { if ( pImp->aFactoryName.Len() ) { - String aFact = String::CreateFromAscii("private:factory/"); + String aFact = rtl::OUString("private:factory/"); aFact += pImp->aFactoryName; rSet.Put( SfxStringItem( nWhich, aFact ) ); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 1f364c89907b..89bc6afeea59 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -558,7 +558,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) if ( pMailRecipient ) { String aRecipient( pMailRecipient->GetValue() ); - String aMailToStr( String::CreateFromAscii( "mailto:" )); + String aMailToStr(rtl::OUString("mailto:")); if ( aRecipient.Search( aMailToStr ) == 0 ) aRecipient = aRecipient.Erase( 0, aMailToStr.Len() ); |