1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_SVDPNTV_HXX
21 #define INCLUDED_SVX_SVDPNTV_HXX
23 #include <svl/SfxBroadcaster.hxx>
24 #include <svl/lstner.hxx>
25 #include <svl/smplhint.hxx>
26 #include <svl/undo.hxx>
27 #include <svx/svddrag.hxx>
28 #include <svx/svdlayer.hxx>
29 #include <vcl/window.hxx>
30 #include <svtools/colorcfg.hxx>
31 #include <com/sun/star/awt/XControlContainer.hpp>
32 #include <svl/itemset.hxx>
33 #include <vcl/timer.hxx>
34 #include <svx/svxdllapi.h>
35 #include <svtools/optionsdrawinglayer.hxx>
36 #include <unotools/options.hxx>
37 #include <vcl/idle.hxx>
45 namespace com
{ namespace sun
{ namespace star
{ namespace awt
{
46 class XControlContainer
;
56 enum class GraphicManagerDrawFlags
;
62 namespace sdr
{ namespace contact
{
63 class ViewObjectContactRedirector
;
67 // Defines for AnimationMode
72 SDR_ANIMATION_ANIMATE
,
73 SDR_ANIMATION_DONT_ANIMATE
,
78 // Typedef's und defines
81 typedef unsigned char SDR_TRISTATE
;
83 #define SDR_ANYFORMAT (0xFFFFFFFF)
84 #define SDR_ANYITEM (0xFFFF)
85 #define SDRVIEWWIN_NOTFOUND (0xFFFF)
95 class ViewObjectContactRedirector
;
96 } // end of namespace contact
97 } // end of namespace sdr
102 class SVX_DLLPUBLIC SvxViewHint
: public SfxHint
105 enum HintType
{ SVX_HINT_VIEWCHANGED
};
106 explicit SvxViewHint(HintType eType
);
107 HintType
GetHintType() const { return meHintType
;}
113 // typedefs for a list of SdrPaintWindows
114 class SdrPaintWindow
;
115 typedef ::std::vector
< SdrPaintWindow
* > SdrPaintWindowVector
;
118 // helper to convert any GDIMetaFile to a good quality BitmapEx,
119 // using default parameters and graphic::XPrimitive2DRenderer
121 BitmapEx SVX_DLLPUBLIC
convertMetafileToBitmapEx(
122 const GDIMetaFile
& rMtf
,
123 const basegfx::B2DRange
& rTargetRange
,
124 const sal_uInt32 nMaximumQuadraticPixels
= 500000);
128 class SVX_DLLPUBLIC SdrPaintView
: public SfxListener
, public SfxRepeatTarget
, public SfxBroadcaster
, public ::utl::ConfigurationListener
130 friend class SdrPageView
;
131 friend class SdrGrafObj
;
133 SdrPageView
* mpPageView
;
137 VclPtr
<SdrItemBrowser
> pItemBrowser
;
139 VclPtr
<OutputDevice
> pActualOutDev
; // Nur zum vergleichen
140 VclPtr
<OutputDevice
> pDragWin
;
141 SfxStyleSheet
* pDefaultStyleSheet
;
143 OUString aAktLayer
; // Aktueller Zeichenlayer
144 OUString aMeasureLayer
; // Aktueller Layer fuer Bemassung
146 // Container aPagV; // Liste von SdrPageViews
148 // All windows this view is displayed on
149 SdrPaintWindowVector maPaintWindows
;
151 MapMode aActualMapMode
;
152 Size aGridBig
; // muss dann mal raus
153 Size aGridFin
; // muss dann mal raus
154 SdrDragStat aDragStat
;
155 Rectangle aMaxWorkArea
;
156 SfxItemSet aDefaultAttr
;
159 SdrAnimationMode eAnimationMode
;
161 sal_uInt16 nHitTolPix
;
162 sal_uInt16 nMinMovPix
;
163 sal_uInt16 nHitTolLog
;
164 sal_uInt16 nMinMovLog
;
165 GraphicManagerDrawFlags nGraphicManagerDrawMode
;
167 // hold an incarnation of Drawinglayer configuration options
168 SvtOptionsDrawinglayer maDrawinglayerOpt
;
170 bool bPageVisible
: 1;
171 bool bPageBorderVisible
: 1;
172 bool bBordVisible
: 1;
173 bool bGridVisible
: 1;
175 bool bHlplVisible
: 1;
177 bool bGlueVisible
: 1; // Persistent. Klebepunkte anzeigen
178 bool bGlueVisible2
: 1; // Klebepunkte auch bei GluePointEdit anzeigen
179 bool bGlueVisible3
: 1; // Klebepunkte auch bei EdgeTool anzeigen
180 bool bGlueVisible4
: 1; // Klebepunkte anzeigen, wenn 1 Edge markiert
181 bool bRestoreColors
: 1; // Pens und Brushes werden zurueckgesetzt.
182 bool bSomeObjChgdFlag
: 1;
183 bool bSwapAsynchron
: 1;
184 bool bPrintPreview
: 1;
186 // bool fuer die Verwaltung des anzuzeigenden Status
187 // Gruppe Betreten/Verlassen. Default ist sal_True, wird aber
188 // beispielsweise beim Chart auf sal_False gesetzt, da dort
189 // die Ghosted-Effekte zur Darstellug unerwuenscht sind.
190 bool bVisualizeEnteredGroup
: 1;
191 bool bAnimationPause
: 1;
194 // Flag which decides if buffered output for this view is allowed. When
195 // set, PreRendering for PageView rendering will be used. Default is sal_False
196 bool mbBufferedOutputAllowed
: 1;
199 // Flag which decides if buffered overlay for this view is allowed. When
200 // set, the output will be buffered in an overlay vdev. When not, overlay is
201 // directly painted to OutDev. Default is sal_False.
202 bool mbBufferedOverlayAllowed
: 1;
204 // allow page painting at all?
205 bool mbPagePaintingAllowed
: 1;
207 // is this a preview renderer?
208 bool mbPreviewRenderer
: 1;
210 // flags for calc and sw for suppressing OLE, CHART or DRAW objects
212 bool mbHideChart
: 1;
213 bool mbHideDraw
: 1; // hide draw objects other than form controls
214 bool mbHideFormControl
: 1; // hide form controls only
218 // interface for PagePaintingAllowed flag
219 bool IsBufferedOutputAllowed() const;
220 void SetBufferedOutputAllowed(bool bNew
);
222 // interface for BufferedOverlayAllowed flag
223 bool IsBufferedOverlayAllowed() const;
224 void SetBufferedOverlayAllowed(bool bNew
);
226 // allow page painting at all?
227 bool IsPagePaintingAllowed() const { return mbPagePaintingAllowed
;}
228 void SetPagePaintingAllowed(bool bNew
);
231 svtools::ColorConfig maColorConfig
;
234 // interface to SdrPaintWindow
236 void AppendPaintWindow(SdrPaintWindow
& rNew
);
237 SdrPaintWindow
* RemovePaintWindow(SdrPaintWindow
& rOld
);
238 void ConfigurationChanged( ::utl::ConfigurationBroadcaster
*, sal_uInt32
) SAL_OVERRIDE
;
241 sal_uInt32
PaintWindowCount() const { return maPaintWindows
.size(); }
242 SdrPaintWindow
* FindPaintWindow(const OutputDevice
& rOut
) const;
243 SdrPaintWindow
* GetPaintWindow(sal_uInt32 nIndex
) const;
244 // replacement for GetWin(0), may return 0L (!)
245 OutputDevice
* GetFirstOutputDevice() const;
248 SVX_DLLPRIVATE
void ImpClearVars();
249 DECL_LINK_TYPED(ImpComeBackHdl
, Idle
*, void);
252 sal_uInt16
ImpGetMinMovLogic(short nMinMov
, const OutputDevice
* pOut
) const;
253 sal_uInt16
ImpGetHitTolLogic(short nHitTol
, const OutputDevice
* pOut
) const;
255 // Wenn man den IdleStatus des Systems nicht abwarten will (auf const geschummelt):
256 void FlushComeBackTimer() const;
257 void TheresNewMapMode();
258 void ImpSetGlueVisible2(bool bOn
) { if (bGlueVisible2
!=bOn
) { bGlueVisible2
=bOn
; if (!bGlueVisible
&& !bGlueVisible3
&& !bGlueVisible4
) GlueInvalidate(); } }
259 void ImpSetGlueVisible3(bool bOn
) { if (bGlueVisible3
!=bOn
) { bGlueVisible3
=bOn
; if (!bGlueVisible
&& !bGlueVisible2
&& !bGlueVisible4
) GlueInvalidate(); } }
260 void ImpSetGlueVisible4(bool bOn
) { if (bGlueVisible4
!=bOn
) { bGlueVisible4
=bOn
; if (!bGlueVisible
&& !bGlueVisible2
&& !bGlueVisible3
) GlueInvalidate(); } }
261 bool ImpIsGlueVisible2() const { return bGlueVisible2
; }
262 bool ImpIsGlueVisible3() const { return bGlueVisible3
; }
263 bool ImpIsGlueVisible4() const { return bGlueVisible4
; }
266 bool ImpIsGlueVisible() { return bGlueVisible
|| bGlueVisible2
|| bGlueVisible3
|| bGlueVisible4
; }
269 virtual void Notify(SfxBroadcaster
& rBC
, const SfxHint
& rHint
) SAL_OVERRIDE
;
270 void GlueInvalidate() const;
272 void ShowEncirclement(OutputDevice
* pOut
);
273 void HideEncirclement(OutputDevice
* pOut
);
274 void DrawEncirclement(OutputDevice
* pOut
) const;
276 // ModelHasChanged wird gerufen, sobald nach beliebig vielen HINT_OBJCHG
277 // das System wieder idle ist (StarView-Timer). Wer diese Methode ueberlaed,
278 // muss unbedingt ModelHasChanged() der Basisklasse rufen.
279 virtual void ModelHasChanged();
282 // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
283 SdrPaintView(SdrModel
* pModel1
, OutputDevice
* pOut
= 0L);
284 virtual ~SdrPaintView();
289 virtual void ClearPageView();
290 SdrModel
* GetModel() const { return pMod
; }
292 virtual bool IsAction() const;
293 virtual void MovAction(const Point
& rPnt
);
294 virtual void EndAction();
295 virtual void BckAction();
296 virtual void BrkAction(); // Alle Actions z.B. Draggen abbrechen.
297 virtual void TakeActionRect(Rectangle
& rRect
) const;
299 // info about TextEdit. Default is sal_False.
300 virtual bool IsTextEdit() const;
302 // info about TextEditPageView. Default is 0L.
303 virtual SdrPageView
* GetTextEditPageView() const;
305 // Muss dann bei jedem Fensterwechsel (wenn die SdrView in mehreren
306 // Fenstern gleichzeitig dargestellt wird (->z.B. Splitter)) und bei
307 // jedem MapMode(Scaling)-wechsel gerufen werden, damit ich aus meinen
308 // Pixelwerten logische Werte berechnen kann.
309 void SetActualWin(const OutputDevice
* pWin
);
310 void SetMinMoveDistancePixel(sal_uInt16 nVal
) { nMinMovPix
=nVal
; TheresNewMapMode(); }
311 sal_uInt16
GetMinMoveDistancePixel() const { return (sal_uInt16
)nMinMovPix
; }
312 void SetHitTolerancePixel(sal_uInt16 nVal
) { nHitTolPix
=nVal
; TheresNewMapMode(); }
313 sal_uInt16
GetHitTolerancePixel() const { return (sal_uInt16
)nHitTolPix
; }
315 // data read access on logic HitTolerance and MinMoveTolerance
316 sal_uInt16
getHitTolLog() const { return nHitTolLog
; }
317 sal_uInt16
getMinMovLog() const { return nMinMovLog
; }
319 // Flag zur Visualisierung von Gruppen abfragen/testen
320 bool DoVisualizeEnteredGroup() const { return bVisualizeEnteredGroup
; }
321 void SetVisualizeEnteredGroup(bool bNew
) { bVisualizeEnteredGroup
= bNew
; }
323 // Am DragStatus laesst sich beispielsweise erfragen, welche
324 // entfernung bereits gedraggd wurde, etc.
325 const SdrDragStat
& GetDragStat() const { return aDragStat
; }
327 // Anmelden/Abmelden einer PageView an der View.
328 // Dieselbe // Seite kann nicht mehrfach angemeldet werden.
329 // Methoden mit dem Suffix PgNum erwarten als numerischen Parameter
330 // eine Seitennummer (0...). Methoden mit dem Suffix PvNum erwarten
331 // degagen als numerischen Parameter die Nummer der PageView an der
332 // SdrView (Iterieren ueber alle angemeldeten Pages).
333 virtual SdrPageView
* ShowSdrPage(SdrPage
* pPage
);
334 virtual void HideSdrPage();
336 // Iterieren ueber alle angemeldeten PageViews
337 // sal_uInt16 GetPageViewCount() const { return sal_uInt16(aPagV.Count()); }
338 // SdrPageView* GetPageViewByIndex(sal_uInt16 nPvNum) const { return ((SdrPageView*)aPagV.GetObject(nPvNum)); }
339 SdrPageView
* GetSdrPageView() const { return mpPageView
; }
341 // Pageview einer bestimmten Seite ermitteln
342 // SdrPageView* GetPageViewByPage(const SdrPage* pPage) const;
343 // sal_uInt16 GetIndexByPageView(const SdrPageView* pPV) const;
345 // Test, ob eine Seite getroffen
346 // SdrPageView* HitPage(const Point& rPnt) const;
348 // Die Seite, die dem Punkt am naechsten ist. Liefert nur NULL,
349 // wenn absolut keine Seite angemeldet ist.
350 // SdrPageView* GetPageViewByPosition(const Point& rPnt) const;
352 // Eine SdrView kann auf mehreren Fenstern gleichzeitig abgebiltet sein:
353 virtual void AddWindowToPaintView(OutputDevice
* pNewWin
, vcl::Window
* pWindow
);
354 virtual void DeleteWindowFromPaintView(OutputDevice
* pOldWin
);
356 void SetLayerVisible(const OUString
& rName
, bool bShow
=true);
357 bool IsLayerVisible(const OUString
& rName
) const;
359 void SetLayerLocked(const OUString
& rName
, bool bLock
=true);
360 bool IsLayerLocked(const OUString
& rName
) const;
362 void SetLayerPrintable(const OUString
& rName
, bool bPrn
=true);
363 bool IsLayerPrintable(const OUString
& rName
) const;
365 // PrePaint call forwarded from app windows
369 // used internally for Draw/Impress/sch/chart2
370 virtual void CompleteRedraw(OutputDevice
* pOut
, const vcl::Region
& rReg
, sdr::contact::ViewObjectContactRedirector
* pRedirector
= 0);
372 // #i72889# used from CompleteRedraw() implementation internally, added to be able to do a complete redraw in single steps
374 // BeginCompleteRedraw returns (or even creates) a SdrPaintWindow which shall then be used as
375 // target for paints. Since paints may be buffered, use it's GetTargetOutputDevice() method which will
376 // return the buffer in case of bufered.
377 // DoCompleteRedraw draws the DrawingLayer hierarchy then.
378 // EndCompleteRedraw does the necessary refreshes, evtl. paints text edit and overlay and evtl destroys the
379 // SdrPaintWindow again. This means: the SdrPaintWindow is no longer safe after this closing call.
380 virtual SdrPaintWindow
* BeginCompleteRedraw(OutputDevice
* pOut
);
381 void DoCompleteRedraw(SdrPaintWindow
& rPaintWindow
, const vcl::Region
& rReg
, sdr::contact::ViewObjectContactRedirector
* pRedirector
= 0);
382 virtual void EndCompleteRedraw(SdrPaintWindow
& rPaintWindow
, bool bPaintFormLayer
);
385 // used for the other applications basctl/sc/sw which call DrawLayer at PageViews
386 // #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw
387 // #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region
388 SdrPaintWindow
* BeginDrawLayers(OutputDevice
* pOut
, const vcl::Region
& rReg
, bool bDisableIntersect
= false);
389 // used when the region passed to BeginDrawLayers needs to be changed
390 void UpdateDrawLayersRegion(OutputDevice
* pOut
, const vcl::Region
& rReg
, bool bDisableIntersect
= false);
391 void EndDrawLayers(SdrPaintWindow
& rPaintWindow
, bool bPaintFormLayer
);
395 // used to paint the form layer after the PreRender device is flushed (painted) to the window.
396 void ImpFormLayerDrawing( SdrPaintWindow
& rPaintWindow
);
398 static vcl::Region
OptimizeDrawLayersRegion(OutputDevice
* pOut
, const vcl::Region
& rReg
, bool bDisableIntersect
);
401 bool IsPageVisible() const { return bPageVisible
; } // Seite (weisse Flaeche) malen oder nicht
402 bool IsPageBorderVisible() const { return bPageBorderVisible
; } // Seite (weisse Flaeche) malen oder nicht
403 bool IsBordVisible() const { return bBordVisible
; } // Seitenrandlinie malen oder nicht
404 bool IsGridVisible() const { return bGridVisible
; } // Rastergitter malen oder nicht
405 bool IsGridFront() const { return bGridFront
; } // Rastergitter ueber die Objekte druebermalen oder dahinter
406 bool IsHlplVisible() const { return bHlplVisible
; } // Hilfslinien der Seiten malen oder nicht
407 bool IsHlplFront() const { return bHlplFront
; } // Hilfslinie ueber die Objekte druebermalen oder dahinter
408 bool IsGlueVisible() const { return bGlueVisible
; } // Konnektoren der objekte sichtbar oder nicht
409 Color
GetGridColor() const { return maGridColor
;}
410 void SetPageVisible(bool bOn
= true) { bPageVisible
=bOn
; InvalidateAllWin(); }
411 void SetPageBorderVisible(bool bOn
= true) { bPageBorderVisible
=bOn
; InvalidateAllWin(); }
412 void SetBordVisible(bool bOn
= true) { bBordVisible
=bOn
; InvalidateAllWin(); }
413 void SetGridVisible(bool bOn
= true) { bGridVisible
=bOn
; InvalidateAllWin(); }
414 void SetGridFront(bool bOn
= true) { bGridFront
=bOn
; InvalidateAllWin(); }
415 void SetHlplVisible(bool bOn
= true) { bHlplVisible
=bOn
; InvalidateAllWin(); }
416 void SetHlplFront(bool bOn
= true) { bHlplFront
=bOn
; InvalidateAllWin(); }
417 void SetGlueVisible(bool bOn
= true) { if (bGlueVisible
!=bOn
) { bGlueVisible
=bOn
; if (!bGlueVisible2
&& !bGlueVisible3
&& !bGlueVisible4
) GlueInvalidate(); } }
418 void SetGridColor( Color aColor
);
420 bool IsPreviewRenderer() const { return mbPreviewRenderer
; }
421 void SetPreviewRenderer(bool bOn
) { mbPreviewRenderer
=bOn
; }
423 // access methods for calc and sw hide object modes
424 bool getHideOle() const { return mbHideOle
; }
425 bool getHideChart() const { return mbHideChart
; }
426 bool getHideDraw() const { return mbHideDraw
; }
427 bool getHideFormControl() const { return mbHideFormControl
; }
428 void setHideOle(bool bNew
) { if(bNew
!= (bool)mbHideOle
) mbHideOle
= bNew
; }
429 void setHideChart(bool bNew
) { if(bNew
!= (bool)mbHideChart
) mbHideChart
= bNew
; }
430 void setHideDraw(bool bNew
) { if(bNew
!= (bool)mbHideDraw
) mbHideDraw
= bNew
; }
431 void setHideFormControl(bool bNew
) { if(bNew
!= (bool)mbHideFormControl
) mbHideFormControl
= bNew
; }
433 void SetGridCoarse(const Size
& rSiz
) { aGridBig
=rSiz
; }
434 void SetGridFine(const Size
& rSiz
) { aGridFin
=rSiz
; if (aGridFin
.Height()==0) aGridFin
.Height()=aGridFin
.Width(); if (bGridVisible
) InvalidateAllWin(); } // #40479#
435 const Size
& GetGridCoarse() const { return aGridBig
; }
436 const Size
& GetGridFine() const { return aGridFin
; }
438 void InvalidateAllWin();
439 void InvalidateAllWin(const Rectangle
& rRect
, bool bPlus1Pix
=false);
441 /// If the View should not call Invalidate() on the windows, override
442 /// the following 2 methods and do something else.
443 virtual void InvalidateOneWin(vcl::Window
& rWin
);
444 virtual void InvalidateOneWin(vcl::Window
& rWin
, const Rectangle
& rRect
);
446 void SetActiveLayer(const OUString
& rName
) { aAktLayer
=rName
; }
447 const OUString
& GetActiveLayer() const { return aAktLayer
; }
449 // Verlassen einer betretenen Objektgruppe aller sichtbaren Seiten.
450 // (wie MsDos chdir ..)
451 void LeaveOneGroup();
453 // Verlassen aller betretenen Objektgruppen aller sichtbaren Seiten.
454 // (wie MsDos chdir \)
455 void LeaveAllGroup();
457 // Feststellen, ob Leave sinnvoll ist.
458 bool IsGroupEntered() const;
460 // DefaultAttribute an der View: Neu erzeugte Objekte bekommen diese
461 // Attribute direkt nach dem Erzeugen erstmal zugewiesen.
462 void SetDefaultAttr(const SfxItemSet
& rAttr
, bool bReplaceAll
);
463 const SfxItemSet
& GetDefaultAttr() const { return aDefaultAttr
; }
464 void SetDefaultStyleSheet(SfxStyleSheet
* pStyleSheet
, bool bDontRemoveHardAttr
);
465 SfxStyleSheet
* GetDefaultStyleSheet() const { return pDefaultStyleSheet
; }
467 void SetNotPersistDefaultAttr(const SfxItemSet
& rAttr
, bool bReplaceAll
);
468 void MergeNotPersistDefaultAttr(SfxItemSet
& rAttr
, bool bOnlyHardAttr
) const;
470 // use this mode as mode to draw all internal GraphicManager objects with
471 GraphicManagerDrawFlags
GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode
; }
472 void SetGraphicManagerDrawMode( GraphicManagerDrawFlags nMode
) { nGraphicManagerDrawMode
= nMode
; }
474 // SwapIn (z.B. von Grafiken) asynchron durchfuehren. Also nicht
475 // beim Paint sofort nachladen, sondern dort das Nachladen anstossen.
476 // Nach Abschluss des Nachladens wird das Objekt dann angezeigt.
477 // Hat nur z.Zt. Wirkung, wenn SwapGraphics am Model eingeschaltet ist.
478 // Default=FALSE. Flag ist nicht persistent.
479 bool IsSwapAsynchron() const { return bSwapAsynchron
; }
480 void SetSwapAsynchron(bool bJa
=true) { bSwapAsynchron
=bJa
; }
481 virtual bool KeyInput(const KeyEvent
& rKEvt
, vcl::Window
* pWin
);
483 virtual bool MouseButtonDown(const MouseEvent
& /*rMEvt*/, vcl::Window
* /*pWin*/) { return false; }
484 virtual bool MouseButtonUp(const MouseEvent
& /*rMEvt*/, vcl::Window
* /*pWin*/) { return false; }
485 virtual bool MouseMove(const MouseEvent
& /*rMEvt*/, vcl::Window
* /*pWin*/) { return false; }
486 virtual bool Command(const CommandEvent
& /*rCEvt*/, vcl::Window
* /*pWin*/) { return false; }
488 /* new interface src537 */
489 bool GetAttributes(SfxItemSet
& rTargetSet
, bool bOnlyHardAttr
=false) const;
491 bool SetAttributes(const SfxItemSet
& rSet
, bool bReplaceAll
);
492 SfxStyleSheet
* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(bool& rOk) const;
493 bool SetStyleSheet(SfxStyleSheet
* pStyleSheet
, bool bDontRemoveHardAttr
);
495 virtual void MakeVisible(const Rectangle
& rRect
, vcl::Window
& rWin
);
497 // Fuer PlugIn. Wird vom Paint des OLE-Obj gerufen.
498 virtual void DoConnect(SdrOle2Obj
* pOleObj
);
500 // Animation aktivieren/deaktivieren fuer ::Paint
501 // wird z.Zt. ausgewertet von SdrGrafObj, wenn in dem eine Animation steckt
502 // Das Unterbinden der automatischen Animation wird z.B. fuer die Dia-Show benoetigt
503 bool IsAnimationEnabled() const { return ( SDR_ANIMATION_ANIMATE
== eAnimationMode
); }
504 void SetAnimationEnabled( bool bEnable
=true );
506 // set/unset pause state for animations
507 bool IsAnimationPause() const { return bAnimationPause
; }
508 void SetAnimationPause( bool bSet
);
510 // Verhalten beim Starten von Animation im Paint-Handler:
511 // 1. Animation normal starten( SDR_ANIMATION_ANIMATE ) => DEFAULT
512 // 2. Nur die Ersatzdarstellung der Animation zeichnen ( SDR_ANIMATION_DONT_ANIMATE )
513 // 3. Nicht starten und nichts ersatzweise ausgeben ( SDR_ANIMATION_DISABLE )
514 void SetAnimationMode( const SdrAnimationMode eMode
);
515 SdrAnimationMode
GetAnimationMode() const { return eAnimationMode
; }
517 // bei bShow=sal_False wird der Browser destruiert
519 void ShowItemBrowser(bool bShow
=true);
520 bool IsItemBrowserVisible() const { return pItemBrowser
!=nullptr && GetItemBrowser()->IsVisible(); }
521 vcl::Window
* GetItemBrowser() const;
524 // Muss von App beim Scrollen usw. gerufen werden, damit ein u.U.
525 // aktives FormularControl mitverschoben werden kann
526 void VisAreaChanged(const OutputDevice
* pOut
=NULL
);
527 void VisAreaChanged(const SdrPageWindow
& rWindow
);
529 bool IsPrintPreview() const { return bPrintPreview
; }
530 void SetPrintPreview(bool bOn
= true) { bPrintPreview
=bOn
; }
532 const svtools::ColorConfig
& getColorConfig() const { return maColorConfig
;}
534 void onChangeColorConfig();
536 // #103834# Set background color for svx at SdrPageViews
537 void SetApplicationBackgroundColor(Color aBackgroundColor
);
539 // #103911# Set document color for svx at SdrPageViews
540 void SetApplicationDocumentColor(Color aDocumentColor
);
543 // Sets the timer for Object animations and restarts.
544 void SetAnimationTimer(sal_uInt32 nTime
);
546 // access to Drawinglayer configuration options
547 const SvtOptionsDrawinglayer
& getOptionsDrawinglayer() const { return maDrawinglayerOpt
; }
550 #endif // INCLUDED_SVX_SVDPNTV_HXX
552 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */