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