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