LCOV - code coverage report
Current view: top level - libreoffice/vcl/inc - salprn.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 2 0.0 %
Date: 2012-12-27 Functions: 0 2 0.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 _SV_SALPRN_HXX
      21             : #define _SV_SALPRN_HXX
      22             : 
      23             : #include <rtl/ustring.hxx>
      24             : 
      25             : #include <tools/solar.h>
      26             : #include <vcl/dllapi.h>
      27             : #include <vcl/prntypes.hxx>
      28             : 
      29             : #include <vector>
      30             : 
      31             : class SalGraphics;
      32             : class SalFrame;
      33             : struct ImplJobSetup;
      34             : namespace vcl { class PrinterController; }
      35             : 
      36             : // -----------------------
      37             : // - SalPrinterQueueInfo -
      38             : // -----------------------
      39             : 
      40             : struct VCL_PLUGIN_PUBLIC SalPrinterQueueInfo
      41             : {
      42             :     rtl::OUString               maPrinterName;
      43             :     rtl::OUString               maDriver;
      44             :     rtl::OUString               maLocation;
      45             :     rtl::OUString               maComment;
      46             :     sal_uLong                   mnStatus;
      47             :     sal_uLong                   mnJobs;
      48             :     rtl::OUString*              mpSysData;
      49             : 
      50             :                             SalPrinterQueueInfo();
      51             :                             ~SalPrinterQueueInfo();
      52             : };
      53             : 
      54             : // ------------------
      55             : // - SalInfoPrinter -
      56             : // ------------------
      57             : 
      58             : class VCL_PLUGIN_PUBLIC SalInfoPrinter
      59             : {
      60             : public:
      61             :     std::vector< PaperInfo  >           m_aPaperFormats;    // all printer supported formats
      62             :     bool                                m_bPapersInit;      // set to true after InitPaperFormats
      63             :     bool                                m_bCompatMetrics;
      64             : 
      65           0 :     SalInfoPrinter() : m_bPapersInit( false ), m_bCompatMetrics( false ) {}
      66             :     virtual ~SalInfoPrinter();
      67             : 
      68             :     // SalGraphics or NULL, but two Graphics for all SalFrames
      69             :     // must be returned
      70             :     virtual SalGraphics*            GetGraphics() = 0;
      71             :     virtual void                    ReleaseGraphics( SalGraphics* pGraphics ) = 0;
      72             : 
      73             :     virtual sal_Bool                    Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0;
      74             :     // This function set the driver data and
      75             :     // set the new indepen data in pSetupData
      76             :     virtual sal_Bool                    SetPrinterData( ImplJobSetup* pSetupData ) = 0;
      77             :     // This function merged the indepen driver data
      78             :     // and set the new indepen data in pSetupData
      79             :     // Only the data must changed, where the bit
      80             :     // in nFlags is set
      81             :     virtual sal_Bool                    SetData( sal_uLong nFlags, ImplJobSetup* pSetupData ) = 0;
      82             : 
      83             :     virtual void                    GetPageInfo( const ImplJobSetup* pSetupData,
      84             :                                                  long& rOutWidth, long& rOutHeight,
      85             :                                                  long& rPageOffX, long& rPageOffY,
      86             :                                                  long& rPageWidth, long& rPageHeight ) = 0;
      87             :     virtual sal_uLong                   GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType ) = 0;
      88             :     virtual sal_uLong                   GetPaperBinCount( const ImplJobSetup* pSetupData ) = 0;
      89             :     virtual rtl::OUString                  GetPaperBinName( const ImplJobSetup* pSetupData, sal_uLong nPaperBin ) = 0;
      90             :     // fills m_aPaperFormats and sets m_bPapersInit to true
      91             :     virtual void                    InitPaperFormats( const ImplJobSetup* pSetupData ) = 0;
      92             :     // returns angle that a landscape page will be turned counterclockwise wrt to portrait
      93             :     virtual int                 GetLandscapeAngle( const ImplJobSetup* pSetupData ) = 0;
      94             : };
      95             : 
      96             : // --------------
      97             : // - SalPrinter -
      98             : // --------------
      99             : 
     100             : class VCL_PLUGIN_PUBLIC SalPrinter
     101             : {
     102             : public:                     // public for Sal Implementation
     103           0 :     SalPrinter() {}
     104             :     virtual ~SalPrinter();
     105             : 
     106             :     virtual sal_Bool                    StartJob( const rtl::OUString* pFileName,
     107             :                                               const rtl::OUString& rJobName,
     108             :                                               const rtl::OUString& rAppName,
     109             :                                               sal_uLong nCopies,
     110             :                                               bool bCollate,
     111             :                                               bool bDirect,
     112             :                                               ImplJobSetup* pSetupData ) = 0;
     113             : 
     114             :     // implement for pull model print systems only,
     115             :     // default implementations (see salvtables.cxx) just returns sal_False
     116             :     virtual sal_Bool                    StartJob( const rtl::OUString* pFileName,
     117             :                                               const rtl::OUString& rJobName,
     118             :                                               const rtl::OUString& rAppName,
     119             :                                               ImplJobSetup* pSetupData,
     120             :                                               vcl::PrinterController& rController );
     121             : 
     122             :     virtual sal_Bool                    EndJob() = 0;
     123             :     virtual sal_Bool                    AbortJob() = 0;
     124             :     virtual SalGraphics*            StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData ) = 0;
     125             :     virtual sal_Bool                    EndPage() = 0;
     126             :     virtual sal_uLong                   GetErrorCode() = 0;
     127             : 
     128             : };
     129             : 
     130             : #endif // _SV_SALPRN_HXX
     131             : 
     132             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10