tdf#161775 sfx2: SfxRedactionHelper: actually use font for layout
[LibreOffice.git] / include / sfx2 / printopt.hxx
blobee105f86c7301f8c93c8e6a48fcb07630da21034
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 #pragma once
22 #include <sal/config.h>
23 #include <sfx2/dllapi.h>
24 #include <sfx2/tabdlg.hxx>
25 #include <sal/types.h>
26 #include <vcl/printer/Options.hxx>
28 class SFX2_DLLPUBLIC SfxCommonPrintOptionsTabPage final : public SfxTabPage
30 private:
32 std::unique_ptr<weld::RadioButton> m_xPrinterOutputRB;
33 std::unique_ptr<weld::RadioButton> m_xPrintFileOutputRB;
34 std::unique_ptr<weld::CheckButton> m_xReduceTransparencyCB;
35 std::unique_ptr<weld::Widget> m_xReduceTransparencyImg;
36 std::unique_ptr<weld::RadioButton> m_xReduceTransparencyAutoRB;
37 std::unique_ptr<weld::RadioButton> m_xReduceTransparencyNoneRB;
38 std::unique_ptr<weld::Widget> m_xReduceTransparencyModeImg;
39 std::unique_ptr<weld::CheckButton> m_xReduceGradientsCB;
40 std::unique_ptr<weld::Widget> m_xReduceGradientsImg;
41 std::unique_ptr<weld::RadioButton> m_xReduceGradientsStripesRB;
42 std::unique_ptr<weld::RadioButton> m_xReduceGradientsColorRB;
43 std::unique_ptr<weld::Widget> m_xReduceGradientsModeImg;
44 std::unique_ptr<weld::SpinButton> m_xReduceGradientsStepCountNF;
45 std::unique_ptr<weld::CheckButton> m_xReduceBitmapsCB;
46 std::unique_ptr<weld::Widget> m_xReduceBitmapsImg;
47 std::unique_ptr<weld::RadioButton> m_xReduceBitmapsOptimalRB;
48 std::unique_ptr<weld::RadioButton> m_xReduceBitmapsNormalRB;
49 std::unique_ptr<weld::RadioButton> m_xReduceBitmapsResolutionRB;
50 std::unique_ptr<weld::Widget> m_xReduceBitmapsModeImg;
51 std::unique_ptr<weld::ComboBox> m_xReduceBitmapsResolutionLB;
52 std::unique_ptr<weld::CheckButton> m_xReduceBitmapsTransparencyCB;
53 std::unique_ptr<weld::Widget> m_xReduceBitmapsTransparencyImg;
54 std::unique_ptr<weld::CheckButton> m_xConvertToGreyscalesCB;
55 std::unique_ptr<weld::Widget> m_xConvertToGreyscalesImg;
56 std::unique_ptr<weld::CheckButton> m_xPaperSizeCB;
57 std::unique_ptr<weld::Widget> m_xPaperSizeImg;
58 std::unique_ptr<weld::CheckButton> m_xPaperOrientationCB;
59 std::unique_ptr<weld::Widget> m_xPaperOrientationImg;
60 std::unique_ptr<weld::CheckButton> m_xTransparencyCB;
61 std::unique_ptr<weld::Widget> m_xTransparencyImg;
63 private:
65 vcl::printer::Options maPrinterOptions;
66 vcl::printer::Options maPrintFileOptions;
68 DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl, weld::Toggleable&, void );
69 DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl, weld::Toggleable&, void);
71 DECL_DLLPRIVATE_LINK( ClickReduceTransparencyCBHdl, weld::Toggleable&, void );
72 DECL_DLLPRIVATE_LINK( ClickReduceGradientsCBHdl, weld::Toggleable&, void );
73 DECL_DLLPRIVATE_LINK( ClickReduceBitmapsCBHdl, weld::Toggleable&, void );
75 DECL_DLLPRIVATE_LINK( ToggleReduceGradientsStripesRBHdl, weld::Toggleable&, void );
76 DECL_DLLPRIVATE_LINK( ToggleReduceBitmapsResolutionRBHdl, weld::Toggleable&, void );
78 SAL_DLLPRIVATE void ImplUpdateControls( const vcl::printer::Options* pCurrentOptions );
79 SAL_DLLPRIVATE void ImplSaveControls( vcl::printer::Options* pCurrentOptions );
81 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
83 public:
85 SfxCommonPrintOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
86 virtual ~SfxCommonPrintOptionsTabPage() override;
88 virtual OUString GetAllStrings() override;
90 virtual bool FillItemSet( SfxItemSet* rSet ) override;
91 virtual void Reset( const SfxItemSet* rSet ) override;
93 static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */