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