LCOV - code coverage report
Current view: top level - include/svx/sdr/contact - objectcontactofobjlistpainter.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 1 100.0 %
Date: 2015-06-13 12:38:46 Functions: 1 1 100.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 INCLUDED_SVX_SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
      21             : #define INCLUDED_SVX_SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
      22             : 
      23             : #include <svx/sdr/contact/objectcontact.hxx>
      24             : #include <svx/svxdllapi.h>
      25             : #include <svx/svdpage.hxx>
      26             : 
      27             : class SdrPage;
      28             : class SdrObject;
      29             : 
      30             : namespace sdr { namespace contact {
      31             : 
      32             : class SVX_DLLPUBLIC ObjectContactPainter : public ObjectContact
      33             : {
      34             : protected:
      35             :     // Hierarchy access methods
      36             :     virtual sal_uInt32 GetPaintObjectCount() const = 0;
      37             :     virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const = 0;
      38             : 
      39             : public:
      40             :     // basic constructor/destructor
      41             :     ObjectContactPainter();
      42             :     virtual ~ObjectContactPainter();
      43             : };
      44             : 
      45             : // typedef for transferring SdrObject
      46             : typedef ::std::vector< SdrObject* > SdrObjectVector;
      47             : 
      48             : class SVX_DLLPUBLIC ObjectContactOfObjListPainter : public ObjectContactPainter
      49             : {
      50             : protected:
      51             :     // Target OutputDevice
      52             :     OutputDevice&                                   mrTargetOutputDevice;
      53             : 
      54             :     // Set StartPoint for next run, also given in constructor
      55             :     SdrObjectVector                                 maStartObjects;
      56             : 
      57             :     // the processed page which is the base e.g. for PageNumberFields
      58             :     const SdrPage*                                  mpProcessedPage;
      59             : 
      60             :     // Hierarchy access methods
      61             :     virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE;
      62             :     virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
      63             : 
      64             : public:
      65             :     // basic constructor/destructor
      66             :     ObjectContactOfObjListPainter(
      67             :         OutputDevice& rTargetDevice,
      68             :         const SdrObjectVector& rObjects,
      69             :         const SdrPage* pProcessedPage);
      70             :     virtual ~ObjectContactOfObjListPainter();
      71             : 
      72             :     // Process the whole displaying
      73             :     virtual void ProcessDisplay(DisplayInfo& rDisplayInfo) SAL_OVERRIDE;
      74             : 
      75             :     // VirtualDevice? Default is false
      76             :     virtual bool isOutputToVirtualDevice() const SAL_OVERRIDE;
      77             : 
      78             :     // recording MetaFile? Default is false
      79             :     virtual bool isOutputToRecordingMetaFile() const SAL_OVERRIDE;
      80             : 
      81             :     // pdf export? Default is false
      82             :     virtual bool isOutputToPDFFile() const SAL_OVERRIDE;
      83             : 
      84             :     virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE;
      85             : };
      86             : 
      87             : class ObjectContactOfPagePainter : public ObjectContactPainter
      88             : {
      89             : protected:
      90             :     // the original ObjectContact this painter is working on
      91             :     ObjectContact&                                  mrOriginalObjectContact;
      92             : 
      93             :     // Set StartPoint for next run, also given in constructor
      94             :     SdrPageWeakRef                                  mxStartPage;
      95             : 
      96             :     // Hierarchy access methods
      97             :     virtual sal_uInt32 GetPaintObjectCount() const SAL_OVERRIDE;
      98             :     virtual ViewContact& GetPaintObjectViewContact(sal_uInt32 nIndex) const SAL_OVERRIDE;
      99             : 
     100             : public:
     101             :     // basic constructor
     102             :     ObjectContactOfPagePainter(
     103             :         const SdrPage* pPage,
     104             :         ObjectContact& rOriginalObjectContact);
     105             :     virtual ~ObjectContactOfPagePainter();
     106             : 
     107             :     // set another page
     108             :     void SetStartPage(const SdrPage* pPage);
     109           9 :     const SdrPage* GetStartPage() const { return mxStartPage.get(); }
     110             : 
     111             :     virtual OutputDevice* TryToGetOutputDevice() const SAL_OVERRIDE;
     112             : };
     113             : 
     114             : }}
     115             : 
     116             : 
     117             : 
     118             : #endif // INCLUDED_SVX_SDR_CONTACT_OBJECTCONTACTOFOBJLISTPAINTER_HXX
     119             : 
     120             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11