31#define SC_SIZE_NONE 65535
74 SC_MARK_MULTI_FILTERED =
124 static_assert(std::numeric_limits<index_type>::is_signed,
"ScPositionCache: index type is not signed");
251 css::uno::Sequence <css::beans::PropertyValue>& rSettings,
255 const css::uno::Sequence <css::beans::PropertyValue>& rSettings,
275 ::std::vector<std::unique_ptr<ScViewDataTable>>
maTabData;
281 std::unique_ptr<EditView> pEditView[4];
323 bool bEditActive[4] = {};
340 SAL_DLLPRIVATE
void CalcPPT();
341 SAL_DLLPRIVATE
void CreateTabData(
SCTAB nNewTab );
342 SAL_DLLPRIVATE
void CreateTabData( std::vector< SCTAB >& rvTabs );
343 SAL_DLLPRIVATE
void CreateSelectedTabData();
344 SAL_DLLPRIVATE
void EnsureTabDataSize(
size_t nSize);
345 SAL_DLLPRIVATE
void UpdateCurrentTab();
371 void UpdateInputHandler(
bool bForce =
false );
373 void WriteUserData(OUString& rData);
374 void ReadUserData(std::u16string_view rData);
377 void WriteUserDataSequence(css::uno::Sequence <css::beans::PropertyValue>& rSettings)
const;
378 void ReadUserDataSequence(
const css::uno::Sequence <css::beans::PropertyValue>& rSettings);
383 void Activate(
bool bActivate) { bActive = bActivate; }
385 void InsertTab(
SCTAB nTab );
386 void InsertTabs(
SCTAB nTab,
SCTAB nNewSheets );
387 void DeleteTab(
SCTAB nTab );
389 void CopyTab(
SCTAB nSrcTab,
SCTAB nDestTab );
390 void MoveTab(
SCTAB nSrcTab,
SCTAB nDestTab );
405 SCCOL GetOldCurX()
const;
406 SCROW GetOldCurY()
const;
433 void SetCurXForTab(
SCCOL nNewCurX,
SCTAB nTabIndex );
434 void SetCurYForTab(
SCCOL nNewCurY,
SCTAB nTabIndex );
435 void SetOldCursor(
SCCOL nNewX,
SCROW nNewY );
436 void ResetOldCursor();
444 void SetMaxTiledCol(
SCCOL nCol );
445 void SetMaxTiledRow(
SCROW nRow );
447 void SetPagebreakMode(
bool bSet );
451 void SetZoomType(
SvxZoomType eNew, std::vector< SCTAB >& tabs );
462 void SetShowGrid(
bool bShow );
474 nLines = std::max(nLines,
static_cast<sal_Int16
>(1));
475 nLines = std::min(nLines,
static_cast<sal_Int16
>(25));
476 nFormulaBarLines = nLines;
487 bool SimpleColMarked();
488 bool SimpleRowMarked();
490 bool IsMultiMarked()
const;
497 bool SelectionForbidsPaste(
ScDocument* pClipDoc =
nullptr );
498 bool SelectionForbidsPaste(
SCCOL nSrcCols,
SCROW nSrcRows );
504 bool SelectionForbidsCellFill();
506 static bool SelectionFillDOOM(
const ScRange& rRange );
511 void GetFillData(
SCCOL& rStartCol,
SCROW& rStartRow,
513 void ResetFillMode();
526 bool bTestMerge =
true,
bool bRepair =
false,
SCTAB nForTab = -1 );
528 SCCOL nPosX,
SCROW nPosY,
bool& rLeft,
bool& rTop );
540 { bIsRefMode = bNewMode; eRefType = eNewType; }
547 { aDelRange = rRange; bDelMarkValid =
true; }
550 { rRange = aDelRange;
return bDelMarkValid; }
552 inline void GetMoveCursor(
SCCOL& rCurX,
SCROW& rCurY );
577 void ResetEditView();
583 {
return pEditView[eWhich] && bEditActive[eWhich]; }
585 {
return pEditView[eWhich].get(); }
600 void EditGrowY(
bool bInitial =
false );
611 const ScPatternAttr* pPattern,
bool bForceToTop,
bool bInPrintTwips =
false );
613 void SetTabNo(
SCTAB nNewTab );
617 bool bAllowNeg =
false,
SCTAB nForTab = -1 )
const;
622 Point GetPrintTwipsPosFromTileTwips(
const Point& rTileTwipsPos)
const;
627 OString describeCellCursorAt(
SCCOL nCol,
SCROW nRow,
bool bPixelAligned =
true )
const;
640 void SetScreenPos(
const Point& rVisAreaStart );
653 void UpdateOutlinerFlags(
Outliner& rOutl )
const;
655 Point GetMousePosPixel();
670 SCCOLROW GetLOKSheetFreezeIndex(
bool bIsCol)
const;
671 bool SetLOKSheetFreezeIndex(
const SCCOLROW nFreezeIndex,
bool bIsCol,
SCTAB nForTab = -1);
672 bool RemoveLOKFreeze();
673 void DeriveLOKFreezeAllSheets();
674 void DeriveLOKFreezeIfNeeded(
SCTAB nForTab);
679 static inline tools::Long ToPixel( sal_uInt16 nTwips,
double nFactor );
703 if ( !nRet && nTwips )
css::chart::ChartAxisLabelPosition ePos
void GetIndexAndPos(index_type nNearestIndex, tools::Long nNearestPosition, tools::Long nBound, index_type &nFoundIndex, tools::Long &nPosition, bool bTowards, tools::Long nDiff)
void GetIndexTowards(index_type nNearestIndex, tools::Long nNearestPosition, tools::Long nBound, index_type &nFoundIndex, tools::Long &nPosition, bool bTowards)
ScBoundsProvider(const ScViewData &rView, SCTAB nT, bool bColumnHeader)
ScPositionHelper::value_type value_type
tools::Long nSecondPositionPx
void EnlargeBy(tools::Long nOffset)
void EnlargeStartBy(tools::Long nOffset)
void GetEndIndexAndPosition(SCCOL &nIndex, tools::Long &nPosition) const
const index_type MAX_INDEX
tools::Long nFirstPositionPx
tools::Long GetSize(index_type nIndex) const
void GeIndexBackwards(index_type nNearestIndex, tools::Long nNearestPosition, tools::Long nBound, index_type &nFoundIndex, tools::Long &nPosition, bool bTowards)
void Compute(value_type aFirstNearest, value_type aSecondNearest, tools::Long nFirstBound, tools::Long nSecondBound)
void EnlargeEndBy(tools::Long nOffset)
void GetStartIndexAndPosition(SCCOL &nIndex, tools::Long &nPosition) const
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SCROW MaxRow() const
Extended options held by an ScDocument containing additional settings for filters.
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
bool operator()(const value_type &rValue1, const value_type &rValue2) const
void removeByIndex(index_type nIndex)
const value_type & getNearestByPosition(tools::Long nPos) const
tools::Long computePosition(index_type nIndex, const std::function< long(index_type)> &getSizePx)
std::set< value_type, Comp > mData
const value_type & getNearestByIndex(index_type nIndex) const
tools::Long getPosition(index_type nIndex) const
std::pair< index_type, tools::Long > value_type
ScPositionHelper(const ScDocument *pDoc, bool bColumn)
void invalidateByPosition(tools::Long nPos)
static const index_type null
void setDocument(const ScDocument &rDoc, bool bColumn)
void invalidateByIndex(index_type nIndex)
void insert(index_type nIndex, tools::Long nPos)
void ReadUserDataSequence(const css::uno::Sequence< css::beans::PropertyValue > &rSettings, ScViewData &rViewData, SCTAB nTab, bool &rHasZoom)
SCROW nPosY[2]
Y position of the top left cell of the visible area.
ScPositionHelper aWidthHelper
SCCOL nPosX[2]
X position of the top left cell of the visible area.
ScSplitPos SanitizeWhichActive() const
Sanitize the active split range value to not point into a grid window that would never be initialized...
void InitData(const ScDocument &rDoc)
void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &rSettings, const ScViewData &rViewData, SCTAB nTab) const
ScViewDataTable(const ScDocument *pDoc=nullptr)
ScPositionHelper aHeightHelper
void SetHSplitPos(tools::Long nPos)
bool IsHeaderMode() const
EditView * GetEditView(ScSplitPos eWhich) const
SCCOL GetEditEndCol() const
SCROW GetEditEndRow() const
void SetHeaderMode(bool bNewMode)
ScFillMode GetFillMode() const
void SetFormulaBarLines(sal_Int16 nLines)
const ScViewOptions & GetOptions() const
void SetSpellingView(EditView *pSpView)
DECL_DLLPRIVATE_LINK(EditEngineHdl, EditStatus &, void)
tools::Long GetPageUpDownOffset() const
SCCOL GetEditViewCol() const
bool IsSyntaxMode() const
SCCOL GetTabStartCol() const
SvxZoomType GetZoomType() const
bool IsOutlineMode() const
void SetFixPosY(SCROW nPos)
const Size & GetScenButSize() const
const Fraction & GetZoomY() const
SCROW GetEditStartRow() const
void SetRefMode(bool bNewMode, ScRefType eNewType)
void SetFixPosX(SCCOL nPos)
SCROW GetMaxTiledRow() const
ScSplitPos eEditActivePart
ScDocument & GetDocument() const
ScPositionHelper & GetLOKHeightHelper()
void GetMoveCursor(SCCOL &rCurX, SCROW &rCurY)
const Size & GetScrSize() const
SCCOL GetRefStartX() const
ScRefType GetRefType() const
SCCOL GetMaxTiledCol() const
ScSplitMode GetHSplitMode() const
SCCOL GetEditStartCol() const
void SetVSplitMode(ScSplitMode eMode)
void ForcePageUpDownOffset(tools::Long nTwips)
Force page size for PgUp/PgDown to overwrite the computation based on m_aVisArea.
void SetVSplitPos(tools::Long nPos)
bool IsSelCtrlMouseClick() const
ScSplitPos GetEditActivePart() const
Point GetPixPos(ScSplitPos eWhich) const
bool ShowPasteSource() const
tools::Long GetLOKDocWidthPixel() const
bool IsVScrollMode() const
void SetDelMark(const ScRange &rRange)
ScTabViewShell * GetViewShell() const
tools::Long GetHSplitPos() const
void setLOKVisibleArea(const tools::Rectangle &rArea)
static tools::Long ToPixel(sal_uInt16 nTwips, double nFactor)
void SetTabStartCol(SCCOL nNew)
void SetEditAdjust(SvxAdjust eNewEditAdjust)
tools::Long m_nLOKPageUpDownOffset
ScSplitPos GetActivePart() const
SCTAB GetRefStartZ() const
ScViewDataTable * pThisTab
::std::vector< std::unique_ptr< ScViewDataTable > > maTabData
bool IsHScrollMode() const
bool GetDelMark(ScRange &rRange) const
ScPositionHelper & GetLOKWidthHelper()
void SetPasteMode(ScPasteFlags nFlags)
bool IsThemedCursor() const
SCROW GetRefStartY() const
OString describeCellCursorInPrintTwips() const
ScSplitMode GetVSplitMode() const
const Fraction & GetZoomX() const
SCTAB GetRefTabNo() const
void SetSelCtrlMouseClick(bool bTmp)
bool IsPagebreakMode() const
void SetScenButSize(const Size &rNew)
SCROW GetEditViewRow() const
OString describeCellCursor() const
return json for our cursor position.
SfxObjectShell * GetSfxDocShell() const
SvxAdjust GetEditAdjust() const
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
tools::Long GetLOKDocHeightPixel() const
tools::Long GetVSplitPos() const
tools::Rectangle maLOKVisibleArea
The visible area in the LibreOfficeKit client.
void SetRefTabNo(SCTAB nNewTab)
EditView * GetSpellingView() const
bool HasEditView(ScSplitPos eWhich) const
void SetHSplitMode(ScSplitMode eMode)
void SetSyntaxMode(bool bNewMode)
sal_Int16 nFormulaBarLines
void Activate(bool bActivate)
void SetCurX(SCCOL nNewCurX)
bool IsAnyFillMode() const
void SetCurY(SCROW nNewCurY)
sal_Int16 GetFormulaBarLines() const
void SetOption(ScViewOption eOpt, bool bNew)
bool GetOption(ScViewOption eOpt) const
virtual SfxBindings & GetBindings() override
SfxDispatcher * GetDispatcher()
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
ScHSplitPos WhichH(ScSplitPos ePos)
ScMarkType
States GetSimpleArea() returns for the underlying selection marks, so the caller can react if the res...
@ SC_MARK_SIMPLE_FILTERED
ScFollowMode
Screen behavior related to cursor movements.
ScRefType
Mouse mode to select areas.
ScVSplitPos WhichV(ScSplitPos ePos)
BOOL IsMinimized(HWND hWnd)