[Libreoffice-commits] .: 3 commits - sfx2/source sw/uiconfig vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 24 02:50:54 PST 2013


 sfx2/source/appl/sfxhelp.cxx              |   15 ++++++++++++++-
 sw/uiconfig/swriter/ui/formattablepage.ui |    7 +++++++
 vcl/source/window/builder.cxx             |    8 ++++++--
 3 files changed, 27 insertions(+), 3 deletions(-)

New commits:
commit 4b4cb23d22f99efc445be974c05030b23bc7d3d0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 24 10:14:13 2013 +0000

    set mnemonic widgets on format table page
    
    Change-Id: I0a3a3461080289af1726cf5f62d10b76dec9e57c

diff --git a/sw/uiconfig/swriter/ui/formattablepage.ui b/sw/uiconfig/swriter/ui/formattablepage.ui
index 20b213b..3e341b3 100644
--- a/sw/uiconfig/swriter/ui/formattablepage.ui
+++ b/sw/uiconfig/swriter/ui/formattablepage.ui
@@ -58,6 +58,7 @@
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">_Name</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">name</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -73,6 +74,7 @@
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">W_idth</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">widthmf:0.00cm</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -189,6 +191,7 @@
                             <property name="xpad">1</property>
                             <property name="label" translatable="yes">Lef_t</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">leftmf:0.00cm</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -204,6 +207,7 @@
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Ri_ght</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">rightmf:0.00cm</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -221,6 +225,7 @@
                             <property name="ypad">1</property>
                             <property name="label" translatable="yes">_Above</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">abovemf:0.00cm</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -237,6 +242,7 @@
                             <property name="xpad">1</property>
                             <property name="label" translatable="yes">_Below</property>
                             <property name="use_underline">True</property>
+                            <property name="mnemonic_widget">belowmf:0.00cm</property>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -521,6 +527,7 @@
                     <property name="xalign">0</property>
                     <property name="label" translatable="yes">Text _direction</property>
                     <property name="use_underline">True</property>
+                    <property name="mnemonic_widget">textdirection</property>
                   </object>
                   <packing>
                     <property name="left_attach">0</property>
commit 19f46cbac2636f4d55bf932219b7e16056f70010
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 24 10:13:16 2013 +0000

    look into active tabcontrol page on help fallback search
    
    Change-Id: I13eda8a66e437c5f428b3ee3e9106f25cc9d02b7

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 0adbf12..5d92a18 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -709,6 +709,7 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const
             {
                 // no help found -> try with parent help id.
                 Window* pParent = pWindow->GetParent();
+                bool bTriedTabPage = false;
                 while ( pParent )
                 {
                     OString aHelpId = pParent->GetHelpId();
@@ -720,11 +721,23 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const
                     else
                     {
                         pParent = pParent->GetParent();
-                        if ( !pParent )
+                        if (!pParent)
                         {
                             // create help url of start page ( helpid == 0 -> start page)
                             aHelpURL = CreateHelpURL( String(), aHelpModuleName );
                         }
+                        else if (pParent->IsDialog() && !bTriedTabPage)
+                        {
+                            //During help fallback, before we ask a dialog for its help
+                            //see if it has a TabControl and ask the active tab of
+                            //that for help
+                            bTriedTabPage = true;
+                            TabControl *pCtrl = ((Dialog*)pParent)->get<TabControl>("tabcontrol");
+                            TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : NULL;
+                            Window *pTabChild = pTabPage ? pTabPage->GetWindow(WINDOW_FIRSTCHILD) : NULL;
+                            if (pTabChild)
+                                pParent = pTabChild;
+                        }
                     }
                 }
             }
commit 1799f269026bf6ec81f1c5e896698bc64d3ee16d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 24 10:12:34 2013 +0000

    strip customproperty from name of Mnemonic Widget target
    
    Change-Id: I64e43e472215df35872e447e381047e64002184b

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 4596a2c..9d6ab86 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -792,12 +792,16 @@ bool VclBuilder::extractButtonImage(const OString &id, stringmap &rMap, bool bRa
     return false;
 }
 
-void VclBuilder::extractMnemonicWidget(const OString &id, stringmap &rMap)
+void VclBuilder::extractMnemonicWidget(const OString &rLabelID, stringmap &rMap)
 {
     VclBuilder::stringmap::iterator aFind = rMap.find(OString("mnemonic-widget"));
     if (aFind != rMap.end())
     {
-        m_pParserState->m_aMnemonicWidgetMaps.push_back(MnemonicWidgetMap(id, aFind->second));
+        OString sID = aFind->second;
+        sal_Int32 nDelim = sID.indexOf(':');
+        if (nDelim != -1)
+            sID = sID.copy(0, nDelim);
+        m_pParserState->m_aMnemonicWidgetMaps.push_back(MnemonicWidgetMap(rLabelID, sID));
         rMap.erase(aFind);
     }
 }


More information about the Libreoffice-commits mailing list