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