40 , m_bDocumentLoad(false)
41 , m_xConfigItem(
std::move(xItem))
42 , m_sStarting(
SwResId(ST_STARTING))
43 , m_sDocumentType(
SwResId(ST_DOCUMENTTYPE))
44 , m_sAddressBlock(
SwResId(ST_ADDRESSBLOCK))
45 , m_sAddressList(
SwResId(ST_ADDRESSLIST))
46 , m_sGreetingsLine(
SwResId(ST_GREETINGSLINE))
89 OUString sIdent(OUString::number(_nState));
92 std::unique_ptr<vcl::OWizardPage> xRet;
96 xRet = std::make_unique<SwMailMergeDocSelectPage>(pPageContainer,
this);
105 xRet = std::make_unique<SwMailMergeOutputTypePage>(pPageContainer,
this);
109 xRet = std::make_unique<SwMailMergeAddressBlockPage>(pPageContainer,
this);
110 SetRoadmapHelpId(
"modules/swriter/ui/mmaddressblockpage/MMAddressBlockPage");
113 xRet = std::make_unique<SwMailMergeGreetingsPage>(pPageContainer,
this);
117 xRet = std::make_unique<SwMailMergeLayoutPage>(pPageContainer,
this);
124 OSL_ENSURE(xRet,
"no page created in ::createPage");
141 bool bEnablePrev =
true;
142 bool bEnableNext =
true;
150 if(!sDataSourceName.isEmpty() &&
203 const sal_uInt16 nCurPage =
m_xAssistant->get_current_page();
207 bool bAddressFieldsConfigured = !
m_xConfigItem->IsOutputToLetter() ||
210 bool bGreetingFieldsConfigured = !
m_xConfigItem->IsGreetingLine(
false) ||
222 bAddressFieldsConfigured &&
223 bGreetingFieldsConfigured;
235 bEnable = bEnableOutputTypePage;
245 bAddressFieldsConfigured;
248 bEnable = bCanFinish &&
259 OSL_FAIL(
"SwMailMergeWizard cannot be executed via Dialog::Execute!\n"
260 "It creates a thread (MailDispatcher instance) that will call"
261 "back to VCL apartment => deadlock!\n"
262 "Use Dialog::StartExecuteAsync to execute the dialog!" );
virtual ~SwMailMergeWizard() override
OUString m_sGreetingsLine
SwMailMergeWizard(SwView &rView, std::shared_ptr< SwMailMergeConfigItem > xConfigItem)
virtual void enterState(WizardState _nState) override
virtual OUString getStateDisplayName(WizardState _nState) const override
std::shared_ptr< SwMailMergeConfigItem > m_xConfigItem
virtual short run() override
virtual std::unique_ptr< BuilderPage > createPage(WizardState _nState) override
sal_uInt16 m_nRestartPage
OUString GetDataSourceName() const
static bool IsDataSourceAvailable(const OUString sDataSourceName)
virtual bool commitPage(WizardTypes::CommitPageReason _eReason) override
void SetRoadmapHelpId(const OUString &_rId)
void declarePath(RoadmapWizardTypes::PathId _nPathId, const RoadmapWizardTypes::WizardPath &_lWizardStates)
virtual void enterState(WizardTypes::WizardState nState) override
void enableState(WizardTypes::WizardState nState, bool _bEnable=true)
std::unique_ptr< weld::Button > m_xNextPage
void defaultButton(WizardButtonFlags _nWizardButtonFlags)
std::unique_ptr< weld::Button > m_xPrevPage
virtual void ActivatePage()
void enableButtons(WizardButtonFlags _nWizardButtonFlags, bool _bEnable)
std::unique_ptr< weld::Button > m_xFinish
void setTitleBase(const OUString &_rTitleBase)
BuilderPage * GetPage(WizardTypes::WizardState eState) const
std::unique_ptr< weld::Assistant > m_xAssistant
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
constexpr OUStringLiteral HID_MM_NEXT_PAGE
constexpr OUStringLiteral HID_MM_PREV_PAGE
#define MM_DOCUMENTSELECTPAGE
#define MM_ADDRESSBLOCKPAGE
#define MM_OUTPUTTYPETPAGE
#define RET_REMOVE_TARGET
OUString SwResId(TranslateId aId)