Avoid potential negative array index access to cached text.
[LibreOffice.git] / vcl / null / printerinfomanager.cxx
blob55d81e65a2f49cae0bcbc22b847a85eeafb97ec8
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 <memory>
21 #include <printerinfomanager.hxx>
22 #include <unx/gendata.hxx>
24 // needed since we declare a std::unique_ptr<SystemQueueInfo>
25 namespace psp
27 class SystemQueueInfo
32 using namespace psp;
33 using namespace osl;
35 PrinterInfoManager& PrinterInfoManager::get()
37 GenericUnixSalData* pSalData = GetGenericUnixSalData();
38 if (!pSalData->m_pPrinterInfoManager)
39 pSalData->m_pPrinterInfoManager.reset(new PrinterInfoManager());
40 return *pSalData->m_pPrinterInfoManager;
43 PrinterInfoManager::PrinterInfoManager( Type eType ) :
44 m_pQueueInfo( nullptr ),
45 m_eType( eType ),
46 m_aSystemDefaultPaper( "A4" )
48 // initSystemDefaultPaper();
51 PrinterInfoManager::~PrinterInfoManager()
56 bool PrinterInfoManager::checkPrintersChanged( bool /* bWait */ )
58 return false;
61 void PrinterInfoManager::initialize()
63 // ???
66 void PrinterInfoManager::listPrinters( ::std::vector< OUString >& rVector ) const
68 (void) this;
70 rVector.clear();
73 const PrinterInfo& PrinterInfoManager::getPrinterInfo( const OUString& /* rPrinter */ ) const
75 static PrinterInfo aEmptyInfo;
77 (void) this;
79 return aEmptyInfo;
82 bool PrinterInfoManager::checkFeatureToken( const OUString& /* rPrinterName */, std::string_view /* pToken */ ) const
84 (void) this;
86 return false;
89 FILE* PrinterInfoManager::startSpool( const OUString& /* rPrintername */, bool /* bQuickCommand */ )
91 return nullptr;
94 bool PrinterInfoManager::endSpool( const OUString& /*rPrintername*/, const OUString& /*rJobTitle*/, FILE* /* pFile */, const JobData& /*rDocumentJobData*/, bool /*bBanner*/, const OUString& /*rFaxNumber*/ )
96 return true;
99 void PrinterInfoManager::setupJobContextData( JobData& /* rData */ )
104 void PrinterInfoManager::setDefaultPaper( PPDContext& /* rContext */ ) const
106 (void) this;
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */