[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 22 08:56:32 UTC 2018
sw/source/ui/dialog/swdlgfact.cxx | 4
sw/source/ui/fmtui/tmpdlg.cxx | 297 ++------------------------------------
sw/source/uibase/inc/tmpdlg.hxx | 16 --
3 files changed, 21 insertions(+), 296 deletions(-)
New commits:
commit 08e3202ea6e39fa31bc0f50f6b0dfe811356a2b7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 21 11:55:14 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 22 09:56:08 2018 +0100
weld writer char style dialog
Change-Id: Iaa61260e3d59dad782b32304aabe4e2d25069559
Reviewed-on: https://gerrit.libreoffice.org/63716
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit c986c8852cd1156aee870d21cfb4044d3b05a933)
Reviewed-on: https://gerrit.libreoffice.org/63772
Tested-by: Jenkins
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 4bbba8e94ea9..b12d3967a5a4 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -1008,11 +1008,11 @@ VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDi
SwWrtShell* pActShell,
bool bNew )
{
- if (nRegion == SfxStyleFamily::Page || nRegion == SfxStyleFamily::Pseudo || nRegion == SfxStyleFamily::Para)
+ if (nRegion != SfxStyleFamily::Frame)
{
return VclPtr<AbstractApplyTabController_Impl>::Create(o3tl::make_unique<SwTemplateDlgController>(pParent ? pParent->GetFrameWeld() : nullptr, rBase, nRegion, sPage, pActShell, bNew));
}
- VclPtr<SfxTabDialog> pDlg = VclPtr<SwTemplateDlg>::Create(pParent, rBase, nRegion, sPage, pActShell, bNew);
+ VclPtr<SfxTabDialog> pDlg = VclPtr<SwTemplateDlg>::Create(pParent, rBase, nRegion, sPage, pActShell);
return VclPtr<AbstractApplyTabDialog_Impl>::Create(pDlg);
}
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 2df422c14be5..796bb064e408 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -70,8 +70,7 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage,
- SwWrtShell* pActShell,
- bool bNew)
+ SwWrtShell* pActShell)
: SfxStyleDialog(pParent,
"TemplateDialog" + OUString::number(static_cast<sal_uInt16>(nRegion)),
"modules/swriter/ui/templatedialog" +
@@ -79,150 +78,20 @@ SwTemplateDlg::SwTemplateDlg(vcl::Window* pParent,
rBase)
, nType(nRegion)
, pWrtShell(pActShell)
- , bNewStyle(bNew)
- , m_nIndentsId(0)
- , m_nAlignId(0)
- , m_nFontId(0)
- , m_nFontEffectId(0)
- , m_nPositionId(0)
- , m_nAsianLayoutId(0)
- , m_nOutlineId(0)
- , m_nBackgroundId(0)
, m_nAreaId(0)
, m_nTransparenceId(0)
, m_nBorderId(0)
- , m_nConditionId(0)
, m_nTypeId(0)
, m_nOptionsId(0)
, m_nWrapId(0)
, m_nColumnId(0)
, m_nMacroId(0)
- , m_nHeaderId(0)
- , m_nFooterId(0)
- , m_nPageId(0)
{
nHtmlMode = ::GetHtmlMode(pWrtShell->GetView().GetDocShell());
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
// stitch TabPages together
switch( nRegion )
{
- // character styles
- case SfxStyleFamily::Char:
- {
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) , "GetTabPageRangesFunc fail!");
- m_nFontId = AddTabPage("font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ));
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) , "GetTabPageRangesFunc fail!");
- m_nFontEffectId = AddTabPage("fonteffect", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ));
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
- m_nPositionId = AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ));
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
- m_nAsianLayoutId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ));
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
- m_nBackgroundId = AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
-
- SAL_WARN_IF(!pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "sw.ui", "GetTabPageCreatorFunc fail!");
- SAL_WARN_IF(!pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "sw.ui", "GetTabPageRangesFunc fail!");
- m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ));
-
- SvtCJKOptions aCJKOptions;
- if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
- RemoveTabPage("asianlayout");
- }
- break;
- // paragraph styles
- case SfxStyleFamily::Para:
- {
- OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH), "GetTabPageRangesFunc fail!");
- m_nIndentsId = AddTabPage("indents", 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!");
- m_nAlignId = AddTabPage("alignment", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), "GetTabPageRangesFunc fail!");
- AddTabPage("textflow", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN), "GetTabPageRangesFunc fail!");
- AddTabPage("asiantypo", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ), "GetTabPageRangesFunc fail!");
- m_nFontId = AddTabPage("font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ), "GetTabPageRangesFunc fail!");
- m_nFontEffectId = AddTabPage("fonteffect", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) , "GetTabPageRangesFunc fail!");
- m_nPositionId = AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) , "GetTabPageRangesFunc fail!");
- m_nAsianLayoutId = AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ) , "GetTabPageRangesFunc fail!");
- m_nBackgroundId = AddTabPage("highlighting", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR), "GetTabPageRangesFunc fail!");
- AddTabPage("tabs", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
-
- m_nOutlineId = AddTabPage("outline", SwParagraphNumTabPage::Create, SwParagraphNumTabPage::GetRanges);
- AddTabPage("dropcaps", SwDropCapsPage::Create, SwDropCapsPage::GetRanges );
-
- // add Area and Transparence TabPages
- m_nAreaId = AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
- m_nTransparenceId = AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
-
- OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), "GetTabPageCreatorFunc fail!");
- OSL_ENSURE(pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ), "GetTabPageRangesFunc fail!");
- m_nBorderId = AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
-
- m_nConditionId = AddTabPage("condition", SwCondCollPage::Create,
- SwCondCollPage::GetRanges );
- if( (!bNewStyle && RES_CONDTXTFMTCOLL != static_cast<SwDocStyleSheet&>(rBase).GetCollection()->Which())
- || nHtmlMode & HTMLMODE_ON )
- RemoveTabPage("condition");
-
- SvtCJKOptions aCJKOptions;
- if(nHtmlMode & HTMLMODE_ON)
- {
- SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
- if (!rHtmlOpt.IsPrintLayoutExtension())
- RemoveTabPage("textflow");
- RemoveTabPage("asiantypo");
- RemoveTabPage("tabs");
- RemoveTabPage("outline");
- RemoveTabPage("asianlayout");
- if(!(nHtmlMode & HTMLMODE_FULL_STYLES))
- {
- RemoveTabPage("background");
- RemoveTabPage("dropcaps");
- }
- }
- else
- {
- if(!aCJKOptions.IsAsianTypographyEnabled())
- RemoveTabPage("asiantypo");
- if(!aCJKOptions.IsDoubleLinesEnabled())
- RemoveTabPage("asianlayout");
- }
- }
- break;
// frame styles
case SfxStyleFamily::Frame:
{
@@ -296,84 +165,7 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, sBulletCharFormat);
SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
- if (nId == m_nFontId)
- {
- OSL_ENSURE(::GetActiveView(), "no active view");
-
- SvxFontListItem aFontListItem( *static_cast<const SvxFontListItem*>(::GetActiveView()->
- GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
-
- aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
- sal_uInt32 nFlags = 0;
- if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON ))
- nFlags = SVX_RELATIVE_MODE;
- if( SfxStyleFamily::Char == nType )
- nFlags = nFlags|SVX_PREVIEW_CHARACTER;
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
- rPage.PageCreated(aSet);
- }
- else if (nId == m_nFontEffectId)
- {
- sal_uInt32 nFlags = SVX_ENABLE_FLASH;
- if( SfxStyleFamily::Char == nType )
- nFlags = nFlags|SVX_PREVIEW_CHARACTER;
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
- rPage.PageCreated(aSet);
- }
- else if (nId == m_nPositionId)
- {
- if( SfxStyleFamily::Char == nType )
- {
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
- rPage.PageCreated(aSet);
- }
- }
- else if (nId == m_nAsianLayoutId)
- {
- if( SfxStyleFamily::Char == nType )
- {
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
- rPage.PageCreated(aSet);
- }
- }
- else if (nId == m_nIndentsId)
- {
- if( rPage.GetItemSet().GetParent() )
- {
- aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST,MM50/10));
- aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x000F));
- rPage.PageCreated(aSet);
- }
-
- }
- else if (nId == m_nOutlineId)
- {
- // handle if the current paragraph style is assigned to a list level of outline style,
- SwTextFormatColl* pTmpColl = pWrtShell->FindTextFormatCollByName( GetStyleSheet().GetName() );
- if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() )
- {
- static_cast<SwParagraphNumTabPage&>(rPage).DisableOutline() ;
- static_cast<SwParagraphNumTabPage&>(rPage).DisableNumbering();
- }//<-end
- weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox();
- SfxStyleSheetBasePool* pPool = pWrtShell->GetView().GetDocShell()->GetStyleSheetPool();
- pPool->SetSearchMask(SfxStyleFamily::Pseudo);
- const SfxStyleSheetBase* pBase = pPool->First();
- std::set<OUString> aNames;
- while(pBase)
- {
- aNames.insert(pBase->GetName());
- pBase = pPool->Next();
- }
- for(const auto& rName : aNames)
- rBox.append_text(rName);
- }
- else if (nId == m_nAlignId)
- {
- aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,true));
- rPage.PageCreated(aSet);
- }
- else if (nId == m_nTypeId)
+ if (nId == m_nTypeId)
{
static_cast<SwFramePage&>(rPage).SetNewFrame( true );
static_cast<SwFramePage&>(rPage).SetFormatUsed( true );
@@ -393,47 +185,6 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
static_cast<SwColumnPage&>(rPage).SetFrameMode(true);
static_cast<SwColumnPage&>(rPage).SetFormatUsed( true );
}
- // do not remove; many other style dialog combinations still use the SfxTabPage
- // for the SvxBrushItem (see RID_SVXPAGE_BACKGROUND)
- else if (nId == m_nBackgroundId)
- {
- SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE;
- if( SfxStyleFamily::Char == nType || SfxStyleFamily::Para == nType )
- nFlagType |= SvxBackgroundTabFlags::SHOW_HIGHLIGHTING;
- aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(nFlagType)));
- rPage.PageCreated(aSet);
- }
- else if (nId == m_nConditionId)
- {
- static_cast<SwCondCollPage&>(rPage).SetCollection(
- static_cast<SwDocStyleSheet&>(GetStyleSheet()).GetCollection(), bNewStyle );
- }
- else if (nId == m_nPageId)
- {
- if(0 == (nHtmlMode & HTMLMODE_ON ))
- {
- std::vector<OUString> aList;
- OUString aNew;
- SwStyleNameMapper::FillUIName( RES_POOLCOLL_TEXT, aNew );
- aList.push_back( aNew );
- if( pWrtShell )
- {
- SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
- GetView().GetDocShell()->GetStyleSheetPool();
- pStyleSheetPool->SetSearchMask(SfxStyleFamily::Para);
- SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First();
- while(pFirstStyle)
- {
- aList.push_back( pFirstStyle->GetName() );
- pFirstStyle = pStyleSheetPool->Next();
- }
- }
- // set DrawingLayer FillStyles active
- aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
- aSet.Put(SfxStringListItem(SID_COLLECT_LIST, &aList));
- rPage.PageCreated(aSet);
- }
- }
else if (nId == m_nMacroId)
{
SfxAllItemSet aNewSet(*aSet.GetPool());
@@ -442,35 +193,9 @@ void SwTemplateDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
rPage.SetFrame( pWrtShell->GetView().GetViewFrame()->GetFrame().GetFrameInterface() );
rPage.PageCreated(aNewSet);
}
- else if (nId == m_nHeaderId)
- {
- if(0 == (nHtmlMode & HTMLMODE_ON ))
- {
- static_cast<SvxHeaderPage&>(rPage).EnableDynamicSpacing();
- }
-
- // set DrawingLayer FillStyles active
- aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
- rPage.PageCreated(aSet);
- }
- else if (nId == m_nFooterId)
- {
- if(0 == (nHtmlMode & HTMLMODE_ON ))
- {
- static_cast<SvxFooterPage&>(rPage).EnableDynamicSpacing();
- }
-
- // set DrawingLayer FillStyles active
- aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
- rPage.PageCreated(aSet);
- }
else if (nId == m_nBorderId)
{
- if( SfxStyleFamily::Para == nType )
- {
- aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
- }
- else if( SfxStyleFamily::Frame == nType )
+ if( SfxStyleFamily::Frame == nType )
{
aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::FRAME)));
}
@@ -518,6 +243,20 @@ SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
// stitch TabPages together
switch( nRegion )
{
+ // character styles
+ case SfxStyleFamily::Char:
+ {
+ AddTabPage("font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ));
+ AddTabPage("fonteffect", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ));
+ AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ));
+ AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ));
+ AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
+ AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ));
+ SvtCJKOptions aCJKOptions;
+ if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
+ RemoveTabPage("asianlayout");
+ }
+ break;
// paragraph styles
case SfxStyleFamily::Para:
{
@@ -702,7 +441,7 @@ void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage
aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
rPage.PageCreated(aSet);
}
- if (SfxStyleFamily::Pseudo == nType)
+ else if (SfxStyleFamily::Pseudo == nType)
{
SwDocShell* pDocShell = ::GetActiveWrtShell()->GetView().GetDocShell();
FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebDocShell*>( pDocShell) != nullptr );
diff --git a/sw/source/uibase/inc/tmpdlg.hxx b/sw/source/uibase/inc/tmpdlg.hxx
index 3e9d8c110412..0aa4f040d545 100644
--- a/sw/source/uibase/inc/tmpdlg.hxx
+++ b/sw/source/uibase/inc/tmpdlg.hxx
@@ -31,28 +31,15 @@ class SwTemplateDlg: public SfxStyleDialog
SfxStyleFamily const nType;
sal_uInt16 nHtmlMode;
SwWrtShell* pWrtShell;
- bool const bNewStyle;
- sal_uInt16 m_nIndentsId;
- sal_uInt16 m_nAlignId;
- sal_uInt16 m_nFontId;
- sal_uInt16 m_nFontEffectId;
- sal_uInt16 m_nPositionId;
- sal_uInt16 m_nAsianLayoutId;
- sal_uInt16 m_nOutlineId;
- sal_uInt16 m_nBackgroundId;
sal_uInt16 m_nAreaId;
sal_uInt16 m_nTransparenceId;
sal_uInt16 m_nBorderId;
- sal_uInt16 m_nConditionId;
sal_uInt16 m_nTypeId;
sal_uInt16 m_nOptionsId;
sal_uInt16 m_nWrapId;
sal_uInt16 m_nColumnId;
sal_uInt16 m_nMacroId;
- sal_uInt16 m_nHeaderId;
- sal_uInt16 m_nFooterId;
- sal_uInt16 m_nPageId;
public:
/// @param sPage
@@ -61,8 +48,7 @@ public:
SfxStyleSheetBase& rBase,
SfxStyleFamily nRegion,
const OString& sPage,
- SwWrtShell* pActShell,
- bool bNew );
+ SwWrtShell* pActShell );
virtual void RefreshInputSet() override;
More information about the Libreoffice-commits
mailing list