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