1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
11 #ifndef RANDOM_NUMBER_GENERATION_HXX
12 #define RANDOM_NUMBER_GENERATION_HXX
15 #include "address.hxx"
16 #include "anyrefdg.hxx"
19 #include <vcl/fixed.hxx>
20 #include <vcl/group.hxx>
21 #include <vcl/lstbox.hxx>
23 class ScRandomNumberGeneratorDialog
: public ScAnyRefDlg
26 ScRandomNumberGeneratorDialog(
27 SfxBindings
* pB
, SfxChildWindow
* pCW
,
28 Window
* pParent
, ScViewData
* pViewData
);
30 virtual ~ScRandomNumberGeneratorDialog();
32 virtual void SetReference( const ScRange
& rRef
, ScDocument
* pDoc
);
33 virtual void SetActive();
34 virtual sal_Bool
Close();
38 FixedText
* mpInputRangeText
;
39 formula::RefEdit
* mpInputRangeEdit
;
40 formula::RefButton
* mpInputRangeButton
;
41 ListBox
* mpDistributionCombo
;
42 FixedText
* mpParameter1Text
;
43 NumericField
* mpParameter1Value
;
44 FixedText
* mpParameter2Text
;
45 NumericField
* mpParameter2Value
;
47 CheckBox
* mpEnableSeed
;
48 PushButton
* mpButtonApply
;
50 CloseButton
* mpButtonClose
;
53 ScViewData
* mViewData
;
54 ScDocument
* mDocument
;
57 ScAddress::Details mAddressDetails
;
59 bool mDialogLostFocus
;
62 void GetRangeFromSelection();
65 void GenerateNumbers(RNG randomGenerator
, OUString aDistributionName
);
67 void SelectGeneratorAndGenerateNumbers();
69 DECL_LINK( OkClicked
, PushButton
* );
70 DECL_LINK( CloseClicked
, PushButton
* );
71 DECL_LINK( ApplyClicked
, PushButton
* );
72 DECL_LINK( GetFocusHandler
, Control
* );
73 DECL_LINK( LoseFocusHandler
, void* );
75 DECL_LINK( Parameter1ValueModified
, void* );
76 DECL_LINK( Parameter2ValueModified
, void* );
77 DECL_LINK( DistributionChanged
, void* );
78 DECL_LINK( SeedCheckChanged
, void* );
82 #endif // SC_SOLVRDLG_HXX
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */