diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-16 22:49:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-17 14:04:53 +0100 |
commit | 6e613c590bdd7c6643616ac897533323ff77ebff (patch) | |
tree | 2a610412a4bee284c7c2f00c8a064edc6bfe6866 /vcl/unx | |
parent | e178d5a97fd3949f3bf3eb02da73390b6e727291 (diff) |
ByteString -> rtl::OString
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/app/gtksys.cxx | 25 | ||||
-rw-r--r-- | vcl/unx/headless/svppspgraphics.cxx | 8 |
3 files changed, 21 insertions, 14 deletions
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index 3235aa9a58fa..8cadab79b0a7 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -272,7 +272,7 @@ void SalAbort( const XubString& rErrorText ) if( !rErrorText.Len() ) std::fprintf( stderr, "Application Error\n" ); else - std::fprintf( stderr, "%s\n", ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() ); + std::fprintf( stderr, "%s\n", rtl::OUStringToOString(rErrorText, gsl_getSystemTextEncoding()).getStr() ); exit(-1); } diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx index 2076d39cc229..66987ef533e1 100644 --- a/vcl/unx/gtk/app/gtksys.cxx +++ b/vcl/unx/gtk/app/gtksys.cxx @@ -55,11 +55,11 @@ GtkSalSystem::~GtkSalSystem() } // convert ~ to indicate mnemonic to '_' -static ByteString MapToGtkAccelerator (const String &rStr) +static rtl::OString MapToGtkAccelerator(const String &rStr) { String aRet( rStr ); aRet.SearchAndReplaceAscii("~", String::CreateFromAscii("_")); - return ByteString( aRet, RTL_TEXTENCODING_UTF8 ); + return rtl::OUStringToOString(aRet, RTL_TEXTENCODING_UTF8); } int GtkSalSystem::ShowNativeDialog( const String& rTitle, @@ -76,14 +76,16 @@ int GtkSalSystem::ShowNativeDialog( const String& rTitle, std::fprintf( stderr, "GtkSalSystem::ShowNativeDialog\n"); #endif - ByteString aTitle( rTitle, RTL_TEXTENCODING_UTF8 ); - ByteString aMessage( rMessage, RTL_TEXTENCODING_UTF8 ); + rtl::OString aTitle(rtl::OUStringToOString(rTitle, + RTL_TEXTENCODING_UTF8)); + rtl::OString aMessage(rtl::OUStringToOString(rMessage, + RTL_TEXTENCODING_UTF8)); /* Create the dialogue */ GtkWidget* mainwin = gtk_message_dialog_new ( NULL, (GtkDialogFlags)0, GTK_MESSAGE_WARNING, - GTK_BUTTONS_NONE, aMessage.GetBuffer(), NULL ); - gtk_window_set_title( GTK_WINDOW( mainwin ), aTitle.GetBuffer() ); + GTK_BUTTONS_NONE, aMessage.getStr(), NULL ); + gtk_window_set_title( GTK_WINDOW( mainwin ), aTitle.getStr() ); gint nButtons = 0, nResponse; @@ -92,13 +94,16 @@ int GtkSalSystem::ShowNativeDialog( const String& rTitle, { if( nButton == nDefButton ) { - gtk_dialog_add_button( GTK_DIALOG( mainwin ), MapToGtkAccelerator(*it).GetBuffer(), nButtons ); - gtk_dialog_set_default_response( GTK_DIALOG( mainwin ), nButtons ); + gtk_dialog_add_button(GTK_DIALOG( mainwin ), + MapToGtkAccelerator(*it).getStr(), nButtons); + gtk_dialog_set_default_response(GTK_DIALOG(mainwin), nButtons); } else { - ByteString aLabel( *it, RTL_TEXTENCODING_UTF8 ); - gtk_dialog_add_button( GTK_DIALOG( mainwin ), aLabel.GetBuffer(), nButtons ); + rtl::OString aLabel(rtl::OUStringToOString(*it, + RTL_TEXTENCODING_UTF8)); + gtk_dialog_add_button(GTK_DIALOG(mainwin), aLabel.getStr(), + nButtons); } nButtons++; } diff --git a/vcl/unx/headless/svppspgraphics.cxx b/vcl/unx/headless/svppspgraphics.cxx index 93fb0ced68b2..82f3ac43df96 100644 --- a/vcl/unx/headless/svppspgraphics.cxx +++ b/vcl/unx/headless/svppspgraphics.cxx @@ -1135,10 +1135,12 @@ ImplDevFontAttributes PspGraphics::Info2DevFontAttributes( const psp::FastPrintF #if OSL_DEBUG_LEVEL > 2 if( bHasMapNames ) { - ByteString aOrigName( aDFA.maName, osl_getThreadTextEncoding() ); - ByteString aAliasNames( aDFA.maMapNames, osl_getThreadTextEncoding() ); + rtl::OString aOrigName(rtl::OUStringToOString(aDFA.maName, + osl_getThreadTextEncoding())); + rtl::OString aAliasNames(rtl::OUStringToOString(aDFA.maMapNames, + osl_getThreadTextEncoding())); fprintf( stderr, "using alias names \"%s\" for font family \"%s\"\n", - aAliasNames.GetBuffer(), aOrigName.GetBuffer() ); + aAliasNames.getStr(), aOrigName.getStr() ); } #endif |