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