bump product version to 4.1.6.2
[LibreOffice.git] / include / svx / compressgraphicdialog.hxx
blobe53f46bd71701281421d7db0283738624911d30f
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 .
19 #ifndef _COMPRESS_GRAPHIC_DIALOG_HXX
20 #define _COMPRESS_GRAPHIC_DIALOG_HXX
22 #include <vcl/dialog.hxx>
23 #include <vcl/button.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/graph.hxx>
26 #include <vcl/lstbox.hxx>
27 #include <vcl/field.hxx>
28 #include <sfx2/bindings.hxx>
29 #include "svx/svxdllapi.h"
31 class SdrGrafObj;
33 class SVX_DLLPUBLIC CompressGraphicsDialog : public ModalDialog
35 private:
36 FixedText* m_pLabelGraphicType;
37 FixedText* m_pFixedText2;
38 FixedText* m_pFixedText3;
39 FixedText* m_pFixedText5;
40 FixedText* m_pFixedText6;
42 CheckBox* m_pReduceResolutionCB;
43 NumericField* m_pMFNewWidth;
44 NumericField* m_pMFNewHeight;
45 ComboBox* m_pResolutionLB;
46 RadioButton* m_pLosslessRB;
47 RadioButton* m_pJpegCompRB;
48 NumericField* m_pCompressionMF;
49 NumericField* m_pQualityMF;
50 PushButton* m_pBtnCalculate;
51 ListBox* m_pInterpolationCombo;
53 SdrGrafObj* m_pGraphicObj;
54 Graphic m_aGraphic;
55 Size m_aViewSize100mm;
56 Rectangle m_aCropRectangle;
57 SfxBindings& m_rBindings;
59 double m_dResolution;
61 void Initialize();
63 DECL_LINK( NewWidthModifiedHdl, void* );
64 DECL_LINK( NewHeightModifiedHdl, void* );
65 DECL_LINK( ResolutionModifiedHdl, void* );
66 DECL_LINK( ToggleCompressionRB, void* );
67 DECL_LINK( ToggleReduceResolutionRB, void* );
69 DECL_LINK( CalculateClickHdl, void* );
71 void Update();
72 void UpdateNewWidthMF();
73 void UpdateNewHeightMF();
74 void UpdateResolutionLB();
76 void Compress(SvStream& aStream);
78 double GetViewWidthInch();
79 double GetViewHeightInch();
81 sal_uLong GetSelectedInterpolationType();
83 public:
84 CompressGraphicsDialog( Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings );
85 CompressGraphicsDialog( Window* pParent, Graphic& rGraphic, Size rViewSize100mm, Rectangle& rCropRectangle, SfxBindings& rBindings );
87 virtual ~CompressGraphicsDialog();
89 SdrGrafObj* GetCompressedSdrGrafObj();
90 Graphic GetCompressedGraphic();
92 Rectangle GetScaledCropRectangle();
95 #endif
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */