diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-17 09:41:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-17 13:41:48 +0200 |
commit | 28fc986025009473c9782b61d8c6062fa60085ba (patch) | |
tree | 08c19f552e49802b93537ea108b04f9fe13770e9 /vcl | |
parent | 65575016ab29b942aea482eab0b54afa262fb998 (diff) |
move GetStandardText to stdtext.hxx
Change-Id: Iaf9b5107cf88390f62d5ca94bf985c77bcb8b7ad
Reviewed-on: https://gerrit.libreoffice.org/79048
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/osx/salsys.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 11 | ||||
-rw-r--r-- | vcl/source/toolkit/morebtn.cxx | 5 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 11 |
5 files changed, 20 insertions, 16 deletions
diff --git a/vcl/osx/salsys.cxx b/vcl/osx/salsys.cxx index b8c306e2e806..36c92b8f2757 100644 --- a/vcl/osx/salsys.cxx +++ b/vcl/osx/salsys.cxx @@ -19,7 +19,7 @@ #include <rtl/ustrbuf.hxx> -#include <vcl/button.hxx> +#include <vcl/stdtext.hxx> #include <osx/salsys.h> #include <osx/saldata.hxx> @@ -70,7 +70,7 @@ static NSString* getStandardString( StandardButtonType nButtonId, bool bUseResou OUString aText; if( bUseResources ) { - aText = Button::GetStandardText( nButtonId ); + aText = GetStandardText( nButtonId ); } if( aText.isEmpty() ) // this is for bad cases, we might be missing the vcl resource { diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 91141d35cc4e..0036d6dbb90d 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -31,6 +31,7 @@ #include <vcl/salnativewidgets.hxx> #include <vcl/edit.hxx> #include <vcl/layout.hxx> +#include <vcl/stdtext.hxx> #include <vcl/vclstatuslistener.hxx> #include <vcl/uitest/uiobject.hxx> @@ -122,7 +123,7 @@ void Button::Click() ImplCallEventListenersAndHandler( VclEventId::ButtonClick, [this] () { maClickHdl.Call(this); } ); } -OUString Button::GetStandardText(StandardButtonType eButton) +OUString GetStandardText(StandardButtonType eButton) { static const char* aResIdAry[static_cast<int>(StandardButtonType::Count)] = { @@ -1671,7 +1672,7 @@ void OKButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) set_id("ok"); PushButton::ImplInit( pParent, nStyle ); - SetText( Button::GetStandardText( StandardButtonType::OK ) ); + SetText( GetStandardText( StandardButtonType::OK ) ); } OKButton::OKButton( vcl::Window* pParent, WinBits nStyle ) : @@ -1717,7 +1718,7 @@ void CancelButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) set_id("cancel"); PushButton::ImplInit( pParent, nStyle ); - SetText( Button::GetStandardText( StandardButtonType::Cancel ) ); + SetText( GetStandardText( StandardButtonType::Cancel ) ); } CancelButton::CancelButton( vcl::Window* pParent, WinBits nStyle ) : @@ -1761,7 +1762,7 @@ void CancelButton::Click() CloseButton::CloseButton( vcl::Window* pParent, WinBits nStyle ) : CancelButton(pParent, nStyle) { - SetText( Button::GetStandardText( StandardButtonType::Close ) ); + SetText( GetStandardText( StandardButtonType::Close ) ); } void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) @@ -1769,7 +1770,7 @@ void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) set_id("help"); PushButton::ImplInit( pParent, nStyle | WB_NOPOINTERFOCUS ); - SetText( Button::GetStandardText( StandardButtonType::Help ) ); + SetText( GetStandardText( StandardButtonType::Help ) ); } HelpButton::HelpButton( vcl::Window* pParent, WinBits nStyle ) : diff --git a/vcl/source/toolkit/morebtn.cxx b/vcl/source/toolkit/morebtn.cxx index 61fc3ff05f26..1a3ca8eaf777 100644 --- a/vcl/source/toolkit/morebtn.cxx +++ b/vcl/source/toolkit/morebtn.cxx @@ -18,6 +18,7 @@ */ #include <vcl/toolkit/morebtn.hxx> +#include <vcl/stdtext.hxx> struct ImplMoreButtonData { @@ -32,8 +33,8 @@ void MoreButton::ImplInit( vcl::Window* pParent, WinBits nStyle ) PushButton::ImplInit( pParent, nStyle ); - mpMBData->maMoreText = Button::GetStandardText( StandardButtonType::More ); - mpMBData->maLessText = Button::GetStandardText( StandardButtonType::Less ); + mpMBData->maMoreText = GetStandardText( StandardButtonType::More ); + mpMBData->maLessText = GetStandardText( StandardButtonType::Less ); ShowState(); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index f5beadaf0a9f..49fecb7476fc 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -16,6 +16,7 @@ #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <vcl/stdtext.hxx> #include <messagedialog.hxx> #include <window.h> #include <boost/multi_array.hpp> @@ -2249,13 +2250,13 @@ void MessageDialog::create_message_area() break; case VclButtonsType::YesNo: pBtn = VclPtr<PushButton>::Create(pButtonBox); - pBtn->SetText(Button::GetStandardText(StandardButtonType::Yes)); + pBtn->SetText(GetStandardText(StandardButtonType::Yes)); pBtn->Show(); pBtn->set_id("yes"); add_button(pBtn, RET_YES, true); pBtn.set( VclPtr<PushButton>::Create(pButtonBox) ); - pBtn->SetText(Button::GetStandardText(StandardButtonType::No)); + pBtn->SetText(GetStandardText(StandardButtonType::No)); pBtn->Show(); pBtn->set_id("no"); add_button(pBtn, RET_NO, true); diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 8bb71ebf7f3b..3509f9c2bb75 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -43,6 +43,7 @@ #include <vcl/quickselectionengine.hxx> #include <vcl/mnemonic.hxx> #include <vcl/pngwrite.hxx> +#include <vcl/stdtext.hxx> #include <vcl/syswin.hxx> #include <vcl/weld.hxx> #include <vcl/virdev.hxx> @@ -3699,26 +3700,26 @@ public: gtk_button_box_set_layout(m_pButtonBox, GTK_BUTTONBOX_END); gtk_box_set_spacing(GTK_BOX(m_pButtonBox), 6); - m_pBack = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(Button::GetStandardText(StandardButtonType::Back)).getStr())); + m_pBack = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(GetStandardText(StandardButtonType::Back)).getStr())); gtk_widget_set_can_default(GTK_WIDGET(m_pBack), true); gtk_buildable_set_name(GTK_BUILDABLE(m_pBack), "previous"); gtk_box_pack_end(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pBack), false, false, 0); - m_pNext = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(Button::GetStandardText(StandardButtonType::Next)).getStr())); + m_pNext = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(GetStandardText(StandardButtonType::Next)).getStr())); gtk_widget_set_can_default(GTK_WIDGET(m_pNext), true); gtk_buildable_set_name(GTK_BUILDABLE(m_pNext), "next"); gtk_box_pack_end(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pNext), false, false, 0); - m_pCancel = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(Button::GetStandardText(StandardButtonType::Cancel)).getStr())); + m_pCancel = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(GetStandardText(StandardButtonType::Cancel)).getStr())); gtk_widget_set_can_default(GTK_WIDGET(m_pCancel), true); gtk_box_pack_end(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pCancel), false, false, 0); - m_pFinish = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(Button::GetStandardText(StandardButtonType::Finish)).getStr())); + m_pFinish = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(GetStandardText(StandardButtonType::Finish)).getStr())); gtk_widget_set_can_default(GTK_WIDGET(m_pFinish), true); gtk_buildable_set_name(GTK_BUILDABLE(m_pFinish), "finish"); gtk_box_pack_end(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pFinish), false, false, 0); - m_pHelp = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(Button::GetStandardText(StandardButtonType::Help)).getStr())); + m_pHelp = GTK_BUTTON(gtk_button_new_with_mnemonic(MapToGtkAccelerator(GetStandardText(StandardButtonType::Help)).getStr())); gtk_widget_set_can_default(GTK_WIDGET(m_pHelp), true); g_signal_connect(m_pHelp, "clicked", G_CALLBACK(signalHelpClicked), this); gtk_box_pack_end(GTK_BOX(m_pButtonBox), GTK_WIDGET(m_pHelp), false, false, 0); |