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)
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 , m_nType(nRegion)
75 , m_pWrtShell(pActShell)
76 , m_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
143 if( (!m_bNewStyle && RES_CONDTXTFMTCOLL != static_cast<SwDocStyleSheet&>(rBase).GetCollection()->Which())
145 RemoveTabPage("condition");
146
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));
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
270void 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 == (m_nHtmlMode & HTMLMODE_ON ))
288 nFlags = SVX_RELATIVE_MODE;
289 if( SfxStyleFamily::Char == m_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 == m_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 == m_nType )
305 {
306 aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
307 rPage.PageCreated(aSet);
308 }
309 else if (SfxStyleFamily::Pseudo == m_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( m_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 == m_nType || SfxStyleFamily::Para == m_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 == (m_nHtmlMode & HTMLMODE_ON ))
342 {
343 std::vector<OUString> aList;
344 OUString aNew;
346 aList.push_back( aNew );
347 if( m_pWrtShell )
348 {
349 SfxStyleSheetBasePool* pStyleSheetPool = m_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 == (m_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 == (m_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 == m_nType )
389 {
390 aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
391 }
392 else if( SfxStyleFamily::Frame == m_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 == m_nType )
401 {
402 aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
403 }
404 else if( SfxStyleFamily::Frame == m_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 == m_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 == m_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(SwResId(STR_POOLNUMRULE_NOLIST));
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 == m_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 ( m_pWrtShell )
531 rPage.PageCreated(aNewSet);
532 }
533}
534
535/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
virtual GetTabPageRanges GetTabPageRangesFunc(sal_uInt16 nId)=0
static SfxAbstractDialogFactory * Create()
virtual CreateTabPage GetTabPageCreatorFunc(sal_uInt16 nId)=0
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
SfxItemPool * GetPool() const
void SetParent(const SfxItemSet *pNew)
const SfxItemSet * GetParent() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
SfxStyleSheetBase & GetStyleSheet()
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
SfxStyleSheetBase * Next()
const OUString & GetName() const
virtual SfxItemSet & GetItemSet()
virtual short Ok()
void SetCurPageId(const OString &rName)
void AddTabPage(const OString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
std::unique_ptr< SfxItemSet > m_xExampleSet
weld::Button * GetResetButton() const
const SfxItemSet * GetOutputItemSet() const
weld::Button * GetStandardButton() const
void RemoveTabPage(const OString &rName)
SfxItemSet * GetInputSetImpl()
weld::Button * GetApplyButton() const
virtual void PageCreated(const SfxAllItemSet &aSet)
const SfxItemSet & GetItemSet() const
void SetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame)
SfxFrame & GetFrame() const
SfxViewFrame * GetViewFrame() const
const FontList * GetFontList() const
static WhichRangesContainer GetRanges()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
static WhichRangesContainer GetRanges()
static WhichRangesContainer GetRanges()
Definition: column.hxx:174
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: column.cxx:585
The Condition tab on the paragraph style dialog for conditional styles, e.g. Text Body.
Definition: swuiccoll.hxx:31
static WhichRangesContainer GetRanges()
Definition: swuiccoll.hxx:60
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: swuiccoll.cxx:105
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1154
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: drpcps.cxx:522
static WhichRangesContainer GetRanges()
Definition: drpcps.hxx:156
SwTextFormatColl * FindTextFormatCollByName(const OUString &rName) const
Definition: edfmt.cxx:152
static WhichRangesContainer GetRanges()
Definition: pgfnote.hxx:35
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: pgfnote.cxx:127
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: frmpage.cxx:2824
static WhichRangesContainer GetRanges()
Definition: frmpage.hxx:310
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: frmpage.cxx:831
static WhichRangesContainer GetRanges()
Definition: frmpage.hxx:183
static SfxEventNamesItem AddEvents(DlgEventType eType)
Definition: macassgn.cxx:38
static WhichRangesContainer GetRanges()
Definition: numpara.hxx:70
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: numpara.cxx:91
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
sal_uInt16 m_nHtmlMode
Definition: tmpdlg.hxx:33
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: tmpdlg.cxx:270
SwWrtShell * m_pWrtShell
Definition: tmpdlg.hxx:34
SfxStyleFamily m_nType
Definition: tmpdlg.hxx:32
virtual void RefreshInputSet() override
Definition: tmpdlg.cxx:263
virtual short Ok() override
Definition: tmpdlg.cxx:235
SwTemplateDlgController(weld::Window *pParent, SfxStyleSheetBase &rBase, SfxStyleFamily nRegion, const OString &sPage, SwWrtShell *pActShell, bool bNew)
Definition: tmpdlg.cxx:63
Represents the style of a paragraph.
Definition: fmtcol.hxx:59
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:120
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: pggrid.cxx:128
static WhichRangesContainer GetRanges()
Definition: pggrid.cxx:356
static ShellResource * GetShellRes()
Definition: viewsh.cxx:2650
SwDocShell * GetDocShell()
Definition: view.cxx:1160
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: wrap.cxx:119
static WhichRangesContainer GetRanges()
Definition: wrap.hxx:94
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
const SwView & GetView() const
Definition: wrtsh.hxx:438
virtual void set_label(const OUString &rText)=0
void append_text(const OUString &rStr)
virtual void set_tooltip_text(const OUString &rTip)=0
virtual void set_accessible_description(const OUString &rDescription)=0
#define SVX_RELATIVE_MODE
SvxBackgroundTabFlags
#define SVX_ENABLE_CHAR_TRANSPARENCY
#define SVX_PREVIEW_CHARACTER
FieldUnit
constexpr TypedWhichId< SwConditionTextFormatColl > RES_CONDTXTFMTCOLL(160)
HTMLMODE_ON
HTMLMODE_FULL_STYLES
@ MACASSGN_ALLFRM
Definition: macassgn.hxx:36
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
Returns the item set associated with a character/inet/auto style.
Definition: atrstck.cxx:133
const SfxPoolItem * GetItem(const SwTextAttr &rAttr, sal_uInt16 nWhich)
Extracts pool item of type nWhich from rAttr.
Definition: atrstck.cxx:157
bool IsDoubleLinesEnabled()
bool IsAsianTypographyEnabled()
bool IsPrintLayoutExtension()
constexpr auto toTwips(N number, Length from)
Put
long Long
@ RES_POOLCOLL_TEXT
Text body.
Definition: poolfmt.hxx:251
@ RES_POOLCHR_BULLET_LEVEL
Bullets.
Definition: poolfmt.hxx:118
@ RES_POOLCHR_NUM_LEVEL
Numbering symbols.
Definition: poolfmt.hxx:117
SfxStyleFamily
SwView * GetActiveView()
Definition: swmodul1.cxx:116
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:780
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:755
RET_OK
RET_CANCEL
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:332