cui/uiconfig/ui/borderpage.ui | 13 +++++++++++++ vcl/inc/vcl/button.hxx | 2 +- vcl/source/control/button.cxx | 32 +++++++++++++++----------------- 3 files changed, 29 insertions(+), 18 deletions(-)
New commits: commit 092ead3edfd51964312ab538652af6b080051b51 Author: Caolán McNamara <[email protected]> Date: Thu Jan 24 20:59:44 2013 +0000 add mnemonic widgets to border page Change-Id: I4faa14dc08a9016d7766b495bb51716f7f2db709 diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui index a53e72a..71f32f8 100644 --- a/cui/uiconfig/ui/borderpage.ui +++ b/cui/uiconfig/ui/borderpage.ui @@ -71,6 +71,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_User-defined</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">framesel</property> </object> <packing> <property name="left_attach">0</property> @@ -86,6 +87,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Default</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">presets</property> </object> <packing> <property name="left_attach">0</property> @@ -153,6 +155,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">St_yle</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">linestylelb</property> </object> <packing> <property name="left_attach">0</property> @@ -168,6 +171,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Width</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">linewidthmf:0.00pt</property> </object> <packing> <property name="left_attach">0</property> @@ -183,6 +187,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Color</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">linecolorlb</property> </object> <packing> <property name="left_attach">0</property> @@ -342,6 +347,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Left</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">leftmf:0.00mm</property> </object> <packing> <property name="left_attach">0</property> @@ -356,6 +362,8 @@ <property name="can_focus">False</property> <property name="xalign">0</property> <property name="label" translatable="yes">Right</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">rightmf:0.00mm</property> </object> <packing> <property name="left_attach">0</property> @@ -371,6 +379,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Top</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">topmf:0.00mm</property> </object> <packing> <property name="left_attach">0</property> @@ -386,6 +395,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Bottom</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">bottommf:0.00mm</property> </object> <packing> <property name="left_attach">0</property> @@ -467,6 +477,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">_Position</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">shadows</property> </object> <packing> <property name="left_attach">0</property> @@ -482,6 +493,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">Distan_ce</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">distancemf:0.00mm</property> </object> <packing> <property name="left_attach">1</property> @@ -497,6 +509,7 @@ <property name="xalign">0</property> <property name="label" translatable="yes">C_olor</property> <property name="use_underline">True</property> + <property name="mnemonic_widget">shadowcolorlb</property> </object> <packing> <property name="left_attach">2</property> commit 7d8caa3bacb99fa5fc7cf44c94aa907fcc45126b Author: Caolán McNamara <[email protected]> Date: Thu Jan 24 17:21:10 2013 +0000 remove XubString in Button::GetStandardText Change-Id: I13db34f37caeb44ab622b94d2e23ac1727182c8b diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx index 47a4401..03ba3d6 100644 --- a/vcl/inc/vcl/button.hxx +++ b/vcl/inc/vcl/button.hxx @@ -71,7 +71,7 @@ public: void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; } const Link& GetClickHdl() const { return maClickHdl; } - static XubString GetStandardText( StandardButtonType eButton ); + static OUString GetStandardText( StandardButtonType eButton ); static XubString GetStandardHelpText( StandardButtonType eButton ); sal_Bool SetModeImage( const Image& rImage ); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 6f0ad62..1cc10af 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -112,7 +112,7 @@ void Button::Click() // ----------------------------------------------------------------------- -XubString Button::GetStandardText( StandardButtonType eButton ) +OUString Button::GetStandardText( StandardButtonType eButton ) { static struct { @@ -134,27 +134,25 @@ XubString Button::GetStandardText( StandardButtonType eButton ) { SV_BUTTONTEXT_RESET, "R~eset" } }; - String aText; ResMgr* pResMgr = ImplGetResMgr(); - if( pResMgr ) + + if (!pResMgr) { - sal_uInt32 nResId = aResIdAry[(sal_uInt16)eButton].nResId; - aText = ResId(nResId, *pResMgr).toString(); + OString aT( aResIdAry[(sal_uInt16)eButton].pDefText ); + return OStringToOUString(aT, RTL_TEXTENCODING_ASCII_US); + } - if (nResId == SV_BUTTONTEXT_OK || nResId == SV_BUTTONTEXT_CANCEL) - { + sal_uInt32 nResId = aResIdAry[(sal_uInt16)eButton].nResId; + OUString aText = ResId(nResId, *pResMgr).toString(); + + if (nResId == SV_BUTTONTEXT_OK || nResId == SV_BUTTONTEXT_CANCEL) + { #ifndef WNT - // Windows (apparently) has some magic auto-accelerator evil around - // ok / cancel so add accelerators only for Unix - if (aText.Search('~') == STRING_NOTFOUND) - aText.Insert(rtl::OUString("~"), 0); + // Windows (apparently) has some magic auto-accelerator evil around + // ok / cancel so add accelerators only for Unix + if (aText.indexOf('~') == -1) + return "~" + aText; #endif - } - } - else - { - rtl::OString aT( aResIdAry[(sal_uInt16)eButton].pDefText ); - aText = rtl::OStringToOUString(aT, RTL_TEXTENCODING_ASCII_US); } return aText; }
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
