[Libreoffice-commits] .: 4 commits - editeng/source padmin/source sc/source sfx2/source svtools/source sw/source vcl/aqua vcl/generic vcl/headless vcl/inc vcl/source vcl/unx vcl/win
David Tardon
dtardon at kemper.freedesktop.org
Mon Nov 21 00:10:28 PST 2011
editeng/source/items/paperinf.cxx | 2 -
padmin/source/padialog.cxx | 2 -
sc/source/ui/unoobj/confuno.cxx | 5 +--
sc/source/ui/unoobj/styleuno.cxx | 3 --
sfx2/source/doc/printhelper.cxx | 5 +--
sfx2/source/view/printer.cxx | 2 -
svtools/source/dialogs/prnsetup.cxx | 2 -
sw/source/ui/app/docsh.cxx | 2 -
vcl/aqua/source/app/salinst.cxx | 6 ++--
vcl/aqua/source/app/salsys.cxx | 4 +-
vcl/aqua/source/gdi/salgdi.cxx | 2 -
vcl/aqua/source/gdi/salprn.cxx | 22 ++++++++--------
vcl/aqua/source/window/salframe.cxx | 6 ++--
vcl/aqua/source/window/salmenu.cxx | 4 +-
vcl/generic/app/gensys.cxx | 4 +-
vcl/generic/print/genprnpsp.cxx | 33 ++++++++++++------------
vcl/generic/print/genpspgraphics.cxx | 40 ++++++++++++++---------------
vcl/headless/svpdummies.cxx | 4 +-
vcl/headless/svpframe.cxx | 8 ++---
vcl/headless/svpprn.cxx | 10 +++----
vcl/headless/svptext.cxx | 2 -
vcl/inc/aqua/salframe.h | 6 ++--
vcl/inc/aqua/salgdi.h | 2 -
vcl/inc/aqua/salinst.h | 2 -
vcl/inc/aqua/salmenu.h | 4 +-
vcl/inc/aqua/salprn.h | 20 +++++++-------
vcl/inc/aqua/salsys.h | 4 +-
vcl/inc/generic/geninst.h | 2 -
vcl/inc/generic/genprn.h | 20 +++++++-------
vcl/inc/generic/genpspgraphics.h | 10 +++----
vcl/inc/generic/gensys.h | 10 +++----
vcl/inc/headless/svpdummies.hxx | 4 +-
vcl/inc/headless/svpframe.hxx | 6 ++--
vcl/inc/headless/svpgdi.hxx | 2 -
vcl/inc/headless/svpinst.hxx | 2 -
vcl/inc/jobset.h | 5 +--
vcl/inc/salframe.hxx | 6 ++--
vcl/inc/salgdi.hxx | 11 +++++---
vcl/inc/salinst.hxx | 12 +++++---
vcl/inc/salmenu.hxx | 6 ++--
vcl/inc/salprn.hxx | 25 +++++++++---------
vcl/inc/salsys.hxx | 9 ++++--
vcl/inc/unx/gtk/gtkframe.hxx | 8 ++---
vcl/inc/unx/gtk/gtksys.hxx | 6 ++--
vcl/inc/unx/saldisp.hxx | 6 ++--
vcl/inc/unx/salframe.h | 8 ++---
vcl/inc/unx/salgdi.h | 2 -
vcl/inc/unx/salmenu.h | 4 +-
vcl/inc/unx/x11/x11sys.hxx | 6 ++--
vcl/inc/vcl/jobset.hxx | 12 +++++---
vcl/inc/vcl/print.hxx | 46 +++++++++++++++++-----------------
vcl/inc/win/saldata.hxx | 2 -
vcl/inc/win/salframe.h | 6 ++--
vcl/inc/win/salgdi.h | 2 -
vcl/inc/win/salinst.h | 2 -
vcl/inc/win/salmenu.h | 4 +-
vcl/inc/win/salprn.h | 8 ++---
vcl/inc/win/salsys.h | 4 +-
vcl/source/app/salvtables.cxx | 2 -
vcl/source/gdi/jobset.cxx | 16 +++--------
vcl/source/gdi/outdev3.cxx | 6 ++--
vcl/source/gdi/print.cxx | 33 ++++++++++++++----------
vcl/source/gdi/print3.cxx | 4 +-
vcl/source/gdi/salgdilayout.cxx | 2 -
vcl/source/window/keycod.cxx | 4 +-
vcl/source/window/printdlg.cxx | 2 -
vcl/unx/generic/app/keysymnames.cxx | 4 +-
vcl/unx/generic/app/saldisp.cxx | 14 +++++-----
vcl/unx/generic/app/salinst.cxx | 8 ++---
vcl/unx/generic/gdi/salgdi3.cxx | 2 -
vcl/unx/generic/plugadapt/salplug.cxx | 4 +-
vcl/unx/generic/window/salframe.cxx | 8 ++---
vcl/unx/gtk/app/gtksys.cxx | 16 ++++++-----
vcl/unx/gtk/window/gtkframe.cxx | 12 ++++----
vcl/unx/x11/x11sys.cxx | 4 +-
vcl/win/source/app/salinfo.cxx | 2 -
vcl/win/source/app/salinst.cxx | 4 +-
vcl/win/source/gdi/salgdi3.cxx | 2 -
vcl/win/source/gdi/salprn.cxx | 18 ++++++-------
vcl/win/source/window/salframe.cxx | 10 +++----
vcl/win/source/window/salmenu.cxx | 4 +-
81 files changed, 329 insertions(+), 314 deletions(-)
New commits:
commit c5aeaee20c59144c9d2cdf3abe28dfd1500ab852
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 21 09:00:45 2011 +0100
convert win plugin to rtl::O(U)String
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 9a097ee..7450af0 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -190,7 +190,7 @@ void ImplClearHDCCache( SalData* pData );
HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp = 0 );
void ImplReleaseCachedDC( sal_uLong nID );
-bool ImplAddTempFont( SalData&, const String& rFontFileURL );
+bool ImplAddTempFont( SalData&, const rtl::OUString& rFontFileURL );
void ImplReleaseTempFonts( SalData& );
// --------------------------------------------
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index e62d601..0f1c964 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -99,7 +99,7 @@ public:
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* pGraphics );
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* pSalMenu );
virtual void DrawMenuBar();
@@ -126,8 +126,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/win/salgdi.h b/vcl/inc/win/salgdi.h
index baf6665..079f0ef 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -318,7 +318,7 @@ public:
// graphics should call ImplAddDevFontSubstitute on supplied
// OutputDevice for all its device specific preferred font substitutions
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 );
// CreateFontSubset: a method to get a subset of glyhps of a font
// inside a new valid font file
// returns TRUE if creation of subset was successfull
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
index 04ea296..b553ca7 100644
--- a/vcl/inc/win/salinst.h
+++ b/vcl/inc/win/salinst.h
@@ -67,7 +67,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 SalTimer* CreateSalTimer();
virtual SalI18NImeStatus* CreateI18NImeStatus();
virtual SalSystem* CreateSalSystem();
diff --git a/vcl/inc/win/salmenu.h b/vcl/inc/win/salmenu.h
index 99239d7..e3e3aba 100644
--- a/vcl/inc/win/salmenu.h
+++ b/vcl/inc/win/salmenu.h
@@ -46,9 +46,9 @@ public:
virtual void SetFrame( const SalFrame* pFrame );
virtual void CheckItem( unsigned nPos, sal_Bool bCheck );
virtual void EnableItem( unsigned nPos, sal_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 );
HMENU mhMenu; // the menu handle
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index 80399d5..e4d67b8 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -79,7 +79,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 );
};
@@ -107,9 +107,9 @@ public:
virtual ~WinSalPrinter();
using SalPrinter::StartJob;
- 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,
diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h
index 6f133b5..30d5506 100644
--- a/vcl/inc/win/salsys.h
+++ b/vcl/inc/win/salsys.h
@@ -74,8 +74,8 @@ public:
virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
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);
bool initMonitors();
diff --git a/vcl/win/source/app/salinfo.cxx b/vcl/win/source/app/salinfo.cxx
index ae10ae4..9ac68b0 100644
--- a/vcl/win/source/app/salinfo.cxx
+++ b/vcl/win/source/app/salinfo.cxx
@@ -228,7 +228,7 @@ static int DEFAULT_BTN_MAPPING_TABLE[][8] =
{ MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON2, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1, MB_DEFBUTTON1 } //RETRY_CANCEL
};
-int WinSalSystem::ShowNativeMessageBox(const String& rTitle, const String& rMessage, int nButtonCombination, int nDefaultButton)
+int WinSalSystem::ShowNativeMessageBox(const rtl::OUString& rTitle, const rtl::OUString& rMessage, int nButtonCombination, int nDefaultButton)
{
DBG_ASSERT( nButtonCombination >= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_OK &&
nButtonCombination <= SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_RETRY_CANCEL &&
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index caf0d27..d657f6a 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -84,11 +84,11 @@
// =======================================================================
-void SalAbort( const XubString& rErrorText, bool )
+void SalAbort( const rtl::OUString& rErrorText, bool )
{
ImplFreeSalGDI();
- if ( !rErrorText.Len() )
+ if ( rErrorText.isEmpty() )
{
// #112255# make sure crash reporter is triggered
RaiseException( 0, EXCEPTION_NONCONTINUABLE, 0, NULL );
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 658cecc..c587235 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2344,7 +2344,7 @@ static bool ImplGetFontAttrFromFile( const String& rFontFileURL,
// -----------------------------------------------------------------------
bool WinSalGraphics::AddTempDevFont( ImplDevFontList* pFontList,
- const String& rFontFileURL, const String& rFontName )
+ const rtl::OUString& rFontFileURL, const rtl::OUString& rFontName )
{
RTL_LOGFILE_TRACE1( "WinSalGraphics::AddTempDevFont(): %s", rtl::OUStringToOString( rFontFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index dc67b8d..6a4c0e0 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -253,7 +253,7 @@ void WinSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
}
// -----------------------------------------------------------------------
-XubString WinSalInstance::GetDefaultPrinter()
+rtl::OUString WinSalInstance::GetDefaultPrinter()
{
DWORD nChars = 0;
GetDefaultPrinterW( NULL, &nChars );
@@ -283,7 +283,7 @@ XubString WinSalInstance::GetDefaultPrinter()
return ImplSalGetUniString( pBuf, (xub_StrLen)(pTmp-pBuf) );
}
else
- return XubString();
+ return rtl::OUString();
}
// =======================================================================
@@ -1297,7 +1297,7 @@ sal_uLong WinSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pSetupData )
// -----------------------------------------------------------------------
-XubString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin )
+rtl::OUString WinSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin )
{
XubString aPaperBinName;
@@ -1538,9 +1538,9 @@ static int lcl_StartDocW( HDC hDC, DOCINFOW* pInfo, WinSalPrinter* pPrt )
return nRet;
}
-sal_Bool WinSalPrinter::StartJob( const XubString* pFileName,
- const XubString& rJobName,
- const XubString&,
+sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
+ const rtl::OUString& rJobName,
+ const rtl::OUString&,
sal_uLong nCopies,
bool bCollate,
bool /*bDirect*/,
@@ -1656,12 +1656,12 @@ sal_Bool WinSalPrinter::StartJob( const XubString* pFileName,
DOCINFOW aInfo;
memset( &aInfo, 0, sizeof( DOCINFOW ) );
aInfo.cbSize = sizeof( aInfo );
- aInfo.lpszDocName = (LPWSTR)rJobName.GetBuffer();
+ aInfo.lpszDocName = (LPWSTR)rJobName.getStr();
if ( pFileName || aOutFileName.getLength() )
{
- if ( (pFileName && pFileName->Len()) || aOutFileName.getLength() )
+ if ( (pFileName && !pFileName->isEmpty()) || aOutFileName.getLength() )
{
- aInfo.lpszOutput = (LPWSTR)( (pFileName && pFileName->Len()) ? pFileName->GetBuffer() : aOutFileName.getStr());
+ aInfo.lpszOutput = (LPWSTR)( (pFileName && !pFileName->isEmpty()) ? pFileName->getStr() : aOutFileName.getStr());
}
else
aInfo.lpszOutput = L"FILE:";
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 5c6bee5..083746b 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -1105,7 +1105,7 @@ sal_Bool WinSalFrame::PostEvent( void* pData )
// -----------------------------------------------------------------------
-void WinSalFrame::SetTitle( const XubString& rTitle )
+void WinSalFrame::SetTitle( const rtl::OUString& rTitle )
{
DBG_ASSERT( sizeof( WCHAR ) == sizeof( xub_Unicode ), "WinSalFrame::SetTitle(): WCHAR != sal_Unicode" );
@@ -2449,7 +2449,7 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf,
// -----------------------------------------------------------------------
-XubString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode )
+rtl::OUString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
static const int nMaxKeyLen = 350;
sal_Unicode aKeyBuf[ nMaxKeyLen ];
@@ -2644,14 +2644,14 @@ XubString WinSalFrame::GetKeyName( sal_uInt16 nKeyCode )
}
if( !nKeyBufLen )
- return XubString();
+ return rtl::OUString();
- return XubString( aKeyBuf, sal::static_int_cast< sal_uInt16 >(nKeyBufLen) );
+ return rtl::OUString::createFromAscii( aKeyBuf, sal::static_int_cast< sal_uInt16 >(nKeyBufLen) );
}
// -----------------------------------------------------------------------
-XubString WinSalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode )
+rtl::OUString WinSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
{
return GetKeyName( nKeyCode );
}
diff --git a/vcl/win/source/window/salmenu.cxx b/vcl/win/source/window/salmenu.cxx
index aa81ee4..63ce7ef 100644
--- a/vcl/win/source/window/salmenu.cxx
+++ b/vcl/win/source/window/salmenu.cxx
@@ -323,7 +323,7 @@ void WinSalMenu::SetItemImage( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, con
}
}
-void WinSalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText )
+void WinSalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const rtl::OUString& rText )
{
if( pSalMenuItem )
{
@@ -355,7 +355,7 @@ void WinSalMenu::SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const Xu
}
}
-void WinSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode&, const XubString& rKeyName )
+void WinSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode&, const rtl::OUString& rKeyName )
{
if( pSalMenuItem )
{
commit 13bbf43b1356f9be9c5aac1f17f3781cf1935849
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 21 09:00:44 2011 +0100
convert aqua plugin to rtl::O(U)String
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 4ef19f9..f9f8253 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -258,13 +258,13 @@ sal_Bool ImplSVMainHook( int * pnInit )
// =======================================================================
-void SalAbort( const XubString& rErrorText, bool bDumpCore )
+void SalAbort( const rtl::OUString& rErrorText, bool bDumpCore )
{
if( !rErrorText.Len() )
fprintf( stderr, "Application Error " );
else
fprintf( stderr, "%s ",
- ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() );
+ rtl::OUStringToOString( rErrorText, gsl_getSystemTextEncoding() ).getStr() );
if( bDumpCore )
abort();
else
@@ -997,7 +997,7 @@ void AquaSalInstance::DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo )
// -----------------------------------------------------------------------
-XubString AquaSalInstance::GetDefaultPrinter()
+rtl::OUString AquaSalInstance::GetDefaultPrinter()
{
// #i113170# may not be the main thread if called from UNO API
SalData::ensureThreadAutoreleasePool();
diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx
index 6bda7fe..1f69be6 100644
--- a/vcl/aqua/source/app/salsys.cxx
+++ b/vcl/aqua/source/app/salsys.cxx
@@ -138,8 +138,8 @@ static NSString* getStandardString( int nButtonId )
return aText.getLength() ? CreateNSString( aText) : nil;
}
-int AquaSalSystem::ShowNativeMessageBox( const String& rTitle,
- const String& rMessage,
+int AquaSalSystem::ShowNativeMessageBox( const rtl::OUString& rTitle,
+ const rtl::OUString& rMessage,
int nButtonCombination,
int nDefaultButton)
{
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index db01369..32168cb 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -1726,7 +1726,7 @@ void AquaSalGraphics::GetDevFontList( ImplDevFontList* pFontList )
// -----------------------------------------------------------------------
bool AquaSalGraphics::AddTempDevFont( ImplDevFontList*,
- const String& rFontFileURL, const String& /*rFontName*/ )
+ const rtl::OUString& rFontFileURL, const rtl::OUString& /*rFontName*/ )
{
::rtl::OUString aUSytemPath;
OSL_VERIFY( !osl::FileBase::getSystemPathFromFileURL( rFontFileURL, aUSytemPath ) );
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 5011564..3a131b1 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -300,9 +300,9 @@ sal_uLong AquaSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* )
// -----------------------------------------------------------------------
-XubString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup*, sal_uLong )
+rtl::OUString AquaSalInfoPrinter::GetPaperBinName( const ImplJobSetup*, sal_uLong )
{
- return XubString();
+ return rtl::OUString();
}
// -----------------------------------------------------------------------
@@ -451,9 +451,9 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag
return aPageSize;
}
-sal_Bool AquaSalInfoPrinter::StartJob( const String* i_pFileName,
- const String& i_rJobName,
- const String& /*i_rAppName*/,
+sal_Bool AquaSalInfoPrinter::StartJob( const rtl::OUString* i_pFileName,
+ const rtl::OUString& i_rJobName,
+ const rtl::OUString& /*i_rAppName*/,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rController
)
@@ -693,9 +693,9 @@ AquaSalPrinter::~AquaSalPrinter()
// -----------------------------------------------------------------------
-sal_Bool AquaSalPrinter::StartJob( const String* i_pFileName,
- const String& i_rJobName,
- const String& i_rAppName,
+sal_Bool AquaSalPrinter::StartJob( const rtl::OUString* i_pFileName,
+ const rtl::OUString& i_rJobName,
+ const rtl::OUString& i_rAppName,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rController )
{
@@ -704,9 +704,9 @@ sal_Bool AquaSalPrinter::StartJob( const String* i_pFileName,
// -----------------------------------------------------------------------
-sal_Bool AquaSalPrinter::StartJob( const XubString* /*i_pFileName*/,
- const XubString& /*i_rJobName*/,
- const XubString& /*i_rAppName*/,
+sal_Bool AquaSalPrinter::StartJob( const rtl::OUString* /*i_pFileName*/,
+ const rtl::OUString& /*i_rJobName*/,
+ const rtl::OUString& /*i_rAppName*/,
sal_uLong /*i_nCopies*/,
bool /*i_bCollate*/,
bool /*i_bDirect*/,
diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx
index 7733649..573d451 100644
--- a/vcl/aqua/source/window/salframe.cxx
+++ b/vcl/aqua/source/window/salframe.cxx
@@ -314,7 +314,7 @@ sal_Bool AquaSalFrame::PostEvent( void *pData )
}
// -----------------------------------------------------------------------
-void AquaSalFrame::SetTitle(const XubString& rTitle)
+void AquaSalFrame::SetTitle(const rtl::OUString& rTitle)
{
if ( !mpWindow )
return;
@@ -1057,7 +1057,7 @@ void AquaSalFrame::EndExtTextInput( sal_uInt16 )
// -----------------------------------------------------------------------
-XubString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
+rtl::OUString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
static std::map< sal_uInt16, rtl::OUString > aKeyMap;
if( aKeyMap.empty() )
@@ -1144,7 +1144,7 @@ XubString AquaSalFrame::GetKeyName( sal_uInt16 nKeyCode )
// -----------------------------------------------------------------------
-XubString AquaSalFrame::GetSymbolKeyName( const XubString&, sal_uInt16 nKeyCode )
+rtl::OUString AquaSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
{
return GetKeyName( nKeyCode );
}
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 368ca6e..23d0180 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -677,7 +677,7 @@ void AquaSalMenu::SetItemImage( unsigned /*nPos*/, SalMenuItem* pSMI, const Imag
[pImage release];
}
-void AquaSalMenu::SetItemText( unsigned /*i_nPos*/, SalMenuItem* i_pSalMenuItem, const XubString& i_rText )
+void AquaSalMenu::SetItemText( unsigned /*i_nPos*/, SalMenuItem* i_pSalMenuItem, const rtl::OUString& i_rText )
{
if (!i_pSalMenuItem)
return;
@@ -712,7 +712,7 @@ void AquaSalMenu::SetItemText( unsigned /*i_nPos*/, SalMenuItem* i_pSalMenuItem,
}
}
-void AquaSalMenu::SetAccelerator( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& /*rKeyName*/ )
+void AquaSalMenu::SetAccelerator( unsigned /*nPos*/, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const rtl::OUString& /*rKeyName*/ )
{
sal_uInt16 nModifier;
sal_Unicode nCommandKey = 0;
diff --git a/vcl/inc/aqua/salframe.h b/vcl/inc/aqua/salframe.h
index 4d205c0..124bf2d 100644
--- a/vcl/inc/aqua/salframe.h
+++ b/vcl/inc/aqua/salframe.h
@@ -116,7 +116,7 @@ public:
virtual SalGraphics* GetGraphics();
virtual void ReleaseGraphics( SalGraphics* pGraphics );
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 SetRepresentedURL( const rtl::OUString& );
virtual void SetMenu( SalMenu* pSalMenu );
@@ -143,8 +143,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/aqua/salgdi.h b/vcl/inc/aqua/salgdi.h
index 01478df..2f2af4f 100644
--- a/vcl/inc/aqua/salgdi.h
+++ b/vcl/inc/aqua/salgdi.h
@@ -287,7 +287,7 @@ public:
// graphics should call ImplAddDevFontSubstitute on supplied
// OutputDevice for all its device specific preferred font substitutions
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 );
// CreateFontSubset: a method to get a subset of glyhps of a font
// inside a new valid font file
// returns TRUE if creation of subset was successfull
diff --git a/vcl/inc/aqua/salinst.h b/vcl/inc/aqua/salinst.h
index a53243f..eaef133 100644
--- a/vcl/inc/aqua/salinst.h
+++ b/vcl/inc/aqua/salinst.h
@@ -128,7 +128,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 SalTimer* CreateSalTimer();
virtual SalI18NImeStatus* CreateI18NImeStatus();
virtual SalSystem* CreateSalSystem();
diff --git a/vcl/inc/aqua/salmenu.h b/vcl/inc/aqua/salmenu.h
index 84c7341..90875b9 100644
--- a/vcl/inc/aqua/salmenu.h
+++ b/vcl/inc/aqua/salmenu.h
@@ -74,9 +74,9 @@ public:
virtual void SetFrame( const SalFrame* pFrame );
virtual void CheckItem( unsigned nPos, sal_Bool bCheck );
virtual void EnableItem( unsigned nPos, sal_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 );
virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, sal_uLong nFlags);
virtual bool AddMenuBarButton( const SalMenuButtonItem& );
diff --git a/vcl/inc/aqua/salprn.h b/vcl/inc/aqua/salprn.h
index f2a188c..65c2dc2 100644
--- a/vcl/inc/aqua/salprn.h
+++ b/vcl/inc/aqua/salprn.h
@@ -91,7 +91,7 @@ class AquaSalInfoPrinter : public SalInfoPrinter
long& o_rPageWidth, long& o_rPageHeight );
virtual sal_uLong GetCapabilities( const ImplJobSetup* i_pSetupData, sal_uInt16 i_nType );
virtual sal_uLong GetPaperBinCount( const ImplJobSetup* i_pSetupData );
- virtual String GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uLong i_nPaperBin );
+ virtual rtl::OUString GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uLong i_nPaperBin );
virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData );
virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData );
@@ -100,9 +100,9 @@ class AquaSalInfoPrinter : public SalInfoPrinter
// so let's make AquaSalPrinter just a forwarder to AquaSalInfoPrinter
// and concentrate the real work in one class
// implement pull model print system
- sal_Bool StartJob( const String* i_pFileName,
- const String& rJobName,
- const String& i_rAppName,
+ sal_Bool StartJob( const rtl::OUString* i_pFileName,
+ const rtl::OUString& rJobName,
+ const rtl::OUString& i_rAppName,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rController );
sal_Bool EndJob();
@@ -136,17 +136,17 @@ class AquaSalPrinter : public SalPrinter
AquaSalPrinter( AquaSalInfoPrinter* i_pInfoPrinter );
virtual ~AquaSalPrinter();
- virtual sal_Bool StartJob( const XubString* i_pFileName,
- const XubString& i_rJobName,
- const XubString& i_rAppName,
+ virtual sal_Bool StartJob( const rtl::OUString* i_pFileName,
+ const rtl::OUString& i_rJobName,
+ const rtl::OUString& i_rAppName,
sal_uLong i_nCopies,
bool i_bCollate,
bool i_bDirect,
ImplJobSetup* i_pSetupData );
// implement pull model print system
- virtual sal_Bool StartJob( const String* i_pFileName,
- const String& rJobName,
- const String& i_rAppName,
+ virtual sal_Bool StartJob( const rtl::OUString* i_pFileName,
+ const rtl::OUString& rJobName,
+ const rtl::OUString& i_rAppName,
ImplJobSetup* i_pSetupData,
vcl::PrinterController& i_rListener );
diff --git a/vcl/inc/aqua/salsys.h b/vcl/inc/aqua/salsys.h
index 1541571..dc8b6ca 100644
--- a/vcl/inc/aqua/salsys.h
+++ b/vcl/inc/aqua/salsys.h
@@ -51,8 +51,8 @@ public:
virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
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);
};
commit 5ec603972f501062118b8ad5326a47287b3a1e59
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 21 09:00:31 2011 +0100
convert gtk plugin to rtl::O(U)String
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index f5ee92a..1facf7e 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -205,7 +205,7 @@ class GtkSalFrame : public SalFrame
bool m_bSendModChangeOnRelease;
bool m_bWindowIsGtkPlug;
bool m_bSetFocusOnMap;
- String m_aTitle;
+ rtl::OUString m_aTitle;
rtl::OUString m_sWMClass;
IMHandler* m_pIMHandler;
@@ -340,7 +340,7 @@ public:
// When Event is called, SalInstance::Yield() must be returned
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 *pSalMenu );
virtual void DrawMenuBar();
@@ -384,8 +384,8 @@ public:
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 );
// returns the input language used for the last key stroke
diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx
index f378bf3..c310e17 100644
--- a/vcl/inc/unx/gtk/gtksys.hxx
+++ b/vcl/inc/unx/gtk/gtksys.hxx
@@ -47,9 +47,9 @@ public:
virtual rtl::OUString GetScreenName (unsigned int nScreen);
virtual Rectangle GetDisplayScreenPosSizePixel (unsigned int nScreen);
virtual Rectangle GetDisplayWorkAreaPosSizePixel (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);
// We have a 'screen' number that is combined from screen-idx + monitor-idx
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index dbe1c47..a5b134e 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -30,6 +30,7 @@
#include <string.h>
#include <gmodule.h>
#include <gtk/gtk.h>
+#include <comphelper/string.hxx>
#include <unx/gtk/gtkinst.hxx>
#include <unx/gtk/gtksys.hxx>
@@ -210,15 +211,16 @@ rtl::OUString GtkSalSystem::GetScreenName(unsigned int nScreen)
}
// convert ~ to indicate mnemonic to '_'
-static rtl::OString MapToGtkAccelerator(const String &rStr)
+static rtl::OString MapToGtkAccelerator(const rtl::OUString &rStr)
{
- String aRet( rStr );
- aRet.SearchAndReplaceAscii("~", String::CreateFromAscii("_"));
- return rtl::OUStringToOString(aRet, RTL_TEXTENCODING_UTF8);
+ const rtl::OUString aRep(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_" )));
+ return rtl::OUStringToOString(
+ comphelper::string::searchAndReplaceAsciiL(
+ rStr, RTL_CONSTASCII_STRINGPARAM( "~" ), aRep), RTL_TEXTENCODING_UTF8);
}
-int GtkSalSystem::ShowNativeDialog (const String& rTitle, const String& rMessage,
- const std::list< String >& rButtonNames,
+int GtkSalSystem::ShowNativeDialog (const rtl::OUString& rTitle, const rtl::OUString& rMessage,
+ const std::list< rtl::OUString >& rButtonNames,
int nDefaultButton)
{
rtl::OString aTitle (rtl::OUStringToOString (rTitle, RTL_TEXTENCODING_UTF8));
@@ -231,7 +233,7 @@ int GtkSalSystem::ShowNativeDialog (const String& rTitle, const String& rMessage
"text", aMessage.getStr(),
NULL));
int nButton = 0;
- std::list< String >::const_iterator it;
+ std::list< rtl::OUString >::const_iterator it;
for (it = rButtonNames.begin(); it != rButtonNames.end(); ++it)
gtk_dialog_add_button (pDialog, MapToGtkAccelerator(*it).getStr(), nButton++);
gtk_dialog_set_default_response (pDialog, nDefaultButton);
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index e8998ca..9947eb0 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1133,7 +1133,7 @@ sal_Bool GtkSalFrame::PostEvent( void* pData )
return sal_True;
}
-void GtkSalFrame::SetTitle( const String& rTitle )
+void GtkSalFrame::SetTitle( const rtl::OUString& rTitle )
{
m_aTitle = rTitle;
if( m_pWindow && ! isChild() )
@@ -2358,25 +2358,25 @@ void GtkSalFrame::Sync()
gdk_display_sync( getGdkDisplay() );
}
-String GtkSalFrame::GetSymbolKeyName( const String&, sal_uInt16 nKeyCode )
+rtl::OUString GtkSalFrame::GetSymbolKeyName( const rtl::OUString&, sal_uInt16 nKeyCode )
{
#if !GTK_CHECK_VERSION(3,0,0)
return getDisplay()->GetKeyName( nKeyCode );
#else
(void)nKeyCode;
# warning FIXME - key names
- return String();
+ return rtl::OUString();
#endif
}
-String GtkSalFrame::GetKeyName( sal_uInt16 nKeyCode )
+rtl::OUString GtkSalFrame::GetKeyName( sal_uInt16 nKeyCode )
{
#if !GTK_CHECK_VERSION(3,0,0)
return getDisplay()->GetKeyName( nKeyCode );
#else
(void)nKeyCode;
# warning FIXME - key names
- return String();
+ return rtl::OUString();
#endif
}
@@ -2621,7 +2621,7 @@ void GtkSalFrame::createNewWindow( XLIB_Window aNewParent, bool bXEmbed, int nSc
}
#endif
- if( m_aTitle.Len() )
+ if( ! m_aTitle.isEmpty() )
SetTitle( m_aTitle );
if( bWasVisible )
commit 737f61ba4c202834e70bbaa746b4a9ce0137a891
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 21 09:00:21 2011 +0100
Convert Sal to rtl::O(U)String
diff --git a/editeng/source/items/paperinf.cxx b/editeng/source/items/paperinf.cxx
index 9d48831..1d8e600 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 67a2bd1..a3a46be 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 c8f0bf2..cb30ca8 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 0efc557..dde0409 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 abc3b0d..6326615 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 5f044c9..818f235 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 1c39b8e..c2e035b 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 c4d9e84..d7ee019 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 26b3604..befd7c2 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 cdae650..2ad7c3f 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 8aae4c4..cdd8d89 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 32646b8..60f5c21 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 864dd2c..56869c2 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 bcad98e..a8af082 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 bfa5952..988e476 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 b3fb0ce..b4f8341 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 4b8661e..7d4197d 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 b20db0d..c098496 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 a5f52d6..e485cc5 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 bc46e9b..54c7ef4 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 e573817..5f88e64 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 31ae253..906a76e 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 4977fa4..605f0ae 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 b1cbdb9..19f3c5e 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 51c6bcf..3ebd448 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 1394c17..7736832 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 67affdb..a676eb0 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 63fb12e..1d14a7e 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 e820614..195bc80 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 2f2f6d0..1a53ec9 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 e65b8bd..ded2d1c 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 32d2459..6343d44 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 59bb8b7..9ef7773 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 e7b5eff..f693a33 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 0459834..403625f 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 3ec52df..7df5853 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 d154b04..54bcc42 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 d30637f..9458207 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 0f5c106..e9fb8f2 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 eff30db..bcd51a2 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 3dfe041..203d8b4 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 3d13fd8..db40cf8 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 2db568c..3e12abf 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 466ebbb..253e8f2 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();
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list