19 #ifndef INCLUDED_SC_SOURCE_UI_INC_VIEWDATA_HXX
20 #define INCLUDED_SC_SOURCE_UI_INC_VIEWDATA_HXX
32 #define SC_SIZE_NONE 65535
75 SC_MARK_MULTI_FILTERED =
125 static_assert(std::numeric_limits<index_type>::is_signed,
"ScPositionCache: index type is not signed");
128 static const index_type
null = std::numeric_limits<index_type>::min();
133 bool operator() (
const value_type& rValue1,
const value_type& rValue2)
const;
178 void Compute(value_type aFirstNearest, value_type aSecondNearest,
252 css::uno::Sequence <css::beans::PropertyValue>& rSettings,
256 const css::uno::Sequence <css::beans::PropertyValue>& rSettings,
276 ::std::vector<std::unique_ptr<ScViewDataTable>>
maTabData;
282 std::unique_ptr<EditView> pEditView[4];
324 bool bEditActive[4] = {};
327 bool bDelMarkValid:1;
329 bool bSelCtrlMouseClick:1;
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(
const OUString& 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 );
452 void SetZoom(
const Fraction& rNewX,
const Fraction& rNewY, std::vector< SCTAB >& tabs );
462 void SetShowGrid(
bool bShow );
478 bool SimpleColMarked();
479 bool SimpleRowMarked();
481 bool IsMultiMarked()
const;
487 bool SelectionForbidsCellFill();
489 static bool SelectionFillDOOM(
const ScRange& rRange );
494 void GetFillData(
SCCOL& rStartCol,
SCROW& rStartRow,
496 void ResetFillMode();
509 bool bTestMerge =
true,
bool bRepair =
false,
SCTAB nForTab = -1 );
510 void GetMouseQuadrant(
const Point& rClickPos,
ScSplitPos eWhich,
511 SCCOL nPosX,
SCROW nPosY,
bool& rLeft,
bool& rTop );
523 { bIsRefMode = bNewMode; eRefType = eNewType; }
530 { aDelRange = rRange; bDelMarkValid =
true; }
533 { rRange = aDelRange;
return bDelMarkValid; }
535 inline void GetMoveCursor(
SCCOL& rCurX,
SCROW& rCurY );
559 void ResetEditView();
565 {
return pEditView[eWhich] && bEditActive[eWhich]; }
567 {
return pEditView[eWhich].get(); }
582 void EditGrowY(
bool bInitial =
false );
593 const ScPatternAttr* pPattern,
bool bForceToTop,
bool bInPrintTwips =
false );
595 void SetTabNo(
SCTAB nNewTab );
599 bool bAllowNeg =
false,
SCTAB nForTab = -1 )
const;
604 Point GetPrintTwipsPosFromTileTwips(
const Point& rTileTwipsPos)
const;
609 OString describeCellCursorAt(
SCCOL nCol,
SCROW nRow,
bool bPixelAligned =
true )
const;
622 void SetScreenPos(
const Point& rVisAreaStart );
635 void UpdateOutlinerFlags(
Outliner& rOutl )
const;
637 Point GetMousePosPixel();
652 SCCOLROW GetLOKSheetFreezeIndex(
bool bIsCol)
const;
653 bool SetLOKSheetFreezeIndex(
const SCCOLROW nFreezeIndex,
bool bIsCol,
SCTAB nForTab = -1);
654 bool RemoveLOKFreeze();
655 void DeriveLOKFreezeAllSheets();
656 void DeriveLOKFreezeIfNeeded(
SCTAB nForTab);
661 static inline tools::Long ToPixel( sal_uInt16 nTwips,
double nFactor );
685 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