[Libreoffice-commits] core.git: framework/source sw/source

Maxim Monastirsky momonasmon at gmail.com
Fri Aug 22 04:36:32 PDT 2014


 framework/source/uielement/langselectionmenucontroller.cxx |    2 -
 sw/source/uibase/shells/annotsh.cxx                        |   12 ++++++++-
 sw/source/uibase/shells/drwtxtex.cxx                       |   16 ++++++++++++-
 sw/source/uibase/shells/textsh1.cxx                        |    5 +---
 4 files changed, 29 insertions(+), 6 deletions(-)

New commits:
commit d15d7b7bbaa792d0102a603652a794e0a2212a47
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date:   Fri Aug 22 14:24:43 2014 +0300

    Open the right tab for the More... command
    
    Partially fixed by Caolán in
    3ac80237f310366afef0f7b6c427889d652bd369.
    
    Remaining issues are the paragraph submenu, and the top
    menu for both selection and paragraph. Also fixed for
    the drawing text and annotations shells (including the
    regression created by the above commit, that the dialog
    didn't show at all).
    
    Change-Id: I1ba4c825ad48af23ad5c07c8c5f25380952c0be1

diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 8d1ced1..6078453 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -207,7 +207,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
     OUString aCmd_Language;
     if( eMode == MODE_SetLanguageSelectionMenu )
     {
-        aCmd_Dialog += ".uno:FontDialog?Language:string=*";
+        aCmd_Dialog += ".uno:FontDialog?Page:string=font";
         aCmd_Language += ".uno:LanguageStatus?Language:string=Current_";
     }
     else if ( eMode == MODE_SetLanguageParagraphMenu )
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index e26f7d6..ad5b11c 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -466,8 +466,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
         case SID_CHAR_DLG:
         {
             const SfxItemSet* pArgs = rReq.GetArgs();
+            const SfxPoolItem* pItem = 0;
+            if (nSlot == SID_CHAR_DLG)
+                pItem = pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) );
 
-            if( !pArgs )
+            if( !pArgs || pItem )
             {
                 /* mod
                 SwView* pView = &GetView();
@@ -490,6 +493,13 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
                 {
                     pDlg->SetCurPageId("fonteffects");
                 }
+                else if (pItem)
+                {
+                    const SfxStringItem* pStringItem = static_cast< const SfxStringItem* >(pItem);
+                    if (pStringItem)
+                        pDlg->SetCurPageId(OUStringToOString(pStringItem->GetValue(), RTL_TEXTENCODING_UTF8));
+                }
+
                 sal_uInt16 nRet = pDlg->Execute();
                 if(RET_OK == nRet )
                 {
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 559a50d..907dc5a 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -298,8 +298,11 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
         case SID_CHAR_DLG_FOR_PARAGRAPH:
         {
             const SfxItemSet* pArgs = rReq.GetArgs();
+            const SfxPoolItem* pItem = 0;
+            if (nSlot == SID_CHAR_DLG)
+                pItem = pArgs->GetItem(FN_PARAM_1, false, TYPE(SfxStringItem) );
 
-            if( !pArgs )
+            if( !pArgs || pItem )
             {
                 aOldSelection = pOLV->GetSelection();
                 if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH)
@@ -329,6 +332,17 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
                 {
                     pDlg->SetCurPageId("fonteffects");
                 }
+                else if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH)
+                {
+                    pDlg->SetCurPageId("font");
+                }
+                else if (pItem)
+                {
+                    const SfxStringItem* pStringItem = static_cast< const SfxStringItem* >(pItem);
+                    if (pStringItem)
+                        pDlg->SetCurPageId(OUStringToOString(pStringItem->GetValue(), RTL_TEXTENCODING_UTF8));
+                }
+
                 sal_uInt16 nRet = pDlg->Execute();
                 if(RET_OK == nRet )
                 {
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 9ef3ae4..c899596 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -183,12 +183,11 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
     {
         pDlg->SetCurPageId("fonteffects");
     }
-    else if (pDlg && nSlot == SID_ATTR_CHAR_FONT)
+    else if (pDlg && (nSlot == SID_ATTR_CHAR_FONT || nSlot == SID_CHAR_DLG_FOR_PARAGRAPH))
     {
         pDlg->SetCurPageId("font");
     }
-
-    if (pReq)
+    else if (pDlg && pReq)
     {
         SFX_REQUEST_ARG((*pReq), pItem, SfxStringItem, FN_PARAM_1, false);
         if (pItem)


More information about the Libreoffice-commits mailing list