diff options
author | David Tardon <dtardon@redhat.com> | 2011-11-21 09:00:21 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-11-21 09:03:43 +0100 |
commit | 737f61ba4c202834e70bbaa746b4a9ce0137a891 (patch) | |
tree | 3ba0de5068dbd7972161af72c893204ecd5d36be | |
parent | ee3ad385fb3ca476e57e80d7b77c1e184e52e1d8 (diff) |
Convert Sal to rtl::O(U)String
52 files changed, 232 insertions, 219 deletions
diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx index 9d48831776b0..1d8e6008e500 100644 --- a/editeng/source/items/paperinf.cxx +++ b/editeng/source/items/paperinf.cxx @@ -45,7 +45,7 @@ inline sal_Bool IsValidPrinter( const Printer* pPtr ) { - return pPtr->GetName().Len() ? sal_True : sal_False; + return pPtr->GetName().isEmpty() ? sal_False : sal_True; } //------------------------------------------------------------------------ diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx index 67a2bd181bce..a3a46bef5723 100644 --- a/padmin/source/padialog.cxx +++ b/padmin/source/padialog.cxx @@ -589,7 +589,7 @@ void SpaPrinterController::jobFinished( com::sun::star::view::PrintableState ) void PADialog::PrintTestPage() { - String sPrinter( getSelectedDevice() ); + const rtl::OUString sPrinter( getSelectedDevice() ); boost::shared_ptr<Printer> pPrinter( new Printer( sPrinter ) ); diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index c8f0bf226af7..cb30ca85c9d5 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -191,10 +191,9 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( SfxPrinter* pPrinter = pDocShell->GetPrinter(); if (pPrinter) { - String aString(sPrinterName); - if (pPrinter->GetName() != aString) + if (pPrinter->GetName() != sPrinterName) { - SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString ); + SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), sPrinterName ); if (pNewPrinter->IsKnown()) pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER ); else diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 0efc5577e08e..dde04098053f 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -1846,10 +1846,9 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons Printer* pPrinter = pDocShell->GetPrinter(); if (pPrinter) { - String aNameStr = aName; sal_uInt16 nCount = pPrinter->GetPaperBinCount(); for (sal_uInt16 i=0; i<nCount; i++) - if ( aNameStr == pPrinter->GetPaperBinName(i) ) + if ( aName == pPrinter->GetPaperBinName(i) ) { nTray = (sal_uInt8) i; bFound = sal_True; diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index abc3b0d38a3b..6326615987a3 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -345,11 +345,10 @@ void SfxPrintHelper::impl_setPrinter(const uno::Sequence< beans::PropertyValue > // Name-Property? if ( rProp.Name.compareToAscii( "Name" ) == 0 ) { - ::rtl::OUString sTemp; - if ( ( rProp.Value >>= sTemp ) == sal_False ) + ::rtl::OUString aPrinterName; + if ( ! ( rProp.Value >>= aPrinterName ) ) throw ::com::sun::star::lang::IllegalArgumentException(); - String aPrinterName( sTemp ) ; if ( aPrinterName != pPrinter->GetName() ) { pPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aPrinterName ); diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 5f044c94dc0b..818f23523dac 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -146,7 +146,7 @@ SfxPrinter::SfxPrinter( SfxItemSet* pTheOptions, Printer ( rPrinterName ), pOptions ( pTheOptions ), - bKnown ( GetName() == rPrinterName ) + bKnown ( String( GetName() ) == rPrinterName ) { pImpl = new SfxPrinter_Impl; diff --git a/svtools/source/dialogs/prnsetup.cxx b/svtools/source/dialogs/prnsetup.cxx index 1c39b8e6f70d..c2e035bd356f 100644 --- a/svtools/source/dialogs/prnsetup.cxx +++ b/svtools/source/dialogs/prnsetup.cxx @@ -160,7 +160,7 @@ XubString ImplPrnDlgGetStatusText( const QueueInfo& rInfo ) sal_uLong nStatus = rInfo.GetStatus(); // Default-Printer - if ( rInfo.GetPrinterName().Len() && + if ( !rInfo.GetPrinterName().isEmpty() && (rInfo.GetPrinterName() == Printer::GetDefaultPrinterName()) ) ImplPrnDlgAddResString( aStr, STR_SVT_PRNDLG_DEFPRINTER ); diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index c4d9e84ce3de..d7ee0192ef45 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -820,7 +820,7 @@ void SwDocShell::Draw( OutputDevice* pDev, const JobSetup& rSetup, // that would only lead to questionable results after expensive // reformatting (Preview!) JobSetup *pOrig = 0; - if ( rSetup.GetPrinterName().Len() && ASPECT_THUMBNAIL != nAspect ) + if ( !rSetup.GetPrinterName().isEmpty() && ASPECT_THUMBNAIL != nAspect ) { pOrig = const_cast<JobSetup*>(pDoc->getJobsetup()); if( pOrig ) // then we copy that diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index 26b36048f19c..befd7c2d07be 100644 --- a/vcl/generic/app/gensys.cxx +++ b/vcl/generic/app/gensys.cxx @@ -50,11 +50,11 @@ SalGenericSystem::~SalGenericSystem() { } -int SalGenericSystem::ShowNativeMessageBox( const String& rTitle, const String& rMessage, +int SalGenericSystem::ShowNativeMessageBox( const rtl::OUString& rTitle, const rtl::OUString& rMessage, int nButtonCombination, int nDefaultButton ) { int nDefButton = 0; - std::list< String > aButtons; + std::list< rtl::OUString > aButtons; int nButtonIds[5], nBut = 0; ImplHideSplash(); diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index cdae6506248f..2ad7c3f16097 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -508,7 +508,7 @@ void SalGenericInstance::GetPrinterQueueState( SalPrinterQueueInfo* ) mbPrinterInit = true; } -String SalGenericInstance::GetDefaultPrinter() +rtl::OUString SalGenericInstance::GetDefaultPrinter() { mbPrinterInit = true; PrinterInfoManager& rManager( PrinterInfoManager::get() ); @@ -811,7 +811,7 @@ sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup ) return pKey ? pKey->countValues() : 0; } -String PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uLong nPaperBin ) +rtl::OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_uLong nPaperBin ) { JobData aData; JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData ); @@ -911,7 +911,7 @@ PspSalPrinter::~PspSalPrinter() { } -static String getTmpName() +static rtl::OUString getTmpName() { rtl::OUString aTmp, aSys; osl_createTempFile( NULL, NULL, &aTmp.pData ); @@ -921,9 +921,9 @@ static String getTmpName() } sal_Bool PspSalPrinter::StartJob( - const XubString* pFileName, - const XubString& rJobName, - const XubString& rAppName, + const rtl::OUString* pFileName, + const rtl::OUString& rJobName, + const rtl::OUString& rAppName, sal_uLong nCopies, bool bCollate, bool bDirect, @@ -933,8 +933,8 @@ sal_Bool PspSalPrinter::StartJob( m_bFax = false; m_bPdf = false; - m_aFileName = pFileName ? *pFileName : String(); - m_aTmpFile = String(); + m_aFileName = pFileName ? *pFileName : rtl::OUString(); + m_aTmpFile = rtl::OUString(); m_nCopies = nCopies; m_bCollate = bCollate; @@ -977,12 +977,13 @@ sal_Bool PspSalPrinter::StartJob( m_aTmpFile = getTmpName(); nMode = S_IRUSR | S_IWUSR; - if( ! m_aFileName.Len() ) + if( m_aFileName.isEmpty() ) { - m_aFileName = getPdfDir( rInfo ); - m_aFileName.Append( '/' ); - m_aFileName.Append( rJobName ); - m_aFileName.AppendAscii( ".pdf" ); + rtl::OUStringBuffer aFileName( getPdfDir( rInfo ) ); + aFileName.append( '/' ); + aFileName.append( rJobName ); + aFileName.appendAscii( RTL_CONSTASCII_STRINGPARAM( ".pdf" ) ); + m_aFileName = aFileName.makeStringAndClear(); } break; } @@ -1002,7 +1003,7 @@ sal_Bool PspSalPrinter::StartJob( } m_aPrinterGfx.setStrictSO52Compatibility( bStrictSO52Compatibility ); - return m_aPrintJob.StartJob( m_aTmpFile.Len() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? sal_True : sal_False; + return m_aPrintJob.StartJob( ! m_aTmpFile.isEmpty() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? sal_True : sal_False; } sal_Bool PspSalPrinter::EndJob() @@ -1107,7 +1108,7 @@ struct PDFPrintFile , maParameters( i_rNewParameters ) {} }; -sal_Bool PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJobName, const String& i_rAppName, +sal_Bool PspSalPrinter::StartJob( const rtl::OUString* i_pFileName, const rtl::OUString& i_rJobName, const rtl::OUString& i_rAppName, ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ) { OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? rtl::OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "<nil>" ); @@ -1308,7 +1309,7 @@ sal_Bool PspSalPrinter::StartJob( const String* i_pFileName, const String& i_rJo break; } } while( nBytesRead == buffer.size() ); - rtl::OUStringBuffer aBuf( i_rJobName.Len() + 8 ); + rtl::OUStringBuffer aBuf( i_rJobName.getLength() + 8 ); aBuf.append( i_rJobName ); if( i > 0 || nCurJob > 0 ) { diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index 8aae4c42a110..cdd8d89abbc3 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -286,7 +286,7 @@ GenPspGraphics::GenPspGraphics() } void GenPspGraphics::Init( psp::JobData* pJob, psp::PrinterGfx* pGfx, - String* pPhone, bool bSwallow, + rtl::OUString* pPhone, bool bSwallow, SalInfoPrinter* pInfoPrinter ) { m_pJobData = pJob; @@ -886,7 +886,7 @@ void GenPspGraphics::SetTextColor( SalColor nSalColor ) m_pPrinterGfx->SetTextColor (aColor); } -bool GenPspGraphics::AddTempDevFont( ImplDevFontList*, const String&,const String& ) +bool GenPspGraphics::AddTempDevFont( ImplDevFontList*, const rtl::OUString&,const rtl::OUString& ) { return false; } @@ -1231,7 +1231,7 @@ void GenPspGraphics::AnnounceFonts( ImplDevFontList* pFontList, const psp::FastP pFontList->Add( pFD ); } -bool GenPspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ) +bool GenPspGraphics::filterText( const rtl::OUString& rOrig, rtl::OUString& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ) { if( ! m_pPhoneNr ) return false; @@ -1246,18 +1246,18 @@ bool GenPspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrL bool bRet = false; bool bStarted = false; bool bStopped = false; - sal_uInt16 nPos; - sal_uInt16 nStart = 0; - sal_uInt16 nStop = rLen; - String aPhone = rOrig.Copy( nIndex, rLen ); + sal_Int32 nPos; + sal_Int32 nStart = 0; + sal_Int32 nStop = rLen; + rtl::OUString aPhone = rOrig.copy( nIndex, rLen ); if( ! m_bPhoneCollectionActive ) { - if( ( nPos = aPhone.SearchAscii( FAX_PHONE_TOKEN ) ) != STRING_NOTFOUND ) + if( ( nPos = aPhone.indexOfAsciiL( FAX_PHONE_TOKEN, FAX_PHONE_TOKEN_LENGTH ) ) != -1 ) { nStart = nPos; m_bPhoneCollectionActive = true; - m_aPhoneCollection.Erase(); + m_aPhoneCollection = rtl::OUString(); bRet = true; bStarted = true; } @@ -1266,7 +1266,7 @@ bool GenPspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrL { bRet = true; nPos = bStarted ? nStart + FAX_PHONE_TOKEN_LENGTH : 0; - if( ( nPos = aPhone.SearchAscii( FAX_END_TOKEN, nPos ) ) != STRING_NOTFOUND ) + if( ( nPos = aPhone.indexOfAsciiL( FAX_END_TOKEN, FAX_END_TOKEN_LENGTH, nPos ) ) != -1 ) { m_bPhoneCollectionActive = false; nStop = nPos + FAX_END_TOKEN_LENGTH; @@ -1274,19 +1274,21 @@ bool GenPspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrL } int nTokenStart = nStart + (bStarted ? FAX_PHONE_TOKEN_LENGTH : 0); int nTokenStop = nStop - (bStopped ? FAX_END_TOKEN_LENGTH : 0); - m_aPhoneCollection += aPhone.Copy( nTokenStart, nTokenStop - nTokenStart ); + m_aPhoneCollection += aPhone.copy( nTokenStart, nTokenStop - nTokenStart ); if( ! m_bPhoneCollectionActive ) { - m_pPhoneNr->AppendAscii( "<Fax#>" ); - m_pPhoneNr->Append( m_aPhoneCollection ); - m_pPhoneNr->AppendAscii( "</Fax#>" ); - m_aPhoneCollection.Erase(); + rtl::OUStringBuffer aPhoneNr; + aPhoneNr.appendAscii( RTL_CONSTASCII_STRINGPARAM( "<Fax#>" ) ); + aPhoneNr.append( m_aPhoneCollection ); + aPhoneNr.appendAscii( RTL_CONSTASCII_STRINGPARAM( "</Fax#>" ) ); + *m_pPhoneNr = aPhoneNr.makeStringAndClear(); + m_aPhoneCollection = rtl::OUString(); } } - if( m_aPhoneCollection.Len() > 1024 ) + if( m_aPhoneCollection.getLength() > 1024 ) { m_bPhoneCollectionActive = false; - m_aPhoneCollection.Erase(); + m_aPhoneCollection = rtl::OUString(); bRet = false; } @@ -1295,9 +1297,7 @@ bool GenPspGraphics::filterText( const String& rOrig, String& rNewText, xub_StrL rLen -= nStop - nStart; rCutStart = nStart+nIndex; rCutStop = nStop+nIndex; - if( rCutStart ) - rNewText = rOrig.Copy( 0, rCutStart ); - rNewText += rOrig.Copy( rCutStop ); + rNewText = ( rCutStart ? rOrig.copy( 0, rCutStart ) : rtl::OUString() ) + rOrig.copy( rCutStop ); } return bRet && m_bSwallowFaxNo; diff --git a/vcl/headless/svpdummies.cxx b/vcl/headless/svpdummies.cxx index 32646b81276e..60f5c2184b3d 100644 --- a/vcl/headless/svpdummies.cxx +++ b/vcl/headless/svpdummies.cxx @@ -101,8 +101,8 @@ rtl::OUString SvpSalSystem::GetScreenName( unsigned int nScreen ) return aBuf.makeStringAndClear(); } -int SvpSalSystem::ShowNativeMessageBox( const String&, - const String&, +int SvpSalSystem::ShowNativeMessageBox( const rtl::OUString&, + const rtl::OUString&, int, int ) { diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index 864dd2ccee60..56869c245c8f 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -159,7 +159,7 @@ void SvpSalFrame::PostPaint() const } } -void SvpSalFrame::SetTitle( const XubString& ) +void SvpSalFrame::SetTitle( const rtl::OUString& ) { } @@ -368,12 +368,12 @@ void SvpSalFrame::EndExtTextInput( sal_uInt16 ) { } -String SvpSalFrame::GetKeyName( sal_uInt16 ) +rtl::OUString SvpSalFrame::GetKeyName( sal_uInt16 ) { - return String(); + return rtl::OUString(); } -String SvpSalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 ) +rtl::OUString SvpSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 ) { return String(); } diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx index bcad98e145a6..a8af082982c8 100644 --- a/vcl/headless/svpprn.cxx +++ b/vcl/headless/svpprn.cxx @@ -52,9 +52,9 @@ using ::rtl::OUStringToOString; * static helpers */ -static String getPdfDir( const PrinterInfo& rInfo ) +static rtl::OUString getPdfDir( const PrinterInfo& rInfo ) { - String aDir; + rtl::OUString aDir; sal_Int32 nIndex = 0; while( nIndex != -1 ) { @@ -63,8 +63,8 @@ static String getPdfDir( const PrinterInfo& rInfo ) { sal_Int32 nPos = 0; aDir = aToken.getToken( 1, '=', nPos ); - if( ! aDir.Len() ) - aDir = String( ByteString( getenv( "HOME" ) ), osl_getThreadTextEncoding() ); + if( aDir.isEmpty() ) + aDir = rtl::OStringToOUString( rtl::OString( getenv( "HOME" ) ), osl_getThreadTextEncoding() ); break; } } @@ -277,7 +277,7 @@ void SvpSalInstance::GetPrinterQueueState( SalPrinterQueueInfo* ) { } -String SvpSalInstance::GetDefaultPrinter() +rtl::OUString SvpSalInstance::GetDefaultPrinter() { PrinterInfoManager& rManager( PrinterInfoManager::get() ); return rManager.getDefaultPrinter(); diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index bfa59524d8cd..988e4760ef77 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -370,7 +370,7 @@ void SvpSalGraphics::GetDevFontSubstList( OutputDevice* ) // --------------------------------------------------------------------------- bool SvpSalGraphics::AddTempDevFont( ImplDevFontList*, - const String&, const String& ) + const rtl::OUString&, const rtl::OUString& ) { return false; } diff --git a/vcl/inc/generic/geninst.h b/vcl/inc/generic/geninst.h index b3fb0ce31a23..b4f834127b9e 100644 --- a/vcl/inc/generic/geninst.h +++ b/vcl/inc/generic/geninst.h @@ -103,7 +103,7 @@ public: virtual void GetPrinterQueueInfo ( ImplPrnQueueList* pList ); virtual void GetPrinterQueueState ( SalPrinterQueueInfo* pInfo ); virtual void DeletePrinterQueueInfo ( SalPrinterQueueInfo* pInfo ); - virtual String GetDefaultPrinter(); + virtual rtl::OUString GetDefaultPrinter(); virtual void PostPrintersChanged() = 0; virtual void updatePrinterUpdate(); virtual void jobStartedPrinterUpdate(); diff --git a/vcl/inc/generic/genprn.h b/vcl/inc/generic/genprn.h index 4b8661e4e30c..7d4197d6dc21 100644 --- a/vcl/inc/generic/genprn.h +++ b/vcl/inc/generic/genprn.h @@ -58,7 +58,7 @@ public: long& rPageWidth, long& rPageHeight ); virtual sal_uIntPtr GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ); virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData ); - virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ); + virtual rtl::OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin ); virtual void InitPaperFormats( const ImplJobSetup* pSetupData ); virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData ); }; @@ -66,9 +66,9 @@ public: class VCL_DLLPUBLIC PspSalPrinter : public SalPrinter { public: - String m_aFileName; - String m_aTmpFile; - String m_aFaxNr; + rtl::OUString m_aFileName; + rtl::OUString m_aTmpFile; + rtl::OUString m_aFaxNr; bool m_bFax:1; bool m_bPdf:1; bool m_bSwallowFaxNo:1; @@ -85,16 +85,16 @@ public: virtual ~PspSalPrinter(); // overload all pure virtual methods - virtual sal_Bool StartJob( const XubString* pFileName, - const XubString& rJobName, - const XubString& rAppName, + virtual sal_Bool StartJob( const rtl::OUString* pFileName, + const rtl::OUString& rJobName, + const rtl::OUString& rAppName, sal_uIntPtr nCopies, bool bCollate, bool bDirect, ImplJobSetup* pSetupData ); - virtual sal_Bool StartJob( const String*, - const String&, - const String&, + virtual sal_Bool StartJob( const rtl::OUString*, + const rtl::OUString&, + const rtl::OUString&, ImplJobSetup*, vcl::PrinterController& i_rController ); virtual sal_Bool EndJob(); diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h index b20db0d6aa29..c09849679968 100644 --- a/vcl/inc/generic/genpspgraphics.h +++ b/vcl/inc/generic/genpspgraphics.h @@ -48,9 +48,9 @@ class VCL_DLLPUBLIC GenPspGraphics : public SalGraphics protected: psp::JobData* m_pJobData; psp::PrinterGfx* m_pPrinterGfx; - String* m_pPhoneNr; + rtl::OUString* m_pPhoneNr; bool m_bSwallowFaxNo; - String m_aPhoneCollection; + rtl::OUString m_aPhoneCollection; bool m_bPhoneCollectionActive; ServerFont* m_pServerFont[ MAX_FALLBACK ]; @@ -61,7 +61,7 @@ public: virtual ~GenPspGraphics(); void Init( psp::JobData* pJob, psp::PrinterGfx* pGfx, - String* pPhone, bool bSwallow, + rtl::OUString* pPhone, bool bSwallow, SalInfoPrinter* pInfoPrinter ); // helper methods @@ -104,7 +104,7 @@ public: virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const; virtual void GetDevFontList( ImplDevFontList* ); virtual void GetDevFontSubstList( OutputDevice* ); - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); + virtual bool AddTempDevFont( ImplDevFontList*, const rtl::OUString& rFileURL, const rtl::OUString& rFontName ); virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile, const ImplFontData*, @@ -177,7 +177,7 @@ public: virtual void invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nFlags ); virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); - virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); + virtual bool filterText( const rtl::OUString& rOrigText, rtl::OUString& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, diff --git a/vcl/inc/generic/gensys.h b/vcl/inc/generic/gensys.h index a5f52d6d0010..e485cc50f215 100644 --- a/vcl/inc/generic/gensys.h +++ b/vcl/inc/generic/gensys.h @@ -43,13 +43,13 @@ class VCL_DLLPUBLIC SalGenericSystem : public SalSystem public: SalGenericSystem(); virtual ~SalGenericSystem(); - virtual int ShowNativeDialog( const String& rTitle, - const String& rMessage, - const std::list< String >& rButtons, + virtual int ShowNativeDialog( const rtl::OUString& rTitle, + const rtl::OUString& rMessage, + const std::list< rtl::OUString >& rButtons, int nDefButton ) = 0; - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, + virtual int ShowNativeMessageBox( const rtl::OUString& rTitle, + const rtl::OUString& rMessage, int nButtonCombination, int nDefaultButton); diff --git a/vcl/inc/headless/svpdummies.hxx b/vcl/inc/headless/svpdummies.hxx index bc46e9b22f70..54c7ef4cbf33 100644 --- a/vcl/inc/headless/svpdummies.hxx +++ b/vcl/inc/headless/svpdummies.hxx @@ -88,8 +88,8 @@ class SvpSalSystem : public SalSystem virtual rtl::OUString GetScreenName( unsigned int nScreen ); - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, + virtual int ShowNativeMessageBox( const rtl::OUString& rTitle, + const rtl::OUString& rMessage, int nButtonCombination, int nDefaultButton); }; diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index e57381780f61..5f88e64df3e1 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -76,7 +76,7 @@ public: virtual sal_Bool PostEvent( void* pData ); - virtual void SetTitle( const XubString& rTitle ); + virtual void SetTitle( const rtl::OUString& rTitle ); virtual void SetIcon( sal_uInt16 nIcon ); virtual void SetMenu( SalMenu* pMenu ); virtual void DrawMenuBar(); @@ -104,8 +104,8 @@ public: virtual void Sync(); virtual void SetInputContext( SalInputContext* pContext ); virtual void EndExtTextInput( sal_uInt16 nFlags ); - virtual String GetKeyName( sal_uInt16 nKeyCode ); - virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ); + virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode ); + virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode ); virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); virtual LanguageType GetInputLanguage(); virtual SalBitmap* SnapShot(); diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 31ae2530ccc5..906a76eca59e 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -106,7 +106,7 @@ public: virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const; virtual void GetDevFontList( ImplDevFontList* ); virtual void GetDevFontSubstList( OutputDevice* ); - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); + virtual bool AddTempDevFont( ImplDevFontList*, const rtl::OUString& rFileURL, const rtl::OUString& rFontName ); virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile, const ImplFontData*, sal_Int32* pGlyphIDs, diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx index 4977fa44f767..605f0ae53bed 100644 --- a/vcl/inc/headless/svpinst.hxx +++ b/vcl/inc/headless/svpinst.hxx @@ -145,7 +145,7 @@ public: virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ); virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ); virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ); - virtual String GetDefaultPrinter(); + virtual rtl::OUString GetDefaultPrinter(); virtual void PostPrintersChanged(); // SalTimer diff --git a/vcl/inc/jobset.h b/vcl/inc/jobset.h index b1cbdb9853f9..19f3c5ef2873 100644 --- a/vcl/inc/jobset.h +++ b/vcl/inc/jobset.h @@ -29,7 +29,6 @@ #ifndef _SV_JOBSET_H #define _SV_JOBSET_H -#include <tools/string.hxx> #include <vcl/sv.h> #include <vcl/prntypes.hxx> #include <boost/unordered_map.hpp> @@ -55,8 +54,8 @@ struct ImplJobSetup { sal_uInt16 mnRefCount; // RefCount (only independ data) sal_uInt16 mnSystem; // Sytem - JOBSETUP_SYSTEM_xxxx - String maPrinterName; // Printer-Name - String maDriver; // Driver-Name + rtl::OUString maPrinterName; // Printer-Name + rtl::OUString maDriver; // Driver-Name Orientation meOrientation; // Orientation DuplexMode meDuplexMode; // Duplex sal_uInt16 mnPaperBin; // paper bin / in tray diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index 51c6bcf7e73e..3ebd4488ed13 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -163,7 +163,7 @@ public: // When Event is called, SalInstance::Yield() must be returned virtual sal_Bool PostEvent( void* pData ) = 0; - virtual void SetTitle( const XubString& rTitle ) = 0; + virtual void SetTitle( const rtl::OUString& rTitle ) = 0; virtual void SetIcon( sal_uInt16 nIcon ) = 0; virtual void SetRepresentedURL( const rtl::OUString& ); virtual void SetMenu( SalMenu *pSalMenu ) = 0; @@ -212,8 +212,8 @@ public: virtual void SetInputContext( SalInputContext* pContext ) = 0; virtual void EndExtTextInput( sal_uInt16 nFlags ) = 0; - virtual String GetKeyName( sal_uInt16 nKeyCode ) = 0; - virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ) = 0; + virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode ) = 0; + virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode ) = 0; // returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType' // returns sal_False if no mapping exists or function not supported diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 1394c1725e22..7736832c1735 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -29,8 +29,6 @@ #ifndef _SV_SALGDI_HXX #define _SV_SALGDI_HXX -#include "tools/string.hxx" -#include "rtl/ustring.hxx" #include "vcl/sv.h" #include "vcl/dllapi.h" #include "vcl/salgtype.hxx" @@ -41,6 +39,11 @@ #include <map> +namespace rtl +{ + class OUString; +} + class ImplDevFontList; class SalBitmap; class FontSelectPattern; @@ -242,7 +245,7 @@ public: // graphics should call ImplAddDevFontSubstitute on supplied // OutputDevice for all its device specific preferred font substitutions virtual void GetDevFontSubstList( OutputDevice* ) = 0; - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ) = 0; + virtual bool AddTempDevFont( ImplDevFontList*, const rtl::OUString& rFileURL, const rtl::OUString& rFontName ) = 0; // CreateFontSubset: a method to get a subset of glyhps of a font // inside a new valid font file // returns sal_True if creation of subset was successfull @@ -335,7 +338,7 @@ public: true: a substitution has taken place and rNewText rLen, rCutStart and rCutStop have been filled accordingly false: no substitution has taken place, rNewText, rLen, rCutStart, rCutStop remain unchanged */ - virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); + virtual bool filterText( const rtl::OUString& rOrigText, rtl::OUString& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop ); virtual bool supportsOperation( OutDevSupportType ) const = 0; diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 67affdbec700..a676eb07625e 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -38,13 +38,15 @@ #include "vcl/displayconnectiondispatch.hxx" #include "vcl/dllapi.h" -#include "tools/string.hxx" - #include "rtl/ref.hxx" -#include "rtl/string.hxx" #include <list> +namespace rtl +{ + class OUString; +} + struct SystemParentData; struct SalPrinterQueueInfo; struct SalStatus; @@ -113,7 +115,7 @@ public: virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList ) = 0; virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo ) = 0; virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo ) = 0; - virtual String GetDefaultPrinter() = 0; + virtual rtl::OUString GetDefaultPrinter() = 0; // SalTimer virtual SalTimer* CreateSalTimer() = 0; @@ -195,7 +197,7 @@ void DestroySalInstance( SalInstance* pInst ); // - SalInstance-Functions - // ------------------------- -void SalAbort( const XubString& rErrorText, bool bDumpCore ); +void SalAbort( const rtl::OUString& rErrorText, bool bDumpCore ); VCL_PLUGIN_PUBLIC const ::rtl::OUString& SalGetDesktopEnvironment(); diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx index 63fb12ee4a84..1d14a7efadd1 100644 --- a/vcl/inc/salmenu.hxx +++ b/vcl/inc/salmenu.hxx @@ -45,7 +45,7 @@ struct SalItemParams MenuItemType eType; // MenuItem-Type MenuItemBits nBits; // MenuItem-Bits Menu* pMenu; // Pointer to Menu - XubString aText; // Menu-Text + rtl::OUString aText; // Menu-Text Image aImage; // Image }; @@ -83,9 +83,9 @@ public: virtual void SetFrame( const SalFrame* pFrame ) = 0; virtual void CheckItem( unsigned nPos, sal_Bool bCheck ) = 0; virtual void EnableItem( unsigned nPos, sal_Bool bEnable ) = 0; - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )= 0; + virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const rtl::OUString& rText )= 0; virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage ) = 0; - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ) = 0; + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const rtl::OUString& rKeyName ) = 0; virtual void GetSystemMenuData( SystemMenuData* pData ) = 0; virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags); virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx index e820614e4cdd..195bc80698f4 100644 --- a/vcl/inc/salprn.hxx +++ b/vcl/inc/salprn.hxx @@ -29,7 +29,8 @@ #ifndef _SV_SALPRN_HXX #define _SV_SALPRN_HXX -#include <tools/string.hxx> +#include <rtl/ustring.hxx> + #include <vcl/sv.h> #include <vcl/dllapi.h> #include <vcl/prntypes.hxx> @@ -47,10 +48,10 @@ namespace vcl { class PrinterController; } struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo { - XubString maPrinterName; - XubString maDriver; - XubString maLocation; - XubString maComment; + rtl::OUString maPrinterName; + rtl::OUString maDriver; + rtl::OUString maLocation; + rtl::OUString maComment; sal_uLong mnStatus; sal_uLong mnJobs; void* mpSysData; @@ -94,7 +95,7 @@ public: long& rPageWidth, long& rPageHeight ) = 0; virtual sal_uLong GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ) = 0; virtual sal_uLong GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0; - virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin ) = 0; + virtual rtl::OUString GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin ) = 0; // fills m_aPaperFormats and sets m_bPapersInit to true virtual void InitPaperFormats( const ImplJobSetup* pSetupData ) = 0; // returns angle that a landscape page will be turned counterclockwise wrt to portrait @@ -111,9 +112,9 @@ public: // public for Sal Implementation SalPrinter() {} virtual ~SalPrinter(); - virtual sal_Bool StartJob( const String* pFileName, - const String& rJobName, - const String& rAppName, + virtual sal_Bool StartJob( const rtl::OUString* pFileName, + const rtl::OUString& rJobName, + const rtl::OUString& rAppName, sal_uLong nCopies, bool bCollate, bool bDirect, @@ -121,9 +122,9 @@ public: // public for Sal Implementation // implement for pull model print systems only, // default implementations (see salvtables.cxx) just returns sal_False - virtual sal_Bool StartJob( const String* pFileName, - const String& rJobName, - const String& rAppName, + virtual sal_Bool StartJob( const rtl::OUString* pFileName, + const rtl::OUString& rJobName, + const rtl::OUString& rAppName, ImplJobSetup* pSetupData, vcl::PrinterController& rController ); diff --git a/vcl/inc/salsys.hxx b/vcl/inc/salsys.hxx index 2f2f6d08e9e6..1a53ec978441 100644 --- a/vcl/inc/salsys.hxx +++ b/vcl/inc/salsys.hxx @@ -29,10 +29,13 @@ #ifndef _SV_SALSYS_HXX #define _SV_SALSYS_HXX -#include <tools/string.hxx> #include <tools/gen.hxx> #include <vcl/dllapi.h> +namespace rtl +{ + class OUString; +} /* Button combinations for ShowNativeMessageBox */ @@ -136,8 +139,8 @@ public: See button identifier above. If the function fails the return value is 0. */ - virtual int ShowNativeMessageBox( const String& rTitle, - const String& rMessage, + virtual int ShowNativeMessageBox( const rtl::OUString& rTitle, + const rtl::OUString& rMessage, int nButtonCombination, int nDefaultButton) = 0; }; diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index e65b8bd21be9..ded2d1c65ac8 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -363,8 +363,8 @@ public: void ModifierMapping(); void SimulateKeyPress( sal_uInt16 nKeyCode ); sal_uInt16 GetIndicatorState() const; - String GetKeyNameFromKeySym( KeySym keysym ) const; - XubString GetKeyName( sal_uInt16 nKeyCode ) const; + rtl::OUString GetKeyNameFromKeySym( KeySym keysym ) const; + rtl::OUString GetKeyName( sal_uInt16 nKeyCode ) const; sal_uInt16 GetKeyCode( KeySym keysym, char*pcPrintable ) const; KeySym GetKeySym( XKeyEvent *pEvent, unsigned char *pPrintable, @@ -474,7 +474,7 @@ public: */ // get foreign key names namespace vcl_sal { - String getKeysymReplacementName( + rtl::OUString getKeysymReplacementName( const char* pKeyboard, KeySym nSymbol ); } diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index 32d2459cb12b..6343d44f2417 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -128,7 +128,7 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame // icon id int mnIconID; - String m_aTitle; + rtl::OUString m_aTitle; rtl::OUString m_sWMClass; @@ -224,7 +224,7 @@ public: virtual sal_Bool PostEvent( void* pData ); - virtual void SetTitle( const XubString& rTitle ); + virtual void SetTitle( const rtl::OUString& rTitle ); virtual void SetIcon( sal_uInt16 nIcon ); virtual void SetMenu( SalMenu* pMenu ); virtual void DrawMenuBar(); @@ -252,8 +252,8 @@ public: virtual void Sync(); virtual void SetInputContext( SalInputContext* pContext ); virtual void EndExtTextInput( sal_uInt16 nFlags ); - virtual String GetKeyName( sal_uInt16 nKeyCode ); - virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode ); + virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode ); + virtual rtl::OUString GetSymbolKeyName( const rtl::OUString& rFontName, sal_uInt16 nKeyCode ); virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); virtual LanguageType GetInputLanguage(); virtual SalBitmap* SnapShot(); diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 59bb8b7688dc..9ef77738d89a 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -267,7 +267,7 @@ public: virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const; virtual void GetDevFontList( ImplDevFontList* ); virtual void GetDevFontSubstList( OutputDevice* ); - virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName ); + virtual bool AddTempDevFont( ImplDevFontList*, const rtl::OUString& rFileURL, const rtl::OUString& rFontName ); virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile, const ImplFontData*, sal_Int32* pGlyphIDs, diff --git a/vcl/inc/unx/salmenu.h b/vcl/inc/unx/salmenu.h index e7b5effed653..f693a3393907 100644 --- a/vcl/inc/unx/salmenu.h +++ b/vcl/inc/unx/salmenu.h @@ -49,9 +49,9 @@ public: virtual void SetFrame( const SalFrame* pFrame ); virtual void CheckItem( unsigned nPos, BOOL bCheck ); virtual void EnableItem( unsigned nPos, BOOL bEnable ); - virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText ); + virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const rtl::OUString& rText ); virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage); - virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName ); + virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const rtl::OUString& rKeyName ); virtual void GetSystemMenuData( SystemMenuData* pData ); }; diff --git a/vcl/inc/unx/x11/x11sys.hxx b/vcl/inc/unx/x11/x11sys.hxx index 04598346c7e3..403625f20aa7 100644 --- a/vcl/inc/unx/x11/x11sys.hxx +++ b/vcl/inc/unx/x11/x11sys.hxx @@ -49,9 +49,9 @@ public: virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen ); virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen ); virtual rtl::OUString GetScreenName( unsigned int nScreen ); - virtual int ShowNativeDialog( const String& rTitle, - const String& rMessage, - const std::list< String >& rButtons, + virtual int ShowNativeDialog( const rtl::OUString& rTitle, + const rtl::OUString& rMessage, + const std::list< rtl::OUString >& rButtons, int nDefButton ); }; diff --git a/vcl/inc/vcl/jobset.hxx b/vcl/inc/vcl/jobset.hxx index 3ec52df2644e..7df5853bb736 100644 --- a/vcl/inc/vcl/jobset.hxx +++ b/vcl/inc/vcl/jobset.hxx @@ -29,11 +29,15 @@ #ifndef _SV_JOBSET_HXX #define _SV_JOBSET_HXX -#include <tools/string.hxx> #include <vcl/sv.h> #include <vcl/dllapi.h> #include <vcl/prntypes.hxx> +namespace rtl +{ + class OUString; +} + class SvStream; struct ImplJobSetup; @@ -58,15 +62,15 @@ public: JobSetup( const JobSetup& rJob ); ~JobSetup(); - String GetPrinterName() const; - String GetDriverName() const; + rtl::OUString GetPrinterName() const; + rtl::OUString GetDriverName() const; /* Get/SetValue are used to read/store additional * Parameters in the job setup that may be used * by the printer driver. One possible use are phone * numbers for faxes (which disguise as printers) */ - void SetValue( const String& rKey, const String& rValue ); + void SetValue( const rtl::OUString& rKey, const rtl::OUString& rValue ); JobSetup& operator=( const JobSetup& rJob ); diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index d154b045d52f..54bcc42ec359 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -29,6 +29,8 @@ #ifndef _SV_PRINT_HXX #define _SV_PRINT_HXX +#include <rtl/ustring.hxx> + #include "tools/errcode.hxx" #include "vcl/sv.h" #include "vcl/dllapi.h" @@ -106,10 +108,10 @@ class VCL_DLLPUBLIC QueueInfo friend class Printer; private: - XubString maPrinterName; - XubString maDriver; - XubString maLocation; - XubString maComment; + rtl::OUString maPrinterName; + rtl::OUString maDriver; + rtl::OUString maLocation; + rtl::OUString maComment; sal_uInt32 mnStatus; sal_uInt32 mnJobs; @@ -118,10 +120,10 @@ public: QueueInfo( const QueueInfo& rInfo ); ~QueueInfo(); - const XubString& GetPrinterName() const { return maPrinterName; } - const XubString& GetDriver() const { return maDriver; } - const XubString& GetLocation() const { return maLocation; } - const XubString& GetComment() const { return maComment; } + const rtl::OUString& GetPrinterName() const { return maPrinterName; } + const rtl::OUString& GetDriver() const { return maDriver; } + const rtl::OUString& GetLocation() const { return maLocation; } + const rtl::OUString& GetComment() const { return maComment; } sal_uInt32 GetStatus() const { return mnStatus; } sal_uInt32 GetJobs() const { return mnJobs; } @@ -233,10 +235,10 @@ private: Printer* mpNext; VirtualDevice* mpDisplayDev; PrinterOptions* mpPrinterOptions; - XubString maPrinterName; - XubString maDriver; - XubString maPrintFile; - XubString maJobName; + rtl::OUString maPrinterName; + rtl::OUString maDriver; + rtl::OUString maPrintFile; + rtl::OUString maJobName; JobSetup maJobSetup; Point maPageOffset; Size maPaperSize; @@ -260,8 +262,8 @@ private: SAL_DLLPRIVATE void ImplInitData(); SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo ); SAL_DLLPRIVATE void ImplInitDisplay( const Window* pWindow ); - SAL_DLLPRIVATE static SalPrinterQueueInfo* ImplGetQueueInfo( const XubString& rPrinterName, - const XubString* pDriver ); + SAL_DLLPRIVATE static SalPrinterQueueInfo* ImplGetQueueInfo( const rtl::OUString& rPrinterName, + const rtl::OUString* pDriver ); SAL_DLLPRIVATE void ImplUpdatePageData(); SAL_DLLPRIVATE void ImplUpdateFontList(); SAL_DLLPRIVATE void ImplFindPaperFormatForUserSize( JobSetup&, bool bMatchNearest ); @@ -289,17 +291,17 @@ public: Printer(); Printer( const JobSetup& rJobSetup ); Printer( const QueueInfo& rQueueInfo ); - Printer( const XubString& rPrinterName ); + Printer( const rtl::OUString& rPrinterName ); virtual ~Printer(); static const std::vector< rtl::OUString >& GetPrinterQueues(); - static const QueueInfo* GetQueueInfo( const String& rPrinterName, bool bStatusUpdate ); - static XubString GetDefaultPrinterName(); + static const QueueInfo* GetQueueInfo( const rtl::OUString& rPrinterName, bool bStatusUpdate ); + static rtl::OUString GetDefaultPrinterName(); virtual void Error(); - const XubString& GetName() const { return maPrinterName; } - const XubString& GetDriverName() const { return maDriver; } + const rtl::OUString& GetName() const { return maPrinterName; } + const rtl::OUString& GetDriverName() const { return maDriver; } sal_Bool IsDefPrinter() const { return mbDefPrinter; } sal_Bool IsDisplayPrinter() const { return mpDisplayDev != NULL; } sal_Bool IsValid() const { return !IsDisplayPrinter(); } @@ -309,7 +311,7 @@ public: sal_Bool SetJobSetup( const JobSetup& rSetup ); const JobSetup& GetJobSetup() const { return maJobSetup; } - void SetJobValue( const String& rKey, const String& rValue ) { maJobSetup.SetValue( rKey, rValue ); } + void SetJobValue( const rtl::OUString& rKey, const rtl::OUString& rValue ) { maJobSetup.SetValue( rKey, rValue ); } sal_Bool Setup( Window* pWindow = NULL ); sal_Bool SetPrinterProps( const Printer* pPrinter ); @@ -344,7 +346,7 @@ public: // returns info about paper format nPaper const PaperInfo& GetPaperInfo( int nPaper ) const; sal_uInt16 GetPaperBinCount() const; - XubString GetPaperBinName( sal_uInt16 nPaperBin ) const; + rtl::OUString GetPaperBinName( sal_uInt16 nPaperBin ) const; const Size& GetPaperSizePixel() const { return maPaperSize; } Size GetPaperSize() const { return PixelToLogic( maPaperSize ); } @@ -357,7 +359,7 @@ public: sal_Bool IsPrinting() const { return mbPrinting; } - const XubString& GetCurJobName() const { return maJobName; } + const rtl::OUString& GetCurJobName() const { return maJobName; } sal_uInt16 GetCurPage() const { return mnCurPage; } sal_Bool IsJobActive() const { return mbJobActive; } diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index d30637f1e54e..9458207c2399 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -117,7 +117,7 @@ SalPrinter::~SalPrinter() { } -sal_Bool SalPrinter::StartJob( const String*, const String&, const String&, +sal_Bool SalPrinter::StartJob( const rtl::OUString*, const rtl::OUString&, const rtl::OUString&, ImplJobSetup*, vcl::PrinterController& ) { return sal_False; diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index 0f5c1062275e..e9fb8f2d71c4 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -184,33 +184,27 @@ JobSetup::~JobSetup() // ----------------------------------------------------------------------- -XubString JobSetup::GetPrinterName() const +rtl::OUString JobSetup::GetPrinterName() const { if ( mpData ) return mpData->maPrinterName; else - { - XubString aName; - return aName; - } + return rtl::OUString(); } // ----------------------------------------------------------------------- -XubString JobSetup::GetDriverName() const +rtl::OUString JobSetup::GetDriverName() const { if ( mpData ) return mpData->maDriver; else - { - XubString aDriver; - return aDriver; - } + return rtl::OUString(); } // ----------------------------------------------------------------------- -void JobSetup::SetValue( const String& rKey, const String& rValue ) +void JobSetup::SetValue( const rtl::OUString& rKey, const rtl::OUString& rValue ) { if( ! mpData ) mpData = new ImplJobSetup(); diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index eff30db6577a..bcd51a2436c8 100755 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -5991,13 +5991,15 @@ SalLayout* OutputDevice::ImplLayout( const String& rOrigStr, nLen = static_cast<xub_StrLen>(nNewLen); } - String aStr = rOrigStr; + String aStr; // filter out special markers if( bFilter ) { xub_StrLen nCutStart, nCutStop, nOrgLen = nLen; - bool bFiltered = mpGraphics->filterText( rOrigStr, aStr, nMinIndex, nLen, nCutStart, nCutStop ); + rtl::OUString aTmpStr(rOrigStr); + bool bFiltered = mpGraphics->filterText( rOrigStr, aTmpStr, nMinIndex, nLen, nCutStart, nCutStop ); + aStr = aTmpStr; if( !nLen ) return NULL; diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 3dfe0412718e..203d8b4d7ce2 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -298,10 +298,15 @@ SvStream& operator>>( SvStream& rIStream, QueueInfo& rInfo ) { VersionCompat aCompat( rIStream, STREAM_READ ); - rIStream.ReadByteString( rInfo.maPrinterName, RTL_TEXTENCODING_UTF8 ); - rIStream.ReadByteString( rInfo.maDriver, RTL_TEXTENCODING_UTF8 ); - rIStream.ReadByteString( rInfo.maLocation, RTL_TEXTENCODING_UTF8 ); - rIStream.ReadByteString( rInfo.maComment, RTL_TEXTENCODING_UTF8 ); + String aTmp; + rIStream.ReadByteString( aTmp, RTL_TEXTENCODING_UTF8 ); + rInfo.maPrinterName = aTmp; + rIStream.ReadByteString( aTmp, RTL_TEXTENCODING_UTF8 ); + rInfo.maDriver = aTmp; + rIStream.ReadByteString( aTmp, RTL_TEXTENCODING_UTF8 ); + rInfo.maLocation = aTmp; + rIStream.ReadByteString( aTmp, RTL_TEXTENCODING_UTF8 ); + rInfo.maComment = aTmp; rIStream >> rInfo.mnStatus; rIStream >> rInfo.mnJobs; @@ -409,7 +414,7 @@ const std::vector<rtl::OUString>& Printer::GetPrinterQueues() } // ----------------------------------------------------------------------- -const QueueInfo* Printer::GetQueueInfo( const String& rPrinterName, bool bStatusUpdate ) +const QueueInfo* Printer::GetQueueInfo( const rtl::OUString& rPrinterName, bool bStatusUpdate ) { ImplSVData* pSVData = ImplGetSVData(); @@ -438,7 +443,7 @@ const QueueInfo* Printer::GetQueueInfo( const String& rPrinterName, bool bStatus // ----------------------------------------------------------------------- -XubString Printer::GetDefaultPrinterName() +rtl::OUString Printer::GetDefaultPrinterName() { static const char* pEnv = getenv( "SAL_DISABLE_DEFAULTPRINTER" ); if( !pEnv || !*pEnv ) @@ -447,7 +452,7 @@ XubString Printer::GetDefaultPrinterName() return pSVData->mpDefInst->GetDefaultPrinter(); } - return XubString(); + return rtl::OUString(); } // ======================================================================= @@ -562,8 +567,8 @@ void Printer::ImplInitDisplay( const Window* pWindow ) // ----------------------------------------------------------------------- -SalPrinterQueueInfo* Printer::ImplGetQueueInfo( const XubString& rPrinterName, - const XubString* pDriver ) +SalPrinterQueueInfo* Printer::ImplGetQueueInfo( const rtl::OUString& rPrinterName, + const rtl::OUString* pDriver ) { ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maGDIData.mpPrinterQueueList ) @@ -580,7 +585,7 @@ SalPrinterQueueInfo* Printer::ImplGetQueueInfo( const XubString& rPrinterName, // then search case insensitive for( unsigned int i = 0; i < pPrnList->m_aQueueInfos.size(); i++ ) { - if( pPrnList->m_aQueueInfos[i].mpSalQueueInfo->maPrinterName.EqualsIgnoreCaseAscii( rPrinterName ) ) + if( pPrnList->m_aQueueInfos[i].mpSalQueueInfo->maPrinterName.equalsIgnoreAsciiCase( rPrinterName ) ) return pPrnList->m_aQueueInfos[i].mpSalQueueInfo; } @@ -699,7 +704,7 @@ Printer::Printer( const QueueInfo& rQueueInfo ) // ----------------------------------------------------------------------- -Printer::Printer( const XubString& rPrinterName ) +Printer::Printer( const rtl::OUString& rPrinterName ) { ImplInitData(); SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rPrinterName, NULL ); @@ -967,7 +972,7 @@ sal_Bool Printer::SetPrinterProps( const Printer* pPrinter ) } // Neuen Printer bauen - XubString aDriver = pPrinter->GetDriverName(); + rtl::OUString aDriver = pPrinter->GetDriverName(); SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( pPrinter->GetName(), &aDriver ); if ( pInfo ) { @@ -1388,7 +1393,7 @@ sal_uInt16 Printer::GetPaperBinCount() const // ----------------------------------------------------------------------- -XubString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const +rtl::OUString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const { if ( IsDisplayPrinter() ) return ImplGetSVEmptyStr(); @@ -1459,7 +1464,7 @@ sal_Bool Printer::EndJob() mbPrinting = sal_False; mnCurPrintPage = 0; - maJobName.Erase(); + maJobName = rtl::OUString(); mbDevOutput = sal_False; bRet = mpPrinter->EndJob(); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 3d13fd8ddc2f..db40cf808601 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -310,7 +310,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr boost::shared_ptr<PrinterController> pController( i_pController ); // check if there is a default printer; if not, show an error box (if appropriate) - if( GetDefaultPrinterName().Len() == 0 ) + if( GetDefaultPrinterName().isEmpty() ) { if( pController->isShowDialogs() // && ! pController->isDirectPrint() @@ -533,7 +533,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl:: } } - XubString* pPrintFile = NULL; + rtl::OUString* pPrintFile = NULL; if ( mbPrintFile ) pPrintFile = &maPrintFile; mpPrinterOptions->ReadFromConfig( mbPrintFile ); diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 2db568cee21a..3e12abf3aed4 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -815,7 +815,7 @@ bool SalGraphics::DrawAlphaRect( long nX, long nY, long nWidth, long nHeight, return drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency ); } -bool SalGraphics::filterText( const String&, String&, xub_StrLen, xub_StrLen&, xub_StrLen&, xub_StrLen& ) +bool SalGraphics::filterText( const rtl::OUString&, rtl::OUString&, xub_StrLen, xub_StrLen&, xub_StrLen&, xub_StrLen& ) { return false; } diff --git a/vcl/source/window/keycod.cxx b/vcl/source/window/keycod.cxx index 466ebbb41ebf..253e8f2c36fc 100644 --- a/vcl/source/window/keycod.cxx +++ b/vcl/source/window/keycod.cxx @@ -116,7 +116,7 @@ XubString KeyCode::GetName( Window* pWindow ) const { if ( !pWindow ) pWindow = ImplGetDefaultWindow(); - return pWindow ? pWindow->ImplGetFrame()->GetKeyName( GetFullCode() ) : XubString(); + return pWindow ? XubString( pWindow->ImplGetFrame()->GetKeyName( GetFullCode() ) ) : XubString(); } // ----------------------------------------------------------------------- @@ -125,7 +125,7 @@ XubString KeyCode::GetSymbolName( const XubString& rFontName, Window* pWindow ) { if ( !pWindow ) pWindow = ImplGetDefaultWindow(); - return pWindow ? pWindow->ImplGetFrame()->GetSymbolKeyName( rFontName, GetFullCode() ) : XubString(); + return pWindow ? XubString( pWindow->ImplGetFrame()->GetSymbolKeyName( rFontName, GetFullCode() ) ) : XubString(); } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 969030c834fe..800beb956ae1 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1761,7 +1761,7 @@ static rtl::OUString searchAndReplace( const rtl::OUString& i_rOrig, const char* void PrintDialog::updatePrinterText() { - String aDefPrt( Printer::GetDefaultPrinterName() ); + const rtl::OUString aDefPrt( Printer::GetDefaultPrinterName() ); const QueueInfo* pInfo = Printer::GetQueueInfo( maJobPage.maPrinters.GetSelectEntry(), true ); if( pInfo ) { diff --git a/vcl/unx/generic/app/keysymnames.cxx b/vcl/unx/generic/app/keysymnames.cxx index c2db38c2a13a..1a276f8eecb2 100644 --- a/vcl/unx/generic/app/keysymnames.cxx +++ b/vcl/unx/generic/app/keysymnames.cxx @@ -404,7 +404,7 @@ namespace vcl_sal { { "English", aImplReplacements_English, SAL_N_ELEMENTS(aImplReplacements_English) } }; - String getKeysymReplacementName( const char* pKeyboard, KeySym nSymbol ) + rtl::OUString getKeysymReplacementName( const char* pKeyboard, KeySym nSymbol ) { for( unsigned int n = 0; n < SAL_N_ELEMENTS(aKeyboards); n++ ) { @@ -425,7 +425,7 @@ namespace vcl_sal { if( nSymbol == pRepl[--m].aSymbol ) return String( pRepl[m].pName, RTL_TEXTENCODING_UTF8 ); } - return String(); + return rtl::OUString(); } } diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index a26027d7b91a..b976569d146d 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -931,9 +931,9 @@ sal_uInt16 SalDisplay::GetIndicatorState() const return nState; } -String SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const +rtl::OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const { - String aRet; + rtl::OUString aRet; // return an empty string for keysyms that are not bound to // any key code @@ -941,18 +941,18 @@ String SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const if( aKeyCode != 0 && aKeyCode != NoSymbol ) { if( !nKeySym ) - aRet = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "???" ) ); + aRet = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "???" ) ); else { aRet = ::vcl_sal::getKeysymReplacementName( const_cast<SalDisplay*>(this)->GetKeyboardName(), nKeySym ); - if( ! aRet.Len() ) + if( aRet.isEmpty() ) { const char *pString = XKeysymToString( nKeySym ); int n = strlen( pString ); if( n > 2 && pString[n-2] == '_' ) - aRet = String( pString, n-2, RTL_TEXTENCODING_ISO_8859_1 ); + aRet = rtl::OUString( pString, n-2, RTL_TEXTENCODING_ISO_8859_1 ); else - aRet = String( pString, n, RTL_TEXTENCODING_ISO_8859_1 ); + aRet = rtl::OUString( pString, n, RTL_TEXTENCODING_ISO_8859_1 ); } } } @@ -998,7 +998,7 @@ void SalDisplay::ModifierMapping() } // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -XubString SalDisplay::GetKeyName( sal_uInt16 nKeyCode ) const +rtl::OUString SalDisplay::GetKeyName( sal_uInt16 nKeyCode ) const { String aStrMap; String aCustomKeyName; diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 73659f5bad9b..46d5f5fe0919 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -214,7 +214,7 @@ static void getServerDirectories( std::list< rtl::OString >& o_rFontPaths ) static const char* pCommands[] = { "/usr/sbin/chkfontpath 2>/dev/null", "chkfontpath 2>/dev/null" }; - ::std::list< ByteString > aLines; + ::std::list< rtl::OString > aLines; for( unsigned int i = 0; i < SAL_N_ELEMENTS(pCommands); i++ ) { @@ -238,13 +238,13 @@ static void getServerDirectories( std::list< rtl::OString >& o_rFontPaths ) } } - for( ::std::list< ByteString >::iterator it = aLines.begin(); it != aLines.end(); ++it ) + for( ::std::list< rtl::OString >::iterator it = aLines.begin(); it != aLines.end(); ++it ) { - if( ! access( it->GetBuffer(), F_OK ) ) + if( ! access( it->getStr(), F_OK ) ) { o_rFontPaths.push_back( *it ); #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "adding fs dir %s\n", it->GetBuffer() ); + fprintf( stderr, "adding fs dir %s\n", it->getStr() ); #endif } } diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index 66a316bb5005..c07e167cb92b 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -532,7 +532,7 @@ X11SalGraphics::SetTextColor( SalColor nSalColor ) // ---------------------------------------------------------------------------- bool X11SalGraphics::AddTempDevFont( ImplDevFontList* pFontList, - const String& rFileURL, const String& rFontName ) + const rtl::OUString& rFileURL, const rtl::OUString& rFontName ) { // inform PSP font manager rtl::OUString aUSystemPath; diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 90f0d3eb52dc..39505ce6be23 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -267,9 +267,9 @@ void DeInitSalMain() { } -void SalAbort( const XubString& rErrorText, bool bDumpCore ) +void SalAbort( const rtl::OUString& rErrorText, bool bDumpCore ) { - if( !rErrorText.Len() ) + if( rErrorText.isEmpty() ) std::fprintf( stderr, "Application Error\n" ); else std::fprintf( stderr, "%s\n", rtl::OUStringToOString(rErrorText, osl_getThreadTextEncoding()).getStr() ); diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index ad43f7afefe6..3f8d164ee588 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2497,7 +2497,7 @@ sal_Bool X11SalFrame::PostEvent( void *pData ) // Title // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -void X11SalFrame::SetTitle( const XubString& rTitle ) +void X11SalFrame::SetTitle( const rtl::OUString& rTitle ) { if( ! ( IsChildWindow() || (nStyle_ & SAL_FRAME_STYLE_FLOAT ) ) ) { @@ -2572,12 +2572,12 @@ void X11SalFrame::EndExtTextInput( sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -XubString X11SalFrame::GetKeyName( sal_uInt16 nKeyCode ) +rtl::OUString X11SalFrame::GetKeyName( sal_uInt16 nKeyCode ) { return GetDisplay()->GetKeyName( nKeyCode ); } -XubString X11SalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode ) +rtl::OUString X11SalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode ) { return GetKeyName( nKeyCode ); } @@ -2697,7 +2697,7 @@ void X11SalFrame::createNewWindow( XLIB_Window aNewParent, int nScreen ) // update graphics if necessary updateGraphics(false); - if( m_aTitle.Len() ) + if( ! m_aTitle.isEmpty() ) SetTitle( m_aTitle ); if( mpParent ) diff --git a/vcl/unx/x11/x11sys.cxx b/vcl/unx/x11/x11sys.cxx index 1dee7c9c7618..43693a9f24eb 100644 --- a/vcl/unx/x11/x11sys.cxx +++ b/vcl/unx/x11/x11sys.cxx @@ -141,7 +141,7 @@ rtl::OUString X11SalSystem::GetScreenName( unsigned int nScreen ) return aScreenName; } -int X11SalSystem::ShowNativeDialog( const String& rTitle, const String& rMessage, const std::list< String >& rButtons, int nDefButton ) +int X11SalSystem::ShowNativeDialog( const rtl::OUString& rTitle, const rtl::OUString& rMessage, const std::list< rtl::OUString >& rButtons, int nDefButton ) { int nRet = -1; @@ -154,7 +154,7 @@ int X11SalSystem::ShowNativeDialog( const String& rTitle, const String& rMessage aWarn.Clear(); sal_uInt16 nButton = 0; - for( std::list< String >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it ) + for( std::list< rtl::OUString >::const_iterator it = rButtons.begin(); it != rButtons.end(); ++it ) { aWarn.AddButton( *it, nButton+1, nButton == (sal_uInt16)nDefButton ? BUTTONDIALOG_DEFBUTTON : 0 ); nButton++; |