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>
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
51using 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{
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 : mrModel(rSdrModel)
133 , mpActualOutDev(nullptr)
134 , mpDragWin(nullptr)
135 , mpDefaultStyleSheet(nullptr)
136 , maDefaultAttr(rSdrModel.GetItemPool())
137 , maComeBackIdle( "svx::SdrPaintView aComeBackIdle" )
138 , meAnimationMode(SdrAnimationMode::Animate)
139 , mnHitTolPix(2)
140 , mnMinMovPix(3)
141 , mnHitTolLog(0)
142 , mnMinMovLog(0)
143 , mbPageVisible(true)
144 , mbPageShadowVisible(true)
145 , mbPageBorderVisible(true)
146 , mbBordVisible(true)
147 , mbGridVisible(true)
148 , mbGridFront(false)
149 , mbHlplVisible(true)
150 , mbHlplFront(true)
151 , mbGlueVisible(false)
152 , mbGlueVisible2(false)
153 , mbGlueVisible3(false)
154 , mbGlueVisible4(false)
155 , mbSomeObjChgdFlag(false)
156 , mbSwapAsynchron(false)
157 , mbPrintPreview(false)
158 , mbAnimationPause(false)
159 , mbBufferedOutputAllowed(false)
160 , mbBufferedOverlayAllowed(false)
161 , mbPagePaintingAllowed(true)
162 , mbPreviewRenderer(false)
163 , mbHideOle(false)
164 , mbHideChart(false)
165 , mbHideDraw(false)
166 , mbHideFormControl(false)
167 , mbPaintTextEdit(true)
168 , maGridColor(COL_BLACK)
169{
170 maComeBackIdle.SetPriority(TaskPriority::REPAINT);
171 maComeBackIdle.SetInvokeHandler(LINK(this,SdrPaintView,ImpComeBackHdl));
172
173 SetDefaultStyleSheet(GetModel().GetDefaultStyleSheet(), true);
174
175 if (pOut)
176 AddDeviceToPaintView(*pOut, nullptr);
177
178 maColorConfig.AddListener(this);
180}
181
183{
186
187 maColorConfig.RemoveListener(this);
189
190 // delete existing SdrPaintWindows
191 maPaintWindows.clear();
192}
193
194
196{
197 //If the stylesheet has been destroyed
198 if (&rBC == mpDefaultStyleSheet)
199 {
200 if (rHint.GetId() == SfxHintId::Dying)
201 mpDefaultStyleSheet = nullptr;
202 return;
203 }
204
205 if (rHint.GetId() != SfxHintId::ThisIsAnSdrHint)
206 return;
207 const SdrHint* pSdrHint = static_cast<const SdrHint*>(&rHint);
208 SdrHintKind eKind = pSdrHint->GetKind();
210 {
211 bool bObjChg = !mbSomeObjChgdFlag; // if true, evaluate for ComeBack timer
212 if (bObjChg)
213 {
216 }
217 }
218
220 {
221 const SdrPage* pPg=pSdrHint->GetPage();
222 if (pPg && !pPg->IsInserted())
223 {
224 if(mpPageView && mpPageView->GetPage() == pPg)
225 {
226 HideSdrPage();
227 }
228 }
229 }
230}
231
233{
236}
237
238IMPL_LINK_NOARG(SdrPaintView, ImpComeBackHdl, Timer *, void)
239{
240 if (mbSomeObjChgdFlag) {
241 mbSomeObjChgdFlag=false;
242 ModelHasChanged();
243 }
244}
245
247{
248 if (mbSomeObjChgdFlag) {
249 // casting to nonconst
250 const_cast<SdrPaintView*>(this)->ImpComeBackHdl(&const_cast<SdrPaintView*>(this)->maComeBackIdle);
251 const_cast<SdrPaintView*>(this)->maComeBackIdle.Stop();
252 }
253}
254
256{
257 // broadcast to all PageViews
258 if(mpPageView && !mpPageView->GetPage()->IsInserted())
259 {
260 HideSdrPage();
261 }
262
263 // test mpPageView here again, HideSdrPage() may have invalidated it.
264 if(mpPageView)
265 {
266 mpPageView->ModelHasChanged();
267 }
268}
269
270
272{
273 return false;
274}
275
276void SdrPaintView::MovAction(const Point&)
277{
278}
279
281{
282}
283
285{
286}
287
289{
290}
291
293{
294}
295
296
297// info about TextEdit. Default is false.
299{
300 return false;
301}
302
303sal_uInt16 SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const
304{
305 if (nMinMov>=0) return sal_uInt16(nMinMov);
306 if (pOut==nullptr)
307 {
309 }
310 if (pOut!=nullptr) {
311 return short(-pOut->PixelToLogic(Size(nMinMov,0)).Width());
312 } else {
313 return 0;
314 }
315}
316
317sal_uInt16 SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const
318{
319 if (nHitTol>=0) return sal_uInt16(nHitTol);
320 if (pOut==nullptr)
321 {
323 }
324 if (pOut!=nullptr) {
325 return short(-pOut->PixelToLogic(Size(nHitTol,0)).Width());
326 } else {
327 return 0;
328 }
329}
330
332{
333 if (mpActualOutDev) {
334 mnHitTolLog=static_cast<sal_uInt16>(mpActualOutDev->PixelToLogic(Size(mnHitTolPix,0)).Width());
335 mnMinMovLog=static_cast<sal_uInt16>(mpActualOutDev->PixelToLogic(Size(mnMinMovPix,0)).Width());
336 }
337}
338
340{
341 mpActualOutDev = const_cast<OutputDevice *>(pWin);
343}
344
345
347{
348 BrkAction();
349
350 if(mpPageView)
351 {
353 mpPageView.reset();
354 }
355}
356
358{
359 if(pPage && (!mpPageView || mpPageView->GetPage() != pPage))
360 {
361 if(mpPageView)
362 {
364 mpPageView.reset();
365 }
366
367 if (SdrView *pView = dynamic_cast<SdrView*>(this))
368 {
369 mpPageView.reset(new SdrPageView(pPage, *pView));
370 mpPageView->Show();
371 }
372 }
373
374 return mpPageView.get();
375}
376
378{
379 if(mpPageView)
380 {
381 mpPageView->Hide();
382 mpPageView.reset();
383 }
384}
385
387{
388 SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, rNewDev, pWindow);
389 maPaintWindows.emplace_back(pNewPaintWindow);
390
391 if(mpPageView)
392 {
393 mpPageView->AddPaintWindowToPageView(*pNewPaintWindow);
394 }
395}
396
398{
399 SdrPaintWindow* pCandidate = FindPaintWindow(rOldDev);
400
401 if(pCandidate)
402 {
403 if(mpPageView)
404 {
405 mpPageView->RemovePaintWindowFromPageView(*pCandidate);
406 }
407
408 DeletePaintWindow(*pCandidate);
409 }
410}
411
412void SdrPaintView::SetLayerVisible(const OUString& rName, bool bShow)
413{
414 if(mpPageView)
415 {
416 mpPageView->SetLayerVisible(rName, bShow);
417 }
418
420}
421
422bool SdrPaintView::IsLayerVisible(const OUString& rName) const
423{
424 if(mpPageView)
425 {
426 return mpPageView->IsLayerVisible(rName);
427 }
428
429 return false;
430}
431
432void SdrPaintView::SetLayerLocked(const OUString& rName, bool bLock)
433{
434 if(mpPageView)
435 {
436 mpPageView->SetLayerLocked(rName,bLock);
437 }
438}
439
440bool SdrPaintView::IsLayerLocked(const OUString& rName) const
441{
442 if(mpPageView)
443 {
444 return mpPageView->IsLayerLocked(rName);
445 }
446
447 return false;
448}
449
450void SdrPaintView::SetLayerPrintable(const OUString& rName, bool bPrn)
451{
452 if(mpPageView)
453 {
454 mpPageView->SetLayerPrintable(rName,bPrn);
455 }
456}
457
458bool 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
613void 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 // In the LOK case control rendering is performed through LokControlHandler
633 if(!comphelper::LibreOfficeKit::isActive() && bPaintFormLayer)
634 {
635 ImpFormLayerDrawing(rPaintWindow);
636 }
637
638 // look for active TextEdit. As long as this cannot be painted to a VDev,
639 // it cannot get part of buffering. In that case, output evtl. prerender
640 // early and paint text edit to window.
641 SdrPageView* pPageView = GetSdrPageView();
642 if(IsTextEdit() && pPageView)
643 {
645 static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow);
646 }
647
649 {
650 // Look for active text edits in other views showing the same page,
651 // and show them as well. Show only if Page/MasterPage mode is matching.
652 SdrViewIter aIter(pPageView->GetPage());
653 bool bRequireMasterPage = pPageView->GetPage() ? pPageView->GetPage()->IsMasterPage() : false;
654 for (SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView())
655 {
656 SdrPageView* pCurrentPageView = pView->GetSdrPageView();
657 bool bIsCurrentMasterPage = (pCurrentPageView && pCurrentPageView->GetPage()) ?
658 pCurrentPageView->GetPage()->IsMasterPage() : false;
659
660 if (pView == this || bRequireMasterPage != bIsCurrentMasterPage)
661 continue;
662
663 if (pView->IsTextEdit() && pView->GetSdrPageView())
664 {
665 pView->TextEditDrawing(rPaintWindow);
666 }
667 }
668 }
669
670 // draw Overlay, also to PreRender device if exists
671 rPaintWindow.DrawOverlay(rPaintWindow.GetRedrawRegion());
672
673 // output PreRendering
674 rPaintWindow.OutputPreRenderDevice(rPaintWindow.GetRedrawRegion());
675 }
676}
677
678
679SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect)
680{
681 // #i74769# use BeginCompleteRedraw() as common base
682 SdrPaintWindow* pPaintWindow = BeginCompleteRedraw(pOut);
683 OSL_ENSURE(pPaintWindow, "SdrPaintView::BeginDrawLayers: No SdrPaintWindow (!)");
684
685 if(mpPageView)
686 {
687 SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(*pPaintWindow);
688
689 if(pKnownTarget)
690 {
691 vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, bDisableIntersect );
692
693 // prepare redraw
694 pKnownTarget->PrepareRedraw(aOptimizedRepaintRegion);
695
696 // remember prepared SdrPageWindow
697 mpPageView->setPreparedPageWindow(pKnownTarget);
698 }
699 }
700
701 return pPaintWindow;
702}
703
704void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
705{
706 // #i74769# use EndCompleteRedraw() as common base
707 EndCompleteRedraw(rPaintWindow, bPaintFormLayer);
708
709 if(mpPageView)
710 {
711 // forget prepared SdrPageWindow
712 mpPageView->setPreparedPageWindow(nullptr);
713 }
714}
715
717{
718 SdrPaintWindow* pPaintWindow = FindPaintWindow(*pOut);
719 OSL_ENSURE(pPaintWindow, "SdrPaintView::UpdateDrawLayersRegion: No SdrPaintWindow (!)");
720
721 if(mpPageView)
722 {
723 SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(*pPaintWindow);
724
725 if(pKnownTarget)
726 {
727 vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, false/*bDisableIntersect*/ );
728 pKnownTarget->GetPaintWindow().SetRedrawRegion(aOptimizedRepaintRegion);
729 mpPageView->setPreparedPageWindow(pKnownTarget); // already set actually
730 }
731 }
732}
733
734vcl::Region SdrPaintView::OptimizeDrawLayersRegion(const OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect)
735{
736 // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
737 // rReg may be made more granular (fine) with using it. Normally, rReg
738 // does come from Window::Paint() anyways and thus is based on a single
739 // rectangle which was derived from exactly that repaint region
740 vcl::Region aOptimizedRepaintRegion(rReg);
741
742 // #i76114# Intersecting the region with the Window's paint region is disabled
743 // for print preview in Calc, because the intersection can be empty (if the paint
744 // region is outside of the table area of the page), and then no clip region
745 // would be set.
746 if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType() && !bDisableIntersect)
747 {
748 vcl::Window* pWindow = pOut->GetOwnerWindow();
749
750 if(pWindow->IsInPaint())
751 {
752 if(!pWindow->GetPaintRegion().IsEmpty())
753 {
754 aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
755 }
756 }
757 }
758 return aOptimizedRepaintRegion;
759}
760
761
763{
764 if(!mpPageView)
765 return;
766
767 SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(rPaintWindow);
768
769 if(pKnownTarget)
770 {
771 const SdrModel& rModel = GetModel();
772 const SdrLayerAdmin& rLayerAdmin = rModel.GetLayerAdmin();
773 const SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID(rLayerAdmin.GetControlLayerName());
774
775 // BUFFERED use GetTargetOutputDevice() now, it may be targeted to VDevs, too
776 // need to set PreparedPageWindow to make DrawLayer use the correct ObjectContact
777 mpPageView->setPreparedPageWindow(pKnownTarget);
778 mpPageView->DrawLayer(nControlLayerId, &rPaintWindow.GetTargetOutputDevice());
779 mpPageView->setPreparedPageWindow(nullptr);
780 }
781}
782
783
784bool SdrPaintView::KeyInput(const KeyEvent& /*rKEvt*/, vcl::Window* /*pWin*/)
785{
786 return false;
787}
788
790{
791 // Do not invalidate GluePoints in Online
792 // They are handled on front-end
794 return;
795
796 const sal_uInt32 nWindowCount(PaintWindowCount());
797
798 for(sal_uInt32 nWinNum(0); nWinNum < nWindowCount; nWinNum++)
799 {
800 SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum);
801
802 if(pPaintWindow->OutputToWindow())
803 {
804 OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
805
806 if(mpPageView)
807 {
808 const SdrObjList* pOL=mpPageView->GetObjList();
809 const size_t nObjCount = pOL->GetObjCount();
810 for (size_t nObjNum=0; nObjNum<nObjCount; ++nObjNum) {
811 const SdrObject* pObj=pOL->GetObj(nObjNum);
812 const SdrGluePointList* pGPL=pObj->GetGluePointList();
813 if (pGPL!=nullptr && pGPL->GetCount()!=0) {
814 pGPL->Invalidate(*rOutDev.GetOwnerWindow(), pObj);
815 }
816 }
817 }
818 }
819 }
820}
821
823{
824 const sal_uInt32 nWindowCount(PaintWindowCount());
825
826 for(sal_uInt32 a(0); a < nWindowCount; a++)
827 {
828 SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
829
830 if(pPaintWindow->OutputToWindow())
831 {
832 InvalidateOneWin(pPaintWindow->GetOutputDevice());
833 }
834 }
835}
836
838{
839 const sal_uInt32 nWindowCount(PaintWindowCount());
840
841 for(sal_uInt32 a(0); a < nWindowCount; a++)
842 {
843 SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
844
845 if(pPaintWindow->OutputToWindow())
846 {
847 OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
848 tools::Rectangle aRect(rRect);
849
850 Point aOrg(rOutDev.GetMapMode().GetOrigin());
851 aOrg.setX(-aOrg.X() ); aOrg.setY(-aOrg.Y() );
852 tools::Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
853
854 // In case of tiled rendering we want to get all invalidations, so visual area is not interesting.
855 if (aRect.Overlaps(aOutRect) || comphelper::LibreOfficeKit::isActive())
856 {
857 InvalidateOneWin(rOutDev, aRect);
858 }
859 }
860 }
861}
862
864{
865 // do not erase background, that causes flicker (!)
866 rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase);
867}
868
870{
871 // do not erase background, that causes flicker (!)
872 rDevice.GetOwnerWindow()->Invalidate(rRect, InvalidateFlags::NoErase);
873}
874
876{
877 if(mpPageView)
878 {
879 mpPageView->LeaveOneGroup();
880 }
881}
882
884{
885 if(mpPageView)
886 {
887 mpPageView->LeaveAllGroup();
888 }
889}
890
892{
893 if(mpPageView)
894 {
895 return (mpPageView->GetEnteredLevel() != 0);
896 }
897
898 return false;
899}
900
902{
903 // bReplaceAll has no effect here at all.
904 bool bMeasure= dynamic_cast<const SdrView*>(this) != nullptr && static_cast<SdrView*>(this)->IsMeasureTool();
905
906 if (const SdrLayerIdItem *pPoolItem = rAttr.GetItemIfSet(SDRATTR_LAYERID))
907 {
908 SdrLayerID nLayerId = pPoolItem->GetValue();
909 const SdrLayer* pLayer = GetModel().GetLayerAdmin().GetLayerPerID(nLayerId);
910 if (pLayer!=nullptr) {
911 if (bMeasure) maMeasureLayer=pLayer->GetName();
912 else maActualLayer=pLayer->GetName();
913 }
914 }
915 if (const SdrLayerNameItem *pPoolItem = rAttr.GetItemIfSet(SDRATTR_LAYERNAME))
916 {
917 if (bMeasure) maMeasureLayer = pPoolItem->GetValue();
918 else maActualLayer = pPoolItem->GetValue();
919 }
920}
921
923{
924 // bOnlyHardAttr has no effect here at all.
925 bool bMeasure= dynamic_cast<const SdrView*>(this) != nullptr && static_cast<const SdrView*>(this)->IsMeasureTool();
926 const OUString& aNam = bMeasure ? maMeasureLayer : maActualLayer;
927 rAttr.Put(SdrLayerNameItem(aNam));
928 SdrLayerID nLayer = GetModel().GetLayerAdmin().GetLayerID(aNam);
929 if (nLayer!=SDRLAYER_NOTFOUND) {
930 rAttr.Put(SdrLayerIdItem(nLayer));
931 }
932}
933
934void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll)
935{
936#ifdef DBG_UTIL
937 {
938 bool bHasEEFeatureItems=false;
939 SfxItemIter aIter(rAttr);
940 for (const SfxPoolItem* pItem = aIter.GetCurItem(); !bHasEEFeatureItems && pItem;
941 pItem = aIter.NextItem())
942 {
943 if (!IsInvalidItem(pItem)) {
944 sal_uInt16 nW=pItem->Which();
945 if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=true;
946 }
947 }
948
949 if(bHasEEFeatureItems)
950 {
951 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
952 VclMessageType::Info, VclButtonsType::Ok,
953 "SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."));
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
963void 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 (aIter.GetItemState()==SfxItemState::SET) {
976 maDefaultAttr.ClearItem(nWhich);
977 }
978 nWhich=aIter.NextWhich();
979 }
980 }
981}
982
983void 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
998void SdrPaintView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
999{
1000 SetDefaultAttr(rSet,bReplaceAll);
1001}
1002
1004{
1005 return mpDefaultStyleSheet;
1006}
1007
1008void 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.GetOutDev()->GetOutputSize());
1024
1025 if( aActualSize.IsEmpty() )
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.GetOutDev()->GetOutputSize();
1045 }
1046 Point aOrg(aMap.GetOrigin());
1047 tools::Long dx=0,dy=0;
1048 tools::Long l=-aOrg.X();
1049 tools::Long r=-aOrg.X()+aActualSize.Width()-1;
1050 tools::Long o=-aOrg.Y();
1051 tools::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.PaintImmediately();
1062 }
1063 } else {
1064 rWin.SetMapMode(aMap);
1065 InvalidateOneWin(*rWin.GetOutDev());
1066 }
1067}
1068
1070{
1071}
1072
1074{
1076}
1077
1079{
1080 if(mbAnimationPause == bSet)
1081 return;
1082
1083 mbAnimationPause = bSet;
1084
1085 if(!mpPageView)
1086 return;
1087
1088 for(sal_uInt32 b(0); b < mpPageView->PageWindowCount(); b++)
1089 {
1090 SdrPageWindow& rPageWindow = *(mpPageView->GetPageWindow(b));
1091 sdr::contact::ObjectContact& rObjectContact = rPageWindow.GetObjectContact();
1092 sdr::animation::primitiveAnimator& rAnimator = rObjectContact.getPrimitiveAnimator();
1093
1094 if(rAnimator.IsPaused() != bSet)
1095 {
1096 rAnimator.SetPaused(bSet);
1097 }
1098 }
1099}
1100
1102{
1104}
1105
1107{
1108 if(!mpPageView)
1109 return;
1110
1111 if (pOut)
1112 {
1113 SdrPageWindow* pWindow = mpPageView->FindPageWindow(*const_cast<OutputDevice*>(pOut));
1114
1115 if(pWindow)
1116 {
1118 }
1119 }
1120 else
1121 {
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 {
1167 }
1168}
1169
1171{
1173}
1174
1176{
1177 if(bNew != mbBufferedOverlayAllowed)
1178 {
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.
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: */
ChartModel & mrModel
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
void ReduceInaccurate(unsigned nSignificantBits)
size_t GetActionSize() const
virtual void Start(bool bStartTimer=true) override
const Point & GetOrigin() const
Size GetOutputSize() const
const MapMode & GetMapMode() const
virtual vcl::Window * GetOwnerWindow() const
bool IsMeasureTool() const
Definition: svdcrtv.cxx:329
void Invalidate(vcl::Window &rWin, const SdrObject *pObj) const
Definition: svdglue.cxx:328
sal_uInt16 GetCount() const
Definition: svdglue.hxx:194
const SdrPage * GetPage() const
Definition: svdmodel.hxx:131
SdrHintKind GetKind() const
Definition: svdmodel.hxx:133
const OUString & GetControlLayerName() const
Definition: svdlayer.hxx:149
SdrLayer * GetLayerPerID(SdrLayerID nID)
Definition: svdlayer.hxx:145
SdrLayerID GetLayerID(const OUString &rName) const
Definition: svdlayer.cxx:231
const OUString & GetName() const
Definition: svdlayer.hxx:77
const SdrLayerAdmin & GetLayerAdmin() const
Definition: svdmodel.hxx:315
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:824
size_t GetObjCount() const
Definition: svdpage.cxx:818
Abstract DrawObject.
Definition: svdobj.hxx:260
virtual const SdrGluePointList * GetGluePointList() const
Definition: svdobj.cxx:2276
SdrPage * GetPage() const
Definition: svdpagv.hxx:166
void PrepareRedraw(const vcl::Region &rReg)
SdrPaintWindow & GetPaintWindow() const
const sdr::contact::ObjectContact & GetObjectContact() const
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
Definition: svdpage.hxx:377
bool IsInserted() const
Definition: svdpage.hxx:464
bool IsMasterPage() const
Definition: svdpage.hxx:462
bool IsGroupEntered() const
Determine, whether Leave is useful or not.
Definition: svdpntv.cxx:891
virtual void MovAction(const Point &rPnt)
Definition: svdpntv.cxx:276
virtual void DeleteDeviceFromPaintView(OutputDevice &rOldDev)
Definition: svdpntv.cxx:397
sal_uInt16 mnMinMovLog
Definition: svdpntv.hxx:149
virtual void AddDeviceToPaintView(OutputDevice &rNewDev, vcl::Window *pWindow)
Definition: svdpntv.cxx:386
sal_uInt16 mnHitTolLog
Definition: svdpntv.hxx:148
void SetLayerLocked(const OUString &rName, bool bLock=true)
Definition: svdpntv.cxx:432
virtual void BrkAction()
Definition: svdpntv.cxx:288
void LeaveOneGroup()
Leave an object group of all visible Pages (like chdir .. in MS-DOS)
Definition: svdpntv.cxx:875
void LeaveAllGroup()
Leave all entered object groups of all visible Pages (like chdir \ in MS-DOS)
Definition: svdpntv.cxx:883
bool IsBufferedOverlayAllowed() const
Definition: svdpntv.cxx:1170
SdrPaintWindow * FindPaintWindow(const OutputDevice &rOut) const
Definition: svdpntv.cxx:55
void TheresNewMapMode()
Definition: svdpntv.cxx:331
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
Definition: svdpntv.cxx:75
bool IsBufferedOutputAllowed() const
Definition: svdpntv.cxx:1157
static vcl::Region OptimizeDrawLayersRegion(const OutputDevice *pOut, const vcl::Region &rReg, bool bDisableIntersect)
Definition: svdpntv.cxx:734
virtual void DoConnect(SdrOle2Obj *pOleObj)
For Plugins Is called by the Paint of the OLE object.
Definition: svdpntv.cxx:1069
void SetApplicationDocumentColor(Color aDocumentColor)
Definition: svdpntv.cxx:1149
void SetAttributes(const SfxItemSet &rSet, bool bReplaceAll)
Definition: svdpntv.cxx:998
bool mbPagePaintingAllowed
Definition: svdpntv.hxx:181
void VisAreaChanged()
Definition: svdpntv.cxx:1126
virtual void CompleteRedraw(OutputDevice *pOut, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
Definition: svdpntv.cxx:479
virtual SdrPaintWindow * BeginCompleteRedraw(OutputDevice *pOut)
Definition: svdpntv.cxx:581
void InvalidateAllWin()
Definition: svdpntv.cxx:822
SfxStyleSheet * GetStyleSheet() const
Definition: svdpntv.cxx:1003
sal_uInt16 ImpGetMinMovLogic(short nMinMov, const OutputDevice *pOut) const
Definition: svdpntv.cxx:303
void UpdateDrawLayersRegion(const OutputDevice *pOut, const vcl::Region &rReg)
Definition: svdpntv.cxx:716
SdrAnimationMode meAnimationMode
Definition: svdpntv.hxx:144
virtual void BckAction()
Definition: svdpntv.cxx:284
OutputDevice * GetFirstOutputDevice() const
Definition: svdpntv.cxx:91
friend class SdrPageView
Definition: svdpntv.hxx:117
svtools::ColorConfig maColorConfig
Definition: svdpntv.hxx:209
sal_uInt16 mnHitTolPix
Definition: svdpntv.hxx:146
bool IsLayerVisible(const OUString &rName) const
Definition: svdpntv.cxx:422
void SetAnimationTimer(sal_uInt32 nTime)
Definition: svdpntv.cxx:1193
void SetApplicationBackgroundColor(Color aBackgroundColor)
Definition: svdpntv.cxx:1140
virtual void ClearPageView()
Definition: svdpntv.cxx:346
virtual void EndAction()
Definition: svdpntv.cxx:280
SfxItemSet maDefaultAttr
Definition: svdpntv.hxx:141
bool IsLayerPrintable(const OUString &rName) const
Definition: svdpntv.cxx:458
std::unique_ptr< SdrPageView > mpPageView
Definition: svdpntv.hxx:123
void SetBufferedOverlayAllowed(bool bNew)
Definition: svdpntv.cxx:1175
void DoCompleteRedraw(SdrPaintWindow &rPaintWindow, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
Definition: svdpntv.cxx:603
bool mbBufferedOverlayAllowed
Definition: svdpntv.hxx:178
sal_uInt16 mnMinMovPix
Definition: svdpntv.hxx:147
void SetAnimationEnabled(bool bEnable=true)
Definition: svdpntv.cxx:1073
void MergeNotPersistDefaultAttr(SfxItemSet &rAttr) const
Definition: svdpntv.cxx:922
virtual SdrPageView * ShowSdrPage(SdrPage *pPage)
Definition: svdpntv.cxx:357
OUString maMeasureLayer
Definition: svdpntv.hxx:130
virtual void TakeActionRect(tools::Rectangle &rRect) const
Definition: svdpntv.cxx:292
void SetLayerPrintable(const OUString &rName, bool bPrn)
Definition: svdpntv.cxx:450
void EndDrawLayers(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:704
virtual bool IsAction() const
Definition: svdpntv.cxx:271
virtual void MakeVisible(const tools::Rectangle &rRect, vcl::Window &rWin)
Definition: svdpntv.cxx:1013
void ImpFormLayerDrawing(SdrPaintWindow &rPaintWindow)
Definition: svdpntv.cxx:762
virtual bool IsTextEdit() const
Definition: svdpntv.cxx:298
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr) const
Definition: svdpntv.cxx:983
bool mbPaintTextEdit
Definition: svdpntv.hxx:191
virtual ~SdrPaintView() override
Definition: svdpntv.cxx:182
void ConfigurationChanged(::utl::ConfigurationBroadcaster *, ConfigurationHints) override
Definition: svdpntv.cxx:232
Color maGridColor
Definition: svdpntv.hxx:210
sal_uInt16 ImpGetHitTolLogic(short nHitTol, const OutputDevice *pOut) const
Definition: svdpntv.cxx:317
void SetDefaultStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr)
Definition: svdpntv.cxx:963
VclPtr< OutputDevice > mpActualOutDev
Definition: svdpntv.hxx:125
bool mbSomeObjChgdFlag
Definition: svdpntv.hxx:163
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:863
virtual bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin)
Definition: svdpntv.cxx:784
sal_uInt32 PaintWindowCount() const
Definition: svdpntv.hxx:218
void SetNotPersistDefaultAttr(const SfxItemSet &rAttr)
Definition: svdpntv.cxx:901
bool IsLayerLocked(const OUString &rName) const
Definition: svdpntv.cxx:440
bool mbAnimationPause
Definition: svdpntv.hxx:169
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdpntv.cxx:195
SfxStyleSheet * mpDefaultStyleSheet
Definition: svdpntv.hxx:127
bool mbBufferedOutputAllowed
Definition: svdpntv.hxx:173
void SetActualWin(const OutputDevice *pWin)
Definition: svdpntv.cxx:339
void SetPagePaintingAllowed(bool bNew)
Definition: svdpntv.cxx:1184
virtual void HideSdrPage()
Definition: svdpntv.cxx:377
OUString maActualLayer
Definition: svdpntv.hxx:129
void DeletePaintWindow(const SdrPaintWindow &rOld)
Definition: svdpntv.cxx:80
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:934
SdrPaintView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: svdpntv.cxx:131
void onChangeColorConfig()
Definition: svdpntv.cxx:1133
Idle maComeBackIdle
Definition: svdpntv.hxx:142
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:300
virtual void EndCompleteRedraw(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:613
void SetAnimationPause(bool bSet)
Set/unset pause state for animations.
Definition: svdpntv.cxx:1078
SdrModel & GetModel() const
Definition: svdpntv.hxx:259
void SetStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr)
Definition: svdpntv.cxx:1008
void SetAnimationMode(const SdrAnimationMode eMode)
Mode when starting an animation in the Paint Handler:
Definition: svdpntv.cxx:1101
void FlushComeBackTimer() const
Definition: svdpntv.cxx:246
virtual void ModelHasChanged()
Definition: svdpntv.cxx:255
void SetBufferedOutputAllowed(bool bNew)
Definition: svdpntv.cxx:1162
void GlueInvalidate() const
Definition: svdpntv.cxx:789
void SetLayerVisible(const OUString &rName, bool bShow)
Definition: svdpntv.cxx:412
void PrePaint()
Definition: svdpntv.cxx:468
SdrPaintWindow * BeginDrawLayers(OutputDevice *pOut, const vcl::Region &rReg, bool bDisableIntersect=false)
Definition: svdpntv.cxx:679
std::vector< std::unique_ptr< SdrPaintWindow > > maPaintWindows
Definition: svdpntv.hxx:135
const vcl::Region & GetRedrawRegion() const
void DrawOverlay(const vcl::Region &rRegion)
void setTemporaryTarget(bool bNew)
OutputDevice & GetTargetOutputDevice()
OutputDevice & GetOutputDevice() const
bool OutputToWindow() const
void SetRedrawRegion(const vcl::Region &rNew)
SdrPaintWindow * getPatched() const
void OutputPreRenderDevice(const vcl::Region &rExpandedRegion)
bool getTemporaryTarget() const
void PreparePreRenderDevice()
SdrView * NextView()
Definition: svdviter.cxx:159
SdrView * FirstView()
Definition: svdviter.cxx:153
void Broadcast(const SfxHint &rHint)
SfxHintId GetId() const
const SfxPoolItem * GetCurItem() const
const SfxPoolItem * NextItem()
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
bool Set(const SfxItemSet &, bool bDeep=true)
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
virtual SfxItemSet & GetItemSet()
sal_uInt16 FirstWhich()
SfxItemState GetItemState(bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
sal_uInt16 NextWhich()
bool IsEmpty() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
void SetPriority(TaskPriority ePriority)
void Stop()
void SetInvokeHandler(const Link< Timer *, void > &rLink)
B2DVector getRange() const
B2DPoint getMinimum() const
SAL_DLLPRIVATE bool IsPaused() const
Definition: scheduler.hxx:90
SAL_DLLPRIVATE void SetTime(sal_uInt32 nTime)
Definition: scheduler.cxx:119
SAL_DLLPRIVATE void SetPaused(bool bNew)
Definition: scheduler.cxx:162
sdr::animation::primitiveAnimator & getPrimitiveAnimator()
ColorConfigValue GetColorValue(ColorConfigEntry eEntry, bool bSmart=true) const
bool Overlaps(const tools::Rectangle &rRect) const
constexpr tools::Long Top() const
constexpr Size GetSize() const
constexpr tools::Long Right() const
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
static sal_uInt64 GetSystemTicks()
void Intersect(const tools::Rectangle &rRegion)
bool IsEmpty() const
void PaintImmediately()
virtual bool IsChart() const
void SetMapMode()
const MapMode & GetMapMode() const
::OutputDevice const * GetOutDev() const
virtual void Scroll(tools::Long nHorzScroll, tools::Long nVertScroll, ScrollFlags nFlags=ScrollFlags::NONE)
vcl::Region GetPaintRegion() const
virtual void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
bool IsInPaint() const
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
float u
constexpr sal_uInt16 EE_FEATURE_END(EE_FEATURE_FIELD+0)
constexpr sal_uInt16 EE_FEATURE_START(EE_CHAR_END+1)
SfxHintId
sal_Int32 nIndex
Mode eMode
void * p
uno_Any a
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
BitmapEx convertPrimitive2DContainerToBitmapEx(primitive2d::Primitive2DContainer &&rSequence, const basegfx::B2DRange &rTargetRange, sal_uInt32 nMaximumQuadraticPixels, const o3tl::Length eTargetUnit, const std::optional< Size > &rTargetDPI)
long Long
HashMap_OWString_Interface aMap
ConfigurationHints
OUTDEV_WINDOW
bool IsInvalidItem(const SfxPoolItem *pItem)
static SfxItemSet & rSet
constexpr TypedWhichId< SdrLayerNameItem > SDRATTR_LAYERNAME(SDRATTR_NOTPERSIST_FIRST+4)
constexpr TypedWhichId< SdrLayerIdItem > SDRATTR_LAYERID(SDRATTR_NOTPERSIST_FIRST+3)
SdrHintKind
Definition: svdmodel.hxx:103
IMPL_LINK_NOARG(SdrPaintView, ImpComeBackHdl, Timer *, void)
Definition: svdpntv.cxx:238
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
SdrAnimationMode
Definition: svdpntv.hxx:60
constexpr SdrLayerID SDRLAYER_NOTFOUND(-1)
oslFileHandle & pOut