fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / inc / dpgroupdlg.hxx
blob3ba0db194083c06687e8745e022b534d1f4cbcfc
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 #ifndef INCLUDED_SC_SOURCE_UI_INC_DPGROUPDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_DPGROUPDLG_HXX
23 #include <vcl/fixed.hxx>
24 #include <vcl/dialog.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/field.hxx>
27 #include <svx/checklbx.hxx>
28 #include "editfield.hxx"
29 #include "dpgroup.hxx"
31 class ScDPGroupEditHelper
33 public:
34 explicit ScDPGroupEditHelper(
35 RadioButton* rRbAuto, RadioButton* rRbMan,
36 Edit* rEdValue );
38 bool IsAuto() const;
39 double GetValue() const;
40 void SetValue( bool bAuto, double fValue );
42 protected:
43 ~ScDPGroupEditHelper() {}
45 private:
46 virtual bool ImplGetValue( double& rfValue ) const = 0;
47 virtual void ImplSetValue( double fValue ) = 0;
49 DECL_LINK( ClickHdl, RadioButton* );
51 private:
52 VclPtr<RadioButton> mpRbAuto;
53 VclPtr<RadioButton> mpRbMan;
54 VclPtr<Edit> mpEdValue;
57 class ScDPNumGroupEditHelper : public ScDPGroupEditHelper
59 public:
60 explicit ScDPNumGroupEditHelper(
61 RadioButton* pRbAuto, RadioButton* pRbMan,
62 ScDoubleField* pEdValue );
64 virtual ~ScDPNumGroupEditHelper() {}
65 private:
66 virtual bool ImplGetValue( double& rfValue ) const SAL_OVERRIDE;
67 virtual void ImplSetValue( double fValue ) SAL_OVERRIDE;
69 private:
70 VclPtr<ScDoubleField> mpEdValue;
73 class ScDPDateGroupEditHelper : public ScDPGroupEditHelper
75 public:
76 explicit ScDPDateGroupEditHelper(
77 RadioButton* pRbAuto, RadioButton* pRbMan,
78 DateField* pEdValue, const Date& rNullDate );
80 virtual ~ScDPDateGroupEditHelper() {}
82 private:
83 virtual bool ImplGetValue( double& rfValue ) const SAL_OVERRIDE;
84 virtual void ImplSetValue( double fValue ) SAL_OVERRIDE;
86 private:
87 VclPtr<DateField> mpEdValue;
88 Date maNullDate;
91 class ScDPNumGroupDlg : public ModalDialog
93 public:
94 explicit ScDPNumGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo );
95 virtual ~ScDPNumGroupDlg();
96 virtual void dispose() SAL_OVERRIDE;
97 ScDPNumGroupInfo GetGroupInfo() const;
99 private:
100 VclPtr<RadioButton> mpRbAutoStart;
101 VclPtr<RadioButton> mpRbManStart;
102 VclPtr<ScDoubleField> mpEdStart;
103 VclPtr<RadioButton> mpRbAutoEnd;
104 VclPtr<RadioButton> mpRbManEnd;
105 VclPtr<ScDoubleField> mpEdEnd;
106 VclPtr<ScDoubleField> mpEdBy;
107 ScDPNumGroupEditHelper maStartHelper;
108 ScDPNumGroupEditHelper maEndHelper;
111 class ScDPDateGroupDlg : public ModalDialog
113 public:
114 explicit ScDPDateGroupDlg( vcl::Window* pParent, const ScDPNumGroupInfo& rInfo,
115 sal_Int32 nDatePart, const Date& rNullDate );
116 virtual ~ScDPDateGroupDlg();
117 virtual void dispose() SAL_OVERRIDE;
118 ScDPNumGroupInfo GetGroupInfo() const;
119 sal_Int32 GetDatePart() const;
121 private:
122 DECL_LINK( ClickHdl, RadioButton* );
123 DECL_LINK( CheckHdl, SvxCheckListBox* );
125 private:
126 VclPtr<RadioButton> mpRbAutoStart;
127 VclPtr<RadioButton> mpRbManStart;
128 VclPtr<DateField> mpEdStart;
129 VclPtr<RadioButton> mpRbAutoEnd;
130 VclPtr<RadioButton> mpRbManEnd;
131 VclPtr<DateField> mpEdEnd;
132 VclPtr<RadioButton> mpRbNumDays;
133 VclPtr<RadioButton> mpRbUnits;
134 VclPtr<NumericField> mpEdNumDays;
135 VclPtr<SvxCheckListBox> mpLbUnits;
136 VclPtr<OKButton> mpBtnOk;
137 ScDPDateGroupEditHelper maStartHelper;
138 ScDPDateGroupEditHelper maEndHelper;
141 #endif
143 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */