LibreOffice Module sw (master)  1
tmpdlg.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include <hintids.hxx>
21 
22 #include <sal/log.hxx>
23 #include <sfx2/viewfrm.hxx>
24 #include <svx/hdft.hxx>
25 #include <editeng/flstitem.hxx>
26 #include <sfx2/htmlmode.hxx>
27 #include <svtools/htmlcfg.hxx>
28 #include <svl/cjkoptions.hxx>
29 #include <numpara.hxx>
30 #include <fmtclds.hxx>
31 #include <swtypes.hxx>
32 #include <swmodule.hxx>
33 #include <wrtsh.hxx>
34 #include <view.hxx>
35 #include <wdocsh.hxx>
36 #include <viewopt.hxx>
37 #include <pgfnote.hxx>
38 #include <pggrid.hxx>
39 #include <tmpdlg.hxx>
40 #include <column.hxx>
41 #include <drpcps.hxx>
42 #include <frmpage.hxx>
43 #include <wrap.hxx>
44 #include <frmmgr.hxx>
45 #include <ccoll.hxx>
46 #include <swuiccoll.hxx>
47 #include <docstyle.hxx>
48 #include <fmtcol.hxx>
49 #include <macassgn.hxx>
50 #include <poolfmt.hxx>
51 #include <uitool.hxx>
52 #include <shellres.hxx>
53 #include <swabstdlg.hxx>
54 
55 #include <cmdid.h>
56 #include <globals.hrc>
57 #include <SwStyleNameMapper.hxx>
58 #include <svx/svxids.hrc>
59 #include <svl/stritem.hxx>
60 #include <svl/aeitem.hxx>
61 #include <svl/slstitm.hxx>
62 #include <svl/eitem.hxx>
63 #include <svl/intitem.hxx>
64 #include <svx/svxdlg.hxx>
65 #include <svx/dialogs.hrc>
66 #include <svx/flagsdef.hxx>
67 
68 // the dialog's carrier
70  SfxStyleSheetBase& rBase,
71  SfxStyleFamily nRegion,
72  const OString& sPage,
73  SwWrtShell* pActShell,
74  bool bNew)
75  : SfxStyleDialogController(pParent,
76  "modules/swriter/ui/templatedialog" +
77  OUString::number(static_cast<sal_uInt16>(nRegion)) + ".ui",
78  "TemplateDialog" + OString::number(static_cast<sal_uInt16>(nRegion)),
79  rBase)
80  , nType(nRegion)
81  , pWrtShell(pActShell)
82  , bNewStyle(bNew)
83 {
86  // stitch TabPages together
87  switch( nRegion )
88  {
89  // character styles
90  case SfxStyleFamily::Char:
91  {
92  AddTabPage("font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ));
93  AddTabPage("fonteffect", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ));
94  AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ));
95  AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ));
96  AddTabPage("background", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
97  AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ));
98  SvtCJKOptions aCJKOptions;
99  if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
100  RemoveTabPage("asianlayout");
101  }
102  break;
103  // paragraph styles
104  case SfxStyleFamily::Para:
105  {
106  AddTabPage("indents", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH));
107 
108  AddTabPage("alignment", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH));
109 
110  AddTabPage("textflow", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
111 
112  AddTabPage("asiantypo", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
113 
114  AddTabPage("font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
115 
116  AddTabPage("fonteffect", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
117 
118  AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) );
119 
120  AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
121 
122  AddTabPage("highlighting", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BACKGROUND ));
123 
124  AddTabPage("tabs", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
125 
128 
129  // add Area and Transparence TabPages
130  AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
131  AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
132 
133  AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
134 
135  AddTabPage("condition", SwCondCollPage::Create,
137  if( (!bNewStyle && RES_CONDTXTFMTCOLL != static_cast<SwDocStyleSheet&>(rBase).GetCollection()->Which())
138  || nHtmlMode & HTMLMODE_ON )
139  RemoveTabPage("condition");
140 
141  SvtCJKOptions aCJKOptions;
142  if(nHtmlMode & HTMLMODE_ON)
143  {
144  SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
145  if (!rHtmlOpt.IsPrintLayoutExtension())
146  RemoveTabPage("textflow");
147  RemoveTabPage("asiantypo");
148  RemoveTabPage("tabs");
149  RemoveTabPage("outline");
150  RemoveTabPage("asianlayout");
152  {
153  RemoveTabPage("background");
154  RemoveTabPage("dropcaps");
155  }
156  }
157  else
158  {
159  if(!aCJKOptions.IsAsianTypographyEnabled())
160  RemoveTabPage("asiantypo");
161  if(!aCJKOptions.IsDoubleLinesEnabled())
162  RemoveTabPage("asianlayout");
163  }
164  }
165  break;
166  // page styles
167  case SfxStyleFamily::Page:
168  {
169  // add Area and Transparence TabPages
170  AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
171  AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
174  AddTabPage("page", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PAGE), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PAGE));
175  if (0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
176  {
177  AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
181  SvtCJKOptions aCJKOptions;
182  if(!aCJKOptions.IsAsianTypographyEnabled())
183  RemoveTabPage("textgrid");
184  }
185  else
186  {
187  RemoveTabPage("borders");
188  RemoveTabPage("columns");
189  RemoveTabPage("footnotes");
190  RemoveTabPage("textgrid");
191  }
192  }
193  break;
194  // numbering styles
195  case SfxStyleFamily::Pseudo:
196  {
197  AddTabPage("numbering", RID_SVXPAGE_PICK_SINGLE_NUM);
198  AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET);
199  AddTabPage("outline", RID_SVXPAGE_PICK_NUM);
200  AddTabPage("graphics", RID_SVXPAGE_PICK_BMP);
201  AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
202  AddTabPage("position", RID_SVXPAGE_NUM_POSITION );
203  }
204  break;
205  case SfxStyleFamily::Frame:
206  {
210 
211  // add Area and Transparence TabPages
212  AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
213  AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
214 
215  AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
216 
218 
219  AddTabPage("macros", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), nullptr);
220  }
221  break;
222  default:
223  OSL_ENSURE(false, "wrong family");
224  }
225 
226  if (!sPage.isEmpty())
227  SetCurPageId(sPage);
228 }
229 
231 {
232  short nRet = SfxTabDialogController::Ok();
233  if( RET_OK == nRet )
234  {
235  const SfxPoolItem *pOutItem, *pExItem;
236  if( SfxItemState::SET == m_xExampleSet->GetItemState(
237  SID_ATTR_NUMBERING_RULE, false, &pExItem ) &&
238  ( !GetOutputItemSet() ||
239  SfxItemState::SET != GetOutputItemSet()->GetItemState(
240  SID_ATTR_NUMBERING_RULE, false, &pOutItem ) ||
241  *pExItem != *pOutItem ))
242  {
243  if( GetOutputItemSet() )
244  const_cast<SfxItemSet*>(GetOutputItemSet())->Put( *pExItem );
245  else
246  nRet = RET_CANCEL;
247  }
248  }
249  else
250  {
251  //JP 09.01.98 Bug #46446#:
252  // that's the Ok-Handler, so OK has to be default!
253  nRet = RET_OK;
254  }
255  return nRet;
256 }
257 
259 {
260  SfxItemSet* pInSet = GetInputSetImpl();
261  pInSet->ClearItem();
262  pInSet->SetParent( &GetStyleSheet().GetItemSet() );
263 }
264 
265 void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage )
266 {
267  // set style's and metric's names
268  OUString sNumCharFormat, sBulletCharFormat;
271  SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
272 
273  if (rId == "font")
274  {
275  OSL_ENSURE(::GetActiveView(), "no active view");
276 
277  SvxFontListItem aFontListItem( *static_cast<const SvxFontListItem*>(::GetActiveView()->
278  GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
279 
280  aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
281  sal_uInt32 nFlags = 0;
282  if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON ))
283  nFlags = SVX_RELATIVE_MODE;
284  if( SfxStyleFamily::Char == nType )
285  nFlags = nFlags|SVX_PREVIEW_CHARACTER;
286  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
287  rPage.PageCreated(aSet);
288  }
289  else if (rId == "fonteffect")
290  {
291  sal_uInt32 nFlags = SVX_ENABLE_FLASH;
292  if( SfxStyleFamily::Char == nType )
293  nFlags = nFlags|SVX_PREVIEW_CHARACTER;
294  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
295  rPage.PageCreated(aSet);
296  }
297  else if (rId == "position")
298  {
299  if( SfxStyleFamily::Char == nType )
300  {
301  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
302  rPage.PageCreated(aSet);
303  }
304  else if (SfxStyleFamily::Pseudo == nType)
305  {
307  FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebDocShell*>( pDocShell) != nullptr );
308 
309  aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
310  rPage.PageCreated(aSet);
311  }
312  }
313  else if (rId == "columns")
314  {
315  if( nType == SfxStyleFamily::Frame )
316  static_cast<SwColumnPage&>(rPage).SetFrameMode(true);
317  static_cast<SwColumnPage&>(rPage).SetFormatUsed( true );
318  }
319  // do not remove; many other style dialog combinations still use the SfxTabPage
320  // for the SvxBrushItem (see RID_SVXPAGE_BACKGROUND)
321  else if (rId == "background" || rId == "highlighting")
322  {
323  SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE;
324  if( SfxStyleFamily::Char == nType || SfxStyleFamily::Para == nType )
325  nFlagType |= SvxBackgroundTabFlags::SHOW_HIGHLIGHTING;
326  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(nFlagType)));
327  rPage.PageCreated(aSet);
328  }
329  else if (rId == "condition")
330  {
331  static_cast<SwCondCollPage&>(rPage).SetCollection(
332  static_cast<SwDocStyleSheet&>(GetStyleSheet()).GetCollection(), bNewStyle );
333  }
334  else if (rId == "page")
335  {
336  if(0 == (nHtmlMode & HTMLMODE_ON ))
337  {
338  std::vector<OUString> aList;
339  OUString aNew;
341  aList.push_back( aNew );
342  if( pWrtShell )
343  {
344  SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
345  GetView().GetDocShell()->GetStyleSheetPool();
346  pStyleSheetPool->SetSearchMask(SfxStyleFamily::Para);
347  SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First();
348  while(pFirstStyle)
349  {
350  aList.push_back( pFirstStyle->GetName() );
351  pFirstStyle = pStyleSheetPool->Next();
352  }
353  }
354  // set DrawingLayer FillStyles active
355  aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
356  aSet.Put(SfxStringListItem(SID_COLLECT_LIST, &aList));
357  rPage.PageCreated(aSet);
358  }
359  }
360  else if (rId == "header")
361  {
362  if(0 == (nHtmlMode & HTMLMODE_ON ))
363  {
364  static_cast<SvxHeaderPage&>(rPage).EnableDynamicSpacing();
365  }
366 
367  // set DrawingLayer FillStyles active
368  aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
369  rPage.PageCreated(aSet);
370  }
371  else if (rId == "footer")
372  {
373  if(0 == (nHtmlMode & HTMLMODE_ON ))
374  {
375  static_cast<SvxFooterPage&>(rPage).EnableDynamicSpacing();
376  }
377 
378  // set DrawingLayer FillStyles active
379  aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
380  rPage.PageCreated(aSet);
381  }
382  else if (rId == "border")
383  {
384  if( SfxStyleFamily::Para == nType )
385  {
386  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
387  }
388  else if( SfxStyleFamily::Frame == nType )
389  {
390  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::FRAME)));
391  }
392  rPage.PageCreated(aSet);
393  }
394  else if (rId == "borders")
395  {
396  if( SfxStyleFamily::Para == nType )
397  {
398  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
399  }
400  else if( SfxStyleFamily::Frame == nType )
401  {
402  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::FRAME)));
403  }
404  rPage.PageCreated(aSet);
405  }
406  // inits for Area and Transparency TabPages
407  // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
408  // the color table) need to be added as items (e.g. SvxColorTableItem) to make
409  // these pages find the needed attributes for fill style suggestions.
410  // These are added in SwDocStyleSheet::GetItemSet() for the SfxStyleFamily::Para on
411  // demand, but could also be directly added from the DrawModel.
412  else if (rId == "area")
413  {
414  aSet.Put(GetStyleSheet().GetItemSet());
415 
416  // add flag for direct graphic content selection
417  aSet.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
418 
419  rPage.PageCreated(aSet);
420  }
421  else if (rId == "transparence")
422  {
424  }
425  else if (rId == "bullets")
426  {
427  aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat));
428  rPage.PageCreated(aSet);
429  }
430  else if (rId == "outline")
431  {
432  if (SfxStyleFamily::Pseudo == nType)
433  {
434  aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFormat));
435  aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat));
436  rPage.PageCreated(aSet);
437  }
438  else if (SfxStyleFamily::Para == nType)
439  {
440  // handle if the current paragraph style is assigned to a list level of outline style,
442  if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() )
443  {
444  static_cast<SwParagraphNumTabPage&>(rPage).DisableOutline() ;
445  static_cast<SwParagraphNumTabPage&>(rPage).DisableNumbering();
446  }//<-end
447  weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox();
449  pPool->SetSearchMask(SfxStyleFamily::Pseudo);
450  const SfxStyleSheetBase* pBase = pPool->First();
451  std::set<OUString> aNames;
452  while(pBase)
453  {
454  aNames.insert(pBase->GetName());
455  pBase = pPool->Next();
456  }
457  for(std::set<OUString>::const_iterator it = aNames.begin(); it != aNames.end(); ++it)
458  rBox.append_text(*it);
459  }
460  }
461  else if (rId == "customize")
462  {
463  aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFormat));
464  aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat));
465 
466  // collect character styles
467  std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/comboboxfragment.ui"));
468  std::unique_ptr<weld::ComboBox> xCharFormatLB(xBuilder->weld_combo_box("combobox"));
469  xCharFormatLB->clear();
470  xCharFormatLB->append_text(SwViewShell::GetShellRes()->aStrNone);
472  ::FillCharStyleListBox(*xCharFormatLB, pDocShell);
473 
474  std::vector<OUString> aList;
475  aList.reserve(xCharFormatLB->get_count());
476  for (sal_Int32 j = 0; j < xCharFormatLB->get_count(); j++)
477  aList.push_back(xCharFormatLB->get_text(j));
478 
479  aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
480  FieldUnit eMetric = ::GetDfltMetric(dynamic_cast< const SwWebDocShell *>( pDocShell ) != nullptr);
481  aSet.Put ( SfxAllEnumItem(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
482  rPage.PageCreated(aSet);
483  }
484  else if (rId == "indents")
485  {
486  if( rPage.GetItemSet().GetParent() )
487  {
488  aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST,MM50/10));
489  aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x000F));
490  rPage.PageCreated(aSet);
491  }
492  }
493  else if (rId == "alignment")
494  {
495  aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,true));
496  rPage.PageCreated(aSet);
497  }
498  else if (rId == "asianlayout")
499  {
500  if( SfxStyleFamily::Char == nType )
501  {
502  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
503  rPage.PageCreated(aSet);
504  }
505  }
506  else if (rId == "type")
507  {
508  static_cast<SwFramePage&>(rPage).SetNewFrame( true );
509  static_cast<SwFramePage&>(rPage).SetFormatUsed( true );
510  }
511  else if (rId == "options")
512  {
513  static_cast<SwFrameAddPage&>(rPage).SetFormatUsed(true);
514  static_cast<SwFrameAddPage&>(rPage).SetNewFrame(true);
515  }
516  else if (rId == "wrap")
517  {
518  static_cast<SwWrapTabPage&>(rPage).SetFormatUsed( true, false );
519  }
520  else if (rId == "macros")
521  {
522  SfxAllItemSet aNewSet(*aSet.GetPool());
524  if ( pWrtShell )
526  rPage.PageCreated(aNewSet);
527  }
528 }
529 
530 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxViewFrame * GetViewFrame() const
bool IsPrintLayoutExtension() const
FieldUnit
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
#define RES_CONDTXTFMTCOLL
Definition: hintids.hxx:278
#define SVX_ENABLE_FLASH
SfxStyleSheetBase * First()
virtual void PageCreated(const SfxAllItemSet &aSet)
static SfxAbstractDialogFactory * Create()
SwView * GetActiveView()
Definition: swmodul1.cxx:123
static ShellResource * GetShellRes()
Definition: viewsh.cxx:2490
SwWrtShell * pWrtShell
Definition: tmpdlg.hxx:33
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: frmpage.cxx:2821
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:716
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: swuiccoll.cxx:115
const SfxItemSet * GetOutputItemSet() const
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
const SfxPoolItem * GetItem(const SwTextAttr &rAttr, sal_uInt16 nWhich)
Extracts pool item of type nWhich from rAttr.
Definition: atrstck.cxx:159
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:115
std::unique_ptr< SfxItemSet > m_xExampleSet
void RemoveTabPage(const OString &rName)
virtual void RefreshInputSet() override
Definition: tmpdlg.cxx:258
SfxItemSet * GetInputSetImpl()
SwTemplateDlgController(weld::Window *pParent, SfxStyleSheetBase &rBase, SfxStyleFamily nRegion, const OString &sPage, SwWrtShell *pActShell, bool bNew)
Definition: tmpdlg.cxx:69
RET_CANCEL
Put
Used by the UI to modify the document model.
Definition: wrtsh.hxx:86
virtual short Ok()
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: drpcps.cxx:520
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:109
static const sal_uInt16 * GetRanges()
Definition: column.hxx:181
const SwView & GetView() const
Definition: wrtsh.hxx:424
const OUString & GetName() const
FUNC_TYPE const nType
SvxBackgroundTabFlags
static const sal_uInt16 * GetRanges()
Definition: pgfnote.hxx:39
SfxFrame & GetFrame() const
#define SVX_PREVIEW_CHARACTER
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
SfxStyleSheetBase & GetStyleSheet()
Numbering symbols.
Definition: poolfmt.hxx:118
SfxStyleFamily
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
static SfxEventNamesItem AddEvents(DlgEventType eType)
Definition: macassgn.cxx:43
static const sal_uInt16 * GetRanges()
Definition: drpcps.hxx:157
static const sal_uInt16 * GetRanges()
static const sal_uInt16 * GetRanges()
Definition: frmpage.hxx:324
const SfxItemSet & GetItemSet() const
static SvxHtmlOptions & Get()
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: numpara.cxx:101
static const sal_uInt16 * GetRanges()
Definition: numpara.hxx:70
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
static const sal_uInt16 * GetRanges()
const SfxItemSet * GetParent() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:691
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: pggrid.cxx:138
bool IsDoubleLinesEnabled() const
Text body.
Definition: poolfmt.hxx:251
HTMLMODE_ON
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:339
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1160
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
Returns the item set associated with an character/inet/auto style.
Definition: atrstck.cxx:135
SfxStyleFamily const nType
Definition: tmpdlg.hxx:31
static const sal_uInt16 * GetRanges()
Definition: swuiccoll.hxx:65
SfxItemPool * GetPool() const
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: tmpdlg.cxx:265
SwDocShell * GetDocShell()
Definition: view.cxx:1115
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
void SetParent(const SfxItemSet *pNew)
virtual short Ok() override
Definition: tmpdlg.cxx:230
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool IsAsianTypographyEnabled() const
#define MM50
Definition: swtypes.hxx:59
SfxStyleSheetBase * Next()
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
Definition: edfmt.cxx:156
RET_OK
sal_uInt16 nHtmlMode
Definition: tmpdlg.hxx:32
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
static const sal_uInt16 * GetRanges()
Definition: pggrid.cxx:333
void SetSearchMask(SfxStyleFamily eFam, SfxStyleSearchBits n=SfxStyleSearchBits::All)
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: wrap.cxx:114
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: pgfnote.cxx:144
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: column.cxx:604
static weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIFile)
HTMLMODE_FULL_STYLES
void append_text(const OUString &rStr)
const FontList * GetFontList() const
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rSet)
Definition: frmpage.cxx:814
#define SVX_RELATIVE_MODE
static const sal_uInt16 * GetRanges()
Definition: wrap.hxx:92
void SetCurPageId(const OString &rName)
static const sal_uInt16 * GetRanges()
Definition: frmpage.hxx:188