diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-05-18 21:14:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-19 15:40:40 +0200 |
commit | 2155e04d6343638ca9815d394cbc4f78c2b17c3a (patch) | |
tree | 0378142f6ce9edb63074291aed45527568e7b254 /vcl/unx | |
parent | cee02e81cd3b55fb46eacf5db5713e8bf4363bcd (diff) |
make string translation loading more uniform
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk/fpicker/resourceprovider.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkframe.cxx | 10 | ||||
-rw-r--r-- | vcl/unx/kde4/KDE4FilePicker.cxx | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx index 42ef78a59132..c4da0258b8c6 100644 --- a/vcl/unx/gtk/fpicker/resourceprovider.cxx +++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx @@ -75,7 +75,7 @@ OUString SalGtkPicker::getResString( sal_Int32 aId ) // translate the control id to a resource id sal_Int16 aResId = CtrlIdToResId( aId ); if ( aResId > -1 ) - aResString = ResId(aResId, *ImplGetResMgr()).toString(); + aResString = ResId(aResId, *ImplGetResMgr()); } catch(...) { diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index f32e49ad4f7b..8192076fc906 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -643,7 +643,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *firstsubmenu = g_menu_new (); - OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr).toString(), + OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sNew.getStr(), "app.New"); @@ -655,7 +655,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *secondsubmenu = g_menu_new (); - OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr).toString(), + OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sPreferences.getStr(), "app.OptionsTreeDialog"); @@ -667,21 +667,21 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *thirdsubmenu = g_menu_new (); - OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr).toString(), + OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sHelp.getStr(), "app.HelpIndex"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr).toString(), + OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sAbout.getStr(), "app.About"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr).toString(), + OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sQuit.getStr(), "app.Quit"); diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 30a729c5cbcc..54574dd1a38c 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -666,7 +666,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *firstsubmenu = g_menu_new (); - OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr).toString(), + OString sNew(OUStringToOString(ResId(SV_BUTTONTEXT_NEW, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sNew.getStr(), "app.New"); @@ -678,7 +678,7 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *secondsubmenu = g_menu_new (); - OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr).toString(), + OString sPreferences(OUStringToOString(ResId(SV_STDTEXT_PREFERENCES, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sPreferences.getStr(), "app.OptionsTreeDialog"); @@ -690,21 +690,21 @@ gboolean ensure_dbus_setup( gpointer data ) GMenu *thirdsubmenu = g_menu_new (); - OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr).toString(), + OString sHelp(OUStringToOString(ResId(SV_BUTTONTEXT_HELP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sHelp.getStr(), "app.HelpIndex"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr).toString(), + OString sAbout(OUStringToOString(ResId(SV_STDTEXT_ABOUT, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sAbout.getStr(), "app.About"); g_menu_append_item( thirdsubmenu, item ); g_object_unref(item); - OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr).toString(), + OString sQuit(OUStringToOString(ResId(SV_MENU_MAC_QUITAPP, *pMgr), RTL_TEXTENCODING_UTF8).replaceFirst("~", "_")); item = g_menu_item_new(sQuit.getStr(), "app.Quit"); diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx index af57bb204b71..00a5a5475b91 100644 --- a/vcl/unx/kde4/KDE4FilePicker.cxx +++ b/vcl/unx/kde4/KDE4FilePicker.cxx @@ -519,7 +519,7 @@ QString KDE4FilePicker::getResString( sal_Int16 aRedId ) try { - aResString = toQString(ResId(aRedId, *ImplGetResMgr()).toString()); + aResString = toQString(ResId(aRedId, *ImplGetResMgr())); } catch(...) { |