Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / vcl / null / printerinfomanager.cxx
bloba480856a0fbaddbcb0cf29b25ab4eb7f9b45ffde
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #include "vcl/printerinfomanager.hxx"
22 #include "generic/gendata.hxx"
24 using namespace psp;
25 using namespace osl;
28 PrinterInfoManager& PrinterInfoManager::get()
30 SalData* pSalData = GetSalData();
31 if( ! pSalData->m_pPIManager )
32 pSalData->m_pPIManager = new PrinterInfoManager();
33 return *pSalData->m_pPIManager;
36 void PrinterInfoManager::release()
38 SalData* pSalData = GetSalData();
39 delete pSalData->m_pPIManager;
40 pSalData->m_pPIManager = NULL;
43 PrinterInfoManager::PrinterInfoManager( Type eType ) :
44 m_pQueueInfo( NULL ),
45 m_eType( eType ),
46 m_bUseIncludeFeature( false ),
47 m_bUseJobPatch( true ),
48 m_aSystemDefaultPaper( "A4" ),
49 #ifdef LIBO_HEADLESS
50 m_bDisableCUPS( true )
51 #else
52 m_bDisableCUPS( false )
53 #endif
55 // initSystemDefaultPaper();
58 PrinterInfoManager::~PrinterInfoManager()
63 bool PrinterInfoManager::checkPrintersChanged( bool /* bWait */ )
65 return false;
68 void PrinterInfoManager::initialize()
70 // ???
73 bool PrinterInfoManager::isCUPSDisabled() const
75 return m_bDisableCUPS;
78 void PrinterInfoManager::setCUPSDisabled( bool /* bDisable */ )
80 // cups is already disabled in config so do nothing
83 void PrinterInfoManager::listPrinters( ::std::list< OUString >& rList ) const
85 rList.clear();
88 const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& /* rPrinter */ ) const
90 static PrinterInfo aEmptyInfo;
92 return aEmptyInfo;
95 void PrinterInfoManager::changePrinterInfo( const OUString& /* rPrinter */, const PrinterInfo& /* rNewInfo */ )
100 bool PrinterInfoManager::writePrinterConfig()
102 return false;
105 bool PrinterInfoManager::addPrinter( const OUString& /* rPrinterName */, const OUString& /* rDriverName */ )
107 return false;
110 bool PrinterInfoManager::removePrinter( const OUString& /* rPrinterName */, bool /* bCheckOnly */ )
112 return false;
115 bool PrinterInfoManager::setDefaultPrinter( const OUString& /* rPrinterName */ )
117 return false;
120 bool PrinterInfoManager::addOrRemovePossible() const
122 return false;
125 void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& /* rInfo */ ) const
130 void PrinterInfoManager::getSystemPrintCommands( std::list< OUString >& /* rCommands */ )
135 const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::getSystemPrintQueues()
137 return m_aSystemPrintQueues;
140 bool PrinterInfoManager::checkFeatureToken( const OUString& /* rPrinterName */, const char* /* pToken */ ) const
142 return false;
145 FILE* PrinterInfoManager::startSpool( const OUString& /* rPrintername */, bool /* bQuickCommand */ )
147 return NULL;
150 int PrinterInfoManager::endSpool( const OUString& /*rPrintername*/, const OUString& /*rJobTitle*/, FILE* /* pFile */, const JobData& /*rDocumentJobData*/, bool /*bBanner*/ )
152 return true;
155 void PrinterInfoManager::setupJobContextData( JobData& /* rData */ )
160 void PrinterInfoManager::setDefaultPaper( PPDContext& /* rContext */ ) const
165 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */