34#include <osl/diagnose.h>
42#include <overlayobject.hxx>
50#include <inputwin.hxx>
66#include <LibreOfficeKit/LibreOfficeKitEnums.h>
71#include <com/sun/star/chart2/data/HighlightedRange.hpp>
76ScRange lcl_getSubRangeByIndex(
const ScRange& rRange, sal_Int32 nIndex )
83 if( (nWidth > 0) && (nHeight > 0) && (nDepth > 0) )
86 sal_Int32 nArea = nWidth * nHeight;
87 aResult.IncCol(
static_cast< SCCOL >( nIndex % nWidth ) );
88 aResult.IncRow(
static_cast< SCROW >( (nIndex % nArea) / nWidth ) );
89 aResult.IncTab(
static_cast< SCTAB >( nIndex / nArea ) );
108 Apply<Adder>(pViewShell, eWhich);
113 Apply<Remover>(pViewShell, eWhich);
117template<ScExtraEditViewManager::ModifierTagType ModifierTag>
128 for (
int i = 0;
i < 4; ++
i)
133 Modifier<ModifierTag>(pWin);
139template<ScExtraEditViewManager::ModifierTagType ModifierTag>
143 SAL_WARN(
"sc",
"ScExtraEditViewManager::Modifier<ModifierTag>: non-specialized version should not be invoked.");
147void ScExtraEditViewManager::Modifier<ScExtraEditViewManager::Adder>(
ScGridWindow* pWin)
149 if (mpOtherEditView->AddOtherViewWindow(pWin))
154void ScExtraEditViewManager::Modifier<ScExtraEditViewManager::Remover>(
ScGridWindow* pWin)
156 if (mpOtherEditView->RemoveOtherViewWindow(pWin))
168 bool bRefMode =
SC_MOD()->IsFormulaMode();
194 for (sal_uInt16
i = 0;
i < 4;
i++)
197 pGridWin[
i]->UpdateAutoFillMark( bMarked, aMarkRange );
200 for (sal_uInt16
i = 0;
i < 2;
i++)
224 if (pWin && pWin->IsVisible())
238 if (pWin && pWin->IsVisible())
241 pWin->CursorChanged();
261 rBindings.
Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
265 rBindings.
Invalidate( SID_ATTR_CHAR_POSTURE );
266 rBindings.
Invalidate( SID_ATTR_CHAR_UNDERLINE );
272 rBindings.
Invalidate( SID_ATTR_CHAR_OVERLINE );
274 rBindings.
Invalidate( SID_ATTR_CHAR_KERNING );
277 rBindings.
Invalidate( SID_ATTR_CHAR_STRIKEOUT );
278 rBindings.
Invalidate( SID_ATTR_CHAR_SHADOWED );
280 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_LEFT );
281 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_RIGHT );
282 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_BLOCK );
283 rBindings.
Invalidate( SID_ATTR_PARA_ADJUST_CENTER);
284 rBindings.
Invalidate( SID_NUMBER_TYPE_FORMAT);
295 rBindings.
Invalidate( SID_SCATTR_CELLPROTECTION );
301 rBindings.
Invalidate( SID_ATTR_ALIGN_INDENT );
304 rBindings.
Invalidate( SID_ATTR_BORDER_OUTER );
305 rBindings.
Invalidate( SID_ATTR_BORDER_INNER );
306 rBindings.
Invalidate( SID_ATTR_BORDER_DIAG_TLBR );
307 rBindings.
Invalidate( SID_ATTR_BORDER_DIAG_BLTR );
308 rBindings.
Invalidate( SID_NUMBER_TYPE_FORMAT );
313 rBindings.
Invalidate( SID_ATTR_ALIGN_LINEBREAK );
316 rBindings.
Invalidate( SID_TEXTDIRECTION_LEFT_TO_RIGHT );
317 rBindings.
Invalidate( SID_TEXTDIRECTION_TOP_TO_BOTTOM );
318 rBindings.
Invalidate( SID_ATTR_PARA_LEFT_TO_RIGHT );
319 rBindings.
Invalidate( SID_ATTR_PARA_RIGHT_TO_LEFT );
322 rBindings.
Invalidate( SID_ALIGN_ANY_HDEFAULT );
324 rBindings.
Invalidate( SID_ALIGN_ANY_HCENTER );
326 rBindings.
Invalidate( SID_ALIGN_ANY_JUSTIFIED );
327 rBindings.
Invalidate( SID_ALIGN_ANY_VDEFAULT );
329 rBindings.
Invalidate( SID_ALIGN_ANY_VCENTER );
333 rBindings.
Invalidate( SID_NUMBER_SCIENTIFIC );
345void collectUIInformation(std::map<OUString, OUString>&& aParameters)
348 aDescription.
aID =
"grid_window";
349 aDescription.
aAction =
"SELECT";
351 aDescription.
aParent =
"MainWindow";
352 aDescription.
aKeyWord =
"ScGridWinUIObject";
376 if ( !(nPosX != nOldX || nPosY != nOldY || bNew) )
396 collectUIInformation({{
"CELL", aCurrAddress}});
432 if (aNewColArea.getOpenWidth())
438 if (aNewRowArea.getOpenHeight())
446 ss << aNewSize.Width() <<
", " << aNewSize.Height();
447 OString sSize( ss.str() );
467 if (!xDlgController || !xDlgController->getDialog()->get_visible())
470 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(xDlgController.get());
471 return pRefDlg && pRefDlg->IsRefInputMode();
496 pNew->CopyToPrimarySelection();
505 collectUIInformation({{
"RANGE", aStartAddress +
":" + aEndAddress}});
519 rBindings.
Invalidate( SID_HYPERLINK_GETLINK );
529 pTabControl->SetProtectionSymbol(
static_cast<sal_uInt16
>(nTab)+1, bProtect);
588 rBindings.
Invalidate( SID_PASTE_UNFORMATTED );
593 rBindings.
Invalidate( FID_INS_COLUMNS_BEFORE );
595 rBindings.
Invalidate( FID_INS_COLUMNS_AFTER );
604 rBindings.
Invalidate( SID_CELL_FORMAT_RESET );
609 rBindings.
Invalidate( SID_ENABLE_HYPHENATION );
618 rBindings.
Invalidate( SID_SELECT_UNPROTECTED_CELLS );
628 bool bRefMode =
SC_MOD()->IsFormulaMode();
653Point calcHintWindowPosition(
654 const Point& rCellPos,
const Size& rCellSize,
const Size& rFrameWndSize,
const Size& rHintWndSize)
665 if (nMRight - nMargin >= rHintWndSize.
Width())
671 Point aPos = rCellPos;
673 if (aPos.
Y() + rHintWndSize.
Height() > rFrameWndSize.
Height())
682 if (nMBottom - nMargin >= rHintWndSize.
Height())
685 if (rFrameWndSize.
Width() >= rHintWndSize.
Width())
688 Point aPos = rCellPos;
690 if (aPos.
X() + rHintWndSize.
Width() > rFrameWndSize.
Width())
699 if (nMLeft - nMargin >= rHintWndSize.
Width())
705 Point aPos = rCellPos;
707 if (aPos.
Y() + rHintWndSize.
Height() > rFrameWndSize.
Height())
716 if (nMTop - nMargin >= rHintWndSize.
Height())
719 if (rFrameWndSize.
Width() >= rHintWndSize.
Width())
722 Point aPos = rCellPos;
724 if (aPos.
X() + rHintWndSize.
Width() > rFrameWndSize.
Width())
735 if (nMRight - nMargin >= rHintWndSize.
Width())
738 Point aPos = rCellPos;
744 if (nMBottom - nMargin >= rHintWndSize.
Height())
747 Point aPos = rCellPos;
753 if (nMLeft - nMargin >= rHintWndSize.
Width())
756 Point aPos = rCellPos;
762 if (nMTop - nMargin >= rHintWndSize.
Height())
765 Point aPos = rCellPos;
773 Point aPos = rCellPos;
786 bool bListValButton =
false;
797 OSL_ENSURE(
pData,
"ValidationData not found");
798 OUString aTitle, aMessage;
800 if (
pData &&
pData->GetInput( aTitle, aMessage ) && !aMessage.isEmpty() )
811 aPos.
X() < aWinSize.
Width() && aPos.
Y() < aWinSize.
Height() )
819 mxInputHintOO->append(std::unique_ptr<sdr::overlay::OverlayObject>(pOverlay));
826 Point aHintPos = calcHintWindowPosition(
827 aPos,
Size(nCellSizeX,nCellSizeY), aWinSize, aHintWndSize);
834 if (!pWindow->IsVisible())
837 if (!xOverlayManager.is())
841 xOverlayManager->add(*pOverlay);
842 pWindow->updateLOKInputHelp(aTitle, aMessage);
851 std::unique_ptr<ScOverlayHint> pOtherOverlay(
new ScOverlayHint(aTitle, aMessage, aCommentColor,
pFrameWin->GetFont()));
852 Point aFooPos(pWindow->PixelToLogic(aOtherPos, pWindow->GetDrawMapMode()));
853 pOtherOverlay->SetPos(aFooPos, pWindow->GetDrawMapMode());
854 xOverlayManager->add(*pOtherOverlay);
865 bListValButton =
true;
871 if (pWin && pWin->IsVisible())
872 pWin->UpdateListValPos(bListValButton, aListValPos);
895 if (xDlgController && xDlgController->getDialog()->get_visible())
896 return xDlgController->getDialog();
907 if (xDlgController && xDlgController->getDialog()->get_visible())
908 return xDlgController->getDialog();
957 if ( nCurX >= 0 && nCurY >= 0 )
960 nCellSizeX = nCellSizeY = 0;
966 bool bForceNew =
false;
984 int x,
y, width, height;
990 if ( aDlgPixel.
Right() >= 0 && aDlgPixel.
Left() < aWinSize.
Width() )
992 if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX ||
993 nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
1002 if ( aCursor.
Overlaps( aDlgPixel ) )
1010 bool bBottom =
false;
1013 if ( nBotSpace > 0 && nBotSpace > nTopSpace )
1021 SCROW nDiff = nWPosY - nDeltaY;
1022 if ( nCurY >= nDiff )
1024 nSpaceY = nDlgBot + ( nBotSpace - nCellSizeY ) / 2;
1029 if ( !bBottom && nTopSpace > 0 )
1031 nSpaceY = ( nTopSpace - nCellSizeY ) / 2;
1038 SCCOL nNewDeltaX = nDeltaX;
1039 SCROW nNewDeltaY = nDeltaY;
1040 bool bDoLine =
false;
1045 if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
1047 nNewDeltaX = nCurX -
aViewData.
CellsAtX( nCurX, -1, eAlignX,
static_cast<sal_uInt16
>(nSpaceX) );
1052 if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY || bForceNew )
1054 nNewDeltaY = nCurY -
aViewData.
CellsAtY( nCurY, -1, eAlignY,
static_cast<sal_uInt16
>(nSpaceY) );
1067 if ( nCurX < nDeltaX || nCurX >= nDeltaX+nSizeX )
1074 if ( nCurY < nDeltaY || nCurY >= nDeltaY+nSizeY )
1084 if ( nCurX < nNewDeltaX || nCurX >= nNewDeltaX+nSizeX )
1086 nNewDeltaX = nCurX - (nSizeX / 2);
1091 if ( nCurY < nNewDeltaY || nCurY >= nNewDeltaY+nSizeY )
1093 nNewDeltaY = nCurY - (nSizeY / 2);
1105 OSL_FAIL(
"Wrong cursor mode");
1112 while ( nCurX >= nNewDeltaX+nSizeX )
1114 nNewDeltaX = nCurX-nSizeX+1;
1120 while ( nCurY >= nNewDeltaY+nSizeY )
1122 nNewDeltaY = nCurY-nSizeY+1;
1128 if ( nCurX < nNewDeltaX )
1130 if ( nCurY < nNewDeltaY )
1134 if ( nNewDeltaX != nDeltaX )
1136 if (nNewDeltaX+nSizeX-1 > rDoc.
MaxCol())
1137 nNewDeltaX = rDoc.
MaxCol()-nSizeX+1;
1141 if ( nNewDeltaY != nDeltaY )
1143 if (nNewDeltaY+nSizeY-1 > rDoc.
MaxRow())
1144 nNewDeltaY = rDoc.
MaxRow()-nSizeY+1;
1148 if ( nNewDeltaX != nDeltaX )
1149 ScrollX( nNewDeltaX - nDeltaX, eAlignX );
1150 if ( nNewDeltaY != nDeltaY )
1151 ScrollY( nNewDeltaY - nDeltaY, eAlignY );
1180 bRet =
pSelEngine->SelMouseButtonDown( rMEvt );
1192 bool bShift,
bool bControl,
bool bKeepOld,
bool bKeepSel )
1202 if (nCurX < 0) nCurX = 0;
1203 if (nCurY < 0) nCurY = 0;
1243 if (bMarked && !
SC_MOD()->IsFormulaMode())
1254 pSelEngine->CursorPosChanging( bShift, bControl );
1269 bool bShift,
bool bKeepSel )
1274 bool bSkipProtected =
false, bSkipUnprotected =
false;
1282 if ( bSkipProtected && bSkipUnprotected )
1293 nCurX = nOldX + nMovX;
1294 nCurY = nOldY + nMovY;
1304 if (nMovX < 0 && nOldX == 0)
1309 if (nMovY < 0 && nOldY == 0)
1350 SCCOL nNewX = nCurX;
1351 SCROW nNewY = nCurY;
1355 if ( nMovX > 0 || nMovY > 0 )
1380 SCCOL nNewX = nCurX;
1381 SCROW nNewY = nCurY;
1423 nMoveY = bShift ? -1 : 1;
1426 nMoveX = bShift ? -1 : 1;
1429 nMoveY = bShift ? 1 : -1;
1432 nMoveX = bShift ? 1 : -1;
1439 SCCOL nNewX = nCurX;
1440 SCROW nNewY = nCurY;
1448 rDoc.
GetNextPos( nNewX, nNewY, nTab, nMoveX, nMoveY,
true,
false, rMark );
1453 if ( nNewX == nCurX && nNewY == nCurY )
1460 rDoc.
GetNextPos( nNewX, nNewY, nTab, nMoveX, nMoveY,
false,
true, rMark, nTabStartCol );
1470 enum { MOD_NONE, MOD_CTRL, MOD_ALT, MOD_BOTH } eModifier =
1472 (rKCode.
IsMod2() ? MOD_BOTH : MOD_CTRL) :
1473 (rKCode.
IsMod2() ? MOD_ALT : MOD_NONE);
1476 sal_uInt16 nCode = rKCode.
GetCode();
1485 case KEY_UP: nDY = -1;
break;
1488 if( nDX != 0 || nDY != 0 )
1523 nDX = (nCode ==
KEY_HOME) ? -1 : 1;
1543 short nMove = bShift ? -1 : 1;
1551 SCCOL nNewX = nCurX;
1552 SCROW nNewY = nCurY;
1556 rDoc.
GetNextPos( nNewX,nNewY, nTab, nMove,0, bMarked,
true, rMark );
1578 nEndCol = aMarkRange.
aEnd.
Col();
1605 nEndRow = aMarkRange.
aEnd.
Row();
1626 SCCOL nStartCol = nCol;
1632 if (
SC_MOD()->IsFormulaMode() )
1653 SCROW nStartRow = nRow;
1659 if (
SC_MOD()->IsFormulaMode() )
1683 SCCOL nEndCol = nStartCol;
1684 SCROW nEndRow = nStartRow;
1686 rDoc.
GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow, bIncludeCursor,
false );
1778 OSL_ENSURE( nDir==-1 || nDir==1,
"SelectNextTab: invalid value");
1808 SetTabNo( nTab,
false, bExtendSelection );
1823 OSL_FAIL(
"SetTabNo: invalid sheet");
1855 SCTAB nOldPos = nTab;
1858 bool bUp = (nTab>=nOldPos);
1862 if (nTab>=nTabCount)
1875 OSL_FAIL(
"no visible sheets");
1908 bool bAllSelected =
true;
1909 for (
SCTAB nSelTab = 0; nSelTab < nTabCount; ++nSelTab)
1913 if (nTab == nSelTab)
1916 bExtendSelection =
true;
1920 bAllSelected =
false;
1921 if (bExtendSelection)
1926 if (bAllSelected && !bNew)
1929 bExtendSelection =
false;
1931 if (bExtendSelection)
1950 if (pWin && pWin->IsVisible())
1951 pWin->UpdateEditViewPos();
1956 collectUIInformation({{
"TABLE", OUString::number(nTab)}});
1963 if ( !bUnoRefDialog )
1980 MapMode aMapMode( MapUnit::Map100thMM );
2001 bool bResize =
false;
2020 pWin->SetMapMode(pWin->GetDrawMapMode());
2030 rBindings.
Invalidate( SID_DELETE_PRINTAREA );
2031 rBindings.
Invalidate( FID_DEL_MANUALBREAKS );
2035 rBindings.
Invalidate( SID_STATUS_PAGESTYLE );
2050 IAnyRefDialog* pRefDlg =
dynamic_cast<IAnyRefDialog*
>(pChildWnd->
GetController().get());
2052 pRefDlg->ViewShellChanged();
2077 auto lTabSwitch = [pThisViewShell, nThisTabNo] (
ScTabViewShell* pOtherViewShell)
2079 ScViewData& rOtherViewData = pOtherViewShell->GetViewData();
2081 if (nThisTabNo == nOtherTabNo)
2083 for (
int i = 0;
i < 4; ++
i)
2093 for (
int i = 0;
i < 4; ++
i)
2122 for (sal_uInt16
i = 0;
i < 4;
i++)
2176 for (sal_uInt16
i = 0;
i < 4;
i++)
2190 if (eCurrent == eActive)
2203 bool bNotifyAcc =
false;
2206 bool bExtended = nRow1 != nRow2;
2211 for (sal_uInt16
i = 0;
i < 4;
i++)
2228 for (sal_uInt16
i = 0;
i < 4;
i++)
2242 auto lInvalidateWindows =
2248 pWin->Invalidate(rInvRect);
2255 else if (bExtended || ( bAtCursor && !bNoPaint ))
2269 bool bGrabFocus =
false;
2291 for (sal_uInt16
i = 0;
i < 4;
i++)
2313 for (sal_uInt16
i = 0;
i < 4;
i++)
2316 pGridWin[
i]->UpdateFormulas(nStartCol, nStartRow, nEndCol, nEndRow);
2344 for (
size_t i = 0;
i < 4; ++
i)
2361 if (bIsTiledRendering)
2403 tools::Long nLayoutSign = (!bIsTiledRendering && bLayoutRTL) ? -1 : 1;
2410 if (bIsTiledRendering)
2419 aEnd.
setX( std::numeric_limits<int>::max() / 1000 );
2423 aEnd.
setX( bLayoutRTL ? 0 :
pGridWin[
i]->GetOutputSizePixel().Width() );
2433 aStart.
AdjustX( -nLayoutSign );
2445 aStart.
AdjustX( -(nMarkPixel * nLayoutSign) );
2479 bool bHiddenEdge =
false;
2482 while ( nCol1 > 0 && rDoc.
ColHidden(nCol1, nTab) )
2509 if ( nCol2 - nCol1 > 1 && nRow2 - nRow1 > 1 && !bHiddenEdge )
2532 sal_uInt16
nCount =
static_cast<sal_uInt16
>(pRangeFinder->
Count());
2541 sal_uInt16
idx = nNumber;
2574 const uno::Sequence< chart2::data::HighlightedRange > & rHilightRanges )
2580 std::vector<ReferenceMark> aReferenceMarks( nSize );
2582 for (chart2::data::HighlightedRange
const & rHighlightedRange : rHilightRanges)
2590 size_t nListSize = aRangeList.
size();
2592 aReferenceMarks.resize(nSize);
2594 for (
size_t j = 0; j < nListSize; ++j )
2598 if( rHighlightedRange.Index == - 1 )
2605 aTargetRange = lcl_getSubRangeByIndex(
p, rHighlightedRange.Index );
2658 for (sal_uInt16
i = 0;
i < 4;
i++)
2669 for (sal_uInt16
i = 0;
i < 2;
i++)
2680 for (sal_uInt16
i = 0;
i < 4;
i++)
2683 pGridWin[
i]->CreateAnchorHandle(rHdl, rAddress);
2710 for (sal_uInt16
i = 0;
i < 2;
i++)
2718 if (nEndCol >= rDoc.
MaxCol())
2719 nEndX = bLayoutRTL ? 0 : ( aWinSize.
Width()-1 );
2722 if (nStartX > nEndX)
2723 std::swap(nStartX, nEndX);
2736 for (sal_uInt16
i = 0;
i < 2;
i++)
2765 for (sal_uInt16
i = 0;
i < 2;
i++)
2773 if (nEndRow >= rDoc.
MaxRow())
2774 nEndY = aWinSize.
Height() - 1;
2777 if (nStartY > nEndY)
2778 std::swap(nStartY, nEndY);
2814 if ( !(bChangedX || bChangedY) )
2822 SetZoom( aZoomX, aZoomY,
false );
2878 OSL_ENSURE(
pGridWin[eWin],
"Corrupted document, not all SplitPos in GridWin" );
2885 for (
i=0;
i<4;
i++ )
2893 OSL_ENSURE(
i<4,
"and BOOM" );
2910 if ( eOld == eWhich )
2915 bool bRefMode =
SC_MOD()->IsFormulaMode();
2925 bool bTopCap =
pColBar[eOldH] &&
pColBar[eOldH]->IsMouseCaptured();
2926 bool bLeftCap =
pRowBar[eOldV] &&
pRowBar[eOldV]->IsMouseCaptured();
2928 bool bFocus =
pGridWin[eOld]->HasFocus();
2929 bool bCapture =
pGridWin[eOld]->IsMouseCaptured();
2946 if ( bCapture ||
pGridWin[eWhich]->IsMouseCaptured() )
2955 if ( bTopCap &&
pColBar[eNewH] )
2957 pColBar[eOldH]->SetIgnoreMove(
true);
2958 pColBar[eNewH]->SetIgnoreMove(
false);
2962 pColBar[eNewH]->CaptureMouse();
2964 if ( bLeftCap &&
pRowBar[eNewV] )
2966 pRowBar[eOldV]->SetIgnoreMove(
true);
2967 pRowBar[eNewV]->SetIgnoreMove(
false);
2971 pRowBar[eNewV]->CaptureMouse();
2983 if ( !bRefMode && !bOleActive )
3001 pWin->ClickExtern();
3032 return pGridWin[eGridWhich]->GetSizePixel().Width();
3054 return pGridWin[eGridWhich]->GetSizePixel().Height();
3061 SC_MOD()->InputEnterHandler();
3080 for (sal_uInt32
i = 0;
i < 4;
i++)
3115 for (sal_uInt16
i = 0;
i < 4;
i++)
3126 if (pWin && pWin->IsVisible() && pWin->NeedsRepaint())
bool ValidTab(SCTAB nTab)
const SCCOL SC_TABSTART_NONE
void PutInOrder(T &nStart, T &nEnd)
sal_uInt32 GetValue() const
void ShowCursor(bool bGotoCursor=true, bool bForceVisCursor=true, bool bActivate=false)
EditEngine * GetEditEngine() const
tools::Rectangle GetInvalidateRect() const
const vcl::KeyCode & GetKeyCode() const
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
void Set(SCCOL nCol, SCROW nRow, SCTAB nTab)
OUString GetColRowString() const
Create a human-readable string representation of the cell address.
SdrOle2Obj * GetDrawObj()
ScDPObject * GetByName(std::u16string_view rName) const
void BuildAllDimensionMembers()
const ScDocument & GetDocument() const
void UpdatePendingRowHeights(SCTAB nUpdateTab, bool bBefore=false)
ScModelObj * GetModel() const
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
SC_DLLPUBLIC bool GetMatrixFormulaRange(const ScAddress &rCellPos, ScRange &rMatrix)
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
bool ValidRow(SCROW nRow) const
SC_DLLPUBLIC const ScTableProtection * GetTabProtection(SCTAB nTab) 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 const ScValidationData * GetValidationEntry(sal_uInt32 nIndex) const
SC_DLLPUBLIC formula::FormulaGrammar::AddressConvention GetAddressConvention() const
SC_DLLPUBLIC SCROW MaxRow() const
SC_DLLPUBLIC bool HasSparkline(ScAddress const &rPosition)
SC_DLLPUBLIC void MakeTable(SCTAB nTab, bool _bNeedsNameCheck=true)
SC_DLLPUBLIC bool HasDataPilotAtPosition(ScAddress const &rAddress) const
SC_DLLPUBLIC void GetNextPos(SCCOL &rCol, SCROW &rRow, SCTAB nTab, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData &rMark, SCCOL nTabStartCol=SC_TABSTART_NONE) const
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
void SkipOverlapped(SCCOL &rCol, SCROW &rRow, SCTAB nTab) const
SC_DLLPUBLIC bool GetPrintArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bNotes=true) const
SC_DLLPUBLIC SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC bool IsVisible(SCTAB nTab) const
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
bool IsAutoCalcShellDisabled() const
SC_DLLPUBLIC void GetDataArea(SCTAB nTab, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bIncludeOld, bool bOnlyDown) const
Return the smallest area containing at least all contiguous cells having data.
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
SC_DLLPUBLIC void SetVisible(SCTAB nTab, bool bVisible)
SC_DLLPUBLIC SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow, SCTAB nTab) const
SC_DLLPUBLIC SCTAB GetTableCount() const
bool ValidColRow(SCCOL nCol, SCROW nRow) const
void DPLaunchFieldPopupMenu(const Point &rScrPos, const Size &rScrSize, const ScAddress &rPos, ScDPObject *pDPObj)
MapMode GetDrawMapMode(bool bForce=false)
MapMode for the drawinglayer objects.
void UpdateInputContext()
void flushOverlayManager()
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
void SelectTable(SCTAB nTab, bool bNew)
const ScRange & GetMarkArea() const
void SelectOneTable(SCTAB nTab)
bool IsMultiMarked() const
void FillRangeListWithMarks(ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
Create a range list of marks.
bool GetTableSelect(SCTAB nTab) const
virtual Size getDocumentSize() final override
sal_uInt16 GetCurRefDlgId() const
void SetSelectionTransfer(ScSelectionTransferObj *pNew)
ScSelectionTransferObj * GetSelectionTransfer() const
void SetPos(const Point &rPos, const MapMode &rMode)
Size GetSizePixel() const
ScRangeFindData & GetObject(size_t nIndex)
const OUString & GetDocName() const
bool Contains(const ScRange &) const
static bool GetRangeListFromString(ScRangeList &rRangeList, std::u16string_view rRangeListStr, const ScDocument &rDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Unicode cSeparator=' ', sal_Unicode cQuote='\'')
bool Contains(const ScAddress &) const
is Address& fully in Range?
static rtl::Reference< ScSelectionTransferObj > CreateFromView(ScTabView *pSource)
bool GetForceFocusOnCurCell() const
virtual const FmFormShell * GetFormShell() const override
void SetSparklineShell(bool bActive)
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
void SetPivotShell(bool bActive)
void SetForceFocusOnCurCell(bool bFlag)
void BroadcastAccessibility(const SfxHint &rHint)
bool HasAccessibilityObjects() const
const ScInputHandler * GetInputHandler() const
bool IsRefInputMode() const
void AddHighlightRange(const ScRange &rRange, const Color &rColor)
void UpdatePageBreakData(bool bForcePaint=false)
sal_uInt16 GetLockedModifiers() const
void TabChanged(bool bSameTabButMoved=false)
Called after moving, copying, inserting or deleting a sheet.
void InitBlockMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bool bTestNeg=false, bool bCols=false, bool bRows=false, bool bForceNeg=false)
std::array< VclPtr< ScColBar >, 2 > pColBar
void FakeButtonUp(ScSplitPos eWhich)
std::array< VclPtr< ScOutlineWindow >, 2 > pRowOutline
void UpdateAutoFillMark(bool bFromPaste=false)
bool MoveCursorKeyInput(const KeyEvent &rKeyEvent)
std::unique_ptr< ScViewSelectionEngine > pSelEngine
void PaintTopArea(SCCOL nStartCol, SCCOL nEndCol)
void AddWindowToForeignEditView(SfxViewShell *pViewShell, ScSplitPos eWhich)
void SelectTabPage(const sal_uInt16 nTab)
ScHeaderFunctionSet aHdrFunc
std::shared_ptr< sc::SpellCheckContext > mpSpellCheckCxt
void AlignToCursor(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, const ScSplitPos *pWhich=nullptr)
void DoChartSelection(const css::uno::Sequence< css::chart2::data::HighlightedRange > &rHilightRanges)
void DoneBlockMode(bool bContinue=false)
void MarkDataArea(bool bIncludeCursor=true)
void GetAreaMoveEndPosition(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, SCCOL &rAreaX, SCROW &rAreaY, ScFollowMode &rMode, bool bInteractiveByUser=false)
void DoneRefMode(bool bContinue=false)
void DrawEnableAnim(bool bSet)
void SelectionChanged(bool bFromPaste=false)
void MoveCursorEnd(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel=false)
std::array< VclPtr< ScGridWindow >, 4 > pGridWin
VclPtr< ScTabControl > pTabControl
SC_DLLPUBLIC void RefreshZoom()
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
void MakeEditView(ScEditEngineDefaulter *pEngine, SCCOL nCol, SCROW nRow)
void FindNextUnprot(bool bShift, bool bInSelection)
void CheckSelectionTransfer()
bool SelMouseButtonDown(const MouseEvent &rMEvt)
void ClearHighlightRanges()
void ActivateView(bool bActivate, bool bFirst)
tools::Long GetGridWidth(ScHSplitPos eWhich)
void InitRefMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType)
void UpdateHeaderWidth(const ScVSplitPos *pWhich=nullptr, const SCROW *pPosY=nullptr)
void MarkCursor(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, bool bCols=false, bool bRows=false, bool bCellSelection=false)
void MoveCursorPage(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel=false)
std::unique_ptr< sdr::overlay::OverlayObjectList > mxInputHintOO
void MoveCursorRel(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel=false)
void PaintArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScUpdateMode eMode=ScUpdateMode::All)
tools::Long GetGridHeight(ScVSplitPos eWhich)
SC_DLLPUBLIC void MoveCursorAbs(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, bool bShift, bool bControl, bool bKeepOld=false, bool bKeepSel=false)
static void UpdateInputLine()
ScViewData & GetViewData()
void SetZoom(const Fraction &rNewX, const Fraction &rNewY, bool bAll)
void SkipCursorHorizontal(SCCOL &rCurX, SCROW &rCurY, SCCOL nOldX, SCCOL nMovX)
ScGridWindow * GetActiveWin()
std::vector< ScHighlightEntry > maHighlightRanges
void DoResize(const Point &rOffset, const Size &rSize, bool bInner=false)
SC_DLLPUBLIC void SetCursor(SCCOL nPosX, SCROW nPosY, bool bNew=false)
void ScrollX(tools::Long nDeltaX, ScHSplitPos eWhich, bool bUpdBars=true)
void MoveCursorScreen(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift)
void UpdateSelectionOverlay()
void ClickCursor(SCCOL nPosX, SCROW nPosY, bool bControl)
void UpdateFormulas(SCCOL nStartCol=-1, SCROW nStartRow=-1, SCCOL nEndCol=-1, SCROW nEndRow=-1)
SC_DLLPUBLIC void CellContentChanged()
std::unique_ptr< ScDrawView > pDrawView
ScExtraEditViewManager aExtraEditViewManager
void ActivatePart(ScSplitPos eWhich)
std::array< VclPtr< ScRowBar >, 2 > pRowBar
void DoDPFieldPopup(std::u16string_view rPivotTableName, sal_Int32 nDimensionIndex, Point aPoint, Size aSize)
void SelectNextTab(short nDir, bool bExtendSelection)
bool HasHintWindow() const
void CreateAnchorHandles(SdrHdlList &rHdl, const ScAddress &rAddress)
std::unique_ptr< ScHeaderSelectionEngine > pHdrSelEng
void SetMarkData(const ScMarkData &rNew)
void ScrollY(tools::Long nDeltaY, ScVSplitPos eWhich, bool bUpdBars=true)
void UpdateRef(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ)
void KillEditView(bool bNoPaint)
void MoveCursorEnter(bool bShift)
void InitOwnBlockMode(const ScRange &rMarkRange)
void UpdateScrollBars(HeaderType eHeaderType=BOTH_HEADERS)
void SkipCursorVertical(SCCOL &rCurX, SCROW &rCurY, SCROW nOldY, SCROW nMovY)
SC_DLLPUBLIC void SetTabNo(SCTAB nTab, bool bNew=false, bool bExtendSelection=false, bool bSameTabButMoved=false)
bool UpdateVisibleRange()
void OnLibreOfficeKitTabChanged()
void SetTabProtectionSymbol(SCTAB nTab, const bool bProtect)
void PaintRangeFinder(tools::Long nNumber)
std::array< VclPtr< ScOutlineWindow >, 2 > pColOutline
void GetPageMoveEndPosition(SCCOL nMovX, SCROW nMovY, SCCOL &rPageX, SCROW &rPageY)
void PaintBlock(bool bReset)
divide PaintBlock into two methods: RepaintBlock and RemoveBlock or similar
void PaintRangeFinderEntry(const ScRangeFindData *pData, SCTAB nTab)
Update marks for a selected Range.
void RepeatResize(bool bUpdateFix=true)
ScViewFunctionSet aFunctionSet
void PaintLeftArea(SCROW nStartRow, SCROW nEndRow)
VclPtr< vcl::Window > pFrameWin
void UpdateInputContext()
void RemoveWindowFromForeignEditView(SfxViewShell *pViewShell, ScSplitPos eWhich)
void MoveCursorArea(SCCOL nMovX, SCROW nMovY, ScFollowMode eMode, bool bShift, bool bKeepSel=false, bool bInteractiveByUser=false)
sheet protection state container
bool isOptionEnabled(Option eOption) const
virtual bool isProtected() const override
SCCOL GetEditEndCol() const
SCROW GetEditEndRow() const
SCCOL CellsAtX(SCCOL nPosX, SCCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY=SC_SIZE_NONE) const
bool GetMergeSizePixel(SCCOL nX, SCROW nY, tools::Long &rSizeXPix, tools::Long &rSizeYPix) const
bool UpdateFixX(SCTAB nTab=MAXTAB+1)
ScMarkData & GetMarkData()
SCROW GetCurYForTab(SCTAB nTabIndex) const
SCCOL GetTabStartCol() const
SCCOL GetCurXForTab(SCTAB nTabIndex) const
const Fraction & GetZoomY() const
SCROW GetEditStartRow() const
SCROW GetMaxTiledRow() const
void SetTabNo(SCTAB nNewTab)
ScDocument & GetDocument() const
void GetMoveCursor(SCCOL &rCurX, SCROW &rCurY)
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
const Size & GetScrSize() const
SCCOL GetMaxTiledCol() const
ScSplitMode GetHSplitMode() const
SCCOL GetEditStartCol() const
const MapMode & GetLogicMode(ScSplitPos eWhich)
void UpdateInputHandler(bool bForce=false)
ScDocShell * GetDocShell() const
ScGridWindow * GetActiveWin()
bool UpdateFixY(SCTAB nTab=MAXTAB+1)
void GetPosFromPixel(tools::Long nClickX, tools::Long nClickY, ScSplitPos eWhich, SCCOL &rPosX, SCROW &rPosY, bool bTestMerge=true, bool bRepair=false, SCTAB nForTab=-1)
ScTabViewShell * GetViewShell() const
ScMarkType GetSimpleArea(SCCOL &rStartCol, SCROW &rStartRow, SCTAB &rStartTab, SCCOL &rEndCol, SCROW &rEndRow, SCTAB &rEndTab) const
void SetTabStartCol(SCCOL nNew)
ScDBFunc * GetView() const
SCROW VisibleCellsY(ScVSplitPos eWhichY) const
ScSplitPos GetActivePart() const
void SetMaxTiledCol(SCCOL nCol)
void GetEditView(ScSplitPos eWhich, EditView *&rViewPtr, SCCOL &rCol, SCROW &rRow)
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
void SetActivePart(ScSplitPos eNewActive)
SCROW CellsAtY(SCROW nPosY, SCROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX=SC_SIZE_NONE) const
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
void SetMaxTiledRow(SCROW nRow)
void SetOldCursor(SCCOL nNewX, SCROW nNewY)
ScSplitMode GetVSplitMode() const
const Fraction & GetZoomX() const
SCTAB GetRefTabNo() const
void SetSelCtrlMouseClick(bool bTmp)
bool IsPagebreakMode() const
ScAddress GetCurPos() const
void SetEditEngine(ScSplitPos eWhich, ScEditEngineDefaulter *pNewEngine, vcl::Window *pWin, SCCOL nNewX, SCROW nNewY)
void SetRefTabNo(SCTAB nNewTab)
EditView * GetSpellingView() const
SfxBindings & GetBindings()
bool HasEditView(ScSplitPos eWhich) const
void Activate(bool bActivate)
void SetCurX(SCCOL nNewCurX)
bool IsAnyFillMode() const
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
void SetCurY(SCROW nNewCurY)
bool SetCursorAtCell(SCCOL nPosX, SCROW nPosY, bool bScroll)
Size GetOrigObjSize(MapMode const *pTargetMapMode=nullptr) const
virtual const tools::Rectangle & GetLogicRect() const override
void Invalidate(sal_uInt16 nId)
std::shared_ptr< SfxDialogController > & GetController()
css::uno::Reference< css::frame::XController > GetController() const
bool SetObjArea(const tools::Rectangle &)
const tools::Rectangle & GetObjArea() const
bool IsObjectInPlaceActive() const
static void notifyInvalidation(SfxViewShell const *pThisView, tools::Rectangle const *)
static void forEachOtherView(ViewShellType *pThisViewShell, FunctionType f)
static void notifyDocumentSizeChanged(SfxViewShell const *pThisView, const OString &rPayload, vcl::ITiledRenderable *pDoc, bool bInvalidateAll=true)
OUString GetTitle(sal_uInt16 nMaxLen=0) const
bool HasChildWindow(sal_uInt16)
SfxChildWindow * GetChildWindow(sal_uInt16)
SfxFrame & GetFrame() const
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
void DisconnectAllClients()
SfxViewFrame & GetViewFrame() const
virtual css::uno::Reference< css::frame::XModel > GetCurrentDocument() const
SfxInPlaceClient * GetIPClient() const
void SetWindow(vcl::Window *pViewPort)
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
constexpr tools::Long Width() const
static UITestLogger & getInstance()
void logEvent(const EventDescription &rDescription)
sal_uInt16 GetCode() const
Point OutputToScreenPixel(const Point &rPos) const
Point LogicToPixel(const Point &rLogicPt) const
Point PixelToLogic(const Point &rDevicePt) const
virtual Size GetSizePixel() const
Size GetOutputSizePixel() const
weld::Window * GetFrameWeld() const
#define DBG_ASSERT(sCon, aError)
const sal_uInt8 SC_CLIPMARK_SIZE
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_HOME
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_SHIFT
constexpr sal_uInt16 KEY_END
#define SAL_WARN(area, stream)
std::unique_ptr< sal_Int32[]> pData
constexpr TypedWhichId< SfxUInt32Item > ATTR_VALIDDATA(153)
std::map< OUString, OUString > aParameters
Reference< XController > xController
static weld::Window * lcl_GetCareWin(SfxViewFrame &rViewFrm)
static bool lcl_IsRefDlgActive(SfxViewFrame &rViewFrm)
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.
ScVSplitPos WhichV(ScSplitPos ePos)