LibreOffice Module sc (master)  1
viewfun6.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 <formula/token.hxx>
21 #include <svx/svdocapt.hxx>
22 #include <sfx2/bindings.hxx>
23 #include <sfx2/dispatch.hxx>
24 #include <svl/stritem.hxx>
25 #include <svl/numformat.hxx>
26 #include <svl/zforlist.hxx>
27 #include <svl/zformat.hxx>
28 #include <vcl/uitest/logger.hxx>
30 #include <editeng/editview.hxx>
31 #include <sal/log.hxx>
32 
33 #include <viewfunc.hxx>
34 #include <viewdata.hxx>
35 #include <drwlayer.hxx>
36 #include <docsh.hxx>
37 #include <futext.hxx>
38 #include <docfunc.hxx>
39 #include <sc.hrc>
40 #include <fusel.hxx>
41 #include <reftokenhelper.hxx>
42 #include <externalrefmgr.hxx>
43 #include <markdata.hxx>
44 #include <drawview.hxx>
45 #include <inputhdl.hxx>
46 #include <tabvwsh.hxx>
47 #include <scmod.hxx>
48 #include <postit.hxx>
49 
50 #include <vector>
51 
52 namespace
53 {
54 
55 void collectUIInformation( const OUString& aevent )
56 {
57  EventDescription aDescription;
58  aDescription.aID = "grid_window";
59  aDescription.aParameters = {{ aevent , ""}};
60  aDescription.aAction = "COMMENT";
61  aDescription.aParent = "MainWindow";
62  aDescription.aKeyWord = "ScGridWinUIObject";
63  UITestLogger::getInstance().logEvent(aDescription);
64 }
65 
66 }
67 
68 using ::std::vector;
69 
71 {
72  ScDocShell* pDocSh = GetViewData().GetDocShell();
73  pDocSh->GetDocFunc().DetectiveAddPred( GetViewData().GetCurPos() );
74  RecalcPPT();
75 }
76 
78 {
79  ScDocShell* pDocSh = GetViewData().GetDocShell();
80  pDocSh->GetDocFunc().DetectiveDelPred( GetViewData().GetCurPos() );
81  RecalcPPT();
82 }
83 
85 {
86  ScDocShell* pDocSh = GetViewData().GetDocShell();
87  pDocSh->GetDocFunc().DetectiveAddSucc( GetViewData().GetCurPos() );
88  RecalcPPT();
89 }
90 
92 {
93  ScDocShell* pDocSh = GetViewData().GetDocShell();
94  pDocSh->GetDocFunc().DetectiveDelSucc( GetViewData().GetCurPos() );
95  RecalcPPT();
96 }
97 
99 {
100  ScDocShell* pDocSh = GetViewData().GetDocShell();
101  pDocSh->GetDocFunc().DetectiveAddError( GetViewData().GetCurPos() );
102  RecalcPPT();
103 }
104 
106 {
107  ScDocShell* pDocSh = GetViewData().GetDocShell();
108  pDocSh->GetDocFunc().DetectiveDelAll( GetViewData().GetTabNo() );
109  RecalcPPT();
110 }
111 
113 {
114  ScDocShell* pDocSh = GetViewData().GetDocShell();
115  pDocSh->GetDocFunc().DetectiveMarkInvalid( GetViewData().GetTabNo() );
116  RecalcPPT();
117 }
118 
120 {
121  ScDocShell* pDocSh = GetViewData().GetDocShell();
122  pDocSh->GetDocFunc().DetectiveRefresh();
123  RecalcPPT();
124 }
125 
126 static void lcl_jumpToRange(const ScRange& rRange, ScViewData* pView, const ScDocument& rDoc)
127 {
128  OUString aAddrText(rRange.Format(rDoc, ScRefFlags::RANGE_ABS_3D));
129  SfxStringItem aPosItem(SID_CURRENTCELL, aAddrText);
130  SfxBoolItem aUnmarkItem(FN_PARAM_1, true); // remove existing selection
131  pView->GetDispatcher().ExecuteList(
132  SID_CURRENTCELL, SfxCallMode::SYNCHRON | SfxCallMode::RECORD,
133  { &aPosItem, &aUnmarkItem });
134 }
135 
137 {
138  ScViewData& rView = GetViewData();
139  ScDocShell* pDocSh = rView.GetDocShell();
140 
141  ScRangeList aRanges(rRanges);
142  ScRangeList aRangesToMark;
143  ScAddress aCurPos = rView.GetCurPos();
144  size_t ListSize = aRanges.size();
145  for ( size_t i = 0; i < ListSize; ++i )
146  {
147  const ScRange & r = aRanges[i];
148  // Collect only those ranges that are on the same sheet as the current
149  // cursor.
150  if (r.aStart.Tab() == aCurPos.Tab())
151  aRangesToMark.push_back(r);
152  }
153 
154  if (aRangesToMark.empty())
155  return;
156 
157  // Jump to the first range of all precedent ranges.
158  const ScRange & r = aRangesToMark.front();
159  lcl_jumpToRange(r, &rView, pDocSh->GetDocument());
160 
161  ListSize = aRangesToMark.size();
162  for ( size_t i = 0; i < ListSize; ++i )
163  {
164  MarkRange(aRangesToMark[i], false, true);
165  }
166 }
167 
169 {
170  ScViewData& rView = GetViewData();
171  ScDocShell* pDocSh = rView.GetDocShell();
172  ScDocument& rDoc = pDocSh->GetDocument();
173  ScMarkData& rMarkData = rView.GetMarkData();
174  ScAddress aCurPos = rView.GetCurPos();
175  ScRangeList aRanges;
176  if (rMarkData.IsMarked() || rMarkData.IsMultiMarked())
177  rMarkData.FillRangeListWithMarks(&aRanges, false);
178  else
179  aRanges.push_back(aCurPos);
180 
181  vector<ScTokenRef> aRefTokens;
182  pDocSh->GetDocFunc().DetectiveCollectAllPreds(aRanges, aRefTokens);
183 
184  if (aRefTokens.empty())
185  // No precedents found. Nothing to do.
186  return;
187 
188  ScTokenRef p = aRefTokens.front();
190  {
191  // This is external. Open the external document if available, and
192  // jump to the destination.
193 
194  sal_uInt16 nFileId = p->GetIndex();
196  const OUString* pPath = pRefMgr->getExternalFileName(nFileId);
197 
198  ScRange aRange;
199  if (pPath && ScRefTokenHelper::getRangeFromToken(&rDoc, aRange, p, aCurPos, true))
200  {
201  OUString aTabName = p->GetString().getString();
202  OUString aRangeStr(aRange.Format(rDoc, ScRefFlags::VALID));
203  OUString sUrl =
204  *pPath +
205  "#" +
206  aTabName +
207  "." +
208  aRangeStr;
209 
210  ScGlobal::OpenURL(sUrl, OUString());
211  }
212  return;
213  }
214  else
215  {
216  ScRange aRange;
217  ScRefTokenHelper::getRangeFromToken(&rDoc, aRange, p, aCurPos);
218  if (aRange.aStart.Tab() != aCurPos.Tab())
219  {
220  // The first precedent range is on a different sheet. Jump to it
221  // immediately and forget the rest.
222  lcl_jumpToRange(aRange, &rView, rDoc);
223  return;
224  }
225  }
226 
227  ScRangeList aDestRanges;
228  ScRefTokenHelper::getRangeListFromTokens(&rDoc, aDestRanges, aRefTokens, aCurPos);
229  MarkAndJumpToRanges(aDestRanges);
230 }
231 
233 {
234  ScViewData& rView = GetViewData();
235  ScDocShell* pDocSh = rView.GetDocShell();
236  ScMarkData& rMarkData = rView.GetMarkData();
237  ScAddress aCurPos = rView.GetCurPos();
238  ScRangeList aRanges;
239  if (rMarkData.IsMarked() || rMarkData.IsMultiMarked())
240  rMarkData.FillRangeListWithMarks(&aRanges, false);
241  else
242  aRanges.push_back(aCurPos);
243 
244  vector<ScTokenRef> aRefTokens;
245  pDocSh->GetDocFunc().DetectiveCollectAllSuccs(aRanges, aRefTokens);
246 
247  if (aRefTokens.empty())
248  // No dependents found. Nothing to do.
249  return;
250 
251  ScRangeList aDestRanges;
252  ScRefTokenHelper::getRangeListFromTokens(&rView.GetDocument(), aDestRanges, aRefTokens, aCurPos);
253  MarkAndJumpToRanges(aDestRanges);
254 }
255 
272 void ScViewFunc::InsertCurrentTime(SvNumFormatType nReqFmt, const OUString& rUndoStr)
273 {
274  ScViewData& rViewData = GetViewData();
275 
276  ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl( rViewData.GetViewShell());
277  bool bInputMode = (pInputHdl && pInputHdl->IsInputMode());
278 
279  ScDocShell* pDocSh = rViewData.GetDocShell();
280  ScDocument& rDoc = pDocSh->GetDocument();
281  ScAddress aCurPos = rViewData.GetCurPos();
282  const sal_uInt32 nCurNumFormat = rDoc.GetNumberFormat(aCurPos);
283  SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
284  const SvNumberformat* pCurNumFormatEntry = pFormatter->GetEntry(nCurNumFormat);
285  const SvNumFormatType nCurNumFormatType = (pCurNumFormatEntry ?
286  pCurNumFormatEntry->GetMaskedType() : SvNumFormatType::UNDEFINED);
287 
288  if (bInputMode)
289  {
290  double fVal = 0.0;
291  sal_uInt32 nFormat = 0;
292  switch (nReqFmt)
293  {
294  case SvNumFormatType::DATE:
295  {
296  Date aActDate( Date::SYSTEM );
297  fVal = aActDate - pFormatter->GetNullDate();
298  if (nCurNumFormatType == SvNumFormatType::DATE)
299  nFormat = nCurNumFormat;
300  }
301  break;
302  case SvNumFormatType::TIME:
303  {
304  tools::Time aActTime( tools::Time::SYSTEM );
305  fVal = aActTime.GetTimeInDays();
306  if (nCurNumFormatType == SvNumFormatType::TIME)
307  nFormat = nCurNumFormat;
308  }
309  break;
310  default:
311  SAL_WARN("sc.ui","unhandled current date/time request");
312  nReqFmt = SvNumFormatType::DATETIME;
313  [[fallthrough]];
314  case SvNumFormatType::DATETIME:
315  {
316  DateTime aActDateTime( DateTime::SYSTEM );
317  fVal = aActDateTime - DateTime( pFormatter->GetNullDate());
318  if (nCurNumFormatType == SvNumFormatType::DATETIME)
319  nFormat = nCurNumFormat;
320  }
321  break;
322  }
323 
324  if (!nFormat)
325  {
326  const LanguageType nLang = (pCurNumFormatEntry ? pCurNumFormatEntry->GetLanguage() : ScGlobal::eLnge);
327  nFormat = pFormatter->GetStandardFormat( nReqFmt, nLang);
328  // This would return a more precise format with seconds and 100th
329  // seconds for a time request.
330  //nFormat = pFormatter->GetStandardFormat( fVal, nFormat, nReqFmt, nLang);
331  }
332  OUString aString;
333  const Color* pColor;
334  pFormatter->GetOutputString( fVal, nFormat, aString, &pColor);
335 
336  pInputHdl->DataChanging();
337  EditView* pTopView = pInputHdl->GetTopView();
338  if (pTopView)
339  pTopView->InsertText( aString);
340  EditView* pTableView = pInputHdl->GetTableView();
341  if (pTableView)
342  pTableView->InsertText( aString);
343  pInputHdl->DataChanged();
344  }
345  else
346  {
347  // Clear "Enter pastes" mode.
348  rViewData.SetPasteMode( ScPasteFlags::NONE );
349  // Clear CopySourceOverlay in each window of a split/frozen tabview.
350  rViewData.GetViewShell()->UpdateCopySourceOverlay();
351 
352  bool bForceReqFmt = false;
353  const double fCell = rDoc.GetValue( aCurPos);
354  // Combine requested date/time stamp with existing cell time/date, if any.
355  switch (nReqFmt)
356  {
357  case SvNumFormatType::DATE:
358  switch (nCurNumFormatType)
359  {
360  case SvNumFormatType::TIME:
361  // An empty cell formatted as time (or 00:00 time) shall
362  // not result in the current date with 00:00 time, but only
363  // in current date.
364  if (fCell != 0.0)
365  nReqFmt = SvNumFormatType::DATETIME;
366  break;
367  case SvNumFormatType::DATETIME:
368  {
369  // Force to only date if the existing date+time is the
370  // current date. This way inserting current date twice
371  // on an existing date+time cell can be used to force
372  // date, which otherwise would only be possible by
373  // applying a date format.
374  double fDate = rtl::math::approxFloor( fCell);
375  if (fDate == (Date( Date::SYSTEM) - pFormatter->GetNullDate()))
376  bForceReqFmt = true;
377  }
378  break;
379  default: break;
380  }
381  break;
382  case SvNumFormatType::TIME:
383  switch (nCurNumFormatType)
384  {
385  case SvNumFormatType::DATE:
386  // An empty cell formatted as date shall not result in the
387  // null date and current time, but only in current time.
388  if (fCell != 0.0)
389  nReqFmt = SvNumFormatType::DATETIME;
390  break;
391  case SvNumFormatType::DATETIME:
392  // Requesting current time on an empty date+time cell
393  // inserts both current date+time.
394  if (fCell == 0.0)
395  nReqFmt = SvNumFormatType::DATETIME;
396  else
397  {
398  // Add current time to an existing date+time where time is
399  // zero and date is current date, else force time only.
400  double fDate = rtl::math::approxFloor( fCell);
401  double fTime = fCell - fDate;
402  if (fTime == 0.0 && fDate == (Date( Date::SYSTEM) - pFormatter->GetNullDate()))
403  nReqFmt = SvNumFormatType::DATETIME;
404  else
405  bForceReqFmt = true;
406  }
407  break;
408  default: break;
409  }
410  break;
411  default:
412  SAL_WARN("sc.ui","unhandled current date/time request");
413  nReqFmt = SvNumFormatType::DATETIME;
414  [[fallthrough]];
415  case SvNumFormatType::DATETIME:
416  break;
417  }
418  double fVal = 0.0;
419  switch (nReqFmt)
420  {
421  case SvNumFormatType::DATE:
422  {
423  Date aActDate( Date::SYSTEM );
424  fVal = aActDate - pFormatter->GetNullDate();
425  }
426  break;
427  case SvNumFormatType::TIME:
428  {
429  tools::Time aActTime( tools::Time::SYSTEM );
430  fVal = aActTime.GetTimeInDays();
431  }
432  break;
433  case SvNumFormatType::DATETIME:
434  switch (nCurNumFormatType)
435  {
436  case SvNumFormatType::DATE:
437  {
438  double fDate = rtl::math::approxFloor( fCell);
439  tools::Time aActTime( tools::Time::SYSTEM );
440  fVal = fDate + aActTime.GetTimeInDays();
441  }
442  break;
443  case SvNumFormatType::TIME:
444  {
445  double fTime = fCell - rtl::math::approxFloor( fCell);
446  Date aActDate( Date::SYSTEM );
447  fVal = (aActDate - pFormatter->GetNullDate()) + fTime;
448  }
449  break;
450  default:
451  {
452  DateTime aActDateTime( DateTime::SYSTEM );
453  // Converting the null date to DateTime forces the
454  // correct operator-() to be used, resulting in a
455  // fractional date+time instead of only date value.
456  fVal = aActDateTime - DateTime( pFormatter->GetNullDate());
457  }
458  }
459  break;
460  default: break;
461 
462  }
463 
464  SfxUndoManager* pUndoMgr = pDocSh->GetUndoManager();
465  pUndoMgr->EnterListAction(rUndoStr, rUndoStr, 0, rViewData.GetViewShell()->GetViewShellId());
466 
467  pDocSh->GetDocFunc().SetValueCell(aCurPos, fVal, true);
468 
469  // Set the new cell format only when it differs from the current cell
470  // format type. Preserve a date+time format unless we force a format
471  // through.
472  if (bForceReqFmt || (nReqFmt != nCurNumFormatType && nCurNumFormatType != SvNumFormatType::DATETIME))
473  SetNumberFormat(nReqFmt);
474  else
475  rViewData.UpdateInputHandler(); // update input bar with new value
476 
477  pUndoMgr->LeaveListAction();
478  }
479 }
480 
481 void ScViewFunc::ShowNote( bool bShow )
482 {
483  if( bShow )
484  HideNoteMarker();
485  const ScViewData& rViewData = GetViewData();
486  ScAddress aPos( rViewData.GetCurX(), rViewData.GetCurY(), rViewData.GetTabNo() );
487  // show note moved to ScDocFunc, to be able to use it in notesuno.cxx
488  rViewData.GetDocShell()->GetDocFunc().ShowNote( aPos, bShow );
489 }
490 
492 {
493  // for editing display and activate
494 
495  ScDocShell* pDocSh = GetViewData().GetDocShell();
496  ScDocument& rDoc = pDocSh->GetDocument();
497  SCCOL nCol = GetViewData().GetCurX();
498  SCROW nRow = GetViewData().GetCurY();
499  SCTAB nTab = GetViewData().GetTabNo();
500  ScAddress aPos( nCol, nRow, nTab );
501 
502  // start drawing undo to catch undo action for insertion of the caption object
503  pDocSh->MakeDrawLayer();
504  ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
505  pDrawLayer->BeginCalcUndo(true);
506  // generated undo action is processed in FuText::StopEditMode
507 
508  // get existing note or create a new note (including caption drawing object)
509  ScPostIt* pNote = rDoc.GetOrCreateNote( aPos );
510  if(!pNote)
511  return;
512 
513  // hide temporary note caption
514  HideNoteMarker();
515  // show caption object without changing internal visibility state
516  pNote->ShowCaptionTemp( aPos );
517 
518  /* Drawing object has been created in ScDocument::GetOrCreateNote() or
519  in ScPostIt::ShowCaptionTemp(), so ScPostIt::GetCaption() should
520  return a caption object. */
521  SdrCaptionObj* pCaption = pNote->GetCaption();
522  if( !pCaption )
523  return;
524 
525  if ( ScDrawView* pScDrawView = GetScDrawView() )
526  pScDrawView->SyncForGrid( pCaption );
527  // #i33764# enable the resize handles before starting edit mode
528  if( FuPoor* pDraw = GetDrawFuncPtr() )
529  static_cast< FuSelection* >( pDraw )->ActivateNoteHandles( pCaption );
530 
531  // activate object (as in FuSelection::TestComment)
532  GetViewData().GetDispatcher().Execute( SID_DRAW_NOTEEDIT, SfxCallMode::SYNCHRON | SfxCallMode::RECORD );
533  // now get the created FuText and set into EditMode
534  FuText* pFuText = dynamic_cast<FuText*>(GetDrawFuncPtr());
535  if (pFuText)
536  {
537  ScrollToObject( pCaption ); // make object fully visible
538  pFuText->SetInEditMode( pCaption );
539 
541  }
542  collectUIInformation("OPEN");
543 }
544 
545 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void BeginCalcUndo(bool bDisableTextEditUsesCommonUndoManager)
Definition: drwlayer.cxx:1417
ScMarkData & GetMarkData()
Definition: viewdata.cxx:3108
void DetectiveMarkInvalid()
Definition: viewfun6.cxx:112
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
ScAddress aStart
Definition: address.hxx:499
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
bool SC_DLLPUBLIC isExternalRef(const ScTokenRef &pToken)
void MarkRange(const ScRange &rRange, bool bSetCursor=true, bool bContinue=false)
Definition: tabview3.cxx:1687
bool DataChanging(sal_Unicode cTyped=0, bool bFromCommand=false)
Definition: inputhdl.cxx:2598
bool IsInputMode() const
Definition: inputhdl.hxx:184
void getRangeListFromTokens(const ScDocument *pDoc, ScRangeList &rRangeList, const ::std::vector< ScTokenRef > &pTokens, const ScAddress &rPos)
void SetPasteMode(ScPasteFlags nFlags)
Definition: viewdata.hxx:447
void HideNoteMarker()
Definition: tabview2.cxx:1387
SCROW GetCurY() const
Definition: viewdata.hxx:401
void FillRangeListWithMarks(ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
Create a range list of marks.
Definition: markdata.cxx:386
static void OpenURL(const OUString &rURL, const OUString &rTarget, bool bIgnoreSettings=false)
Open the specified URL.
Definition: global.cxx:762
SCTAB GetTabNo() const
Definition: viewdata.hxx:394
SC_DLLPUBLIC void GetNumberFormat(SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt32 &rFormat) const
Definition: document.cxx:3672
SC_DLLPUBLIC bool ShowNote(const ScAddress &rPos, bool bShow)
Definition: docfunc.cxx:1281
ScDocument & GetDocument() const
Definition: viewdata.hxx:379
Base class for all functions.
Definition: fusel.hxx:27
EditView * GetTableView()
Definition: inputhdl.hxx:236
void DetectiveMarkPred()
Definition: viewfun6.cxx:168
const OUString * getExternalFileName(sal_uInt16 nFileId, bool bForceOriginal=false)
It returns a pointer to the name of the URI associated with a given external file ID...
virtual SfxUndoManager * GetUndoManager() override
Definition: docsh.cxx:2926
static UITestLogger & getInstance()
void UpdateCopySourceOverlay()
Definition: tabview2.cxx:979
void logEvent(const EventDescription &rDescription)
void UpdateInputHandler(bool bForce=false)
Definition: viewdata.cxx:3964
void DetectiveCollectAllSuccs(const ScRangeList &rSrcRanges,::std::vector< ScTokenRef > &rRefTokens)
Definition: docfunc.cxx:567
void DetectiveCollectAllPreds(const ScRangeList &rSrcRanges,::std::vector< ScTokenRef > &rRefTokens)
Definition: docfunc.cxx:562
Additional class containing cell annotation data.
Definition: postit.hxx:159
bool IsMultiMarked() const
Definition: markdata.hxx:82
SC_DLLPUBLIC ScExternalRefManager * GetExternalRefManager() const
Definition: documen3.cxx:623
void push_back(const ScRange &rRange)
Definition: rangelst.cxx:1141
bool DetectiveRefresh(bool bAutomatic=false)
Definition: docfunc.cxx:465
SCTAB Tab() const
Definition: address.hxx:270
double GetTimeInDays() const
void RecalcPPT()
Definition: tabview3.cxx:2774
void DetectiveDelSucc()
Definition: viewfun6.cxx:91
ScDrawLayer * MakeDrawLayer()
Definition: docsh2.cxx:169
ScViewData & GetViewData()
Definition: tabview.hxx:333
void ScrollToObject(const SdrObject *pDrawObj)
Definition: tabview5.cxx:551
void ShowCaptionTemp(const ScAddress &rPos, bool bShow=true)
Shows or hides the caption temporarily (does not change internal visibility state).
Definition: postit.cxx:994
bool empty() const
Definition: rangelst.hxx:88
Base class for Text functions.
Definition: futext.hxx:27
SC_DLLPUBLIC double GetValue(const ScAddress &rPos) const
Definition: document.cxx:3659
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:356
bool SetValueCell(const ScAddress &rPos, double fVal, bool bInteraction)
Definition: docfunc.cxx:860
SC_DLLPUBLIC ScPostIt * GetOrCreateNote(const ScAddress &rPos)
Definition: document.cxx:6639
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1058
void DetectiveAddPred()
Definition: viewfun6.cxx:70
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
Definition: documen2.cxx:441
bool IsMarked() const
Definition: markdata.hxx:81
int i
sal_Int16 SCCOL
Definition: types.hxx:21
#define SC_MOD()
Definition: scmod.hxx:250
void DetectiveAddSucc()
Definition: viewfun6.cxx:84
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
Definition: address.cxx:2212
size_t size() const
Definition: rangelst.hxx:89
void MarkAndJumpToRanges(const ScRangeList &rRanges)
Definition: viewfun6.cxx:136
SvNumFormatType
void DetectiveAddError()
Definition: viewfun6.cxx:98
bool DetectiveAddPred(const ScAddress &rPos)
Definition: docfunc.cxx:198
bool DetectiveAddError(const ScAddress &rPos)
Definition: docfunc.cxx:349
void SetNumberFormat(SvNumFormatType nFormatType, sal_uLong nAdd=0)
Definition: viewfunc.cxx:2601
static SC_DLLPUBLIC LanguageType eLnge
Definition: global.hxx:553
Base class for all functions.
Definition: fupoor.hxx:39
void DetectiveDelPred()
Definition: viewfun6.cxx:77
size_t LeaveListAction()
static void lcl_jumpToRange(const ScRange &rRange, ScViewData *pView, const ScDocument &rDoc)
Definition: viewfun6.cxx:126
void InsertText(const OUString &rNew, bool bSelect=false, bool bLOKShowSelect=true)
ScAddress GetCurPos() const
Definition: viewdata.cxx:4076
void InsertCurrentTime(SvNumFormatType nCellFmt, const OUString &rUndoStr)
Insert date or time into current cell.
Definition: viewfun6.cxx:272
void DetectiveDelAll()
Definition: viewfun6.cxx:105
sal_Int32 SCROW
Definition: types.hxx:17
SdrCaptionObj * GetCaption() const
Returns an existing note caption object.
Definition: postit.hxx:236
void ShowNote(bool bShow)
Definition: viewfun6.cxx:481
ScDrawView * GetScDrawView()
Definition: tabview.hxx:341
void DetectiveRefresh()
Definition: viewfun6.cxx:119
const SvNumberformat * GetEntry(sal_uInt32 nKey) const
bool DetectiveDelSucc(const ScAddress &rPos)
Definition: docfunc.cxx:310
sal_uInt32 GetStandardFormat(SvNumFormatType eType, LanguageType eLnge=LANGUAGE_DONTKNOW)
SfxDispatcher & GetDispatcher()
Definition: viewdata.cxx:3102
FuPoor * GetDrawFuncPtr()
Definition: tabview.hxx:321
void DetectiveMarkSucc()
Definition: viewfun6.cxx:232
::boost::intrusive_ptr< formula::FormulaToken > ScTokenRef
Definition: types.hxx:29
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
SvNumFormatType GetMaskedType() const
void * p
static void OnLOKNoteStateChanged(const ScPostIt *pNote)
Definition: tabview5.cxx:665
const ScDocument & GetDocument() const
Definition: docsh.hxx:216
void DataChanged(bool bFromTopNotify=false, bool bSetModified=true)
Definition: inputhdl.cxx:2610
ScRange & front()
Definition: rangelst.hxx:92
#define SAL_WARN(area, stream)
void SetInEditMode(SdrObject *pObj=nullptr, const Point *pMousePixel=nullptr, bool bCursorToEnd=false, const KeyEvent *pInitialKey=nullptr)
Definition: futext.cxx:534
bool DetectiveAddSucc(const ScAddress &rPos)
Definition: docfunc.cxx:273
ScDocFunc & GetDocFunc()
Definition: docsh.hxx:218
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
bool DetectiveDelAll(SCTAB nTab)
Definition: docfunc.cxx:425
std::map< OUString, OUString > aParameters
bool getRangeFromToken(const ScDocument *pDoc, ScRange &rRange, const ScTokenRef &pToken, const ScAddress &rPos, bool bExternal=false)
void EditNote()
Definition: viewfun6.cxx:491
const Date & GetNullDate() const
bool DetectiveDelPred(const ScAddress &rPos)
Definition: docfunc.cxx:234
bool DetectiveMarkInvalid(SCTAB nTab)
Definition: docfunc.cxx:386
EditView * GetTopView()
Definition: inputhdl.hxx:237
void GetOutputString(const double &fOutNumber, sal_uInt32 nFIndex, OUString &sOutString, const Color **ppColor, bool bUseStarFormat=false)
LanguageType GetLanguage() const
sal_Int16 SCTAB
Definition: types.hxx:22
SCCOL GetCurX() const
Definition: viewdata.hxx:400
ViewShellId GetViewShellId() const override