43#define STATE_CHARTTYPE STATE_FIRST
44#define STATE_SIMPLE_RANGE 1
45#define STATE_DATA_SERIES 2
46#define STATE_OBJECTS 3
47#define STATE_LAST STATE_OBJECTS
50 uno::Reference<uno::XComponentContext> xContext)
51 :
vcl::RoadmapWizardMachine(pParent)
52 , m_xChartModel(xChartModel,
uno::UNO_QUERY)
54 , m_pTemplateProvider(nullptr)
55 , m_aTimerTriggeredControllerLock(xChartModel)
58 m_pDialogModel.reset(
new DialogModel(m_xChartModel));
59 defaultButton(WizardButtonFlags::FINISH);
61 setTitleBase(
SchResId(STR_DLG_CHART_WIZARD));
64 m_pTemplateProvider =
static_cast<ChartTypeTabPage*
>(GetOrCreatePage(
STATE_CHARTTYPE));
65 assert(m_pTemplateProvider &&
"must exist");
66 m_pDialogModel->setTemplate(m_pTemplateProvider->getCurrentTemplate());
80 if (!m_pDialogModel->getModel().isDataFromSpreadsheet())
89 m_xAssistant->set_current_page(0);
92CreationWizard::~CreationWizard() =
default;
94std::unique_ptr<BuilderPage> CreationWizard::createPage(
WizardState nState)
96 std::unique_ptr<vcl::OWizardPage> xRet;
98 OUString sIdent(OUString::number(
nState));
105 m_aTimerTriggeredControllerLock.startTimer();
106 xRet = std::make_unique<ChartTypeTabPage>(pPageContainer,
this, m_xChartModel);
111 m_aTimerTriggeredControllerLock.startTimer();
112 xRet = std::make_unique<RangeChooserTabPage>(pPageContainer,
this, *m_pDialogModel, m_pTemplateProvider);
117 m_aTimerTriggeredControllerLock.startTimer();
118 xRet = std::make_unique<DataSourceTabPage>(pPageContainer,
this, *m_pDialogModel, m_pTemplateProvider);
123 xRet = std::make_unique<TitlesAndObjectsTabPage>(pPageContainer,
this, m_xChartModel,
m_xComponentContext);
124 m_aTimerTriggeredControllerLock.startTimer();
132 xRet->SetPageTitle(OUString());
149 while( !isStateEnabled( nNextState ) && nNextState <=
STATE_LAST )
156 m_aTimerTriggeredControllerLock.startTimer();
159 if( isStateEnabled(
nState ))
165 if (pTabPage == m_pCurTabPage)
166 m_bCanTravel =
false;
171 if (pTabPage == m_pCurTabPage)
175OUString CreationWizard::getStateDisplayName(
WizardState nState )
const
181 pResId = STR_PAGE_CHARTTYPE;
184 pResId = STR_PAGE_DATA_RANGE;
187 pResId = STR_OBJECT_DATASERIES_PLURAL;
190 pResId = STR_PAGE_CHART_ELEMENTS;
virtual void enterState(WizardTypes::WizardState nState) override
#define STATE_DATA_SERIES
#define STATE_SIMPLE_RANGE
Reference< XComponentContext > const m_xComponentContext
constexpr OUStringLiteral HID_SCH_WIZARD_ROADMAP
OUString OOO_DLLPUBLIC_CHARTTOOLS SchResId(TranslateId aId)
::std::vector< WizardTypes::WizardState > WizardPath
#define WZS_INVALID_STATE