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