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();
45  sTopParent.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  {
125  ScDocument& rDoc = aViewData.GetDocument();
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 
159 void ScTabView::DoneRefMode( bool bContinue )
160 {
161  ScDocument& rDoc = aViewData.GetDocument();
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 
186 void ScTabView::UpdateRef( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ )
187 {
188  ScDocument& rDoc = aViewData.GetDocument();
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  {
205  ScMarkData& rMark = aViewData.GetMarkData();
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  }
235  else if ( eType == SC_REFTYPE_EMBED_LT || eType == SC_REFTYPE_EMBED_RB )
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 
309 void ScTabView::InitRefMode( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType )
310 {
311  ScDocument& rDoc = aViewData.GetDocument();
312  ScMarkData& rMark = aViewData.GetMarkData();
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 
343 void ScTabView::SetScrollBar( ScrollBar& 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
361 
362 static tools::Long lcl_UpdateBar( ScrollBar& rScroll, SCCOLROW nSize ) // Size = (complete) cells
363 {
364  tools::Long nOldPos;
365  tools::Long nNewPos;
366 
367  nOldPos = rScroll.GetThumbPos();
368  rScroll.SetPageSize( static_cast<tools::Long>(nSize) );
369  nNewPos = rScroll.GetThumbPos();
370 #ifndef UNX
371  rScroll.SetPageSize( 1 ); // always possible !
372 #endif
373 
374  return nNewPos - nOldPos;
375 }
376 
377 static tools::Long lcl_GetScrollRange( SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLROW nMax, SCCOLROW nStart )
378 {
379  // get the end (positive) of a scroll bar range that always starts at 0
380 
381  ++nVis;
382  ++nMax; // for partially visible cells
383  SCCOLROW nEnd = std::max(nDocEnd, static_cast<SCCOLROW>(nPos+nVis)) + nVis;
384  if (nEnd > nMax)
385  nEnd = nMax;
386 
387  return ( nEnd - nStart ); // for range starting at 0
388 }
389 
391 {
392  ScTabViewShell::notifyAllViewsHeaderInvalidation(GetViewData().GetViewShell(), eHeaderType, GetViewData().GetTabNo());
393 
394  tools::Long nDiff;
395  bool bTop = ( aViewData.GetVSplitMode() != SC_SPLIT_NONE );
396  bool bRight = ( aViewData.GetHSplitMode() != SC_SPLIT_NONE );
397  ScDocument& rDoc = aViewData.GetDocument();
398  SCTAB nTab = aViewData.GetTabNo();
399  bool bLayoutRTL = rDoc.IsLayoutRTL( nTab );
400  SCCOL nUsedX;
401  SCROW nUsedY;
402  rDoc.GetTableArea( nTab, nUsedX, nUsedY );
403 
404  SCCOL nVisXL = 0;
405  SCCOL nVisXR = 0;
406  SCROW nVisYB = 0;
407  SCROW nVisYT = 0;
408 
409  SCCOL nStartX = 0;
410  SCROW nStartY = 0;
412  nStartX = aViewData.GetFixPosX();
414  nStartY = aViewData.GetFixPosY();
415 
417  tools::Long nMaxXL = lcl_GetScrollRange( nUsedX, aViewData.GetPosX(SC_SPLIT_LEFT), nVisXL, rDoc.MaxCol(), 0 );
418  SetScrollBar( *aHScrollLeft, nMaxXL, nVisXL, aViewData.GetPosX( SC_SPLIT_LEFT ), bLayoutRTL );
419 
421  tools::Long nMaxYB = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_BOTTOM), nVisYB, rDoc.MaxRow(), nStartY );
422  SetScrollBar( *aVScrollBottom, nMaxYB, nVisYB, aViewData.GetPosY( SC_SPLIT_BOTTOM ) - nStartY, bLayoutRTL );
423 
424  if (bRight)
425  {
427  tools::Long nMaxXR = lcl_GetScrollRange( nUsedX, aViewData.GetPosX(SC_SPLIT_RIGHT), nVisXR, rDoc.MaxCol(), nStartX );
428  SetScrollBar( *aHScrollRight, nMaxXR, nVisXR, aViewData.GetPosX( SC_SPLIT_RIGHT ) - nStartX, bLayoutRTL );
429  }
430 
431  if (bTop)
432  {
434  tools::Long nMaxYT = lcl_GetScrollRange( nUsedY, aViewData.GetPosY(SC_SPLIT_TOP), nVisYT, rDoc.MaxRow(), 0 );
435  SetScrollBar( *aVScrollTop, nMaxYT, nVisYT, aViewData.GetPosY( SC_SPLIT_TOP ), bLayoutRTL );
436  }
437 
438  // test the range
439 
440  nDiff = lcl_UpdateBar( *aHScrollLeft, nVisXL );
441  if (nDiff) ScrollX( nDiff, SC_SPLIT_LEFT );
442  if (bRight)
443  {
444  nDiff = lcl_UpdateBar( *aHScrollRight, nVisXR );
445  if (nDiff) ScrollX( nDiff, SC_SPLIT_RIGHT );
446  }
447 
448  nDiff = lcl_UpdateBar( *aVScrollBottom, nVisYB );
449  if (nDiff) ScrollY( nDiff, SC_SPLIT_BOTTOM );
450  if (bTop)
451  {
452  nDiff = lcl_UpdateBar( *aVScrollTop, nVisYT );
453  if (nDiff) ScrollY( nDiff, SC_SPLIT_TOP );
454  }
455 
456  // set visible area for online spelling
457 
458  if ( aViewData.IsActive() )
459  {
460  if (UpdateVisibleRange())
461  SC_MOD()->AnythingChanged(); // if visible area has changed
462  }
463 }
464 
465 #ifndef HDR_SLIDERSIZE
466 #define HDR_SLIDERSIZE 2
467 #endif
468 
470 {
471  for (sal_uInt16 i=0; i<4; i++)
472  if (WhichV(static_cast<ScSplitPos>(i))==eWhich)
473  {
474  ScGridWindow* pWin = pGridWin[i].get();
475  if (pWin)
476  {
477  tools::Rectangle aRect( 0,nDragPos, pWin->GetOutputSizePixel().Width()-1,nDragPos+HDR_SLIDERSIZE-1 );
478  pWin->PaintImmediately();
479  pWin->DoInvertRect( aRect ); // Pixel
480  }
481  }
482 }
483 
485 {
486  for (sal_uInt16 i=0; i<4; i++)
487  if (WhichH(static_cast<ScSplitPos>(i))==eWhich)
488  {
489  ScGridWindow* pWin = pGridWin[i].get();
490  if (pWin)
491  {
492  tools::Rectangle aRect( nDragPos,0, nDragPos+HDR_SLIDERSIZE-1,pWin->GetOutputSizePixel().Height()-1 );
493  pWin->PaintImmediately();
494  pWin->DoInvertRect( aRect ); // Pixel
495  }
496  }
497 }
498 
500 {
501  // make sure all visible cells are interpreted,
502  // so the next paint will not execute a macro function
503 
504  ScDocument& rDoc = aViewData.GetDocument();
505  if ( !rDoc.GetAutoCalc() )
506  return;
507 
508  SCTAB nTab = aViewData.GetTabNo();
509  for (sal_uInt16 i=0; i<4; i++)
510  {
511  // rely on gridwin pointers to find used panes
512  // no IsVisible test in case the whole view is not yet shown
513 
514  if (pGridWin[i])
515  {
516  ScHSplitPos eHWhich = WhichH( ScSplitPos(i) );
517  ScVSplitPos eVWhich = WhichV( ScSplitPos(i) );
518 
519  SCCOL nX1 = rDoc.SanitizeCol( aViewData.GetPosX( eHWhich ));
520  SCROW nY1 = rDoc.SanitizeRow( aViewData.GetPosY( eVWhich ));
521  SCCOL nX2 = rDoc.SanitizeCol( nX1 + aViewData.VisibleCellsX( eHWhich ));
522  SCROW nY2 = rDoc.SanitizeRow( nY1 + aViewData.VisibleCellsY( eVWhich ));
523 
524  rDoc.InterpretDirtyCells(ScRange(nX1, nY1, nTab, nX2, nY2, nTab));
525  }
526  }
527 
528  // #i65047# repaint during the above loop may have set the bNeedsRepaint flag
530 }
531 
532 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3108
virtual void EnableRTL(bool bEnable=true) override
void InitRefMode(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, ScRefType eType)
Definition: tabview4.cxx:309
void InvertVertical(ScHSplitPos eWhich, tools::Long nDragPos)
Definition: tabview4.cxx:484
SCCOL SanitizeCol(SCCOL nCol) const
Definition: document.hxx:880
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:353
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:42
ScRefType GetRefType() const
Definition: viewdata.hxx:521
SCROW GetRefEndY() const
Definition: viewdata.hxx:526
ScVSplitPos WhichV(ScSplitPos ePos)
Definition: viewdata.hxx:718
static tools::Long lcl_GetScrollRange(SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis, SCCOLROW nMax, SCCOLROW nStart)
Definition: tabview4.cxx:377
constexpr sal_uInt16 KEY_MOD1
OUString ScResId(TranslateId aId)
Definition: scdll.cxx:89
VclPtr< ScrollBar > aHScrollLeft
Definition: tabview.hxx:152
static tools::Long GetScrollBarPos(const ScrollBar &rScroll)
Definition: tabview4.cxx:355
SCROW Row() const
Definition: address.hxx:261
ScVSplitPos
Definition: viewdata.hxx:46
HeaderType
Definition: tabview.hxx:57
QuickHelpFlags nTipAlign
Definition: tabview.hxx:176
VclPtr< ScrollBar > aVScrollBottom
Definition: tabview.hxx:151
bool GetDelMark(ScRange &rRange) const
Definition: viewdata.hxx:539
VclPtr< ScrollBar > aHScrollRight
Definition: tabview.hxx:153
void DoneRefMode(bool bContinue=false)
Definition: tabview4.cxx:159
SCROW GetRefStartY() const
Definition: viewdata.hxx:523
long Long
SCROW GetCurY() const
Definition: viewdata.hxx:401
ScHSplitPos WhichH(ScSplitPos ePos)
Definition: viewdata.hxx:712
void AddRefEntry()
Multiple selection.
Definition: scmod.cxx:1722
void SetDocumentModified()
Definition: docsh.cxx:2941
SCROW GetFixPosY() const
Definition: viewdata.hxx:420
bool HasEditView(ScSplitPos eWhich) const
Definition: viewdata.hxx:572
SCTAB GetTabNo() const
Definition: viewdata.hxx:394
ScAddress aEnd
Definition: address.hxx:500
ScSplitPos GetActivePart() const
Definition: viewdata.hxx:397
ScDocument & GetDocument() const
Definition: viewdata.hxx:379
void PaintImmediately()
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1400
VclPtr< vcl::Window > sTopParent
Definition: tabview.hxx:178
ScSplitPos
Definition: viewdata.hxx:44
void ScrollX(tools::Long nDeltaX, ScHSplitPos eWhich, bool bUpdBars=true)
Definition: tabview.cxx:1152
constexpr tools::Long Width() const
static tools::Long lcl_UpdateBar(ScrollBar &rScroll, SCCOLROW nSize)
Definition: tabview4.cxx:362
void InvertHorizontal(ScVSplitPos eWhich, tools::Long nDragPos)
Definition: tabview4.cxx:469
void SetPageSize(tools::Long nNewSize)
bool IsFormulaMode()
Definition: scmod.cxx:1621
void * nTipVisible
Definition: tabview.hxx:174
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:872
std::array< VclPtr< ScGridWindow >, 4 > pGridWin
Definition: tabview.hxx:142
void HideTip()
Definition: tabview4.cxx:34
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
SCCOL VisibleCellsX(ScHSplitPos eWhichX) const
Definition: viewdata.cxx:2683
static void * ShowPopover(vcl::Window *pParent, const tools::Rectangle &rScreenRect, const OUString &rText, QuickHelpFlags nStyle)
void UpdateShrinkOverlay()
Definition: tabview2.cxx:993
void SetNew(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
Definition: viewutil.cxx:369
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1414
ScSplitMode GetHSplitMode() const
Definition: viewdata.hxx:415
void SetThumbPos(tools::Long nThumbPos)
ScViewData & GetViewData()
Definition: tabview.hxx:333
ScGridWindow * GetActiveWin()
Definition: tabview.cxx:887
void CheckNeedsRepaint()
Definition: tabview3.cxx:3085
void SetRefStart(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
Definition: viewdata.cxx:4081
void InterpretVisible()
Definition: tabview4.cxx:499
SCROW VisibleCellsY(ScVSplitPos eWhichY) const
Definition: viewdata.cxx:2688
void PutInOrder(T &nStart, T &nEnd)
Definition: address.hxx:953
DocumentType eType
void PaintArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScUpdateMode eMode=ScUpdateMode::All)
Definition: tabview3.cxx:2306
void UpdateLokReferenceMarks()
Definition: inputhdl.cxx:524
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:871
OUString sTipString
Definition: tabview.hxx:177
static void HidePopover(vcl::Window const *pParent, void *nId)
SCTAB GetRefEndZ() const
Definition: viewdata.hxx:527
int i
Point GetScrPos(SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich, bool bAllowNeg=false, SCTAB nForTab=-1) const
Definition: viewdata.cxx:2375
bool GetDiff(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2)
Definition: viewutil.cxx:380
sal_Int16 SCCOL
Definition: types.hxx:21
#define SC_MOD()
Definition: scmod.hxx:250
static bool IsQuickHelpEnabled()
void SetVisibleSize(tools::Long nNewSize)
void SetRange(const Range &rRange)
QuickHelpFlags
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
Definition: documen3.cxx:1176
ScMarkType GetSimpleArea(SCCOL &rStartCol, SCROW &rStartRow, SCTAB &rStartTab, SCCOL &rEndCol, SCROW &rEndRow, SCTAB &rEndTab) const
Definition: viewdata.cxx:1179
bool IsActive() const
Definition: viewdata.hxx:381
void SetRefMode(bool bNewMode, ScRefType eNewType)
Definition: viewdata.hxx:529
VclPtr< ScrollBar > aVScrollTop
Definition: tabview.hxx:150
SCCOL GetRefEndX() const
Definition: viewdata.hxx:525
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:498
SC_DLLPUBLIC bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, SCTAB nTab, bool bRefresh=false)
Definition: document.cxx:5594
void UpdateScrollBars(HeaderType eHeaderType=BOTH_HEADERS)
Definition: tabview4.cxx:390
SCCOL Col() const
Definition: address.hxx:266
void StopRefMode()
Definition: tabview4.cxx:113
tools::Long GetThumbPos() const
SCCOL GetRefStartX() const
Definition: viewdata.hxx:522
SCROW SanitizeRow(SCROW nRow) const
Definition: document.hxx:881
SCCOL GetFixPosX() const
Definition: viewdata.hxx:419
SCTAB GetRefStartZ() const
Definition: viewdata.hxx:524
ScHSplitPos
Definition: viewdata.hxx:45
void SetEmbedded(const ScRange &rRange)
Definition: documen3.cxx:1747
sal_Int32 SCROW
Definition: types.hxx:17
void ShowRefTip()
Definition: tabview4.cxx:49
void UpdateOle(const ScViewData &rViewData, bool bSnapSize=false)
Definition: docsh6.cxx:152
ScFillMode GetFillMode() const
Definition: viewdata.hxx:506
tools::Rectangle aTipRectangle
Definition: tabview.hxx:175
SC_DLLPUBLIC bool GetTableArea(SCTAB nTab, SCCOL &rEndCol, SCROW &rEndRow, bool bCalcHiddens=false) const
Definition: document.cxx:1021
constexpr tools::Long Height() const
bool UpdateVisibleRange()
Definition: tabview.cxx:1497
sal_uInt16 nScFillModeMouseModifier
Definition: global.cxx:115
void ScrollY(tools::Long nDeltaY, ScVSplitPos eWhich, bool bUpdBars=true)
Definition: tabview.cxx:1235
void InterpretDirtyCells(const ScRangeList &rRanges)
Definition: document.cxx:3919
ScRefType
Mouse mode to select areas.
Definition: viewdata.hxx:55
SCROW GetEditViewRow() const
Definition: viewdata.hxx:594
void SetRefEnd(SCCOL nNewX, SCROW nNewY, SCTAB nNewZ)
Definition: viewdata.cxx:4086
std::unique_ptr< ScViewSelectionEngine > pSelEngine
Definition: tabview.hxx:124
void AlignToCursor(SCCOL nCurX, SCROW nCurY, ScFollowMode eMode, const ScSplitPos *pWhich=nullptr)
Definition: tabview3.cxx:916
SC_DLLPUBLIC bool IsLayoutRTL(SCTAB nTab) const
Definition: document.cxx:986
Size GetOutputSizePixel() const
#define HDR_SLIDERSIZE
Definition: tabview4.cxx:466
void DoInvertRect(const tools::Rectangle &rPixel)
Definition: gridwin4.cxx:301
ScViewData aViewData
Definition: tabview.hxx:122
Point OutputToScreenPixel(const Point &rPos) const
void UpdateRef(SCCOL nCurX, SCROW nCurY, SCTAB nCurZ)
Definition: tabview4.cxx:186
bool IsRefMode() const
Definition: viewdata.hxx:520
ScSplitMode GetVSplitMode() const
Definition: viewdata.hxx:416
sal_Int16 SCTAB
Definition: types.hxx:22
SCCOL GetCurX() const
Definition: viewdata.hxx:400
SC_DLLPUBLIC bool GetAutoCalc() const
Definition: document.hxx:1360
static void SetScrollBar(ScrollBar &rScroll, tools::Long nRangeMax, tools::Long nVisible, tools::Long nPos, bool bLayoutRTL)
Definition: tabview4.cxx:343