23 pSfxBindings, pChildWindow, pParent, rViewData,
24 "modules/scalc/ui/movingaveragedialog.ui",
25 "MovingAverageDialog")
26 , mxTrimRangeCheck(m_xBuilder->weld_check_button(
"trimrange-check"))
27 , mxIntervalSpin(m_xBuilder->weld_spin_button(
"interval-spin"))
42 return STR_MOVING_AVERAGE_UNDO_NAME;
54 std::unique_ptr<DataRangeIterator> pIterator;
61 const bool aCentral =
true;
63 for( ; pIterator->hasNext(); pIterator->next() )
73 aTemplate.
applyNumber(
u"%NUMBER%", pIterator->index() + 1);
78 std::vector<OUString> aFormulas;
80 for (; aDataCellIterator.
hasNext(); aDataCellIterator.
next())
87 sal_Int32 aHalf = aIntervalSize / 2;
88 sal_Int32 aHalfRemainder = aIntervalSize % 2;
89 aIntervalStart = aDataCellIterator.
getRelative(-aHalf);
90 aIntervalEnd = aDataCellIterator.
getRelative(aHalf - 1 + aHalfRemainder);
94 aIntervalStart = aDataCellIterator.
getRelative(-aIntervalSize);
106 aFormulas.push_back(
"=#N/A");
void writeBoldString(const OUString &aString)
void writeFormulas(const std::vector< OUString > &rFormulas)
ScAddress mMaximumAddress
ScAddress mMinimumAddress
static sal_uInt16 GetChildWindowId()
ScAddress getRelative(int aDelta)
bool GetDataAreaSubrange(ScRange &rRange) const
Returns true if there is a non-empty subrange in the range given as input.
ScMovingAverageDialog(SfxBindings *pB, SfxChildWindow *pCW, weld::Window *pParent, ScViewData &rViewData)
virtual ~ScMovingAverageDialog() override
virtual TranslateId GetUndoNameId() override
virtual ScRange ApplyOutput(ScDocShell *pDocShell) override
std::unique_ptr< weld::SpinButton > mxIntervalSpin
virtual void Close() override
std::unique_ptr< weld::CheckButton > mxTrimRangeCheck
bool DoClose(sal_uInt16 nId)
OUString ScResId(TranslateId aId)
formula::FormulaGrammar::AddressConvention eConv