LCOV - code coverage report
Current view: top level - libreoffice/svx/inc/svx - svdxcgv.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 1 100.0 %
Date: 2012-12-17 Functions: 1 2 50.0 %
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 _SVDXCGV_HXX
      21             : #define _SVDXCGV_HXX
      22             : 
      23             : #include <svx/svdedxv.hxx>
      24             : 
      25             : #include <vcl/gdimtf.hxx>
      26             : #include "svx/svxdllapi.h"
      27             : 
      28             : ////////////////////////////////////////////////////////////////////////////////////////////////////
      29             : ////////////////////////////////////////////////////////////////////////////////////////////////////
      30             : //
      31             : //  @@@@@ @@   @@  @@@@  @@  @@  @@@@  @@  @@  @@@@  @@@@@  @@ @@ @@ @@@@@ @@   @@
      32             : //  @@    @@@ @@@ @@  @@ @@  @@ @@  @@ @@@ @@ @@  @@ @@     @@ @@ @@ @@    @@   @@
      33             : //  @@     @@@@@  @@     @@  @@ @@  @@ @@@@@@ @@     @@     @@ @@ @@ @@    @@ @ @@
      34             : //  @@@@    @@@   @@     @@@@@@ @@@@@@ @@@@@@ @@ @@@ @@@@   @@@@@ @@ @@@@  @@@@@@@
      35             : //  @@     @@@@@  @@     @@  @@ @@  @@ @@ @@@ @@  @@ @@      @@@  @@ @@    @@@@@@@
      36             : //  @@    @@@ @@@ @@  @@ @@  @@ @@  @@ @@  @@ @@  @@ @@      @@@  @@ @@    @@@ @@@
      37             : //  @@@@@ @@   @@  @@@@  @@  @@ @@  @@ @@  @@  @@@@@ @@@@@    @   @@ @@@@@ @@   @@
      38             : //
      39             : ////////////////////////////////////////////////////////////////////////////////////////////////////
      40             : ////////////////////////////////////////////////////////////////////////////////////////////////////
      41             : 
      42         508 : class SVX_DLLPUBLIC SdrExchangeView: public SdrObjEditView
      43             : {
      44             :     friend class SdrPageView;
      45             : 
      46             : protected:
      47             : 
      48             :     void                ImpGetPasteObjList(Point& rPos, SdrObjList*& rpLst);
      49             :     void                ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Point& rCenter, const Size& rSiz, const MapMode& rMap, sal_uInt32 nOptions);
      50             :     sal_Bool                ImpGetPasteLayer(const SdrObjList* pObjList, SdrLayerID& rLayer) const;
      51             : 
      52             :     // liefert True, wenn rPt geaendert wurde
      53             :     sal_Bool                ImpLimitToWorkArea(Point& rPt) const;
      54             : 
      55             : protected:
      56             :     // #i71538# make constructors of SdrView sub-components protected to avoid incomplete incarnations which may get casted to SdrView
      57             :     SdrExchangeView(SdrModel* pModel1, OutputDevice* pOut = 0L);
      58             : 
      59             : public:
      60             :     // Alle markierten Objekte auf dem angegebenen OutputDevice ausgeben.
      61             :     virtual void        DrawMarkedObj(OutputDevice& rOut) const;
      62             : 
      63             :     // Z.B. fuer's Clipboard, Drag&Drop, ...
      64             :     // Alle markierten Objekte in ein Metafile stecken. Z.Zt. noch etwas
      65             :     // buggee (Offset..., Fremdgrafikobjekte (SdrGrafObj), Virtuelle
      66             :     // Objektkopien (SdrVirtObj) mit Ankerpos<>(0,0)).
      67             :     GDIMetaFile GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked = false) const;
      68             : 
      69             :     // Alle markierten Objekte auf eine Bitmap malen. Diese hat die Farbtiefe
      70             :     // und Aufloesung des Bildschirms.
      71             :     BitmapEx GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked = false) const;
      72             : 
      73             :     // Alle markierten Objekte in ein neues Model kopieren. Dieses neue Model
      74             :     // hat dann genau eine Page. Das Flag PageNotValid an diesem Model ist
      75             :     // gesetzt. Daran ist zu erkennen, dass nur die Objekte der Page Gueltikeit
      76             :     // haben, die Page sebst jedoch nicht (Seitengroesse, Raender). Das neue
      77             :     // Model wird auf dem Heap erzeugt und wird an den Aufrufer dieser Methode
      78             :     // uebergeben. Dieser hat es dann spaeter zu entsorgen.
      79             :     // Beim einfuegen der markierten Objekte in die eine Page des neuen Model
      80             :     // findet ein Merging der seitenlokalen Layer statt. Sollte kein Platz mehr
      81             :     // fuer weitere seitenlokale Layer sein, wird den entsprechenden Objekten
      82             :     // der Default-Layer zugewiesen (Layer 0, (dokumentglobaler Standardlayer).
      83             :     virtual SdrModel*   GetMarkedObjModel() const;
      84             : 
      85             :     Graphic         GetAllMarkedGraphic() const;
      86             :     SdrModel*       GetAllMarkedModel() const { return GetMarkedObjModel(); }
      87             : 
      88             :     /** Generate a Graphic for the given draw object in the given model
      89             : 
      90             :         @param pModel
      91             :         Must not be NULL. Denotes the draw model the object is a part
      92             :         of.
      93             : 
      94             :         @param pObj
      95             :         The object (can also be a group object) to retrieve a Graphic
      96             :         for. Must not be NULL.
      97             : 
      98             :         @return a graphical representation of the given object, as it
      99             :         appears on screen (e.g. with rotation, if any, applied).
     100             :      */
     101             :     static Graphic  GetObjGraphic( const SdrModel* pModel, const SdrObject* pObj );
     102             : 
     103             :     // Bei allen Paste-Methoden werden die neuen Draw-Objekte markiert.
     104             :     // Wird der Parameter bAddMark auf sal_True gesetzt, so werden die neuen
     105             :     // DrawObjekte zu einer bereits bestehenden Selektion "hinzumarkiert".
     106             :     // Dieser Fall ist fuer Drag&Drop mit mehreren Items gedacht.
     107             :     // Die Methoden mit Point-Parameter fuegen neue Objekte zentriert an
     108             :     // dieser Position ein, die anderen zentriert am 1.OutputDevice der View.
     109             :     // Ist der Parameter pPg gesetzt, werden die Objekte and dieser Seite
     110             :     // eingefuegt. Die Positionierung (rPos bzw. Zentrierung) bezieht sich
     111             :     // dann nichtmehr auf die View sondern auf die Page.
     112             :     // Hinweis: SdrObjList ist Basisklasse von SdrPage.
     113             :     // Die Methoden liefern sal_True, wenn die Objekte erfolgreich erzeugt und
     114             :     // eingefuegt wurden. Bei pLst=sal_False und kein TextEdit aktiv kann man
     115             :     // sich dann auch darauf verlassen, dass diese an der View markiert sind.
     116             :     // Andernfalls erfolgt die Markierung nur, wenn pLst z.Zt. auch an der
     117             :     // View angezeigt wird.
     118             :     // Gueltige Werte fuer nOptions sind SDRINSERT_DONTMARK und
     119             :     // SDRINSERT_ADDMARK (siehe svdedtv.hxx).
     120             :     virtual sal_Bool    Paste(const SdrModel& rMod, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
     121             :     sal_Bool            Paste(const String& rStr, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
     122             :     sal_Bool            Paste(SvStream& rInput, const String& rBaseURL, sal_uInt16 eFormat, const Point& rPos, SdrObjList* pLst=NULL, sal_uInt32 nOptions=0);
     123             : 
     124             :     sal_Bool            Cut( sal_uIntPtr nFormat = SDR_ANYFORMAT );
     125             : 
     126             :     sal_Bool            Yank( sal_uIntPtr nFormat = SDR_ANYFORMAT );
     127             : 
     128             :     sal_Bool            Paste( Window* pWin = NULL, sal_uIntPtr nFormat = SDR_ANYFORMAT );
     129             :     sal_Bool            PasteClipboard( OutputDevice* pOut = NULL, sal_uIntPtr nFormat = SDR_ANYFORMAT, sal_uInt32 nOptions = 0 );
     130             : };
     131             : 
     132             : #endif //_SVDXCGV_HXX
     133             : 
     134             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10