diff options
author | Olivier Hallot <olivier.hallot@edx.srv.br> | 2013-07-11 17:10:14 -0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-12 08:03:18 +0000 |
commit | 9992b1aadb114159fe5d78e46aebb209d718d958 (patch) | |
tree | baac13fd191a64e26cf6f197ab50c75d201472f7 | |
parent | String.AppendAscii() cleanup in sc (diff) | |
download | core-9992b1aadb114159fe5d78e46aebb209d718d958.tar.gz core-9992b1aadb114159fe5d78e46aebb209d718d958.zip |
Convert paragraph properties dialog to .ui format
Convert Writer paragraph properties dialog to .ui widgets.
Reduced 2 different dialogs into one (bDrawParaDlg)
Conflicts:
sw/AllLangResTarget_sw.mk
Change-Id: I63135dda5416b8b503f9aa9f4986ce3ed08f535c
Reviewed-on: https://gerrit.libreoffice.org/4851
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/AllLangResTarget_sw.mk | 3 | ||||
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/inc/swabstdlg.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/paradlg.hrc | 25 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/paradlg.src | 128 | ||||
-rw-r--r-- | sw/source/ui/chrdlg/pardlg.cxx | 70 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.cxx | 21 | ||||
-rw-r--r-- | sw/source/ui/dialog/swdlgfact.hxx | 1 | ||||
-rw-r--r-- | sw/source/ui/inc/swuipardlg.hxx | 12 | ||||
-rw-r--r-- | sw/source/ui/shells/annotsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/drwtxtex.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/textsh1.cxx | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/paradialog.ui | 233 |
13 files changed, 294 insertions, 207 deletions
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk index 7f96e8bbf507..c4553fdb675e 100644 --- a/sw/AllLangResTarget_sw.mk +++ b/sw/AllLangResTarget_sw.mk @@ -69,10 +69,9 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\ sw/source/ui/app/mn.src \ sw/source/ui/chrdlg/ccoll.src \ sw/source/ui/chrdlg/chrdlg.src \ - sw/source/ui/chrdlg/paradlg.src \ sw/source/ui/config/mailconfigpage.src \ sw/source/ui/config/optcomp.src \ - sw/source/ui/config/optdlg.src \ + sw/source/ui/config/optdlg.src \ sw/source/ui/config/optload.src \ sw/source/ui/dbui/addresslistdialog.src \ sw/source/ui/dbui/createaddresslistdialog.src \ diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 43fc6a053b06..c4a09e5a3491 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -113,6 +113,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/outlinenumberingpage \ sw/uiconfig/swriter/ui/outlinepositionpage \ sw/uiconfig/swriter/ui/queryshowchangesdialog \ + sw/uiconfig/swriter/ui/paradialog \ sw/uiconfig/swriter/ui/previewzoomdialog \ sw/uiconfig/swriter/ui/printoptionspage \ sw/uiconfig/swriter/ui/printeroptions \ diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 1515b786d18f..4f48dad03636 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -365,7 +365,6 @@ public: SwView& rVw, const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, - int nResId, const String *pCollName = 0, sal_Bool bDraw = sal_False, sal_uInt16 nDefPage = 0) = 0; diff --git a/sw/source/ui/chrdlg/paradlg.hrc b/sw/source/ui/chrdlg/paradlg.hrc deleted file mode 100644 index d0f59f95cd2a..000000000000 --- a/sw/source/ui/chrdlg/paradlg.hrc +++ /dev/null @@ -1,25 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#define TAB_CONTROL 55 -#define HYPHEN_BOX_AFTER 44 -#define HYPHEN_BOX_BEFORE 22 -#define OK_BTN 50 -#define CANCEL_BTN 51 - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/chrdlg/paradlg.src b/sw/source/ui/chrdlg/paradlg.src deleted file mode 100644 index 6435a96d5f10..000000000000 --- a/sw/source/ui/chrdlg/paradlg.src +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include "globals.hrc" -#include "chrdlg.hrc" -#include "paradlg.hrc" -#define HelpText "error - hier keine HelpTexte HelpText" -TabDialog DLG_PARA -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Paragraph" ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = TP_PARA_STD ; - Text [ en-US ] = "Indents & Spacing" ; - PageResID = TP_PARA_STD ; - }; - PageItem - { - Identifier = TP_PARA_ALIGN ; - PageResID = TP_PARA_ALIGN ; - Text [ en-US ] = "Alignment" ; - }; - PageItem - { - Identifier = TP_PARA_EXT ; - Text [ en-US ] = "Text Flow" ; - PageResID = TP_PARA_EXT ; - }; - PageItem - { - Identifier = TP_PARA_ASIAN; - Text [ en-US ] = "Asian Typography"; - }; - PageItem - { - Identifier = TP_NUMPARA ; - Text [ en-US ] = "Outline & Numbering" ; - }; - PageItem - { - Identifier = TP_TABULATOR ; - Text [ en-US ] = "Tabs" ; - PageResID = TP_TABULATOR ; - }; - PageItem - { - Identifier = TP_DROPCAPS ; - Text [ en-US ] = "Drop Caps" ; - PageResID = TP_DROPCAPS ; - }; - PageItem - { - Identifier = TP_BORDER ; - Text [ en-US ] = "Borders" ; - PageResID = TP_BORDER ; - }; - PageItem - { - Identifier = TP_BACKGROUND ; - Text [ en-US ] = "Background" ; - PageResID = TP_BACKGROUND ; - }; - }; - }; -}; -TabDialog DLG_DRAWPARA -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Paragraph" ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = TP_PARA_STD ; - Text [ en-US ] = "Indents & Spacing" ; - PageResID = TP_PARA_STD ; - }; - PageItem - { - Identifier = TP_PARA_ALIGN ; - PageResID = TP_PARA_ALIGN ; - Text [ en-US ] = "Alignment" ; - }; - PageItem - { - Identifier = TP_PARA_ASIAN; - Text [ en-US ] = "Asian Typography"; - }; - PageItem - { - Identifier = TP_TABULATOR ; - Text [ en-US ] = "Tabs" ; - PageResID = TP_TABULATOR ; - }; - }; - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx index f07337e80587..1073d2ef5ad6 100644 --- a/sw/source/ui/chrdlg/pardlg.cxx +++ b/sw/source/ui/chrdlg/pardlg.cxx @@ -19,6 +19,7 @@ #include "hintids.hxx" #include <sfx2/htmlmode.hxx> +#include <sfx2/tabdlg.hxx> #include <svl/style.hxx> #include <svtools/htmlcfg.hxx> #include <svl/cjkoptions.hxx> @@ -50,17 +51,15 @@ SwParaDlg::SwParaDlg(Window *pParent, const String *pTitle, sal_Bool bDraw, sal_uInt16 nDefPage): - - SfxTabDialog(pParent, bDraw ? SW_RES(DLG_DRAWPARA) : SW_RES(DLG_PARA), - &rCoreSet, 0 != pTitle), - + SfxTabDialog(pParent, + "ParagraphPropertiesDialog", + "modules/swriter/ui/paradialog.ui", + &rCoreSet, 0 != pTitle), rView(rVw), nDlgMode(nDialogMode), bDrawParaDlg(bDraw) { - FreeResource(); - nHtmlMode = ::GetHtmlMode(rVw.GetDocShell()); sal_Bool bHtmlMode = static_cast< sal_Bool >(nHtmlMode & HTMLMODE_ON); if(pTitle) @@ -72,76 +71,89 @@ SwParaDlg::SwParaDlg(Window *pParent, aTmp += ')'; SetText(aTmp); } + // tabs common to paragraph and draw paragraphs (paragraphs inside a text box) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageRangesFunc fail!"); - AddTabPage( TP_PARA_STD, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH) ); + m_nParaStd = AddTabPage("labelTP_PARA_STD", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), + pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH) ); OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), "GetTabPageRangesFunc fail!"); - AddTabPage( TP_PARA_ALIGN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH) ); + m_nParaAlign = AddTabPage( "labelTP_PARA_ALIGN", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), + pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH) ); SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); if (!bDrawParaDlg && (!bHtmlMode || rHtmlOpt.IsPrintLayoutExtension())) { OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!"); - AddTabPage( TP_PARA_EXT, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) ); + m_nParaExt = AddTabPage( "labelTP_PARA_EXT", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), + pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) ); } else - RemoveTabPage(TP_PARA_EXT); + RemoveTabPage("labelTP_PARA_EXT"); SvtCJKOptions aCJKOptions; if(!bHtmlMode && aCJKOptions.IsAsianTypographyEnabled()) { OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!"); - AddTabPage( TP_PARA_ASIAN, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) ); + m_nParaAsian = AddTabPage( "labelTP_PARA_ASIAN", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), + pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) ); } else - RemoveTabPage(TP_PARA_ASIAN); + RemoveTabPage("labelTP_PARA_ASIAN"); sal_uInt16 nWhich(rCoreSet.GetPool()->GetWhich(SID_ATTR_LRSPACE)); bool bLRValid = SFX_ITEM_AVAILABLE <= rCoreSet.GetItemState(nWhich); if(bHtmlMode || !bLRValid) - RemoveTabPage(TP_TABULATOR); + RemoveTabPage("labelTP_TABULATOR"); else { OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!"); - AddTabPage( TP_TABULATOR, pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) ); + m_nParaTab = AddTabPage( "labelTP_TABULATOR", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) ); + } + // remove unwanted tabs for draw text box paragraph properties + if (bDrawParaDlg) + { + RemoveTabPage("labelTP_NUMPARA"); + RemoveTabPage("labelTP_DROPCAPS"); + RemoveTabPage("labelTP_BACKGROUND"); + RemoveTabPage("labelTP_BORDER"); } - if (!bDrawParaDlg) + else { if(!(nDlgMode & DLG_ENVELOP)) - AddTabPage(TP_NUMPARA, SwParagraphNumTabPage::Create,SwParagraphNumTabPage::GetRanges); + m_nParaNumPara = AddTabPage("labelTP_NUMPARA", SwParagraphNumTabPage::Create, SwParagraphNumTabPage::GetRanges); else - RemoveTabPage(TP_NUMPARA); + RemoveTabPage("labelTP_NUMPARA"); if(!bHtmlMode || (nHtmlMode & HTMLMODE_FULL_STYLES)) { - AddTabPage(TP_DROPCAPS, SwDropCapsPage::Create, SwDropCapsPage::GetRanges); + m_nParaDrpCps = AddTabPage("labelTP_DROPCAPS", SwDropCapsPage::Create, SwDropCapsPage::GetRanges); } else { - RemoveTabPage(TP_DROPCAPS); + RemoveTabPage("labelTP_DROPCAPS"); } if(!bHtmlMode || (nHtmlMode & (HTMLMODE_SOME_STYLES|HTMLMODE_FULL_STYLES))) { OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ), "GetTabPageRangesFunc fail!"); - AddTabPage(TP_BACKGROUND, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) ); + m_nParaBckGrnd = AddTabPage("labelTP_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) ); } else { - RemoveTabPage(TP_BACKGROUND); + RemoveTabPage("labelTP_BACKGROUND"); } OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!"); OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!"); - AddTabPage(TP_BORDER, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) ); + m_nParaBorder = AddTabPage("labelTP_BORDER", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) ); } if (nDefPage) @@ -160,12 +172,12 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); // Table borders cannot get any shade in Writer - if (nId == TP_BORDER) + if (nId == m_nParaBorder) { aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,SW_BORDER_MODE_PARA)); rPage.PageCreated(aSet); } - else if( nId == TP_PARA_STD ) + else if( nId == m_nParaStd ) { aSet.Put(SfxUInt16Item(SID_SVXSTDPARAGRAPHTABPAGE_PAGEWIDTH, static_cast< sal_uInt16 >(rSh.GetAnyCurRect(RECT_PAGE_PRT).Width()) )); @@ -179,7 +191,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) } rPage.PageCreated(aSet); } - else if( TP_PARA_ALIGN == nId) + else if( m_nParaAlign == nId) { if (!bDrawParaDlg) { @@ -187,7 +199,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) rPage.PageCreated(aSet); } } - else if( TP_PARA_EXT == nId ) + else if( m_nParaExt == nId ) { // pagebreak only when the cursor is in the body-area and not in a table const sal_uInt16 eType = rSh.GetFrmType(0,sal_True); @@ -198,11 +210,11 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) rPage.PageCreated(aSet); } } - else if( TP_DROPCAPS == nId ) + else if( m_nParaDrpCps == nId ) { ((SwDropCapsPage&)rPage).SetFormat(sal_False); } - else if( TP_BACKGROUND == nId ) + else if( m_nParaBckGrnd == nId ) { if(!( nHtmlMode & HTMLMODE_ON ) || nHtmlMode & HTMLMODE_SOME_STYLES) @@ -211,7 +223,7 @@ void SwParaDlg::PageCreated(sal_uInt16 nId, SfxTabPage& rPage) rPage.PageCreated(aSet); } } - else if( TP_NUMPARA == nId) + else if( m_nParaNumPara == nId) { SwTxtFmtColl* pTmpColl = rSh.GetCurTxtFmtColl(); if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() ) diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 1f5f58be3c8d..16c61b107bbd 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -821,25 +821,12 @@ SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod () SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateSwParaDlg ( Window *pParent, SwView& rVw, const SfxItemSet& rCoreSet , sal_uInt8 nDialogMode, - int nResId, const String *pCollName, - sal_Bool bDraw , sal_uInt16 nDefPage) + sal_Bool bDraw , + sal_uInt16 nDefPage) { - SfxTabDialog* pDlg=NULL; - switch ( nResId ) - { - case DLG_DRAWPARA : - case DLG_PARA : - pDlg = new SwParaDlg( pParent, rVw, rCoreSet,nDialogMode, pCollName, bDraw, nDefPage ); - break; - - default: - break; - } - - if ( pDlg ) - return new AbstractTabDialog_Impl( pDlg ); - return 0; + SfxTabDialog* pDlg = new SwParaDlg( pParent, rVw, rCoreSet,nDialogMode, pCollName, bDraw, nDefPage ); + return new AbstractTabDialog_Impl( pDlg ); } VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateVclAbstractDialog ( Window *pParent, SwWrtShell &rSh, int nResId ) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 6aa3be4d3a20..ff9ee11c25da 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -466,7 +466,6 @@ public: SwView& rVw, const SfxItemSet& rCoreSet, sal_uInt8 nDialogMode, - int nResId, const String *pCollName = 0, sal_Bool bDraw = sal_False, sal_uInt16 nDefPage = 0); diff --git a/sw/source/ui/inc/swuipardlg.hxx b/sw/source/ui/inc/swuipardlg.hxx index 9081443123c0..379863f77525 100644 --- a/sw/source/ui/inc/swuipardlg.hxx +++ b/sw/source/ui/inc/swuipardlg.hxx @@ -27,7 +27,17 @@ class SwParaDlg: public SfxTabDialog sal_uInt8 nDlgMode; sal_Bool bDrawParaDlg; - void PageCreated(sal_uInt16 nID, SfxTabPage& rPage); + sal_uInt16 m_nParaStd; + sal_uInt16 m_nParaAlign; + sal_uInt16 m_nParaExt; + sal_uInt16 m_nParaAsian; + sal_uInt16 m_nParaTab; + sal_uInt16 m_nParaNumPara; + sal_uInt16 m_nParaDrpCps; + sal_uInt16 m_nParaBckGrnd; + sal_uInt16 m_nParaBorder; + + void PageCreated(sal_uInt16 nId, SfxTabPage& rPage); public: SwParaDlg( Window *pParent, diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 6df810809cd6..ab95b129dbb7 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -530,7 +530,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True ); + SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( rView.GetWindow(), rView, aDlgAttr,DLG_STD, 0, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx index ce9f3e790cc0..b533ea1b5fa4 100644 --- a/sw/source/ui/shells/drwtxtex.cxx +++ b/sw/source/ui/shells/drwtxtex.cxx @@ -421,7 +421,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, DLG_PARA, 0, sal_True ); + SfxAbstractTabDialog* pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(), GetView(), aDlgAttr,DLG_STD, 0, sal_True ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); sal_uInt16 nRet = pDlg->Execute(); if(RET_OK == nRet) diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 48e035552e4e..5e4360dfa83f 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -961,7 +961,7 @@ void SwTextShell::Execute(SfxRequest &rReq) SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!"); - pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet,DLG_STD, DLG_PARA,NULL, sal_False, nDefPage ); + pDlg = pFact->CreateSwParaDlg( GetView().GetWindow(),GetView(), aCoreSet, DLG_STD, NULL, sal_False, nDefPage ); OSL_ENSURE(pDlg, "Dialogdiet fail!"); } SfxItemSet* pSet = NULL; diff --git a/sw/uiconfig/swriter/ui/paradialog.ui b/sw/uiconfig/swriter/ui/paradialog.ui new file mode 100644 index 000000000000..8cc68b7df408 --- /dev/null +++ b/sw/uiconfig/swriter/ui/paradialog.ui @@ -0,0 +1,233 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="ParagraphPropertiesDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Paragraph</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="ok"> + <property name="label">gtk-ok</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="reset"> + <property name="label">gtk-revert-to-saved</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkNotebook" id="tabcontrol"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_PARA_STD"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Indents & Spacing</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_PARA_ASIAN"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Asian Typography</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_NUMPARA"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Outline & Numbering</property> + </object> + <packing> + <property name="position">2</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_TABULATOR"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Tabs</property> + </object> + <packing> + <property name="position">3</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_PARA_ALIGN"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0.4699999988079071</property> + <property name="label" translatable="yes">Alignment</property> + </object> + <packing> + <property name="position">4</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_PARA_EXT"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0.46000000834465027</property> + <property name="label" translatable="yes">Text Flow</property> + </object> + <packing> + <property name="position">5</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_DROPCAPS"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Drop Caps</property> + </object> + <packing> + <property name="position">6</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_BORDER"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Borders</property> + </object> + <packing> + <property name="position">7</property> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="labelTP_BACKGROUND"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Background</property> + </object> + <packing> + <property name="position">8</property> + <property name="tab_fill">False</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + <action-widget response="0">reset</action-widget> + </action-widgets> + </object> +</interface> |