fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / inc / SamplingDialog.hxx
blobc98fd7725e20a3776e92d2df9dfec6941844b368
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 */
11 #ifndef INCLUDED_SC_SOURCE_UI_INC_SAMPLINGDIALOG_HXX
12 #define INCLUDED_SC_SOURCE_UI_INC_SAMPLINGDIALOG_HXX
14 #include "global.hxx"
15 #include "address.hxx"
16 #include "anyrefdg.hxx"
18 #include <vcl/fixed.hxx>
19 #include <vcl/group.hxx>
20 #include <vcl/lstbox.hxx>
22 class ScSamplingDialog : public ScAnyRefDlg
24 public:
25 ScSamplingDialog(
26 SfxBindings* pB, SfxChildWindow* pCW,
27 vcl::Window* pParent, ScViewData* pViewData );
29 virtual ~ScSamplingDialog();
30 virtual void dispose() SAL_OVERRIDE;
32 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) SAL_OVERRIDE;
33 virtual void SetActive() SAL_OVERRIDE;
34 virtual bool Close() SAL_OVERRIDE;
36 private:
37 // Widgets
38 VclPtr<FixedText> mpInputRangeLabel;
39 VclPtr<formula::RefEdit> mpInputRangeEdit;
40 VclPtr<formula::RefButton> mpInputRangeButton;
42 VclPtr<FixedText> mpOutputRangeLabel;
43 VclPtr<formula::RefEdit> mpOutputRangeEdit;
44 VclPtr<formula::RefButton> mpOutputRangeButton;
46 VclPtr<NumericField> mpSampleSize;
47 VclPtr<NumericField> mpPeriod;
49 VclPtr<RadioButton> mpRandomMethodRadio;
50 VclPtr<RadioButton> mpPeriodicMethodRadio;
52 VclPtr<OKButton> mpButtonOk;
54 VclPtr<formula::RefEdit> mpActiveEdit;
56 // Data
57 ScViewData* mViewData;
58 ScDocument* mDocument;
60 ScRange mInputRange;
61 ScAddress::Details mAddressDetails;
62 ScAddress mOutputAddress;
64 ScAddress mCurrentAddress;
66 bool mDialogLostFocus;
68 void Init();
69 void GetRangeFromSelection();
70 void PerformSampling();
72 ScRange PerformRandomSampling(ScDocShell* pDocShell);
73 ScRange PerformPeriodicSampling(ScDocShell* pDocShell);
75 DECL_LINK( OkClicked, PushButton* );
76 DECL_LINK( GetFocusHandler, Control* );
77 DECL_LINK( LoseFocusHandler, void* );
78 DECL_LINK( SamplingSizeValueModified, void* );
79 DECL_LINK( ToggleSamplingMethod, void* );
80 DECL_LINK( RefInputModifyHandler, void* );
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */