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