diff options
Diffstat (limited to '')
-rw-r--r-- | vcl/inc/print.h | 73 | ||||
-rw-r--r-- | vcl/inc/print.hrc | 115 |
2 files changed, 188 insertions, 0 deletions
diff --git a/vcl/inc/print.h b/vcl/inc/print.h new file mode 100644 index 000000000..13650ceef --- /dev/null +++ b/vcl/inc/print.h @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_VCL_INC_PRINT_H +#define INCLUDED_VCL_INC_PRINT_H + +#include <rtl/ustring.hxx> +#include <vcl/dllapi.h> +#include <vcl/print.hxx> +#include "salprn.hxx" + +#include <vector> +#include <unordered_map> + +class JobSetup; + +namespace vcl +{ class PrinterListener; } + +struct ImplPrnQueueData +{ + std::unique_ptr<QueueInfo> mpQueueInfo; + std::unique_ptr<SalPrinterQueueInfo> mpSalQueueInfo; + +// unlike other similar places, we need to ifdef this to keep old GCC baseline happy +#ifdef _MSC_VER + ImplPrnQueueData() {} + ImplPrnQueueData(ImplPrnQueueData&&) = default; + + ImplPrnQueueData& operator=( ImplPrnQueueData const & ) = delete; // MSVC2017 workaround + ImplPrnQueueData( ImplPrnQueueData const & ) = delete; // MSVC2017 workaround +#endif +}; + +class VCL_PLUGIN_PUBLIC ImplPrnQueueList +{ +public: + std::unordered_map< OUString, sal_Int32 > m_aNameToIndex; + std::vector< ImplPrnQueueData > m_aQueueInfos; + std::vector< OUString > m_aPrinterList; + + ImplPrnQueueList() {} + ~ImplPrnQueueList(); + + ImplPrnQueueList& operator=( ImplPrnQueueList const & ) = delete; // MSVC2017 workaround + ImplPrnQueueList( ImplPrnQueueList const & ) = delete; // MSVC2017 workaround + +void Add( std::unique_ptr<SalPrinterQueueInfo> pData ); + ImplPrnQueueData* Get( const OUString& rPrinter ); +}; + +void ImplDeletePrnQueueList(); +void ImplUpdateJobSetupPaper( JobSetup& rJobSetup ); + +#endif // INCLUDED_VCL_INC_PRINT_H + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/print.hrc b/vcl/inc/print.hrc new file mode 100644 index 000000000..91c11309a --- /dev/null +++ b/vcl/inc/print.hrc @@ -0,0 +1,115 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_VCL_INC_PRINT_HRC +#define INCLUDED_VCL_INC_PRINT_HRC + +#define NC_(Context, String) reinterpret_cast<char const *>(Context "\004" u8##String) + +const char* RID_STR_PAPERNAMES[] = +{ + // To translators: This is the first entry of a sequence of paper size names + NC_("RID_STR_PAPERNAMES", "A0"), + NC_("RID_STR_PAPERNAMES", "A1"), + NC_("RID_STR_PAPERNAMES", "A2"), + NC_("RID_STR_PAPERNAMES", "A3"), + NC_("RID_STR_PAPERNAMES", "A4"), + NC_("RID_STR_PAPERNAMES", "A5"), + NC_("RID_STR_PAPERNAMES", "B4 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B5 (ISO)"), + NC_("RID_STR_PAPERNAMES", "Letter"), + NC_("RID_STR_PAPERNAMES", "Legal"), + NC_("RID_STR_PAPERNAMES", "Tabloid"), + NC_("RID_STR_PAPERNAMES", "User Defined"), + NC_("RID_STR_PAPERNAMES", "B6 (ISO)"), + NC_("RID_STR_PAPERNAMES", "C4 Envelope"), + NC_("RID_STR_PAPERNAMES", "C5 Envelope"), + NC_("RID_STR_PAPERNAMES", "C6 Envelope"), + NC_("RID_STR_PAPERNAMES", "C6/5 Envelope"), + NC_("RID_STR_PAPERNAMES", "DL Envelope"), + NC_("RID_STR_PAPERNAMES", "Dia Slide"), + NC_("RID_STR_PAPERNAMES", "Screen 4:3"), + NC_("RID_STR_PAPERNAMES", "C"), + NC_("RID_STR_PAPERNAMES", "D"), + NC_("RID_STR_PAPERNAMES", "E"), + NC_("RID_STR_PAPERNAMES", "Executive"), + NC_("RID_STR_PAPERNAMES", "German Legal Fanfold"), + NC_("RID_STR_PAPERNAMES", "#8 (Monarch) Envelope"), + NC_("RID_STR_PAPERNAMES", "#6 3/4 (Personal) Envelope"), + NC_("RID_STR_PAPERNAMES", "#9 Envelope"), + NC_("RID_STR_PAPERNAMES", "#10 Envelope"), + NC_("RID_STR_PAPERNAMES", "#11 Envelope"), + NC_("RID_STR_PAPERNAMES", "#12 Envelope"), + NC_("RID_STR_PAPERNAMES", "16 Kai (16k)"), + NC_("RID_STR_PAPERNAMES", "32 Kai"), + NC_("RID_STR_PAPERNAMES", "Big 32 Kai"), + NC_("RID_STR_PAPERNAMES", "B4 (JIS)"), + NC_("RID_STR_PAPERNAMES", "B5 (JIS)"), + NC_("RID_STR_PAPERNAMES", "B6 (JIS)"), + NC_("RID_STR_PAPERNAMES", "Ledger"), + NC_("RID_STR_PAPERNAMES", "Statement"), + NC_("RID_STR_PAPERNAMES", "Quarto"), + NC_("RID_STR_PAPERNAMES", "10x14"), + NC_("RID_STR_PAPERNAMES", "#14 Envelope"), + NC_("RID_STR_PAPERNAMES", "C3 Envelope"), + NC_("RID_STR_PAPERNAMES", "Italian Envelope"), + NC_("RID_STR_PAPERNAMES", "U.S. Standard Fanfold"), + NC_("RID_STR_PAPERNAMES", "German Standard Fanfold"), + NC_("RID_STR_PAPERNAMES", "Japanese Postcard"), + NC_("RID_STR_PAPERNAMES", "9x11"), + NC_("RID_STR_PAPERNAMES", "10x11"), + NC_("RID_STR_PAPERNAMES", "15x11"), + NC_("RID_STR_PAPERNAMES", "Invitation Envelope"), + NC_("RID_STR_PAPERNAMES", "SuperA"), + NC_("RID_STR_PAPERNAMES", "SuperB"), + NC_("RID_STR_PAPERNAMES", "Letter Plus"), + NC_("RID_STR_PAPERNAMES", "A4 Plus"), + NC_("RID_STR_PAPERNAMES", "Double Postcard"), + NC_("RID_STR_PAPERNAMES", "A6"), + NC_("RID_STR_PAPERNAMES", "12x11"), + NC_("RID_STR_PAPERNAMES", "A7"), + NC_("RID_STR_PAPERNAMES", "A8"), + NC_("RID_STR_PAPERNAMES", "A9"), + NC_("RID_STR_PAPERNAMES", "A10"), + NC_("RID_STR_PAPERNAMES", "B0 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B1 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B2 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B3 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B7 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B8 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B9 (ISO)"), + NC_("RID_STR_PAPERNAMES", "B10 (ISO)"), + NC_("RID_STR_PAPERNAMES", "C2 Envelope"), + NC_("RID_STR_PAPERNAMES", "C7 Envelope"), + NC_("RID_STR_PAPERNAMES", "C8 Envelope"), + NC_("RID_STR_PAPERNAMES", "Arch A"), + NC_("RID_STR_PAPERNAMES", "Arch B"), + NC_("RID_STR_PAPERNAMES", "Arch C"), + NC_("RID_STR_PAPERNAMES", "Arch D"), + NC_("RID_STR_PAPERNAMES", "Arch E"), + NC_("RID_STR_PAPERNAMES", "Screen 16:9"), + NC_("RID_STR_PAPERNAMES", "Screen 16:10"), + NC_("RID_STR_PAPERNAMES", "16k (195 x 270)"), + // To translators: This is the last entry of the sequence of paper size names + NC_("RID_STR_PAPERNAMES", "16k (197 x 273)") +}; + +#endif // INCLUDED_VCL_INC_PRINT_HRC + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |