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 OUString& sPage,
67 SwWrtShell* pActShell,
68 bool bNew)
70 "modules/swriter/ui/templatedialog" +
71 OUString::number(static_cast<sal_uInt16>(nRegion)) + ".ui",
72 "TemplateDialog" + OUString::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 OUString& 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 if (SwView* pView = GetActiveView())
281 {
282 SvxFontListItem aFontListItem( *static_cast<const SvxFontListItem*>(pView->
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 }
295 else if (rId == "fonteffect")
296 {
297 sal_uInt32 nFlags = SVX_ENABLE_CHAR_TRANSPARENCY;
298 if( SfxStyleFamily::Char == m_nType )
299 nFlags = nFlags|SVX_PREVIEW_CHARACTER;
300 aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, nFlags));
301 rPage.PageCreated(aSet);
302 }
303 else if (rId == "position")
304 {
305 if( SfxStyleFamily::Char == m_nType )
306 {
307 aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
308 rPage.PageCreated(aSet);
309 }
310 else if (SfxStyleFamily::Pseudo == m_nType)
311 {
312 if (SwWrtShell* pSh = ::GetActiveWrtShell())
313 {
314 SwDocShell* pDocShell = pSh->GetView().GetDocShell();
315 FieldUnit eMetric = ::GetDfltMetric(dynamic_cast<SwWebDocShell*>( pDocShell) != nullptr );
316
317 aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
318 rPage.PageCreated(aSet);
319 }
320 }
321 }
322 else if (rId == "columns")
323 {
324 if( m_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 == m_nType || SfxStyleFamily::Para == m_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 == (m_nHtmlMode & HTMLMODE_ON ))
346 {
347 std::vector<OUString> aList;
348 OUString aNew;
350 aList.push_back( aNew );
351 if( m_pWrtShell )
352 {
353 SfxStyleSheetBasePool* pStyleSheetPool = m_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 == (m_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 == (m_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 == m_nType )
393 {
394 aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
395 }
396 else if( SfxStyleFamily::Frame == m_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 == m_nType )
405 {
406 aSet.Put (SfxUInt16Item(SID_SWMODE_TYPE,static_cast<sal_uInt16>(SwBorderModes::PARA)));
407 }
408 else if( SfxStyleFamily::Frame == m_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 == m_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 == m_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(SwResId(STR_POOLNUMRULE_NOLIST));
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);
479 if (SwWrtShell* pSh = ::GetActiveWrtShell())
480 {
481 SwDocShell* pDocShell = pSh->GetView().GetDocShell();
482 ::FillCharStyleListBox(*xCharFormatLB, pDocShell);
483
484 std::vector<OUString> aList;
485 aList.reserve(xCharFormatLB->get_count());
486 for (sal_Int32 j = 0; j < xCharFormatLB->get_count(); j++)
487 aList.push_back(xCharFormatLB->get_text(j));
488
489 aSet.Put( SfxStringListItem( SID_CHAR_FMT_LIST_BOX,&aList ) ) ;
490 FieldUnit eMetric = ::GetDfltMetric(dynamic_cast< const SwWebDocShell *>( pDocShell ) != nullptr);
491 aSet.Put ( SfxUInt16Item(SID_METRIC_ITEM, static_cast< sal_uInt16 >(eMetric)));
492 rPage.PageCreated(aSet);
493 }
494 }
495 else if (rId == "indents")
496 {
497 if( rPage.GetItemSet().GetParent() )
498 {
499 constexpr tools::Long constTwips_0_5mm = o3tl::toTwips(5, o3tl::Length::mm10);
500 aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_ABSLINEDIST, constTwips_0_5mm));
501 aSet.Put(SfxUInt32Item(SID_SVXSTDPARAGRAPHTABPAGE_FLAGSET,0x000F));
502 rPage.PageCreated(aSet);
503 }
504 }
505 else if (rId == "alignment")
506 {
507 aSet.Put(SfxBoolItem(SID_SVXPARAALIGNTABPAGE_ENABLEJUSTIFYEXT,true));
508 rPage.PageCreated(aSet);
509 }
510 else if (rId == "asianlayout")
511 {
512 if( SfxStyleFamily::Char == m_nType )
513 {
514 aSet.Put (SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER));
515 rPage.PageCreated(aSet);
516 }
517 }
518 else if (rId == "type")
519 {
520 static_cast<SwFramePage&>(rPage).SetNewFrame( true );
521 static_cast<SwFramePage&>(rPage).SetFormatUsed( true );
522 }
523 else if (rId == "options")
524 {
525 static_cast<SwFrameAddPage&>(rPage).SetFormatUsed(true);
526 static_cast<SwFrameAddPage&>(rPage).SetNewFrame(true);
527 }
528 else if (rId == "wrap")
529 {
530 static_cast<SwWrapTabPage&>(rPage).SetFormatUsed( true, false );
531 }
532 else if (rId == "macros")
533 {
534 SfxAllItemSet aNewSet(*aSet.GetPool());
536 if ( m_pWrtShell )
538 rPage.PageCreated(aNewSet);
539 }
540}
541
542/* 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 OUString &rName)
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
void RemoveTabPage(const OUString &rName)
std::unique_ptr< SfxItemSet > m_xExampleSet
weld::Button * GetResetButton() const
const SfxItemSet * GetOutputItemSet() const
weld::Button * GetStandardButton() const
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:59
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: swuiccoll.cxx:104
const SwView * GetView() const
Definition: docsh.hxx:221
virtual SfxStyleSheetBasePool * GetStyleSheetPool() override
For Style PI.
Definition: docsh.cxx:1152
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: drpcps.cxx:532
static WhichRangesContainer GetRanges()
Definition: drpcps.hxx:154
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:2897
static WhichRangesContainer GetRanges()
Definition: frmpage.hxx:316
This is the Position & Size tab page of the Insert -> Frame -> Frame dialog.
Definition: frmpage.hxx:39
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: frmpage.cxx:868
static WhichRangesContainer GetRanges()
Definition: frmpage.hxx:184
static SfxEventNamesItem AddEvents(DlgEventType eType)
Definition: macassgn.cxx:38
static WhichRangesContainer GetRanges()
Definition: numpara.hxx:73
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: numpara.cxx:99
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
sal_uInt16 m_nHtmlMode
Definition: tmpdlg.hxx:33
SwTemplateDlgController(weld::Window *pParent, SfxStyleSheetBase &rBase, SfxStyleFamily nRegion, const OUString &sPage, SwWrtShell *pActShell, bool bNew)
Definition: tmpdlg.cxx:63
SwWrtShell * m_pWrtShell
Definition: tmpdlg.hxx:34
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
Definition: tmpdlg.cxx:270
SfxStyleFamily m_nType
Definition: tmpdlg.hxx:32
virtual void RefreshInputSet() override
Definition: tmpdlg.cxx:263
virtual short Ok() override
Definition: tmpdlg.cxx:235
Represents the style of a paragraph.
Definition: fmtcol.hxx:61
bool IsAssignedToListLevelOfOutlineStyle() const
Definition: fmtcol.hxx:122
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: pggrid.cxx:126
static WhichRangesContainer GetRanges()
Definition: pggrid.cxx:353
static ShellResource * GetShellRes()
Definition: viewsh.cxx:2664
Definition: view.hxx:146
SwDocShell * GetDocShell()
Definition: view.cxx:1193
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:443
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(166)
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:115
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:781
SW_DLLPUBLIC FieldUnit GetDfltMetric(bool bWeb)
Definition: uitool.cxx:756
RET_OK
RET_CANCEL
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)
Definition: viewopt.cxx:415