LibreOffice Module sc (master) 1
tabview4.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <vcl/help.hxx>
21
22#include <tabview.hxx>
23#include <tabvwsh.hxx>
24#include <document.hxx>
25#include <docsh.hxx>
26#include <scmod.hxx>
27#include <gridwin.hxx>
28#include <globstr.hrc>
29#include <scresid.hxx>
30#include <inputhdl.hxx>
31
32// --- Referenz-Eingabe / Fill-Cursor
33
35{
36 if ( nTipVisible )
37 {
39 vcl::Window* pWin = pGridWin[eWhich];
41 nTipVisible = nullptr;
43 nTipAlign = QuickHelpFlags::NONE;
44 sTipString.clear();
46 }
47}
48
50{
51 bool bDone = false;
53 {
54 SCCOL nStartX = aViewData.GetRefStartX();
55 SCROW nStartY = aViewData.GetRefStartY();
56 SCCOL nEndX = aViewData.GetRefEndX();
57 SCROW nEndY = aViewData.GetRefEndY();
58 if ( nEndX != nStartX || nEndY != nStartY ) // not for a single cell
59 {
60 bool bLeft = ( nEndX < nStartX );
61 bool bTop = ( nEndY < nStartY );
62 PutInOrder( nStartX, nEndX );
63 PutInOrder( nStartY, nEndY );
64 SCCOL nCols = nEndX+1-nStartX;
65 SCROW nRows = nEndY+1-nStartY;
66
67 OUString aHelp = ScResId( STR_QUICKHELP_REF );
68 aHelp = aHelp.replaceFirst("%1", OUString::number(nRows) );
69 aHelp = aHelp.replaceFirst("%2", OUString::number(nCols) );
70
72 vcl::Window* pWin = pGridWin[eWhich];
73 if ( pWin )
74 {
75 Point aStart = aViewData.GetScrPos( nStartX, nStartY, eWhich );
76 Point aEnd = aViewData.GetScrPos( nEndX+1, nEndY+1, eWhich );
77
78 Point aPos( bLeft ? aStart.X() : ( aEnd.X() + 3 ),
79 bTop ? aStart.Y() : ( aEnd.Y() + 3 ) );
80 QuickHelpFlags nFlags = ( bLeft ? QuickHelpFlags::Right : QuickHelpFlags::Left ) |
81 ( bTop ? QuickHelpFlags::Bottom : QuickHelpFlags::Top );
82
83 // not over the edited formula
84 if ( !bTop && aViewData.HasEditView( eWhich ) &&
85 nEndY+1 == aViewData.GetEditViewRow() )
86 {
87 // then align at the upper border of edited cell
88 aPos.AdjustY( -2 ); // the three from above
89 nFlags = ( nFlags & ~QuickHelpFlags::Top ) | QuickHelpFlags::Bottom;
90 }
91
92 tools::Rectangle aRect( pWin->OutputToScreenPixel( aPos ), Size(1,1) );
93
94 // Test if changed.
95 if (!nTipVisible || nFlags != nTipAlign || aRect != aTipRectangle || sTipString != aHelp || sTopParent != pWin)
96 {
97 HideTip();
98 nTipVisible = Help::ShowPopover(pWin, aRect, aHelp, nFlags);
99 aTipRectangle = aRect;
100 nTipAlign = nFlags;
101 sTipString = aHelp;
102 sTopParent = pWin;
103 }
104 bDone = true;
105 }
106 }
107 }
108
109 if (!bDone)
110 HideTip();
111}
112
114{
115 if (aViewData.IsRefMode())
116 {
118
119 HideTip();
121
124 {
126 SCCOL nStartX = aViewData.GetRefStartX();
127 SCROW nStartY = aViewData.GetRefStartY();
128 SCCOL nEndX = aViewData.GetRefEndX();
129 SCROW nEndY = aViewData.GetRefEndY();
130 if ( nStartX == nEndX && nStartY == nEndY )
131 rDoc.ExtendMerge( nStartX, nStartY, nEndX, nEndY, aViewData.GetTabNo() );
132
133 PaintArea( nStartX,nStartY,nEndX,nEndY, ScUpdateMode::Marks );
134 }
135
136 pSelEngine->Reset();
137 pSelEngine->SetAddMode( false );
138
139 ScSplitPos eOld = pSelEngine->GetWhich();
141 if ( eNew != eOld )
142 {
143 pSelEngine->SetWindow( pGridWin[ eNew ] );
144 pSelEngine->SetWhich( eNew );
145 pSelEngine->SetVisibleArea( tools::Rectangle(Point(),
146 pGridWin[eNew]->GetOutputSizePixel()) );
147 pGridWin[eOld]->MoveMouseStatus(*pGridWin[eNew]);
148 }
149 }
150
151 // AlignToCursor(SC_FOLLOW_NONE): Only switch active part.
152 // This must also be done if no RefMode was active (for RangeFinder dragging),
153 // but if RefMode was set, AlignToCursor must be after SelectionEngine reset,
154 // so the SelectionEngine SetWindow call from AlignToCursor doesn't capture
155 // the mouse again when called from Tracking/MouseButtonUp (#94562#).
157}
158
159void ScTabView::DoneRefMode( bool bContinue )
160{
162 if ( aViewData.GetRefType() == SC_REFTYPE_REF && bContinue )
163 SC_MOD()->AddRefEntry();
164
165 bool bWasRef = aViewData.IsRefMode();
167
168 HideTip();
170
171 // Paint:
172 if ( bWasRef && aViewData.GetTabNo() >= aViewData.GetRefStartZ() &&
174 {
175 SCCOL nStartX = aViewData.GetRefStartX();
176 SCROW nStartY = aViewData.GetRefStartY();
177 SCCOL nEndX = aViewData.GetRefEndX();
178 SCROW nEndY = aViewData.GetRefEndY();
179 if ( nStartX == nEndX && nStartY == nEndY )
180 rDoc.ExtendMerge( nStartX, nStartY, nEndX, nEndY, aViewData.GetTabNo() );
181
182 PaintArea( nStartX,nStartY,nEndX,nEndY, ScUpdateMode::Marks );
183 }
184}
185
186void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
187{
189
190 if (!aViewData.IsRefMode())
191 {
192 // This will happen, when first at a reference dialog with Control in
193 // the table is clicked. Then append the new reference to the old content:
194
195 ScModule* pScMod = SC_MOD();
196 if (pScMod->IsFormulaMode())
197 pScMod->AddRefEntry();
198
199 InitRefMode( nCurX, nCurY, nCurZ, SC_REFTYPE_REF );
200 }
201
202 if ( nCurX != aViewData.GetRefEndX() || nCurY != aViewData.GetRefEndY() ||
203 nCurZ != aViewData.GetRefEndZ() )
204 {
206 SCTAB nTab = aViewData.GetTabNo();
207
208 SCCOL nStartX = aViewData.GetRefStartX();
209 SCROW nStartY = aViewData.GetRefStartY();
210 SCCOL nEndX = aViewData.GetRefEndX();
211 SCROW nEndY = aViewData.GetRefEndY();
212 if ( nStartX == nEndX && nStartY == nEndY )
213 rDoc.ExtendMerge( nStartX, nStartY, nEndX, nEndY, nTab );
214 ScUpdateRect aRect( nStartX, nStartY, nEndX, nEndY );
215
216 aViewData.SetRefEnd( nCurX, nCurY, nCurZ );
217
218 nStartX = aViewData.GetRefStartX();
219 nStartY = aViewData.GetRefStartY();
220 nEndX = aViewData.GetRefEndX();
221 nEndY = aViewData.GetRefEndY();
222 if ( nStartX == nEndX && nStartY == nEndY )
223 rDoc.ExtendMerge( nStartX, nStartY, nEndX, nEndY, nTab );
224 aRect.SetNew( nStartX, nStartY, nEndX, nEndY );
225
227 if ( eType == SC_REFTYPE_REF )
228 {
229 ScRange aRef(
232 SC_MOD()->SetReference( aRef, rDoc, &rMark );
233 ShowRefTip();
234 }
236 {
237 PutInOrder(nStartX,nEndX);
238 PutInOrder(nStartY,nEndY);
239 rDoc.SetEmbedded( ScRange(nStartX,nStartY,nTab, nEndX,nEndY,nTab) );
240 ScDocShell* pDocSh = aViewData.GetDocShell();
241 pDocSh->UpdateOle( aViewData, true );
242 pDocSh->SetDocumentModified();
243 }
244
245 SCCOL nPaintStartX;
246 SCROW nPaintStartY;
247 SCCOL nPaintEndX;
248 SCROW nPaintEndY;
249 if (aRect.GetDiff( nPaintStartX, nPaintStartY, nPaintEndX, nPaintEndY ))
250 PaintArea( nPaintStartX, nPaintStartY, nPaintEndX, nPaintEndY, ScUpdateMode::Marks );
251
252 ScInputHandler* pInputHandler = SC_MOD()->GetInputHdl();
253 if (pInputHandler)
254 {
255 pInputHandler->UpdateLokReferenceMarks();
256 }
257 }
258
259 // autocomplete for Auto-Fill
261 return;
262
263 vcl::Window* pWin = GetActiveWin();
264 if ( !pWin )
265 return;
266
267 OUString aHelpStr;
268 ScRange aMarkRange;
269 aViewData.GetSimpleArea( aMarkRange );
270 SCCOL nEndX = aViewData.GetRefEndX();
271 SCROW nEndY = aViewData.GetRefEndY();
272 ScRange aDelRange;
274 {
275 aHelpStr = ScResId( STR_TIP_RESIZEMATRIX );
276 SCCOL nCols = nEndX + 1 - aViewData.GetRefStartX(); // order is right
277 SCROW nRows = nEndY + 1 - aViewData.GetRefStartY();
278 aHelpStr = aHelpStr.replaceFirst("%1", OUString::number(nRows) );
279 aHelpStr = aHelpStr.replaceFirst("%2", OUString::number(nCols) );
280 }
281 else if ( aViewData.GetDelMark( aDelRange ) )
282 aHelpStr = ScResId( STR_QUICKHELP_DELETE );
283 else if ( nEndX != aMarkRange.aEnd.Col() || nEndY != aMarkRange.aEnd.Row() )
284 aHelpStr = rDoc.GetAutoFillPreview( aMarkRange, nEndX, nEndY );
285
286 if (!aHelpStr.getLength())
287 return;
288
289 // depending on direction the upper or lower corner
290 SCCOL nAddX = ( nEndX >= aMarkRange.aEnd.Col() ) ? 1 : 0;
291 SCROW nAddY = ( nEndY >= aMarkRange.aEnd.Row() ) ? 1 : 0;
292 Point aPos = aViewData.GetScrPos( nEndX+nAddX, nEndY+nAddY, aViewData.GetActivePart() );
293 aPos.AdjustX(8 );
294 aPos.AdjustY(4 );
295 aPos = pWin->OutputToScreenPixel( aPos );
296 tools::Rectangle aRect( aPos, aPos );
297 QuickHelpFlags nAlign = QuickHelpFlags::Left|QuickHelpFlags::Top;
298 if (!nTipVisible || nAlign != nTipAlign || aRect != aTipRectangle || sTipString != aHelpStr || sTopParent != pWin)
299 {
300 HideTip();
301 nTipVisible = Help::ShowPopover(pWin, aRect, aHelpStr, nAlign);
302 aTipRectangle = aRect;
303 nTipAlign = nAlign;
304 sTipString = aHelpStr;
305 sTopParent = pWin;
306 }
307}
308
309void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType )
310{
313 if (aViewData.IsRefMode())
314 return;
315
316 aViewData.SetRefMode( true, eType );
317 aViewData.SetRefStart( nCurX, nCurY, nCurZ );
318 aViewData.SetRefEnd( nCurX, nCurY, nCurZ );
319
320 if (nCurZ == aViewData.GetTabNo())
321 {
322 SCCOL nStartX = nCurX;
323 SCROW nStartY = nCurY;
324 SCCOL nEndX = nCurX;
325 SCROW nEndY = nCurY;
326 rDoc.ExtendMerge( nStartX, nStartY, nEndX, nEndY, aViewData.GetTabNo() );
327
329 PaintArea( nStartX,nStartY,nEndX,nEndY, ScUpdateMode::Marks );
330
331 // SetReference without Merge-Adjustment
332 ScRange aRef( nCurX,nCurY,nCurZ, nCurX,nCurY,nCurZ );
333 SC_MOD()->SetReference( aRef, rDoc, &rMark );
334 }
335
336 ScInputHandler* pInputHandler = SC_MOD()->GetInputHdl();
337 if (pInputHandler)
338 {
339 pInputHandler->UpdateLokReferenceMarks();
340 }
341}
342
343void ScTabView::SetScrollBar( ScrollAdaptor& rScroll, tools::Long nRangeMax, tools::Long nVisible, tools::Long nPos, bool bLayoutRTL )
344{
345 if ( nVisible == 0 )
346 nVisible = 1; // #i59893# don't use visible size 0
347
348 rScroll.SetRange( Range( 0, nRangeMax ) );
349 rScroll.SetVisibleSize( nVisible );
350 rScroll.SetThumbPos( nPos );
351
352 rScroll.EnableRTL( bLayoutRTL );
353}
354
356{
357 return rScroll.GetThumbPos();
358}
359
360// UpdateScrollBars - set visible area and scroll width of scroll bars
361static tools::Long lcl_UpdateBar( ScrollAdaptor& rScroll, SCCOLROW nSize ) // Size = (complete) cells
362{
363 tools::Long nOldPos;
364 tools::Long nNewPos;
365
366 nOldPos = rScroll.GetThumbPos();
367 rScroll.SetPageSize( static_cast<tools::Long>(nSize) );
368 nNewPos = rScroll.GetThumbPos();
369#ifndef UNX
370 rScroll.SetPageSize( 1 ); // always possible !
371#endif
372
373 return nNewPos - nOldPos;
374}
375
376static tools::Long lcl_GetScrollRange( SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLROW nMax, SCCOLROW nStart )
377{
378 // get the end (positive) of a scroll bar range that always starts at 0
379
380 ++nVis;
381 ++nMax; // for partially visible cells
382 SCCOLROW nEnd = std::max(nDocEnd, static_cast<SCCOLROW>(nPos+nVis)) + nVis;
383 if (nEnd > nMax)
384 nEnd = nMax;
385
386 return ( nEnd - nStart ); // for range starting at 0
387}
388
390{
391 ScTabViewShell::notifyAllViewsHeaderInvalidation(GetViewData().GetViewShell(), eHeaderType, GetViewData().GetTabNo());
392
393 tools::Long nDiff;
394 bool bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
395 bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
397 SCTAB nTab = aViewData.GetTabNo();
398 bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
399 SCCOL nUsedX;
400 SCROW nUsedY;
401 rDoc.GetTableArea( nTab, nUsedX, nUsedY );
402
403 SCCOL nVisXL = 0;
404 SCCOL nVisXR = 0;
405 SCROW nVisYB = 0;
406 SCROW nVisYT = 0;
407
408 SCCOL nStartX = 0;
409 SCROW nStartY = 0;
411 nStartX = aViewData.GetFixPosX();
413 nStartY = aViewData.GetFixPosY();
414
416 tools::Long nMaxXL = lcl_GetScrollRange( nUsedX, aViewData.GetPosX(SC_SPLIT_LEFT), nVisXL, rDoc.MaxCol(), 0 );
417 SetScrollBar( *aHScrollLeft, nMaxXL, nVisXL, aViewData.GetPosX( SC_SPLIT_LEFT ), bLayoutRTL );
418
420 tools::Long nMaxYB = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_BOTTOM), nVisYB, rDoc.MaxRow(), nStartY );
421 SetScrollBar( *aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, bLayoutRTL );
422
423 if (bRight)
424 {
426 tools::Long nMaxXR = lcl_GetScrollRange( nUsedX, aViewData.GetPosX(SC_SPLIT_RIGHT), nVisXR, rDoc.MaxCol(), nStartX );
427 SetScrollBar( *aHScrollRight, nMaxXR, nVisXR, aViewData.GetPosX( SC_SPLIT_RIGHT ) - nStartX, bLayoutRTL );
428 }
429
430 if (bTop)
431 {
433 tools::Long nMaxYT = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_TOP), nVisYT, rDoc.MaxRow(), 0 );
434 SetScrollBar( *aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), bLayoutRTL );
435 }
436
437 // test the range
438
439 nDiff = lcl_UpdateBar( *aHScrollLeft, nVisXL );
440 if (nDiff) ScrollX( nDiff, SC_SPLIT_LEFT );
441 if (bRight)
442 {
443 nDiff = lcl_UpdateBar( *aHScrollRight, nVisXR );
444 if (nDiff) ScrollX( nDiff, SC_SPLIT_RIGHT );
445 }
446
447 nDiff = lcl_UpdateBar( *aVScrollBottom, nVisYB );
448 if (nDiff) ScrollY( nDiff, SC_SPLIT_BOTTOM );
449 if (bTop)
450 {
451 nDiff = lcl_UpdateBar( *aVScrollTop, nVisYT );
452 if (nDiff) ScrollY( nDiff, SC_SPLIT_TOP );
453 }
454
455 // set visible area for online spelling
456
457 if ( aViewData.IsActive() )
458 {
459 if (UpdateVisibleRange())
460 SC_MOD()->AnythingChanged(); // if visible area has changed
461 }
462}
463
464#ifndef HDR_SLIDERSIZE
465#define HDR_SLIDERSIZE 2
466#endif
467
469{
470 for (sal_uInt16 i=0; i<4; i++)
471 if (WhichV(static_cast<ScSplitPos>(i))==eWhich)
472 {
473 ScGridWindow* pWin = pGridWin[i].get();
474 if (pWin)
475 {
476 tools::Rectangle aRect( 0,nDragPos, pWin->GetOutputSizePixel().Width()-1,nDragPos+HDR_SLIDERSIZE-1 );
477 pWin->PaintImmediately();
478 pWin->DoInvertRect( aRect ); // Pixel
479 }
480 }
481}
482
484{
485 for (sal_uInt16 i=0; i<4; i++)
486 if (WhichH(static_cast<ScSplitPos>(i))==eWhich)
487 {
488 ScGridWindow* pWin = pGridWin[i].get();
489 if (pWin)
490 {
491 tools::Rectangle aRect( nDragPos,0, nDragPos+HDR_SLIDERSIZE-1,pWin->GetOutputSizePixel().Height()-1 );
492 pWin->PaintImmediately();
493 pWin->DoInvertRect( aRect ); // Pixel
494 }
495 }
496}
497
499{
500 // make sure all visible cells are interpreted,
501 // so the next paint will not execute a macro function
502
504 if ( !rDoc.GetAutoCalc() )
505 return;
506
507 SCTAB nTab = aViewData.GetTabNo();
508 for (sal_uInt16 i=0; i<4; i++)
509 {
510 // rely on gridwin pointers to find used panes
511 // no IsVisible test in case the whole view is not yet shown
512
513 if (pGridWin[i])
514 {
515 ScHSplitPos eHWhich = WhichH( ScSplitPos(i) );
516 ScVSplitPos eVWhich = WhichV( ScSplitPos(i) );
517
518 SCCOL nX1 = rDoc.SanitizeCol( aViewData.GetPosX( eHWhich ));
519 SCROW nY1 = rDoc.SanitizeRow( aViewData.GetPosY( eVWhich ));
520 SCCOL nX2 = rDoc.SanitizeCol( nX1 + aViewData.VisibleCellsX( eHWhich ));
521 SCROW nY2 = rDoc.SanitizeRow( nY1 + aViewData.VisibleCellsY( eVWhich ));
522
523 rDoc.InterpretDirtyCells(ScRange(nX1, nY1, nTab, nX2, nY2, nTab));
524 }
525 }
526
527 // #i65047# repaint during the above loop may have set the bNeedsRepaint flag
529}
530
531/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void PutInOrder(T &nStart, T &nEnd)
Definition: address.hxx:150
static bool IsQuickHelpEnabled()
static void * ShowPopover(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rText, QuickHelpFlags nStyle)
static void HidePopover(vcl::Window const *pParent, void *nId)
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
SCROW Row() const
Definition: address.hxx:274
SCCOL Col() const
Definition: address.hxx:279
void SetDocumentModified()
Definition: docsh.cxx:2982
void UpdateOle(const ScViewData &rViewData, bool bSnapSize=false)
Definition: docsh6.cxx:152
SCROW SanitizeRow(SCROW nRow) const
Definition: document.hxx:906
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5556
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:892
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:893
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1413
SC_DLLPUBLIC bool GetTableArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bCalcHiddens=false) const
Definition: document.cxx:1008
SCCOL SanitizeCol(SCCOL nCol) const
Definition: document.hxx:905
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
Definition: documen3.cxx:1178
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
Definition: document.cxx:974
void InterpretDirtyCells(const ScRangeList &rRanges)
Definition: document.cxx:3872
void SetEmbedded(const ScRange &rRange)
Definition: documen3.cxx:1738
void DoInvertRect(const tools::Rectangle &rPixel)
Definition: gridwin4.cxx:304
void UpdateLokReferenceMarks()
Definition: inputhdl.cxx:535
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
void AddRefEntry()
Multiple selection.
Definition: scmod.cxx:1804
bool IsFormulaMode()
Definition: scmod.cxx:1681
ScAddress aEnd
Definition: address.hxx:498
static void notifyAllViewsHeaderInvalidation(const SfxViewShell *pForViewShell, HeaderType eHeaderType, SCTAB nCurrentTabIndex)
Emits a LOK_CALLBACK_INVALIDATE_HEADER for all views whose current tab is equal to nCurrentTabIndex.
Definition: tabvwshc.cxx:535
void CheckNeedsRepaint()
Definition: tabview3.cxx:3113
std::unique_ptr< ScViewSelectionEngine > pSelEngine
Definition: tabview.hxx:124
void * nTipVisible
Definition: tabview.hxx:173
void AlignToCursor(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, const ScSplitPos *pWhich=nullptr)
Definition: tabview3.cxx:917
VclPtr< ScrollAdaptor > aHScrollRight
Definition: tabview.hxx:153
void DoneRefMode(bool bContinue=false)
Definition: tabview4.cxx:159
VclPtr< ScrollAdaptor > aVScrollTop
Definition: tabview.hxx:150
VclPtr< ScrollAdaptor > aVScrollBottom
Definition: tabview.hxx:151
std::array< VclPtr< ScGridWindow >, 4 > pGridWin
Definition: tabview.hxx:142
tools::Rectangle aTipRectangle
Definition: tabview.hxx:174
void InvertHorizontal(ScVSplitPos eWhich, tools::Long nDragPos)
Definition: tabview4.cxx:468
void InitRefMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType)
Definition: tabview4.cxx:309
void InvertVertical(ScHSplitPos eWhich, tools::Long nDragPos)
Definition: tabview4.cxx:483
void PaintArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScUpdateMode eMode=ScUpdateMode::All)
Definition: tabview3.cxx:2331
void StopRefMode()
Definition: tabview4.cxx:113
ScViewData & GetViewData()
Definition: tabview.hxx:344
ScGridWindow * GetActiveWin()
Definition: tabview.cxx:878
ScViewData aViewData
Definition: tabview.hxx:122
void ShowRefTip()
Definition: tabview4.cxx:49
void ScrollX(tools::Long nDeltaX, ScHSplitPos eWhich, bool bUpdBars=true)
Definition: tabview.cxx:1221
void UpdateShrinkOverlay()
Definition: tabview2.cxx:1130
void ScrollY(tools::Long nDeltaY, ScVSplitPos eWhich, bool bUpdBars=true)
Definition: tabview.cxx:1304
void UpdateRef(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ)
Definition: tabview4.cxx:186
void UpdateScrollBars(HeaderType eHeaderType=BOTH_HEADERS)
Definition: tabview4.cxx:389
static tools::Long GetScrollBarPos(const ScrollAdaptor &rScroll)
Definition: tabview4.cxx:355
void InterpretVisible()
Definition: tabview4.cxx:498
bool UpdateVisibleRange()
Definition: tabview.cxx:1565
QuickHelpFlags nTipAlign
Definition: tabview.hxx:175
VclPtr< vcl::Window > sTopParent
Definition: tabview.hxx:177
void HideTip()
Definition: tabview4.cxx:34
static void SetScrollBar(ScrollAdaptor &rScroll, tools::Long nRangeMax, tools::Long nVisible, tools::Long nPos, bool bLayoutRTL)
Definition: tabview4.cxx:343
OUString sTipString
Definition: tabview.hxx:176
VclPtr< ScrollAdaptor > aHScrollLeft
Definition: tabview.hxx:152
bool GetDiff(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2)
Definition: viewutil.cxx:379
void SetNew(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
Definition: viewutil.cxx:368
ScFillMode GetFillMode() const
Definition: viewdata.hxx:516
SCROW GetFixPosY() const
Definition: viewdata.hxx:421
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3146
void SetRefMode(bool bNewMode, ScRefType eNewType)
Definition: viewdata.hxx:539
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1417
SCCOL GetRefStartX() const
Definition: viewdata.hxx:532
ScRefType GetRefType() const
Definition: viewdata.hxx:531
ScSplitMode GetHSplitMode() const
Definition: viewdata.hxx:416
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:354
void SetRefEnd(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
Definition: viewdata.cxx:4129
ScMarkType GetSimpleArea(SCCOL &rStartCol, SCROW &rStartRow, SCTAB &rStartTab, SCCOL &rEndCol, SCROW &rEndRow, SCTAB &rEndTab) const
Definition: viewdata.cxx:1182
SCROW VisibleCellsY(ScVSplitPos eWhichY) const
Definition: viewdata.cxx:2717
ScSplitPos GetActivePart() const
Definition: viewdata.hxx:398
SCROW GetRefEndY() const
Definition: viewdata.hxx:536
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
Definition: viewdata.cxx:2380
SCTAB GetRefStartZ() const
Definition: viewdata.hxx:534
bool GetDelMark(ScRange &rRange) const
Definition: viewdata.hxx:549
bool IsActive() const
Definition: viewdata.hxx:382
SCCOL GetRefEndX() const
Definition: viewdata.hxx:535
SCROW GetRefStartY() const
Definition: viewdata.hxx:533
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
Definition: viewdata.cxx:2712
SCTAB GetRefEndZ() const
Definition: viewdata.hxx:537
ScSplitMode GetVSplitMode() const
Definition: viewdata.hxx:417
SCCOL GetFixPosX() const
Definition: viewdata.hxx:420
SCROW GetEditViewRow() const
Definition: viewdata.hxx:604
bool IsRefMode() const
Definition: viewdata.hxx:530
bool HasEditView(ScSplitPos eWhich) const
Definition: viewdata.hxx:582
SCROW GetCurY() const
Definition: viewdata.hxx:402
SCCOL GetCurX() const
Definition: viewdata.hxx:401
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1403
void SetRefStart(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
Definition: viewdata.cxx:4124
virtual void SetRange(const Range &rRange) override
virtual void EnableRTL(bool bEnable=true) override
virtual tools::Long GetThumbPos() const override
virtual void SetPageSize(tools::Long nNewSize) override
virtual void SetVisibleSize(tools::Long nNewSize) override
virtual void SetThumbPos(tools::Long nThumbPos) override
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void clear()
Point OutputToScreenPixel(const Point &rPos) const
void PaintImmediately()
Size GetOutputSizePixel() const
DocumentType eType
sal_uInt16 nScFillModeMouseModifier
Definition: global.cxx:118
QuickHelpFlags
constexpr sal_uInt16 KEY_MOD1
sal_uInt16 nPos
int i
long Long
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:90
#define SC_MOD()
Definition: scmod.hxx:247
static tools::Long lcl_UpdateBar(ScrollAdaptor &rScroll, SCCOLROW nSize)
Definition: tabview4.cxx:361
static tools::Long lcl_GetScrollRange(SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLROW nMax, SCCOLROW nStart)
Definition: tabview4.cxx:376
#define HDR_SLIDERSIZE
Definition: tabview4.cxx:465
HeaderType
Definition: tabview.hxx:58
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
ScSplitPos
Definition: viewdata.hxx:44
ScHSplitPos WhichH(ScSplitPos ePos)
Definition: viewdata.hxx:722
@ SC_FOLLOW_NONE
Definition: viewdata.hxx:52
@ SC_SPLIT_FIX
Definition: viewdata.hxx:42
@ SC_SPLIT_NONE
Definition: viewdata.hxx:42
ScRefType
Mouse mode to select areas.
Definition: viewdata.hxx:55
@ SC_REFTYPE_NONE
Definition: viewdata.hxx:55
@ SC_REFTYPE_EMBED_RB
Definition: viewdata.hxx:56
@ SC_REFTYPE_EMBED_LT
Definition: viewdata.hxx:56
@ SC_REFTYPE_FILL
Definition: viewdata.hxx:55
@ SC_REFTYPE_REF
Definition: viewdata.hxx:55
ScHSplitPos
Definition: viewdata.hxx:45
@ SC_SPLIT_LEFT
Definition: viewdata.hxx:45
@ SC_SPLIT_RIGHT
Definition: viewdata.hxx:45
ScVSplitPos WhichV(ScSplitPos ePos)
Definition: viewdata.hxx:728
ScVSplitPos
Definition: viewdata.hxx:46
@ SC_SPLIT_TOP
Definition: viewdata.hxx:46
@ SC_SPLIT_BOTTOM
Definition: viewdata.hxx:46