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