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 : 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);
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 {
217 }
218 }
219
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
239IMPL_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
277void 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
304sal_uInt16 SdrPaintView::ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const
305{
306 if (nMinMov>=0) return sal_uInt16(nMinMov);
307 if (pOut==nullptr)
308 {
310 }
311 if (pOut!=nullptr) {
312 return short(-pOut->PixelToLogic(Size(nMinMov,0)).Width());
313 } else {
314 return 0;
315 }
316}
317
318sal_uInt16 SdrPaintView::ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const
319{
320 if (nHitTol>=0) return sal_uInt16(nHitTol);
321 if (pOut==nullptr)
322 {
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 if (SdrView *pView = dynamic_cast<SdrView*>(this))
369 {
370 mpPageView.reset(new SdrPageView(pPage, *pView));
371 mpPageView->Show();
372 }
373 }
374
375 return mpPageView.get();
376}
377
379{
380 if(mpPageView)
381 {
382 mpPageView->Hide();
383 mpPageView.reset();
384 }
385}
386
388{
389 DBG_ASSERT(pNewWin, "SdrPaintView::AddWindowToPaintView: No OutputDevice(!)");
390 SdrPaintWindow* pNewPaintWindow = new SdrPaintWindow(*this, *pNewWin, pWindow);
391 maPaintWindows.emplace_back(pNewPaintWindow);
392
393 if(mpPageView)
394 {
395 mpPageView->AddPaintWindowToPageView(*pNewPaintWindow);
396 }
397}
398
400{
401 assert(pOldWin && "SdrPaintView::DeleteWindowFromPaintView: No OutputDevice(!)");
402 SdrPaintWindow* pCandidate = FindPaintWindow(*pOldWin);
403
404 if(pCandidate)
405 {
406 if(mpPageView)
407 {
408 mpPageView->RemovePaintWindowFromPageView(*pCandidate);
409 }
410
411 DeletePaintWindow(*pCandidate);
412 }
413}
414
415void SdrPaintView::SetLayerVisible(const OUString& rName, bool bShow)
416{
417 if(mpPageView)
418 {
419 mpPageView->SetLayerVisible(rName, bShow);
420 }
421
423}
424
425bool SdrPaintView::IsLayerVisible(const OUString& rName) const
426{
427 if(mpPageView)
428 {
429 return mpPageView->IsLayerVisible(rName);
430 }
431
432 return false;
433}
434
435void SdrPaintView::SetLayerLocked(const OUString& rName, bool bLock)
436{
437 if(mpPageView)
438 {
439 mpPageView->SetLayerLocked(rName,bLock);
440 }
441}
442
443bool SdrPaintView::IsLayerLocked(const OUString& rName) const
444{
445 if(mpPageView)
446 {
447 return mpPageView->IsLayerLocked(rName);
448 }
449
450 return false;
451}
452
453void SdrPaintView::SetLayerPrintable(const OUString& rName, bool bPrn)
454{
455 if(mpPageView)
456 {
457 mpPageView->SetLayerPrintable(rName,bPrn);
458 }
459}
460
461bool SdrPaintView::IsLayerPrintable(const OUString& rName) const
462{
463 if(mpPageView)
464 {
465 return mpPageView->IsLayerPrintable(rName);
466 }
467
468 return false;
469}
470
472{
473 if(mpPageView)
474 {
475 mpPageView->PrePaint();
476 }
477}
478
479
480// #define SVX_REPAINT_TIMER_TEST
481
483{
484#ifdef SVX_REPAINT_TIMER_TEST
485#define REMEMBERED_TIMES_COUNT (10)
486 static bool bDoTimerTest(false);
487 static bool bTimesInited(false);
488 static sal_uInt32 nRepeatCount(10);
489 static double fLastTimes[REMEMBERED_TIMES_COUNT];
490 const sal_uInt64 nStartTime(tools::Time::GetSystemTicks());
491 sal_uInt32 count(1);
492 sal_uInt32 a;
493
494 if(bDoTimerTest)
495 {
496 count = nRepeatCount;
497 }
498
499 for(a = 0; a < count; a++)
500 {
501#endif // SVX_REPAINT_TIMER_TEST
502
503 // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
504 // rReg may be made more granular (fine) with using it. Normally, rReg
505 // does come from Window::Paint() anyways and thus is based on a single
506 // rectangle which was derived from exactly that repaint region
507 vcl::Region aOptimizedRepaintRegion(rReg);
508
509 if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType())
510 {
511 vcl::Window* pWindow = pOut->GetOwnerWindow();
512
513 if(pWindow->IsInPaint())
514 {
515 if(!pWindow->GetPaintRegion().IsEmpty())
516 {
517 aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
518 }
519 }
520 }
521
522 SdrPaintWindow* pPaintWindow = BeginCompleteRedraw(pOut);
523 OSL_ENSURE(pPaintWindow, "SdrPaintView::CompleteRedraw: No OutDev (!)");
524
525 DoCompleteRedraw(*pPaintWindow, aOptimizedRepaintRegion, pRedirector);
526 EndCompleteRedraw(*pPaintWindow, true);
527
528#ifdef SVX_REPAINT_TIMER_TEST
529 }
530
531 if(bDoTimerTest)
532 {
533 const sal_uInt64 nStopTime(tools::Time::GetSystemTicks());
534 const sal_uInt64 nNeededTime(nStopTime - nStartTime);
535 const double fTimePerPaint((double)nNeededTime / (double)nRepeatCount);
536
537 if(!bTimesInited)
538 {
539 for(a = 0; a < REMEMBERED_TIMES_COUNT; a++)
540 {
541 fLastTimes[a] = fTimePerPaint;
542 }
543
544 bTimesInited = true;
545 }
546 else
547 {
548 for(a = 1; a < REMEMBERED_TIMES_COUNT; a++)
549 {
550 fLastTimes[a - 1] = fLastTimes[a];
551 }
552
553 fLastTimes[REMEMBERED_TIMES_COUNT - 1] = fTimePerPaint;
554 }
555
556 double fAddedTimes(0.0);
557
558 for(a = 0; a < REMEMBERED_TIMES_COUNT; a++)
559 {
560 fAddedTimes += fLastTimes[a];
561 }
562
563 const double fAverageTimePerPaint(fAddedTimes / (double)REMEMBERED_TIMES_COUNT);
564
565 fprintf(stderr, "-----------(start result)----------\n");
566 fprintf(stderr, "StartTime : %" SAL_PRIuUINT64 ", StopTime: %" SAL_PRIuUINT64 ", NeededTime: %" SAL_PRIuUINT64 ", TimePerPaint: %f\n", nStartTime, nStopTime, nNeededTime, fTimePerPaint);
567 fprintf(stderr, "Remembered times: ");
568
569 for(a = 0; a < REMEMBERED_TIMES_COUNT; a++)
570 {
571 fprintf(stderr, "%d: %f ", a, fLastTimes[a]);
572 }
573
574 fprintf(stderr, "\n");
575 fprintf(stderr, "AverageTimePerPaint: %f\n", fAverageTimePerPaint);
576 fprintf(stderr, "-----------(stop result)----------\n");
577 }
578#endif // SVX_REPAINT_TIMER_TEST
579}
580
581
582// #i72889#
583
585{
586 OSL_ENSURE(pOut, "SdrPaintView::BeginCompleteRedraw: No OutDev (!)");
587 SdrPaintWindow* pPaintWindow = FindPaintWindow(*pOut);
588
589 if(pPaintWindow)
590 {
591 // draw preprocessing, only for known devices
592 // prepare PreRendering
593 pPaintWindow->PreparePreRenderDevice();
594 }
595 else
596 {
597 // None of the known OutputDevices is the target of this paint, use
598 // a temporary SdrPaintWindow for this Redraw.
599 pPaintWindow = new SdrPaintWindow(*this, *pOut);
600 pPaintWindow->setTemporaryTarget(true);
601 }
602
603 return pPaintWindow;
604}
605
607{
608 // redraw all PageViews with the target. This may expand the RedrawRegion
609 // at the PaintWindow, plus taking care of FormLayer expansion
610 if(mpPageView)
611 {
612 mpPageView->CompleteRedraw(rPaintWindow, rReg, pRedirector);
613 }
614}
615
616void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
617{
618 std::unique_ptr<SdrPaintWindow> pPaintWindow;
620 {
621 // Tiled rendering, we must paint the TextEdit to the output device.
622 pPaintWindow.reset(&rPaintWindow);
623 pPaintWindow->setTemporaryTarget(false);
624 }
625
626 if(rPaintWindow.getTemporaryTarget())
627 {
628 // get rid of temp target again
629 delete &rPaintWindow;
630 }
631 else
632 {
633 // draw postprocessing, only for known devices
634 // it is necessary to always paint FormLayer
635 if(bPaintFormLayer)
636 {
637 ImpFormLayerDrawing(rPaintWindow);
638 }
639
640 // look for active TextEdit. As long as this cannot be painted to a VDev,
641 // it cannot get part of buffering. In that case, output evtl. prerender
642 // early and paint text edit to window.
643 if(IsTextEdit() && GetSdrPageView())
644 {
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.
652 if (SdrPageView* pPageView = GetSdrPageView())
653 {
654 SdrViewIter aIter(pPageView->GetPage());
655 for (SdrView* pView = aIter.FirstView(); pView; pView = aIter.NextView())
656 {
657 if (pView == this)
658 continue;
659
660 if (pView->IsTextEdit() && pView->GetSdrPageView())
661 {
662 pView->TextEditDrawing(rPaintWindow);
663 }
664 }
665 }
666 }
667
668 // draw Overlay, also to PreRender device if exists
669 rPaintWindow.DrawOverlay(rPaintWindow.GetRedrawRegion());
670
671 // output PreRendering
672 rPaintWindow.OutputPreRenderDevice(rPaintWindow.GetRedrawRegion());
673 }
674}
675
676
677SdrPaintWindow* SdrPaintView::BeginDrawLayers(OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect)
678{
679 // #i74769# use BeginCompleteRedraw() as common base
680 SdrPaintWindow* pPaintWindow = BeginCompleteRedraw(pOut);
681 OSL_ENSURE(pPaintWindow, "SdrPaintView::BeginDrawLayers: No SdrPaintWindow (!)");
682
683 if(mpPageView)
684 {
685 SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(*pPaintWindow);
686
687 if(pKnownTarget)
688 {
689 vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, bDisableIntersect );
690
691 // prepare redraw
692 pKnownTarget->PrepareRedraw(aOptimizedRepaintRegion);
693
694 // remember prepared SdrPageWindow
695 mpPageView->setPreparedPageWindow(pKnownTarget);
696 }
697 }
698
699 return pPaintWindow;
700}
701
702void SdrPaintView::EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer)
703{
704 // #i74769# use EndCompleteRedraw() as common base
705 EndCompleteRedraw(rPaintWindow, bPaintFormLayer);
706
707 if(mpPageView)
708 {
709 // forget prepared SdrPageWindow
710 mpPageView->setPreparedPageWindow(nullptr);
711 }
712}
713
715{
716 SdrPaintWindow* pPaintWindow = FindPaintWindow(*pOut);
717 OSL_ENSURE(pPaintWindow, "SdrPaintView::UpdateDrawLayersRegion: No SdrPaintWindow (!)");
718
719 if(mpPageView)
720 {
721 SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(*pPaintWindow);
722
723 if(pKnownTarget)
724 {
725 vcl::Region aOptimizedRepaintRegion = OptimizeDrawLayersRegion( pOut, rReg, false/*bDisableIntersect*/ );
726 pKnownTarget->GetPaintWindow().SetRedrawRegion(aOptimizedRepaintRegion);
727 mpPageView->setPreparedPageWindow(pKnownTarget); // already set actually
728 }
729 }
730}
731
732vcl::Region SdrPaintView::OptimizeDrawLayersRegion(const OutputDevice* pOut, const vcl::Region& rReg, bool bDisableIntersect)
733{
734 // #i74769# check if pOut is a win and has a ClipRegion. If Yes, the Region
735 // rReg may be made more granular (fine) with using it. Normally, rReg
736 // does come from Window::Paint() anyways and thus is based on a single
737 // rectangle which was derived from exactly that repaint region
738 vcl::Region aOptimizedRepaintRegion(rReg);
739
740 // #i76114# Intersecting the region with the Window's paint region is disabled
741 // for print preview in Calc, because the intersection can be empty (if the paint
742 // region is outside of the table area of the page), and then no clip region
743 // would be set.
744 if(pOut && OUTDEV_WINDOW == pOut->GetOutDevType() && !bDisableIntersect)
745 {
746 vcl::Window* pWindow = pOut->GetOwnerWindow();
747
748 if(pWindow->IsInPaint())
749 {
750 if(!pWindow->GetPaintRegion().IsEmpty())
751 {
752 aOptimizedRepaintRegion.Intersect(pWindow->GetPaintRegion());
753 }
754 }
755 }
756 return aOptimizedRepaintRegion;
757}
758
759
761{
762 if(!mpPageView)
763 return;
764
765 SdrPageWindow* pKnownTarget = mpPageView->FindPageWindow(rPaintWindow);
766
767 if(pKnownTarget)
768 {
769 const SdrModel& rModel = *(GetModel());
770 const SdrLayerAdmin& rLayerAdmin = rModel.GetLayerAdmin();
771 const SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID(rLayerAdmin.GetControlLayerName());
772
773 // BUFFERED use GetTargetOutputDevice() now, it may be targeted to VDevs, too
774 // need to set PreparedPageWindow to make DrawLayer use the correct ObjectContact
775 mpPageView->setPreparedPageWindow(pKnownTarget);
776 mpPageView->DrawLayer(nControlLayerId, &rPaintWindow.GetTargetOutputDevice());
777 mpPageView->setPreparedPageWindow(nullptr);
778 }
779}
780
781
782bool SdrPaintView::KeyInput(const KeyEvent& /*rKEvt*/, vcl::Window* /*pWin*/)
783{
784 return false;
785}
786
788{
789 // Do not invalidate GluePoints in Online
790 // They are handled on front-end
792 return;
793
794 const sal_uInt32 nWindowCount(PaintWindowCount());
795
796 for(sal_uInt32 nWinNum(0); nWinNum < nWindowCount; nWinNum++)
797 {
798 SdrPaintWindow* pPaintWindow = GetPaintWindow(nWinNum);
799
800 if(pPaintWindow->OutputToWindow())
801 {
802 OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
803
804 if(mpPageView)
805 {
806 const SdrObjList* pOL=mpPageView->GetObjList();
807 const size_t nObjCount = pOL->GetObjCount();
808 for (size_t nObjNum=0; nObjNum<nObjCount; ++nObjNum) {
809 const SdrObject* pObj=pOL->GetObj(nObjNum);
810 const SdrGluePointList* pGPL=pObj->GetGluePointList();
811 if (pGPL!=nullptr && pGPL->GetCount()!=0) {
812 pGPL->Invalidate(*rOutDev.GetOwnerWindow(), pObj);
813 }
814 }
815 }
816 }
817 }
818}
819
821{
822 const sal_uInt32 nWindowCount(PaintWindowCount());
823
824 for(sal_uInt32 a(0); a < nWindowCount; a++)
825 {
826 SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
827
828 if(pPaintWindow->OutputToWindow())
829 {
830 InvalidateOneWin(pPaintWindow->GetOutputDevice());
831 }
832 }
833}
834
836{
837 const sal_uInt32 nWindowCount(PaintWindowCount());
838
839 for(sal_uInt32 a(0); a < nWindowCount; a++)
840 {
841 SdrPaintWindow* pPaintWindow = GetPaintWindow(a);
842
843 if(pPaintWindow->OutputToWindow())
844 {
845 OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
846 tools::Rectangle aRect(rRect);
847
848 Point aOrg(rOutDev.GetMapMode().GetOrigin());
849 aOrg.setX(-aOrg.X() ); aOrg.setY(-aOrg.Y() );
850 tools::Rectangle aOutRect(aOrg, rOutDev.GetOutputSize());
851
852 // In case of tiled rendering we want to get all invalidations, so visual area is not interesting.
853 if (aRect.Overlaps(aOutRect) || comphelper::LibreOfficeKit::isActive())
854 {
855 InvalidateOneWin(rOutDev, aRect);
856 }
857 }
858 }
859}
860
862{
863 // do not erase background, that causes flicker (!)
864 rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase);
865}
866
868{
869 // do not erase background, that causes flicker (!)
870 rDevice.GetOwnerWindow()->Invalidate(rRect, InvalidateFlags::NoErase);
871}
872
874{
875 if(mpPageView)
876 {
877 mpPageView->LeaveOneGroup();
878 }
879}
880
882{
883 if(mpPageView)
884 {
885 mpPageView->LeaveAllGroup();
886 }
887}
888
890{
891 if(mpPageView)
892 {
893 return (mpPageView->GetEnteredLevel() != 0);
894 }
895
896 return false;
897}
898
900{
901 // bReplaceAll has no effect here at all.
902 bool bMeasure= dynamic_cast<const SdrView*>(this) != nullptr && static_cast<SdrView*>(this)->IsMeasureTool();
903
904 if (const SdrLayerIdItem *pPoolItem = rAttr.GetItemIfSet(SDRATTR_LAYERID))
905 {
906 SdrLayerID nLayerId = pPoolItem->GetValue();
907 const SdrLayer* pLayer=mpModel->GetLayerAdmin().GetLayerPerID(nLayerId);
908 if (pLayer!=nullptr) {
909 if (bMeasure) maMeasureLayer=pLayer->GetName();
910 else maActualLayer=pLayer->GetName();
911 }
912 }
913 if (const SdrLayerNameItem *pPoolItem = rAttr.GetItemIfSet(SDRATTR_LAYERNAME))
914 {
915 if (bMeasure) maMeasureLayer = pPoolItem->GetValue();
916 else maActualLayer = pPoolItem->GetValue();
917 }
918}
919
921{
922 // bOnlyHardAttr has no effect here at all.
923 bool bMeasure= dynamic_cast<const SdrView*>(this) != nullptr && static_cast<const SdrView*>(this)->IsMeasureTool();
924 const OUString& aNam = bMeasure ? maMeasureLayer : maActualLayer;
925 rAttr.Put(SdrLayerNameItem(aNam));
927 if (nLayer!=SDRLAYER_NOTFOUND) {
928 rAttr.Put(SdrLayerIdItem(nLayer));
929 }
930}
931
932void SdrPaintView::SetDefaultAttr(const SfxItemSet& rAttr, bool bReplaceAll)
933{
934#ifdef DBG_UTIL
935 {
936 bool bHasEEFeatureItems=false;
937 SfxItemIter aIter(rAttr);
938 for (const SfxPoolItem* pItem = aIter.GetCurItem(); !bHasEEFeatureItems && pItem;
939 pItem = aIter.NextItem())
940 {
941 if (!IsInvalidItem(pItem)) {
942 sal_uInt16 nW=pItem->Which();
943 if (nW>=EE_FEATURE_START && nW<=EE_FEATURE_END) bHasEEFeatureItems=true;
944 }
945 }
946
947 if(bHasEEFeatureItems)
948 {
949 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
950 VclMessageType::Info, VclButtonsType::Ok,
951 "SdrPaintView::SetDefaultAttr(): Setting EE_FEATURE items at the SdrView does not make sense! It only leads to overhead and unreadable documents."));
952 xInfoBox->run();
953 }
954 }
955#endif
956 if (bReplaceAll) maDefaultAttr.Set(rAttr);
957 else maDefaultAttr.Put(rAttr,false); // if FALSE, regard InvalidItems as "holes," not as Default
959}
960
961void SdrPaintView::SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
962{
965 mpDefaultStyleSheet=pStyleSheet;
968
969 if (pStyleSheet!=nullptr && !bDontRemoveHardAttr) {
970 SfxWhichIter aIter(pStyleSheet->GetItemSet());
971 sal_uInt16 nWhich=aIter.FirstWhich();
972 while (nWhich!=0) {
973 if (aIter.GetItemState()==SfxItemState::SET) {
974 maDefaultAttr.ClearItem(nWhich);
975 }
976 nWhich=aIter.NextWhich();
977 }
978 }
979}
980
981void SdrPaintView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const
982{
983 if(bOnlyHardAttr || !mpDefaultStyleSheet)
984 {
985 rTargetSet.Put(maDefaultAttr, false);
986 }
987 else
988 {
989 // else merge with DefStyleSheet
990 rTargetSet.Put(mpDefaultStyleSheet->GetItemSet(), false);
991 rTargetSet.Put(maDefaultAttr, false);
992 }
993 MergeNotPersistDefaultAttr(rTargetSet);
994}
995
996void SdrPaintView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
997{
998 SetDefaultAttr(rSet,bReplaceAll);
999}
1000
1002{
1003 return mpDefaultStyleSheet;
1004}
1005
1006void SdrPaintView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr)
1007{
1008 SetDefaultStyleSheet(pStyleSheet,bDontRemoveHardAttr);
1009}
1010
1012{
1013 // TODO: handle when the text cursor goes out of the chart area
1014 // However this hack avoids that the cursor gets misplaced wrt the text.
1016 {
1017 return;
1018 }
1019
1020 MapMode aMap(rWin.GetMapMode());
1021 Size aActualSize(rWin.GetOutDev()->GetOutputSize());
1022
1023 if( aActualSize.IsEmpty() )
1024 return;
1025
1026 Size aNewSize(rRect.GetSize());
1027 bool bNewScale=false;
1028 bool bNeedMoreX=aNewSize.Width()>aActualSize.Width();
1029 bool bNeedMoreY=aNewSize.Height()>aActualSize.Height();
1030 if (bNeedMoreX || bNeedMoreY)
1031 {
1032 bNewScale=true;
1033 // set new MapMode (Size+Org) and invalidate everything
1034 Fraction aXFact(aNewSize.Width(),aActualSize.Width());
1035 Fraction aYFact(aNewSize.Height(),aActualSize.Height());
1036 if (aYFact>aXFact) aXFact=aYFact;
1037 aXFact*=aMap.GetScaleX();
1038 aXFact.ReduceInaccurate(10); // to avoid runovers and BigInt mapping
1039 aMap.SetScaleX(aXFact);
1040 aMap.SetScaleY(aYFact);
1041 rWin.SetMapMode(aMap);
1042 aActualSize=rWin.GetOutDev()->GetOutputSize();
1043 }
1044 Point aOrg(aMap.GetOrigin());
1045 tools::Long dx=0,dy=0;
1046 tools::Long l=-aOrg.X();
1047 tools::Long r=-aOrg.X()+aActualSize.Width()-1;
1048 tools::Long o=-aOrg.Y();
1049 tools::Long u=-aOrg.Y()+aActualSize.Height()-1;
1050 if (l>rRect.Left()) dx=rRect.Left()-l;
1051 else if (r<rRect.Right()) dx=rRect.Right()-r;
1052 if (o>rRect.Top()) dy=rRect.Top()-o;
1053 else if (u<rRect.Bottom()) dy=rRect.Bottom()-u;
1054 aMap.SetOrigin(Point(aOrg.X()-dx,aOrg.Y()-dy));
1055 if (!bNewScale) {
1056 if (dx!=0 || dy!=0) {
1057 rWin.Scroll(-dx,-dy);
1058 rWin.SetMapMode(aMap);
1059 rWin.PaintImmediately();
1060 }
1061 } else {
1062 rWin.SetMapMode(aMap);
1063 InvalidateOneWin(*rWin.GetOutDev());
1064 }
1065}
1066
1068{
1069}
1070
1072{
1074}
1075
1077{
1078 if(mbAnimationPause == bSet)
1079 return;
1080
1081 mbAnimationPause = bSet;
1082
1083 if(!mpPageView)
1084 return;
1085
1086 for(sal_uInt32 b(0); b < mpPageView->PageWindowCount(); b++)
1087 {
1088 SdrPageWindow& rPageWindow = *(mpPageView->GetPageWindow(b));
1089 sdr::contact::ObjectContact& rObjectContact = rPageWindow.GetObjectContact();
1090 sdr::animation::primitiveAnimator& rAnimator = rObjectContact.getPrimitiveAnimator();
1091
1092 if(rAnimator.IsPaused() != bSet)
1093 {
1094 rAnimator.SetPaused(bSet);
1095 }
1096 }
1097}
1098
1100{
1102}
1103
1105{
1106 if(!mpPageView)
1107 return;
1108
1109 if (pOut)
1110 {
1111 SdrPageWindow* pWindow = mpPageView->FindPageWindow(*const_cast<OutputDevice*>(pOut));
1112
1113 if(pWindow)
1114 {
1116 }
1117 }
1118 else
1119 {
1121 }
1122}
1123
1125{
1126 // notify SfxListener
1128}
1129
1130
1132{
1134}
1135
1136
1137// Set background color for svx at SdrPageViews
1139{
1140 if(mpPageView)
1141 {
1142 mpPageView->SetApplicationBackgroundColor(aBackgroundColor);
1143 }
1144}
1145
1146// Set document color for svx at SdrPageViews
1148{
1149 if(mpPageView)
1150 {
1151 mpPageView->SetApplicationDocumentColor(aDocumentColor);
1152 }
1153}
1154
1156{
1158}
1159
1161{
1162 if(bNew != mbBufferedOutputAllowed)
1163 {
1165 }
1166}
1167
1169{
1171}
1172
1174{
1175 if(bNew != mbBufferedOverlayAllowed)
1176 {
1178 }
1179}
1180
1181
1183{
1184 if(bNew != mbPagePaintingAllowed)
1185 {
1186 mbPagePaintingAllowed = bNew;
1187 }
1188}
1189
1190// #i38135# Sets the timer for Object animations and restarts.
1192{
1193 if(mpPageView)
1194 {
1195 // first, reset all timers at all windows to 0L
1196 for(sal_uInt32 a(0); a < mpPageView->PageWindowCount(); a++)
1197 {
1198 SdrPageWindow& rPageWindow = *mpPageView->GetPageWindow(a);
1199 sdr::contact::ObjectContact& rObjectContact = rPageWindow.GetObjectContact();
1200 sdr::animation::primitiveAnimator& rAnimator = rObjectContact.getPrimitiveAnimator();
1201 rAnimator.SetTime(nTime);
1202 }
1203 }
1204}
1205
1206/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, bool bMobile=false)
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:331
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:130
SdrHintKind GetKind() const
Definition: svdmodel.hxx:132
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:230
const OUString & GetName() const
Definition: svdlayer.hxx:77
SfxStyleSheet * GetDefaultStyleSheet() const
Definition: svdmodel.hxx:344
const SdrLayerAdmin & GetLayerAdmin() const
Definition: svdmodel.hxx:314
SdrObject * GetObj(size_t nNum) const
Definition: svdpage.cxx:805
size_t GetObjCount() const
Definition: svdpage.cxx:799
Abstract DrawObject.
Definition: svdobj.hxx:261
virtual const SdrGluePointList * GetGluePointList() const
Definition: svdobj.cxx:2315
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:374
bool IsInserted() const
Definition: svdpage.hxx:461
bool IsGroupEntered() const
Determine, whether Leave is useful or not.
Definition: svdpntv.cxx:889
virtual void MovAction(const Point &rPnt)
Definition: svdpntv.cxx:277
sal_uInt16 mnMinMovLog
Definition: svdpntv.hxx:150
sal_uInt16 mnHitTolLog
Definition: svdpntv.hxx:149
void SetLayerLocked(const OUString &rName, bool bLock=true)
Definition: svdpntv.cxx:435
virtual void BrkAction()
Definition: svdpntv.cxx:289
void LeaveOneGroup()
Leave an object group of all visible Pages (like chdir .. in MS-DOS)
Definition: svdpntv.cxx:873
void LeaveAllGroup()
Leave all entered object groups of all visible Pages (like chdir \ in MS-DOS)
Definition: svdpntv.cxx:881
bool IsBufferedOverlayAllowed() const
Definition: svdpntv.cxx:1168
SdrPaintWindow * FindPaintWindow(const OutputDevice &rOut) const
Definition: svdpntv.cxx:55
void TheresNewMapMode()
Definition: svdpntv.cxx:332
SdrPaintWindow * GetPaintWindow(sal_uInt32 nIndex) const
Definition: svdpntv.cxx:75
bool IsBufferedOutputAllowed() const
Definition: svdpntv.cxx:1155
static vcl::Region OptimizeDrawLayersRegion(const OutputDevice *pOut, const vcl::Region &rReg, bool bDisableIntersect)
Definition: svdpntv.cxx:732
virtual void DoConnect(SdrOle2Obj *pOleObj)
For Plugins Is called by the Paint of the OLE object.
Definition: svdpntv.cxx:1067
void SetApplicationDocumentColor(Color aDocumentColor)
Definition: svdpntv.cxx:1147
void SetAttributes(const SfxItemSet &rSet, bool bReplaceAll)
Definition: svdpntv.cxx:996
bool mbPagePaintingAllowed
Definition: svdpntv.hxx:182
void VisAreaChanged()
Definition: svdpntv.cxx:1124
virtual void CompleteRedraw(OutputDevice *pOut, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
Definition: svdpntv.cxx:482
virtual SdrPaintWindow * BeginCompleteRedraw(OutputDevice *pOut)
Definition: svdpntv.cxx:584
void InvalidateAllWin()
Definition: svdpntv.cxx:820
SfxStyleSheet * GetStyleSheet() const
Definition: svdpntv.cxx:1001
sal_uInt16 ImpGetMinMovLogic(short nMinMov, const OutputDevice *pOut) const
Definition: svdpntv.cxx:304
void UpdateDrawLayersRegion(const OutputDevice *pOut, const vcl::Region &rReg)
Definition: svdpntv.cxx:714
SdrAnimationMode meAnimationMode
Definition: svdpntv.hxx:145
virtual void BckAction()
Definition: svdpntv.cxx:285
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:147
bool IsLayerVisible(const OUString &rName) const
Definition: svdpntv.cxx:425
void SetAnimationTimer(sal_uInt32 nTime)
Definition: svdpntv.cxx:1191
void SetApplicationBackgroundColor(Color aBackgroundColor)
Definition: svdpntv.cxx:1138
virtual void ClearPageView()
Definition: svdpntv.cxx:347
virtual void EndAction()
Definition: svdpntv.cxx:281
SfxItemSet maDefaultAttr
Definition: svdpntv.hxx:142
bool IsLayerPrintable(const OUString &rName) const
Definition: svdpntv.cxx:461
std::unique_ptr< SdrPageView > mpPageView
Definition: svdpntv.hxx:123
void SetBufferedOverlayAllowed(bool bNew)
Definition: svdpntv.cxx:1173
void DoCompleteRedraw(SdrPaintWindow &rPaintWindow, const vcl::Region &rReg, sdr::contact::ViewObjectContactRedirector *pRedirector=nullptr)
Definition: svdpntv.cxx:606
bool mbBufferedOverlayAllowed
Definition: svdpntv.hxx:179
sal_uInt16 mnMinMovPix
Definition: svdpntv.hxx:148
void SetAnimationEnabled(bool bEnable=true)
Definition: svdpntv.cxx:1071
void MergeNotPersistDefaultAttr(SfxItemSet &rAttr) const
Definition: svdpntv.cxx:920
virtual SdrPageView * ShowSdrPage(SdrPage *pPage)
Definition: svdpntv.cxx:358
OUString maMeasureLayer
Definition: svdpntv.hxx:131
virtual void TakeActionRect(tools::Rectangle &rRect) const
Definition: svdpntv.cxx:293
void SetLayerPrintable(const OUString &rName, bool bPrn)
Definition: svdpntv.cxx:453
void EndDrawLayers(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:702
SdrModel * GetModel() const
Definition: svdpntv.hxx:260
virtual bool IsAction() const
Definition: svdpntv.cxx:272
virtual void MakeVisible(const tools::Rectangle &rRect, vcl::Window &rWin)
Definition: svdpntv.cxx:1011
void ImpFormLayerDrawing(SdrPaintWindow &rPaintWindow)
Definition: svdpntv.cxx:760
virtual bool IsTextEdit() const
Definition: svdpntv.cxx:299
void GetAttributes(SfxItemSet &rTargetSet, bool bOnlyHardAttr) const
Definition: svdpntv.cxx:981
virtual ~SdrPaintView() override
Definition: svdpntv.cxx:183
void ConfigurationChanged(::utl::ConfigurationBroadcaster *, ConfigurationHints) override
Definition: svdpntv.cxx:233
Color maGridColor
Definition: svdpntv.hxx:210
virtual void AddWindowToPaintView(OutputDevice *pNewWin, vcl::Window *pWindow)
Definition: svdpntv.cxx:387
sal_uInt16 ImpGetHitTolLogic(short nHitTol, const OutputDevice *pOut) const
Definition: svdpntv.cxx:318
void SetDefaultStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr)
Definition: svdpntv.cxx:961
VclPtr< OutputDevice > mpActualOutDev
Definition: svdpntv.hxx:126
bool mbSomeObjChgdFlag
Definition: svdpntv.hxx:164
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:861
virtual bool KeyInput(const KeyEvent &rKEvt, vcl::Window *pWin)
Definition: svdpntv.cxx:782
sal_uInt32 PaintWindowCount() const
Definition: svdpntv.hxx:218
void SetNotPersistDefaultAttr(const SfxItemSet &rAttr)
Definition: svdpntv.cxx:899
bool IsLayerLocked(const OUString &rName) const
Definition: svdpntv.cxx:443
bool mbAnimationPause
Definition: svdpntv.hxx:170
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
Definition: svdpntv.cxx:196
SfxStyleSheet * mpDefaultStyleSheet
Definition: svdpntv.hxx:128
bool mbBufferedOutputAllowed
Definition: svdpntv.hxx:174
void SetActualWin(const OutputDevice *pWin)
Definition: svdpntv.cxx:340
void SetPagePaintingAllowed(bool bNew)
Definition: svdpntv.cxx:1182
virtual void HideSdrPage()
Definition: svdpntv.cxx:378
OUString maActualLayer
Definition: svdpntv.hxx:130
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:932
SdrPaintView(SdrModel &rSdrModel, OutputDevice *pOut)
Definition: svdpntv.cxx:131
virtual void DeleteWindowFromPaintView(OutputDevice *pOldWin)
Definition: svdpntv.cxx:399
void onChangeColorConfig()
Definition: svdpntv.cxx:1131
Idle maComeBackIdle
Definition: svdpntv.hxx:143
SdrPageView * GetSdrPageView() const
Definition: svdpntv.hxx:299
virtual void EndCompleteRedraw(SdrPaintWindow &rPaintWindow, bool bPaintFormLayer)
Definition: svdpntv.cxx:616
void SetAnimationPause(bool bSet)
Set/unset pause state for animations.
Definition: svdpntv.cxx:1076
void SetStyleSheet(SfxStyleSheet *pStyleSheet, bool bDontRemoveHardAttr)
Definition: svdpntv.cxx:1006
void SetAnimationMode(const SdrAnimationMode eMode)
Mode when starting an animation in the Paint Handler:
Definition: svdpntv.cxx:1099
void FlushComeBackTimer() const
Definition: svdpntv.cxx:247
virtual void ModelHasChanged()
Definition: svdpntv.cxx:256
SdrModel * mpModel
Definition: svdpntv.hxx:125
void SetBufferedOutputAllowed(bool bNew)
Definition: svdpntv.cxx:1160
void GlueInvalidate() const
Definition: svdpntv.cxx:787
void SetLayerVisible(const OUString &rName, bool bShow)
Definition: svdpntv.cxx:415
void PrePaint()
Definition: svdpntv.cxx:471
SdrPaintWindow * BeginDrawLayers(OutputDevice *pOut, const vcl::Region &rReg, bool bDisableIntersect=false)
Definition: svdpntv.cxx:677
std::vector< std::unique_ptr< SdrPaintWindow > > maPaintWindows
Definition: svdpntv.hxx:136
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:158
SdrView * FirstView()
Definition: svdviter.cxx:152
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)
#define DBG_ASSERT(sCon, aError)
float u
constexpr sal_uInt16 EE_FEATURE_END(EE_FEATURE_FIELD+0)
constexpr sal_uInt16 EE_FEATURE_START(EE_CHAR_END+1)
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:102
IMPL_LINK_NOARG(SdrPaintView, ImpComeBackHdl, Timer *, void)
Definition: svdpntv.cxx:239
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