21 u"modules/scalc/ui/sparklinedatarangedialog.ui",
22 "SparklineDataRangeDialog")
23 , mrViewData(rViewData)
24 , mrDocument(rViewData.GetDocument())
25 , mpActiveEdit(nullptr)
26 , mbDialogLostFocus(false)
27 , mxButtonOk(m_xBuilder->weld_button(
"ok"))
28 , mxButtonCancel(m_xBuilder->weld_button(
"cancel"))
29 , mxDataRangeLabel(m_xBuilder->weld_label(
"cell-range-label"))
30 , mxDataRangeEdit(new
formula::RefEdit(m_xBuilder->weld_entry(
"cell-range-edit")))
31 , mxDataRangeButton(new
formula::RefButton(m_xBuilder->weld_button(
"cell-range-button")))
73 if (!aRangeList.
empty())
109 if (rReferenceRange.
aStart != rReferenceRange.
aEnd)
127 if (mxDataRangeEdit.get() == &rEdit)
128 mpActiveEdit = mxDataRangeEdit.get();
130 mpActiveEdit =
nullptr;
133 mpActiveEdit->SelectAll();
138 if (mxDataRangeButton.get() == &rButton)
139 mpActiveEdit = mxDataRangeEdit.get();
141 mpActiveEdit =
nullptr;
144 mpActiveEdit->SelectAll();
149 mbDialogLostFocus = !
m_xDialog->has_toplevel_focus();
154 mbDialogLostFocus = !
m_xDialog->has_toplevel_focus();
161 if (mpActiveEdit == mxDataRangeEdit.get())
164 bool bValid = ParseWithNames(aRangeList, mxDataRangeEdit->GetText(), mrDocument);
165 const ScRange* pRange = (bValid && aRangeList.
size() == 1) ? &aRangeList[0] :
nullptr;
168 maDataRange = *pRange;
169 mxDataRangeEdit->StartUpdateData();
181 if (mxButtonOk.get() == &rButton)
Reference< XExecutableDialog > m_xDialog
static sal_uInt16 GetChildWindowId()
SC_DLLPUBLIC bool ChangeSparkline(std::shared_ptr< sc::Sparkline > const &rpSparkline, SCTAB nTab, ScRangeList const &rDataRange)
SC_DLLPUBLIC std::shared_ptr< sc::Sparkline > GetSparkline(ScAddress const &rPosition)
Returns sparkline at the address if it exists.
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
virtual void RefInputStart(formula::RefEdit *pEdit, formula::RefButton *pButton=nullptr) override
virtual void RefInputDone(bool bForced=false) override
bool DoClose(sal_uInt16 nId)
ScDocShell * GetDocShell() const
ScAddress GetCurPos() const
Dialog to change input data range for a sparkline
SparklineDataRangeDialog(SfxBindings *pBindings, SfxChildWindow *pChildWindow, weld::Window *pWindow, ScViewData &rViewData)
std::unique_ptr< weld::Label > mxDataRangeLabel
std::shared_ptr< sc::Sparkline > mpSparkline
formula::RefEdit * mpActiveEdit
void SetReference(const ScRange &rRef, ScDocument &rDocument) override
std::unique_ptr< formula::RefEdit > mxDataRangeEdit
virtual ~SparklineDataRangeDialog() override
std::unique_ptr< weld::Button > mxButtonOk
std::unique_ptr< formula::RefButton > mxDataRangeButton
void SetActive() override
std::unique_ptr< weld::Button > mxButtonCancel
#define LINK(Instance, Class, Member)
CAUTION! The following defines must be in the same namespace as the respective type.
IMPL_LINK_NOARG(SharedStringPoolPurge, timerHandler, Timer *, void)
IMPL_LINK(SearchResultsDlg, HeaderBarClick, int, nColumn, void)