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 /vcl/source | |
parent | ee3ad385fb3ca476e57e80d7b77c1e184e52e1d8 (diff) |
Convert Sal to rtl::O(U)String
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/jobset.cxx | 16 | ||||
-rwxr-xr-x | vcl/source/gdi/outdev3.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 33 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/keycod.cxx | 4 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 2 |
8 files changed, 35 insertions, 34 deletions
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 ) { |