25 #include <svx/svxids.hrc>
33 #include <document.hxx>
36 #include <uiitems.hxx>
43 if (
const ScPaintHint* pPaintHint = dynamic_cast<const ScPaintHint*>(&rHint))
47 if (pPaintHint->GetStartTab() <= nTab && pPaintHint->GetEndTab() >= nTab)
60 PaintArea( pPaintHint->GetStartCol(), pPaintHint->GetStartRow(),
61 pPaintHint->GetEndCol(), pPaintHint->GetEndRow() );
63 PaintArea( pPaintHint->GetStartCol(), pPaintHint->GetStartRow(),
66 PaintLeftArea( pPaintHint->GetStartRow(), pPaintHint->GetEndRow() );
68 PaintTopArea( pPaintHint->GetStartCol(), pPaintHint->GetEndCol() );
71 if (nParts & ( PaintPartFlags::Left | PaintPartFlags::Top ))
77 else if (
auto pEditViewHint = dynamic_cast<const ScEditViewHint*>(&rHint))
82 if ( pEditViewHint->GetTab() == nTab )
84 SCCOL nCol = pEditViewHint->GetCol();
85 SCROW nRow = pEditViewHint->GetRow();
107 else if (dynamic_cast<const ScTablesHint*>(&rHint))
139 OSL_FAIL(
"unknown ScTablesHint");
145 SCTAB nNewTab = nActiveTab;
146 bool bStayOnActiveTab =
true;
150 if ( nTab1 <= nNewTab )
154 if ( nTab1 < nNewTab )
156 else if ( nTab1 == nNewTab )
157 bStayOnActiveTab =
false;
160 if ( nNewTab == nTab1 )
162 else if ( nTab1 < nTab2 )
164 if ( nNewTab > nTab1 && nNewTab <= nTab2 )
169 if ( nNewTab >= nTab2 && nNewTab < nTab1 )
174 if ( nNewTab >= nTab2 )
178 if ( nTab1 == nNewTab )
179 bStayOnActiveTab =
false;
182 if ( nTab1 <= nNewTab )
186 if ( nTab1 < nNewTab )
195 bool bForce = !bStayOnActiveTab;
196 SetTabNo( nNewTab, bForce,
false, bStayOnActiveTab );
198 else if (
const ScIndexHint* pIndexHint = dynamic_cast<const ScIndexHint*>(&rHint))
201 sal_uInt16
nIndex = pIndexHint->GetIndex();
204 case SfxHintId::ScShowRangeFinder:
215 case SfxHintId::ScDataChanged:
219 case SfxHintId::ScRefModeChanged:
221 bool bRefMode =
SC_MOD()->IsFormulaMode();
229 case SfxHintId::ScKillEditView:
230 case SfxHintId::ScKillEditViewNoPaint:
237 KillEditView( nSlot == SfxHintId::ScKillEditViewNoPaint );
241 case SfxHintId::DocChanged:
251 case SfxHintId::ScDrawLayerNew:
255 case SfxHintId::ScDocSaved:
272 case SfxHintId::ModeChanged:
283 SfxCallMode::ASYNCHRON, { &aItem });
289 case SfxHintId::ScShowRangeFinder:
293 case SfxHintId::ScForceSetTab:
297 case SfxHintId::LanguageChanged:
301 pWin->ResetAutoSpell();
319 double nCellValue = 0;
320 OUString aCellString;
324 switch (aCell.meType)
328 nCellValue = aCell.mfValue;
329 eValType = SvxNumberValueType::Number;
335 aCellString = aCell.mpString->getString();
336 eValType = SvxNumberValueType::String;
342 if (aCell.mpFormula->IsValue())
344 nCellValue = aCell.mpFormula->GetValue();
345 eValType = SvxNumberValueType::Number;
350 eValType = SvxNumberValueType::Undefined;
357 eValType = SvxNumberValueType::Undefined;
362 case SvxNumberValueType::String:
363 return std::make_unique<SvxNumberInfoItem>(
366 SID_ATTR_NUMBERFORMAT_INFO );
368 case SvxNumberValueType::Number:
369 return std::make_unique<SvxNumberInfoItem>(
372 SID_ATTR_NUMBERFORMAT_INFO );
374 case SvxNumberValueType::Undefined:
379 return std::make_unique<SvxNumberInfoItem>(
380 rDoc.
GetFormatTable(),
static_cast<sal_uInt16
>(SID_ATTR_NUMBERFORMAT_INFO));
SfxViewFrame * GetViewFrame() const
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
static void UpdateNumberFormatter(const SvxNumberInfoItem &rInfoItem)
ScDocShell * GetDocShell() const
void UpdatePendingRowHeights(SCTAB nUpdateTab, bool bBefore=false)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
void UpdateInputContext()
void InsertTabs(SCTAB nTab, SCTAB nNewSheets)
void RepeatResize(bool bUpdateFix=true)
ScSplitPos GetActivePart() const
ScDocument & GetDocument() const
This is very similar to ScCellValue, except that it references the original value instead of copying ...
void Invalidate(sal_uInt16 nId)
const std::vector< sal_uInt32 > & GetDelFormats() const
static std::unique_ptr< SvxNumberInfoItem > MakeNumberInfoItem(ScDocument &rDoc, const ScViewData &rViewData)
void KillEditView(bool bNoPaint)
void PaintLeftArea(SCROW nStartRow, SCROW nEndRow)
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
SC_DLLPUBLIC SCTAB GetTableCount() const
void PaintRangeFinder(tools::Long nNumber)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
static SfxViewShell * Current()
void UpdateFormulas(SCCOL nStartCol=-1, SCROW nStartRow=-1, SCCOL nEndCol=-1, SCROW nEndRow=-1)
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
void PaintArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScUpdateMode eMode=ScUpdateMode::All)
void InsertTab(SCTAB nTab)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
void DeleteTab(SCTAB nTab)
SfxBindings & GetBindings()
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
void DeleteTabs(SCTAB nTab, SCTAB nSheets)
void MakeEditView(ScEditEngineDefaulter *pEngine, SCCOL nCol, SCROW nRow)
void MoveTab(SCTAB nSrcTab, SCTAB nDestTab)
ScAddress GetCurPos() const
SvNumberFormatter * GetNumberFormatter() const
sal_uInt16 GetTablesHintId() const
SfxDispatcher & GetDispatcher()
ScViewSelectionEngine * GetSelEngine()
SfxObjectShell * GetSfxDocShell() const
void PaintTopArea(SCCOL nStartCol, SCCOL nEndCol)
void CopyTab(SCTAB nSrcTab, SCTAB nDestTab)
void SetEditShell(EditView *pView, bool bActive)
void GetEditView(ScSplitPos eWhich, EditView *&rViewPtr, SCCOL &rCol, SCROW &rRow)
void MakeDrawView(TriState nForceDesignMode)