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