LibreOffice Module sc (master) 1
tabview5.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 <svx/fmshell.hxx>
21#include <svx/svdobj.hxx>
22#include <svx/svdocapt.hxx>
23#include <svx/svdoutl.hxx>
24#include <sfx2/bindings.hxx>
25#include <sfx2/dispatch.hxx>
26#include <sfx2/lokhelper.hxx>
27#include <sfx2/objsh.hxx>
28#include <sfx2/viewfrm.hxx>
29#include <osl/diagnose.h>
30
31#include <tabview.hxx>
32#include <tabvwsh.hxx>
33#include <document.hxx>
34#include <gridwin.hxx>
35#include <olinewin.hxx>
36#include <tabsplit.hxx>
37#include <colrowba.hxx>
38#include <tabcont.hxx>
39#include <sc.hrc>
40#include <pagedata.hxx>
41#include <hiranges.hxx>
42#include <drawview.hxx>
43#include <drwlayer.hxx>
44#include <fusel.hxx>
45#include <seltrans.hxx>
46#include <scmod.hxx>
47#include <docsh.hxx>
48#include <viewuno.hxx>
49#include <postit.hxx>
50#include <spellcheckcontext.hxx>
51
52#include <vcl/settings.hxx>
53
54#include <comphelper/lok.hxx>
55#include <officecfg/Office/Calc.hxx>
56
57using namespace com::sun::star;
58
60{
61 /* RTL layout of the view windows is done manually, because it depends on
62 the sheet orientation, not the UI setting. Note: controls that are
63 already constructed (e.g. scroll bars) have the RTL setting of the GUI.
64 Eventually this has to be disabled manually (see below). */
65 pFrameWin->EnableRTL( false );
66
67 sal_uInt16 i;
68
69 mbInlineWithScrollbar = officecfg::Office::Calc::Layout::Other::TabbarInlineWithScrollbar::get();
70
72 aScrollTimer.SetInvokeHandler( LINK( this, ScTabView, TimerHdl ) );
73
74 for (i=0; i<4; i++)
75 pGridWin[i] = nullptr;
77
81
83
85 &aHdrFunc, pHdrSelEng.get(), this );
86 pColBar[SC_SPLIT_RIGHT] = nullptr;
88 &aHdrFunc, pHdrSelEng.get(), this );
89 pRowBar[SC_SPLIT_TOP] = nullptr;
90 for (i=0; i<2; i++)
91 pColOutline[i] = pRowOutline[i] = nullptr;
92
95
96 // SSA: override default keyboard step size to allow snap to row/column
97 pHSplitter->SetKeyboardStepSize( 1 );
98 pVSplitter->SetKeyboardStepSize( 1 );
99
102 pTabControl->SetStyle(pTabControl->GetStyle() | WB_SIZEABLE);
103
104 /* #i97900# The tab control has to remain in RTL mode if GUI is RTL, this
105 is needed to draw the 3D effect correctly. The base TabBar implements
106 mirroring independent from the GUI direction. Have to set RTL mode
107 explicitly because the parent frame window is already RTL disabled. */
109
110 InitScrollBar( *aHScrollLeft, aViewData.GetDocument().MaxCol()+1, LINK(this, ScTabView, HScrollLeftHdl) );
111 InitScrollBar( *aHScrollRight, aViewData.GetDocument().MaxCol()+1, LINK(this, ScTabView, HScrollRightHdl) );
112 InitScrollBar( *aVScrollTop, aViewData.GetDocument().MaxRow()+1, LINK(this, ScTabView, VScrollTopHdl) );
113 InitScrollBar( *aVScrollBottom, aViewData.GetDocument().MaxRow()+1, LINK(this, ScTabView, VScrollBottomHdl) );
114 /* #i97900# scrollbars remain in correct RTL mode, needed mirroring etc.
115 is now handled correctly at the respective places. */
116
117 // Don't show anything here, because still in wrong order
118 // Show is received from UpdateShow during first resize
119 // pTabControl, pGridWin, aHScrollLeft, aVScrollBottom,
120 // aCornerButton, pHSplitter, pVSplitter
121
122 // fragment
123
124 pHSplitter->SetSplitHdl( LINK( this, ScTabView, SplitHdl ) );
125 pVSplitter->SetSplitHdl( LINK( this, ScTabView, SplitHdl ) );
126
127 // UpdateShow is done during resize or a copy of an existing view from ctor
128
129 pDrawActual = nullptr;
130 pDrawOld = nullptr;
131
132 // DrawView cannot be create in the TabView - ctor
133 // when the ViewShell isn't constructed yet...
134 // The also applies to ViewOptionsHasChanged()
135
137}
138
140{
141 sal_uInt16 i;
142
143 // remove selection object
144 ScModule* pScMod = SC_MOD();
146 if ( pOld && pOld->GetView() == this )
147 {
148 pOld->ForgetView();
149 pScMod->SetSelectionTransfer( nullptr );
151 }
152
153 pBrushDocument.reset();
154 pDrawBrushSet.reset();
155
156 pPageBreakData.reset();
157
158 delete pDrawActual;
159 pDrawActual = nullptr;
160 delete pDrawOld;
161 pDrawOld = nullptr;
162
164 {
165 ScTabViewShell* pThisViewShell = GetViewData().GetViewShell();
166
167 auto lRemoveWindows =
168 [pThisViewShell] (ScTabViewShell* pOtherViewShell)
169 {
170 ScViewData& rOtherViewData = pOtherViewShell->GetViewData();
171 for (int k = 0; k < 4; ++k)
172 {
173 if (rOtherViewData.HasEditView(static_cast<ScSplitPos>(k)))
174 pThisViewShell->RemoveWindowFromForeignEditView(pOtherViewShell, static_cast<ScSplitPos>(k));
175 }
176 };
177
178 SfxLokHelper::forEachOtherView(pThisViewShell, lRemoveWindows);
179 }
180
181 aViewData.KillEditView(); // as long as GridWins still exist
182
183 if (pDrawView)
184 {
185 for (i=0; i<4; i++)
186 if (pGridWin[i])
187 {
188 pDrawView->DeleteDeviceFromPaintView(*pGridWin[i]->GetOutDev());
189 }
190
191 pDrawView->HideSdrPage();
192 pDrawView.reset();
193 }
194
195 pSelEngine.reset();
196
197 if (mpSpellCheckCxt)
198 mpSpellCheckCxt->dispose();
199 mpSpellCheckCxt.reset();
200
201 mxInputHintOO.reset();
202 for (i=0; i<4; i++)
203 pGridWin[i].disposeAndClear();
204
205 pHdrSelEng.reset();
206
207 for (i=0; i<2; i++)
208 {
209 pColBar[i].disposeAndClear();
210 pRowBar[i].disposeAndClear();
211 pColOutline[i].disposeAndClear();
212 pRowOutline[i].disposeAndClear();
213 }
214
221
225}
226
227void ScTabView::MakeDrawView( TriState nForceDesignMode )
228{
229 if (pDrawView)
230 return;
231
233 OSL_ENSURE(pLayer, "Where is the Draw Layer ??");
234
235 sal_uInt16 i;
236 pDrawView.reset( new ScDrawView( pGridWin[SC_SPLIT_BOTTOMLEFT]->GetOutDev(), &aViewData ) );
237 for (i=0; i<4; i++)
238 if (pGridWin[i])
239 {
240 if ( SC_SPLIT_BOTTOMLEFT != static_cast<ScSplitPos>(i) )
241 pDrawView->AddDeviceToPaintView(*pGridWin[i]->GetOutDev(), nullptr);
242 }
243 pDrawView->RecalcScale();
244 for (i=0; i<4; i++)
245 if (pGridWin[i])
246 {
247 pGridWin[i]->SetMapMode(pGridWin[i]->GetDrawMapMode());
248
249 pGridWin[i]->PaintImmediately(); // because of Invalidate in DrawView ctor (ShowPage),
250 // so that immediately can be drawn
251 }
252 SfxRequest aSfxRequest(SID_OBJECT_SELECT, SfxCallMode::SLOT, aViewData.GetViewShell()->GetPool());
254 pLayer,aSfxRequest));
255
256 // used when switching back from page preview: restore saved design mode state
257 // (otherwise, keep the default from the draw view ctor)
258 if ( nForceDesignMode != TRISTATE_INDET )
259 pDrawView->SetDesignMode( nForceDesignMode != TRISTATE_FALSE );
260
261 // register at FormShell
263 if (pFormSh)
264 pFormSh->SetView(pDrawView.get());
265
267 aViewData.GetViewShell()->BroadcastAccessibility(SfxHint(SfxHintId::ScAccMakeDrawLayer));
268}
269
271{
272 if (pDrawView)
273 {
274 pDrawView->AddDeviceToPaintView(*pWin->GetOutDev(), nullptr);
275 pWin->DrawLayerCreated();
276 }
278}
279
280void ScTabView::TabChanged( bool bSameTabButMoved )
281{
282 if (pDrawView)
283 {
284 DrawDeselectAll(); // end also text edit mode
285
286 SCTAB nTab = aViewData.GetTabNo();
287 pDrawView->HideSdrPage();
288 pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab));
289
291
292 pDrawView->RecalcScale();
293 pDrawView->UpdateWorkArea(); // PageSize is different per page
294 }
295
296 SfxBindings& rBindings = aViewData.GetBindings();
297
298 // There is no easy way to invalidate all slots of the FormShell
299 // (for disabled slots on protected tables), therefore simply everything...
300 rBindings.InvalidateAll(false);
301
303 {
304 SfxHint aAccHint(SfxHintId::ScAccTableChanged);
306 }
307
308 // notification for XActivationBroadcaster
310 if (pViewFrame)
311 {
312 uno::Reference<frame::XController> xController = pViewFrame->GetFrame().GetController();
313 if (xController.is())
314 {
315 ScTabViewObj* pImp = comphelper::getFromUnoTunnel<ScTabViewObj>( xController );
316 if (pImp)
317 pImp->SheetChanged( bSameTabButMoved );
318 }
319 }
320
321 for (int i = 0; i < 4; i++)
322 {
323 if (pGridWin[i])
324 {
325 pGridWin[i]->initiatePageBreaks();
326 // Trigger calculating page breaks only once.
327 break;
328 }
329 }
330
332 return;
333
334 ScDocShell* pDocSh = GetViewData().GetDocShell();
335 ScModelObj* pModelObj = pDocSh ? comphelper::getFromUnoTunnel<ScModelObj>( pDocSh->GetModel()) : nullptr;
336
337 if (!pModelObj)
338 return;
339
340 Size aDocSize = pModelObj->getDocumentSize();
342 ss << aDocSize.Width() << ", " << aDocSize.Height();
343 OString sRect = ss.str().c_str();
344 ScTabViewShell* pViewShell = aViewData.GetViewShell();
345
346 // Invalidate first
347 tools::Rectangle aRectangle(0, 0, 1000000000, 1000000000);
348 pViewShell->libreOfficeKitViewInvalidateTilesCallback(&aRectangle, aViewData.GetTabNo(), 0);
349
350 ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(pViewShell->GetCurrentDocument());
351 SfxLokHelper::notifyDocumentSizeChanged(pViewShell, sRect, pModel, false);
352}
353
355{
356 if (!pDrawView)
357 return;
358
359 SCTAB nTab = aViewData.GetTabNo();
360 bool bEx = aViewData.GetViewShell()->IsDrawSelMode();
361 bool bProt = aViewData.GetDocument().IsTabProtected( nTab ) ||
363 bool bShared = aViewData.GetDocShell()->IsDocShared();
364
365 SdrLayer* pLayer;
366 SdrLayerAdmin& rAdmin = pDrawView->GetModel()->GetLayerAdmin();
367 pLayer = rAdmin.GetLayerPerID(SC_LAYER_BACK);
368 if (pLayer)
369 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || !bEx || bShared );
370 pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN);
371 if (pLayer)
372 pDrawView->SetLayerLocked( pLayer->GetName() );
373 pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT);
374 if (pLayer)
375 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
376 pLayer = rAdmin.GetLayerPerID(SC_LAYER_CONTROLS);
377 if (pLayer)
378 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
379 pLayer = rAdmin.GetLayerPerID(SC_LAYER_HIDDEN);
380 if (pLayer)
381 {
382 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
383 pDrawView->SetLayerVisible( pLayer->GetName(), false);
384 }
385 pTabControl->SetAddButtonEnabled(aViewData.GetDocument().IsDocEditable());
386}
387
389{
390 if (!pDrawView)
391 return;
392
394 if ( pDrawActual &&
395 ( pViewSh->IsDrawTextShell() || pDrawActual->GetSlotID() == SID_DRAW_NOTEEDIT ) )
396 {
397 // end text edit (as if escape pressed, in FuDraw)
399 SfxCallMode::SLOT | SfxCallMode::RECORD );
400 }
401
402 pDrawView->ScEndTextEdit();
403 pDrawView->UnmarkAll();
404
405 if (!pViewSh->IsDrawSelMode())
406 pViewSh->SetDrawShell( false );
407}
408
410{
411 if (pDrawView)
412 return pDrawView->IsTextEdit();
413 else
414 return false;
415}
416
418{
419 return aViewData.GetZoomType();
420}
421
422void ScTabView::SetZoomType( SvxZoomType eNew, bool bAll )
423{
424 aViewData.SetZoomType( eNew, bAll );
425}
426
427void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, bool bAll )
428{
429 aViewData.SetZoom( rNewX, rNewY, bAll );
430 if (pDrawView)
431 pDrawView->RecalcScale();
432 ZoomChanged();
433}
434
436{
438 if (pDrawView)
439 pDrawView->RecalcScale();
440 ZoomChanged();
441}
442
444{
446 if (pDrawView)
447 pDrawView->RecalcScale();
448 ZoomChanged();
449}
450
452{
453 if (pDrawView)
454 pDrawView->SetDragMode( SdrDragMode::Move );
455}
456
457void ScTabView::ViewOptionsHasChanged( bool bHScrollChanged, bool bGraphicsChanged )
458{
459 // create DrawView when grid should be displayed
462
463 if (pDrawView)
464 pDrawView->UpdateUserViewOptions();
465
466 if (bGraphicsChanged)
467 DrawEnableAnim(true); // DrawEnableAnim checks the options state
468
469 // if TabBar is set to visible, make sure its size is not 0
470 bool bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 );
471
472 // if ScrollBar is set to visible, TabBar must make room
473 bool bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() &&
474 pTabControl->GetSizePixel().Width() > SC_TABBAR_DEFWIDTH );
475
476 if ( bGrow || bShrink )
477 {
478 Size aSize = pTabControl->GetSizePixel();
479 aSize.setWidth( SC_TABBAR_DEFWIDTH ); // initial size
480 pTabControl->SetSizePixel(aSize); // DoResize is called later...
481 }
482}
483
484// helper function against including the drawing layer
485
487{
488 if ( pDrawView )
489 pDrawView->MarkListHasChanged();
490}
491
493{
494 if ( pDrawView )
495 pDrawView->AdjustMarkHdl();
496}
497
499{
500 if ( pDrawView )
501 pDrawView->UpdateIMap( pObj );
502}
503
505{
506 sal_uInt16 i;
507 if ( !pDrawView )
508 return;
509
510 // don't start animations if display of graphics is disabled
511 // graphics are controlled by VOBJ_TYPE_OLE
513 {
514 if ( !pDrawView->IsAnimationEnabled() )
515 {
516 pDrawView->SetAnimationEnabled();
517
518 // animated GIFs must be restarted:
520 for (i=0; i<4; i++)
521 if ( pGridWin[i] && pGridWin[i]->IsVisible() )
523 }
524 }
525 else
526 {
527 pDrawView->SetAnimationEnabled(false);
528 }
529}
530
532{
533 if ( pDrawView )
534 {
535 Outliner* pOL = pDrawView->GetTextEditOutliner();
536 if (pOL)
538 }
539}
540
542{
543 LanguageType eNewLang = SC_MOD()->GetOptDigitLanguage();
544 for (VclPtr<ScGridWindow> & pWin : pGridWin)
545 if ( pWin )
546 pWin->GetOutDev()->SetDigitLanguage( eNewLang );
547}
548
550{
551 if ( pDrawObj )
552 {
553 // #i118524# use the BoundRect, this defines the visible area
554 MakeVisible(pDrawObj->GetCurrentBoundRect());
555 }
556}
557
559{
560 vcl::Window* pWin = GetActiveWin();
561 Size aWinSize = pWin->GetOutputSizePixel();
562 SCTAB nTab = aViewData.GetTabNo();
563
564 tools::Rectangle aRect = pWin->LogicToPixel( rHMMRect );
565
566 tools::Long nScrollX=0, nScrollY=0; // pixel
567
568 if ( aRect.Right() >= aWinSize.Width() ) // right out
569 {
570 nScrollX = aRect.Right() - aWinSize.Width() + 1; // right border visible
571 if ( aRect.Left() < nScrollX )
572 nScrollX = aRect.Left(); // left visible (if too big)
573 }
574 if ( aRect.Bottom() >= aWinSize.Height() ) // bottom out
575 {
576 nScrollY = aRect.Bottom() - aWinSize.Height() + 1; // bottom border visible
577 if ( aRect.Top() < nScrollY )
578 nScrollY = aRect.Top(); // top visible (if too big)
579 }
580
581 if ( aRect.Left() < 0 ) // left out
582 nScrollX = aRect.Left(); // left border visible
583 if ( aRect.Top() < 0 ) // top out
584 nScrollY = aRect.Top(); // top border visible
585
586 if (!(nScrollX || nScrollY))
587 return;
588
590 if ( rDoc.IsNegativePage( nTab ) )
592
593 double nPPTX = aViewData.GetPPTX();
594 double nPPTY = aViewData.GetPPTY();
596 SCCOL nPosX = aViewData.GetPosX(WhichH(eWhich));
597 SCROW nPosY = aViewData.GetPosY(WhichV(eWhich));
598
599 tools::Long nLinesX=0, nLinesY=0; // columns/rows - scroll at least nScrollX/Y
600
601 if (nScrollX > 0)
602 while (nScrollX > 0 && nPosX < rDoc.MaxCol())
603 {
604 nScrollX -= static_cast<tools::Long>( rDoc.GetColWidth(nPosX, nTab) * nPPTX );
605 ++nPosX;
606 ++nLinesX;
607 }
608 else if (nScrollX < 0)
609 while (nScrollX < 0 && nPosX > 0)
610 {
611 --nPosX;
612 nScrollX += static_cast<tools::Long>( rDoc.GetColWidth(nPosX, nTab) * nPPTX );
613 --nLinesX;
614 }
615
616 if (nScrollY > 0)
617 while (nScrollY > 0 && nPosY < rDoc.MaxRow())
618 {
619 nScrollY -= static_cast<tools::Long>( rDoc.GetRowHeight(nPosY, nTab) * nPPTY );
620 ++nPosY;
621 ++nLinesY;
622 }
623 else if (nScrollY < 0)
624 while (nScrollY < 0 && nPosY > 0)
625 {
626 --nPosY;
627 nScrollY += static_cast<tools::Long>( rDoc.GetRowHeight(nPosY, nTab) * nPPTY );
628 --nLinesY;
629 }
630
631 ScrollLines( nLinesX, nLinesY ); // execute
632}
633
635{
636 pDrawBrushSet.reset();
637 pBrushDocument = std::move(pNew);
638
639 bLockPaintBrush = bLock;
640
641 aViewData.GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
642}
643
644void ScTabView::SetDrawBrushSet( std::unique_ptr<SfxItemSet> pNew, bool bLock )
645{
646 pBrushDocument.reset();
647 pDrawBrushSet = std::move(pNew);
648
649 bLockPaintBrush = bLock;
650
651 aViewData.GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
652}
653
655{
656 if ( HasPaintBrush() )
657 {
658 SetBrushDocument( nullptr, false );
659 SetActivePointer( aViewData.IsThemedCursor() ? PointerStyle::FatCross : PointerStyle::Arrow ); // switch pointers also when ended with escape key
660 }
661}
662
664{
666 return;
667
668 const SdrCaptionObj* pCaption = pNote->GetCaption();
669 if (!pCaption) return;
670
671 tools::Rectangle aRect = pCaption->GetLogicRect();
672 basegfx::B2DRange aTailRange = pCaption->getTailPolygon().getB2DRange();
673 tools::Rectangle aTailRect(aTailRange.getMinX(), aTailRange.getMinY(),
674 aTailRange.getMaxX(), aTailRange.getMaxY());
675 aRect.Union( aTailRect );
676
677 // This is a temporary workaround: sometime in tiled rendering mode
678 // the tip of the note arrow is misplaced by a fixed offset.
679 // The value used below is enough to get the tile, where the arrow tip is
680 // placed, invalidated.
681 const int nBorderSize = 200;
682 tools::Rectangle aInvalidRect = aRect;
683 aInvalidRect.AdjustLeft( -nBorderSize );
684 aInvalidRect.AdjustRight( nBorderSize );
685 aInvalidRect.AdjustTop( -nBorderSize );
686 aInvalidRect.AdjustBottom( nBorderSize );
687
688 SfxViewShell* pCurrentViewShell = SfxViewShell::Current();
689 SfxViewShell* pViewShell = SfxViewShell::GetFirst();
690 while (pViewShell)
691 {
692 ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
693 if (pTabViewShell && pViewShell->GetDocId() == pCurrentViewShell->GetDocId())
694 {
695 for (auto& pWin: pTabViewShell->pGridWin)
696 {
697 if (pWin && pWin->IsVisible())
698 {
699 pWin->Invalidate(aInvalidRect);
700 }
701 }
702 }
703 pViewShell = SfxViewShell::GetNext(*pViewShell);
704 }
705}
706
707/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static bool GetLayoutRTL()
void SetView(FmFormView *pView)
sal_uInt16 GetSlotID() const
Definition: fupoor.hxx:90
Base class for all functions.
Definition: fusel.hxx:28
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4225
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4184
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1919
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:891
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:892
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:1006
bool IsDocEditable() const
Definition: documen3.cxx:1913
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1082
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:319
void SetAutoSpellContext(const std::shared_ptr< sc::SpellCheckContext > &ctx)
Definition: gridwin.cxx:5750
void DrawLayerCreated()
Definition: gridwin.cxx:5742
virtual Size getDocumentSize() override
Definition: docuno.cxx:644
void SetSelectionTransfer(ScSelectionTransferObj *pNew)
Definition: scmod.cxx:692
ScSelectionTransferObj * GetSelectionTransfer() const
Definition: scmod.hxx:151
Additional class containing cell annotation data.
Definition: postit.hxx:58
SdrCaptionObj * GetCaption() const
Returns an existing note caption object.
Definition: postit.hxx:134
ScTabView * GetView() const
Definition: seltrans.hxx:61
void SheetChanged(bool bSameTabButMoved)
Definition: viewuno.cxx:535
virtual const FmFormShell * GetFormShell() const override
Definition: tabvwsh.hxx:342
void BroadcastAccessibility(const SfxHint &rHint)
Definition: tabvwshh.cxx:236
bool IsDrawTextShell() const
Definition: tabvwsh4.cxx:1044
bool HasAccessibilityObjects() const
Definition: tabvwshh.cxx:242
void SetDrawShell(bool bActive)
Definition: tabvwsh4.cxx:613
VclPtr< ScTabSplitter > pHSplitter
Definition: tabview.hxx:147
void TabChanged(bool bSameTabButMoved=false)
Called after moving, copying, inserting or deleting a sheet.
Definition: tabview5.cxx:280
std::array< VclPtr< ScColBar >, 2 > pColBar
Definition: tabview.hxx:143
bool IsDrawTextEdit() const
Definition: tabview5.cxx:409
std::array< VclPtr< ScOutlineWindow >, 2 > pRowOutline
Definition: tabview.hxx:146
VclPtr< ScCornerButton > aCornerButton
Definition: tabview.hxx:154
std::unique_ptr< ScPageBreakData > pPageBreakData
Definition: tabview.hxx:161
void DigitLanguageChanged()
Definition: tabview5.cxx:541
void UpdateLayerLocks()
Definition: tabview5.cxx:354
std::unique_ptr< ScViewSelectionEngine > pSelEngine
Definition: tabview.hxx:124
void MakeVisible(const tools::Rectangle &rHMMRect)
Definition: tabview5.cxx:558
void ResetBrushDocument()
Definition: tabview5.cxx:654
void ResetDrawDragMode()
Definition: tabview5.cxx:451
void TestHintWindow()
Definition: tabview3.cxx:783
ScHeaderFunctionSet aHdrFunc
Definition: tabview.hxx:128
std::shared_ptr< sc::SpellCheckContext > mpSpellCheckCxt
Definition: tabview.hxx:157
FuPoor * pDrawOld
Definition: tabview.hxx:138
Timer aScrollTimer
Definition: tabview.hxx:167
void SetDrawFuncPtr(FuPoor *pFuncPtr)
Definition: tabview.hxx:321
VclPtr< ScrollAdaptor > aHScrollRight
Definition: tabview.hxx:153
void ScrollToObject(const SdrObject *pDrawObj)
Definition: tabview5.cxx:549
static void OnLOKNoteStateChanged(const ScPostIt *pNote)
Definition: tabview5.cxx:663
VclPtr< ScrollAdaptor > aVScrollTop
Definition: tabview.hxx:150
void DrawEnableAnim(bool bSet)
Definition: tabview5.cxx:504
VclPtr< ScrollAdaptor > aVScrollBottom
Definition: tabview.hxx:151
std::array< VclPtr< ScGridWindow >, 4 > pGridWin
Definition: tabview.hxx:142
VclPtr< ScTabControl > pTabControl
Definition: tabview.hxx:149
SC_DLLPUBLIC void RefreshZoom()
Definition: tabview5.cxx:435
void MakeDrawView(TriState nForceDesignMode)
Definition: tabview5.cxx:227
void DoAddWin(ScGridWindow *pWin)
Definition: tabview5.cxx:270
void SetBrushDocument(ScDocumentUniquePtr pNew, bool bLock)
Definition: tabview5.cxx:634
void ViewOptionsHasChanged(bool bHScrollChanged, bool bGraphicsChanged)
Definition: tabview5.cxx:457
VclPtr< ScTabSplitter > pVSplitter
Definition: tabview.hxx:148
void UpdateDrawTextOutliner()
Definition: tabview5.cxx:531
SC_DLLPUBLIC void ScrollLines(tools::Long nDeltaX, tools::Long nDeltaY)
Definition: tabview.cxx:1319
void UpdateAnchorHandles()
Definition: tabview5.cxx:492
bool bLockPaintBrush
Definition: tabview.hxx:210
void MakeDrawLayer()
Definition: tabview2.cxx:1427
std::unique_ptr< sdr::overlay::OverlayObjectList > mxInputHintOO
Definition: tabview.hxx:159
void Init()
Definition: tabview5.cxx:59
ScViewData & GetViewData()
Definition: tabview.hxx:335
void SetZoom(const Fraction &rNewX, const Fraction &rNewY, bool bAll)
Definition: tabview5.cxx:427
SvxZoomType GetZoomType() const
Definition: tabview5.cxx:417
bool mbInlineWithScrollbar
Definition: tabview.hxx:215
ScGridWindow * GetActiveWin()
Definition: tabview.cxx:877
ScViewData aViewData
Definition: tabview.hxx:122
void UpdateIMap(SdrObject *pObj)
Definition: tabview5.cxx:498
void ZoomChanged()
Definition: tabview3.cxx:3064
FuPoor * pDrawActual
Definition: tabview.hxx:137
void SetPagebreakMode(bool bSet)
Definition: tabview5.cxx:443
void InitScrollBar(ScrollAdaptor &rScrollBar, tools::Long nMaxVal, const Link< weld::Scrollbar &, void > &rLink)
Definition: tabview.cxx:223
std::unique_ptr< ScDrawView > pDrawView
Definition: tabview.hxx:130
std::array< VclPtr< ScRowBar >, 2 > pRowBar
Definition: tabview.hxx:144
bool IsDrawSelMode() const
Definition: tabview.hxx:318
std::unique_ptr< ScHeaderSelectionEngine > pHdrSelEng
Definition: tabview.hxx:127
void DrawDeselectAll()
Definition: tabview5.cxx:388
std::unique_ptr< SfxItemSet > pDrawBrushSet
Definition: tabview.hxx:165
void SetActivePointer(PointerStyle nPointer)
Definition: tabview.cxx:884
void DrawMarkListHasChanged()
Definition: tabview5.cxx:486
void SetDrawBrushSet(std::unique_ptr< SfxItemSet > pNew, bool bLock)
Definition: tabview5.cxx:644
std::array< VclPtr< ScOutlineWindow >, 2 > pColOutline
Definition: tabview.hxx:145
ScDocumentUniquePtr pBrushDocument
Definition: tabview.hxx:164
VclPtr< ScCornerButton > aTopButton
Definition: tabview.hxx:155
ScViewFunctionSet aFunctionSet
Definition: tabview.hxx:125
VclPtr< vcl::Window > pFrameWin
Definition: tabview.hxx:121
bool HasPaintBrush() const
Definition: tabview.hxx:587
void RemoveWindowFromForeignEditView(SfxViewShell *pViewShell, ScSplitPos eWhich)
Definition: tabview3.cxx:2068
VclPtr< ScrollAdaptor > aHScrollLeft
Definition: tabview.hxx:152
void SetZoomType(SvxZoomType eNew, bool bAll)
Definition: tabview5.cxx:422
void RefreshZoom()
Definition: viewdata.cxx:1115
SfxDispatcher & GetDispatcher()
Definition: viewdata.cxx:3135
void SetPagebreakMode(bool bSet)
Definition: viewdata.cxx:1126
const ScViewOptions & GetOptions() const
Definition: viewdata.hxx:554
void SetZoomType(SvxZoomType eNew, bool bAll)
Definition: viewdata.cxx:1024
void KillEditView()
Definition: viewdata.cxx:2263
SvxZoomType GetZoomType() const
Definition: viewdata.hxx:458
SCTAB GetTabNo() const
Definition: viewdata.hxx:395
bool IsTabMode() const
Definition: viewdata.hxx:562
ScDocument & GetDocument() const
Definition: viewdata.hxx:380
SCROW GetPosY(ScVSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1416
double GetPPTY() const
Definition: viewdata.hxx:469
ScDocShell * GetDocShell() const
Definition: viewdata.hxx:354
ScTabViewShell * GetViewShell() const
Definition: viewdata.hxx:357
void UpdateOutlinerFlags(Outliner &rOutl) const
Definition: viewdata.cxx:4096
ScSplitPos GetActivePart() const
Definition: viewdata.hxx:398
bool IsHScrollMode() const
Definition: viewdata.hxx:564
void SetZoom(const Fraction &rNewX, const Fraction &rNewY, std::vector< SCTAB > &tabs)
Definition: viewdata.cxx:1035
bool IsThemedCursor() const
Definition: viewdata.hxx:566
SfxObjectShell * GetSfxDocShell() const
Definition: viewdata.hxx:358
double GetPPTX() const
Definition: viewdata.hxx:468
SfxBindings & GetBindings()
Definition: viewdata.cxx:3129
bool HasEditView(ScSplitPos eWhich) const
Definition: viewdata.hxx:582
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1402
void SetSelectionEngine(ScViewSelectionEngine *pSelEngine)
Definition: select.cxx:140
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:96
ScVObjMode GetObjMode(ScVObjType eObj) const
Definition: viewopti.hxx:91
::basegfx::B2DPolygon getTailPolygon() const
virtual const tools::Rectangle & GetLogicRect() const override
SdrLayer * GetLayerPerID(SdrLayerID nID)
const OUString & GetName() const
virtual const tools::Rectangle & GetCurrentBoundRect() const
void Invalidate(sal_uInt16 nId)
void InvalidateAll(bool bWithMsg)
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
css::uno::Reference< css::frame::XController > GetController() const
static void forEachOtherView(ViewShellType *pThisViewShell, FunctionType f)
static void notifyDocumentSizeChanged(SfxViewShell const *pThisView, const OString &rPayload, vcl::ITiledRenderable *pDoc, bool bInvalidateAll=true)
bool IsReadOnly() const
bool IsDocShared() const
css::uno::Reference< css::frame::XModel3 > GetModel() const
SfxItemPool & GetPool() const
virtual void Invalidate(sal_uInt16 nId=0)
SfxFrame & GetFrame() const
ViewShellDocId GetDocId() const override
static SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
virtual void libreOfficeKitViewInvalidateTilesCallback(const tools::Rectangle *pRect, int nPart, int nMode) const override
static SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
virtual css::uno::Reference< css::frame::XModel > GetCurrentDocument() const
SfxViewFrame * GetViewFrame() const
static SfxViewShell * Current()
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
constexpr tools::Long Width() const
bool GetGridVisible() const
void SetTimeout(sal_uInt64 nTimeoutMs)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
static void ClearPrimarySelection()
void disposeAndClear()
static VclPtr< reference_type > Create(Arg &&... arg)
B2DRange const & getB2DRange() const
TYPE getMaxX() const
TYPE getMinX() const
TYPE getMinY() const
TYPE getMaxY() const
constexpr tools::Long Top() const
constexpr tools::Long Right() const
tools::Long AdjustTop(tools::Long nVertMoveDelta)
tools::Long AdjustRight(tools::Long nHorzMoveDelta)
tools::Rectangle & Union(const tools::Rectangle &rRect)
tools::Long AdjustBottom(tools::Long nVertMoveDelta)
tools::Long AdjustLeft(tools::Long nHorzMoveDelta)
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
Point LogicToPixel(const Point &rLogicPt) const
::OutputDevice const * GetOutDev() const
Size GetOutputSizePixel() const
constexpr double nPPTX
constexpr double nPPTY
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2717
TriState
TRISTATE_FALSE
TRISTATE_INDET
constexpr SdrLayerID SC_LAYER_HIDDEN(4)
constexpr SdrLayerID SC_LAYER_FRONT(0)
@ VOBJ_MODE_SHOW
Definition: global.hxx:368
constexpr SdrLayerID SC_LAYER_INTERN(2)
constexpr SdrLayerID SC_LAYER_BACK(1)
constexpr SdrLayerID SC_LAYER_CONTROLS(3)
int i
long Long
#define SC_MOD()
Definition: scmod.hxx:249
Reference< XController > xController
#define SC_TABBAR_DEFWIDTH
Definition: tabcont.hxx:29
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
#define stringstream
Definition: utils.hxx:45
const tools::Long nScrollX
const tools::Long nScrollY
ScSplitPos
Definition: viewdata.hxx:44
@ SC_SPLIT_BOTTOMLEFT
Definition: viewdata.hxx:44
ScHSplitPos WhichH(ScSplitPos ePos)
Definition: viewdata.hxx:722
@ SC_SPLIT_LEFT
Definition: viewdata.hxx:45
@ SC_SPLIT_RIGHT
Definition: viewdata.hxx:45
ScVSplitPos WhichV(ScSplitPos ePos)
Definition: viewdata.hxx:728
@ SC_SPLIT_TOP
Definition: viewdata.hxx:46
@ SC_SPLIT_BOTTOM
Definition: viewdata.hxx:46
@ VOBJ_TYPE_OLE
Definition: viewopti.hxx:53
sal_Int64 WinBits
WinBits const WB_SIZEABLE
WinBits const WB_VSCROLL
WinBits const WB_HSCROLL
SvxZoomType