Kaydet (Commit) d15d7b7b authored tarafından Maxim Monastirsky's avatar Maxim Monastirsky

Open the right tab for the More... command

Partially fixed by Caolán in
3ac80237.

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
üst 6396e18f
...@@ -207,7 +207,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup ...@@ -207,7 +207,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
OUString aCmd_Language; OUString aCmd_Language;
if( eMode == MODE_SetLanguageSelectionMenu ) if( eMode == MODE_SetLanguageSelectionMenu )
{ {
aCmd_Dialog += ".uno:FontDialog?Language:string=*"; aCmd_Dialog += ".uno:FontDialog?Page:string=font";
aCmd_Language += ".uno:LanguageStatus?Language:string=Current_"; aCmd_Language += ".uno:LanguageStatus?Language:string=Current_";
} }
else if ( eMode == MODE_SetLanguageParagraphMenu ) else if ( eMode == MODE_SetLanguageParagraphMenu )
......
...@@ -466,8 +466,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) ...@@ -466,8 +466,11 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
case SID_CHAR_DLG: case SID_CHAR_DLG:
{ {
const SfxItemSet* pArgs = rReq.GetArgs(); 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 /* mod
SwView* pView = &GetView(); SwView* pView = &GetView();
...@@ -490,6 +493,13 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) ...@@ -490,6 +493,13 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
{ {
pDlg->SetCurPageId("fonteffects"); 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(); sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet ) if(RET_OK == nRet )
{ {
......
...@@ -298,8 +298,11 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) ...@@ -298,8 +298,11 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
case SID_CHAR_DLG_FOR_PARAGRAPH: case SID_CHAR_DLG_FOR_PARAGRAPH:
{ {
const SfxItemSet* pArgs = rReq.GetArgs(); 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(); aOldSelection = pOLV->GetSelection();
if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH) if (nSlot == SID_CHAR_DLG_FOR_PARAGRAPH)
...@@ -329,6 +332,17 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) ...@@ -329,6 +332,17 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
{ {
pDlg->SetCurPageId("fonteffects"); 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(); sal_uInt16 nRet = pDlg->Execute();
if(RET_OK == nRet ) if(RET_OK == nRet )
{ {
......
...@@ -183,12 +183,11 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const ...@@ -183,12 +183,11 @@ void sw_CharDialog( SwWrtShell &rWrtSh, bool bUseDialog, sal_uInt16 nSlot,const
{ {
pDlg->SetCurPageId("fonteffects"); 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"); pDlg->SetCurPageId("font");
} }
else if (pDlg && pReq)
if (pReq)
{ {
SFX_REQUEST_ARG((*pReq), pItem, SfxStringItem, FN_PARAM_1, false); SFX_REQUEST_ARG((*pReq), pItem, SfxStringItem, FN_PARAM_1, false);
if (pItem) if (pItem)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment