LibreOffice Module svx (master)  1
svdpntv.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 <memory>
21 #include <com/sun/star/awt/XWindow.hpp>
22 #include <svx/svdpntv.hxx>
23 #include <vcl/weld.hxx>
24 #include <vcl/GraphicObject.hxx>
25 #include <svx/sdrpaintwindow.hxx>
26 #include <svx/svdmodel.hxx>
27 
28 #include <svx/svdpage.hxx>
29 #include <svx/svdpagv.hxx>
30 #include <svl/hint.hxx>
31 
32 #include <editeng/editdata.hxx>
33 #include <svx/svdmrkv.hxx>
34 #include <svx/svdundo.hxx>
35 #include <svx/svdview.hxx>
36 #include <svx/svdglue.hxx>
37 #include <svx/svdobj.hxx>
38 #include <svx/svdograf.hxx>
39 #include <svx/svditer.hxx>
40 #include <svx/svdouno.hxx>
44 #include <sxlayitm.hxx>
45 #include <svl/itemiter.hxx>
46 #include <editeng/eeitem.hxx>
47 #include <svl/whiter.hxx>
48 #include <svl/style.hxx>
49 #include <svx/sdrpagewindow.hxx>
50 #include <vcl/svapp.hxx>
51 #include <com/sun/star/awt/PosSize.hpp>
52 #include <com/sun/star/awt/XControl.hpp>
58 #include <comphelper/lok.hxx>
59 #include <svx/svdviter.hxx>
60 
61 #include <sfx2/lokhelper.hxx>
62 
63 using namespace ::com::sun::star;
64 
65 // interface to SdrPaintWindow
66 
68 {
69  auto a = std::find_if(maPaintWindows.begin(), maPaintWindows.end(),
70  [&rOut](const std::unique_ptr<SdrPaintWindow>& pWindow) { return &(pWindow->GetOutputDevice()) == &rOut; });
71  if (a != maPaintWindows.end())
72  return a->get();
73 
74  return nullptr;
75 }
76 
78 {
79  return maPaintWindows[nIndex].get();
80 }
81 
83 {
84  auto aFindResult = ::std::find_if(maPaintWindows.begin(), maPaintWindows.end(),
85  [&](const std::unique_ptr<SdrPaintWindow>& p) { return p.get() == &rOld; });
86 
87  if(aFindResult != maPaintWindows.end())
88  {
89  maPaintWindows.erase(aFindResult);
90  }
91 }
92 
94 {
95  if(PaintWindowCount())
96  {
97  return &(GetPaintWindow(0)->GetOutputDevice());
98  }
99 
100  return nullptr;
101 }
102 
103 
105 {
106 }
107 
108 
110  const GDIMetaFile& rMtf,
111  const basegfx::B2DRange& rTargetRange,
112  const sal_uInt32 nMaximumQuadraticPixels)
113 {
114  BitmapEx aBitmapEx;
115 
116  if(rMtf.GetActionSize())
117  {
121  rTargetRange.getRange(),
122  rTargetRange.getMinimum()),
123  rMtf));
126  rTargetRange,
127  nMaximumQuadraticPixels);
128  }
129 
130  return aBitmapEx;
131 }
132 
133 
135 {
136  mbPageVisible=true;
137  mbPageShadowVisible=true;
138  mbPageBorderVisible=true;
139  mbBordVisible=true;
140  mbGridVisible=true;
141  mbGridFront =false;
142  mbHlplVisible=true;
143  mbHlplFront =true;
144  mbGlueVisible=false;
145  mbGlueVisible2=false;
146  mbGlueVisible3=false;
147  mbGlueVisible4=false;
148  mbSwapAsynchron=false;
149  mbPrintPreview=false;
150  mbPreviewRenderer=false;
151 
153  mbAnimationPause = false;
154 
155  mnHitTolPix=2;
156  mnMinMovPix=3;
157  mnHitTolLog=0;
158  mnMinMovLog=0;
159  mpActualOutDev=nullptr;
160  mpDragWin=nullptr;
161  mpDefaultStyleSheet=nullptr;
162  mbSomeObjChgdFlag=false;
163  maComeBackIdle.SetPriority(TaskPriority::REPAINT);
164  maComeBackIdle.SetInvokeHandler(LINK(this,SdrPaintView,ImpComeBackHdl));
165  maComeBackIdle.SetDebugName( "svx::SdrPaintView aComeBackIdle" );
166 
167  if (mpModel)
169 
171 }
172 
174  SdrModel& rSdrModel,
175  OutputDevice* pOut)
176 : mrSdrModelFromSdrView(rSdrModel),
177  maDefaultAttr(rSdrModel.GetItemPool()),
178  mbBufferedOutputAllowed(false),
179  mbBufferedOverlayAllowed(false),
180  mbPagePaintingAllowed(true),
181  mbHideOle(false),
182  mbHideChart(false),
183  mbHideDraw(false),
184  mbHideFormControl(false)
185 {
186  mpModel=&rSdrModel;
187  ImpClearVars();
188 
189  if(pOut)
190  {
191  AddWindowToPaintView(pOut, nullptr);
192  }
193 
194  maColorConfig.AddListener(this);
196 }
197 
199 {
202 
203  maColorConfig.RemoveListener(this);
204  ClearPageView();
205 
206  // delete existing SdrPaintWindows
207  maPaintWindows.clear();
208 }
209 
210 
212 {
213  //If the stylesheet has been destroyed
214  if (&rBC == mpDefaultStyleSheet)
215  {
216  if (rHint.GetId() == SfxHintId::Dying)
217  mpDefaultStyleSheet = nullptr;
218  return;
219  }
220 
221  if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
222  return;
223  const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint);
224  SdrHintKind eKind = pSdrHint->GetKind();
226  {
227  bool bObjChg = !mbSomeObjChgdFlag; // if true, evaluate for ComeBack timer
228  if (bObjChg)
229  {
230  mbSomeObjChgdFlag=true;
232  }
233  }
234 
235  if (eKind==SdrHintKind::PageOrderChange)
236  {
237  const SdrPage* pPg=pSdrHint->GetPage();
238  if (pPg && !pPg->IsInserted())
239  {
240  if(mpPageView && mpPageView->GetPage() == pPg)
241  {
242  HideSdrPage();
243  }
244  }
245  }
246 }
247 
249 {
252 }
253 
254 IMPL_LINK_NOARG(SdrPaintView, ImpComeBackHdl, Timer *, void)
255 {
256  if (mbSomeObjChgdFlag) {
257  mbSomeObjChgdFlag=false;
258  ModelHasChanged();
259  }
260 }
261 
263 {
264  if (mbSomeObjChgdFlag) {
265  // casting to nonconst
266  const_cast<SdrPaintView*>(this)->ImpComeBackHdl(&const_cast<SdrPaintView*>(this)->maComeBackIdle);
267  const_cast<SdrPaintView*>(this)->maComeBackIdle.Stop();
268  }
269 }
270 
272 {
273  // broadcast to all PageViews
274  if(mpPageView && !mpPageView->GetPage()->IsInserted())
275  {
276  HideSdrPage();
277  }
278 
279  // test mpPageView here again, HideSdrPage() may have invalidated it.
280  if(mpPageView)
281  {
282  mpPageView->ModelHasChanged();
283  }
284 }
285 
286 
288 {
289  return false;
290 }
291 
293 {
294 }
295 
297 {
298 }
299 
301 {
302 }
303 
305 {
306 }
307 
309 {
310 }
311 
312 
313 // info about TextEdit. Default is false.
315 {
316  return false;
317 }
318 
319 sal_uInt16 SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const
320 {
321  if (nMinMov>=0) return sal_uInt16(nMinMov);
322  if (pOut==nullptr)
323  {
324  pOut = GetFirstOutputDevice();
325  }
326  if (pOut!=nullptr) {
327  return short(-pOut->PixelToLogic(Size(nMinMov,0)).Width());
328  } else {
329  return 0;
330  }
331 }
332 
333 sal_uInt16 SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const
334 {
335  if (nHitTol>=0) return sal_uInt16(nHitTol);
336  if (pOut==nullptr)
337  {
338  pOut = GetFirstOutputDevice();
339  }
340  if (pOut!=nullptr) {
341  return short(-pOut->PixelToLogic(Size(nHitTol,0)).Width());
342  } else {
343  return 0;
344  }
345 }
346 
348 {
349  if (mpActualOutDev) {
350  mnHitTolLog=static_cast<sal_uInt16>(mpActualOutDev->PixelToLogic(Size(mnHitTolPix,0)).Width());
351  mnMinMovLog=static_cast<sal_uInt16>(mpActualOutDev->PixelToLogic(Size(mnMinMovPix,0)).Width());
352  }
353 }
354 
356 {
357  mpActualOutDev = const_cast<OutputDevice *>(pWin);
359 }
360 
361 
363 {
364  BrkAction();
365 
366  if(mpPageView)
367  {
369  mpPageView.reset();
370  }
371 }
372 
374 {
375  if(pPage && (!mpPageView || mpPageView->GetPage() != pPage))
376  {
377  if(mpPageView)
378  {
380  mpPageView.reset();
381  }
382 
383  mpPageView.reset(new SdrPageView(pPage, *static_cast<SdrView*>(this)));
384  mpPageView->Show();
385  }
386 
387  return mpPageView.get();
388 }
389 
391 {
392  if(mpPageView)
393  {
394  mpPageView->Hide();
395  mpPageView.reset();
396  }
397 }
398 
400 {
401  DBG_ASSERT(pNewWin, "SdrPaintView::AddWindowToPaintView: No OutputDevice(!)");
402  SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, *pNewWin, pWindow);
403  maPaintWindows.emplace_back(pNewPaintWindow);
404 
405  if(mpPageView)
406  {
407  mpPageView->AddPaintWindowToPageView(*pNewPaintWindow);
408  }
409 }
410 
412 {
413  assert(pOldWin && "SdrPaintView::DeleteWindowFromPaintView: No OutputDevice(!)");
414  SdrPaintWindow* pCandidate = FindPaintWindow(*pOldWin);
415 
416  if(pCandidate)
417  {
418  if(mpPageView)
419  {
420  mpPageView->RemovePaintWindowFromPageView(*pCandidate);
421  }
422 
423  DeletePaintWindow(*pCandidate);
424  }
425 }
426 
427 void SdrPaintView::SetLayerVisible(const OUString& rName, bool bShow)
428 {
429  if(mpPageView)
430  {
431  mpPageView->SetLayerVisible(rName, bShow);
432  }
433 
435 }
436 
437 bool SdrPaintView::IsLayerVisible(const OUString& rName) const
438 {
439  if(mpPageView)
440  {
441  return mpPageView->IsLayerVisible(rName);
442  }
443 
444  return false;
445 }
446 
447 void SdrPaintView::SetLayerLocked(const OUString& rName, bool bLock)
448 {
449  if(mpPageView)
450  {
451  mpPageView->SetLayerLocked(rName,bLock);
452  }
453 }
454 
455 bool SdrPaintView::IsLayerLocked(const OUString& rName) const
456 {
457  if(mpPageView)
458  {
459  return mpPageView->IsLayerLocked(rName);
460  }
461 
462  return false;
463 }
464 
465 void SdrPaintView::SetLayerPrintable(const OUString& rName, bool bPrn)
466 {
467  if(mpPageView)
468  {
469  mpPageView->SetLayerPrintable(rName,bPrn);
470  }
471 }
472 
473 bool SdrPaintView::IsLayerPrintable(const OUString& rName) const
474 {
475  if(mpPageView)
476  {
477  return mpPageView->IsLayerPrintable(rName);
478  }
479 
480  return false;
481 }
482 
484 {
485  if(mpPageView)
486  {
487  mpPageView->PrePaint();
488  }
489 }
490 
491 
492 // #define SVX_REPAINT_TIMER_TEST
493 
495 {
496 #ifdef SVX_REPAINT_TIMER_TEST
497 #define REMEMBERED_TIMES_COUNT (10)
498  static bool bDoTimerTest(false);
499  static bool bTimesInited(false);
500  static sal_uInt32 nRepeatCount(10);
501  static double fLastTimes[REMEMBERED_TIMES_COUNT];
502  const sal_uInt64 nStartTime(tools::Time::GetSystemTicks());
503  sal_uInt32 count(1);
504  sal_uInt32 a;
505 
506  if(bDoTimerTest)
507  {
508  count = nRepeatCount;
509  }
510 
511  for(a = 0; a < count; a++)
512  {
513 #endif // SVX_REPAINT_TIMER_TEST
514 
515  // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
516  // rReg may be made more granular (fine) with using it. Normally, rReg
517  // does come from Window::Paint() anyways and thus is based on a single
518  // rectangle which was derived from exactly that repaint region
519  vcl::Region aOptimizedRepaintRegion(rReg);
520 
521  if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType())
522  {
523  vcl::Window* pWindow = static_cast<vcl::Window*>(pOut);
524 
525  if(pWindow->IsInPaint())
526  {
527  if(!pWindow->GetPaintRegion().IsEmpty())
528  {
529  aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
530  }
531  }
532  }
533 
534  SdrPaintWindow* pPaintWindow = BeginCompleteRedraw(pOut);
535  OSL_ENSURE(pPaintWindow, "SdrPaintView::CompleteRedraw: No OutDev (!)");
536 
537  DoCompleteRedraw(*pPaintWindow, aOptimizedRepaintRegion, pRedirector);
538  EndCompleteRedraw(*pPaintWindow, true);
539 
540 #ifdef SVX_REPAINT_TIMER_TEST
541  }
542 
543  if(bDoTimerTest)
544  {
545  const sal_uInt64 nStopTime(tools::Time::GetSystemTicks());
546  const sal_uInt64 nNeededTime(nStopTime - nStartTime);
547  const double fTimePerPaint((double)nNeededTime / (double)nRepeatCount);
548 
549  if(!bTimesInited)
550  {
551  for(a = 0; a < REMEMBERED_TIMES_COUNT; a++)
552  {
553  fLastTimes[a] = fTimePerPaint;
554  }
555 
556  bTimesInited = true;
557  }
558  else
559  {
560  for(a = 1; a < REMEMBERED_TIMES_COUNT; a++)
561  {
562  fLastTimes[a - 1] = fLastTimes[a];
563  }
564 
565  fLastTimes[REMEMBERED_TIMES_COUNT - 1] = fTimePerPaint;
566  }
567 
568  double fAddedTimes(0.0);
569 
570  for(a = 0; a < REMEMBERED_TIMES_COUNT; a++)
571  {
572  fAddedTimes += fLastTimes[a];
573  }
574 
575  const double fAverageTimePerPaint(fAddedTimes / (double)REMEMBERED_TIMES_COUNT);
576 
577  fprintf(stderr, "-----------(start result)----------\n");
578  fprintf(stderr, "StartTime : %" SAL_PRIuUINT64 ", StopTime: %" SAL_PRIuUINT64 ", NeededTime: %" SAL_PRIuUINT64 ", TimePerPaint: %f\n", nStartTime, nStopTime, nNeededTime, fTimePerPaint);
579  fprintf(stderr, "Remembered times: ");
580 
581  for(a = 0; a < REMEMBERED_TIMES_COUNT; a++)
582  {
583  fprintf(stderr, "%d: %f ", a, fLastTimes[a]);
584  }
585 
586  fprintf(stderr, "\n");
587  fprintf(stderr, "AverageTimePerPaint: %f\n", fAverageTimePerPaint);
588  fprintf(stderr, "-----------(stop result)----------\n");
589  }
590 #endif // SVX_REPAINT_TIMER_TEST
591 }
592 
593 
594 // #i72889#
595 
597 {
598  OSL_ENSURE(pOut, "SdrPaintView::BeginCompleteRedraw: No OutDev (!)");
599  SdrPaintWindow* pPaintWindow = FindPaintWindow(*pOut);
600 
601  if(pPaintWindow)
602  {
603  // draw preprocessing, only for known devices
604  // prepare PreRendering
605  pPaintWindow->PreparePreRenderDevice();
606  }
607  else
608  {
609  // None of the known OutputDevices is the target of this paint, use
610  // a temporary SdrPaintWindow for this Redraw.
611  pPaintWindow = new SdrPaintWindow(*this, *pOut);
612  pPaintWindow->setTemporaryTarget(true);
613  }
614 
615  return pPaintWindow;
616 }
617 
619 {
620  // redraw all PageViews with the target. This may expand the RedrawRegion
621  // at the PaintWindow, plus taking care of FormLayer expansion
622  if(mpPageView)
623  {
624  mpPageView->CompleteRedraw(rPaintWindow, rReg, pRedirector);
625  }
626 }
627 
628 void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
629 {
630  std::unique_ptr<SdrPaintWindow> pPaintWindow;
632  {
633  // Tiled rendering, we must paint the TextEdit to the output device.
634  pPaintWindow.reset(&rPaintWindow);
635  pPaintWindow->setTemporaryTarget(false);
636  }
637 
638  if(rPaintWindow.getTemporaryTarget())
639  {
640  // get rid of temp target again
641  delete &rPaintWindow;
642  }
643  else
644  {
645  // draw postprocessing, only for known devices
646  // it is necessary to always paint FormLayer
647  if(bPaintFormLayer)
648  {
649  ImpFormLayerDrawing(rPaintWindow);
650  }
651 
652  // look for active TextEdit. As long as this cannot be painted to a VDev,
653  // it cannot get part of buffering. In that case, output evtl. prerender
654  // early and paint text edit to window.
655  if(IsTextEdit() && GetSdrPageView())
656  {
657  static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow);
658  }
659 
661  {
662  // Look for active text edits in other views showing the same page,
663  // and show them as well.
664  if (SdrPageView* pPageView = GetSdrPageView())
665  {
666  SdrViewIter aIter(pPageView->GetPage());
667  for (SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView())
668  {
669  if (pView == this)
670  continue;
671 
672  if (pView->IsTextEdit() && pView->GetSdrPageView())
673  {
674  pView->TextEditDrawing(rPaintWindow);
675  }
676  }
677  }
678  }
679 
680  // draw Overlay, also to PreRender device if exists
681  rPaintWindow.DrawOverlay(rPaintWindow.GetRedrawRegion());
682 
683  // output PreRendering
684  rPaintWindow.OutputPreRenderDevice(rPaintWindow.GetRedrawRegion());
685  }
686 }
687 
688 
689 SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect)
690 {
691  // #i74769# use BeginCompleteRedraw() as common base
692  SdrPaintWindow* pPaintWindow = BeginCompleteRedraw(pOut);
693  OSL_ENSURE(pPaintWindow, "SdrPaintView::BeginDrawLayers: No SdrPaintWindow (!)");
694 
695  if(mpPageView)
696  {
697  SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(*pPaintWindow);
698 
699  if(pKnownTarget)
700  {
701  vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, bDisableIntersect );
702 
703  // prepare redraw
704  pKnownTarget->PrepareRedraw(aOptimizedRepaintRegion);
705 
706  // remember prepared SdrPageWindow
707  mpPageView->setPreparedPageWindow(pKnownTarget);
708  }
709  }
710 
711  return pPaintWindow;
712 }
713 
714 void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
715 {
716  // #i74769# use EndCompleteRedraw() as common base
717  EndCompleteRedraw(rPaintWindow, bPaintFormLayer);
718 
719  if(mpPageView)
720  {
721  // forget prepared SdrPageWindow
722  mpPageView->setPreparedPageWindow(nullptr);
723  }
724 }
725 
727 {
728  SdrPaintWindow* pPaintWindow = FindPaintWindow(*pOut);
729  OSL_ENSURE(pPaintWindow, "SdrPaintView::UpdateDrawLayersRegion: No SdrPaintWindow (!)");
730 
731  if(mpPageView)
732  {
733  SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(*pPaintWindow);
734 
735  if(pKnownTarget)
736  {
737  vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, false/*bDisableIntersect*/ );
738  pKnownTarget->GetPaintWindow().SetRedrawRegion(aOptimizedRepaintRegion);
739  mpPageView->setPreparedPageWindow(pKnownTarget); // already set actually
740  }
741  }
742 }
743 
745 {
746  // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
747  // rReg may be made more granular (fine) with using it. Normally, rReg
748  // does come from Window::Paint() anyways and thus is based on a single
749  // rectangle which was derived from exactly that repaint region
750  vcl::Region aOptimizedRepaintRegion(rReg);
751 
752  // #i76114# Intersecting the region with the Window's paint region is disabled
753  // for print preview in Calc, because the intersection can be empty (if the paint
754  // region is outside of the table area of the page), and then no clip region
755  // would be set.
756  if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType() && !bDisableIntersect)
757  {
758  vcl::Window* pWindow = static_cast<vcl::Window*>(pOut);
759 
760  if(pWindow->IsInPaint())
761  {
762  if(!pWindow->GetPaintRegion().IsEmpty())
763  {
764  aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
765  }
766  }
767  }
768  return aOptimizedRepaintRegion;
769 }
770 
771 
773 {
774  if(mpPageView)
775  {
776  SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(rPaintWindow);
777 
778  if(pKnownTarget)
779  {
780  const SdrModel& rModel = *(GetModel());
781  const SdrLayerAdmin& rLayerAdmin = rModel.GetLayerAdmin();
782  const SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID(rLayerAdmin.GetControlLayerName());
783 
784  // BUFFERED use GetTargetOutputDevice() now, it may be targeted to VDevs, too
785  // need to set PreparedPageWindow to make DrawLayer use the correct ObjectContact
786  mpPageView->setPreparedPageWindow(pKnownTarget);
787  mpPageView->DrawLayer(nControlLayerId, &rPaintWindow.GetTargetOutputDevice());
788  mpPageView->setPreparedPageWindow(nullptr);
789  }
790  }
791 }
792 
793 
794 bool SdrPaintView::KeyInput(const KeyEvent& /*rKEvt*/, vcl::Window* /*pWin*/)
795 {
796  return false;
797 }
798 
800 {
801  const sal_uInt32 nWindowCount(PaintWindowCount());
802 
803  for(sal_uInt32 nWinNum(0); nWinNum < nWindowCount; nWinNum++)
804  {
805  SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum);
806 
807  if(pPaintWindow->OutputToWindow())
808  {
809  OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
810 
811  if(mpPageView)
812  {
813  const SdrObjList* pOL=mpPageView->GetObjList();
814  const size_t nObjCount = pOL->GetObjCount();
815  for (size_t nObjNum=0; nObjNum<nObjCount; ++nObjNum) {
816  const SdrObject* pObj=pOL->GetObj(nObjNum);
817  const SdrGluePointList* pGPL=pObj->GetGluePointList();
818  if (pGPL!=nullptr && pGPL->GetCount()!=0) {
819  pGPL->Invalidate(static_cast<vcl::Window&>(rOutDev), pObj);
820  }
821  }
822  }
823  }
824  }
825 }
826 
828 {
829  const sal_uInt32 nWindowCount(PaintWindowCount());
830 
831  for(sal_uInt32 a(0); a < nWindowCount; a++)
832  {
833  SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
834 
835  if(pPaintWindow->OutputToWindow())
836  {
837  InvalidateOneWin(pPaintWindow->GetOutputDevice());
838  }
839  }
840 }
841 
843 {
844  const sal_uInt32 nWindowCount(PaintWindowCount());
845 
846  for(sal_uInt32 a(0); a < nWindowCount; a++)
847  {
848  SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
849 
850  if(pPaintWindow->OutputToWindow())
851  {
852  OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
853  tools::Rectangle aRect(rRect);
854 
855  Point aOrg(rOutDev.GetMapMode().GetOrigin());
856  aOrg.setX(-aOrg.X() ); aOrg.setY(-aOrg.Y() );
857  tools::Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
858 
859  // In case of tiled rendering we want to get all invalidations, so visual area is not interesting.
860  if (aRect.IsOver(aOutRect) || comphelper::LibreOfficeKit::isActive())
861  {
862  InvalidateOneWin(rOutDev, aRect);
863  }
864  }
865  }
866 }
867 
869 {
870  vcl::Window& rWin(static_cast<vcl::Window&>(rDevice));
871  // do not erase background, that causes flicker (!)
872  rWin.Invalidate(InvalidateFlags::NoErase);
873 }
874 
876 {
877  vcl::Window& rWin(static_cast<vcl::Window&>(rDevice));
878  // do not erase background, that causes flicker (!)
879  rWin.Invalidate(rRect, InvalidateFlags::NoErase);
880 }
881 
883 {
884  if(mpPageView)
885  {
886  mpPageView->LeaveOneGroup();
887  }
888 }
889 
891 {
892  if(mpPageView)
893  {
894  mpPageView->LeaveAllGroup();
895  }
896 }
897 
899 {
900  if(mpPageView)
901  {
902  return (mpPageView->GetEnteredLevel() != 0);
903  }
904 
905  return false;
906 }
907 
909 {
910  // bReplaceAll has no effect here at all.
911  bool bMeasure= dynamic_cast<const SdrView*>(this) != nullptr && static_cast<SdrView*>(this)->IsMeasureTool();
912  const SfxPoolItem *pPoolItem=nullptr;
913  if (rAttr.GetItemState(SDRATTR_LAYERID,true,&pPoolItem)==SfxItemState::SET) {
914  SdrLayerID nLayerId=static_cast<const SdrLayerIdItem*>(pPoolItem)->GetValue();
915  const SdrLayer* pLayer=mpModel->GetLayerAdmin().GetLayerPerID(nLayerId);
916  if (pLayer!=nullptr) {
917  if (bMeasure) maMeasureLayer=pLayer->GetName();
918  else maActualLayer=pLayer->GetName();
919  }
920  }
921  if (rAttr.GetItemState(SDRATTR_LAYERNAME,true,&pPoolItem)==SfxItemState::SET) {
922  if (bMeasure) maMeasureLayer=static_cast<const SdrLayerNameItem*>(pPoolItem)->GetValue();
923  else maActualLayer=static_cast<const SdrLayerNameItem*>(pPoolItem)->GetValue();
924  }
925 }
926 
928 {
929  // bOnlyHardAttr has no effect here at all.
930  bool bMeasure= dynamic_cast<const SdrView*>(this) != nullptr && static_cast<const SdrView*>(this)->IsMeasureTool();
931  const OUString& aNam = bMeasure ? maMeasureLayer : maActualLayer;
932  rAttr.Put(SdrLayerNameItem(aNam));
933  SdrLayerID nLayer=mpModel->GetLayerAdmin().GetLayerID(aNam);
934  if (nLayer!=SDRLAYER_NOTFOUND) {
935  rAttr.Put(SdrLayerIdItem(nLayer));
936  }
937 }
938 
939 void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll)
940 {
941 #ifdef DBG_UTIL
942  {
943  bool bHasEEFeatureItems=false;
944  SfxItemIter aIter(rAttr);
945  for (const SfxPoolItem* pItem = aIter.GetCurItem(); !bHasEEFeatureItems && pItem;
946  pItem = aIter.NextItem())
947  {
948  if (!IsInvalidItem(pItem)) {
949  sal_uInt16 nW=pItem->Which();
950  if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=true;
951  }
952  }
953 
954  if(bHasEEFeatureItems)
955  {
956  const OUString aMessage("SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents.");
957  std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
958  VclMessageType::Info, VclButtonsType::Ok,
959  aMessage));
960  xInfoBox->run();
961  }
962  }
963 #endif
964  if (bReplaceAll) maDefaultAttr.Set(rAttr);
965  else maDefaultAttr.Put(rAttr,false); // if FALSE, regard InvalidItems as "holes," not as Default
967 }
968 
969 void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
970 {
973  mpDefaultStyleSheet=pStyleSheet;
976 
977  if (pStyleSheet!=nullptr && !bDontRemoveHardAttr) {
978  SfxWhichIter aIter(pStyleSheet->GetItemSet());
979  sal_uInt16 nWhich=aIter.FirstWhich();
980  while (nWhich!=0) {
981  if (pStyleSheet->GetItemSet().GetItemState(nWhich)==SfxItemState::SET) {
982  maDefaultAttr.ClearItem(nWhich);
983  }
984  nWhich=aIter.NextWhich();
985  }
986  }
987 }
988 
989 void SdrPaintView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
990 {
991  if(bOnlyHardAttr || !mpDefaultStyleSheet)
992  {
993  rTargetSet.Put(maDefaultAttr, false);
994  }
995  else
996  {
997  // else merge with DefStyleSheet
998  rTargetSet.Put(mpDefaultStyleSheet->GetItemSet(), false);
999  rTargetSet.Put(maDefaultAttr, false);
1000  }
1001  MergeNotPersistDefaultAttr(rTargetSet);
1002 }
1003 
1004 void SdrPaintView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
1005 {
1006  SetDefaultAttr(rSet,bReplaceAll);
1007 }
1008 
1010 {
1011  return mpDefaultStyleSheet;
1012 }
1013 
1014 void SdrPaintView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
1015 {
1016  SetDefaultStyleSheet(pStyleSheet,bDontRemoveHardAttr);
1017 }
1018 
1020 {
1021  // TODO: handle when the text cursor goes out of the chart area
1022  // However this hack avoids that the cursor gets misplaced wrt the text.
1024  {
1025  return;
1026  }
1027 
1028  MapMode aMap(rWin.GetMapMode());
1029  Size aActualSize(rWin.GetOutputSize());
1030 
1031  if( aActualSize.Height() <= 0 || aActualSize.Width() <= 0 )
1032  return;
1033 
1034  Size aNewSize(rRect.GetSize());
1035  bool bNewScale=false;
1036  bool bNeedMoreX=aNewSize.Width()>aActualSize.Width();
1037  bool bNeedMoreY=aNewSize.Height()>aActualSize.Height();
1038  if (bNeedMoreX || bNeedMoreY)
1039  {
1040  bNewScale=true;
1041  // set new MapMode (Size+Org) and invalidate everything
1042  Fraction aXFact(aNewSize.Width(),aActualSize.Width());
1043  Fraction aYFact(aNewSize.Height(),aActualSize.Height());
1044  if (aYFact>aXFact) aXFact=aYFact;
1045  aXFact*=aMap.GetScaleX();
1046  aXFact.ReduceInaccurate(10); // to avoid runovers and BigInt mapping
1047  aMap.SetScaleX(aXFact);
1048  aMap.SetScaleY(aYFact);
1049  rWin.SetMapMode(aMap);
1050  aActualSize=rWin.GetOutputSize();
1051  }
1052  Point aOrg(aMap.GetOrigin());
1053  long dx=0,dy=0;
1054  long l=-aOrg.X();
1055  long r=-aOrg.X()+aActualSize.Width()-1;
1056  long o=-aOrg.Y();
1057  long u=-aOrg.Y()+aActualSize.Height()-1;
1058  if (l>rRect.Left()) dx=rRect.Left()-l;
1059  else if (r<rRect.Right()) dx=rRect.Right()-r;
1060  if (o>rRect.Top()) dy=rRect.Top()-o;
1061  else if (u<rRect.Bottom()) dy=rRect.Bottom()-u;
1062  aMap.SetOrigin(Point(aOrg.X()-dx,aOrg.Y()-dy));
1063  if (!bNewScale) {
1064  if (dx!=0 || dy!=0) {
1065  rWin.Scroll(-dx,-dy);
1066  rWin.SetMapMode(aMap);
1067  rWin.Update();
1068  }
1069  } else {
1070  rWin.SetMapMode(aMap);
1071  InvalidateOneWin(rWin);
1072  }
1073 }
1074 
1076 {
1077 }
1078 
1080 {
1082 }
1083 
1085 {
1086  if(mbAnimationPause != bSet)
1087  {
1088  mbAnimationPause = bSet;
1089 
1090  if(mpPageView)
1091  {
1092  for(sal_uInt32 b(0); b < mpPageView->PageWindowCount(); b++)
1093  {
1094  SdrPageWindow& rPageWindow = *(mpPageView->GetPageWindow(b));
1095  sdr::contact::ObjectContact& rObjectContact = rPageWindow.GetObjectContact();
1096  sdr::animation::primitiveAnimator& rAnimator = rObjectContact.getPrimitiveAnimator();
1097 
1098  if(rAnimator.IsPaused() != bSet)
1099  {
1100  rAnimator.SetPaused(bSet);
1101  }
1102  }
1103  }
1104  }
1105 }
1106 
1108 {
1109  meAnimationMode = eMode;
1110 }
1111 
1113 {
1114  if(mpPageView)
1115  {
1116  if (pOut)
1117  {
1118  SdrPageWindow* pWindow = mpPageView->FindPageWindow(*const_cast<OutputDevice*>(pOut));
1119 
1120  if(pWindow)
1121  {
1122  VisAreaChanged();
1123  }
1124  }
1125  else
1126  {
1127  VisAreaChanged();
1128  }
1129  }
1130 }
1131 
1133 {
1134  // notify SfxListener
1136 }
1137 
1138 
1140 {
1142 }
1143 
1144 
1145 // Set background color for svx at SdrPageViews
1147 {
1148  if(mpPageView)
1149  {
1150  mpPageView->SetApplicationBackgroundColor(aBackgroundColor);
1151  }
1152 }
1153 
1154 // Set document color for svx at SdrPageViews
1156 {
1157  if(mpPageView)
1158  {
1159  mpPageView->SetApplicationDocumentColor(aDocumentColor);
1160  }
1161 }
1162 
1164 {
1166 }
1167 
1169 {
1170  if(bNew != mbBufferedOutputAllowed)
1171  {
1172  mbBufferedOutputAllowed = bNew;
1173  }
1174 }
1175 
1177 {
1179 }
1180 
1182 {
1183  if(bNew != mbBufferedOverlayAllowed)
1184  {
1185  mbBufferedOverlayAllowed = bNew;
1186  }
1187 }
1188 
1189 
1191 {
1192  if(bNew != mbPagePaintingAllowed)
1193  {
1194  mbPagePaintingAllowed = bNew;
1195  }
1196 }
1197 
1198 // #i38135# Sets the timer for Object animations and restarts.
1199 void SdrPaintView::SetAnimationTimer(sal_uInt32 nTime)
1200 {
1201  if(mpPageView)
1202  {
1203  // first, reset all timers at all windows to 0L
1204  for(sal_uInt32 a(0); a < mpPageView->PageWindowCount(); a++)
1205  {
1206  SdrPageWindow& rPageWindow = *mpPageView->GetPageWindow(a);
1207  sdr::contact::ObjectContact& rObjectContact = rPageWindow.GetObjectContact();
1208  sdr::animation::primitiveAnimator& rAnimator = rObjectContact.getPrimitiveAnimator();
1209  rAnimator.SetTime(nTime);
1210  }
1211  }
1212 }
1213 
1214 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt16 mnMinMovLog
Definition: svdpntv.hxx:157
friend class SdrPageView
Definition: svdpntv.hxx:124
long Width() const
OutDevType GetOutDevType() const
bool mbGridVisible
Definition: svdpntv.hxx:166
ConfigurationHints
virtual void HideSdrPage()
Definition: svdpntv.cxx:390
#define EE_FEATURE_END
const size_t count(pCandidateA->getBorderLines().size())
virtual bool IsTextEdit() const
Definition: svdpntv.cxx:314
SdrHintKind GetKind() const
Definition: svdmodel.hxx:124
SdrPaintView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: svdpntv.cxx:173
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
void SetStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr)
Definition: svdpntv.cxx:1014
bool mbSwapAsynchron
Definition: svdpntv.hxx:175
#define SDRATTR_LAYERID
Definition: svddef.hxx:271
virtual bool IsAction() const
Definition: svdpntv.cxx:287
void EndDrawLayers(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:714
bool Set(const SfxItemSet &, bool bDeep=true)
virtual void ModelHasChanged()
Definition: svdpntv.cxx:271
std::string GetValue
void ImpFormLayerDrawing(SdrPaintWindow &rPaintWindow)
Definition: svdpntv.cxx:772
virtual void DeleteWindowFromPaintView(OutputDevice *pOldWin)
Definition: svdpntv.cxx:411
void SetDefaultStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr)
Definition: svdpntv.cxx:969
void SetAnimationPause(bool bSet)
Set/unset pause state for animations.
Definition: svdpntv.cxx:1084
bool IsBufferedOutputAllowed() const
Definition: svdpntv.cxx:1163
void VisAreaChanged()
Definition: svdpntv.cxx:1132
SdrPaintWindow * FindPaintWindow(const OutputDevice &rOut) const
Definition: svdpntv.cxx:67
void FlushComeBackTimer() const
Definition: svdpntv.cxx:262
OUString maMeasureLayer
Definition: svdpntv.hxx:138
bool mbBufferedOutputAllowed
Definition: svdpntv.hxx:184
SdrHintKind
Definition: svdmodel.hxx:93
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:773
size_t GetObjCount() const
Definition: svdpage.cxx:767
bool mbGlueVisible4
Definition: svdpntv.hxx:173
bool IsOver(const tools::Rectangle &rRect) const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdpntv.cxx:211
void GlueInvalidate() const
Definition: svdpntv.cxx:799
sal_uInt16 FirstWhich()
sal_uInt16 mnMinMovPix
Definition: svdpntv.hxx:155
const MapMode & GetMapMode() const
B2DVector getRange() const
void MergeNotPersistDefaultAttr(SfxItemSet &rAttr) const
Definition: svdpntv.cxx:927
vcl::Region GetPaintRegion() const
bool mbBordVisible
Definition: svdpntv.hxx:165
void DeletePaintWindow(SdrPaintWindow &rOld)
Definition: svdpntv.cxx:82
virtual SfxItemSet & GetItemSet()
virtual SdrPaintWindow * BeginCompleteRedraw(OutputDevice *pOut)
Definition: svdpntv.cxx:596
bool mbPreviewRenderer
Definition: svdpntv.hxx:195
sal_uInt16 GetCount() const
Definition: svdglue.hxx:126
void SetAnimationEnabled(bool bEnable=true)
Definition: svdpntv.cxx:1079
virtual void DoConnect(SdrOle2Obj *pOleObj)
For Plugins Is called by the Paint of the OLE object.
Definition: svdpntv.cxx:1075
void SetLayerPrintable(const OUString &rName, bool bPrn)
Definition: svdpntv.cxx:465
bool mbAnimationPause
Definition: svdpntv.hxx:180
bool mbBufferedOverlayAllowed
Definition: svdpntv.hxx:189
bool IsMeasureTool() const
Definition: svdcrtv.cxx:341
sal_uInt16 ImpGetMinMovLogic(short nMinMov, const OutputDevice *pOut) const
Definition: svdpntv.cxx:319
void SetMapMode()
#define EE_FEATURE_START
SfxHintId GetId() const
VclPtr< OutputDevice > mpDragWin
Definition: svdpntv.hxx:134
void SetLayerVisible(const OUString &rName, bool bShow)
Definition: svdpntv.cxx:427
void SetRedrawRegion(const vcl::Region &rNew)
SdrModel * mpModel
Definition: svdpntv.hxx:132
void SetBufferedOutputAllowed(bool bNew)
Definition: svdpntv.cxx:1168
HashMap_OWString_Interface aMap
sal_uInt16 mnHitTolLog
Definition: svdpntv.hxx:156
const SfxPoolItem * NextItem()
long Right() const
sal_uInt16 ImpGetHitTolLogic(short nHitTol, const OutputDevice *pOut) const
Definition: svdpntv.cxx:333
void setX(long nX)
OUTDEV_WINDOW
OutputDevice & GetTargetOutputDevice()
bool OutputToWindow() const
virtual void Start() override
void LeaveAllGroup()
Leave all entered object groups of all visible Pages (like chdir \ in MS-DOS)
Definition: svdpntv.cxx:890
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
void SetApplicationBackgroundColor(Color aBackgroundColor)
Definition: svdpntv.cxx:1146
long Top() const
void DoCompleteRedraw(SdrPaintWindow &rPaintWindow, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
Definition: svdpntv.cxx:618
OutputDevice * GetFirstOutputDevice() const
Definition: svdpntv.cxx:93
constexpr SdrLayerID SDRLAYER_NOTFOUND(0xff)
bool mbPageBorderVisible
Definition: svdpntv.hxx:164
std::unique_ptr< SdrPageView > mpPageView
Definition: svdpntv.hxx:130
SvtOptionsDrawinglayer const maDrawinglayerOpt
Definition: svdpntv.hxx:160
bool IsLayerPrintable(const OUString &rName) const
Definition: svdpntv.cxx:473
bool IsLayerVisible(const OUString &rName) const
Definition: svdpntv.cxx:437
void SetLayerLocked(const OUString &rName, bool bLock=true)
Definition: svdpntv.cxx:447
sdr::animation::primitiveAnimator & getPrimitiveAnimator()
sal_uInt32 PaintWindowCount() const
Definition: svdpntv.hxx:228
void SetAnimationMode(const SdrAnimationMode eMode)
Mode when starting an animation in the Paint Handler:
Definition: svdpntv.cxx:1107
void Update()
virtual void EndAction()
Definition: svdpntv.cxx:296
virtual bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin)
Definition: svdpntv.cxx:794
bool mbHlplVisible
Definition: svdpntv.hxx:168
SfxStyleSheet * GetStyleSheet() const
Definition: svdpntv.cxx:1009
virtual void ClearPageView()
Definition: svdpntv.cxx:362
SfxStyleSheet * mpDefaultStyleSheet
Definition: svdpntv.hxx:135
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr) const
Definition: svdpntv.cxx:989
bool IsEmpty() const
const OUString & GetControlLayerName() const
Definition: svdlayer.hxx:151
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
virtual const SdrGluePointList * GetGluePointList() const
Definition: svdobj.cxx:2225
SdrPaintWindow * BeginDrawLayers(OutputDevice *pOut, const vcl::Region &rReg, bool bDisableIntersect=false)
Definition: svdpntv.cxx:689
void SetBufferedOverlayAllowed(bool bNew)
Definition: svdpntv.cxx:1181
sal_uInt16 mnHitTolPix
Definition: svdpntv.hxx:154
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
bool mbGlueVisible3
Definition: svdpntv.hxx:172
uno_Any a
void setTemporaryTarget(bool bNew)
SAL_DLLPRIVATE void SetPaused(bool bNew)
Definition: scheduler.cxx:162
virtual void MakeVisible(const tools::Rectangle &rRect, vcl::Window &rWin)
Definition: svdpntv.cxx:1019
bool IsBufferedOverlayAllowed() const
Definition: svdpntv.cxx:1176
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
Size GetOutputSize() const
BitmapEx convertMetafileToBitmapEx(const GDIMetaFile &rMtf, const basegfx::B2DRange &rTargetRange, const sal_uInt32 nMaximumQuadraticPixels)
Helper to convert any GDIMetaFile to a good quality BitmapEx, using default parameters and graphic::X...
Definition: svdpntv.cxx:109
bool getTemporaryTarget() const
const OUString & GetName() const
Definition: svdlayer.hxx:77
void SetAttributes(const SfxItemSet &rSet, bool bReplaceAll)
Definition: svdpntv.cxx:1004
float u
bool mbHlplFront
Definition: svdpntv.hxx:169
long Bottom() const
SdrLayer * GetLayerPerID(SdrLayerID nID)
Definition: svdlayer.hxx:147
void Intersect(const tools::Rectangle &rRegion)
const vcl::Region & GetRedrawRegion() const
void LeaveOneGroup()
Leave an object group of all visible Pages (like chdir .. in MS-DOS)
Definition: svdpntv.cxx:882
virtual SdrPageView * ShowSdrPage(SdrPage *pPage)
Definition: svdpntv.cxx:373
bool mbSomeObjChgdFlag
Definition: svdpntv.hxx:174
OUString maActualLayer
Definition: svdpntv.hxx:137
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
virtual void AddWindowToPaintView(OutputDevice *pNewWin, vcl::Window *pWindow)
Definition: svdpntv.cxx:399
void SetDefaultAttr(const SfxItemSet &rAttr, bool bReplaceAll)
Default attributes at the View Newly created objects are assigned these attributes by default when th...
Definition: svdpntv.cxx:939
const sdr::contact::ObjectContact & GetObjectContact() const
Color maGridColor
Definition: svdpntv.hxx:220
Abstract DrawObject.
Definition: svdobj.hxx:312
SdrAnimationMode meAnimationMode
Definition: svdpntv.hxx:152
long X() const
void PrepareRedraw(const vcl::Region &rReg)
virtual bool IsChart() const
Size GetSize() const
void SetAnimationTimer(sal_uInt32 nTime)
Definition: svdpntv.cxx:1199
SdrAnimationMode
Definition: svdpntv.hxx:62
Point PixelToLogic(const Point &rDevicePt) const
void ConfigurationChanged(::utl::ConfigurationBroadcaster *, ConfigurationHints) override
Definition: svdpntv.cxx:248
void PreparePreRenderDevice()
void UpdateDrawLayersRegion(OutputDevice *pOut, const vcl::Region &rReg)
Definition: svdpntv.cxx:726
bool mbGlueVisible
Definition: svdpntv.hxx:170
std::vector< std::unique_ptr< SdrPaintWindow > > maPaintWindows
Definition: svdpntv.hxx:143
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
virtual void Scroll(long nHorzScroll, long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
void Broadcast(const SfxHint &rHint)
void SetNotPersistDefaultAttr(const SfxItemSet &rAttr)
Definition: svdpntv.cxx:908
void TheresNewMapMode()
Definition: svdpntv.cxx:347
bool mbPageVisible
Definition: svdpntv.hxx:162
bool IsInserted() const
Definition: svdpage.hxx:453
bool IsPaintBuffer() const
void Stop()
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart=true) const
void PrePaint()
Definition: svdpntv.cxx:483
SfxStyleSheet * GetDefaultStyleSheet() const
Definition: svdmodel.hxx:341
void OutputPreRenderDevice(const vcl::Region &rExpandedRegion)
void InvalidateAllWin()
Definition: svdpntv.cxx:827
bool IsLayerLocked(const OUString &rName) const
Definition: svdpntv.cxx:455
SdrPaintWindow & GetPaintWindow() const
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
SAL_DLLPRIVATE bool IsPaused() const
Definition: scheduler.hxx:92
B2DPoint getMinimum() const
virtual void MovAction(const Point &rPnt)
Definition: svdpntv.cxx:292
void * p
size_t GetActionSize() const
virtual void CompleteRedraw(OutputDevice *pOut, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
Definition: svdpntv.cxx:494
void SetInvokeHandler(const Link< Timer *, void > &rLink)
void SetPagePaintingAllowed(bool bNew)
Definition: svdpntv.cxx:1190
css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference
static vcl::Region OptimizeDrawLayersRegion(OutputDevice *pOut, const vcl::Region &rReg, bool bDisableIntersect)
Definition: svdpntv.cxx:744
const Point & GetOrigin() const
static sal_uInt64 GetSystemTicks()
long Left() const
#define SDRATTR_LAYERNAME
Definition: svddef.hxx:272
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage)
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:310
void onChangeColorConfig()
Definition: svdpntv.cxx:1139
svtools::ColorConfig maColorConfig
Definition: svdpntv.hxx:219
virtual void BrkAction()
Definition: svdpntv.cxx:304
void DrawOverlay(const vcl::Region &rRegion)
BitmapEx convertPrimitive2DSequenceToBitmapEx(const std::deque< css::uno::Reference< css::graphic::XPrimitive2D > > &rSequence, const basegfx::B2DRange &rTargetRange, const sal_uInt32 nMaximumQuadraticPixels)
void SetPriority(TaskPriority ePriority)
bool mbGlueVisible2
Definition: svdpntv.hxx:171
const SdrPage * GetPage() const
Definition: svdmodel.hxx:122
bool IsInPaint() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:366
void SetActualWin(const OutputDevice *pWin)
Definition: svdpntv.cxx:355
IMPL_LINK_NOARG(SdrPaintView, ImpComeBackHdl, Timer *, void)
Definition: svdpntv.cxx:254
bool mbGridFront
Definition: svdpntv.hxx:167
bool IsOverlayBuffer() const
const SdrLayerAdmin & GetLayerAdmin() const
Definition: svdmodel.hxx:311
virtual void InvalidateOneWin(OutputDevice &rWin)
If the View should not call Invalidate() on the windows, override the following 2 methods and do some...
Definition: svdpntv.cxx:868
bool IsInvalidItem(const SfxPoolItem *pItem)
virtual void BckAction()
Definition: svdpntv.cxx:300
SAL_DLLPRIVATE void SetTime(sal_uInt32 nTime)
Definition: scheduler.cxx:119
SdrLayerID GetLayerID(const OUString &rName) const
Definition: svdlayer.cxx:230
bool mbPrintPreview
Definition: svdpntv.hxx:176
SdrModel * GetModel() const
Definition: svdpntv.hxx:271
virtual void TakeActionRect(tools::Rectangle &rRect) const
Definition: svdpntv.cxx:308
SfxItemSet maDefaultAttr
Definition: svdpntv.hxx:149
bool mbPageShadowVisible
Definition: svdpntv.hxx:163
bool IsGroupEntered() const
Determine, whether Leave is useful or not.
Definition: svdpntv.cxx:898
Idle maComeBackIdle
Definition: svdpntv.hxx:150
OutputDevice & GetOutputDevice() const
bool mbPagePaintingAllowed
Definition: svdpntv.hxx:192
VclPtr< OutputDevice > mpActualOutDev
Definition: svdpntv.hxx:133
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
Definition: svdpntv.cxx:77
SVX_DLLPRIVATE void ImpClearVars()
Definition: svdpntv.cxx:134
virtual void EndCompleteRedraw(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:628
const SfxPoolItem * GetCurItem() const
void Invalidate(vcl::Window &rWin, const SdrObject *pObj) const
Definition: svdglue.cxx:330
void SetDebugName(const sal_Char *pDebugName)
virtual ~SdrPaintView() override
Definition: svdpntv.cxx:198
void SetApplicationDocumentColor(Color aDocumentColor)
Definition: svdpntv.cxx:1155