20#undef SC_DLLIMPLEMENTATION
28#include <document.hxx>
42 const SCSIZE nSelectHeight,
45 : GenericDialogController(pParent,
"modules/scalc/ui/filldlg.ui",
"FillSeriesDialog")
46 , aStartStrVal(
std::move(aStartStr))
47 , aErrMsgInvalidVal(
ScResId(SCSTR_VALERR))
49 , theFillDir(eFillDir)
50 , theFillCmd(eFillCmd)
51 , theFillDateCmd(eFillDateCmd)
54 , m_nSelectHeight(nSelectHeight)
55 , m_nSelectWidth(nSelectWidth)
56 , m_xFtStartVal(m_xBuilder->weld_label(
"startL"))
57 , m_xEdStartVal(m_xBuilder->weld_entry(
"startValue"))
58 , m_xFtEndVal(m_xBuilder->weld_label(
"endL"))
59 , m_xEdEndVal(m_xBuilder->weld_entry(
"endValue"))
60 , m_xFtIncrement(m_xBuilder->weld_label(
"incrementL"))
61 , m_xEdIncrement(m_xBuilder->weld_entry(
"increment"))
62 , m_xBtnDown(m_xBuilder->weld_radio_button(
"down"))
63 , m_xBtnRight(m_xBuilder->weld_radio_button(
"right"))
64 , m_xBtnUp(m_xBuilder->weld_radio_button(
"up"))
65 , m_xBtnLeft(m_xBuilder->weld_radio_button(
"left"))
66 , m_xBtnArithmetic(m_xBuilder->weld_radio_button(
"linear"))
67 , m_xBtnGeometric(m_xBuilder->weld_radio_button(
"growth"))
68 , m_xBtnDate(m_xBuilder->weld_radio_button(
"date"))
69 , m_xBtnAutoFill(m_xBuilder->weld_radio_button(
"autofill"))
70 , m_xFtTimeUnit(m_xBuilder->weld_label(
"tuL"))
71 , m_xBtnDay(m_xBuilder->weld_radio_button(
"day"))
72 , m_xBtnDayOfWeek(m_xBuilder->weld_radio_button(
"week"))
73 , m_xBtnMonth(m_xBuilder->weld_radio_button(
"month"))
74 , m_xBtnYear(m_xBuilder->weld_radio_button(
"year"))
75 , m_xBtnOk(m_xBuilder->weld_button(
"ok"))
190 if ( !aStartStr.isEmpty()
194 if ( !aIncStr.isEmpty()
197 if ( !aEndStr.isEmpty()
202 && aStartStr.isEmpty() != aIncStr.isEmpty()
207 if ( aStartStr.isEmpty() )
209 if ( aIncStr.isEmpty() && nStepAmount != 0 )
216 if ( aIncStr.isEmpty() )
218 if ( aEndStr.isEmpty() )
227 if (&rBtn == m_xBtnDate.get())
229 m_xBtnDay->set_sensitive(
true);
230 m_xBtnDayOfWeek->set_sensitive(
true);
231 m_xBtnMonth->set_sensitive(
true);
232 m_xBtnYear->set_sensitive(
true);
233 m_xFtTimeUnit->set_sensitive(
true);
237 m_xBtnDay->set_sensitive(
false);
238 m_xBtnDayOfWeek->set_sensitive(
false);
239 m_xBtnMonth->set_sensitive(
false);
240 m_xBtnYear->set_sensitive(
false);
241 m_xFtTimeUnit->set_sensitive(
false);
244 if (&rBtn != m_xBtnAutoFill.get())
246 m_xFtIncrement->set_sensitive(
true);
247 m_xEdIncrement->set_sensitive(
true);
248 m_xFtEndVal->set_sensitive(
true);
249 m_xEdEndVal->set_sensitive(
true);
253 m_xFtIncrement->set_sensitive(
false);
254 m_xEdIncrement->set_sensitive(
false);
255 m_xFtEndVal->set_sensitive(
false);
256 m_xEdEndVal->set_sensitive(
false);
262 if ( m_xBtnLeft->get_active() ) theFillDir =
FILL_TO_LEFT;
263 else if ( m_xBtnRight->get_active() ) theFillDir =
FILL_TO_RIGHT;
265 else if ( m_xBtnUp->get_active() ) theFillDir =
FILL_TO_TOP;
267 if ( m_xBtnArithmetic->get_active() ) theFillCmd =
FILL_LINEAR;
268 else if ( m_xBtnGeometric->get_active() ) theFillCmd =
FILL_GROWTH;
269 else if ( m_xBtnDate->get_active() ) theFillCmd =
FILL_DATE;
270 else if ( m_xBtnAutoFill->get_active() ) theFillCmd =
FILL_AUTO;
272 if ( m_xBtnDay->get_active() ) theFillDateCmd =
FILL_DAY;
273 else if ( m_xBtnDayOfWeek->get_active() ) theFillDateCmd =
FILL_WEEKDAY;
274 else if ( m_xBtnMonth->get_active() ) theFillDateCmd =
FILL_MONTH;
275 else if ( m_xBtnYear->get_active() ) theFillDateCmd =
FILL_YEAR;
278 if ( pEdWrong ==
nullptr )
285 VclButtonsType::Ok, aErrMsgInvalidVal));
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Reference< XExecutableDialog > m_xDialog
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
const SCSIZE m_nSelectHeight
void SetEdStartValEnabled(bool bFlag)
std::unique_ptr< weld::RadioButton > m_xBtnYear
const OUString aStartStrVal
std::unique_ptr< weld::RadioButton > m_xBtnAutoFill
std::unique_ptr< weld::RadioButton > m_xBtnDay
std::unique_ptr< weld::Entry > m_xEdIncrement
std::unique_ptr< weld::RadioButton > m_xBtnArithmetic
std::unique_ptr< weld::RadioButton > m_xBtnLeft
std::unique_ptr< weld::RadioButton > m_xBtnUp
void Init(sal_uInt16 nPossDir)
FillDateCmd theFillDateCmd
std::unique_ptr< weld::RadioButton > m_xBtnGeometric
const SCSIZE m_nSelectWidth
std::unique_ptr< weld::RadioButton > m_xBtnDown
std::unique_ptr< weld::RadioButton > m_xBtnMonth
std::unique_ptr< weld::Entry > m_xEdEndVal
std::unique_ptr< weld::RadioButton > m_xBtnRight
std::unique_ptr< weld::Label > m_xFtStartVal
std::unique_ptr< weld::RadioButton > m_xBtnDate
std::unique_ptr< weld::RadioButton > m_xBtnDayOfWeek
std::unique_ptr< weld::Entry > m_xEdStartVal
weld::Entry * CheckValues()
std::unique_ptr< weld::Button > m_xBtnOk
ScFillSeriesDlg(weld::Window *pParent, ScDocument &rDocument, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd, OUString aStartStr, double fStep, double fMax, SCSIZE nSelectHeight, SCSIZE nSelectWidth, sal_uInt16 nPossDir)
virtual ~ScFillSeriesDlg() override
IMPL_LINK(ScFillSeriesDlg, DisableHdl, weld::Toggleable &, rBtn, void)
IMPL_LINK_NOARG(ScFillSeriesDlg, OKHdl, weld::Button &, void)
#define LINK(Instance, Class, Member)
OUString ScResId(TranslateId aId)