1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef SC_CONSDLG_HXX 25 #define SC_CONSDLG_HXX 26 27 #ifndef _FIXED_HXX //autogen 28 #include <vcl/fixed.hxx> 29 #endif 30 #ifndef _LSTBOX_HXX //autogen 31 #include <vcl/lstbox.hxx> 32 #endif 33 #ifndef _GROUP_HXX //autogen 34 #include <vcl/group.hxx> 35 #endif 36 #ifndef _MOREBTN_HXX //autogen 37 #include <vcl/morebtn.hxx> 38 #endif 39 #include "global.hxx" 40 #include "anyrefdg.hxx" 41 42 class ScViewData; 43 class ScDocument; 44 class ScRangeUtil; 45 class ScAreaData; 46 47 48 //============================================================================ 49 50 class ScConsolidateDlg : public ScAnyRefDlg 51 { 52 public: 53 ScConsolidateDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, 54 const SfxItemSet& rArgSet ); 55 ~ScConsolidateDlg(); 56 57 virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); 58 IsRefInputMode() const59 virtual sal_Bool IsRefInputMode() const { return sal_True; } 60 virtual void SetActive(); 61 62 virtual sal_Bool Close(); 63 64 protected: 65 virtual void Deactivate(); 66 67 private: 68 FixedText aFtFunc; 69 ListBox aLbFunc; 70 71 FixedText aFtConsAreas; 72 MultiListBox aLbConsAreas; 73 74 ListBox aLbDataArea; 75 FixedText aFtDataArea; 76 formula::RefEdit aEdDataArea; 77 formula::RefButton aRbDataArea; 78 79 ListBox aLbDestArea; 80 FixedText aFtDestArea; 81 formula::RefEdit aEdDestArea; 82 formula::RefButton aRbDestArea; 83 84 FixedLine aFlConsBy; 85 CheckBox aBtnByRow; 86 CheckBox aBtnByCol; 87 88 FixedLine aFlSep; 89 FixedLine aFlOptions; 90 CheckBox aBtnRefs; 91 92 OKButton aBtnOk; 93 CancelButton aBtnCancel; 94 HelpButton aBtnHelp; 95 PushButton aBtnAdd; 96 PushButton aBtnRemove; 97 MoreButton aBtnMore; 98 99 String aStrUndefined; 100 101 ScConsolidateParam theConsData; 102 ScViewData* pViewData; 103 ScDocument* pDoc; 104 ScRangeUtil* pRangeUtil; 105 ScAreaData* pAreaData; 106 sal_uInt16 nAreaDataCount; 107 sal_uInt16 nWhichCons; 108 109 formula::RefEdit* pRefInputEdit; 110 sal_Bool bDlgLostFocus; 111 112 #ifdef _CONSDLG_CXX 113 private: 114 void Init (); 115 void FillAreaLists (); 116 sal_Bool VerifyEdit ( formula::RefEdit* pEd ); 117 118 DECL_LINK( OkHdl, void* ); 119 DECL_LINK( ClickHdl, PushButton* ); 120 DECL_LINK( GetFocusHdl, Control* ); 121 DECL_LINK( ModifyHdl, formula::RefEdit* ); 122 DECL_LINK( SelectHdl, ListBox* ); 123 124 ScSubTotalFunc LbPosToFunc( sal_uInt16 nPos ); 125 sal_uInt16 FuncToLbPos( ScSubTotalFunc eFunc ); 126 #endif // _CONSDLG_CXX 127 }; 128 129 130 131 #endif // SC_CONSDLG_HXX 132 133