24#include <document.hxx>
58 if ( nEndX != nStartX || nEndY != nStartY )
60 bool bLeft = ( nEndX < nStartX );
61 bool bTop = ( nEndY < nStartY );
64 SCCOL nCols = nEndX+1-nStartX;
65 SCROW nRows = nEndY+1-nStartY;
67 OUString aHelp =
ScResId( STR_QUICKHELP_REF );
68 aHelp = aHelp.replaceFirst(
"%1", OUString::number(nRows) );
69 aHelp = aHelp.replaceFirst(
"%2", OUString::number(nCols) );
78 Point aPos( bLeft ? aStart.
X() : ( aEnd.
X() + 3 ),
79 bTop ? aStart.
Y() : ( aEnd.
Y() + 3 ) );
80 QuickHelpFlags nFlags = ( bLeft ? QuickHelpFlags::Right : QuickHelpFlags::Left ) |
81 ( bTop ? QuickHelpFlags::Bottom : QuickHelpFlags::Top );
130 if ( nStartX == nEndX && nStartY == nEndY )
146 pGridWin[eNew]->GetOutputSizePixel()) );
179 if ( nStartX == nEndX && nStartY == nEndY )
212 if ( nStartX == nEndX && nStartY == nEndY )
213 rDoc.
ExtendMerge( nStartX, nStartY, nEndX, nEndY, nTab );
222 if ( nStartX == nEndX && nStartY == nEndY )
223 rDoc.
ExtendMerge( nStartX, nStartY, nEndX, nEndY, nTab );
224 aRect.
SetNew( nStartX, nStartY, nEndX, nEndY );
232 SC_MOD()->SetReference( aRef, rDoc, &rMark );
249 if (aRect.
GetDiff( nPaintStartX, nPaintStartY, nPaintEndX, nPaintEndY ))
275 aHelpStr =
ScResId( STR_TIP_RESIZEMATRIX );
278 aHelpStr = aHelpStr.replaceFirst(
"%1", OUString::number(nRows) );
279 aHelpStr = aHelpStr.replaceFirst(
"%2", OUString::number(nCols) );
282 aHelpStr =
ScResId( STR_QUICKHELP_DELETE );
283 else if ( nEndX != aMarkRange.
aEnd.
Col() || nEndY != aMarkRange.
aEnd.
Row() )
286 if (!aHelpStr.getLength())
290 SCCOL nAddX = ( nEndX >= aMarkRange.
aEnd.
Col() ) ? 1 : 0;
291 SCROW nAddY = ( nEndY >= aMarkRange.
aEnd.
Row() ) ? 1 : 0;
322 SCCOL nStartX = nCurX;
323 SCROW nStartY = nCurY;
332 ScRange aRef( nCurX,nCurY,nCurZ, nCurX,nCurY,nCurZ );
333 SC_MOD()->SetReference( aRef, rDoc, &rMark );
373 return nNewPos - nOldPos;
386 return ( nEnd - nStart );
460 SC_MOD()->AnythingChanged();
464#ifndef HDR_SLIDERSIZE
465#define HDR_SLIDERSIZE 2
470 for (sal_uInt16
i=0;
i<4;
i++)
485 for (sal_uInt16
i=0;
i<4;
i++)
508 for (sal_uInt16
i=0;
i<4;
i++)
void PutInOrder(T &nStart, T &nEnd)
static bool IsQuickHelpEnabled()
static void * ShowPopover(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rText, QuickHelpFlags nStyle)
static void HidePopover(vcl::Window const *pParent, void *nId)
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
void SetDocumentModified()
void UpdateOle(const ScViewData &rViewData, bool bSnapSize=false)
SCROW SanitizeRow(SCROW nRow) const
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC bool GetAutoCalc() const
SC_DLLPUBLIC bool GetTableArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bCalcHiddens=false) const
SCCOL SanitizeCol(SCCOL nCol) const
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
void InterpretDirtyCells(const ScRangeList &rRanges)
void SetEmbedded(const ScRange &rRange)
void DoInvertRect(const tools::Rectangle &rPixel)
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
void AddRefEntry()
Multiple selection.
static void notifyAllViewsHeaderInvalidation(const SfxViewShell *pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex)
Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab is equal to nCurrentTabIndex.
std::unique_ptr< ScViewSelectionEngine > pSelEngine
void AlignToCursor(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, const ScSplitPos *pWhich=nullptr)
VclPtr< ScrollAdaptor > aHScrollRight
void DoneRefMode(bool bContinue=false)
VclPtr< ScrollAdaptor > aVScrollTop
VclPtr< ScrollAdaptor > aVScrollBottom
std::array< VclPtr< ScGridWindow >, 4 > pGridWin
tools::Rectangle aTipRectangle
void InvertHorizontal(ScVSplitPos eWhich, tools::Long nDragPos)
void InitRefMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType)
void InvertVertical(ScHSplitPos eWhich, tools::Long nDragPos)
void PaintArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScUpdateMode eMode=ScUpdateMode::All)
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
void ScrollX(tools::Long nDeltaX, ScHSplitPos eWhich, bool bUpdBars=true)
void UpdateShrinkOverlay()
void ScrollY(tools::Long nDeltaY, ScVSplitPos eWhich, bool bUpdBars=true)
void UpdateRef(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ)
void UpdateScrollBars(HeaderType eHeaderType=BOTH_HEADERS)
static tools::Long GetScrollBarPos(const ScrollAdaptor &rScroll)
bool UpdateVisibleRange()
VclPtr< vcl::Window > sTopParent
static void SetScrollBar(ScrollAdaptor &rScroll, tools::Long nRangeMax, tools::Long nVisible, tools::Long nPos, bool bLayoutRTL)
VclPtr< ScrollAdaptor > aHScrollLeft
bool GetDiff(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2)
void SetNew(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
ScFillMode GetFillMode() const
ScMarkData & GetMarkData()
void SetRefMode(bool bNewMode, ScRefType eNewType)
ScDocument & GetDocument() const
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
SCCOL GetRefStartX() const
ScRefType GetRefType() const
ScSplitMode GetHSplitMode() const
ScDocShell * GetDocShell() const
void SetRefEnd(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
ScMarkType GetSimpleArea(SCCOL &rStartCol, SCROW &rStartRow, SCTAB &rStartTab, SCCOL &rEndCol, SCROW &rEndRow, SCTAB &rEndTab) const
SCROW VisibleCellsY(ScVSplitPos eWhichY) const
ScSplitPos GetActivePart() const
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
SCTAB GetRefStartZ() const
bool GetDelMark(ScRange &rRange) const
SCROW GetRefStartY() const
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
ScSplitMode GetVSplitMode() const
SCROW GetEditViewRow() const
bool HasEditView(ScSplitPos eWhich) const
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
void SetRefStart(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
constexpr tools::Long Height() const
constexpr tools::Long Width() const
Point OutputToScreenPixel(const Point &rPos) const
Size GetOutputSizePixel() const
sal_uInt16 nScFillModeMouseModifier
constexpr sal_uInt16 KEY_MOD1
OUString ScResId(TranslateId aId)
static tools::Long lcl_UpdateBar(ScrollAdaptor &rScroll, SCCOLROW nSize)
static tools::Long lcl_GetScrollRange(SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLROW nMax, SCCOLROW nStart)
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
ScHSplitPos WhichH(ScSplitPos ePos)
ScRefType
Mouse mode to select areas.
ScVSplitPos WhichV(ScSplitPos ePos)