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");
127 static const index_type
null = std::numeric_limits<index_type>::min();
132 bool operator() (
const value_type& rValue1,
const value_type& rValue2)
const;
177 void Compute(value_type aFirstNearest, value_type aSecondNearest,
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] = {};
326 bool bDelMarkValid:1;
328 bool bSelCtrlMouseClick:1;
339 SAL_DLLPRIVATE
void CalcPPT();
340 SAL_DLLPRIVATE
void CreateTabData(
SCTAB nNewTab );
341 SAL_DLLPRIVATE
void CreateTabData( std::vector< SCTAB >& rvTabs );
342 SAL_DLLPRIVATE
void CreateSelectedTabData();
343 SAL_DLLPRIVATE
void EnsureTabDataSize(
size_t nSize);
344 SAL_DLLPRIVATE
void UpdateCurrentTab();
370 void UpdateInputHandler(
bool bForce =
false );
372 void WriteUserData(OUString& rData);
373 void ReadUserData(
const OUString& rData);
376 void WriteUserDataSequence(css::uno::Sequence <css::beans::PropertyValue>& rSettings)
const;
377 void ReadUserDataSequence(
const css::uno::Sequence <css::beans::PropertyValue>& rSettings);
382 void Activate(
bool bActivate) { bActive = bActivate; }
384 void InsertTab(
SCTAB nTab );
385 void InsertTabs(
SCTAB nTab,
SCTAB nNewSheets );
386 void DeleteTab(
SCTAB nTab );
388 void CopyTab(
SCTAB nSrcTab,
SCTAB nDestTab );
389 void MoveTab(
SCTAB nSrcTab,
SCTAB nDestTab );
404 SCCOL GetOldCurX()
const;
405 SCROW GetOldCurY()
const;
432 void SetCurXForTab(
SCCOL nNewCurX,
SCTAB nTabIndex );
433 void SetCurYForTab(
SCCOL nNewCurY,
SCTAB nTabIndex );
434 void SetOldCursor(
SCCOL nNewX,
SCROW nNewY );
435 void ResetOldCursor();
443 void SetMaxTiledCol(
SCCOL nCol );
444 void SetMaxTiledRow(
SCROW nRow );
446 void SetPagebreakMode(
bool bSet );
450 void SetZoomType(
SvxZoomType eNew, std::vector< SCTAB >& tabs );
451 void SetZoom(
const Fraction& rNewX,
const Fraction& rNewY, std::vector< SCTAB >& tabs );
461 void SetShowGrid(
bool bShow );
477 bool SimpleColMarked();
478 bool SimpleRowMarked();
480 bool IsMultiMarked()
const;
486 bool SelectionForbidsCellFill();
488 static bool SelectionFillDOOM(
const ScRange& rRange );
493 void GetFillData(
SCCOL& rStartCol,
SCROW& rStartRow,
495 void ResetFillMode();
508 bool bTestMerge =
true,
bool bRepair =
false,
SCTAB nForTab = -1 );
509 void GetMouseQuadrant(
const Point& rClickPos,
ScSplitPos eWhich,
510 SCCOL nPosX,
SCROW nPosY,
bool& rLeft,
bool& rTop );
522 { bIsRefMode = bNewMode; eRefType = eNewType; }
529 { aDelRange = rRange; bDelMarkValid =
true; }
532 { rRange = aDelRange;
return bDelMarkValid; }
534 inline void GetMoveCursor(
SCCOL& rCurX,
SCROW& rCurY );
558 void ResetEditView();
564 {
return pEditView[eWhich] && bEditActive[eWhich]; }
566 {
return pEditView[eWhich].get(); }
581 void EditGrowY(
bool bInitial =
false );
592 const ScPatternAttr* pPattern,
bool bForceToTop,
bool bInPrintTwips =
false );
594 void SetTabNo(
SCTAB nNewTab );
598 bool bAllowNeg =
false,
SCTAB nForTab = -1 )
const;
603 Point GetPrintTwipsPosFromTileTwips(
const Point& rTileTwipsPos)
const;
608 OString describeCellCursorAt(
SCCOL nCol,
SCROW nRow,
bool bPixelAligned =
true )
const;
621 void SetScreenPos(
const Point& rVisAreaStart );
634 void UpdateOutlinerFlags(
Outliner& rOutl )
const;
636 Point GetMousePosPixel();
651 SCCOLROW GetLOKSheetFreezeIndex(
bool bIsCol)
const;
652 bool SetLOKSheetFreezeIndex(
const SCCOLROW nFreezeIndex,
bool bIsCol,
SCTAB nForTab = -1);
653 bool RemoveLOKFreeze();
654 void DeriveLOKFreezeAllSheets();
655 void DeriveLOKFreezeIfNeeded(
SCTAB nForTab);
660 static inline tools::Long ToPixel( sal_uInt16 nTwips,
double nFactor );
684 if ( !nRet && nTwips )
bool IsAnyFillMode() const
void SetVSplitMode(ScSplitMode eMode)
void SetOption(ScViewOption eOpt, bool bNew)
SCCOL GetTabStartCol() const
OString describeCellCursor() const
return json for our cursor position.
tools::Rectangle maLOKVisibleArea
The visible area in the LibreOfficeKit client.
void SetDelMark(const ScRange &rRange)
void SetEditAdjust(SvxAdjust eNewEditAdjust)
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
void Compute(value_type aFirstNearest, value_type aSecondNearest, tools::Long nFirstBound, tools::Long nSecondBound)
ScRefType GetRefType() const
void SetCurX(SCCOL nNewCurX)
ScVSplitPos WhichV(ScSplitPos ePos)
void SetFixPosY(SCROW nPos)
bool IsVScrollMode() const
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
const Fraction & GetZoomX() const
ScPositionHelper aHeightHelper
void SetHSplitPos(tools::Long nPos)
bool GetDelMark(ScRange &rRange) const
void SetHeaderMode(bool bNewMode)
tools::Long nFirstPositionPx
::std::vector< std::unique_ptr< ScViewDataTable > > maTabData
SCROW GetRefStartY() const
void SetPasteMode(ScPasteFlags nFlags)
void invalidateByPosition(tools::Long nPos)
ScHSplitPos WhichH(ScSplitPos ePos)
SvxZoomType GetZoomType() const
SCCOL nPosX[2]
X position of the top left cell of the visible area.
ScFollowMode
Screen behavior related to cursor movements.
SCROW GetMaxTiledRow() const
void GetMoveCursor(SCCOL &rCurX, SCROW &rCurY)
SvxAdjust GetEditAdjust() const
void SetSpellingView(EditView *pSpView)
bool HasEditView(ScSplitPos eWhich) const
bool IsSyntaxMode() const
Extended options held by an ScDocument containing additional settings for filters.
ScSplitPos GetActivePart() const
ScDocument & GetDocument() const
tools::Long getPosition(index_type nIndex) const
void insert(index_type nIndex, tools::Long nPos)
void SetSelCtrlMouseClick(bool bTmp)
ScSplitPos SanitizeWhichActive() const
Sanitize the active split range value to not point into a grid window that would never be initialized...
void GetIndexTowards(index_type nNearestIndex, tools::Long nNearestPosition, tools::Long nBound, index_type &nFoundIndex, tools::Long &nPosition, bool bTowards)
SCROW GetEditEndRow() const
void Activate(bool bActivate)
std::set< value_type, Comp > mData
SCCOL GetEditViewCol() const
ScPositionHelper(const ScDocument *pDoc, bool bColumn)
bool ShowPasteSource() const
static tools::Long ToPixel(sal_uInt16 nTwips, double nFactor)
tools::Long GetVSplitPos() const
SC_DLLPUBLIC SCROW MaxRow() const
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
void SetFixPosX(SCCOL nPos)
void SetRefTabNo(SCTAB nNewTab)
tools::Long GetLOKDocHeightPixel() const
BOOL IsMinimized(HWND hWnd)
SCCOL GetMaxTiledCol() const
ScSplitMode GetHSplitMode() const
const Fraction & GetZoomY() const
EditView * GetSpellingView() const
const Size & GetScenButSize() const
Point GetPixPos(ScSplitPos eWhich) const
ScTabViewShell * GetViewShell() const
bool IsHScrollMode() const
void GetIndexAndPos(index_type nNearestIndex, tools::Long nNearestPosition, tools::Long nBound, index_type &nFoundIndex, tools::Long &nPosition, bool bTowards, tools::Long nDiff)
EditView * GetEditView(ScSplitPos eWhich) const
SC_DLLPUBLIC SCCOL MaxCol() const
void setDocument(const ScDocument &rDoc, bool bColumn)
void EnlargeEndBy(tools::Long nOffset)
void WriteUserDataSequence(css::uno::Sequence< css::beans::PropertyValue > &rSettings, const ScViewData &rViewData, SCTAB nTab) const
static const index_type null
void invalidateByIndex(index_type nIndex)
ScMarkType
States GetSimpleArea() returns for the underlying selection marks, so the caller can react if the res...
void SetCurY(SCROW nNewCurY)
ScSplitPos GetEditActivePart() const
tools::Long GetHSplitPos() const
void InitData(const ScDocument &rDoc)
tools::Long nSecondPositionPx
std::pair< index_type, tools::Long > value_type
void GetStartIndexAndPosition(SCCOL &nIndex, tools::Long &nPosition) const
void GeIndexBackwards(index_type nNearestIndex, tools::Long nNearestPosition, tools::Long nBound, index_type &nFoundIndex, tools::Long &nPosition, bool bTowards)
ScViewDataTable(const ScDocument *pDoc=nullptr)
bool GetOption(ScViewOption eOpt) const
void SetRefMode(bool bNewMode, ScRefType eNewType)
const Size & GetScrSize() const
void SetVSplitPos(tools::Long nPos)
tools::Long GetSize(index_type nIndex) const
ScPositionHelper::value_type value_type
ScViewDataTable * pThisTab
tools::Long computePosition(index_type nIndex, const std::function< long(index_type)> &getSizePx)
void GetEndIndexAndPosition(SCCOL &nIndex, tools::Long &nPosition) const
void EnlargeStartBy(tools::Long nOffset)
SCCOL GetRefStartX() const
tools::Long GetPageUpDownOffset() const
SCTAB GetRefStartZ() const
tools::Long GetLOKDocWidthPixel() const
SfxDispatcher * GetDispatcher()
ScFillMode GetFillMode() const
SCCOL GetEditStartCol() const
bool IsHeaderMode() const
OString describeCellCursorInPrintTwips() const
bool IsSelCtrlMouseClick() const
ScRefType
Mouse mode to select areas.
const ScViewOptions & GetOptions() const
const value_type & getNearestByPosition(tools::Long nPos) const
SCCOL GetEditEndCol() const
SCROW GetEditViewRow() const
void setLOKVisibleArea(const tools::Rectangle &rArea)
SCROW nPosY[2]
Y position of the top left cell of the visible area.
ScBoundsProvider(const ScViewData &rView, SCTAB nT, bool bColumnHeader)
ScPositionHelper & GetLOKWidthHelper()
bool IsOutlineMode() const
bool operator()(const value_type &rValue1, const value_type &rValue2) const
const value_type & getNearestByIndex(index_type nIndex) const
SCTAB GetRefTabNo() const
void SetTabStartCol(SCCOL nNew)
SfxObjectShell * GetSfxDocShell() const
void SetSyntaxMode(bool bNewMode)
void SetHSplitMode(ScSplitMode eMode)
ScPositionHelper & GetLOKHeightHelper()
void removeByIndex(index_type nIndex)
#define DECL_DLLPRIVATE_LINK(Member, ArgType, RetType)
void SetScenButSize(const Size &rNew)
bool IsPagebreakMode() const
ScSplitPos eEditActivePart
void EnlargeBy(tools::Long nOffset)
void ReadUserDataSequence(const css::uno::Sequence< css::beans::PropertyValue > &rSettings, ScViewData &rViewData, SCTAB nTab, bool &rHasZoom)
ScPositionHelper aWidthHelper
ScSplitMode GetVSplitMode() const
tools::Long m_nLOKPageUpDownOffset
SCROW GetEditStartRow() const
void ForcePageUpDownOffset(tools::Long nTwips)
Force page size for PgUp/PgDown to overwrite the computation based on m_aVisArea. ...
const index_type MAX_INDEX