34 #include <document.hxx>
43 #include <globstr.hrc>
45 #include <drawview.hxx>
53 #include <osl/diagnose.h>
55 #include <boost/property_tree/ptree.hpp>
56 #include <boost/property_tree/json_parser.hpp>
58 #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp>
64 #define SPLIT_MARGIN 30
65 #define SPLIT_HANDLE_SIZE 5
68 #define SC_ICONSIZE 36
70 #define SC_SCROLLBAR_MIN 30
71 #define SC_TABBAR_MIN 6
97 Window::Paint(rRenderContext, rRect);
110 Window::StateChanged( nType );
119 Window::DataChanged( rDCEvt );
141 bool bControl = rMEvt.
IsMod1();
148 bool lcl_HasColOutline(
const ScViewData& rViewData )
160 bool lcl_HasRowOutline(
const ScViewData& rViewData )
175 pFrameWin( pParent ),
176 aViewData( rDocSh, pViewShell ),
177 aFunctionSet( &aViewData ),
178 aHdrFunc( &aViewData ),
186 aScrollTimer(
"ScTabView aScrollTimer"),
187 pTimerWindow( nullptr ),
188 aExtraEditViewManager( pViewShell, pGridWin ),
189 nTipVisible( nullptr ),
194 nBlockStartXOrig( 0 ),
197 nBlockStartYOrig( 0 ),
203 mfPendingTabBarWidth( -1.0 ),
204 mnLOKStartHeaderRow( -2 ),
205 mnLOKEndHeaderRow( -1 ),
206 mnLOKStartHeaderCol( -2 ),
207 mnLOKEndHeaderCol( -1 ),
209 bInUpdateHeader(
false ),
210 bInActivatePart(
false ),
211 bInZoomUpdate(
false ),
212 bMoveIsShift(
false ),
213 bDrawSelMode(
false ),
214 bLockPaintBrush(
false ),
219 mbInlineWithScrollbar(
false )
255 pTimerWindow->MouseMove( aTimerMEvt );
263 Point aNewPos = rPos;
266 aNewPos.setX( nTotalWidth - rPos.X() - rSize.
Width() );
288 nTotalWidth += 2*rOffset.X();
295 bool bHOutline = bOutlMode && lcl_HasColOutline(
aViewData);
296 bool bVOutline = bOutlMode && lcl_HasRowOutline(
aViewData);
299 bHScroll = bVScroll = bTabControl = bHeaders = bHOutline = bVOutline =
false;
333 MapMode aPtMapMode(MapUnit::MapPoint);
360 if (bHScroll || bVScroll)
380 nTotalWidth, bLayoutRTL );
391 nSizeSp = nSplitSizeX;
392 nSizeLt = nSizeX - nSizeSp;
395 nSizeSp = nSplitSizeX;
403 nSizeRt = nSizeX - nSizeLt - nSizeSp;
441 Point aTabPoint(nPosX, nPosY + nSizeY);
442 Size aTabSize(nTabSize, nBarY);
446 Point aHScrollLeftPoint(nPosX + nTabSize, nPosY + nSizeY);
447 Size aHScrollLeftSize(nSizeLt, nBarY);
450 Point aHSplitterPoint(nPosX + nTabSize + nSizeLt, nPosY + nSizeY);
451 Size aHSplitterSize(nSizeSp, nBarY);
454 Point aHScrollRightPoint(nPosX + nTabSize + nSizeLt + nSizeSp, nPosY + nSizeY);
455 Size aHScrollRightSize(nSizeRt, nBarY);
460 Point aTabPoint(nPosX, nPosY + nSizeY + nScrollBarSize);
461 Size aTabSize(nSizeX, nTabHeight);
465 Point aHScrollLeftPoint(nPosX, nPosY + nSizeY);
466 Size aHScrollLeftSize(nSizeLt, nScrollBarSize);
469 Point aHSplitterPoint(nPosX + nSizeLt, nPosY + nSizeY);
470 Size aHSplitterSize(nSizeSp, nScrollBarSize);
473 Point aHScrollRightPoint(nPosX + nSizeLt + nSizeSp, nPosY + nSizeY);
474 Size aHScrollRightSize(nSizeRt, nScrollBarSize);
490 nSizeSp = nSplitSizeY;
494 nSizeSp = nSplitSizeY;
501 nSizeDn = nSizeY - nSizeUp - nSizeSp;
504 Size(nBarX, nSizeUp), nTotalWidth, bLayoutRTL );
506 Size( nBarX, nSizeSp ), nTotalWidth, bLayoutRTL );
508 nPosY + nSizeUp + nSizeSp),
509 Size(nBarX, nSizeDn), nTotalWidth, bLayoutRTL );
523 if (bTabControl && ! bHScroll )
531 if (nTabSize < 0) nTabSize = 0;
534 Size(nTabSize, nBarY), nTotalWidth, bLayoutRTL );
537 nTotalWidth, bLayoutRTL );
594 nSplitHeight -=
pTabControl->GetSizePixel().Height();
598 Point(nSplitPosX, nOutPosY),
599 Size(nSplitSizeX, nSplitHeight - nTabHeight), nTotalWidth, bLayoutRTL);
600 nLeftSize = nSplitPosX - nPosX;
601 nSplitPosX += nSplitSizeX;
602 nRightSize = nSizeX - nLeftSize - nSplitSizeX;
611 Point( nOutPosX, nSplitPosY ),
Size( nSplitWidth, nSplitSizeY ), nTotalWidth, bLayoutRTL );
612 nTopSize = nSplitPosY - nPosY;
613 nSplitPosY += nSplitSizeY;
614 nBottomSize = nSizeY - nTopSize - nSplitSizeY;
625 Point(nPosX-nBarX,nOutPosY),
Size(nLeftSize+nBarX,nOutlineY), nTotalWidth, bLayoutRTL );
631 Point(nSplitPosX,nOutPosY),
Size(nRightSize,nOutlineY), nTotalWidth, bLayoutRTL );
642 Point(nOutPosX,nPosY-nBarY),
Size(nOutlineX,nTopSize+nBarY), nTotalWidth, bLayoutRTL );
645 Point(nOutPosX,nSplitPosY),
Size(nOutlineX,nBottomSize), nTotalWidth, bLayoutRTL );
652 Point(nOutPosX,nSplitPosY-nBarY),
Size(nOutlineX,nBottomSize+nBarY), nTotalWidth, bLayoutRTL );
655 if (bHOutline && bVOutline)
666 Point(nPosX,nPosY-nBarY),
Size(nLeftSize,nBarY), nTotalWidth, bLayoutRTL );
669 Point(nSplitPosX,nPosY-nBarY),
Size(nRightSize,nBarY), nTotalWidth, bLayoutRTL );
673 Point(nPosX-nBarX,nPosY),
Size(nBarX,nTopSize), nTotalWidth, bLayoutRTL );
675 Point(nPosX-nBarX,nSplitPosY),
Size(nBarX,nBottomSize), nTotalWidth, bLayoutRTL );
693 tools::Long nInnerPosX = bLayoutRTL ? ( nTotalWidth - nPosX - nLeftSize ) : nPosX;
699 Point(nPosX,nSplitPosY),
Size(nLeftSize,nBottomSize), nTotalWidth, bLayoutRTL );
702 Point(nSplitPosX,nSplitPosY),
Size(nRightSize,nBottomSize), nTotalWidth, bLayoutRTL );
705 Point(nPosX,nPosY),
Size(nLeftSize,nTopSize), nTotalWidth, bLayoutRTL );
708 Point(nSplitPosX,nPosY),
Size(nRightSize,nTopSize), nTotalWidth, bLayoutRTL );
742 sal_uInt16 nNewZoom =
CalcZoom( eZoomType, static_cast<sal_uInt16>(nOldPercent) );
745 if ( aNew != rOldX || aNew != rOldY )
761 bool bResize =
false;
801 bool bHOutline = bOutlMode && lcl_HasColOutline(
aViewData);
802 bool bVOutline = bOutlMode && lcl_HasRowOutline(
aViewData);
826 ::std::swap( rBorder.
Left(), rBorder.
Right() );
831 if (!aViewData.IsHScrollMode())
839 if( pTabControl->IsEffectiveRTL() )
840 nMax = pFrameWin->GetSizePixel().Width() - nMax;
842 if (nSize>nMax) nSize = nMax;
845 if ( nSize != pTabControl->GetSizePixel().Width() )
847 pTabControl->SetSizePixel(
Size( nSize,
848 pTabControl->GetSizePixel().Height() ) );
857 if ( aSize.
Width() != nNewWidth )
866 if( (0.0 <= fRelTabBarWidth) && (fRelTabBarWidth <= 1.0) )
868 SetTabBarWidth( static_cast< tools::Long >( fRelTabBarWidth * nFrameWidth + 0.5 ) );
890 OSL_ENSURE(
pGridWin[ePos],
"no active window");
898 pWin->SetPointer( nPointer );
911 for (sal_uInt16
i=0;
i<4;
i++)
926 bool bHOutline = bOutlMode && lcl_HasColOutline(
aViewData);
927 bool bVOutline = bOutlMode && lcl_HasRowOutline(
aViewData);
931 aPos.AdjustX(
pRowOutline[SC_SPLIT_BOTTOM]->GetDepthSize() );
933 aPos.AdjustY(
pColOutline[SC_SPLIT_LEFT]->GetDepthSize() );
938 aPos.AdjustX(
pRowBar[SC_SPLIT_BOTTOM]->GetSizePixel().
Width() );
940 aPos.AdjustY(
pColBar[SC_SPLIT_LEFT]->GetSizePixel().
Height() );
954 if (pData && pData->
GetMode() == CommandWheelMode::ZOOM)
972 bool bSyncZoom =
SC_MOD()->GetAppOptions().GetSynchronizeZoom();
975 SetZoom( aFract, aFract, bSyncZoom );
995 bDone =
pGridWin[ePos]->HandleScrollCommand( rCEvt, pHScroll, pVScroll );
1011 bool bHoriz = ( pScroll == aHScrollLeft.get() || pScroll == aHScrollRight.get() );
1014 nViewPos = aViewData.GetPosX( (pScroll == aHScrollLeft.get()) ?
1017 nViewPos = aViewData.GetPosY( (pScroll == aVScrollTop.get()) ?
1020 bool bLayoutRTL = aViewData.GetDocument().IsLayoutRTL( aViewData.GetTabNo() );
1023 if ( eType == ScrollType::Drag )
1028 nPrevDragPos = nViewPos;
1036 Size aSize = pScroll->GetSizePixel();
1044 Point aMousePos = pScroll->GetPointerPosPixel();
1045 if( pScroll->IsRTLEnabled() != pScroll->GetParent()->IsRTLEnabled() )
1046 aMousePos.setX( aSize.
Width() - aMousePos.X() - 1 );
1047 aMousePos = pScroll->OutputToNormalizedScreenPixel( aMousePos );
1050 Point aPos = pScroll->OutputToNormalizedScreenPixel(
Point() );
1054 if ( aViewData.GetHSplitMode()==
SC_SPLIT_FIX && pScroll == aHScrollRight.get() )
1055 nScrollMin = aViewData.GetFixPosX();
1056 if ( aViewData.GetVSplitMode()==
SC_SPLIT_FIX && pScroll == aVScrollBottom.get() )
1057 nScrollMin = aViewData.GetFixPosY();
1058 tools::Long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin;
1065 aHelpStr =
ScResId(STR_COLUMN) +
1068 aRect.
SetLeft( aMousePos.X() );
1069 aRect.
SetTop( aPos.Y() - 4 );
1070 nAlign = QuickHelpFlags::Bottom|QuickHelpFlags::Center;
1075 " " + OUString::number(nScrollPos + 1);
1078 aRect.
SetLeft( bLayoutRTL ? (aPos.X() + aSize.
Width() + 8) : (aPos.X() - 8) );
1079 aRect.
SetTop( aMousePos.Y() );
1080 nAlign = (bLayoutRTL ? QuickHelpFlags::Left : QuickHelpFlags::Right) | QuickHelpFlags::VCenter;
1092 case ScrollType::LineUp:
1095 case ScrollType::LineDown:
1098 case ScrollType::PageUp:
1099 if ( pScroll == aHScrollLeft.get() ) nDelta = -static_cast<tools::Long>(aViewData.PrevCellsX(
SC_SPLIT_LEFT ));
1100 if ( pScroll == aHScrollRight.get() ) nDelta = -static_cast<tools::Long>(aViewData.PrevCellsX( SC_SPLIT_RIGHT ));
1101 if ( pScroll == aVScrollTop.get() ) nDelta = -static_cast<tools::Long>(aViewData.PrevCellsY(
SC_SPLIT_TOP ));
1102 if ( pScroll == aVScrollBottom.get() ) nDelta = -static_cast<tools::Long>(aViewData.PrevCellsY( SC_SPLIT_BOTTOM ));
1103 if (nDelta==0) nDelta=-1;
1105 case ScrollType::PageDown:
1106 if ( pScroll == aHScrollLeft.get() ) nDelta = aViewData.VisibleCellsX(
SC_SPLIT_LEFT );
1107 if ( pScroll == aHScrollRight.get() ) nDelta = aViewData.VisibleCellsX( SC_SPLIT_RIGHT );
1108 if ( pScroll == aVScrollTop.get() ) nDelta = aViewData.VisibleCellsY(
SC_SPLIT_TOP );
1109 if ( pScroll == aVScrollBottom.get() ) nDelta = aViewData.VisibleCellsY( SC_SPLIT_BOTTOM );
1110 if (nDelta==0) nDelta=1;
1112 case ScrollType::Drag:
1116 if ( aViewData.GetHSplitMode()==
SC_SPLIT_FIX && pScroll == aHScrollRight.get() )
1117 nScrollMin = aViewData.GetFixPosX();
1118 if ( aViewData.GetVSplitMode()==
SC_SPLIT_FIX && pScroll == aVScrollBottom.get() )
1119 nScrollMin = aViewData.GetFixPosY();
1121 tools::Long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin;
1122 nDelta = nScrollPos - nViewPos;
1123 if ( nScrollPos > nPrevDragPos )
1125 if (nDelta<0) nDelta=0;
1127 else if ( nScrollPos < nPrevDragPos )
1129 if (nDelta>0) nDelta=0;
1133 nPrevDragPos = nScrollPos;
1144 bool bUpdate = ( eType != ScrollType::Drag );
1146 ScrollX( nDelta, (pScroll == aHScrollLeft.get()) ?
SC_SPLIT_LEFT : SC_SPLIT_RIGHT, bUpdate );
1148 ScrollY( nDelta, (pScroll == aVScrollTop.get()) ?
SC_SPLIT_TOP : SC_SPLIT_BOTTOM, bUpdate );
1156 SCCOL nNewX = nOldX +
static_cast<SCCOL>(nDeltaX);
1162 if ( nNewX > rDoc.
MaxCol() )
1164 nDeltaX -= nNewX - rDoc.
MaxCol();
1168 SCCOL nDir = ( nDeltaX > 0 ) ? 1 : -1;
1171 nNewX+nDir >= 0 && nNewX+nDir <= rDoc.
MaxCol() )
1172 nNewX = sal::static_int_cast<SCCOL>( nNewX + nDir );
1192 if ( nNewX >= 0 && nNewX <= rDoc.
MaxCol() && nDeltaX )
1194 SCCOL nTrackX = std::max( nOldX, nNewX );
1201 pColBar[eWhich]->PaintImmediately();
1225 if (nDeltaX==1 || nDeltaX==-1)
1239 SCROW nNewY = nOldY +
static_cast<SCROW>(nDeltaY);
1245 if ( nNewY > rDoc.
MaxRow() )
1247 nDeltaY -= nNewY - rDoc.
MaxRow();
1251 SCROW nDir = ( nDeltaY > 0 ) ? 1 : -1;
1254 nNewY+nDir >= 0 && nNewY+nDir <= rDoc.
MaxRow() )
1275 if ( nNewY >= 0 && nNewY <= rDoc.
MaxRow() && nDeltaY )
1277 SCROW nTrackY = std::max( nOldY, nNewY );
1281 SCROW nUNew = nNewY;
1285 pRowBar[eWhich]->PaintImmediately();
1309 if (nDeltaY==1 || nDeltaY==-1)
1340 while ( nVis > 0 && rDoc.
GetRowHeight( nVis, nTab, &startRow,
nullptr ) == 0 )
1341 nVis = std::max<SCROW>( startRow - 1, 0 );
1358 if ( pWhich && *pWhich == SC_SPLIT_BOTTOM && pPosY )
1363 if (nEndPos > rDoc.
MaxRow())
1374 if (nTopEnd > rDoc.
MaxRow())
1377 if ( nTopEnd > nEndPos )
1390 tools::Long nWidth = nBig - ( 10000 - nEndPos ) * nDiff / 10000;
1411 OSL_ENSURE(pWin || !bShow,
"window is not present");
1422 bool bHOutline = bOutlMode && lcl_HasColOutline(
aViewData);
1423 bool bVOutline = bOutlMode && lcl_HasRowOutline(
aViewData);
1430 bHScrollMode = bVScrollMode = bTabMode = bHeader = bHOutline = bVOutline =
false;
1460 if (bShowH && bHeader && !
pColBar[SC_SPLIT_RIGHT])
1463 if (bShowV && bHeader && !
pRowBar[SC_SPLIT_TOP])
1499 bool bChanged =
false;
1502 if (!pWin || !pWin->IsVisible())
1505 if (pWin->UpdateVisibleRange())
1516 if ( pSplitter == pHSplitter )
1517 DoHSplit( pHSplitter->GetSplitPosPixel() );
1519 DoVSplit( pVSplitter->GetSplitPosPixel() );
1522 FreezeSplitters(
true );
1524 DoResize( aBorderPos, aFrameSize );
1548 if ( nSplitPos < nMinPos || nSplitPos > nMaxPos )
1553 if ( aNewMode == aOldMode )
1569 if ( nLeftWidth < 0 ) nLeftWidth = 0;
1571 static_cast<sal_uInt16>(nLeftWidth) );
1573 if ( nNewDelta > rDoc.
MaxCol() )
1574 nNewDelta = rDoc.
MaxCol();
1588 pWin->SetMapMode( pWin->GetDrawMapMode() );
1612 if ( nSplitPos < nMinPos || nSplitPos > nMaxPos )
1617 if ( aNewMode == aOldMode )
1641 if ( nTopHeight < 0 ) nTopHeight = 0;
1643 static_cast<sal_uInt16>(nTopHeight) );
1645 if ( nNewDelta > rDoc.
MaxRow() )
1646 nNewDelta = rDoc.
MaxRow();
1660 pWin->SetMapMode( pWin->GetDrawMapMode() );
1683 return Point(nPosX,nPosY);
1701 OSL_ENSURE( pWin,
"Window not found" );
1716 bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
1722 if ( aVisible.Left() * nLayoutSign > nDocX * nLayoutSign )
1723 aVisible.SetLeft( nDocX );
1724 if ( aVisible.Right() * nLayoutSign > nDocX * nLayoutSign )
1725 aVisible.SetRight( nDocX );
1726 if ( aVisible.Top() > nDocY )
1727 aVisible.SetTop( nDocY );
1728 if ( aVisible.Bottom() > nDocY )
1729 aVisible.SetBottom( nDocY );
1736 if (bLOKActive && bLayoutRTL)
1741 aVisible =
tools::Rectangle(-aVisible.Right(), aVisible.Top(), -aVisible.Left(), aVisible.Bottom());
1749 bool bFitLeft = ( nLeftSpace >= nNeededWidth );
1750 bool bFitRight = ( nRightSpace >= nNeededWidth );
1752 if ( bFitLeft || bFitRight )
1757 bool bPutLeft = bFitLeft && ( bLayoutRTL || !bFitRight );
1760 aInsertPos.setX( aSelection.
Left() - nNeededWidth );
1762 aInsertPos.setX( aSelection.
Right() + 1 );
1765 aInsertPos.setY( std::max( aSelection.
Top(), aVisible.Top() ) );
1767 else if ( nTopSpace >= nNeededHeight || nBottomSpace >= nNeededHeight )
1770 if ( nBottomSpace > nNeededHeight )
1771 aInsertPos.setY( aSelection.
Bottom() + 1 );
1773 aInsertPos.setY( aSelection.
Top() - nNeededHeight );
1777 aInsertPos.setX( std::min( aSelection.
Right(), aVisible.Right() ) - nNeededWidth + 1 );
1779 aInsertPos.setX( std::max( aSelection.
Left(), aVisible.Left() ) );
1786 aInsertPos.setX( aSelection.
Left() - nNeededWidth );
1788 aInsertPos.setX( aSelection.
Right() + 1 );
1789 aInsertPos.setY( std::max( aSelection.
Top(), aVisible.Top() ) );
1795 if ( aCompareRect.
Right() > aVisible.Right() )
1796 aInsertPos.AdjustX( -(aCompareRect.
Right() - aVisible.Right()) );
1797 if ( aCompareRect.
Bottom() > aVisible.Bottom() )
1798 aInsertPos.AdjustY( -(aCompareRect.
Bottom() - aVisible.Bottom()) );
1800 if ( aInsertPos.X() < aVisible.Left() )
1801 aInsertPos.setX( aVisible.Left() );
1802 if ( aInsertPos.Y() < aVisible.Top() )
1803 aInsertPos.setY( aVisible.Top() );
1808 aInsertPos.AdjustX(nBorder );
1809 aInsertPos.AdjustY(nBorder );
1828 OSL_ENSURE( pWin,
"Window not found" );
1843 bool bCenterHor =
false;
1861 bool bFitLeft = ( aObjAbs.
Left() - aDesktop.
Left() >= rDialogSize.
Width() + aSpace.
Width() );
1862 bool bFitRight = ( aDesktop.
Right() - aObjAbs.
Right() >= rDialogSize.
Width() + aSpace.
Width() );
1864 if ( bFitLeft || bFitRight )
1867 bool bPutRight = bFitRight && ( bLayoutRTL || !bFitLeft );
1869 aRet.setX( aObjAbs.
Right() + aSpace.
Width() );
1871 aRet.setX( aObjAbs.
Left() - rDialogSize.
Width() - aSpace.
Width() );
1887 if ( aRet.X() + rDialogSize.
Width() - 1 > aDesktop.
Right() )
1888 aRet.setX( aDesktop.
Right() - rDialogSize.
Width() + 1 );
1889 if ( aRet.X() < aDesktop.
Left() )
1890 aRet.setX( aDesktop.
Left() );
1891 if ( aRet.Y() + rDialogSize.
Height() - 1 > aDesktop.
Bottom() )
1892 aRet.setY( aDesktop.
Bottom() - rDialogSize.
Height() + 1 );
1893 if ( aRet.Y() < aDesktop.
Top() )
1894 aRet.setY( aDesktop.
Top() );
1955 aSplit.setX( nSplitPos - aWinStart.X() );
1963 nPosX =
static_cast<SCCOL>(nFreezeIndex);
1967 nPosY =
static_cast<SCROW>(nFreezeIndex);
1973 switch(eSplitMethod)
1978 nPosY =
static_cast<SCROW>(nFreezeIndex);
1983 nPosX =
static_cast<SCCOL>(nFreezeIndex);
1997 SCROW nBottomPos = nPosY;
1999 SCCOL nRightPos = nPosX;
2033 tools::Long nSplitPos = aSplit.X() + aWinStart.X();
2060 p->SetMapMode(
p->GetDrawMapMode() );
2096 DoHSplit( aSplit.X() + aWinStart.X() );
2100 DoVSplit( aSplit.Y() + aWinStart.Y() );
2110 if ( rPixel.X() > 0 )
2114 if ( rPixel.Y() > 0 )
2143 aOldMode[i] =
pGridWin[i]->GetMapMode();
2144 aDrawMode[i] =
pGridWin[i]->GetDrawMapMode();
2145 if (aDrawMode[i] != aOldMode[i])
2146 pGridWin[i]->SetMapMode(aDrawMode[i]);
2158 if (
pGridWin[i] && aDrawMode[i] != aOldMode[i])
2160 pGridWin[i]->flushOverlayManager();
2161 pGridWin[i]->SetMapMode(aOldMode[i]);
2169 if (xController.is())
2171 ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
2202 case sheet::DataPilotFieldOrientation_PAGE:
2208 case sheet::DataPilotFieldOrientation_COLUMN:
2209 case sheet::DataPilotFieldOrientation_ROW:
2242 p->EnableInput(bFlag,
false);
2245 p->EnableInput(bFlag,
false);
2248 p->EnableInput(bFlag,
false);
2276 pWin->ResetAutoSpell();
2287 pWin->ResetAutoSpellForContentChange();
2298 pWin->SetAutoSpellData(nPosX, nPosY, pRanges);
2319 rGroupIndexes.clear();
2320 const size_t nGroupDepth = rArray.
GetDepth();
2321 rGroupIndexes.resize(nGroupDepth);
2324 for (
size_t nLevel = 0; nLevel < nGroupDepth; ++nLevel)
2338 if (pPrevEntry && nStart < pPrevEntry->GetEnd())
2359 while (nIndex < rArray.
GetCount(nLevel))
2367 if (pEntry && pEntry->
GetStart() > nEnd)
2375 rGroupIndexes[nLevel] = bFound ? nIndex : -1;
2380 void lcl_createGroupsData(
2382 const ScOutlineArray& rArray, std::vector<size_t>& rGroupIndexes,
2383 std::vector<tools::Long>& rGroupStartPositions, OStringBuffer& rGroupsBuffer)
2385 const size_t nGroupDepth = rArray.
GetDepth();
2387 for (
size_t nLevel = nGroupDepth - 1; nLevel != size_t(-1); --nLevel)
2389 size_t nIndex = rGroupIndexes[nLevel];
2390 if (nIndex ==
size_t(-1))
2395 if (nHeaderIndex < pEntry->GetStart())
2399 else if (nHeaderIndex == pEntry->
GetStart())
2401 rGroupStartPositions[nLevel] = nTotalPx - nSizePx;
2403 else if (nHeaderIndex > pEntry->
GetStart() && (nHeaderIndex < nEnd && nHeaderIndex < pEntry->
GetEnd()))
2406 if (rGroupStartPositions[nLevel] < 0)
2407 rGroupStartPositions[nLevel] *= -1;
2410 if (nHeaderIndex == pEntry->
GetEnd() || (nHeaderIndex == nEnd && rGroupStartPositions[nLevel] != -1))
2415 auto len = rGroupsBuffer.getLength();
2416 if (len && rGroupsBuffer[len-1] ==
'}')
2418 rGroupsBuffer.append(
", ");
2421 bool bGroupHidden = pEntry->
IsHidden();
2423 rGroupsBuffer.append(
2424 "{ \"level\": " + OString::number(nLevel + 1) +
", "
2425 "\"index\": " + OString::number(nIndex) +
", "
2426 "\"startPos\": " + OString::number(rGroupStartPositions[nLevel]) +
", "
2427 "\"endPos\": " + OString::number(nTotalPx) +
", "
2428 "\"hidden\": " + OString::number(bGroupHidden ? 1 : 0) +
" }");
2431 bool bFound =
false;
2433 while (nIndex < rArray.
GetCount(nLevel))
2435 pEntry = rArray.
GetEntry(nLevel, nIndex);
2441 if (pEntry && pEntry->
GetStart() > nEnd)
2447 rGroupIndexes[nLevel] = bFound ? nIndex : -1;
2448 rGroupStartPositions[nLevel] = -1;
2454 class ScRangeProvider
2459 mrViewData(rViewData)
2463 rArea.
Top() * mrViewData.GetPPTY(),
2464 rArea.
Right() * mrViewData.GetPPTX(),
2465 rArea.
Bottom() * mrViewData.GetPPTY());
2466 calculateBounds(aAreaPx);
2469 const ScRange& getCellRange()
const
2476 rStartColPos = maBoundPositions.Left();
2477 rEndColPos = maBoundPositions.Right();
2482 rStartRowPos = maBoundPositions.Top();
2483 rEndRowPos = maBoundPositions.Bottom();
2490 SCCOLROW nStartCol = -1, nEndCol = -1;
2491 calculateDimensionBounds(rAreaPx.
Left(), rAreaPx.
Right(),
true,
2492 nStartCol, nEndCol, nLeftPx, nRightPx,
2493 mnEnlargeX, mrViewData);
2495 SCCOLROW nStartRow = -1, nEndRow = -1;
2496 calculateDimensionBounds(rAreaPx.
Top(), rAreaPx.
Bottom(),
false,
2497 nStartRow, nEndRow, nTopPx, nBottomPx,
2498 mnEnlargeY, mrViewData);
2500 maRange.aStart.Set(nStartCol, nStartRow, mrViewData.GetTabNo());
2501 maRange.aEnd.Set(nEndCol, nEndRow, mrViewData.GetTabNo());
2503 maBoundPositions.SetLeft(nLeftPx);
2504 maBoundPositions.SetRight(nRightPx);
2505 maBoundPositions.SetTop(nTopPx);
2506 maBoundPositions.SetBottom(nBottomPx);
2511 bool bColumns,
SCCOLROW& rStartIndex,
2522 aBoundsProvider.
Compute(rStartNearest, rEndNearest, nStartPos, nEndPos);
2523 aBoundsProvider.EnlargeBy(nEnlarge);
2526 SCCOL nStartCol = -1, nEndCol = -1;
2527 aBoundsProvider.GetStartIndexAndPosition(nStartCol, rBoundStart);
2528 aBoundsProvider.GetEndIndexAndPosition(nEndCol, rBoundEnd);
2529 rStartIndex = nStartCol;
2530 rEndIndex = nEndCol;
2534 SCROW nStartRow = -1, nEndRow = -1;
2535 aBoundsProvider.GetStartIndexAndPosition(nStartRow, rBoundStart);
2536 aBoundsProvider.GetEndIndexAndPosition(nEndRow, rBoundEnd);
2537 rStartIndex = nStartRow;
2538 rEndIndex = nEndRow;
2547 static const SCCOLROW mnEnlargeX = 2;
2548 static const SCCOLROW mnEnlargeY = 2;
2551 void lcl_ExtendTiledDimension(
bool bColumn,
const SCCOLROW nEnd,
const SCCOLROW nExtra,
2560 if (nMaxTiledIndex >= nHardLimit)
2563 if (nEnd <= nMaxTiledIndex - nExtra)
2568 comphelper::getFromUnoTunnel<ScModelObj>( pDocSh->
GetModel() ) :
nullptr;
2569 Size aOldSize(0, 0);
2573 SCCOLROW nNewMaxTiledIndex = std::min(std::max(nEnd, nMaxTiledIndex) + nExtra, nHardLimit);
2580 Size aNewSize(0, 0);
2584 if (aOldSize == aNewSize)
2593 tools::Rectangle(aOldSize.getWidth(), 0, aNewSize.getWidth(), aNewSize.getHeight()):
2594 tools::Rectangle(0, aOldSize.getHeight(), aNewSize.getWidth(), aNewSize.getHeight());
2604 std::stringstream ss;
2605 ss << aNewSize.Width() <<
", " << aNewSize.Height();
2606 OString sSize = ss.str().c_str();
2607 ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(
2623 rJsonWriter.
put(
"commandName",
".uno:ViewRowColumnHeaders");
2626 SCROW nStartRow = -1;
2629 SCCOL nStartCol = -1;
2637 ScRangeProvider aRangeProvider(rRectangle,
false,
aViewData);
2638 const ScRange& rCellRange = aRangeProvider.getCellRange();
2644 if (rRectangle.
Top() < rRectangle.
Bottom())
2646 SAL_INFO(
"sc.lok.header",
"Row Header: compute start/end rows.");
2649 nEndRow = rCellRange.
aEnd.
Row();
2650 aRangeProvider.getRowPositions(nStartHeightPx, nEndHeightPx);
2661 sal_Int32 nVisibleRows = nEndRow - nStartRow;
2662 if (nVisibleRows < 25)
2665 SAL_INFO(
"sc.lok.header",
"Row Header: visible rows: " << nVisibleRows);
2674 size_t nRowGroupDepth = 0;
2675 std::vector<size_t> aRowGroupIndexes;
2676 if (bRangeHeaderSupport && pTable)
2678 nRowGroupDepth = pRowArray->
GetDepth();
2679 lcl_getGroupIndexes(*pRowArray, nStartRow, nEndRow, aRowGroupIndexes);
2684 lcl_ExtendTiledDimension(
false, nEndRow, nVisibleRows, *
this,
aViewData);
2690 OStringBuffer aRowGroupsBuffer =
"\"rowGroups\": [\n";
2692 auto rowsNode = rJsonWriter.
startArray(
"rows");
2694 SAL_INFO(
"sc.lok.header",
"Row Header: [create string data for rows]: start row: "
2695 << nStartRow <<
" start height: " << nTotalPixels);
2697 if (nStartRow != nEndRow)
2700 rJsonWriter.
put(
"text", nStartRow + 1);
2701 rJsonWriter.
put(
"size", nTotalPixels);
2702 rJsonWriter.
put(
"groupLevels", static_cast<sal_Int64>(nRowGroupDepth));
2705 std::vector<tools::Long> aRowGroupStartPositions(nRowGroupDepth, -nTotalPixels);
2706 for (
SCROW nRow = nStartRow + 1; nRow <= nEndRow; ++nRow)
2710 nTotalPixels += nSizePx;
2712 if (bRangeHeaderSupport && nRowGroupDepth > 0)
2714 lcl_createGroupsData(nRow, nEndRow, nSizePx, nTotalPixels,
2715 *pRowArray, aRowGroupIndexes, aRowGroupStartPositions,
2719 if (bRangeHeaderSupport && nRow < nEndRow && nSizePx == nPrevSizePx)
2721 nPrevSizePx = nSizePx;
2725 rJsonWriter.
put(
"size", nTotalPixels);
2728 aRowGroupsBuffer.append(
"]");
2730 if (nRowGroupDepth > 0)
2732 aRowGroupsBuffer.append(
",\n");
2733 rJsonWriter.
putRaw(aRowGroupsBuffer);
2742 if (rRectangle.
Left() < rRectangle.
Right())
2744 SAL_INFO(
"sc.lok.header",
"Column Header: compute start/end columns.");
2747 nEndCol = rCellRange.
aEnd.
Col();
2748 aRangeProvider.getColPositions(nStartWidthPx, nEndWidthPx);
2759 sal_Int32 nVisibleCols = nEndCol - nStartCol;
2760 if (nVisibleCols < 10)
2769 size_t nColGroupDepth = 0;
2770 std::vector<size_t> aColGroupIndexes;
2771 if (bRangeHeaderSupport && pTable)
2773 nColGroupDepth = pColArray->
GetDepth();
2774 lcl_getGroupIndexes(*pColArray, nStartCol, nEndCol, aColGroupIndexes);
2779 lcl_ExtendTiledDimension(
true, nEndCol, nVisibleCols, *
this,
aViewData);
2782 OStringBuffer aColGroupsBuffer =
"\"columnGroups\": [\n";
2784 auto columnsNode = rJsonWriter.
startArray(
"columns");
2786 nTotalPixels = nStartWidthPx;
2787 SAL_INFO(
"sc.lok.header",
"Col Header: [create string data for cols]: start col: "
2788 << nStartRow <<
" start width: " << nTotalPixels);
2790 if (nStartCol != nEndCol)
2793 rJsonWriter.
put(
"text", static_cast<sal_Int64>(nStartCol + 1));
2794 rJsonWriter.
put(
"size", nTotalPixels);
2795 rJsonWriter.
put(
"groupLevels", static_cast<sal_Int64>(nColGroupDepth));
2798 std::vector<tools::Long> aColGroupStartPositions(nColGroupDepth, -nTotalPixels);
2800 for (
SCCOL nCol = nStartCol + 1; nCol <= nEndCol; ++nCol)
2804 nTotalPixels += nSizePx;
2806 if (bRangeHeaderSupport && nColGroupDepth > 0)
2807 lcl_createGroupsData(nCol, nEndCol, nSizePx, nTotalPixels,
2808 *pColArray, aColGroupIndexes,
2809 aColGroupStartPositions, aColGroupsBuffer);
2811 if (bRangeHeaderSupport && nCol < nEndCol && nSizePx == nPrevSizePx)
2813 nPrevSizePx = nSizePx;
2815 OUString aText = bRangeHeaderSupport ?
2819 rJsonWriter.
put(
"text", aText);
2820 rJsonWriter.
put(
"size", nTotalPixels);
2823 aColGroupsBuffer.append(
"]");
2825 if (nColGroupDepth > 0)
2827 aColGroupsBuffer.append(
",\n");
2828 rJsonWriter.
putRaw(aColGroupsBuffer);
2835 aNewVisArea.
Exclude(aOldVisArea);
2845 bool bFiltered,
bool bGroups)
2849 boost::property_tree::ptree aTree;
2850 aTree.put(
"commandName",
".uno:SheetGeometryData");
2851 aTree.put(
"maxtiledcolumn", rDoc.
MaxCol());
2854 auto getJSONString = [](
const boost::property_tree::ptree& rTree) {
2855 std::stringstream aStream;
2856 boost::property_tree::write_json(aStream, rTree);
2857 return aStream.str();
2860 if ((!bSizes && !bHidden && !bFiltered && !bGroups) ||
2861 (!bColumns && !bRows))
2863 return getJSONString(aTree).c_str();
2873 const GeomEntry aGeomEntries[] = {
2880 struct DimensionEntry
2887 const DimensionEntry aDimEntries[] = {
2888 {
"columns",
true, bColumns },
2889 {
"rows",
false, bRows }
2894 for (
const auto& rDimEntry : aDimEntries)
2896 if (!rDimEntry.bEnabled)
2899 bool bDimIsCol = rDimEntry.bDimIsCol;
2901 boost::property_tree::ptree aDimTree;
2902 for (
const auto& rGeomEntry : aGeomEntries)
2904 if (!rGeomEntry.bEnabled)
2907 OString aGeomDataEncoding = rDoc.
dumpSheetGeomData(nTab, bDimIsCol, rGeomEntry.eType);
2909 aDimTree.put(rGeomEntry.pKey, aGeomDataEncoding.getStr());
2912 aTree.add_child(rDimEntry.pKey, aDimTree);
2915 return getJSONString(aTree).c_str();
2921 "extendTiledAreaIfNeeded: START: ClientView: ColRange["
2928 if (rVisArea.Top() >= rVisArea.Bottom() ||
2929 rVisArea.Left() >= rVisArea.Right())
2936 ScRangeProvider aRangeProvider(rVisArea,
false,
aViewData);
2938 const ScRange& rCellRange = aRangeProvider.getCellRange();
2945 tools::Long nStartColPos, nEndColPos, nStartRowPos, nEndRowPos;
2946 aRangeProvider.getColPositions(nStartColPos, nEndColPos);
2947 aRangeProvider.getRowPositions(nStartRowPos, nEndRowPos);
2957 rWidthHelper.
insert(nStartCol, nStartColPos);
2964 rWidthHelper.
insert(nEndCol, nEndColPos);
2973 rHeightHelper.
insert(nStartRow, nStartRowPos);
2980 rHeightHelper.
insert(nEndRow, nEndRowPos);
2984 constexpr
SCCOL nMinExtraCols = 10;
2985 SCCOL nExtraCols = std::max<SCCOL>(nMinExtraCols, nEndCol - nStartCol);
2988 lcl_ExtendTiledDimension(
true, nEndCol, nExtraCols, *
this,
aViewData);
2990 constexpr
SCROW nMinExtraRows = 25;
2991 SCROW nExtraRows = std::max(nMinExtraRows, nEndRow - nStartRow);
2994 lcl_ExtendTiledDimension(
false, nEndRow, nExtraRows, *
this,
aViewData);
2999 aNewVisCellRange.
Exclude(aOldVisCellRange);
3001 if (!aChangedCellRange.
IsEmpty())
3005 aChangedCellRange.
Right(), aChangedCellRange.
Bottom());
3009 "extendTiledAreaIfNeeded: END: ClientView: ColRange["
virtual Point GetPosPixel() const
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
void SetVSplitMode(ScSplitMode eMode)
SvxZoomType GetZoomType() const
virtual void EnableRTL(bool bEnable=true) override
void LaunchDPFieldMenu(SCCOL nCol, SCROW nRow)
void SelectAll(bool bContinue=false)
void SetDragRectPixel(const tools::Rectangle &rDragRect, vcl::Window *pRefWin=nullptr)
void LaunchPageFieldMenu(SCCOL nCol, SCROW nRow)
void DoHSplit(tools::Long nSplitPos)
static void notifyInvalidation(SfxViewShell const *pThisView, tools::Rectangle const *)
ScDocShell * GetDocShell() const
void FreezeSplitters(bool bFreeze, SplitMethod eSplitMethod=SC_SPLIT_METHOD_CURSOR, SCCOLROW nFreezeIndex=-1)
static void notifyDocumentSizeChanged(SfxViewShell const *pThisView, const OString &rPayload, vcl::ITiledRenderable *pDoc, bool bInvalidateAll=true)
void Compute(value_type aFirstNearest, value_type aSecondNearest, tools::Long nFirstBound, tools::Long nSecondBound)
std::array< VclPtr< ScRowBar >, 2 > pRowBar
ScVSplitPos WhichV(ScSplitPos ePos)
OUString ScResId(TranslateId aId)
VclPtr< ScrollBar > aHScrollLeft
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
SC_DLLPUBLIC bool IsHidden() const
void SetFixPosY(SCROW nPos)
MapMode GetDrawMapMode(bool bForce=false)
MapMode for the drawinglayer objects.
void setWidth(tools::Long nWidth)
ScSplitPos FindWindow(const vcl::Window *pWindow) const
static void lcl_SetPosSize(vcl::Window &rWindow, const Point &rPos, const Size &rSize, tools::Long nTotalWidth, bool bLayoutRTL)
void LaunchDataSelectMenu(SCCOL nCol, SCROW nRow)
bool IsVScrollMode() const
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
virtual void EnableRTL(bool bEnable=true)
SCCOL mnLOKStartHeaderCol
VclPtr< ScrollBar > aVScrollBottom
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
const Fraction & GetZoomX() const
void SetSheetLayoutRTL(bool bSheetRTL)
void SetHSplitPos(tools::Long nPos)
VclPtr< ScrollBar > aHScrollRight
std::unique_ptr< sal_Int32[]> pData
SC_DLLPUBLIC SCCOLROW GetEnd() const
void RepeatResize(bool bUpdateFix=true)
Point GetChartInsertPos(const Size &rSize, const ScRange &rCellRange)
const StyleSettings & GetStyleSettings() const
ScHSplitPos WhichH(ScSplitPos ePos)
const Color & GetFaceColor() const
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
void ScColToAlpha(OUStringBuffer &rBuf, SCCOL nCol)
append alpha representation of column to buffer
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual Size GetSizePixel() const
SCROW GetMaxTiledRow() const
virtual void SetSizePixel(const Size &rNewSize)
double mfPendingTabBarWidth
VclPtr< ScTabSplitter > pHSplitter
void SetDocumentModified()
void InitScrollBar(ScrollBar &rScrollBar, tools::Long nMaxVal)
sal_uInt16 GetLockedModifiers() const
ScOutlineEntry * GetEntry(size_t nLevel, size_t nIndex)
SCROW mnLOKStartHeaderRow
OString dumpSheetGeomData(SCTAB nTab, bool bColumns, SheetGeomType eGeomType)
Serializes the specified sheet's geometry data.
ScSplitPos GetActivePart() const
void GetBorderSize(SvBorder &rBorder, const Size &rSize)
ScDocument & GetDocument() const
OString getSheetGeometryData(bool bColumns, bool bRows, bool bSizes, bool bHidden, bool bFiltered, bool bGroups)
tools::Rectangle GetDesktopRectPixel() const
void SetAutoSpellData(SCCOL nPosX, SCROW nPosY, const std::vector< editeng::MisspellRanges > *pRanges)
const CommandWheelData * GetWheelData() const
void insert(index_type nIndex, tools::Long nPos)
tools::Long GetTabBarWidth() const
Returns the current tab bar width in pixels.
void Invalidate(sal_uInt16 nId)
tools::Rectangle GetBoundRect() const
void LockModifiers(sal_uInt16 nModifiers)
css::chart::ChartAxisLabelPosition ePos
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
SCCOL CellsAtX(SCCOL nPosX, SCCOL nDir, ScHSplitPos eWhichX, sal_uInt16 nScrSizeY=SC_SIZE_NONE) const
SC_DLLPUBLIC void ScrollLines(tools::Long nDeltaX, tools::Long nDeltaY)
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
void ScrollX(tools::Long nDeltaX, ScHSplitPos eWhich, bool bUpdBars=true)
bool UpdateFixY(SCTAB nTab=MAXTAB+1)
bool GetEntryIndex(size_t nLevel, SCCOLROW nPos, size_t &rnIndex) const
constexpr tools::Long Width() const
void UpdateAutoFillMark(bool bFromPaste=false)
static tools::Long ToPixel(sal_uInt16 nTwips, double nFactor)
Reference< XController > xController
tools::Long GetVSplitPos() const
bool GetEntryIndexInRange(size_t nLevel, SCCOLROW nBlockStart, SCCOLROW nBlockEnd, size_t &rnIndex) const
SC_DLLPUBLIC SCROW MaxRow() const
std::array< VclPtr< ScGridWindow >, 4 > pGridWin
SC_DLLPUBLIC void SetRelTabBarWidth(double fRelTabBarWidth)
Sets a relative tab bar width.
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
void SetPosX(ScHSplitPos eWhich, SCCOL nNewPosX)
std::shared_ptr< sc::SpellCheckContext > mpSpellCheckCxt
void SetPendingRelTabBarWidth(double fRelTabBarWidth)
Sets a relative tab bar width.
void SetFixPosX(SCCOL nPos)
SfxFrame & GetFrame() const
void BroadcastAccessibility(const SfxHint &rHint)
void UpdateFormulas(SCCOL nStartCol=-1, SCROW nStartRow=-1, SCCOL nEndCol=-1, SCROW nEndRow=-1)
void ActivatePart(ScSplitPos eWhich)
SCCOL GetMaxTiledCol() const
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
ScSplitMode GetHSplitMode() const
void DrawLine(const Point &rStartPt, const Point &rEndPt)
const Fraction & GetZoomY() const
ScViewData & GetViewData()
ScGridWindow * GetActiveWin()
SC_DLLPUBLIC const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt16 nWhich) const
bool HasHintWindow() const
ScTabViewShell * GetViewShell() const
void EnableInput(bool bEnable=true, bool bChild=true)
bool IsHScrollMode() const
const Color & GetDarkShadowColor() const
void SetZoom(const Fraction &rNewX, const Fraction &rNewY, bool bAll)
SC_DLLPUBLIC SCCOL MaxCol() const
sal_Int32 GetScrollBarSize() const
SC_DLLPUBLIC bool ColHidden(SCCOL nCol, SCTAB nTab, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
bool ScrollCommand(const CommandEvent &rCEvt, ScSplitPos ePos)
void LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
VclPtr< ScTabControl > pTabControl
Point LogicToPixel(const Point &rLogicPt) const
bool IsModalMode(SfxObjectShell *pDocSh=nullptr)
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
void DoAddWin(ScGridWindow *pWin)
SC_DLLPUBLIC SCCOLROW GetStart() const
SfxBindings & GetBindings()
const ScOutlineArray & GetRowArray() const
void GetPosFromPixel(tools::Long nClickX, tools::Long nClickY, ScSplitPos eWhich, SCCOL &rPosX, SCROW &rPosY, bool bTestMerge=true, bool bRepair=false, SCTAB nForTab=-1)
void SetActivePointer(PointerStyle nPointer)
const ScOutlineArray & GetColArray() const
static void ShowHide(vcl::Window *pWin, bool bShow)
static bool IsQuickHelpEnabled()
size_t GetCount(size_t nLevel) const
const vcl::Font & GetTabFont() const
SfxBindings & GetBindings()
CommandWheelMode GetMode() const
void UpdateHeaderWidth(const ScVSplitPos *pWhich=nullptr, const SCROW *pPosY=nullptr)
tools::Long GetHSplitPos() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
const AllSettings & GetSettings() const
virtual void Start(bool bStartTimer=true) override
virtual css::uno::Reference< css::frame::XModel > GetCurrentDocument() const
const Size & GetFontSize() const
constexpr sal_Int32 TAB_HEIGHT_MARGIN
void DoVSplit(tools::Long nSplitPos)
void SetVSplitPos(tools::Long nPos)
const AllSettings & GetSettings() const
Point PixelToLogic(const Point &rDevicePt) const
VclPtr< ScrollBar > aVScrollTop
bool HasPageFieldDataAtCursor() const
sal_uInt16 CalcZoom(SvxZoomType eType, sal_uInt16 nOldZoom)
static SC_DLLPUBLIC double GetRelTabBarWidth()
Returns the current tab bar width relative to the frame window width (0.0 ...
void EnableAutoSpell(bool bEnable)
VclPtr< ScrollBarBox > aScrollBarBox
void UpdateSelectionOverlay()
static void ShowQuickHelp(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rHelpText, QuickHelpFlags nStyle=QuickHelpFlags::NONE)
void UpdateScrollBars(HeaderType eHeaderType=BOTH_HEADERS)
Point OutputToAbsoluteScreenPixel(const Point &rPos) const
VclPtr< ScCornerButton > aTopButton
void EnableRefInput(bool bFlag)
virtual void SetPosSizePixel(const Point &rNewPos, const Size &rNewSize)
void extendTiledAreaIfNeeded()
float GetDPIScaleFactor() const
SheetGeomType
Represents the type of sheet geometry data.
constexpr sal_uInt16 nScrollBarSize
tools::Long const nBorder
std::array< VclPtr< ScOutlineWindow >, 2 > pColOutline
void GetMouseQuadrant(const Point &rClickPos, ScSplitPos eWhich, SCCOL nPosX, SCROW nPosY, bool &rLeft, bool &rTop)
bool mbInlineWithScrollbar
WinBits const WB_SIZEABLE
constexpr TypedWhichId< ScMergeFlagAttr > ATTR_MERGE_FLAG(145)
bool HasAccessibilityObjects() const
void Exclude(const tools::Rectangle &rRegion)
void ResetAutoSpellForContentChange()
void SetTimer(ScGridWindow *pWin, const MouseEvent &rMEvt)
bool UpdateFixX(SCTAB nTab=MAXTAB+1)
constexpr tools::Long Height() const
std::unique_ptr< ScHeaderSelectionEngine > pHdrSelEng
bool UpdateVisibleRange()
void getRowColumnHeaders(const tools::Rectangle &rRectangle, tools::JsonWriter &rJsonWriter)
const Point & GetMousePosPixel() const
void ScrollY(tools::Long nDeltaY, ScVSplitPos eWhich, bool bUpdBars=true)
bool IsHeaderMode() const
ScHeaderFunctionSet aHdrFunc
#define SAL_INFO(area, stream)
css::uno::Reference< css::frame::XController > GetController() const
VclPtr< ScCornerButton > aCornerButton
static VclPtr< reference_type > Create(Arg &&...arg)
VclPtr< ScTabSplitter > pVSplitter
void SetPosY(ScVSplitPos eWhich, SCROW nNewPosY)
SC_DLLPUBLIC ScOutlineTable * GetOutlineTable(SCTAB nTab, bool bCreate=false)
const value_type & getNearestByPosition(tools::Long nPos) const
css::sheet::DataPilotFieldOrientation GetDPFieldOrientation(SCCOL nCol, SCROW nRow) const
IMPL_LINK(ScTabView, ScrollHdl, ScrollBar *, pScroll, void)
tools::Long AdjustHeight(tools::Long n)
ScPositionHelper & GetLOKWidthHelper()
std::array< VclPtr< ScColBar >, 2 > pColBar
std::unique_ptr< ScViewSelectionEngine > pSelEngine
void AlignToCursor(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, const ScSplitPos *pWhich=nullptr)
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
IMPL_LINK_NOARG(ScTabView, TimerHdl, Timer *, void)
SC_DLLPUBLIC bool RowHidden(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Size GetOutputSizePixel() const
bool IsOutlineMode() const
void SetZoomType(SvxZoomType eNew, bool bAll)
VclPtr< vcl::Window > pFrameWin
void SetMaxTiledCol(SCCOL nCol)
tools::Long GetDelta() const
Point GetInsertPos() const
SCROW CellsAtY(SCROW nPosY, SCROW nDir, ScVSplitPos eWhichY, sal_uInt16 nScrSizeX=SC_SIZE_NONE) const
std::array< VclPtr< ScOutlineWindow >, 2 > pRowOutline
Point GetChartDialogPos(const Size &rDialogSize, const tools::Rectangle &rLogicChart)
void SetHSplitMode(ScSplitMode eMode)
#define SPLIT_HANDLE_SIZE
std::unique_ptr< ScDrawView > pDrawView
ScPositionHelper & GetLOKHeightHelper()
bool HasAutoFilter() const
void removeByIndex(index_type nIndex)
VclPtr< ScGridWindow > pTimerWindow
ScTabView(const ScTabView &)=delete
make noncopyable
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Point GetGridOffset() const
void SetTabBarWidth(tools::Long nNewWidth)
Sets an absolute tab bar width (in pixels).
void DoResize(const Point &rOffset, const Size &rSize, bool bInner=false)
SC_DLLPUBLIC bool IsVisible() const
void SetMaxTiledRow(SCROW nRow)
void SplitAtPixel(const Point &rPixel)
ScSplitMode GetVSplitMode() const
virtual Size getDocumentSize() override
bool m_bDetectedRangeSegmentation false
void Show(bool bVisible=true, ShowFlags nFlags=ShowFlags::NONE)