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 INCLUDED_SC_SOURCE_UI_INC_STATISTICSINPUTOUTPUTDIALOG_HXX
12 #define INCLUDED_SC_SOURCE_UI_INC_STATISTICSINPUTOUTPUTDIALOG_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 ScStatisticsInputOutputDialog
: public ScAnyRefDlg
30 ScStatisticsInputOutputDialog(
31 SfxBindings
* pB
, SfxChildWindow
* pCW
,
32 vcl::Window
* pParent
, ScViewData
* pViewData
,
33 const OUString
& rID
, const OUString
& rUIXMLDescription
);
35 virtual ~ScStatisticsInputOutputDialog();
36 virtual void dispose() SAL_OVERRIDE
;
38 virtual void SetReference( const ScRange
& rRef
, ScDocument
* pDoc
) SAL_OVERRIDE
;
39 virtual void SetActive() SAL_OVERRIDE
;
42 void CalculateInputAndWriteToOutput();
44 virtual ScRange
ApplyOutput(ScDocShell
* pDocShell
) = 0;
45 virtual sal_Int16
GetUndoNameId() = 0;
48 VclPtr
<FixedText
> mpInputRangeLabel
;
49 VclPtr
<formula::RefEdit
> mpInputRangeEdit
;
50 VclPtr
<formula::RefButton
> mpInputRangeButton
;
52 VclPtr
<FixedText
> mpOutputRangeLabel
;
53 VclPtr
<formula::RefEdit
> mpOutputRangeEdit
;
54 VclPtr
<formula::RefButton
> mpOutputRangeButton
;
56 VclPtr
<RadioButton
> mpGroupByColumnsRadio
;
57 VclPtr
<RadioButton
> mpGroupByRowsRadio
;
60 ScViewData
* mViewData
;
61 ScDocument
* mDocument
;
64 ScAddress::Details mAddressDetails
;
65 ScAddress mOutputAddress
;
68 static ScRangeList
MakeColumnRangeList(SCTAB aTab
, ScAddress aStart
, ScAddress aEnd
);
69 static ScRangeList
MakeRowRangeList(SCTAB aTab
, ScAddress aStart
, ScAddress aEnd
);
73 VclPtr
<OKButton
> mpButtonOk
;
75 VclPtr
<formula::RefEdit
> mpActiveEdit
;
76 ScAddress mCurrentAddress
;
77 bool mDialogLostFocus
;
80 void GetRangeFromSelection();
82 DECL_LINK( GroupByChanged
, void* );
83 DECL_LINK( OkClicked
, PushButton
* );
84 DECL_LINK( GetFocusHandler
, Control
* );
85 DECL_LINK( LoseFocusHandler
, void* );
86 DECL_LINK( RefInputModifyHandler
, void* );
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */