LibreOffice Module sc (master) 1
tpsubt.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <sfx2/tabdlg.hxx>
23#include <global.hxx>
24
25class ScViewData;
26class ScDocument;
27struct ScSubTotalParam;
28class ScSubTotalItem;
29
31{
32protected:
33 ScTpSubTotalGroup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet, const sal_uInt16& nTabNumber);
34
35public:
36 virtual ~ScTpSubTotalGroup() override;
37
38 bool DoReset ( sal_uInt16 nGroupNo,
39 const SfxItemSet& rArgSet );
40 bool DoFillItemSet ( sal_uInt16 nGroupNo,
41 SfxItemSet& rArgSet );
42protected:
43 const OUString aStrNone;
44 const OUString aStrColumn;
45
48
51 std::vector<SCCOL> mnFieldArr;
52 sal_uInt16 nFieldCount;
53
54 std::unique_ptr<weld::ComboBox> mxLbGroup;
55 std::unique_ptr<weld::TreeView> mxLbColumns;
56 std::unique_ptr<weld::TreeView> mxLbFunctions;
57 std::unique_ptr<weld::CheckButton> mxLbSelectAllColumns;
58
59private:
60 void Init ();
61 void FillListBoxes ();
62 static ScSubTotalFunc LbPosToFunc ( sal_uInt16 nPos );
63 static sal_uInt16 FuncToLbPos ( ScSubTotalFunc eFunc );
64 sal_uInt16 GetFieldSelPos ( SCCOL nField );
65
66 // Handler ------------------------
67 DECL_LINK( SelectListBoxHdl, weld::ComboBox&, void );
68 DECL_LINK( SelectTreeListBoxHdl, weld::TreeView&, void );
69 DECL_LINK(CheckHdl, const weld::TreeView::iter_col&, void);
70 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
71 void SelectHdl(const weld::Widget*);
72};
73
75{
76public:
78 const SfxItemSet& rArgSet );
79 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
80 const SfxItemSet* rArgSet );
81 virtual ~ScTpSubTotalGroup1() override;
82
83 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
84 virtual void Reset ( const SfxItemSet* rArgSet ) override;
85};
86
88{
89public:
91 const SfxItemSet& rArgSet );
92 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
93 const SfxItemSet* rArgSet );
94 virtual ~ScTpSubTotalGroup2() override;
95
96 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
97 virtual void Reset ( const SfxItemSet* rArgSet ) override;
98};
99
101{
102public:
104 const SfxItemSet& rArgSet );
105 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
106 const SfxItemSet* rArgSet );
107 virtual ~ScTpSubTotalGroup3() override;
108
109 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
110 virtual void Reset ( const SfxItemSet* rArgSet ) override;
111};
112
113class ScTpSubTotalOptions final : public SfxTabPage
114{
115public:
116 ScTpSubTotalOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet);
117 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
118 const SfxItemSet* rArgSet );
119 virtual ~ScTpSubTotalOptions() override;
120
121 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
122 virtual void Reset ( const SfxItemSet* rArgSet ) override;
123
124private:
125 void Init ();
126 void FillUserSortListBox ();
127
128 // Handler ------------------------
129 DECL_LINK(CheckHdl, weld::Toggleable&, void);
130
135
136 std::unique_ptr<weld::CheckButton> m_xBtnPagebreak;
137 std::unique_ptr<weld::CheckButton> m_xBtnCase;
138 std::unique_ptr<weld::CheckButton> m_xBtnSort;
139 std::unique_ptr<weld::Label> m_xFlSort;
140 std::unique_ptr<weld::RadioButton> m_xBtnAscending;
141 std::unique_ptr<weld::RadioButton> m_xBtnDescending;
142 std::unique_ptr<weld::CheckButton> m_xBtnFormats;
143 std::unique_ptr<weld::CheckButton> m_xBtnUserDef;
144 std::unique_ptr<weld::ComboBox> m_xLbUserDef;
145};
146
147/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~ScTpSubTotalGroup1() override
Definition: tpsubt.cxx:609
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rArgSet)
Definition: tpsubt.cxx:394
ScTpSubTotalGroup1(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
Definition: tpsubt.cxx:412
virtual bool FillItemSet(SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:431
virtual void Reset(const SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:425
ScTpSubTotalGroup2(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
Definition: tpsubt.cxx:416
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rArgSet)
Definition: tpsubt.cxx:400
virtual ~ScTpSubTotalGroup2() override
Definition: tpsubt.cxx:613
virtual bool FillItemSet(SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:432
virtual void Reset(const SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:426
virtual void Reset(const SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:427
virtual bool FillItemSet(SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:433
virtual ~ScTpSubTotalGroup3() override
Definition: tpsubt.cxx:617
ScTpSubTotalGroup3(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
Definition: tpsubt.cxx:420
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rArgSet)
Definition: tpsubt.cxx:406
DECL_LINK(CheckHdl, const weld::TreeView::iter_col &, void)
sal_uInt16 nFieldCount
Definition: tpsubt.hxx:52
std::unique_ptr< weld::TreeView > mxLbFunctions
Definition: tpsubt.hxx:56
const OUString aStrColumn
Definition: tpsubt.hxx:44
sal_uInt16 GetFieldSelPos(SCCOL nField)
Definition: tpsubt.cxx:283
bool DoReset(sal_uInt16 nGroupNo, const SfxItemSet &rArgSet)
Definition: tpsubt.cxx:111
std::unique_ptr< weld::CheckButton > mxLbSelectAllColumns
Definition: tpsubt.hxx:57
DECL_LINK(SelectTreeListBoxHdl, weld::TreeView &, void)
ScDocument * pDoc
Definition: tpsubt.hxx:47
DECL_LINK(SelectListBoxHdl, weld::ComboBox &, void)
void FillListBoxes()
Definition: tpsubt.cxx:245
static sal_uInt16 FuncToLbPos(ScSubTotalFunc eFunc)
Definition: tpsubt.cxx:322
bool DoFillItemSet(sal_uInt16 nGroupNo, SfxItemSet &rArgSet)
Definition: tpsubt.cxx:171
DECL_LINK(CheckBoxHdl, weld::Toggleable &, void)
const ScSubTotalParam & rSubTotalData
Definition: tpsubt.hxx:50
const OUString aStrNone
Definition: tpsubt.hxx:43
std::vector< SCCOL > mnFieldArr
Definition: tpsubt.hxx:51
ScViewData * pViewData
Definition: tpsubt.hxx:46
static ScSubTotalFunc LbPosToFunc(sal_uInt16 nPos)
Definition: tpsubt.cxx:300
std::unique_ptr< weld::TreeView > mxLbColumns
Definition: tpsubt.hxx:55
std::unique_ptr< weld::ComboBox > mxLbGroup
Definition: tpsubt.hxx:54
void SelectHdl(const weld::Widget *)
Definition: tpsubt.cxx:361
const TypedWhichId< ScSubTotalItem > nWhichSubTotals
Definition: tpsubt.hxx:49
ScTpSubTotalGroup(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet, const sal_uInt16 &nTabNumber)
Definition: tpsubt.cxx:41
virtual ~ScTpSubTotalGroup() override
Definition: tpsubt.cxx:71
std::unique_ptr< weld::CheckButton > m_xBtnSort
Definition: tpsubt.hxx:138
ScDocument * pDoc
Definition: tpsubt.hxx:132
ScTpSubTotalOptions(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rArgSet)
Definition: tpsubt.cxx:438
std::unique_ptr< weld::CheckButton > m_xBtnUserDef
Definition: tpsubt.hxx:143
const ScSubTotalParam & rSubTotalData
Definition: tpsubt.hxx:134
const TypedWhichId< ScSubTotalItem > nWhichSubTotals
Definition: tpsubt.hxx:133
std::unique_ptr< weld::Label > m_xFlSort
Definition: tpsubt.hxx:139
std::unique_ptr< weld::CheckButton > m_xBtnPagebreak
Definition: tpsubt.hxx:136
virtual void Reset(const SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:487
std::unique_ptr< weld::CheckButton > m_xBtnCase
Definition: tpsubt.hxx:137
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rArgSet)
Definition: tpsubt.cxx:481
virtual bool FillItemSet(SfxItemSet *rArgSet) override
Definition: tpsubt.cxx:512
std::unique_ptr< weld::RadioButton > m_xBtnDescending
Definition: tpsubt.hxx:141
std::unique_ptr< weld::CheckButton > m_xBtnFormats
Definition: tpsubt.hxx:142
std::unique_ptr< weld::ComboBox > m_xLbUserDef
Definition: tpsubt.hxx:144
virtual ~ScTpSubTotalOptions() override
Definition: tpsubt.cxx:462
ScViewData * pViewData
Definition: tpsubt.hxx:131
DECL_LINK(CheckHdl, weld::Toggleable &, void)
void FillUserSortListBox()
Definition: tpsubt.cxx:538
std::unique_ptr< weld::RadioButton > m_xBtnAscending
Definition: tpsubt.hxx:140
std::pair< const TreeIter &, int > iter_col
ScSubTotalFunc
Definition: global.hxx:859
sal_Int16 SCCOL
Definition: types.hxx:21