LibreOffice Module sc (master)  1
pfiltdlg.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 #ifndef INCLUDED_SC_SOURCE_UI_INC_PFILTDLG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_PFILTDLG_HXX
22 
23 #include <vcl/weld.hxx>
24 #include <address.hxx>
25 #include <queryparam.hxx>
26 #include <array>
27 #include <memory>
28 
29 class ScViewData;
30 class ScDocument;
31 class ScQueryItem;
32 class SfxItemSet;
33 struct ScFilterEntries;
34 
36 {
37 public:
38  ScPivotFilterDlg(weld::Window* pParent, const SfxItemSet& rArgSet, SCTAB nSourceTab);
39  virtual ~ScPivotFilterDlg() override;
40 
41  const ScQueryItem& GetOutputItem();
42 
43 private:
44  const OUString aStrNone;
45  const OUString aStrEmpty;
46  const OUString aStrNotEmpty;
47  const OUString aStrColumn;
48 
49  const sal_uInt16 nWhichQuery;
51  std::unique_ptr<ScQueryItem> pOutItem;
55 
56  std::unique_ptr<weld::ComboBox> m_xLbField1;
57  std::unique_ptr<weld::ComboBox> m_xLbCond1;
58  std::unique_ptr<weld::ComboBox> m_xEdVal1;
59 
60  std::unique_ptr<weld::ComboBox> m_xLbConnect1;
61  std::unique_ptr<weld::ComboBox> m_xLbField2;
62  std::unique_ptr<weld::ComboBox> m_xLbCond2;
63  std::unique_ptr<weld::ComboBox> m_xEdVal2;
64 
65  std::unique_ptr<weld::ComboBox> m_xLbConnect2;
66  std::unique_ptr<weld::ComboBox> m_xLbField3;
67  std::unique_ptr<weld::ComboBox> m_xLbCond3;
68  std::unique_ptr<weld::ComboBox> m_xEdVal3;
69 
70  std::unique_ptr<weld::CheckButton> m_xBtnCase;
71  std::unique_ptr<weld::CheckButton> m_xBtnRegExp;
72  std::unique_ptr<weld::CheckButton> m_xBtnUnique;
73  std::unique_ptr<weld::Label> m_xFtDbArea;
74 
78 
79  std::array<std::unique_ptr<ScFilterEntries>, MAXCOLCOUNT> m_pEntryLists;
80 
81 private:
82  void Init ( const SfxItemSet& rArgSet );
83  void FillFieldLists ();
84  void UpdateValueList ( sal_uInt16 nList );
85  void ClearValueList ( sal_uInt16 nList );
86  sal_uInt16 GetFieldSelPos ( SCCOL nField );
87 
88  // Handler:
89  DECL_LINK( LbSelectHdl, weld::ComboBox&, void );
90  DECL_LINK( ValModifyHdl, weld::ComboBox&, void );
91  DECL_LINK( CheckBoxHdl, weld::Button&, void );
92 };
93 
94 #endif // INCLUDED_SC_SOURCE_UI_INC_PFILTDLG_HXX
95 
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::CheckButton > m_xBtnUnique
Definition: pfiltdlg.hxx:72
const ScQueryParam theQueryData
Definition: pfiltdlg.hxx:50
std::unique_ptr< weld::ComboBox > m_xLbConnect1
Definition: pfiltdlg.hxx:60
weld::ComboBox * aFieldLbArr[3]
Definition: pfiltdlg.hxx:76
weld::ComboBox * aCondLbArr[3]
Definition: pfiltdlg.hxx:77
std::unique_ptr< weld::Label > m_xFtDbArea
Definition: pfiltdlg.hxx:73
std::array< std::unique_ptr< ScFilterEntries >, MAXCOLCOUNT > m_pEntryLists
Definition: pfiltdlg.hxx:79
const SCCOL MAXCOLCOUNT
Definition: address.hxx:64
std::unique_ptr< ScQueryItem > pOutItem
Definition: pfiltdlg.hxx:51
virtual ~ScPivotFilterDlg() override
Definition: pfiltdlg.cxx:70
weld::ComboBox * aValueEdArr[3]
Definition: pfiltdlg.hxx:75
std::unique_ptr< weld::ComboBox > m_xEdVal3
Definition: pfiltdlg.hxx:68
std::unique_ptr< weld::ComboBox > m_xLbCond1
Definition: pfiltdlg.hxx:57
ScDocument * pDoc
Definition: pfiltdlg.hxx:53
void Init(const SfxItemSet &rArgSet)
Definition: pfiltdlg.cxx:74
ScViewData * pViewData
Definition: pfiltdlg.hxx:52
const OUString aStrNotEmpty
Definition: pfiltdlg.hxx:46
sal_Int16 SCCOL
Definition: types.hxx:22
ScPivotFilterDlg(weld::Window *pParent, const SfxItemSet &rArgSet, SCTAB nSourceTab)
Definition: pfiltdlg.cxx:39
std::unique_ptr< weld::ComboBox > m_xLbCond3
Definition: pfiltdlg.hxx:67
std::unique_ptr< weld::ComboBox > m_xLbField2
Definition: pfiltdlg.hxx:61
void ClearValueList(sal_uInt16 nList)
Definition: pfiltdlg.cxx:284
std::unique_ptr< weld::ComboBox > m_xLbConnect2
Definition: pfiltdlg.hxx:65
const OUString aStrNone
Definition: pfiltdlg.hxx:44
std::unique_ptr< weld::CheckButton > m_xBtnRegExp
Definition: pfiltdlg.hxx:71
const OUString aStrColumn
Definition: pfiltdlg.hxx:47
const sal_uInt16 nWhichQuery
Definition: pfiltdlg.hxx:49
sal_uInt16 GetFieldSelPos(SCCOL nField)
Definition: pfiltdlg.cxx:296
std::unique_ptr< weld::ComboBox > m_xEdVal2
Definition: pfiltdlg.hxx:63
std::unique_ptr< weld::ComboBox > m_xLbField1
Definition: pfiltdlg.hxx:56
const OUString aStrEmpty
Definition: pfiltdlg.hxx:45
void UpdateValueList(sal_uInt16 nList)
Definition: pfiltdlg.cxx:245
std::unique_ptr< weld::ComboBox > m_xLbCond2
Definition: pfiltdlg.hxx:62
DECL_LINK(LbSelectHdl, weld::ComboBox &, void)
void FillFieldLists()
Definition: pfiltdlg.cxx:213
std::unique_ptr< weld::CheckButton > m_xBtnCase
Definition: pfiltdlg.hxx:70
std::unique_ptr< weld::ComboBox > m_xLbField3
Definition: pfiltdlg.hxx:66
sal_Int16 SCTAB
Definition: types.hxx:23
std::unique_ptr< weld::ComboBox > m_xEdVal1
Definition: pfiltdlg.hxx:58
const ScQueryItem & GetOutputItem()
Definition: pfiltdlg.cxx:304