24#include <svx/svxids.hrc>
28#include <osl/diagnose.h>
33#include <document.hxx>
48 if (pPaintHint->GetStartTab() <= nTab && pPaintHint->GetEndTab() >= nTab)
61 PaintArea( pPaintHint->GetStartCol(), pPaintHint->GetStartRow(),
62 pPaintHint->GetEndCol(), pPaintHint->GetEndRow() );
64 PaintArea( pPaintHint->GetStartCol(), pPaintHint->GetStartRow(),
67 PaintLeftArea( pPaintHint->GetStartRow(), pPaintHint->GetEndRow() );
69 PaintTopArea( pPaintHint->GetStartCol(), pPaintHint->GetEndCol() );
78 else if (
auto pEditViewHint =
dynamic_cast<const ScEditViewHint*
>(&rHint))
83 if ( pEditViewHint->GetTab() == nTab )
85 SCCOL nCol = pEditViewHint->GetCol();
86 SCROW nRow = pEditViewHint->GetRow();
108 else if (
auto pTablesHint =
dynamic_cast<const ScTablesHint*
>(&rHint))
113 SCTAB nTab1 = pTablesHint->GetTab1();
114 SCTAB nTab2 = pTablesHint->GetTab2();
115 sal_uInt16
nId = pTablesHint->GetTablesHintId();
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 );
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;
329 eValType = SvxNumberValueType::Number;
336 eValType = SvxNumberValueType::String;
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>(
void UpdatePendingRowHeights(SCTAB nUpdateTab, bool bBefore=false)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
SC_DLLPUBLIC SCTAB GetTableCount() const
static void UpdateNumberFormatter(const SvxNumberInfoItem &rInfoItem)
void SetEditShell(EditView *pView, bool bActive)
static std::unique_ptr< SvxNumberInfoItem > MakeNumberInfoItem(ScDocument &rDoc, const ScViewData &rViewData)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
void PaintTopArea(SCCOL nStartCol, SCCOL nEndCol)
void MakeDrawView(TriState nForceDesignMode)
void MakeEditView(ScEditEngineDefaulter *pEngine, SCCOL nCol, SCROW nRow)
ScViewSelectionEngine * GetSelEngine()
void PaintArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScUpdateMode eMode=ScUpdateMode::All)
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
void UpdateFormulas(SCCOL nStartCol=-1, SCROW nStartRow=-1, SCCOL nEndCol=-1, SCROW nEndRow=-1)
void KillEditView(bool bNoPaint)
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
void PaintRangeFinder(tools::Long nNumber)
void RepeatResize(bool bUpdateFix=true)
void PaintLeftArea(SCROW nStartRow, SCROW nEndRow)
void UpdateInputContext()
SfxDispatcher & GetDispatcher()
void DeleteTabs(SCTAB nTab, SCTAB nSheets)
void DeleteTab(SCTAB nTab)
void InsertTab(SCTAB nTab)
ScDocument & GetDocument() const
ScDocShell * GetDocShell() const
void InsertTabs(SCTAB nTab, SCTAB nNewSheets)
ScSplitPos GetActivePart() const
void GetEditView(ScSplitPos eWhich, EditView *&rViewPtr, SCCOL &rCol, SCROW &rRow)
void CopyTab(SCTAB nSrcTab, SCTAB nDestTab)
SfxObjectShell * GetSfxDocShell() const
ScAddress GetCurPos() const
void MoveTab(SCTAB nSrcTab, SCTAB nDestTab)
void Invalidate(sal_uInt16 nId)
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 * >())
SfxBindings & GetBindings()
SfxViewFrame & GetViewFrame() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
static SAL_WARN_UNUSED_RESULT SfxViewShell * Current()
SvNumberFormatter * GetNumberFormatter() const
const std::vector< sal_uInt32 > & GetDelFormats() const
const OUString & getString() const
constexpr OUStringLiteral IsReadOnly(u"IsReadOnly")
This is very similar to ScCellValue, except that it references the original value instead of copying ...
ScFormulaCell * getFormula() const
const svl::SharedString * getSharedString() const