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 ));
105  SvtCJKOptions aCJKOptions;
106  if(nHtmlMode & HTMLMODE_ON || !aCJKOptions.IsDoubleLinesEnabled())
107  RemoveTabPage("asianlayout");
108  }
109  break;
110  // paragraph styles
111  case SfxStyleFamily::Para:
112  {
113  AddTabPage("indents", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_STD_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_STD_PARAGRAPH));
114 
115  AddTabPage("alignment", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH));
116 
117  AddTabPage("textflow", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH) );
118 
119  AddTabPage("asiantypo", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PARA_ASIAN), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PARA_ASIAN) );
120 
121  AddTabPage("font", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_NAME ) );
122 
123  AddTabPage("fonteffect", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_EFFECTS ) );
124 
125  AddTabPage("position", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_POSITION ) );
126 
127  AddTabPage("asianlayout", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_TWOLINES ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_CHAR_TWOLINES ) );
128 
129  AddTabPage("highlighting", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BKG ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BKG ));
130 
131  AddTabPage("tabs", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_TABULATOR), pFact->GetTabPageRangesFunc(RID_SVXPAGE_TABULATOR) );
132 
135 
136  // add Area and Transparence TabPages
137  AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
138  AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
139 
140  AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
141 
142  AddTabPage("condition", SwCondCollPage::Create,
144  if( (!bNewStyle && RES_CONDTXTFMTCOLL != static_cast<SwDocStyleSheet&>(rBase).GetCollection()->Which())
145  || nHtmlMode & HTMLMODE_ON )
146  RemoveTabPage("condition");
147 
148  SvtCJKOptions aCJKOptions;
149  if(nHtmlMode & HTMLMODE_ON)
150  {
151  SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
152  if (!rHtmlOpt.IsPrintLayoutExtension())
153  RemoveTabPage("textflow");
154  RemoveTabPage("asiantypo");
155  RemoveTabPage("tabs");
156  RemoveTabPage("outline");
157  RemoveTabPage("asianlayout");
159  {
160  RemoveTabPage("background");
161  RemoveTabPage("dropcaps");
162  }
163  }
164  else
165  {
166  if(!aCJKOptions.IsAsianTypographyEnabled())
167  RemoveTabPage("asiantypo");
168  if(!aCJKOptions.IsDoubleLinesEnabled())
169  RemoveTabPage("asianlayout");
170  }
171  }
172  break;
173  // page styles
174  case SfxStyleFamily::Page:
175  {
176  // add Area and Transparence TabPages
177  AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
178  AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
181  AddTabPage("page", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_PAGE), pFact->GetTabPageRangesFunc(RID_SVXPAGE_PAGE));
182  if (0 == ::GetHtmlMode(pWrtShell->GetView().GetDocShell()))
183  {
184  AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
188  SvtCJKOptions aCJKOptions;
189  if(!aCJKOptions.IsAsianTypographyEnabled())
190  RemoveTabPage("textgrid");
191  }
192  else
193  {
194  RemoveTabPage("borders");
195  RemoveTabPage("columns");
196  RemoveTabPage("footnotes");
197  RemoveTabPage("textgrid");
198  }
199  }
200  break;
201  // numbering styles
202  case SfxStyleFamily::Pseudo:
203  {
204  AddTabPage("numbering", RID_SVXPAGE_PICK_SINGLE_NUM);
205  AddTabPage("bullets", RID_SVXPAGE_PICK_BULLET);
206  AddTabPage("outline", RID_SVXPAGE_PICK_NUM);
207  AddTabPage("graphics", RID_SVXPAGE_PICK_BMP);
208  AddTabPage("customize", RID_SVXPAGE_NUM_OPTIONS );
209  AddTabPage("position", RID_SVXPAGE_NUM_POSITION );
210  }
211  break;
212  case SfxStyleFamily::Frame:
213  {
217 
218  // add Area and Transparence TabPages
219  AddTabPage("area", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_AREA ));
220  AddTabPage("transparence", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_TRANSPARENCE ) );
221 
222  AddTabPage("borders", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BORDER ), pFact->GetTabPageRangesFunc( RID_SVXPAGE_BORDER ) );
223 
225 
226  AddTabPage("macros", pFact->GetTabPageCreatorFunc(RID_SVXPAGE_MACROASSIGN), nullptr);
227  }
228  break;
229  default:
230  OSL_ENSURE(false, "wrong family");
231  }
232 
233  if (bNew)
234  SetCurPageId("organizer");
235  else if (!sPage.isEmpty())
236  SetCurPageId(sPage);
237 }
238 
240 {
241  short nRet = SfxTabDialogController::Ok();
242  if( RET_OK == nRet )
243  {
244  const SfxPoolItem *pOutItem, *pExItem;
245  if( SfxItemState::SET == m_xExampleSet->GetItemState(
246  SID_ATTR_NUMBERING_RULE, false, &pExItem ) &&
247  ( !GetOutputItemSet() ||
248  SfxItemState::SET != GetOutputItemSet()->GetItemState(
249  SID_ATTR_NUMBERING_RULE, false, &pOutItem ) ||
250  *pExItem != *pOutItem ))
251  {
252  if( GetOutputItemSet() )
253  const_cast<SfxItemSet*>(GetOutputItemSet())->Put( *pExItem );
254  else
255  nRet = RET_CANCEL;
256  }
257  }
258  else
259  {
260  //JP 09.01.98 Bug #46446#:
261  // that's the Ok-Handler, so OK has to be default!
262  nRet = RET_OK;
263  }
264  return nRet;
265 }
266 
268 {
269  SfxItemSet* pInSet = GetInputSetImpl();
270  pInSet->ClearItem();
271  pInSet->SetParent( &GetStyleSheet().GetItemSet() );
272 }
273 
274 void SwTemplateDlgController::PageCreated(const OString& rId, SfxTabPage &rPage )
275 {
276  // set style's and metric's names
277  OUString sNumCharFormat, sBulletCharFormat;
280  SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
281 
282  if (rId == "font")
283  {
284  OSL_ENSURE(::GetActiveView(), "no active view");
285 
286  SvxFontListItem aFontListItem( *static_cast<const SvxFontListItem*>(::GetActiveView()->
287  GetDocShell()->GetItem( SID_ATTR_CHAR_FONTLIST ) ) );
288 
289  aSet.Put (SvxFontListItem( aFontListItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
290  sal_uInt32 nFlags = 0;
291  if(rPage.GetItemSet().GetParent() && 0 == (nHtmlMode & HTMLMODE_ON ))
292  nFlags = SVX_RELATIVE_MODE;
293  if( SfxStyleFamily::Char == nType )
294  nFlags = nFlags|SVX_PREVIEW_CHARACTER;
295  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
296  rPage.PageCreated(aSet);
297  }
298  else if (rId == "fonteffect")
299  {
300  sal_uInt32 nFlags = SVX_ENABLE_CHAR_TRANSPARENCY;
301  if( SfxStyleFamily::Char == nType )
302  nFlags = nFlags|SVX_PREVIEW_CHARACTER;
303  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
304  rPage.PageCreated(aSet);
305  }
306  else if (rId == "position")
307  {
308  if( SfxStyleFamily::Char == nType )
309  {
310  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
311  rPage.PageCreated(aSet);
312  }
313  else if (SfxStyleFamily::Pseudo == nType)
314  {
316  FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebDocShell*>( pDocShell) != nullptr );
317 
318  aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
319  rPage.PageCreated(aSet);
320  }
321  }
322  else if (rId == "columns")
323  {
324  if( nType == SfxStyleFamily::Frame )
325  static_cast<SwColumnPage&>(rPage).SetFrameMode(true);
326  static_cast<SwColumnPage&>(rPage).SetFormatUsed( true );
327  }
328  // do not remove; many other style dialog combinations still use the SfxTabPage
329  // for the SvxBrushItem (see RID_SVXPAGE_BKG)
330  else if (rId == "background" || rId == "highlighting")
331  {
332  SvxBackgroundTabFlags nFlagType = SvxBackgroundTabFlags::NONE;
333  if( SfxStyleFamily::Char == nType || SfxStyleFamily::Para == nType )
334  nFlagType |= SvxBackgroundTabFlags::SHOW_HIGHLIGHTING;
335  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, static_cast<sal_uInt32>(nFlagType)));
336  rPage.PageCreated(aSet);
337  }
338  else if (rId == "condition")
339  {
340  static_cast<SwCondCollPage&>(rPage).SetCollection(
341  static_cast<SwDocStyleSheet&>(GetStyleSheet()).GetCollection() );
342  }
343  else if (rId == "page")
344  {
345  if(0 == (nHtmlMode & HTMLMODE_ON ))
346  {
347  std::vector<OUString> aList;
348  OUString aNew;
350  aList.push_back( aNew );
351  if( pWrtShell )
352  {
353  SfxStyleSheetBasePool* pStyleSheetPool = pWrtShell->
354  GetView().GetDocShell()->GetStyleSheetPool();
355  SfxStyleSheetBase *pFirstStyle = pStyleSheetPool->First(SfxStyleFamily::Para);
356  while(pFirstStyle)
357  {
358  aList.push_back( pFirstStyle->GetName() );
359  pFirstStyle = pStyleSheetPool->Next();
360  }
361  }
362  // set DrawingLayer FillStyles active
363  aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
364  aSet.Put(SfxStringListItem(SID_COLLECT_LIST, &aList));
365  rPage.PageCreated(aSet);
366  }
367  }
368  else if (rId == "header")
369  {
370  if(0 == (nHtmlMode & HTMLMODE_ON ))
371  {
372  static_cast<SvxHeaderPage&>(rPage).EnableDynamicSpacing();
373  }
374 
375  // set DrawingLayer FillStyles active
376  aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
377  rPage.PageCreated(aSet);
378  }
379  else if (rId == "footer")
380  {
381  if(0 == (nHtmlMode & HTMLMODE_ON ))
382  {
383  static_cast<SvxFooterPage&>(rPage).EnableDynamicSpacing();
384  }
385 
386  // set DrawingLayer FillStyles active
387  aSet.Put(SfxBoolItem(SID_DRAWINGLAYER_FILLSTYLES, true));
388  rPage.PageCreated(aSet);
389  }
390  else if (rId == "border")
391  {
392  if( SfxStyleFamily::Para == nType )
393  {
394  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
395  }
396  else if( SfxStyleFamily::Frame == nType )
397  {
398  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::FRAME)));
399  }
400  rPage.PageCreated(aSet);
401  }
402  else if (rId == "borders")
403  {
404  if( SfxStyleFamily::Para == nType )
405  {
406  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
407  }
408  else if( SfxStyleFamily::Frame == nType )
409  {
410  aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::FRAME)));
411  }
412  rPage.PageCreated(aSet);
413  }
414  // inits for Area and Transparency TabPages
415  // The selection attribute lists (XPropertyList derivates, e.g. XColorList for
416  // the color table) need to be added as items (e.g. SvxColorTableItem) to make
417  // these pages find the needed attributes for fill style suggestions.
418  // These are added in SwDocStyleSheet::GetItemSet() for the SfxStyleFamily::Para on
419  // demand, but could also be directly added from the DrawModel.
420  else if (rId == "area")
421  {
422  aSet.Put(GetStyleSheet().GetItemSet());
423 
424  // add flag for direct graphic content selection
425  aSet.Put(SfxBoolItem(SID_OFFER_IMPORT, true));
426 
427  rPage.PageCreated(aSet);
428  }
429  else if (rId == "transparence")
430  {
432  }
433  else if (rId == "bullets")
434  {
435  aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat));
436  rPage.PageCreated(aSet);
437  }
438  else if (rId == "outline")
439  {
440  if (SfxStyleFamily::Pseudo == nType)
441  {
442  aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFormat));
443  aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat));
444  rPage.PageCreated(aSet);
445  }
446  else if (SfxStyleFamily::Para == nType)
447  {
448  // handle if the current paragraph style is assigned to a list level of outline style,
450  if( pTmpColl && pTmpColl->IsAssignedToListLevelOfOutlineStyle() )
451  {
452  static_cast<SwParagraphNumTabPage&>(rPage).DisableOutline() ;
453  static_cast<SwParagraphNumTabPage&>(rPage).DisableNumbering();
454  }//<-end
455  weld::ComboBox& rBox = static_cast<SwParagraphNumTabPage&>(rPage).GetStyleBox();
457  const SfxStyleSheetBase* pBase = pPool->First(SfxStyleFamily::Pseudo);
458  std::set<OUString> aNames;
459  while(pBase)
460  {
461  aNames.insert(pBase->GetName());
462  pBase = pPool->Next();
463  }
464  aNames.erase("No List");
465  for(std::set<OUString>::const_iterator it = aNames.begin(); it != aNames.end(); ++it)
466  rBox.append_text(*it);
467  }
468  }
469  else if (rId == "customize")
470  {
471  aSet.Put (SfxStringItem(SID_NUM_CHAR_FMT,sNumCharFormat));
472  aSet.Put (SfxStringItem(SID_BULLET_CHAR_FMT,sBulletCharFormat));
473 
474  // collect character styles
475  std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/comboboxfragment.ui"));
476  std::unique_ptr<weld::ComboBox> xCharFormatLB(xBuilder->weld_combo_box("combobox"));
477  xCharFormatLB->clear();
478  xCharFormatLB->append_text(SwViewShell::GetShellRes()->aStrNone);
480  ::FillCharStyleListBox(*xCharFormatLB, pDocShell);
481 
482  std::vector<OUString> aList;
483  aList.reserve(xCharFormatLB->get_count());
484  for (sal_Int32 j = 0; j < xCharFormatLB->get_count(); j++)
485  aList.push_back(xCharFormatLB->get_text(j));
486 
487  aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
488  FieldUnit eMetric = ::GetDfltMetric(dynamic_cast< const SwWebDocShell *>( pDocShell ) != nullptr);
489  aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
490  rPage.PageCreated(aSet);
491  }
492  else if (rId == "indents")
493  {
494  if( rPage.GetItemSet().GetParent() )
495  {
496  aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST,MM50/10));
497  aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x000F));
498  rPage.PageCreated(aSet);
499  }
500  }
501  else if (rId == "alignment")
502  {
503  aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,true));
504  rPage.PageCreated(aSet);
505  }
506  else if (rId == "asianlayout")
507  {
508  if( SfxStyleFamily::Char == nType )
509  {
510  aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
511  rPage.PageCreated(aSet);
512  }
513  }
514  else if (rId == "type")
515  {
516  static_cast<SwFramePage&>(rPage).SetNewFrame( true );
517  static_cast<SwFramePage&>(rPage).SetFormatUsed( true );
518  }
519  else if (rId == "options")
520  {
521  static_cast<SwFrameAddPage&>(rPage).SetFormatUsed(true);
522  static_cast<SwFrameAddPage&>(rPage).SetNewFrame(true);
523  }
524  else if (rId == "wrap")
525  {
526  static_cast<SwWrapTabPage&>(rPage).SetFormatUsed( true, false );
527  }
528  else if (rId == "macros")
529  {
530  SfxAllItemSet aNewSet(*aSet.GetPool());
532  if ( pWrtShell )
534  rPage.PageCreated(aNewSet);
535  }
536 }
537 
538 /* 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:105
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
bool IsPrintLayoutExtension() const
virtual void set_label(const OUString &rText)=0
FieldUnit
SwTextFormatColl * FindTextFormatCollByName(std::u16string_view rName) const
Definition: edfmt.cxx:154
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: pggrid.cxx:126
virtual void PageCreated(const SfxAllItemSet &aSet)
static SfxAbstractDialogFactory * Create()
SwView * GetActiveView()
Definition: swmodul1.cxx:116
static ShellResource * GetShellRes()
Definition: viewsh.cxx:2546
SwWrtShell * pWrtShell
Definition: tmpdlg.hxx:34
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:751
const SfxItemSet * GetOutputItemSet() const
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
weld::Button * GetResetButton() const
const SfxPoolItem * GetItem(const SwTextAttr &rAttr, sal_uInt16 nWhich)
Extracts pool item of type nWhich from rAttr.
Definition: atrstck.cxx:156
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
std::unique_ptr< SfxItemSet > m_xExampleSet
void RemoveTabPage(const OString &rName)
static weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false)
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:267
SfxItemSet * GetInputSetImpl()
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
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:91
virtual short Ok()
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:114
static const sal_uInt16 * GetRanges()
Definition: column.hxx:174
const SwView & GetView() const
Definition: wrtsh.hxx:429
const OUString & GetName() const
SvxBackgroundTabFlags
static const sal_uInt16 * GetRanges()
Definition: pgfnote.hxx:35
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 const sal_uInt16 * GetRanges()
Definition: drpcps.hxx:154
static const sal_uInt16 * GetRanges()
virtual void set_accessible_description(const OUString &rDescription)=0
static const sal_uInt16 * GetRanges()
Definition: frmpage.hxx:312
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:726
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:354
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1140
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:834
static const sal_uInt16 * GetRanges()
Definition: swuiccoll.hxx:59
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
SfxItemPool * GetPool() const
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: tmpdlg.cxx:274
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: numpara.cxx:91
SwDocShell * GetDocShell()
Definition: view.cxx:1126
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
void SetParent(const SfxItemSet *pNew)
virtual short Ok() override
Definition: tmpdlg.cxx:239
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:130
SfxStyleSheetBase * Next()
RET_OK
sal_uInt16 nHtmlMode
Definition: tmpdlg.hxx:33
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
weld::Button * GetApplyButton() const
static const sal_uInt16 * GetRanges()
Definition: pggrid.cxx:326
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: drpcps.cxx:525
QPRO_FUNC_TYPE nType
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: frmpage.cxx:2835
HTMLMODE_FULL_STYLES
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: column.cxx:592
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_ENABLE_CHAR_TRANSPARENCY
#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