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 <config_features.h>
21
22 #include "swdlgfact.hxx"
23 #include <svl/style.hxx>
24 #include <globals.hrc>
25
26 #include <wordcountdialog.hxx>
27 #include <abstract.hxx>
28 #include <addrdlg.hxx>
29 #include <ascfldlg.hxx>
30 #include <bookmark.hxx>
31 #include <break.hxx>
32 #include <changedb.hxx>
33 #include <chrdlg.hxx>
34 #include <colwd.hxx>
35 #include <convert.hxx>
36 #include <cption.hxx>
37 #include <dbinsdlg.hxx>
38 #include <docfnote.hxx>
39 #include <docstdlg.hxx>
40 #include <DateFormFieldDialog.hxx>
41 #include <DropDownFieldDialog.hxx>
42 #include <DropDownFormFieldDialog.hxx>
43 #include <envlop.hxx>
44 #include <label.hxx>
45 #include <drpcps.hxx>
46 #include <swuipardlg.hxx>
47 #include <pattern.hxx>
48 #include <pardlg.hxx>
49 #include <rowht.hxx>
50 #include <selglos.hxx>
51 #include <splittbl.hxx>
52 #include <srtdlg.hxx>
53 #include <tautofmt.hxx>
54 #include <tblnumfm.hxx>
55 #include <wrap.hxx>
56 #include <tabledlg.hxx>
57 #include <fldtdlg.hxx>
58 #include <fldedt.hxx>
59 #include <swrenamexnameddlg.hxx>
60 #include <swmodalredlineacceptdlg.hxx>
61 #include <frmdlg.hxx>
62 #include <tmpdlg.hxx>
63 #include <glossary.hxx>
64 #include <inpdlg.hxx>
65 #include <insfnote.hxx>
66 #include <instable.hxx>
67 #include <javaedit.hxx>
68 #include <linenum.hxx>
69 #include <titlepage.hxx>
70 #include <mailmrge.hxx>
71 #include <mergetbl.hxx>
72 #include <multmrk.hxx>
73 #include <num.hxx>
74 #include <outline.hxx>
75 #include <column.hxx>
76 #include <cnttab.hxx>
77 #include <swuicnttab.hxx>
78 #include <regionsw.hxx>
79 #include <optcomp.hxx>
80 #include <optload.hxx>
81 #include <optpage.hxx>
82 #include <swuiidxmrk.hxx>
83 #include <svx/dialogs.hrc>
84 #include <mailmergewizard.hxx>
85 #include <mailconfigpage.hxx>
86 #include <uiborder.hxx>
87 #include <mmresultdialogs.hxx>
88
89
90 using namespace ::com::sun::star;
91 using namespace css::frame;
92 using namespace css::uno;
93
Execute()94 short AbstractSwWordCountFloatDlg_Impl::Execute()
95 {
96 return m_xDlg->run();
97 }
98
Execute()99 short AbstractSwInsertAbstractDlg_Impl::Execute()
100 {
101 return m_xDlg->run();
102 }
103
Execute()104 short SwAbstractSfxController_Impl::Execute()
105 {
106 return m_xDlg->run();
107 }
108
Execute()109 short AbstractSwAsciiFilterDlg_Impl::Execute()
110 {
111 return m_xDlg->run();
112 }
113
Execute()114 short AbstractSplitTableDialog_Impl::Execute()
115 {
116 return m_xDlg->run();
117 }
118
Execute()119 short AbstractSwTableWidthDlg_Impl::Execute()
120 {
121 return m_xDlg->run();
122 }
123
Execute()124 short AbstractSwTableHeightDlg_Impl::Execute()
125 {
126 return m_xDlg->run();
127 }
128
Execute()129 short AbstractSwMergeTableDlg_Impl::Execute()
130 {
131 return m_xDlg->run();
132 }
133
Execute()134 short AbstractGenericDialog_Impl::Execute()
135 {
136 return m_xDlg->run();
137 }
138
StartExecuteAsync(AsyncContext & rCtx)139 bool AbstractGenericDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
140 {
141 return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
142 }
143
Execute()144 short AbstractSwSortDlg_Impl::Execute()
145 {
146 return m_xDlg->run();
147 }
148
Execute()149 short AbstractMultiTOXMarkDlg_Impl::Execute()
150 {
151 return m_xDlg->run();
152 }
153
Execute()154 short AbstractTabController_Impl::Execute()
155 {
156 return m_xDlg->run();
157 }
158
Execute()159 short AbstractSwConvertTableDlg_Impl::Execute()
160 {
161 return m_xDlg->run();
162 }
163
Execute()164 short AbstractSwInsertDBColAutoPilot_Impl::Execute()
165 {
166 return m_xDlg->run();
167 }
168
Execute()169 short AbstractDropDownFieldDialog_Impl::Execute()
170 {
171 return m_xDlg->run();
172 }
173
Execute()174 short AbstractDropDownFormFieldDialog_Impl::Execute()
175 {
176 return m_xDlg->run();
177 }
178
Execute()179 short AbstractDateFormFieldDialog_Impl::Execute()
180 {
181 return m_xDlg->run();
182 }
183
Execute()184 short AbstractSwLabDlg_Impl::Execute()
185 {
186 return m_xDlg->run();
187 }
188
Execute()189 short AbstractSwSelGlossaryDlg_Impl::Execute()
190 {
191 return m_xDlg->run();
192 }
193
Execute()194 short AbstractSwAutoFormatDlg_Impl::Execute()
195 {
196 return m_xDlg->run();
197 }
198
Execute()199 short AbstractSwFieldDlg_Impl::Execute()
200 {
201 return m_xDlg->run();
202 }
203
Execute()204 short AbstractSwRenameXNamedDlg_Impl::Execute()
205 {
206 return m_xDlg->run();
207 }
208
Execute()209 short AbstractSwModalRedlineAcceptDlg_Impl::Execute()
210 {
211 return m_xDlg->run();
212 }
213
Execute()214 short AbstractGlossaryDlg_Impl::Execute()
215 {
216 return m_xDlg->run();
217 }
218
Execute()219 short AbstractFieldInputDlg_Impl::Execute()
220 {
221 return m_xDlg->run();
222 }
223
Execute()224 short AbstractInsFootNoteDlg_Impl::Execute()
225 {
226 return m_xDlg->run();
227 }
228
Execute()229 short AbstractJavaEditDialog_Impl::Execute()
230 {
231 return m_xDlg->run();
232 }
233
Execute()234 short AbstractMailMergeDlg_Impl::Execute()
235 {
236 return m_xDlg->run();
237 }
238
Execute()239 short AbstractMailMergeCreateFromDlg_Impl::Execute()
240 {
241 return m_xDlg->run();
242 }
243
Execute()244 short AbstractMailMergeFieldConnectionsDlg_Impl::Execute()
245 {
246 return m_xDlg->run();
247 }
248
Execute()249 short AbstractMultiTOXTabDialog_Impl::Execute()
250 {
251 return m_xDlg->run();
252 }
253
StartExecuteAsync(AsyncContext & rCtx)254 bool AbstractMultiTOXTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
255 {
256 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
257 }
258
Execute()259 short AbstractEditRegionDlg_Impl::Execute()
260 {
261 return m_xDlg->run();
262 }
263
Execute()264 short AbstractInsertSectionTabDialog_Impl::Execute()
265 {
266 return m_xDlg->run();
267 }
268
StartExecuteAsync(AsyncContext & rCtx)269 bool AbstractInsertSectionTabDialog_Impl::StartExecuteAsync(AsyncContext &rCtx)
270 {
271 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
272 }
273
Execute()274 short AbstractIndexMarkFloatDlg_Impl::Execute()
275 {
276 return m_xDlg->run();
277 }
278
Execute()279 short AbstractAuthMarkFloatDlg_Impl::Execute()
280 {
281 return m_xDlg->run();
282 }
283
SetCurPageId(const OString & rName)284 void AbstractTabController_Impl::SetCurPageId( const OString &rName )
285 {
286 m_xDlg->SetCurPageId( rName );
287 }
288
GetOutputItemSet() const289 const SfxItemSet* AbstractTabController_Impl::GetOutputItemSet() const
290 {
291 return m_xDlg->GetOutputItemSet();
292 }
293
GetInputRanges(const SfxItemPool & pItem)294 const sal_uInt16* AbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
295 {
296 return m_xDlg->GetInputRanges( pItem );
297 }
298
SetInputSet(const SfxItemSet * pInSet)299 void AbstractTabController_Impl::SetInputSet( const SfxItemSet* pInSet )
300 {
301 m_xDlg->SetInputSet( pInSet );
302 }
303
StartExecuteAsync(AsyncContext & rCtx)304 bool AbstractTabController_Impl::StartExecuteAsync(AsyncContext &rCtx)
305 {
306 return SfxTabDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
307 }
308
309 //From class Window.
SetText(const OUString & rStr)310 void AbstractTabController_Impl::SetText( const OUString& rStr )
311 {
312 m_xDlg->set_title(rStr);
313 }
314
IMPL_LINK_NOARG(AbstractApplyTabController_Impl,ApplyHdl,weld::Button &,void)315 IMPL_LINK_NOARG(AbstractApplyTabController_Impl, ApplyHdl, weld::Button&, void)
316 {
317 if (m_xDlg->Apply())
318 {
319 m_aHandler.Call(nullptr);
320 m_xDlg->Applied();
321 }
322 }
323
SetApplyHdl(const Link<LinkParamNone *,void> & rLink)324 void AbstractApplyTabController_Impl::SetApplyHdl( const Link<LinkParamNone*,void>& rLink )
325 {
326 m_aHandler = rLink;
327 m_xDlg->SetApplyHandler(LINK(this, AbstractApplyTabController_Impl, ApplyHdl));
328 }
329
GetLevel() const330 sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetLevel() const
331 {
332 return m_xDlg->GetLevel();
333 }
334
GetPara() const335 sal_uInt8 AbstractSwInsertAbstractDlg_Impl::GetPara() const
336 {
337 return m_xDlg->GetPara();
338 }
339
GetOutputItemSet() const340 const SfxItemSet* SwAbstractSfxController_Impl::GetOutputItemSet() const
341 {
342 return m_xDlg->GetOutputItemSet();
343 }
344
SetText(const OUString & rStr)345 void SwAbstractSfxController_Impl::SetText(const OUString& rStr)
346 {
347 m_xDlg->set_title(rStr);
348 }
349
FillOptions(SwAsciiOptions & rOptions)350 void AbstractSwAsciiFilterDlg_Impl::FillOptions( SwAsciiOptions& rOptions )
351 {
352 m_xDlg->FillOptions(rOptions);
353 }
354
GetSplitMode()355 SplitTable_HeadlineOption AbstractSplitTableDialog_Impl::GetSplitMode()
356 {
357 return m_xDlg->GetSplitMode();
358 }
359
GetTemplateName()360 OUString AbstractSwBreakDlg_Impl::GetTemplateName()
361 {
362 SwBreakDlg* pDlg = dynamic_cast<SwBreakDlg*>(m_xDlg.get());
363 if (pDlg)
364 return pDlg->GetTemplateName();
365
366 return "";
367 }
368
GetKind()369 sal_uInt16 AbstractSwBreakDlg_Impl:: GetKind()
370 {
371 SwBreakDlg* pDlg = dynamic_cast<SwBreakDlg*>(m_xDlg.get());
372 if (pDlg)
373 return pDlg->GetKind();
374
375 return 0;
376 }
377
GetPageNumber()378 ::std::optional<sal_uInt16> AbstractSwBreakDlg_Impl:: GetPageNumber()
379 {
380 SwBreakDlg* pDlg = dynamic_cast<SwBreakDlg*>(m_xDlg.get());
381 if (pDlg)
382 return pDlg->GetPageNumber();
383
384 return 0;
385 }
386
GetValues(sal_Unicode & rDelim,SwInsertTableOptions & rInsTableFlags,SwTableAutoFormat const * & prTAFormat)387 void AbstractSwConvertTableDlg_Impl::GetValues( sal_Unicode& rDelim,SwInsertTableOptions& rInsTableFlags,
388 SwTableAutoFormat const*& prTAFormat)
389 {
390 m_xDlg->GetValues(rDelim,rInsTableFlags, prTAFormat);
391 }
392
DataToDoc(const uno::Sequence<uno::Any> & rSelection,uno::Reference<sdbc::XDataSource> rxSource,uno::Reference<sdbc::XConnection> xConnection,uno::Reference<sdbc::XResultSet> xResultSet)393 void AbstractSwInsertDBColAutoPilot_Impl::DataToDoc( const uno::Sequence< uno::Any >& rSelection,
394 uno::Reference< sdbc::XDataSource> rxSource,
395 uno::Reference< sdbc::XConnection> xConnection,
396 uno::Reference< sdbc::XResultSet > xResultSet)
397 {
398 #if HAVE_FEATURE_DBCONNECTIVITY
399 m_xDlg->DataToDoc(rSelection, rxSource, xConnection, xResultSet);
400 #else
401 (void) rSelection;
402 (void) rxSource;
403 (void) xConnection;
404 (void) xResultSet;
405 #endif
406 }
407
PrevButtonPressed() const408 bool AbstractDropDownFieldDialog_Impl::PrevButtonPressed() const
409 {
410 return m_xDlg->PrevButtonPressed();
411 }
412
NextButtonPressed() const413 bool AbstractDropDownFieldDialog_Impl::NextButtonPressed() const
414 {
415 return m_xDlg->NextButtonPressed();
416 }
417
SetCurPageId(const OString & rName)418 void AbstractSwLabDlg_Impl::SetCurPageId( const OString &rName )
419 {
420 m_xDlg->SetCurPageId( rName );
421 }
422
GetOutputItemSet() const423 const SfxItemSet* AbstractSwLabDlg_Impl::GetOutputItemSet() const
424 {
425 return m_xDlg->GetOutputItemSet();
426 }
427
GetInputRanges(const SfxItemPool & pItem)428 const sal_uInt16* AbstractSwLabDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
429 {
430 return m_xDlg->GetInputRanges( pItem );
431 }
432
SetInputSet(const SfxItemSet * pInSet)433 void AbstractSwLabDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
434 {
435 m_xDlg->SetInputSet( pInSet );
436 }
437
SetText(const OUString & rStr)438 void AbstractSwLabDlg_Impl::SetText( const OUString& rStr )
439 {
440 m_xDlg->set_title(rStr);
441 }
442
GetBusinessCardStr() const443 const OUString& AbstractSwLabDlg_Impl::GetBusinessCardStr() const
444 {
445 return m_xDlg->GetBusinessCardStr();
446 }
447
GetPrt()448 Printer * AbstractSwLabDlg_Impl::GetPrt()
449 {
450 return m_xDlg->GetPrt();
451 }
452
InsertGlos(const OUString & rRegion,const OUString & rGlosName)453 void AbstractSwSelGlossaryDlg_Impl::InsertGlos(const OUString &rRegion, const OUString &rGlosName)
454 {
455 m_xDlg->InsertGlos( rRegion, rGlosName );
456 }
457
GetSelectedIdx() const458 sal_Int32 AbstractSwSelGlossaryDlg_Impl::GetSelectedIdx() const
459 {
460 return m_xDlg->GetSelectedIdx();
461 }
462
SelectEntryPos(sal_Int32 nIdx)463 void AbstractSwSelGlossaryDlg_Impl::SelectEntryPos(sal_Int32 nIdx)
464 {
465 m_xDlg->SelectEntryPos( nIdx );
466 }
467
FillAutoFormatOfIndex() const468 std::unique_ptr<SwTableAutoFormat> AbstractSwAutoFormatDlg_Impl::FillAutoFormatOfIndex() const
469 {
470 return m_xDlg->FillAutoFormatOfIndex();
471 }
472
SetCurPageId(const OString & rName)473 void AbstractSwFieldDlg_Impl::SetCurPageId( const OString &rName )
474 {
475 m_xDlg->SetCurPageId( rName );
476 }
477
GetOutputItemSet() const478 const SfxItemSet* AbstractSwFieldDlg_Impl::GetOutputItemSet() const
479 {
480 return m_xDlg->GetOutputItemSet();
481 }
482
GetInputRanges(const SfxItemPool & pItem)483 const sal_uInt16* AbstractSwFieldDlg_Impl::GetInputRanges(const SfxItemPool& pItem )
484 {
485 return m_xDlg->GetInputRanges( pItem );
486 }
487
SetInputSet(const SfxItemSet * pInSet)488 void AbstractSwFieldDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
489 {
490 m_xDlg->SetInputSet( pInSet );
491 }
492
SetText(const OUString & rStr)493 void AbstractSwFieldDlg_Impl::SetText( const OUString& rStr )
494 {
495 m_xDlg->set_title(rStr);
496 }
497
StartExecuteAsync(AsyncContext & rCtx)498 bool AbstractSwFieldDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
499 {
500 auto xDlg = m_xDlg;
501 return SfxTabDialogController::runAsync(m_xDlg, [=](sal_Int32 nResult){
502 xDlg->Close();
503 if (rCtx.isSet())
504 rCtx.maEndDialogFn(nResult);
505 });
506 }
507
Initialize(SfxChildWinInfo * pInfo)508 void AbstractSwFieldDlg_Impl::Initialize(SfxChildWinInfo *pInfo)
509 {
510 m_xDlg->Initialize( pInfo );
511 }
512
ReInitDlg()513 void AbstractSwFieldDlg_Impl::ReInitDlg()
514 {
515 m_xDlg->ReInitDlg();
516 }
517
ActivateDatabasePage()518 void AbstractSwFieldDlg_Impl::ActivateDatabasePage()
519 {
520 m_xDlg->ActivateDatabasePage();
521 }
522
ShowReferencePage()523 void AbstractSwFieldDlg_Impl::ShowReferencePage()
524 {
525 m_xDlg->ShowReferencePage();
526 }
527
GetController()528 std::shared_ptr<SfxDialogController> AbstractSwFieldDlg_Impl::GetController()
529 {
530 return m_xDlg;
531 }
532
SetForbiddenChars(const OUString & rSet)533 void AbstractSwRenameXNamedDlg_Impl::SetForbiddenChars( const OUString& rSet )
534 {
535 m_xDlg->SetForbiddenChars( rSet );
536 }
537
SetAlternativeAccess(css::uno::Reference<css::container::XNameAccess> & xSecond,css::uno::Reference<css::container::XNameAccess> & xThird)538 void AbstractSwRenameXNamedDlg_Impl::SetAlternativeAccess(
539 css::uno::Reference< css::container::XNameAccess > & xSecond,
540 css::uno::Reference< css::container::XNameAccess > & xThird )
541 {
542 m_xDlg->SetAlternativeAccess( xSecond, xThird);
543 }
544
AcceptAll(bool bAccept)545 void AbstractSwModalRedlineAcceptDlg_Impl::AcceptAll( bool bAccept )
546 {
547 m_xDlg->AcceptAll( bAccept);
548 }
549
GetCurrGrpName() const550 OUString AbstractGlossaryDlg_Impl::GetCurrGrpName() const
551 {
552 return m_xDlg->GetCurrGrpName();
553 }
554
GetCurrShortName() const555 OUString AbstractGlossaryDlg_Impl::GetCurrShortName() const
556 {
557 return m_xDlg->GetCurrShortName();
558 }
559
EndDialog(sal_Int32 n)560 void AbstractFieldInputDlg_Impl::EndDialog(sal_Int32 n)
561 {
562 m_xDlg->response(n);
563 }
564
PrevButtonPressed() const565 bool AbstractFieldInputDlg_Impl::PrevButtonPressed() const
566 {
567 return m_xDlg->PrevButtonPressed();
568 }
569
NextButtonPressed() const570 bool AbstractFieldInputDlg_Impl::NextButtonPressed() const
571 {
572 return m_xDlg->NextButtonPressed();
573 }
574
GetFontName()575 OUString AbstractInsFootNoteDlg_Impl::GetFontName()
576 {
577 return m_xDlg->GetFontName();
578 }
579
IsEndNote()580 bool AbstractInsFootNoteDlg_Impl::IsEndNote()
581 {
582 return m_xDlg->IsEndNote();
583 }
584
GetStr()585 OUString AbstractInsFootNoteDlg_Impl::GetStr()
586 {
587 return m_xDlg->GetStr();
588 }
589
SetHelpId(const OString & rHelpId)590 void AbstractInsFootNoteDlg_Impl::SetHelpId(const OString& rHelpId)
591 {
592 m_xDlg->set_help_id(rHelpId);
593 }
594
SetText(const OUString & rStr)595 void AbstractInsFootNoteDlg_Impl::SetText( const OUString& rStr )
596 {
597 m_xDlg->set_title(rStr);
598 }
599
GetValues(OUString & rName,sal_uInt16 & rRow,sal_uInt16 & rCol,SwInsertTableOptions & rInsTableFlags,OUString & rTableAutoFormatName,std::unique_ptr<SwTableAutoFormat> & prTAFormat)600 void AbstractInsTableDlg_Impl::GetValues( OUString& rName, sal_uInt16& rRow, sal_uInt16& rCol,
601 SwInsertTableOptions& rInsTableFlags, OUString& rTableAutoFormatName,
602 std::unique_ptr<SwTableAutoFormat>& prTAFormat )
603 {
604 SwInsTableDlg* pDlg = dynamic_cast<SwInsTableDlg*>(m_xDlg.get());
605 if (pDlg)
606 pDlg->GetValues(rName, rRow, rCol, rInsTableFlags, rTableAutoFormatName, prTAFormat);
607 }
608
GetScriptText() const609 OUString AbstractJavaEditDialog_Impl::GetScriptText() const
610 {
611 return m_xDlg->GetScriptText();
612 }
613
GetScriptType() const614 OUString AbstractJavaEditDialog_Impl::GetScriptType() const
615 {
616 return m_xDlg->GetScriptType();
617 }
618
IsUrl() const619 bool AbstractJavaEditDialog_Impl::IsUrl() const
620 {
621 return m_xDlg->IsUrl();
622 }
623
IsNew() const624 bool AbstractJavaEditDialog_Impl::IsNew() const
625 {
626 return m_xDlg->IsNew();
627 }
628
IsUpdate() const629 bool AbstractJavaEditDialog_Impl::IsUpdate() const
630 {
631 return m_xDlg->IsUpdate();
632 }
633
GetMergeType()634 DBManagerOptions AbstractMailMergeDlg_Impl::GetMergeType()
635 {
636 return m_xDlg->GetMergeType();
637 }
638
GetSaveFilter() const639 const OUString& AbstractMailMergeDlg_Impl::GetSaveFilter() const
640 {
641 return m_xDlg->GetSaveFilter();
642 }
643
GetSelection() const644 css::uno::Sequence< css::uno::Any > AbstractMailMergeDlg_Impl::GetSelection() const
645 {
646 return m_xDlg->GetSelection();
647 }
648
GetResultSet() const649 uno::Reference< sdbc::XResultSet> AbstractMailMergeDlg_Impl::GetResultSet() const
650 {
651 return m_xDlg->GetResultSet();
652 }
653
IsSaveSingleDoc() const654 bool AbstractMailMergeDlg_Impl::IsSaveSingleDoc() const
655 {
656 return m_xDlg->IsSaveSingleDoc();
657 }
658
IsGenerateFromDataBase() const659 bool AbstractMailMergeDlg_Impl::IsGenerateFromDataBase() const
660 {
661 return m_xDlg->IsGenerateFromDataBase();
662 }
663
IsFileEncryptedFromDataBase() const664 bool AbstractMailMergeDlg_Impl::IsFileEncryptedFromDataBase() const
665 {
666 return m_xDlg->IsFileEncryptedFromDataBase();
667 }
668
GetColumnName() const669 OUString AbstractMailMergeDlg_Impl::GetColumnName() const
670 {
671 return m_xDlg->GetColumnName();
672 }
673
GetPasswordColumnName() const674 OUString AbstractMailMergeDlg_Impl::GetPasswordColumnName() const
675 {
676 return m_xDlg->GetPasswordColumnName();
677 }
678
GetTargetURL() const679 OUString AbstractMailMergeDlg_Impl::GetTargetURL() const
680 {
681 return m_xDlg->GetTargetURL();
682 }
683
IsThisDocument() const684 bool AbstractMailMergeCreateFromDlg_Impl::IsThisDocument() const
685 {
686 return m_xDlg->IsThisDocument();
687 }
688
IsUseExistingConnections() const689 bool AbstractMailMergeFieldConnectionsDlg_Impl::IsUseExistingConnections() const
690 {
691 return m_xDlg->IsUseExistingConnections();
692 }
693
GetCurrentTOXType() const694 CurTOXType AbstractMultiTOXTabDialog_Impl::GetCurrentTOXType() const
695 {
696 return m_xDlg->GetCurrentTOXType();
697 }
698
GetTOXDescription(CurTOXType eTOXTypes)699 SwTOXDescription& AbstractMultiTOXTabDialog_Impl::GetTOXDescription(CurTOXType eTOXTypes)
700 {
701 return m_xDlg->GetTOXDescription(eTOXTypes);
702 }
703
GetOutputItemSet() const704 const SfxItemSet* AbstractMultiTOXTabDialog_Impl::GetOutputItemSet() const
705 {
706 return m_xDlg->GetOutputItemSet();
707 }
708
SelectSection(const OUString & rSectionName)709 void AbstractEditRegionDlg_Impl::SelectSection(const OUString& rSectionName)
710 {
711 m_xDlg->SelectSection(rSectionName);
712 }
713
714 void
SetSectionData(SwSectionData const & rSect)715 AbstractInsertSectionTabDialog_Impl::SetSectionData(SwSectionData const& rSect)
716 {
717 m_xDlg->SetSectionData(rSect);
718 }
719
ReInitDlg(SwWrtShell & rWrtShell)720 void AbstractIndexMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
721 {
722 m_xDlg->ReInitDlg( rWrtShell);
723 }
724
GetController()725 std::shared_ptr<SfxDialogController> AbstractIndexMarkFloatDlg_Impl::GetController()
726 {
727 return m_xDlg;
728 }
729
ReInitDlg(SwWrtShell & rWrtShell)730 void AbstractAuthMarkFloatDlg_Impl::ReInitDlg(SwWrtShell& rWrtShell)
731 {
732 m_xDlg->ReInitDlg(rWrtShell);
733 }
734
GetController()735 std::shared_ptr<SfxDialogController> AbstractAuthMarkFloatDlg_Impl::GetController()
736 {
737 return m_xDlg;
738 }
739
GetController()740 std::shared_ptr<SfxDialogController> AbstractSwWordCountFloatDlg_Impl::GetController()
741 {
742 return m_xDlg;
743 }
744
UpdateCounts()745 void AbstractSwWordCountFloatDlg_Impl::UpdateCounts()
746 {
747 m_xDlg->UpdateCounts();
748 }
749
SetCounts(const SwDocStat & rCurrCnt,const SwDocStat & rDocStat)750 void AbstractSwWordCountFloatDlg_Impl::SetCounts(const SwDocStat &rCurrCnt, const SwDocStat &rDocStat)
751 {
752 m_xDlg->SetCounts(rCurrCnt, rDocStat);
753 }
754
~AbstractMailMergeWizard_Impl()755 AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl()
756 {
757 }
758
StartExecuteAsync(AsyncContext & rCtx)759 bool AbstractMailMergeWizard_Impl::StartExecuteAsync(AsyncContext &rCtx)
760 {
761 // SwMailMergeWizardExecutor wants to run the lifecycle of this dialog
762 // so clear mxOwner here and leave it up to SwMailMergeWizardExecutor
763 rCtx.mxOwner.clear();
764 return weld::GenericDialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
765 }
766
Execute()767 short AbstractMailMergeWizard_Impl::Execute()
768 {
769 return m_xDlg->run();
770 }
771
GetReloadDocument() const772 OUString AbstractMailMergeWizard_Impl::GetReloadDocument() const
773 {
774 return m_xDlg->GetReloadDocument();
775 }
776
ShowPage(sal_uInt16 nLevel)777 void AbstractMailMergeWizard_Impl::ShowPage( sal_uInt16 nLevel )
778 {
779 m_xDlg->skipUntil(nLevel);
780 }
781
GetRestartPage() const782 sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const
783 {
784 return m_xDlg->GetRestartPage();
785 }
786
CreateSwInsertAbstractDlg(weld::Window * pParent)787 VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent)
788 {
789 return VclPtr<AbstractSwInsertAbstractDlg_Impl>::Create(std::make_unique<SwInsertAbstractDlg>(pParent));
790 }
791
CreateSwAddressAbstractDlg(weld::Window * pParent,const SfxItemSet & rSet)792 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAddressAbstractDlg(weld::Window* pParent,
793 const SfxItemSet& rSet)
794 {
795 return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwAddrDlg>(pParent, rSet));
796 }
797
CreateSwDropCapsDialog(weld::Window * pParent,const SfxItemSet & rSet)798 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwDropCapsDialog(weld::Window* pParent,
799 const SfxItemSet& rSet)
800 {
801 return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwDropCapsDlg>(pParent, rSet));
802 }
803
CreateSwBackgroundDialog(weld::Window * pParent,const SfxItemSet & rSet)804 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBackgroundDialog(weld::Window* pParent,
805 const SfxItemSet& rSet)
806 {
807 return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwBackgroundDlg>(pParent, rSet));
808 }
809
CreateNumFormatDialog(weld::Widget * pParent,const SfxItemSet & rSet)810 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateNumFormatDialog(weld::Widget* pParent, const SfxItemSet& rSet)
811 {
812 return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwNumFormatDlg>(pParent, rSet));
813 }
814
CreateSwAsciiFilterDlg(weld::Window * pParent,SwDocShell & rDocSh,SvStream * pStream)815 VclPtr<AbstractSwAsciiFilterDlg> SwAbstractDialogFactory_Impl::CreateSwAsciiFilterDlg(weld::Window* pParent,
816 SwDocShell& rDocSh, SvStream* pStream)
817 {
818 return VclPtr<AbstractSwAsciiFilterDlg_Impl>::Create(std::make_unique<SwAsciiFilterDlg>(pParent, rDocSh, pStream));
819 }
820
CreateSwInsertBookmarkDlg(weld::Window * pParent,SwWrtShell & rSh)821 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg(weld::Window *pParent,
822 SwWrtShell &rSh)
823 {
824 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwInsertBookmarkDlg>(pParent, rSh));
825 }
826
CreateSwBreakDlg(weld::Window * pParent,SwWrtShell & rSh)827 std::shared_ptr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakDlg(weld::Window* pParent, SwWrtShell &rSh)
828 {
829 return std::make_shared<AbstractSwBreakDlg_Impl>(std::make_unique<SwBreakDlg>(pParent, rSh));
830 }
831
CreateSwChangeDBDlg(SwView & rVw)832 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw)
833 {
834 #if HAVE_FEATURE_DBCONNECTIVITY
835 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwChangeDBDlg>(rVw));
836 #else
837 (void) rVw;
838 return nullptr;
839 #endif
840 }
841
CreateSwCharDlg(weld::Window * pParent,SwView & pVw,const SfxItemSet & rCoreSet,SwCharDlgMode nDialogMode,const OUString * pFormatStr)842 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwCharDlg(weld::Window* pParent, SwView& pVw,
843 const SfxItemSet& rCoreSet, SwCharDlgMode nDialogMode, const OUString* pFormatStr)
844 {
845 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwCharDlg>(pParent, pVw, rCoreSet, nDialogMode, pFormatStr));
846 }
847
CreateSwConvertTableDlg(SwView & rView,bool bToTable)848 VclPtr<AbstractSwConvertTableDlg> SwAbstractDialogFactory_Impl::CreateSwConvertTableDlg(SwView& rView, bool bToTable)
849 {
850 return VclPtr<AbstractSwConvertTableDlg_Impl>::Create(std::make_unique<SwConvertTableDlg>(rView, bToTable));
851 }
852
CreateSwCaptionDialog(weld::Window * pParent,SwView & rV)853 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwCaptionDialog(weld::Window *pParent, SwView &rV)
854 {
855 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwCaptionDialog>(pParent, rV));
856 }
857
CreateSwInsertDBColAutoPilot(SwView & rView,uno::Reference<sdbc::XDataSource> rxSource,uno::Reference<sdbcx::XColumnsSupplier> xColSupp,const SwDBData & rData)858 VclPtr<AbstractSwInsertDBColAutoPilot> SwAbstractDialogFactory_Impl::CreateSwInsertDBColAutoPilot( SwView& rView,
859 uno::Reference< sdbc::XDataSource> rxSource,
860 uno::Reference<sdbcx::XColumnsSupplier> xColSupp,
861 const SwDBData& rData)
862 {
863 #if HAVE_FEATURE_DBCONNECTIVITY
864 return VclPtr<AbstractSwInsertDBColAutoPilot_Impl>::Create(std::make_unique<SwInsertDBColAutoPilot>(rView, rxSource, xColSupp, rData));
865 #else
866 (void) rView;
867 (void) rxSource;
868 (void) xColSupp;
869 (void) rData;
870 return nullptr;
871 #endif
872 }
873
CreateSwFootNoteOptionDlg(weld::Window * pParent,SwWrtShell & rSh)874 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwFootNoteOptionDlg(weld::Window *pParent, SwWrtShell &rSh)
875 {
876 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwFootNoteOptionDlg>(pParent, rSh));
877 }
878
CreateDropDownFieldDialog(weld::Widget * pParent,SwWrtShell & rSh,SwField * pField,bool bPrevButton,bool bNextButton)879 VclPtr<AbstractDropDownFieldDialog> SwAbstractDialogFactory_Impl::CreateDropDownFieldDialog(weld::Widget *pParent,
880 SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton)
881 {
882 return VclPtr<AbstractDropDownFieldDialog_Impl>::Create(std::make_unique<sw::DropDownFieldDialog>(pParent, rSh, pField, bPrevButton, bNextButton));
883 }
884
CreateDropDownFormFieldDialog(weld::Widget * pParent,sw::mark::IFieldmark * pDropDownField)885 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDropDownFormFieldDialog(weld::Widget *pParent, sw::mark::IFieldmark* pDropDownField)
886 {
887 return VclPtr<AbstractDropDownFormFieldDialog_Impl>::Create(std::make_unique<sw::DropDownFormFieldDialog>(pParent, pDropDownField));
888 }
889
CreateDateFormFieldDialog(weld::Widget * pParent,sw::mark::IDateFieldmark * pDateField,SwDoc & rDoc)890 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateDateFormFieldDialog(weld::Widget *pParent, sw::mark::IDateFieldmark* pDateField, SwDoc& rDoc)
891 {
892 return VclPtr<AbstractDateFormFieldDialog_Impl>::Create(std::make_unique<sw::DateFormFieldDialog>(pParent, pDateField, rDoc));
893 }
894
CreateSwEnvDlg(weld::Window * pParent,const SfxItemSet & rSet,SwWrtShell * pWrtSh,Printer * pPrt,bool bInsert)895 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwEnvDlg(weld::Window* pParent, const SfxItemSet& rSet,
896 SwWrtShell* pWrtSh, Printer* pPrt,
897 bool bInsert)
898 {
899 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwEnvDlg>(pParent, rSet, pWrtSh,pPrt, bInsert));
900 }
901
CreateSwLabDlg(weld::Window * pParent,const SfxItemSet & rSet,SwDBManager * pDBManager,bool bLabel)902 VclPtr<AbstractSwLabDlg> SwAbstractDialogFactory_Impl::CreateSwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
903 SwDBManager* pDBManager, bool bLabel)
904 {
905 return VclPtr<AbstractSwLabDlg_Impl>::Create(std::make_unique<SwLabDlg>(pParent, rSet, pDBManager, bLabel));
906 }
907
GetSwLabDlgStaticMethod()908 SwLabDlgMethod SwAbstractDialogFactory_Impl::GetSwLabDlgStaticMethod ()
909 {
910 return SwLabDlg::UpdateFieldInformation;
911 }
912
CreateSwParaDlg(weld::Window * pParent,SwView & rVw,const SfxItemSet & rCoreSet,bool bDraw,const OString & sDefPage)913 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwParaDlg(weld::Window *pParent, SwView& rVw,
914 const SfxItemSet& rCoreSet,
915 bool bDraw ,
916 const OString& sDefPage)
917 {
918 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwParaDlg>(pParent, rVw, rCoreSet, DLG_STD, nullptr, bDraw, sDefPage));
919 }
920
CreateSwAutoMarkDialog(weld::Window * pParent,SwWrtShell & rSh)921 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwAutoMarkDialog(weld::Window *pParent, SwWrtShell &rSh)
922 {
923 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwAuthMarkModalDlg>(pParent, rSh));
924 }
925
CreateSwColumnDialog(weld::Window * pParent,SwWrtShell & rSh)926 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwColumnDialog(weld::Window *pParent, SwWrtShell &rSh)
927 {
928 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwColumnDlg>(pParent, rSh));
929 }
930
CreateSwTableHeightDialog(weld::Window * pParent,SwWrtShell & rSh)931 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwTableHeightDialog(weld::Window *pParent, SwWrtShell &rSh)
932 {
933 return VclPtr<AbstractSwTableHeightDlg_Impl>::Create(std::make_unique<SwTableHeightDlg>(pParent, rSh));
934 }
935
CreateSwSortingDialog(weld::Window * pParent,SwWrtShell & rSh)936 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwSortingDialog(weld::Window *pParent, SwWrtShell &rSh)
937 {
938 return VclPtr<AbstractSwSortDlg_Impl>::Create(std::make_unique<SwSortDlg>(pParent, rSh));
939 }
940
CreateSplitTableDialog(weld::Window * pParent,SwWrtShell & rSh)941 VclPtr<AbstractSplitTableDialog> SwAbstractDialogFactory_Impl::CreateSplitTableDialog(weld::Window *pParent, SwWrtShell &rSh)
942 {
943 return VclPtr<AbstractSplitTableDialog_Impl>::Create(std::make_unique<SwSplitTableDlg>(pParent, rSh));
944 }
945
CreateSwSelGlossaryDlg(weld::Window * pParent,const OUString & rShortName)946 VclPtr<AbstractSwSelGlossaryDlg> SwAbstractDialogFactory_Impl::CreateSwSelGlossaryDlg(weld::Window *pParent, const OUString &rShortName)
947 {
948 return VclPtr<AbstractSwSelGlossaryDlg_Impl>::Create(std::make_unique<SwSelGlossaryDlg>(pParent, rShortName));
949 }
950
CreateSwAutoFormatDlg(weld::Window * pParent,SwWrtShell * pShell,bool bSetAutoFormat,const SwTableAutoFormat * pSelFormat)951 VclPtr<AbstractSwAutoFormatDlg> SwAbstractDialogFactory_Impl::CreateSwAutoFormatDlg(weld::Window* pParent,
952 SwWrtShell* pShell, bool bSetAutoFormat, const SwTableAutoFormat* pSelFormat)
953 {
954 return VclPtr<AbstractSwAutoFormatDlg_Impl>::Create(
955 std::unique_ptr<SwAutoFormatDlg, o3tl::default_delete<SwAutoFormatDlg>>(
956 new SwAutoFormatDlg(pParent, pShell, bSetAutoFormat, pSelFormat)));
957 }
958
CreateSwBorderDlg(weld::Window * pParent,SfxItemSet & rSet,SwBorderModes nType)959 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwBorderDlg(weld::Window* pParent, SfxItemSet& rSet, SwBorderModes nType )
960 {
961 return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwBorderDlg>(pParent, rSet, nType));
962 }
963
CreateSwWrapDlg(weld::Window * pParent,SfxItemSet & rSet,SwWrtShell * pSh)964 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwWrapDlg(weld::Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh)
965 {
966 return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwWrapDlg>(pParent, rSet, pSh, true/*bDrawMode*/));
967 }
968
CreateSwTableWidthDlg(weld::Window * pParent,SwTableFUNC & rFnc)969 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwTableWidthDlg(weld::Window *pParent, SwTableFUNC &rFnc)
970 {
971 return VclPtr<AbstractSwTableWidthDlg_Impl>::Create(std::make_unique<SwTableWidthDlg>(pParent, rFnc));
972 }
973
CreateSwTableTabDlg(weld::Window * pParent,const SfxItemSet * pItemSet,SwWrtShell * pSh)974 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSwTableTabDlg(weld::Window* pParent,
975 const SfxItemSet* pItemSet, SwWrtShell* pSh)
976 {
977 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwTableTabDlg>(pParent, pItemSet, pSh));
978 }
979
CreateSwFieldDlg(SfxBindings * pB,SwChildWinWrapper * pCW,weld::Window * pParent)980 VclPtr<AbstractSwFieldDlg> SwAbstractDialogFactory_Impl::CreateSwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, weld::Window *pParent)
981 {
982 return VclPtr<AbstractSwFieldDlg_Impl>::Create(std::make_shared<SwFieldDlg>(pB, pCW, pParent));
983 }
984
CreateSwFieldEditDlg(SwView & rVw)985 VclPtr<SfxAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwFieldEditDlg(SwView& rVw)
986 {
987 return VclPtr<SwAbstractSfxController_Impl>::Create(std::make_unique<SwFieldEditDlg>(rVw));
988 }
989
CreateSwRenameXNamedDlg(weld::Widget * pParent,css::uno::Reference<css::container::XNamed> & xNamed,css::uno::Reference<css::container::XNameAccess> & xNameAccess)990 VclPtr<AbstractSwRenameXNamedDlg> SwAbstractDialogFactory_Impl::CreateSwRenameXNamedDlg(weld::Widget* pParent,
991 css::uno::Reference< css::container::XNamed > & xNamed,
992 css::uno::Reference< css::container::XNameAccess > & xNameAccess)
993 {
994 return VclPtr<AbstractSwRenameXNamedDlg_Impl>::Create(std::make_unique<SwRenameXNamedDlg>(pParent,xNamed, xNameAccess));
995 }
996
CreateSwModalRedlineAcceptDlg(weld::Window * pParent)997 VclPtr<AbstractSwModalRedlineAcceptDlg> SwAbstractDialogFactory_Impl::CreateSwModalRedlineAcceptDlg(weld::Window *pParent)
998 {
999 return VclPtr<AbstractSwModalRedlineAcceptDlg_Impl>::Create(std::make_unique<SwModalRedlineAcceptDlg>(pParent));
1000 }
1001
CreateTableMergeDialog(weld::Window * pParent,bool & rWithPrev)1002 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTableMergeDialog(weld::Window* pParent, bool& rWithPrev)
1003 {
1004 return VclPtr<AbstractSwMergeTableDlg_Impl>::Create(std::make_unique<SwMergeTableDlg>(pParent, rWithPrev));
1005 }
1006
CreateFrameTabDialog(const OUString & rDialogType,SfxViewFrame * pFrame,weld::Window * pParent,const SfxItemSet & rCoreSet,bool bNewFrame,const OString & sDefPage)1007 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const OUString &rDialogType,
1008 SfxViewFrame *pFrame, weld::Window *pParent,
1009 const SfxItemSet& rCoreSet,
1010 bool bNewFrame,
1011 const OString& sDefPage )
1012 {
1013 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwFrameDlg>(pFrame, pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, nullptr));
1014 }
1015
CreateTemplateDialog(weld::Window * pParent,SfxStyleSheetBase & rBase,SfxStyleFamily nRegion,const OString & sPage,SwWrtShell * pActShell,bool bNew)1016 VclPtr<SfxAbstractApplyTabDialog> SwAbstractDialogFactory_Impl::CreateTemplateDialog(
1017 weld::Window *pParent,
1018 SfxStyleSheetBase& rBase,
1019 SfxStyleFamily nRegion,
1020 const OString& sPage,
1021 SwWrtShell* pActShell,
1022 bool bNew )
1023 {
1024 return VclPtr<AbstractApplyTabController_Impl>::Create(std::make_shared<SwTemplateDlgController>(pParent, rBase, nRegion,
1025 sPage, pActShell, bNew));
1026 }
1027
CreateGlossaryDlg(SfxViewFrame * pViewFrame,SwGlossaryHdl * pGlosHdl,SwWrtShell * pWrtShell)1028 VclPtr<AbstractGlossaryDlg> SwAbstractDialogFactory_Impl::CreateGlossaryDlg(SfxViewFrame* pViewFrame, SwGlossaryHdl* pGlosHdl,
1029 SwWrtShell *pWrtShell)
1030 {
1031 return VclPtr<AbstractGlossaryDlg_Impl>::Create(std::make_unique<SwGlossaryDlg>(pViewFrame, pGlosHdl, pWrtShell));
1032 }
1033
CreateFieldInputDlg(weld::Widget * pParent,SwWrtShell & rSh,SwField * pField,bool bPrevButton,bool bNextButton)1034 VclPtr<AbstractFieldInputDlg> SwAbstractDialogFactory_Impl::CreateFieldInputDlg(weld::Widget *pParent,
1035 SwWrtShell &rSh, SwField* pField, bool bPrevButton, bool bNextButton)
1036 {
1037 return VclPtr<AbstractFieldInputDlg_Impl>::Create(std::make_unique<SwFieldInputDlg>(pParent, rSh, pField, bPrevButton, bNextButton));
1038 }
1039
CreateInsFootNoteDlg(weld::Window * pParent,SwWrtShell & rSh,bool bEd)1040 VclPtr<AbstractInsFootNoteDlg> SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg(
1041 weld::Window * pParent, SwWrtShell &rSh, bool bEd )
1042 {
1043 return VclPtr<AbstractInsFootNoteDlg_Impl>::Create(std::make_unique<SwInsFootNoteDlg>(pParent, rSh, bEd));
1044 }
1045
CreateTitlePageDlg(weld::Window * pParent)1046 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateTitlePageDlg(weld::Window *pParent)
1047 {
1048 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwTitlePageDlg>(pParent));
1049 }
1050
CreateVclSwViewDialog(SwView & rView)1051 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateVclSwViewDialog(SwView& rView)
1052 {
1053 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwLineNumberingDlg>(rView));
1054 }
1055
CreateInsTableDlg(SwView & rView)1056 std::shared_ptr<AbstractInsTableDlg> SwAbstractDialogFactory_Impl::CreateInsTableDlg(SwView& rView)
1057 {
1058 return std::make_shared<AbstractInsTableDlg_Impl>(std::make_shared<SwInsTableDlg>(rView));
1059 }
1060
CreateJavaEditDialog(weld::Window * pParent,SwWrtShell * pWrtSh)1061 VclPtr<AbstractJavaEditDialog> SwAbstractDialogFactory_Impl::CreateJavaEditDialog(
1062 weld::Window* pParent, SwWrtShell* pWrtSh)
1063 {
1064 return VclPtr<AbstractJavaEditDialog_Impl>::Create(std::make_unique<SwJavaEditDialog>(pParent, pWrtSh));
1065 }
1066
CreateMailMergeDlg(weld::Window * pParent,SwWrtShell & rSh,const OUString & rSourceName,const OUString & rTableName,sal_Int32 nCommandType,const uno::Reference<sdbc::XConnection> & xConnection)1067 VclPtr<AbstractMailMergeDlg> SwAbstractDialogFactory_Impl::CreateMailMergeDlg(
1068 weld::Window* pParent, SwWrtShell& rSh,
1069 const OUString& rSourceName,
1070 const OUString& rTableName,
1071 sal_Int32 nCommandType,
1072 const uno::Reference< sdbc::XConnection>& xConnection )
1073 {
1074 return VclPtr<AbstractMailMergeDlg_Impl>::Create(std::make_unique<SwMailMergeDlg>(pParent, rSh, rSourceName, rTableName, nCommandType, xConnection, nullptr));
1075 }
1076
CreateMailMergeCreateFromDlg(weld::Window * pParent)1077 VclPtr<AbstractMailMergeCreateFromDlg> SwAbstractDialogFactory_Impl::CreateMailMergeCreateFromDlg(weld::Window* pParent)
1078 {
1079 return VclPtr<AbstractMailMergeCreateFromDlg_Impl>::Create(std::make_unique<SwMailMergeCreateFromDlg>(pParent));
1080 }
1081
CreateMailMergeFieldConnectionsDlg(weld::Window * pParent)1082 VclPtr<AbstractMailMergeFieldConnectionsDlg> SwAbstractDialogFactory_Impl::CreateMailMergeFieldConnectionsDlg(weld::Window* pParent)
1083 {
1084 return VclPtr<AbstractMailMergeFieldConnectionsDlg_Impl>::Create(std::make_unique<SwMailMergeFieldConnectionsDlg>(pParent));
1085 }
1086
CreateMultiTOXMarkDlg(weld::Window * pParent,SwTOXMgr & rTOXMgr)1087 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXMarkDlg(weld::Window* pParent, SwTOXMgr &rTOXMgr)
1088 {
1089 return VclPtr<AbstractMultiTOXMarkDlg_Impl>::Create(std::make_unique<SwMultiTOXMarkDlg>(pParent, rTOXMgr));
1090 }
1091
CreateSvxNumBulletTabDialog(weld::Window * pParent,const SfxItemSet * pSwItemSet,SwWrtShell & rWrtSh)1092 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateSvxNumBulletTabDialog(weld::Window* pParent,
1093 const SfxItemSet* pSwItemSet,
1094 SwWrtShell & rWrtSh)
1095 {
1096 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwSvxNumBulletTabDialog>(pParent, pSwItemSet, rWrtSh));
1097 }
1098
CreateOutlineTabDialog(weld::Window * pParent,const SfxItemSet * pSwItemSet,SwWrtShell & rWrtSh)1099 VclPtr<SfxAbstractTabDialog> SwAbstractDialogFactory_Impl::CreateOutlineTabDialog(weld::Window* pParent,
1100 const SfxItemSet* pSwItemSet,
1101 SwWrtShell & rWrtSh )
1102 {
1103 return VclPtr<AbstractTabController_Impl>::Create(std::make_shared<SwOutlineTabDialog>(pParent, pSwItemSet, rWrtSh));
1104 }
1105
CreateMultiTOXTabDialog(weld::Widget * pParent,const SfxItemSet & rSet,SwWrtShell & rShell,SwTOXBase * pCurTOX,bool bGlobal)1106 VclPtr<AbstractMultiTOXTabDialog> SwAbstractDialogFactory_Impl::CreateMultiTOXTabDialog(weld::Widget* pParent, const SfxItemSet& rSet,
1107 SwWrtShell &rShell, SwTOXBase* pCurTOX, bool bGlobal)
1108 {
1109 return VclPtr<AbstractMultiTOXTabDialog_Impl>::Create(std::make_shared<SwMultiTOXTabDialog>(pParent, rSet, rShell, pCurTOX, USHRT_MAX, bGlobal));
1110 }
1111
CreateEditRegionDlg(weld::Window * pParent,SwWrtShell & rWrtSh)1112 VclPtr<AbstractEditRegionDlg> SwAbstractDialogFactory_Impl::CreateEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh)
1113 {
1114 return VclPtr<AbstractEditRegionDlg_Impl>::Create(std::make_shared<SwEditRegionDlg>(pParent, rWrtSh));
1115 }
1116
CreateInsertSectionTabDialog(weld::Window * pParent,const SfxItemSet & rSet,SwWrtShell & rSh)1117 VclPtr<AbstractInsertSectionTabDialog> SwAbstractDialogFactory_Impl::CreateInsertSectionTabDialog(weld::Window* pParent,
1118 const SfxItemSet& rSet, SwWrtShell& rSh)
1119 {
1120 return VclPtr<AbstractInsertSectionTabDialog_Impl>::Create(std::make_shared<SwInsertSectionTabDialog>(pParent, rSet, rSh));
1121 }
1122
CreateIndexMarkFloatDlg(SfxBindings * pBindings,SfxChildWindow * pChild,weld::Window * pParent,SfxChildWinInfo * pInfo)1123 VclPtr<AbstractMarkFloatDlg> SwAbstractDialogFactory_Impl::CreateIndexMarkFloatDlg(
1124 SfxBindings* pBindings,
1125 SfxChildWindow* pChild,
1126 weld::Window *pParent,
1127 SfxChildWinInfo* pInfo )
1128 {
1129 return VclPtr<AbstractIndexMarkFloatDlg_Impl>::Create(std::make_shared<SwIndexMarkFloatDlg>(pBindings, pChild, pParent, pInfo, true/*bNew*/));
1130 }
1131
CreateAuthMarkFloatDlg(SfxBindings * pBindings,SfxChildWindow * pChild,weld::Window * pParent,SfxChildWinInfo * pInfo)1132 VclPtr<AbstractMarkFloatDlg> SwAbstractDialogFactory_Impl::CreateAuthMarkFloatDlg(
1133 SfxBindings* pBindings,
1134 SfxChildWindow* pChild,
1135 weld::Window *pParent,
1136 SfxChildWinInfo* pInfo)
1137 {
1138 return VclPtr<AbstractAuthMarkFloatDlg_Impl>::Create(std::make_shared<SwAuthMarkFloatDlg>(pBindings, pChild, pParent, pInfo, true/*bNew*/));
1139 }
1140
CreateSwWordCountDialog(SfxBindings * pBindings,SfxChildWindow * pChild,weld::Window * pParent,SfxChildWinInfo * pInfo)1141 VclPtr<AbstractSwWordCountFloatDlg> SwAbstractDialogFactory_Impl::CreateSwWordCountDialog(
1142 SfxBindings* pBindings,
1143 SfxChildWindow* pChild,
1144 weld::Window *pParent,
1145 SfxChildWinInfo* pInfo)
1146 {
1147 return VclPtr<AbstractSwWordCountFloatDlg_Impl>::Create(std::make_shared<SwWordCountFloatDlg>(pBindings, pChild, pParent, pInfo));
1148 }
1149
CreateIndexMarkModalDlg(weld::Window * pParent,SwWrtShell & rSh,SwTOXMark * pCurTOXMark)1150 VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateIndexMarkModalDlg(weld::Window *pParent, SwWrtShell& rSh, SwTOXMark* pCurTOXMark )
1151 {
1152 return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_shared<SwIndexMarkModalDlg>(pParent, rSh, pCurTOXMark));
1153 }
1154
CreateMailMergeWizard(SwView & rView,std::shared_ptr<SwMailMergeConfigItem> & rConfigItem)1155 VclPtr<AbstractMailMergeWizard> SwAbstractDialogFactory_Impl::CreateMailMergeWizard(
1156 SwView& rView, std::shared_ptr<SwMailMergeConfigItem>& rConfigItem)
1157 {
1158 #if HAVE_FEATURE_DBCONNECTIVITY
1159 return VclPtr<AbstractMailMergeWizard_Impl>::Create(std::make_shared<SwMailMergeWizard>(rView, rConfigItem));
1160 #else
1161 (void) rView;
1162 (void) rConfigItem;
1163 return nullptr;
1164 #endif
1165 }
1166
GetGlossaryCurrGroupFunc()1167 GlossaryGetCurrGroup SwAbstractDialogFactory_Impl::GetGlossaryCurrGroupFunc()
1168 {
1169 return SwGlossaryDlg::GetCurrGroup;
1170 }
1171
SetGlossaryActGroupFunc()1172 GlossarySetActGroup SwAbstractDialogFactory_Impl::SetGlossaryActGroupFunc()
1173 {
1174 return SwGlossaryDlg::SetActGroup;
1175 }
1176
1177 // Factories for TabPages
GetTabPageCreatorFunc(sal_uInt16 nId)1178 CreateTabPage SwAbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId )
1179 {
1180 CreateTabPage pRet = nullptr;
1181 switch ( nId )
1182 {
1183 case RID_SW_TP_OPTCOMPATIBILITY_PAGE :
1184 pRet = SwCompatibilityOptPage::Create;
1185 break;
1186 case RID_SW_TP_OPTLOAD_PAGE :
1187 pRet = SwLoadOptPage::Create;
1188 break;
1189 case RID_SW_TP_OPTCAPTION_PAGE:
1190 return SwCaptionOptPage::Create;
1191 case RID_SW_TP_CONTENT_OPT:
1192 case RID_SW_TP_HTML_CONTENT_OPT:
1193 pRet = SwContentOptPage::Create;
1194 break;
1195 case RID_SW_TP_OPTSHDWCRSR:
1196 case RID_SW_TP_HTML_OPTSHDWCRSR:
1197 pRet = SwShdwCursorOptionsTabPage::Create;
1198 break;
1199 case RID_SW_TP_REDLINE_OPT :
1200 pRet = SwRedlineOptionsTabPage::Create;
1201 break;
1202 case RID_SW_TP_OPTTEST_PAGE :
1203 #ifdef DBG_UTIL
1204 pRet = SwTestTabPage::Create;
1205 #endif
1206 break;
1207 case TP_OPTPRINT_PAGE :
1208 case RID_SW_TP_HTML_OPTPRINT_PAGE:
1209 case RID_SW_TP_OPTPRINT_PAGE:
1210 pRet = SwAddPrinterTabPage::Create;
1211 break;
1212 case RID_SW_TP_STD_FONT:
1213 case RID_SW_TP_STD_FONT_CJK:
1214 case RID_SW_TP_STD_FONT_CTL:
1215 pRet = SwStdFontTabPage::Create;
1216 break;
1217 case RID_SW_TP_HTML_OPTTABLE_PAGE:
1218 case RID_SW_TP_OPTTABLE_PAGE:
1219 pRet = SwTableOptionsTabPage::Create;
1220 break;
1221 case RID_SW_TP_DOC_STAT :
1222 pRet = SwDocStatPage::Create;
1223 break;
1224 case RID_SW_TP_MAILCONFIG:
1225 pRet = SwMailConfigPage::Create;
1226 break;
1227 case RID_SW_TP_COMPARISON_OPT :
1228 pRet = SwCompareOptionsTabPage::Create;
1229 break;
1230 }
1231
1232 return pRet;
1233 }
1234
ExecuteMMResultSaveDialog(weld::Window * pParent)1235 void SwAbstractDialogFactory_Impl::ExecuteMMResultSaveDialog(weld::Window* pParent)
1236 {
1237 #if HAVE_FEATURE_DBCONNECTIVITY
1238 SwMMResultSaveDialog aDialog(pParent);
1239 aDialog.run();
1240 #else
1241 (void) pParent;
1242 #endif
1243 }
1244
ExecuteMMResultPrintDialog(weld::Window * pParent)1245 void SwAbstractDialogFactory_Impl::ExecuteMMResultPrintDialog(weld::Window* pParent)
1246 {
1247 #if HAVE_FEATURE_DBCONNECTIVITY
1248 SwMMResultPrintDialog aDialog(pParent);
1249 aDialog.run();
1250 #else
1251 (void) pParent;
1252 #endif
1253 }
1254
ExecuteMMResultEmailDialog(weld::Window * pParent)1255 void SwAbstractDialogFactory_Impl::ExecuteMMResultEmailDialog(weld::Window* pParent)
1256 {
1257 #if HAVE_FEATURE_DBCONNECTIVITY
1258 SwMMResultEmailDialog aDialog(pParent);
1259 aDialog.run();
1260 #else
1261 (void) pParent;
1262 #endif
1263 }
1264
1265 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
1266