summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2014-08-22 14:24:43 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2014-08-22 14:33:28 +0300
commitd15d7b7bbaa792d0102a603652a794e0a2212a47 (patch)
tree21fcb5e55c911ab85d5fc35413ea75f8c42bf830
parent6396e18f4d49c24283b170310a1892db40c128d3 (diff)
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
-rw-r--r--framework/source/uielement/langselectionmenucontroller.cxx2
-rw-r--r--sw/source/uibase/shells/annotsh.cxx12
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx16
-rw-r--r--sw/source/uibase/shells/textsh1.cxx5
4 files changed, 29 insertions, 6 deletions
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 8d1ced1d61d7..60784531249a 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 e26f7d62e2de..ad5b11cbb2e3 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 559a50d5a537..907dc5a09d91 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 9ef3ae418be8..c8995964b19a 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)