LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - svdpntv.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 17 38 44.7 %
Date: 2012-12-27 Functions: 17 40 42.5 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef _SVDPNTV_HXX
      21             : #define _SVDPNTV_HXX
      22             : 
      23             : #include <svl/brdcst.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>  // fuer SetOfByte
      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             : 
      38             : //************************************************************
      39             : //   Pre-Defines
      40             : //************************************************************
      41             : 
      42             : class SdrPageWindow;
      43             : 
      44             : namespace com { namespace sun { namespace star { namespace awt {
      45             :     class XControlContainer;
      46             : }}}}
      47             : 
      48             : class SdrPage;
      49             : class SdrView;
      50             : class SfxItemSet;
      51             : class SfxStyleSheet;
      52             : class SdrOle2Obj;
      53             : class SdrModel;
      54             : class SdrObject;
      55             : 
      56             : #ifdef DBG_UTIL
      57             : class SdrItemBrowser;
      58             : #endif
      59             : 
      60             : namespace sdr { namespace contact {
      61             :     class ViewObjectContactRedirector;
      62             : }}
      63             : 
      64             : //************************************************************
      65             : //   Defines for AnimationMode
      66             : //************************************************************
      67             : 
      68             : enum SdrAnimationMode
      69             : {
      70             :     SDR_ANIMATION_ANIMATE,
      71             :     SDR_ANIMATION_DONT_ANIMATE,
      72             :     SDR_ANIMATION_DISABLE
      73             : };
      74             : 
      75             : //************************************************************
      76             : //   Typedef's und defines
      77             : //************************************************************
      78             : 
      79             : typedef unsigned char TRISTATE;
      80             : #define FUZZY                   (2)
      81             : #define SDR_ANYFORMAT           (0xFFFFFFFF)
      82             : #define SDR_ANYITEM             (0xFFFF)
      83             : #define SDRVIEWWIN_NOTFOUND     (0xFFFF)
      84             : 
      85             : 
      86             : ////////////////////////////////////////////////////////////////////////////////////////////////////
      87             : class SdrPaintView;
      88             : 
      89             : namespace sdr
      90             : {
      91             :     namespace contact
      92             :     {
      93             :         class ViewObjectContactRedirector;
      94             :     } // end of namespace contact
      95             : } // end of namespace sdr
      96             : 
      97             : ////////////////////////////////////////////////////////////////////////////////////////////////////
      98             : 
      99             : 
     100         527 : class SVX_DLLPUBLIC SvxViewHint : public SfxHint
     101             : {
     102             : public:
     103             :     enum HintType { SVX_HINT_VIEWCHANGED };
     104             :     TYPEINFO();
     105             :     explicit SvxViewHint (HintType eType);
     106             :     HintType GetHintType (void) const;
     107             : 
     108             : private:
     109             :     HintType meHintType;
     110             : };
     111             : 
     112             : // typedefs for a list of SdrPaintWindows
     113             : class SdrPaintWindow;
     114             : typedef ::std::vector< SdrPaintWindow* > SdrPaintWindowVector;
     115             : 
     116             : ////////////////////////////////////////////////////////////////////////////////////////////////////
     117             : 
     118             : class SVX_DLLPUBLIC SdrPaintView : public SfxListener, public SfxRepeatTarget, public SfxBroadcaster, public ::utl::ConfigurationListener
     119             : {
     120             :     friend class                SdrPageView;
     121             :     friend class                SdrGrafObj;
     122             : 
     123             :     SdrPageView*                mpPageView;
     124             : protected:
     125             :     SdrModel*                   pMod;
     126             : #ifdef DBG_UTIL
     127             :     SdrItemBrowser*             pItemBrowser;
     128             : #endif
     129             :     const OutputDevice*         pActualOutDev; // Nur zum vergleichen
     130             :     OutputDevice*               pDragWin;
     131             :     SfxStyleSheet*              pDefaultStyleSheet;
     132             : 
     133             :     String                      aAktLayer;     // Aktueller Zeichenlayer
     134             :     String                      aMeasureLayer; // Aktueller Layer fuer Bemassung
     135             : 
     136             : //  Container                   aPagV;         // Liste von SdrPageViews
     137             : 
     138             :     // All windows this view is displayed on
     139             :     SdrPaintWindowVector        maPaintWindows;
     140             : 
     141             :     MapMode                     aActualMapMode;
     142             :     Size                        aGridBig; // muss dann mal raus
     143             :     Size                        aGridFin; // muss dann mal raus
     144             :     SdrDragStat                 aDragStat;
     145             :     Rectangle                   aMaxWorkArea;
     146             :     SfxItemSet                  aDefaultAttr;
     147             :     Timer                       aComeBackTimer;
     148             : 
     149             :     SdrAnimationMode            eAnimationMode;
     150             : 
     151             :     sal_uInt16                      nHitTolPix;
     152             :     sal_uInt16                      nMinMovPix;
     153             :     sal_uInt16                      nHitTolLog;
     154             :     sal_uInt16                      nMinMovLog;
     155             :     sal_uIntPtr                     nMasterCacheMode;
     156             :     sal_uIntPtr                       nGraphicManagerDrawMode;
     157             : 
     158             :     // hold an incarnation of Drawinglayer configuration options
     159             :     SvtOptionsDrawinglayer      maDrawinglayerOpt;
     160             : 
     161             :     unsigned                    bPageVisible : 1;
     162             :     unsigned                    bPageBorderVisible : 1;
     163             :     unsigned                    bBordVisible : 1;
     164             :     unsigned                    bGridVisible : 1;
     165             :     unsigned                    bGridFront : 1;
     166             :     unsigned                    bHlplVisible : 1;
     167             :     unsigned                    bHlplFront : 1;
     168             :     unsigned                    bGlueVisible : 1;    // Persistent. Klebepunkte anzeigen
     169             :     unsigned                    bGlueVisible2 : 1;   // Klebepunkte auch bei GluePointEdit anzeigen
     170             :     unsigned                    bGlueVisible3 : 1;   // Klebepunkte auch bei EdgeTool anzeigen
     171             :     unsigned                    bGlueVisible4 : 1;   // Klebepunkte anzeigen, wenn 1 Edge markiert
     172             :     unsigned                    bRestoreColors : 1;   // Pens und Brushes werden zurueckgesetzt.
     173             :     unsigned                    bSomeObjChgdFlag : 1;
     174             :     unsigned                    bSwapAsynchron : 1;
     175             :     unsigned                    bPrintPreview : 1;
     176             : 
     177             :     // sal_Bool fuer die Verwaltung des anzuzeigenden Status
     178             :     // Gruppe Betreten/Verlassen. Default ist sal_True, wird aber
     179             :     // beispielsweise beim Chart auf sal_False gesetzt, da dort
     180             :     // die Ghosted-Effekte zur Darstellug unerwuenscht sind.
     181             :     unsigned                    bVisualizeEnteredGroup : 1;
     182             :     unsigned                    bAnimationPause : 1;
     183             : 
     184             :     // #114898#
     185             :     // Flag which decides if buffered output for this view is allowed. When
     186             :     // set, PreRendering for PageView rendering will be used. Default is sal_False
     187             :     unsigned                    mbBufferedOutputAllowed : 1;
     188             : 
     189             :     // #114898#
     190             :     // Flag which decides if buffered overlay for this view is allowed. When
     191             :     // set, the output will be buffered in an overlay vdev. When not, overlay is
     192             :     // directly painted to OutDev. Default is sal_False.
     193             :     unsigned                    mbBufferedOverlayAllowed : 1;
     194             : 
     195             :     // allow page painting at all?
     196             :     unsigned                    mbPagePaintingAllowed : 1;
     197             : 
     198             :     // is this a preview renderer?
     199             :     unsigned                    mbPreviewRenderer : 1;
     200             : 
     201             :     // flags for calc and sw for suppressing OLE, CHART or DRAW objects
     202             :     unsigned                    mbHideOle : 1;
     203             :     unsigned                    mbHideChart : 1;
     204             :     unsigned                    mbHideDraw : 1;             // hide draw objects other than form controls
     205             :     unsigned                    mbHideFormControl : 1;      // hide form controls only
     206             : 
     207             : public:
     208             :     // #114898#
     209             :     // interface for PagePaintingAllowed flag
     210             :     bool IsBufferedOutputAllowed() const;
     211             :     void SetBufferedOutputAllowed(bool bNew);
     212             : 
     213             :     // interface for BufferedOverlayAllowed flag
     214             :     bool IsBufferedOverlayAllowed() const;
     215             :     void SetBufferedOverlayAllowed(bool bNew);
     216             : 
     217             :     // allow page painting at all?
     218             :     sal_Bool IsPagePaintingAllowed() const;
     219             :     void SetPagePaintingAllowed(bool bNew);
     220             : 
     221             : protected:
     222             :     svtools::ColorConfig            maColorConfig;
     223             :     Color                           maGridColor;
     224             : 
     225             :     // interface to SdrPaintWindow
     226             : protected:
     227             :     void AppendPaintWindow(SdrPaintWindow& rNew);
     228             :     SdrPaintWindow* RemovePaintWindow(SdrPaintWindow& rOld);
     229             :     void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 );
     230             : 
     231             : public:
     232        3277 :     sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); }
     233             :     SdrPaintWindow* FindPaintWindow(const OutputDevice& rOut) const;
     234             :     SdrPaintWindow* GetPaintWindow(sal_uInt32 nIndex) const;
     235             :     // replacement for GetWin(0), may return 0L (!)
     236             :     OutputDevice* GetFirstOutputDevice() const;
     237             : 
     238             : private:
     239             :     SVX_DLLPRIVATE void ImpClearVars();
     240             :     DECL_LINK(ImpComeBackHdl,void*);
     241             : 
     242             : protected:
     243             :     sal_uInt16 ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const;
     244             :     sal_uInt16 ImpGetHitTolLogic(short nHitTol, const OutputDevice* pOut) const;
     245             : 
     246             :     // Wenn man den IdleStatus des Systems nicht abwarten will (auf const geschummelt):
     247             :     void FlushComeBackTimer() const;
     248             :     void TheresNewMapMode();
     249           0 :     void ImpSetGlueVisible2(bool bOn) { if (bGlueVisible2!=(unsigned)bOn) { bGlueVisible2=bOn; if (!bGlueVisible && !bGlueVisible3 && !bGlueVisible4) GlueInvalidate(); } }
     250           0 :     void ImpSetGlueVisible3(bool bOn) { if (bGlueVisible3!=(unsigned)bOn) { bGlueVisible3=bOn; if (!bGlueVisible && !bGlueVisible2 && !bGlueVisible4) GlueInvalidate(); } }
     251         272 :     void ImpSetGlueVisible4(bool bOn) { if (bGlueVisible4!=(unsigned)bOn) { bGlueVisible4=bOn; if (!bGlueVisible && !bGlueVisible2 && !bGlueVisible3) GlueInvalidate(); } }
     252             :     sal_Bool ImpIsGlueVisible2() const { return bGlueVisible2; }
     253             :     sal_Bool ImpIsGlueVisible3() const { return bGlueVisible3; }
     254             :     sal_Bool ImpIsGlueVisible4() const { return bGlueVisible4; }
     255             : 
     256             : public:
     257         222 :     sal_Bool ImpIsGlueVisible() { return bGlueVisible || bGlueVisible2 || bGlueVisible3 || bGlueVisible4; }
     258             : protected:
     259             : 
     260             :     virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
     261             :     void GlueInvalidate() const;
     262             : 
     263             :     void ShowEncirclement(OutputDevice* pOut);
     264             :     void HideEncirclement(OutputDevice* pOut);
     265             :     void DrawEncirclement(OutputDevice* pOut) const;
     266             : 
     267             :     // ModelHasChanged wird gerufen, sobald nach beliebig vielen HINT_OBJCHG
     268             :     // das System wieder idle ist (StarView-Timer). Wer diese Methode ueberlaed,
     269             :     // muss unbedingt ModelHasChanged() der Basisklasse rufen.
     270             :     virtual void ModelHasChanged();
     271             : 
     272             : protected:
     273             :     // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
     274             :     SdrPaintView(SdrModel* pModel1, OutputDevice* pOut = 0L);
     275             :     virtual ~SdrPaintView();
     276             : 
     277             : public:
     278             :     TYPEINFO();
     279             : 
     280             :     virtual void ClearPageView();
     281        1583 :     SdrModel* GetModel() const { return pMod; }
     282             : 
     283             :     virtual sal_Bool IsAction() const;
     284             :     virtual void MovAction(const Point& rPnt);
     285             :     virtual void EndAction();
     286             :     virtual void BckAction();
     287             :     virtual void BrkAction(); // Alle Actions z.B. Draggen abbrechen.
     288             :     virtual void TakeActionRect(Rectangle& rRect) const;
     289             : 
     290             :     // info about TextEdit. Default is sal_False.
     291             :     virtual bool IsTextEdit() const;
     292             : 
     293             :     // info about TextEditPageView. Default is 0L.
     294             :     virtual SdrPageView* GetTextEditPageView() const;
     295             : 
     296             :     // Muss dann bei jedem Fensterwechsel (wenn die SdrView in mehreren
     297             :     // Fenstern gleichzeitig dargestellt wird (->z.B. Splitter)) und bei
     298             :     // jedem MapMode(Scaling)-wechsel gerufen werden, damit ich aus meinen
     299             :     // Pixelwerten logische Werte berechnen kann.
     300             :     void SetActualWin(const OutputDevice* pWin);
     301             :     void SetMinMoveDistancePixel(sal_uInt16 nVal) { nMinMovPix=nVal; TheresNewMapMode(); }
     302             :     sal_uInt16 GetMinMoveDistancePixel() const { return (sal_uInt16)nMinMovPix; }
     303             :     void SetHitTolerancePixel(sal_uInt16 nVal) { nHitTolPix=nVal; TheresNewMapMode(); }
     304             :     sal_uInt16 GetHitTolerancePixel() const { return (sal_uInt16)nHitTolPix; }
     305             : 
     306             :     // data read access on logic HitTolerance and MinMoveTolerance
     307           0 :     sal_uInt16 getHitTolLog() const { return nHitTolLog; }
     308             :     sal_uInt16 getMinMovLog() const { return nMinMovLog; }
     309             : 
     310             :     // Flag zur Visualisierung von Gruppen abfragen/testen
     311        1848 :     sal_Bool DoVisualizeEnteredGroup() const { return bVisualizeEnteredGroup; }
     312             :     void SetVisualizeEnteredGroup(sal_Bool bNew) { bVisualizeEnteredGroup = bNew; }
     313             : 
     314             :     // Am DragStatus laesst sich beispielsweise erfragen, welche
     315             :     // entfernung bereits gedraggd wurde, etc.
     316           0 :     const SdrDragStat& GetDragStat() const { return aDragStat; }
     317             : 
     318             :     // Anmelden/Abmelden einer PageView an der View.
     319             :     // Dieselbe // Seite kann nicht mehrfach angemeldet werden.
     320             :     // Methoden mit dem Suffix PgNum erwarten als numerischen Parameter
     321             :     // eine Seitennummer (0...). Methoden mit dem Suffix PvNum erwarten
     322             :     // degagen als numerischen Parameter die Nummer der PageView an der
     323             :     // SdrView (Iterieren ueber alle angemeldeten Pages).
     324             :     virtual SdrPageView* ShowSdrPage(SdrPage* pPage);
     325             :     virtual void HideSdrPage();
     326             : 
     327             :     // Iterieren ueber alle angemeldeten PageViews
     328             : //  sal_uInt16 GetPageViewCount() const { return sal_uInt16(aPagV.Count()); }
     329             : //  SdrPageView* GetPageViewByIndex(sal_uInt16 nPvNum) const { return ((SdrPageView*)aPagV.GetObject(nPvNum)); }
     330        8631 :     SdrPageView* GetSdrPageView() const { return mpPageView; }
     331             : 
     332             :     // Pageview einer bestimmten Seite ermitteln
     333             : //  SdrPageView* GetPageViewByPage(const SdrPage* pPage) const;
     334             : //  sal_uInt16 GetIndexByPageView(const SdrPageView* pPV) const;
     335             : 
     336             :     // Test, ob eine Seite getroffen
     337             : //  SdrPageView* HitPage(const Point& rPnt) const;
     338             : 
     339             :     // Die Seite, die dem Punkt am naechsten ist. Liefert nur NULL,
     340             :     // wenn absolut keine Seite angemeldet ist.
     341             : //  SdrPageView* GetPageViewByPosition(const Point& rPnt) const;
     342             : 
     343             :     // Eine SdrView kann auf mehreren Fenstern gleichzeitig abgebiltet sein:
     344             :     virtual void AddWindowToPaintView(OutputDevice* pNewWin);
     345             :     virtual void DeleteWindowFromPaintView(OutputDevice* pOldWin);
     346             : 
     347             :     void SetLayerVisible(const String& rName, sal_Bool bShow=sal_True);
     348             :     bool IsLayerVisible(const String& rName) const;
     349             : 
     350             :     void SetLayerLocked(const String& rName, sal_Bool bLock=sal_True);
     351             :     bool IsLayerLocked(const String& rName) const;
     352             : 
     353             :     void SetLayerPrintable(const String& rName, sal_Bool bPrn=sal_True);
     354             :     bool IsLayerPrintable(const String& rName) const;
     355             : 
     356             :     // PrePaint call forwarded from app windows
     357             :     void PrePaint();
     358             : 
     359             :     ////////////////////////////////////////////////////////////////////////////////////////////////////
     360             :     // used internally for Draw/Impress/sch/chart2
     361             :     virtual void CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0);
     362             : 
     363             :     // #i72889# used from CompleteRedraw() implementation internally, added to be able to do a complete redraw in single steps
     364             :     //
     365             :     // BeginCompleteRedraw returns (or even creates) a SdrPaintWindow whcih shall then be used as
     366             :     // target for paints. Since paints may be buffered, use it's GetTargetOutputDevice() method which will
     367             :     // return the buffer in case of bufered.
     368             :     // DoCompleteRedraw draws the DrawingLayer hierarchy then.
     369             :     // EndCompleteRedraw does the necessary refreshes, evtl. paints text edit and overlay and evtl destroys the
     370             :     // SdrPaintWindow again. This means: the SdrPaintWindow is no longer safe after this closing call.
     371             :     virtual SdrPaintWindow* BeginCompleteRedraw(OutputDevice* pOut);
     372             :     virtual void DoCompleteRedraw(SdrPaintWindow& rPaintWindow, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0);
     373             :     virtual void EndCompleteRedraw(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
     374             : 
     375             :     ////////////////////////////////////////////////////////////////////////////////////////////////////
     376             :     // used for the other applications basctl/sc/sw which call DrawLayer at PageViews
     377             :     // #i74769# Interface change to use common BeginCompleteRedraw/EndCompleteRedraw
     378             :     // #i76114# bDisableIntersect disables intersecting rReg with the Window's paint region
     379             :     SdrPaintWindow* BeginDrawLayers(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect = false);
     380             :     // used when the region passed to BeginDrawLayers needs to be changed
     381             :     void UpdateDrawLayersRegion(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect = false);
     382             :     void EndDrawLayers(SdrPaintWindow& rPaintWindow, bool bPaintFormLayer);
     383             : 
     384             : protected:
     385             :     ////////////////////////////////////////////////////////////////////////////////////////////////////
     386             :     // used to call the old PaintOutlinerView at the single PageViews. Will be replaced when the
     387             :     // outliner will be displayed on the overlay in edit mode.
     388             :     void ImpTextEditDrawing(SdrPaintWindow& rPaintWindow) const;
     389             : 
     390             :     ////////////////////////////////////////////////////////////////////////////////////////////////////
     391             :     // used to paint the form layer after the PreRender device is flushed (painted) to the window.
     392             :     void ImpFormLayerDrawing(SdrPaintWindow& rPaintWindow) const;
     393             : 
     394             :     Region OptimizeDrawLayersRegion(OutputDevice* pOut, const Region& rReg, bool bDisableIntersect);
     395             : 
     396             : public:
     397           2 :     sal_Bool IsPageVisible() const { return bPageVisible; }             // Seite (weisse Flaeche) malen oder nicht
     398           0 :     sal_Bool IsPageBorderVisible() const { return bPageBorderVisible; } // Seite (weisse Flaeche) malen oder nicht
     399           0 :     sal_Bool IsBordVisible() const { return bBordVisible; }             // Seitenrandlinie malen oder nicht
     400           0 :     sal_Bool IsGridVisible() const { return bGridVisible; }             // Rastergitter malen oder nicht
     401           0 :     sal_Bool IsGridFront() const { return bGridFront  ; }               // Rastergitter ueber die Objekte druebermalen oder dahinter
     402           0 :     sal_Bool IsHlplVisible() const { return bHlplVisible; }             // Hilfslinien der Seiten malen oder nicht
     403           0 :     sal_Bool IsHlplFront() const { return bHlplFront  ; }               // Hilfslinie ueber die Objekte druebermalen oder dahinter
     404             :     sal_Bool IsGlueVisible() const { return bGlueVisible; }             // Konnektoren der objekte sichtbar oder nicht
     405             :     Color GetGridColor() const;
     406           0 :     void SetPageVisible(bool bOn = true) { bPageVisible=bOn; InvalidateAllWin(); }
     407             :     void SetPageBorderVisible(bool bOn = true) { bPageBorderVisible=bOn; InvalidateAllWin(); }
     408           0 :     void SetBordVisible(bool bOn = true) { bBordVisible=bOn; InvalidateAllWin(); }
     409           0 :     void SetGridVisible(bool bOn = true) { bGridVisible=bOn; InvalidateAllWin(); }
     410             :     void SetGridFront(bool bOn = true) { bGridFront  =bOn; InvalidateAllWin(); }
     411           0 :     void SetHlplVisible(bool bOn = true) { bHlplVisible=bOn; InvalidateAllWin(); }
     412             :     void SetHlplFront(bool bOn = true) { bHlplFront  =bOn; InvalidateAllWin(); }
     413           0 :     void SetGlueVisible(bool bOn = true) { if (bGlueVisible!=(unsigned)bOn) { bGlueVisible=bOn; if (!bGlueVisible2 && !bGlueVisible3 && !bGlueVisible4) GlueInvalidate(); } }
     414             :     void SetGridColor( Color aColor );
     415             : 
     416         134 :     sal_Bool IsPreviewRenderer() const { return (sal_Bool )mbPreviewRenderer; }
     417             :     void SetPreviewRenderer(bool bOn) { if((unsigned)bOn != mbPreviewRenderer) { mbPreviewRenderer=bOn; }}
     418             : 
     419             :     // access methods for calc and sw hide object modes
     420         244 :     bool getHideOle() const { return mbHideOle; }
     421         244 :     bool getHideChart() const { return mbHideChart; }
     422         244 :     bool getHideDraw() const { return mbHideDraw; }
     423         244 :     bool getHideFormControl() const { return mbHideFormControl; }
     424             :     void setHideOle(bool bNew) { if(bNew != (bool)mbHideOle) mbHideOle = bNew; }
     425             :     void setHideChart(bool bNew) { if(bNew != (bool)mbHideChart) mbHideChart = bNew; }
     426             :     void setHideDraw(bool bNew) { if(bNew != (bool)mbHideDraw) mbHideDraw = bNew; }
     427             :     void setHideFormControl(bool bNew) { if(bNew != (bool)mbHideFormControl) mbHideFormControl = bNew; }
     428             : 
     429             :     void SetGridCoarse(const Size& rSiz) { aGridBig=rSiz; }
     430             :     void SetGridFine(const Size& rSiz) { aGridFin=rSiz; if (aGridFin.Height()==0) aGridFin.Height()=aGridFin.Width(); if (bGridVisible) InvalidateAllWin(); } // #40479#
     431           4 :     const Size& GetGridCoarse() const { return aGridBig; }
     432           4 :     const Size& GetGridFine() const { return aGridFin; }
     433             : 
     434             :     void InvalidateAllWin();
     435             :     void InvalidateAllWin(const Rectangle& rRect, sal_Bool bPlus1Pix=sal_False);
     436             : 
     437             :     // Wenn die View kein Invalidate() an den Fenstern durchfuehren soll, muss
     438             :     // man diese beiden folgenden Methoden ueberladen und entsprechend anders
     439             :     // reagieren.
     440             :     virtual void InvalidateOneWin(Window& rWin);
     441             :     virtual void InvalidateOneWin(Window& rWin, const Rectangle& rRect);
     442             : 
     443             :     void SetActiveLayer(const String& rName) { aAktLayer=rName; }
     444             :     const String&  GetActiveLayer() const { return aAktLayer; }
     445             : 
     446             :     // Verlassen einer betretenen Objektgruppe aller sichtbaren Seiten.
     447             :     // (wie MsDos chdir ..)
     448             :     void LeaveOneGroup();
     449             : 
     450             :     // Verlassen aller betretenen Objektgruppen aller sichtbaren Seiten.
     451             :     // (wie MsDos chdir \)
     452             :     void LeaveAllGroup();
     453             : 
     454             :     // Feststellen, ob Leave sinnvoll ist.
     455             :     bool IsGroupEntered() const;
     456             : 
     457             :     // DefaultAttribute an der View: Neu erzeugte Objekte bekommen diese
     458             :     // Attribute direkt nach dem Erzeugen erstmal zugewiesen.
     459             :     void SetDefaultAttr(const SfxItemSet& rAttr, sal_Bool bReplaceAll);
     460             :     const SfxItemSet& GetDefaultAttr() const { return aDefaultAttr; }
     461             :     void SetDefaultStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr);
     462           0 :     SfxStyleSheet* GetDefaultStyleSheet() const { return pDefaultStyleSheet; }
     463             : 
     464             :     void SetNotPersistDefaultAttr(const SfxItemSet& rAttr, sal_Bool bReplaceAll);
     465             :     void MergeNotPersistDefaultAttr(SfxItemSet& rAttr, sal_Bool bOnlyHardAttr) const;
     466             : 
     467             :     // use this mode as mode to draw all internal GraphicManager objects with
     468             :     sal_uIntPtr GetGraphicManagerDrawMode() const { return nGraphicManagerDrawMode; }
     469             :     void SetGraphicManagerDrawMode( sal_uIntPtr nMode ) { nGraphicManagerDrawMode = nMode; }
     470             : 
     471             :     // SwapIn (z.B. von Grafiken) asynchron durchfuehren. Also nicht
     472             :     // beim Paint sofort nachladen, sondern dort das Nachladen anstossen.
     473             :     // Nach Abschluss des Nachladens wird das Objekt dann angezeigt.
     474             :     // Hat nur z.Zt. Wirkung, wenn SwapGraphics am Model eingeschaltet ist.
     475             :     // Default=FALSE. Flag ist nicht persistent.
     476           0 :     sal_Bool IsSwapAsynchron() const { return bSwapAsynchron; }
     477             :     void SetSwapAsynchron(sal_Bool bJa=sal_True) { bSwapAsynchron=bJa; }
     478             :     virtual sal_Bool KeyInput(const KeyEvent& rKEvt, Window* pWin);
     479             : 
     480           0 :     virtual sal_Bool MouseButtonDown(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return sal_False; }
     481           0 :     virtual sal_Bool MouseButtonUp(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return sal_False; }
     482           0 :     virtual sal_Bool MouseMove(const MouseEvent& /*rMEvt*/, Window* /*pWin*/) { return sal_False; }
     483           0 :     virtual sal_Bool Command(const CommandEvent& /*rCEvt*/, Window* /*pWin*/) { return sal_False; }
     484             :     sal_Bool Cut(sal_uIntPtr /*nFormat*/=SDR_ANYFORMAT) { return sal_False; }
     485             :     sal_Bool Yank(sal_uIntPtr /*nFormat*/=SDR_ANYFORMAT) { return sal_False; }
     486             :     sal_Bool Paste(Window* /*pWin*/=NULL, sal_uIntPtr /*nFormat*/=SDR_ANYFORMAT) { return sal_False; }
     487             : 
     488             :     /* new interface src537 */
     489             :     sal_Bool GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr=sal_False) const;
     490             : 
     491             :     sal_Bool SetAttributes(const SfxItemSet& rSet, sal_Bool bReplaceAll);
     492             :     SfxStyleSheet* GetStyleSheet() const; // SfxStyleSheet* GetStyleSheet(sal_Bool& rOk) const;
     493             :     sal_Bool SetStyleSheet(SfxStyleSheet* pStyleSheet, sal_Bool bDontRemoveHardAttr);
     494             : 
     495             :     virtual void MakeVisible(const Rectangle& rRect, Window& rWin);
     496             : 
     497             :     // Fuer PlugIn. Wird vom Paint des OLE-Obj gerufen.
     498             :     virtual void DoConnect(SdrOle2Obj* pOleObj);
     499             : 
     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             :     sal_Bool IsAnimationEnabled() const { return ( SDR_ANIMATION_ANIMATE == eAnimationMode ); }
     504             :     void SetAnimationEnabled( sal_Bool bEnable=sal_True );
     505             : 
     506             :     // set/unset pause state for animations
     507             :     bool IsAnimationPause() const { return bAnimationPause; }
     508             :     void SetAnimationPause( bool bSet );
     509             : 
     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; }
     516             : 
     517             :     // bei bShow=sal_False wird der Browser destruiert
     518             : #ifdef DBG_UTIL
     519             :     void ShowItemBrowser(sal_Bool bShow=sal_True);
     520             :     sal_Bool IsItemBrowserVisible() const { return pItemBrowser!=NULL && ((Window*)pItemBrowser)->IsVisible(); }
     521             :     Window* GetItemBrowser() const { return (Window*)pItemBrowser; }
     522             : #endif
     523             : 
     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);
     528             : 
     529           9 :     sal_Bool IsPrintPreview() const { return bPrintPreview; }
     530             :     void SetPrintPreview(bool bOn = true) { bPrintPreview=bOn; }
     531             : 
     532             :     virtual void onChangeColorConfig();
     533             : 
     534             :     // #103834# Set background color for svx at SdrPageViews
     535             :     void SetApplicationBackgroundColor(Color aBackgroundColor);
     536             : 
     537             :     // #103911# Set document color for svx at SdrPageViews
     538             :     void SetApplicationDocumentColor(Color aDocumentColor);
     539             : 
     540             :     // #i38135#
     541             :     // Sets the timer for Object animations and restarts.
     542             :     void SetAnimationTimer(sal_uInt32 nTime);
     543             : 
     544             :     // access to Drawinglayer configuration options
     545        1039 :     const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
     546             : };
     547             : 
     548             : #endif //_SVDPNTV_HXX
     549             : 
     550             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10