35 #include <rtl/math.hxx>
42 #include <document.hxx>
52 #include <unonames.hxx>
66 #include <com/sun/star/container/XNameContainer.hpp>
67 #include <com/sun/star/document/NamedPropertyValues.hpp>
71 #define SC_GROWY_SMALL_EXTRA 100
72 #define SC_GROWY_BIG_EXTRA 200
74 #define TAG_TABBARWIDTH "tw:"
84 { pOtherViewShell->RemoveWindowFromForeignEditView(pTabViewShell, eWhich); };
94 void collectUIInformation(
const std::map<OUString, OUString>& aParameters,
const OUString& rAction)
97 aDescription.
aID =
"grid_window";
100 aDescription.
aParent =
"MainWindow";
101 aDescription.
aKeyWord =
"ScGridWinUIObject";
111 if (rValue1.first == null || rValue2.first == null)
113 return rValue1.second < rValue2.second;
117 return rValue1.first < rValue2.first;
124 mData.insert(std::make_pair(-1, 0));
134 if (nIndex < 0)
return;
135 SAL_INFO(
"sc.lok.poshelper",
"ScPositionHelper::insert: nIndex: "
136 << nIndex <<
", nPos: " << nPos <<
", size: " <<
mData.size());
137 value_type aValue = std::make_pair(nIndex, nPos);
139 mData.insert(aValue);
141 "ScPositionHelper::insert: after insert: size: " <<
mData.size());
148 SAL_INFO(
"sc.lok.poshelper",
"ScPositionHelper::remove: nIndex: " << nIndex
149 <<
", size: " <<
mData.size());
150 auto it =
mData.find(std::make_pair(nIndex, 0));
151 if (it ==
mData.end())
return;
154 "ScPositionHelper::remove: after erase: size: " <<
mData.size());
159 SAL_INFO(
"sc.lok.poshelper",
"ScPositionHelper::invalidate: nIndex: " << nIndex);
163 mData.insert(std::make_pair(-1, 0));
167 auto it =
mData.lower_bound(std::make_pair(nIndex, 0));
174 SAL_INFO(
"sc.lok.poshelper",
"ScPositionHelper::invalidate: nPos: " << nPos);
178 mData.insert(std::make_pair(-1, 0));
182 auto it =
mData.lower_bound(std::make_pair(
null, nPos));
191 "ScPositionHelper::getNearest: nIndex: " << nIndex <<
", size: " <<
mData.size());
192 auto posUB =
mData.upper_bound(std::make_pair(nIndex, 0));
193 if (posUB ==
mData.begin())
198 auto posLB = std::prev(posUB);
200 if (posUB ==
mData.end())
207 if (nDiffUB < -nDiffLB)
221 "ScPositionHelper::getNearest: nPos: " << nPos <<
", size: " <<
mData.size());
222 auto posUB =
mData.upper_bound(std::make_pair(
null, nPos));
224 if (posUB ==
mData.begin())
229 auto posLB = std::prev(posUB);
231 if (posUB ==
mData.end())
239 if (nDiffUB < -nDiffLB)
251 auto it =
mData.find(std::make_pair(nIndex, 0));
252 if (it ==
mData.end())
return -1;
259 if (nIndex < 0) nIndex = 0;
266 if (nStartIndex < nIndex)
268 for (
index_type nIdx = nStartIndex + 1; nIdx <= nIndex; ++nIdx)
270 nTotalPixels += getSizePx(nIdx);
275 for (
index_type nIdx = nStartIndex; nIdx > nIndex; --nIdx)
277 nTotalPixels -= getSizePx(nIdx);
284 : rDoc(rView.GetDocument())
286 , bColumnHeader(bColHeader)
288 , mfPPTX(rView.GetPPTX())
289 , mfPPTY(rView.GetPPTY())
292 , nFirstPositionPx(-1)
293 , nSecondPositionPx(-1)
336 nFoundIndex, nPosition, bTowards);
339 nFoundIndex, nPosition, bTowards);
346 SAL_INFO(
"sc.lok.header",
"BoundsProvider: nFirstBound: " << nFirstBound
347 <<
", nSecondBound: " << nSecondBound);
349 tools::Long nFirstDiff = aFirstNearest.second - nFirstBound;
350 tools::Long nSecondDiff = aSecondNearest.second - nSecondBound;
351 SAL_INFO(
"sc.lok.header",
"BoundsProvider: rTopNearest: index: " << aFirstNearest.first
352 <<
", pos: " << aFirstNearest.second <<
", diff: " << nFirstDiff);
353 SAL_INFO(
"sc.lok.header",
"BoundsProvider: rBottomNearest: index: " << aSecondNearest.first
354 <<
", pos: " << aSecondNearest.second <<
", diff: " << nSecondDiff);
356 bool bReverse = (std::abs(nFirstDiff) >= std::abs(nSecondDiff));
360 std::swap(aFirstNearest, aSecondNearest);
361 std::swap(nFirstBound, nSecondBound);
362 std::swap(nFirstDiff, nSecondDiff);
365 index_type nNearestIndex = aFirstNearest.first;
366 tools::Long nNearestPosition = aFirstNearest.second;
367 SAL_INFO(
"sc.lok.header",
"BoundsProvider: nearest to first bound: nNearestIndex: "
368 << nNearestIndex <<
", nNearestPosition: " << nNearestPosition);
377 nNearestIndex = aSecondNearest.first;
378 nNearestPosition = aSecondNearest.second;
384 nSecondDiff = !bReverse ? -1 : 1;
386 SAL_INFO(
"sc.lok.header",
"BoundsProvider: nearest to second bound: nNearestIndex: "
387 << nNearestIndex <<
", nNearestPosition: " << nNearestPosition
388 <<
", diff: " << nSecondDiff);
405 std::max(static_cast<index_type>(-1),
435 for (
index_type nIndex = nNearestIndex; nIndex >= 0; --nIndex)
437 if (nBound >= nNearestPosition)
439 nFoundIndex = nIndex;
440 nPosition = nNearestPosition;
445 nNearestPosition -= nSizePx;
447 if (!bTowards && nFoundIndex != -1)
450 nPosition +=
GetSize(nFoundIndex);
462 nNearestPosition += nSizePx;
464 if (nNearestPosition > nBound)
466 nFoundIndex = nIndex;
467 nPosition = nNearestPosition;
471 if (nFoundIndex == -2)
474 nPosition = nNearestPosition;
478 nPosition -=
GetSize(nFoundIndex);
500 aWidthHelper(pDoc, true),
501 aHeightHelper(pDoc, false),
505 mbOldCursorValid( false )
526 beans::PropertyValue* pSettings = rSettings.getArray();
538 nExFixPosX, nExFixPosY,
539 nExHSplitPos, nExVSplitPos, nTab);
598 sal_Int32 nTemp32(0);
599 sal_Int16 nTemp16(0);
600 sal_Int32 nTempPosV(0);
601 sal_Int32 nTempPosH(0);
602 sal_Int32 nTempPosVTw(0);
603 sal_Int32 nTempPosHTw(0);
604 bool bHasVSplitInTwips =
false;
605 bool bHasHSplitInTwips =
false;
606 for (
const auto& rSetting : aSettings)
608 OUString
sName(rSetting.Name);
611 rSetting.Value >>= nTemp32;
616 rSetting.Value >>= nTemp32;
631 rSetting.Value >>= nTempPosH;
632 bHasHSplitInTwips =
false;
636 rSetting.Value >>= nTempPosV;
637 bHasVSplitInTwips =
false;
641 rSetting.Value >>= nTempPosHTw;
642 bHasHSplitInTwips =
true;
646 rSetting.Value >>= nTempPosVTw;
647 bHasVSplitInTwips =
true;
656 rSetting.Value >>= nTemp32;
661 rSetting.Value >>= nTemp32;
666 rSetting.Value >>= nTemp32;
671 rSetting.Value >>= nTemp32;
676 rSetting.Value >>= nTemp16;
682 rSetting.Value >>= nTemp32;
689 rSetting.Value >>= nTemp32;
700 bool bSelected =
false;
701 rSetting.Value >>= bSelected;
708 rSetting.Value >>= aColor;
774 pDocShell ( pDocSh ),
775 mrDoc (pDoc ? *pDoc : pDocSh->GetDocument()),
777 maOptions (pDocSh ? pDocSh->GetDocument().GetViewOptions() :
DefaultOptions()),
778 pSpellingView ( nullptr ),
783 aDefPageZoomX( 3,5 ),
784 aDefPageZoomY( 3,5 ),
803 bIsRefMode ( false ),
804 bDelMarkValid( false ),
805 bPagebreak ( false ),
806 bSelCtrlMouseClick( false ),
809 m_nLOKPageUpDownOffset( 0 )
811 assert(
bool(pDoc) !=
bool(pDocSh));
841 xTabData->InitData(
mrDoc);
872 if( nTab >= static_cast<SCTAB>(
maTabData.size()))
881 collectUIInformation({{}},
"InsertTab");
886 if (nTab >= static_cast<SCTAB>(
maTabData.size()))
895 for (
SCTAB i = nTab;
i < nTab + nNewSheets; ++
i)
939 OSL_FAIL(
"too many sheets");
943 if (nSrcTab >= static_cast<SCTAB>(
maTabData.size()))
944 OSL_FAIL(
"pTabData out of bounds, FIX IT");
961 std::unique_ptr<ScViewDataTable> pTab;
962 if (nSrcTab < static_cast<SCTAB>(
maTabData.size()))
968 if (nDestTab < static_cast<SCTAB>(
maTabData.size()))
983 for (
const auto& rTab : rvTabs )
989 bool bAll = tabs.empty();
1005 for (
const SCTAB&
i : tabs )
1015 std::vector< SCTAB > vTabs;
1019 vTabs.insert(vTabs.begin(), itr, itrEnd);
1026 bool bAll = tabs.empty();
1032 "fraction rNewX not sensible: " << static_cast<double>(rNewX));
1034 "fraction rNewY not sensible: " << static_cast<double>(rNewY));
1067 for (
const SCTAB&
i : tabs )
1089 std::vector< SCTAB > vTabs;
1093 vTabs.insert(vTabs.begin(), itr, itrEnd);
1095 SetZoom( rNewX, rNewY, vTabs );
1151 if ( nRow < 1 || nCol < 1 )
1181 aRange.
GetVars( rStartCol, rStartRow, rStartTab, rEndCol, rEndRow, rEndTab);
1276 const sal_Int32 kMax = 23 * 1024 * 1024;
1352 return maTabData[nForTab]->nPosX[eWhich];
1366 return maTabData[nForTab]->nPosY[eWhich];
1371 if (!
ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(
maTabData.size())))
1379 if (!
ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(
maTabData.size())))
1387 if (!
ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(
maTabData.size())))
1395 if (!
ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(
maTabData.size())))
1406 auto GetColWidthPx = [
this, nTab](
SCCOL nCol) {
1414 SAL_INFO(
"sc.lok.docsize",
"ScViewData::SetMaxTiledCol: nNewMaxCol: "
1415 << nNewMaxCol <<
", nTotalPixels: " << nTotalPixels);
1431 auto GetRowHeightPx = [
this, nTab](
SCROW nRow) {
1439 SAL_INFO(
"sc.lok.docsize",
"ScViewData::SetMaxTiledRow: nNewMaxRow: "
1440 << nNewMaxRow <<
", nTotalPixels: " << nTotalPixels);
1450 bool bForceToTop,
bool bInPrintTwips )
1452 Point aCellTopLeft = bInPrintTwips ?
1468 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
1470 bool bWasThere =
false;
1481 pEditView[eWhich]->SetEditEngine(pNewEngine);
1484 if (
pEditView[eWhich]->GetWindow() != pWin)
1488 OSL_FAIL(
"EditView Window has changed");
1498 pEditView[eWhich]->SetBroadcastLOKViewCursor(bLOKPrintTwips);
1504 if (!bWasThere && bLOKActive)
1509 [pThisViewShell, nThisTabNo, eWhich] (
ScTabViewShell* pOtherViewShell)
1511 ScViewData& rOtherViewData = pOtherViewShell->GetViewData();
1513 if (nThisTabNo == nOtherTabNo)
1514 pOtherViewShell->AddWindowToForeignEditView(pThisViewShell, eWhich);
1526 pEditView[eWhich]->SetControlWord(nVC & ~EVControlBits::AUTOSCROLL);
1533 bool bBreak = ( eJust == SvxCellHorJustify::Block ) ||
1536 bool bAsianVertical = pNewEngine->
IsVertical();
1552 if (
GetEditAdjust() == SvxAdjust::Right || bAsianVertical )
1561 if (!
pEditView[eWhich]->HasLOKSpecialPositioning())
1562 pEditView[eWhich]->InitLOKSpecialPositioning(MapUnit::MapTwip, aPTwipsRect,
Point());
1564 pEditView[eWhich]->SetLOKSpecialOutputArea(aPTwipsRect);
1568 pEditView[eWhich]->SetOutputArea( aOutputArea );
1590 bool bGrowCentered = ( eJust == SvxCellHorJustify::Center );
1591 bool bGrowToLeft = ( eJust == SvxCellHorJustify::Right );
1592 if ( bAsianVertical )
1593 bGrowCentered = bGrowToLeft =
false;
1599 tools::Long nGridWidthTwips = 0, nGridHeightTwips = 0;
1602 Size aGridSize(nGridWidthPx, nGridHeightPx);
1606 rWinMapMode,
MapMode(MapUnit::MapTwip));
1607 nGridWidthTwips = aGridSize.
Width();
1608 nGridHeightTwips = aGridSize.
Height();
1611 if (bBreak && !bAsianVertical)
1615 nSizeXPTwips = aPTwipsRect.
GetWidth();
1619 OSL_ENSURE(
pView,
"no View for EditView");
1621 if ( bGrowCentered )
1627 nSizeXPix = aPixRect.
GetWidth() + 2 * std::min( nLeft, nRight );
1632 nSizeXPTwips = aPTwipsRect.
GetWidth() + 2 * std::min(nLeftPTwips, nRightPTwips);
1635 else if ( bGrowToLeft )
1637 nSizeXPix = aPixRect.
Right();
1639 nSizeXPTwips = aPTwipsRect.
Right();
1643 nSizeXPix = nGridWidthPx - aPixRect.
Left();
1645 nSizeXPTwips = nGridWidthTwips - aPTwipsRect.
Left();
1648 if ( nSizeXPix <= 0 )
1652 nSizeXPTwips = aPTwipsRect.
GetWidth();
1655 OSL_ENSURE(
pView,
"no View for EditView");
1657 tools::Long nSizeYPTwips = bLOKPrintTwips ? (nGridHeightTwips - aPTwipsRect.
Top()) : 0;
1659 if ( nSizeYPix <= 0 )
1667 Size aPaperSizePTwips(nSizeXPTwips, nSizeYPTwips);
1668 if ( bBreak && !bAsianVertical &&
SC_MOD()->GetInputOptions().GetTextWysiwyg() )
1679 aUtilRect.
GetWidth(), MapUnit::Map100thMM, MapUnit::MapTwip));
1691 aVisPTwips =
pEditView[eWhich]->GetLOKSpecialVisArea();
1706 aVisPTwips.
SetRight( ( aPaperSizePTwips.
Width() - 1 + nDiffPTwips ) / 2 );
1727 pEditView[eWhich]->SetLOKSpecialVisArea(aVisPTwips);
1738 if (aDocPos.Y() < aOutputArea.
Top())
1755 pEditView[eWhich]->SetBackgroundColor( aBackCol );
1764 if (nStatus & (EditStatusFlags::HSCROLL | EditStatusFlags::TextHeightChanged | EditStatusFlags::TEXTWIDTHCHANGED | EditStatusFlags::CURSOROUT))
1769 if (nStatus & EditStatusFlags::CURSOROUT)
1772 if (pEditView[eWhich])
1773 pEditView[eWhich]->ShowCursor(
false);
1792 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
1828 bool bChanged =
false;
1834 bool bGrowCentered = ( eJust == SvxCellHorJustify::Center );
1835 bool bGrowToLeft = ( eJust == SvxCellHorJustify::Right );
1836 bool bGrowBackwards = bGrowToLeft;
1838 bGrowBackwards = !bGrowBackwards;
1839 if ( bAsianVertical )
1840 bGrowCentered = bGrowToLeft = bGrowBackwards =
false;
1842 bool bUnevenGrow =
false;
1843 if ( bGrowCentered )
1856 nLogicLeftPTwips = nColWidth;
1867 nLogicRightPTwips = nColWidth;
1870 aArea.
AdjustLeft( -(bLayoutRTL ? nLogicRight : nLogicLeft) );
1871 aArea.
AdjustRight(bLayoutRTL ? nLogicLeft : nLogicRight );
1874 aAreaPTwips.
AdjustLeft( -(bLayoutRTL ? nLogicRightPTwips : nLogicLeftPTwips) );
1875 aAreaPTwips.
AdjustRight(bLayoutRTL ? nLogicLeftPTwips : nLogicRightPTwips );
1882 aArea.
SetLeft( nCenter - nHalf + 1 );
1889 aAreaPTwips.
SetLeft( nCenterPTwips - nHalfPTwips + 1 );
1890 aAreaPTwips.
SetRight( nCenterPTwips + aSizePTwips.
Width() - nHalfPTwips - 1 );
1895 if ( nLogicLeft != nLogicRight )
1899 else if ( bGrowBackwards )
1913 aAreaPTwips.
AdjustLeft( -nLogicWidthPTwips );
1954 aAreaPTwips.
AdjustLeft( -nLogicWidthPTwips );
1986 if (
bMoveArea || bGrowCentered || bGrowBackwards || bLayoutRTL )
1993 if ( bGrowCentered )
2001 aVis.
SetLeft( nCenter - nVisSize / 2 );
2008 aVisPTwips.
SetLeft( nCenterPTwips - nVisSizePTwips / 2 );
2009 aVisPTwips.
SetRight( aVisPTwips.
Left() + nVisSizePTwips - 1 );
2012 else if ( bGrowToLeft )
2066 else if ( !bAsianVertical && !bGrowToLeft && !bGrowCentered )
2083 comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
2093 if ( nControl & EVControlBits::AUTOSCROLL )
2133 OUString aText = pEngine->
GetText( 0 );
2134 if ( ( aText.isEmpty() && bInitial ) || aText.startsWith(
"=") )
2138 bool bChanged =
false;
2139 bool bMaxReached =
false;
2140 while (aArea.
GetHeight() + nAllowedExtra < nTextHeight &&
nEditEndRow < nBottom && !bMaxReached)
2172 if (!(nControl & EVControlBits::AUTOSCROLL))
2173 pCurView->
SetControlWord( nControl | EVControlBits::AUTOSCROLL );
2176 aArea.
SetTop( nOldBottom );
2186 for (sal_uInt16
i=0;
i<4;
i++)
2191 lcl_LOKRemoveWindow(
GetViewShell(), static_cast<ScSplitPos>(i));
2192 pEngine =
pEditView[i]->GetEditEngine();
2206 for (sal_uInt16
i=0;
i<4;
i++)
2211 pEngine =
pEditView[i]->GetEditEngine();
2258 OSL_FAIL(
"wrong sheet number");
2272 if (!
ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(
maTabData.size())))
2276 return &(
maTabData[nTabIndex]->aWidthHelper);
2281 if (!
ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(
maTabData.size())))
2285 return &(
maTabData[nTabIndex]->aHeightHelper);
2303 return GetScrPos( nWhereX, nWhereY, ePos );
2310 return GetScrPos( nWhereX, nWhereY, ePos );
2314 bool bAllowNeg,
SCTAB nForTab )
const
2340 bool bForCurTab = (nForTab ==
nTabNo);
2341 if (!bForCurTab && (!
ValidTab(nForTab) || (nForTab >= static_cast<SCTAB>(
maTabData.size()))))
2343 SAL_WARN(
"sc.viewdata",
"ScViewData::GetScrPos : invalid nForTab = " << nForTab);
2363 if (bAllowNeg || nWhereX >= nPosX)
2365 SCROW nStartPosX = nPosX;
2366 if (bIsTiledRendering)
2368 OSL_ENSURE(nPosX == 0,
"Unsupported case.");
2370 nStartPosX = rNearest.first + 1;
2371 nScrPosX = rNearest.second;
2374 if (nWhereX >= nStartPosX)
2376 for (
SCCOL nX = nStartPosX; nX < nWhereX && (bAllowNeg || bIsTiledRendering || nScrPosX <=
aScrSize.
Width()); nX++)
2379 nScrPosX = 0x7FFFFFFF;
2386 nScrPosX += nSizeXPix;
2393 for (
SCCOL nX = nStartPosX; nX > nWhereX;)
2400 nScrPosX -= nSizeXPix;
2411 if (bAllowNeg || nWhereY >= nPosY)
2413 SCROW nStartPosY = nPosY;
2414 if (bIsTiledRendering)
2416 OSL_ENSURE(nPosY == 0,
"Unsupported case.");
2418 nStartPosY = rNearest.first + 1;
2419 nScrPosY = rNearest.second;
2422 if (nWhereY >= nStartPosY)
2424 if (bAllowNeg || bIsTiledRendering || nScrPosY <=
aScrSize.
Height())
2427 nScrPosY = 0x7FFFFFFF;
2428 else if (bAllowNeg || bIsTiledRendering)
2431 nScrPosY += nSizeYPix;
2437 nScrPosY += nSizeYPix;
2443 for (
SCROW nY = nStartPosY; nY > nWhereY;)
2450 nScrPosY -= nSizeYPix;
2462 return Point( nScrPosX, nScrPosY );
2474 return Point(nPosX, nPosY);
2487 const Point aTileTwipsCellPos(aPixCellPos.X() /
nPPTX, aPixCellPos.Y() /
nPPTY);
2489 return aPrintTwipsCellPos + (rTileTwipsPos - aTileTwipsCellPos);
2494 const bool bPosSizeInPixels = bPixelAligned;
2500 if (bPosSizeInPixels)
2505 std::stringstream ss;
2506 if (bPosSizeInPixels)
2518 tools::Long nPosXTw = rtl::math::round(aCellPos.getX() / fPPTX);
2519 tools::Long nPosYTw = rtl::math::round(aCellPos.getY() / fPPTY);
2521 tools::Long nSizeXTw = rtl::math::round(nSizeX / fPPTX) - 1;
2522 tools::Long nSizeYTw = rtl::math::round(nSizeY / fPPTY) - 1;
2524 ss << nPosXTw <<
", " << nPosYTw <<
", " << nSizeXTw <<
", " << nSizeYTw <<
", "
2525 << nX <<
", " << nY;
2534 ss << aCellPos.getX() <<
", " << aCellPos.getY()
2535 <<
", " << nSizeX <<
", " << nSizeY <<
", "
2536 << nX <<
", " << nY;
2539 return ss.str().c_str();
2545 OSL_ENSURE( nDir==1 || nDir==-1,
"wrong CellsAt call" );
2551 sal_uInt16 nScrPosX = 0;
2560 for ( ; nScrPosX<=nScrSizeX && !bOut; nX = sal::static_int_cast<SCCOL>(nX + nDir) )
2571 nScrPosX = sal::static_int_cast<sal_uInt16>( nScrPosX +
static_cast<sal_uInt16
>(nSizeXPix) );
2577 nX = sal::static_int_cast<
SCCOL>( nX - nPosX );
2587 OSL_ENSURE( nDir==1 || nDir==-1,
"wrong CellsAt call" );
2603 nY += (nY == mrDoc.MaxRow() ? 2 : 1);
2613 nY -= (nY == 0 ? 2 : 1);
2653 for (
SCROW nRow = nY; nRow <= nY+nCountY-1; ++nRow)
2655 SCROW nLastRow = nRow;
2666 rSizeXPix = nOutWidth;
2667 rSizeYPix = nOutHeight;
2691 return (nCountX > 1 || nCountY > 1);
2696 bool bTestMerge,
bool bRepair,
SCTAB nForTab )
2702 bool bForCurTab = (nForTab ==
nTabNo);
2703 if (!bForCurTab && (!
ValidTab(nForTab) || (nForTab >= static_cast<SCTAB>(
maTabData.size()))))
2705 SAL_WARN(
"sc.viewdata",
"ScViewData::GetPosFromPixel : invalid nForTab = " << nForTab);
2730 while (rPosX <=
mrDoc.
MaxCol() && nClickX >= nScrX)
2739 while ( rPosX>0 && nClickX < nScrX )
2751 while ( rPosY>0 && nClickY < nScrY )
2754 nScrY -=
ToPixel(mrDoc.GetRowHeight(rPosY, nForTab),
nPPTY);
2759 if ( rPosX == nStartPosX && nClickX > 0 )
2766 if ( rPosY == nStartPosY && nClickY > 0 )
2774 rPosX = std::clamp(rPosX,
SCCOL(0), mrDoc.MaxCol());
2775 rPosY = std::clamp(rPosY,
SCROW(0), mrDoc.MaxRow());
2777 if (!(bTestMerge && bForCurTab))
2781 SCCOL nOrigX = rPosX;
2782 SCROW nOrigY = rPosY;
2783 mrDoc.SkipOverlapped(rPosX, rPosY,
nTabNo);
2784 bool bHOver = (nOrigX != rPosX);
2785 bool bVOver = (nOrigY != rPosY);
2787 if ( !(bRepair && ( bHOver || bVOver )) )
2794 OSL_FAIL(
"merge error found");
2797 SCCOL nEndCol = mrDoc.MaxCol();
2798 SCROW nEndRow = mrDoc.MaxRow();
2799 mrDoc.ExtendMerge(0, 0, nEndCol, nEndRow,
nTabNo,
true);
2807 SCCOL nPosX,
SCROW nPosY,
bool& rLeft,
bool& rTop )
2816 rLeft = ( rClickPos.X() - aCellStart.X() ) * nLayoutSign <= nSizeX / 2;
2817 rTop = rClickPos.Y() - aCellStart.Y() <= nSizeY / 2;
2824 if (nNewPosX != 0 && !bIsTiledRendering)
2830 if ( nNewPosX > nOldPosX )
2831 for ( i=nOldPosX; i<nNewPosX; i++ )
2835 nPixPosX -=
ToPixel(sal::static_int_cast<sal_uInt16>(nThis),
nPPTX);
2838 for ( i=nNewPosX; i<nOldPosX; i++ )
2842 nPixPosX +=
ToPixel(sal::static_int_cast<sal_uInt16>(nThis),
nPPTX);
2863 if (nNewPosY != 0 && !bIsTiledRendering)
2869 if ( nNewPosY > nOldPosY )
2870 for ( i=nOldPosY; i<nNewPosY; i++ )
2873 SCROW nRows = std::min( nNewPosY, nHeightEndRow + 1) - i;
2875 nTPosY -= nThis * nRows;
2876 nPixPosY -=
ToPixel(sal::static_int_cast<sal_uInt16>(nThis),
nPPTY) * nRows;
2879 for ( i=nNewPosY; i<nOldPosY; i++ )
2882 SCROW nRows = std::min( nOldPosY, nHeightEndRow + 1) - i;
2884 nTPosY += nThis * nRows;
2885 nPixPosY +=
ToPixel(sal::static_int_cast<sal_uInt16>(nThis),
nPPTY) * nRows;
2904 for (sal_uInt16 eWhich=0; eWhich<2; eWhich++)
2914 for (
SCROW j=0; j<nPosY; j++)
2946 for (nCol=nCol1; nCol<=nCol2; nCol++)
2952 nScrPosX +=
static_cast<sal_uInt16
>(nSizePix);
2956 for (nRow=nRow1; nRow<=nRow2; nRow++)
2962 nScrPosY +=
static_cast<sal_uInt16
>(nSizePix);
2985 if (nSize + nAdd <= nTwips + 1 && nX1 <
mrDoc.
MaxCol())
3001 if (nSize + nAdd <= nTwips + 1 && nY1 <
mrDoc.
MaxRow())
3036 assert(
pView &&
"GetBindings() without ViewShell");
3042 assert(
pView &&
"GetDispatcher() without ViewShell");
3058 assert(
pView &&
"GetDialogParent() without ViewShell");
3091 SetZoom( rNewX, rNewY,
false );
3107 double nOldPPTX =
nPPTX;
3108 double nOldPPTY =
nPPTY;
3129 double fOriginal = nTwips *
nPPTX;
3130 if ( fOriginal < static_cast<double>(nEndCol) )
3135 double fRounded = ::rtl::math::approxFloor( fOriginal + 0.5 );
3136 if ( fRounded > 0.0 )
3138 double fScale = fRounded / fOriginal + 1
E-6;
3139 if ( fScale >= 0.9 && fScale <= 1.1 )
3146 if (
nPPTX != nOldPPTX)
3148 if (
nPPTY != nOldPPTY)
3152 #define SC_OLD_TABSEP '/'
3153 #define SC_NEW_TABSEP '+'
3166 rData = OUString::number( nZoom ) +
"/";
3168 rData += OUString::number( nZoom ) +
"/";
3192 rData += OUString::number(
maTabData[i]->nCurX ) + cTabSep +
3193 OUString::number(
maTabData[i]->nCurY ) + cTabSep +
3194 OUString::number(
maTabData[i]->eHSplitMode ) + cTabSep +
3195 OUString::number(
maTabData[i]->eVSplitMode ) + cTabSep;
3197 rData += OUString::number(
maTabData[i]->nFixPosX );
3199 rData += OUString::number(
maTabData[i]->nHSplitPos );
3202 rData += OUString::number(
maTabData[i]->nFixPosY );
3204 rData += OUString::number(
maTabData[i]->nVSplitPos );
3206 OUString::number(
maTabData[i]->eWhichActive ) + cTabSep +
3207 OUString::number(
maTabData[i]->nPosX[0] ) + cTabSep +
3208 OUString::number(
maTabData[i]->nPosX[1] ) + cTabSep +
3209 OUString::number(
maTabData[i]->nPosY[0] ) + cTabSep +
3210 OUString::number(
maTabData[i]->nPosY[1] );
3217 if (rData.isEmpty())
3224 OSL_FAIL(
"ReadUserData: This is not my data");
3228 Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY;
3230 sal_Int32 nMainIdx {0};
3233 OUString aZoomStr = rData.getToken(0,
';', nMainIdx);
3234 sal_uInt16 nNormZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(0,
'/', nIdx).toInt32());
3236 aZoomX = aZoomY =
Fraction( nNormZoom, 100 );
3237 sal_uInt16 nPageZoom = sal::static_int_cast<sal_uInt16>(aZoomStr.getToken(0,
'/', nIdx).toInt32());
3239 aPageZoomX = aPageZoomY =
Fraction( nPageZoom, 100 );
3240 sal_Unicode cMode = aZoomStr.getToken(0,
'/', nIdx)[0];
3245 SCTAB nNewTab =
static_cast<SCTAB>(rData.getToken(0,
';', nMainIdx).toUInt32());
3250 const sal_Int32 nMainIdxRef {nMainIdx};
3251 OUString aTabOpt = rData.getToken(0,
';', nMainIdx);
3261 nMainIdx = nMainIdxRef;
3266 while ( nMainIdx>0 )
3268 aTabOpt = rData.getToken(0,
';', nMainIdx);
3285 maTabData[nPos]->eHSplitMode =
static_cast<ScSplitMode>(aTabOpt.getToken(0, cTabSep, nIdx).toInt32());
3286 maTabData[nPos]->eVSplitMode =
static_cast<ScSplitMode>(aTabOpt.getToken(0, cTabSep, nIdx).toInt32());
3288 sal_Int32 nTmp{ aTabOpt.getToken(0, cTabSep, nIdx).toInt32() };
3297 nTmp = aTabOpt.getToken(0, cTabSep, nIdx).toInt32();
3306 maTabData[nPos]->eWhichActive =
static_cast<ScSplitPos>(aTabOpt.getToken(0, cTabSep, nIdx).toInt32());
3338 for(
SCTAB nTab = 0; nTab < static_cast<SCTAB>(
maTabData.size()); ++nTab )
3347 SCCOL nExFixPosX = pViewTab->nFixPosX;
3348 SCROW nExFixPosY = pViewTab->nFixPosY;
3355 nExFixPosX, nExFixPosY,
3356 nExHSplitPos, nExVSplitPos, nTab);
3363 OSL_ENSURE( !bRealSplit || !bFrozen,
"ScViewData::WriteExtOptions - split and freeze in same sheet" );
3372 rSplitPos =
Point( bHSplit ? nExHSplitPos : 0, bVSplit ? nExVSplitPos : 0 );
3388 switch( pViewTab->eWhichActive )
3409 rTabSett.
maCursor.
Set( pViewTab->nCurX, pViewTab->nCurY, nTab );
3450 if (static_cast<SCTAB>(
maTabData.size()) <= nLastTab)
3453 for(
SCTAB nTab = 0; nTab < static_cast<SCTAB>(
maTabData.size()); ++nTab )
3512 aPixel.setX( static_cast<tools::Long>( aPixel.X() * nFactor + 0.5 ) );
3515 bHSplit = bHSplit && aPixel.X() > 0;
3516 bVSplit = bVSplit && aPixel.Y() > 0;
3603 beans::PropertyValue* pSettings = rSettings.getArray();
3609 uno::Reference<container::XNameContainer> xNameContainer =
3611 for (
SCTAB nTab=0; nTab<static_cast<SCTAB>(
maTabData.size()); nTab++)
3615 uno::Sequence <beans::PropertyValue> aTableViewSettings;
3616 maTabData[nTab]->WriteUserDataSequence(aTableViewSettings, *
this, nTab);
3621 xNameContainer->insertByName(sTabName,
uno::Any(aTableViewSettings));
3624 catch ( container::ElementExistException& )
3626 OSL_FAIL(
"seems there are two tables with the same name");
3628 catch ( uno::RuntimeException& )
3630 OSL_FAIL(
"something went wrong");
3661 OUString aColorName;
3697 std::vector<bool> aHasZoomVect(
GetDocument().GetTableCount(),
false );
3699 sal_Int32 nTemp32(0);
3700 sal_Int16 nTemp16(0);
3701 bool bPageMode(
false);
3705 for (
const auto& rSetting : rSettings)
3708 OUString
sName(rSetting.Name);
3711 uno::Reference<container::XNameContainer> xNameContainer;
3712 if ((rSetting.Value >>= xNameContainer) && xNameContainer->hasElements())
3714 const uno::Sequence< OUString > aNames(xNameContainer->getElementNames());
3715 for (
const OUString& sTabName : aNames)
3720 uno::Any aAny = xNameContainer->getByName(sTabName);
3721 uno::Sequence<beans::PropertyValue> aTabSettings;
3722 if (aAny >>= aTabSettings)
3728 bool bHasZoom =
false;
3729 maTabData[nTab]->ReadUserDataSequence(aTabSettings, *
this, nTab, bHasZoom);
3730 aHasZoomVect[nTab] = bHasZoom;
3739 if(rSetting.Value >>= sTabName)
3748 if (rSetting.Value >>= nTemp32)
3753 double fWidth = 0.0;
3754 if (rSetting.Value >>= fWidth)
3759 if (rSetting.Value >>= nTemp16)
3764 if (rSetting.Value >>= nTemp32)
3772 if (rSetting.Value >>= nTemp32)
3789 if (rSetting.Value >>= aColor)
3808 if ( rSetting.Value >>= nTemp16 )
3814 if ( rSetting.Value >>= nTemp16 )
3820 if ( rSetting.Value >>= nTemp16 )
3850 for (
SCTAB nZoomTab=0; nZoomTab< static_cast<SCTAB>(
maTabData.size()); ++nZoomTab)
3851 if (
maTabData[nZoomTab] && ( nZoomTab >= static_cast<SCTAB>(aHasZoomVect.size()) || !aHasZoomVect[nZoomTab] ))
3860 if (rSettings.hasElements())
3881 OSL_ENSURE(
pView,
"No View" );
3891 OSL_ENSURE(
pView,
"GetMousePosPixel() without View" );
3922 sal_uInt16 nTSize = rLocalDoc.
GetColWidth( nX, nTab );
3930 if (nNewPos !=
maTabData[nTab]->nHSplitPos)
3957 sal_uInt16 nTSize = rLocalDoc.
GetRowHeight( nY, nTab );
3965 if (nNewPos !=
maTabData[nTab]->nVSplitPos)
3982 nCntrl |= EEControlBits::MARKNONURLFIELDS;
3984 nCntrl |= EEControlBits::AUTOCORRECT;
3986 nCntrl |= EEControlBits::ONLINESPELLING;
4026 while (rScrY <= nEndPixels && nRow <= nEndRow)
4028 SCROW nHeightEndRow;
4029 sal_uInt16 nHeight = pDoc->
GetRowHeight( nRow, nTabNo,
nullptr, &nHeightEndRow);
4030 if (nHeightEndRow > nEndRow)
4031 nHeightEndRow = nEndRow;
4033 nRow = nHeightEndRow + 1;
4036 SCROW nRows = nHeightEndRow - nRow + 1;
4038 sal_Int64 nAdd = nPixel * nRows;
4039 if (nAdd + rScrY > nEndPixels)
4041 sal_Int64 nDiff = rScrY + nAdd - nEndPixels;
4042 nRows -=
static_cast<SCROW>(nDiff / nPixel);
4043 nAdd = nPixel * nRows;
4045 if (nAdd + rScrY <= nEndPixels)
4065 while (rScrY <= nEndPixels && nRow >= nStartRow)
4067 SCROW nHeightStartRow;
4068 sal_uInt16 nHeight = pDoc->
GetRowHeight( nRow, nTabNo, &nHeightStartRow,
nullptr);
4069 if (nHeightStartRow < nStartRow)
4070 nHeightStartRow = nStartRow;
4072 nRow = nHeightStartRow - 1;
4075 SCROW nRows = nRow - nHeightStartRow + 1;
4077 sal_Int64 nAdd = nPixel * nRows;
4078 if (nAdd + rScrY > nEndPixels)
4080 sal_Int64 nDiff = nAdd + rScrY - nEndPixels;
4081 nRows -=
static_cast<SCROW>(nDiff / nPixel);
4082 nAdd = nPixel * nRows;
4084 if (nAdd + rScrY <= nEndPixels)
4102 return nFreezeIndex >= 0 ? nFreezeIndex : 0;
4111 else if (!
ValidTab(nForTab) || (nForTab >= static_cast<SCTAB>(
maTabData.size())))
4113 SAL_WARN(
"sc.viewdata",
"ScViewData::SetLOKSheetFreezeIndex : invalid nForTab = " << nForTab);
4125 return colUnfreezed || rowUnfreezed;
4131 for (
SCTAB nTab = 0; nTab <= nMaxTab; ++nTab)
4139 SAL_WARN(
"sc.viewdata",
"ScViewData::DeriveLOKFreezeIfNeeded : invalid nForTab = " << nForTab);
4147 bool bConvertToFreezeX =
false;
4148 bool bConvertToFreezeY =
false;
4152 if (nFreezeCol == -1)
4158 bConvertToFreezeX =
true;
4163 if (nFreezeRow == -1)
4169 bConvertToFreezeY =
true;
4174 if (bConvertToFreezeX || bConvertToFreezeY)
4179 bConvertToFreezeY ? pViewTable->
nVSplitPos : 0,
4183 if (bConvertToFreezeX)
4185 if (bConvertToFreezeY)
4200 bool bConvertToScrPosX =
false;
4201 bool bConvertToScrPosY =
false;
4203 if (nFreezeCol >= 0)
4209 nExFixPosX = nFreezeCol;
4211 bConvertToScrPosX =
true;
4214 if (nFreezeRow >= 0)
4220 nExFixPosY = nFreezeRow;
4222 bConvertToScrPosY =
true;
4225 if (bConvertToScrPosX || bConvertToScrPosY)
4228 if (bConvertToScrPosX)
4229 nExHSplitPos = aExSplitPos.X();
4230 if (bConvertToScrPosY)
4231 nExVSplitPos = aExSplitPos.Y();
ScMarkData & GetMarkData()
tools::Rectangle GetEditArea(const ScPatternAttr *pPattern, bool bForceToTop)
#define SC_HORIZONTAL_SPLIT_MODE
SfxViewFrame * GetViewFrame() const
#define LINK(Instance, Class, Member)
void DeriveLOKFreezeIfNeeded(SCTAB nForTab)
tools::Rectangle GetLOKSpecialOutputArea() const
void SetOption(ScViewOption eOpt, bool bNew)
#define SC_TABLE_SHOWGRID
sal_uInt32 GetFieldDivisionY() const
#define SC_TABLE_VIEWSETTINGS
void SetControlWord(EVControlBits nWord)
#define SC_UNO_SHOWCHARTS
SCCOL GetColMerge() const
OUString GetText(LineEnd eEnd=LINEEND_LF) const
ScExtPanePos meActivePane
Active (focused) pane.
EEControlBits GetControlWord() const
SCCOL SanitizeCol(SCCOL nCol) const
#define SC_CURSORPOSITIONX
#define SC_HORIZONTAL_SPLIT_POSITION
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)
void SetCurX(SCCOL nNewCurX)
Bottom, or bottom-left pane.
ScVSplitPos WhichV(ScSplitPos ePos)
#define SC_VERTICAL_SPLIT_POSITION
#define SC_UNO_RASTERSYNC
void ReadExtOptions(const ScExtDocOptions &rOpt)
SAL_DLLPRIVATE void EnsureTabDataSize(size_t nSize)
void setWidth(tools::Long nWidth)
EditView * RemoveView(EditView *pEditView)
void SetUpdateMode(bool bUpdate, bool bRestoring=false)
Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
const Fraction & GetZoomX() const
#define SC_RELHORIZONTALTABBARWIDTH
ScPositionHelper aHeightHelper
bool IsTransparent() const
SAL_DLLPRIVATE void CalcPPT()
#define SC_UNO_RASTERRESX
void SetScreenPos(const Point &rVisAreaStart)
ScAddress maCursor
The cursor position (column/row only).
SC_DLLPUBLIC void SetTabBgColor(SCTAB nTab, const Color &rColor)
static ScViewOptions DefaultOptions()
SCCOL GetCurXForTab(SCTAB nTabIndex) const
tools::Long nFirstPositionPx
Point GetPrintTwipsPos(SCCOL nCol, SCROW nRow) const
returns the position (top-left corner) of the requested cell in print twips coordinates.
SfxDispatcher * GetDispatcher()
::std::vector< std::unique_ptr< ScViewDataTable > > maTabData
#define SC_HORIZONTALSCROLLBARWIDTH
void InsertTabs(SCTAB nTab, SCTAB nNewSheets)
static bool SelectionFillDOOM(const ScRange &rRange)
Determine DOOM condition, i.e. from selected range.
SCROW GetLOKFreezeRow(SCTAB nTab) const
void SetActivePart(ScSplitPos eNewActive)
ScAddress maSecondVis
Top-left visible cell in add. panes (column/row only).
sal_uInt32 GetFieldDrawX() const
void invalidateByPosition(tools::Long nPos)
svtools::ColorConfig & GetColorConfig()
ScHSplitPos WhichH(ScSplitPos ePos)
ScDocFunc & GetDocFunc() const
void SetSpeller(css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpeller)
#define SC_PAGE_VIEW_ZOOM_VALUE
SCCOL nPosX[2]
X position of the top left cell of the visible area.
SCCOLROW GetLOKSheetFreezeIndex(bool bIsCol) const
void DeriveLOKFreezeAllSheets()
double GetOutputFactor() const
constexpr OUStringLiteral PERCENT(u"Percent")
#define SC_TABLE_VIEWSETTINGS_COUNT
void FillRangeListWithMarks(ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
Create a range list of marks.
const SfxItemSet & GetItemSet() const
SvxAdjust GetEditAdjust() const
tools::Long mnNormalZoom
Zoom in percent for normal view.
const ScExtDocSettings & GetDocSettings() const
void ViewOptionsHasChanged(bool bHScrollChanged, bool bGraphicsChanged)
tools::Long GetGridWidth(ScHSplitPos eWhich)
Extended options held by an ScDocument containing additional settings for filters.
ScSplitPos GetActivePart() const
std::unique_ptr< EditView > pEditView[4]
ScDocument & GetDocument() const
void EditGrowY(bool bInitial=false)
Extend the output area for the edit engine view in a vertical direction as needed.
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+15)
void GetFillData(SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow)
tools::Long getPosition(index_type nIndex) const
const tools::Rectangle & GetOutputArea() const
constexpr TypedWhichId< ScLineBreakCell > ATTR_LINEBREAK(139)
void insert(index_type nIndex, tools::Long nPos)
#define SC_CURSORPOSITIONY
tools::Long GetTabBarWidth() const
Returns the current tab bar width in pixels.
static void forEachOtherView(ViewShellType *pThisViewShell, FunctionType f)
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)
ScRangeList maSelection
Selected cell ranges (columns/rows only).
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
sal_Int32 getTokenCount(const OString &rIn, char cTok)
std::set< value_type, Comp > mData
constexpr TypedWhichId< ScMergeAttr > ATTR_MERGE(144)
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
void ReadUserData(const OUString &rData)
double mfTabBarWidth
Width of the tabbar, relative to frame window width (0.0 ... 1.0).
void SetVisArea(const tools::Rectangle &rRect)
bool UpdateFixY(SCTAB nTab=MAXTAB+1)
SAL_DLLPRIVATE void UpdateCurrentTab()
void GetMarkArea(ScRange &rRange) const
static OutputDevice * GetDefaultDevice()
void SetPagebreakMode(bool bSet)
#define SC_HORIZONTALSPLITPOSITION_TWIPS
static UITestLogger & getInstance()
ScPositionHelper(const ScDocument *pDoc, bool bColumn)
constexpr::Color COL_AUTO(0xFF, 0xFF, 0xFF, 0xFF)
tools::Long GetGridHeight(ScVSplitPos eWhich)
void logEvent(const EventDescription &rDescription)
static tools::Long ToPixel(sal_uInt16 nTwips, double nFactor)
void UpdateInputHandler(bool bForce=false)
#define SC_UNO_RASTERRESY
void InsertView(EditView *pEditView, size_t nIndex=EE_APPEND)
void DeleteTab(SCTAB nTab)
void SetControlWord(EEControlBits nWord)
void WriteExtOptions(ScExtDocOptions &rOpt) const
#define SC_VALUE_HIGHLIGHTING
void SetObjMode(ScVObjType eObj, ScVObjMode eMode)
SC_DLLPUBLIC SCROW MaxRow() const
#define SC_TABLE_ZOOM_VALUE
SCCOL PrevCellsX(ScHSplitPos eWhichX) const
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
SC_DLLPUBLIC SCTAB GetTableCount() const
void SetPosX(ScHSplitPos eWhich, SCCOL nNewPosX)
void SetPendingRelTabBarWidth(double fRelTabBarWidth)
Sets a relative tab bar width.
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
void SetControlWord(EEControlBits nWord)
bool IsMultiMarked() const
void EditGrowX()
Extend the output area for the edit engine view in a horizontal direction as needed.
#define SC_HORIZONTALSPLITPOSITION
#define SC_TABLE_PAGE_VIEW_ZOOM_VALUE
bool isCompatFlagSet(Compat flag)
void SetOptions(const ScViewOptions &rOpt)
SC_DLLPUBLIC bool HasTable(SCTAB nTab) const
void UpdateInputHandler(bool bForce=false, bool bStopEditing=true)
void WriteUserData(OUString