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 uno::Reference<frame::XController> xController = rViewFrame.GetFrame().GetController();
311 if (xController.is())
312 {
313 ScTabViewObj* pImp = dynamic_cast<ScTabViewObj*>( xController.get() );
314 if (pImp)
315 pImp->SheetChanged( bSameTabButMoved );
316 }
317
318 for (int i = 0; i < 4; i++)
319 {
320 if (pGridWin[i])
321 {
322 pGridWin[i]->initiatePageBreaks();
323 // Trigger calculating page breaks only once.
324 break;
325 }
326 }
327
329 return;
330
331 ScDocShell* pDocSh = GetViewData().GetDocShell();
332 ScModelObj* pModelObj = pDocSh ? pDocSh->GetModel() : nullptr;
333
334 if (!pModelObj)
335 return;
336
337 Size aDocSize = pModelObj->getDocumentSize();
339 ss << aDocSize.Width() << ", " << aDocSize.Height();
340 OString sRect(ss.str());
341 ScTabViewShell* pViewShell = aViewData.GetViewShell();
342
343 // Invalidate first
344 tools::Rectangle aRectangle(0, 0, 1000000000, 1000000000);
345 pViewShell->libreOfficeKitViewInvalidateTilesCallback(&aRectangle, aViewData.GetTabNo(), 0);
346
347 ScModelObj* pModel = comphelper::getFromUnoTunnel<ScModelObj>(pViewShell->GetCurrentDocument());
348 SfxLokHelper::notifyDocumentSizeChanged(pViewShell, sRect, pModel, false);
349}
350
352{
353 if (!pDrawView)
354 return;
355
356 SCTAB nTab = aViewData.GetTabNo();
357 bool bEx = aViewData.GetViewShell()->IsDrawSelMode();
358 bool bProt = aViewData.GetDocument().IsTabProtected( nTab ) ||
360 bool bShared = aViewData.GetDocShell()->IsDocShared();
361
362 SdrLayer* pLayer;
363 SdrLayerAdmin& rAdmin = pDrawView->GetModel().GetLayerAdmin();
364 pLayer = rAdmin.GetLayerPerID(SC_LAYER_BACK);
365 if (pLayer)
366 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || !bEx || bShared );
367 pLayer = rAdmin.GetLayerPerID(SC_LAYER_INTERN);
368 if (pLayer)
369 pDrawView->SetLayerLocked( pLayer->GetName() );
370 pLayer = rAdmin.GetLayerPerID(SC_LAYER_FRONT);
371 if (pLayer)
372 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
373 pLayer = rAdmin.GetLayerPerID(SC_LAYER_CONTROLS);
374 if (pLayer)
375 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
376 pLayer = rAdmin.GetLayerPerID(SC_LAYER_HIDDEN);
377 if (pLayer)
378 {
379 pDrawView->SetLayerLocked( pLayer->GetName(), bProt || bShared );
380 pDrawView->SetLayerVisible( pLayer->GetName(), false);
381 }
382 pTabControl->SetAddButtonEnabled(aViewData.GetDocument().IsDocEditable());
383}
384
386{
387 if (!pDrawView)
388 return;
389
391 if ( pDrawActual &&
392 ( pViewSh->IsDrawTextShell() || pDrawActual->GetSlotID() == SID_DRAW_NOTEEDIT ) )
393 {
394 // end text edit (as if escape pressed, in FuDraw)
396 SfxCallMode::SLOT | SfxCallMode::RECORD );
397 }
398
399 pDrawView->ScEndTextEdit();
400 pDrawView->UnmarkAll();
401
402 if (!pViewSh->IsDrawSelMode())
403 pViewSh->SetDrawShell( false );
404}
405
407{
408 if (pDrawView)
409 return pDrawView->IsTextEdit();
410 else
411 return false;
412}
413
415{
416 return aViewData.GetZoomType();
417}
418
419void ScTabView::SetZoomType( SvxZoomType eNew, bool bAll )
420{
421 aViewData.SetZoomType( eNew, bAll );
422}
423
424void ScTabView::SetZoom( const Fraction& rNewX, const Fraction& rNewY, bool bAll )
425{
426 aViewData.SetZoom( rNewX, rNewY, bAll );
427 if (pDrawView)
428 pDrawView->RecalcScale();
429 ZoomChanged();
430}
431
433{
435 if (pDrawView)
436 pDrawView->RecalcScale();
437 ZoomChanged();
438}
439
441{
443 if (pDrawView)
444 pDrawView->RecalcScale();
445 ZoomChanged();
446}
447
449{
450 if (pDrawView)
451 pDrawView->SetDragMode( SdrDragMode::Move );
452}
453
454void ScTabView::ViewOptionsHasChanged( bool bHScrollChanged, bool bGraphicsChanged )
455{
456 // create DrawView when grid should be displayed
459
460 if (pDrawView)
461 pDrawView->UpdateUserViewOptions();
462
463 if (bGraphicsChanged)
464 DrawEnableAnim(true); // DrawEnableAnim checks the options state
465
466 // if TabBar is set to visible, make sure its size is not 0
467 bool bGrow = ( aViewData.IsTabMode() && pTabControl->GetSizePixel().Width() <= 0 );
468
469 // if ScrollBar is set to visible, TabBar must make room
470 bool bShrink = ( bHScrollChanged && aViewData.IsTabMode() && aViewData.IsHScrollMode() &&
471 pTabControl->GetSizePixel().Width() > SC_TABBAR_DEFWIDTH );
472
473 if ( bGrow || bShrink )
474 {
475 Size aSize = pTabControl->GetSizePixel();
476 aSize.setWidth( SC_TABBAR_DEFWIDTH ); // initial size
477 pTabControl->SetSizePixel(aSize); // DoResize is called later...
478 }
479}
480
481// helper function against including the drawing layer
482
484{
485 if ( pDrawView )
486 pDrawView->MarkListHasChanged();
487}
488
490{
491 if ( pDrawView )
492 pDrawView->AdjustMarkHdl();
493}
494
496{
497 if ( pDrawView )
498 pDrawView->UpdateIMap( pObj );
499}
500
502{
503 sal_uInt16 i;
504 if ( !pDrawView )
505 return;
506
507 // don't start animations if display of graphics is disabled
508 // graphics are controlled by VOBJ_TYPE_OLE
510 {
511 if ( !pDrawView->IsAnimationEnabled() )
512 {
513 pDrawView->SetAnimationEnabled();
514
515 // animated GIFs must be restarted:
517 for (i=0; i<4; i++)
518 if ( pGridWin[i] && pGridWin[i]->IsVisible() )
520 }
521 }
522 else
523 {
524 pDrawView->SetAnimationEnabled(false);
525 }
526}
527
529{
530 if ( pDrawView )
531 {
532 Outliner* pOL = pDrawView->GetTextEditOutliner();
533 if (pOL)
535 }
536}
537
539{
541 for (VclPtr<ScGridWindow> & pWin : pGridWin)
542 if ( pWin )
543 pWin->GetOutDev()->SetDigitLanguage( eNewLang );
544}
545
547{
548 if ( pDrawObj )
549 {
550 // #i118524# use the BoundRect, this defines the visible area
551 MakeVisible(pDrawObj->GetCurrentBoundRect());
552 }
553}
554
556{
557 vcl::Window* pWin = GetActiveWin();
558 Size aWinSize = pWin->GetOutputSizePixel();
559 SCTAB nTab = aViewData.GetTabNo();
560
561 tools::Rectangle aRect = pWin->LogicToPixel( rHMMRect );
562
563 tools::Long nScrollX=0, nScrollY=0; // pixel
564
565 if ( aRect.Right() >= aWinSize.Width() ) // right out
566 {
567 nScrollX = aRect.Right() - aWinSize.Width() + 1; // right border visible
568 if ( aRect.Left() < nScrollX )
569 nScrollX = aRect.Left(); // left visible (if too big)
570 }
571 if ( aRect.Bottom() >= aWinSize.Height() ) // bottom out
572 {
573 nScrollY = aRect.Bottom() - aWinSize.Height() + 1; // bottom border visible
574 if ( aRect.Top() < nScrollY )
575 nScrollY = aRect.Top(); // top visible (if too big)
576 }
577
578 if ( aRect.Left() < 0 ) // left out
579 nScrollX = aRect.Left(); // left border visible
580 if ( aRect.Top() < 0 ) // top out
581 nScrollY = aRect.Top(); // top border visible
582
583 if (!(nScrollX || nScrollY))
584 return;
585
587 if ( rDoc.IsNegativePage( nTab ) )
589
590 double nPPTX = aViewData.GetPPTX();
591 double nPPTY = aViewData.GetPPTY();
593 SCCOL nPosX = aViewData.GetPosX(WhichH(eWhich));
594 SCROW nPosY = aViewData.GetPosY(WhichV(eWhich));
595
596 tools::Long nLinesX=0, nLinesY=0; // columns/rows - scroll at least nScrollX/Y
597
598 if (nScrollX > 0)
599 while (nScrollX > 0 && nPosX < rDoc.MaxCol())
600 {
601 nScrollX -= static_cast<tools::Long>( rDoc.GetColWidth(nPosX, nTab) * nPPTX );
602 ++nPosX;
603 ++nLinesX;
604 }
605 else if (nScrollX < 0)
606 while (nScrollX < 0 && nPosX > 0)
607 {
608 --nPosX;
609 nScrollX += static_cast<tools::Long>( rDoc.GetColWidth(nPosX, nTab) * nPPTX );
610 --nLinesX;
611 }
612
613 if (nScrollY > 0)
614 while (nScrollY > 0 && nPosY < rDoc.MaxRow())
615 {
616 nScrollY -= static_cast<tools::Long>( rDoc.GetRowHeight(nPosY, nTab) * nPPTY );
617 ++nPosY;
618 ++nLinesY;
619 }
620 else if (nScrollY < 0)
621 while (nScrollY < 0 && nPosY > 0)
622 {
623 --nPosY;
624 nScrollY += static_cast<tools::Long>( rDoc.GetRowHeight(nPosY, nTab) * nPPTY );
625 --nLinesY;
626 }
627
628 ScrollLines( nLinesX, nLinesY ); // execute
629}
630
632{
633 pDrawBrushSet.reset();
634 pBrushDocument = std::move(pNew);
635
636 bLockPaintBrush = bLock;
637
638 aViewData.GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
639}
640
641void ScTabView::SetDrawBrushSet( std::unique_ptr<SfxItemSet> pNew, bool bLock )
642{
643 pBrushDocument.reset();
644 pDrawBrushSet = std::move(pNew);
645
646 bLockPaintBrush = bLock;
647
648 aViewData.GetBindings().Invalidate(SID_FORMATPAINTBRUSH);
649}
650
652{
653 if ( HasPaintBrush() )
654 {
655 SetBrushDocument( nullptr, false );
656 SetActivePointer( aViewData.IsThemedCursor() ? PointerStyle::FatCross : PointerStyle::Arrow ); // switch pointers also when ended with escape key
657 }
658}
659
661{
663 return;
664
665 const SdrCaptionObj* pCaption = pNote->GetCaption();
666 if (!pCaption) return;
667
668 tools::Rectangle aRect = pCaption->GetLogicRect();
669 basegfx::B2DRange aTailRange = pCaption->getTailPolygon().getB2DRange();
670 tools::Rectangle aTailRect(aTailRange.getMinX(), aTailRange.getMinY(),
671 aTailRange.getMaxX(), aTailRange.getMaxY());
672 aRect.Union( aTailRect );
673
674 // This is a temporary workaround: sometime in tiled rendering mode
675 // the tip of the note arrow is misplaced by a fixed offset.
676 // The value used below is enough to get the tile, where the arrow tip is
677 // placed, invalidated.
678 const int nBorderSize = 200;
679 tools::Rectangle aInvalidRect = aRect;
680 aInvalidRect.AdjustLeft( -nBorderSize );
681 aInvalidRect.AdjustRight( nBorderSize );
682 aInvalidRect.AdjustTop( -nBorderSize );
683 aInvalidRect.AdjustBottom( nBorderSize );
684
685 SfxViewShell* pCurrentViewShell = SfxViewShell::Current();
686 SfxViewShell* pViewShell = SfxViewShell::GetFirst();
687 while (pViewShell)
688 {
689 ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
690 if (pTabViewShell && pViewShell->GetDocId() == pCurrentViewShell->GetDocId())
691 {
692 for (auto& pWin: pTabViewShell->pGridWin)
693 {
694 if (pWin && pWin->IsVisible())
695 {
696 pWin->Invalidate(aInvalidRect);
697 }
698 }
699 }
700 pViewShell = SfxViewShell::GetNext(*pViewShell);
701 }
702}
703
704/* 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
ScModelObj * GetModel() const
Definition: docsh.hxx:432
SC_DLLPUBLIC sal_uInt16 GetRowHeight(SCROW nRow, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4161
SC_DLLPUBLIC sal_uInt16 GetColWidth(SCCOL nCol, SCTAB nTab, bool bHiddenAsZero=true) const
Definition: document.cxx:4122
SC_DLLPUBLIC bool IsTabProtected(SCTAB nTab) const
Definition: documen3.cxx:1905
SC_DLLPUBLIC SCCOL MaxCol() const
Definition: document.hxx:892
SC_DLLPUBLIC SCROW MaxRow() const
Definition: document.hxx:893
SC_DLLPUBLIC bool IsNegativePage(SCTAB nTab) const
Definition: document.cxx:982
bool IsDocEditable() const
Definition: documen3.cxx:1899
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Definition: document.hxx:1084
void StartAnimations(SCTAB nTab)
Definition: documen9.cxx:307
void SetAutoSpellContext(const std::shared_ptr< sc::SpellCheckContext > &ctx)
Definition: gridwin.cxx:5933
void DrawLayerCreated()
Definition: gridwin.cxx:5925
virtual Size getDocumentSize() final override
Definition: docuno.cxx:663
void SetSelectionTransfer(ScSelectionTransferObj *pNew)
Definition: scmod.cxx:717
ScSelectionTransferObj * GetSelectionTransfer() const
Definition: scmod.hxx:151
static LanguageType GetOptDigitLanguage()
Definition: scmod.cxx:907
Additional class containing cell annotation data.
Definition: postit.hxx:58
SdrCaptionObj * GetCaption() const
Returns an existing note caption object.
Definition: postit.hxx:132
ScTabView * GetView() const
Definition: seltrans.hxx:61
void SheetChanged(bool bSameTabButMoved)
Definition: viewuno.cxx:537
virtual const FmFormShell * GetFormShell() const override
Definition: tabvwsh.hxx:344
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:406
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:538
void UpdateLayerLocks()
Definition: tabview5.cxx:351
std::unique_ptr< ScViewSelectionEngine > pSelEngine
Definition: tabview.hxx:124
void MakeVisible(const tools::Rectangle &rHMMRect)
Definition: tabview5.cxx:555
void ResetBrushDocument()
Definition: tabview5.cxx:651
void ResetDrawDragMode()
Definition: tabview5.cxx:448
void TestHintWindow()
Definition: tabview3.cxx:780
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:330
VclPtr< ScrollAdaptor > aHScrollRight
Definition: tabview.hxx:153
void ScrollToObject(const SdrObject *pDrawObj)
Definition: tabview5.cxx:546
static void OnLOKNoteStateChanged(const ScPostIt *pNote)
Definition: tabview5.cxx:660
VclPtr< ScrollAdaptor > aVScrollTop
Definition: tabview.hxx:150
void DrawEnableAnim(bool bSet)
Definition: tabview5.cxx:501
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:432
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:631
void ViewOptionsHasChanged(bool bHScrollChanged, bool bGraphicsChanged)
Definition: tabview5.cxx:454
VclPtr< ScTabSplitter > pVSplitter
Definition: tabview.hxx:148
void UpdateDrawTextOutliner()
Definition: tabview5.cxx:528
SC_DLLPUBLIC void ScrollLines(tools::Long nDeltaX, tools::Long nDeltaY)
Definition: tabview.cxx:1388
void UpdateAnchorHandles()
Definition: tabview5.cxx:489
bool bLockPaintBrush
Definition: tabview.hxx:210
void MakeDrawLayer()
Definition: tabview2.cxx:1529
std::unique_ptr< sdr::overlay::OverlayObjectList > mxInputHintOO
Definition: tabview.hxx:159
void Init()
Definition: tabview5.cxx:59
ScViewData & GetViewData()
Definition: tabview.hxx:344
void SetZoom(const Fraction &rNewX, const Fraction &rNewY, bool bAll)
Definition: tabview5.cxx:424
SvxZoomType GetZoomType() const
Definition: tabview5.cxx:414
bool mbInlineWithScrollbar
Definition: tabview.hxx:215
ScGridWindow * GetActiveWin()
Definition: tabview.cxx:878
ScViewData aViewData
Definition: tabview.hxx:122
void UpdateIMap(SdrObject *pObj)
Definition: tabview5.cxx:495
void ZoomChanged()
Definition: tabview3.cxx:3064
FuPoor * pDrawActual
Definition: tabview.hxx:137
void SetPagebreakMode(bool bSet)
Definition: tabview5.cxx:440
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:327
std::unique_ptr< ScHeaderSelectionEngine > pHdrSelEng
Definition: tabview.hxx:127
void DrawDeselectAll()
Definition: tabview5.cxx:385
std::unique_ptr< SfxItemSet > pDrawBrushSet
Definition: tabview.hxx:165
void SetActivePointer(PointerStyle nPointer)
Definition: tabview.cxx:885
void DrawMarkListHasChanged()
Definition: tabview5.cxx:483
void SetDrawBrushSet(std::unique_ptr< SfxItemSet > pNew, bool bLock)
Definition: tabview5.cxx:641
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:598
void RemoveWindowFromForeignEditView(SfxViewShell *pViewShell, ScSplitPos eWhich)
Definition: tabview3.cxx:2065
VclPtr< ScrollAdaptor > aHScrollLeft
Definition: tabview.hxx:152
void SetZoomType(SvxZoomType eNew, bool bAll)
Definition: tabview5.cxx:419
void RefreshZoom()
Definition: viewdata.cxx:1116
SfxDispatcher & GetDispatcher()
Definition: viewdata.cxx:3140
void SetPagebreakMode(bool bSet)
Definition: viewdata.cxx:1127
const ScViewOptions & GetOptions() const
Definition: viewdata.hxx:554
void SetZoomType(SvxZoomType eNew, bool bAll)
Definition: viewdata.cxx:1025
void KillEditView()
Definition: viewdata.cxx:2268
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:1417
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:4088
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:1036
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:3134
bool HasEditView(ScSplitPos eWhich) const
Definition: viewdata.hxx:582
SCCOL GetPosX(ScHSplitPos eWhich, SCTAB nForTab=-1) const
Definition: viewdata.cxx:1403
void SetSelectionEngine(ScViewSelectionEngine *pSelEngine)
Definition: select.cxx:140
const ScGridOptions & GetGridOptions() const
Definition: viewopti.hxx:94
ScVObjMode GetObjMode(ScVObjType eObj) const
Definition: viewopti.hxx:89
::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
SfxItemPool & GetPool() const
virtual void Invalidate(sal_uInt16 nId=0)
SfxFrame & GetFrame() const
ViewShellDocId GetDocId() const override
SfxViewFrame & GetViewFrame() const
static SAL_WARN_UNUSED_RESULT 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 SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
virtual css::uno::Reference< css::frame::XModel > GetCurrentDocument() const
static SAL_WARN_UNUSED_RESULT 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:2720
TriState
TRISTATE_FALSE
TRISTATE_INDET
constexpr SdrLayerID SC_LAYER_HIDDEN(4)
constexpr SdrLayerID SC_LAYER_FRONT(0)
@ VOBJ_MODE_SHOW
Definition: global.hxx:369
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:247
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