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