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