1*38d50f7bSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*38d50f7bSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*38d50f7bSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*38d50f7bSAndrew Rist * distributed with this work for additional information 6*38d50f7bSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*38d50f7bSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*38d50f7bSAndrew Rist * "License"); you may not use this file except in compliance 9*38d50f7bSAndrew Rist * with the License. You may obtain a copy of the License at 10*38d50f7bSAndrew Rist * 11*38d50f7bSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*38d50f7bSAndrew Rist * 13*38d50f7bSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*38d50f7bSAndrew Rist * software distributed under the License is distributed on an 15*38d50f7bSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*38d50f7bSAndrew Rist * KIND, either express or implied. See the License for the 17*38d50f7bSAndrew Rist * specific language governing permissions and limitations 18*38d50f7bSAndrew Rist * under the License. 19*38d50f7bSAndrew Rist * 20*38d50f7bSAndrew Rist *************************************************************/ 21*38d50f7bSAndrew Rist 22*38d50f7bSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SC_NAMEDLG_HXX 25cdf0e10cSrcweir #define SC_NAMEDLG_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef _MOREBTN_HXX //autogen 28cdf0e10cSrcweir #include <vcl/morebtn.hxx> 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir #ifndef _COMBOBOX_HXX //autogen 31cdf0e10cSrcweir #include <vcl/combobox.hxx> 32cdf0e10cSrcweir #endif 33cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen 34cdf0e10cSrcweir #include <vcl/group.hxx> 35cdf0e10cSrcweir #endif 36cdf0e10cSrcweir #include <vcl/fixed.hxx> 37cdf0e10cSrcweir #include "rangenam.hxx" 38cdf0e10cSrcweir #include "anyrefdg.hxx" 39cdf0e10cSrcweir 40cdf0e10cSrcweir class ScViewData; 41cdf0e10cSrcweir class ScDocument; 42cdf0e10cSrcweir 43cdf0e10cSrcweir 44cdf0e10cSrcweir //================================================================== 45cdf0e10cSrcweir 46cdf0e10cSrcweir class ScNameDlg : public ScAnyRefDlg 47cdf0e10cSrcweir { 48cdf0e10cSrcweir private: 49cdf0e10cSrcweir FixedLine aFlName; 50cdf0e10cSrcweir ComboBox aEdName; 51cdf0e10cSrcweir 52cdf0e10cSrcweir FixedLine aFlAssign; 53cdf0e10cSrcweir formula::RefEdit aEdAssign; 54cdf0e10cSrcweir formula::RefButton aRbAssign; 55cdf0e10cSrcweir 56cdf0e10cSrcweir FixedLine aFlType; 57cdf0e10cSrcweir CheckBox aBtnPrintArea; 58cdf0e10cSrcweir CheckBox aBtnColHeader; 59cdf0e10cSrcweir CheckBox aBtnCriteria; 60cdf0e10cSrcweir CheckBox aBtnRowHeader; 61cdf0e10cSrcweir 62cdf0e10cSrcweir OKButton aBtnOk; 63cdf0e10cSrcweir CancelButton aBtnCancel; 64cdf0e10cSrcweir HelpButton aBtnHelp; 65cdf0e10cSrcweir PushButton aBtnAdd; 66cdf0e10cSrcweir PushButton aBtnRemove; 67cdf0e10cSrcweir MoreButton aBtnMore; 68cdf0e10cSrcweir sal_Bool bSaved; 69cdf0e10cSrcweir 70cdf0e10cSrcweir const String aStrAdd; // "Hinzufuegen" 71cdf0e10cSrcweir const String aStrModify; // "Aendern" 72cdf0e10cSrcweir const String errMsgInvalidSym; 73cdf0e10cSrcweir 74cdf0e10cSrcweir ScViewData* pViewData; 75cdf0e10cSrcweir ScDocument* pDoc; 76cdf0e10cSrcweir ScRangeName aLocalRangeName; 77cdf0e10cSrcweir const ScAddress theCursorPos; 78cdf0e10cSrcweir Selection theCurSel; 79cdf0e10cSrcweir 80cdf0e10cSrcweir #ifdef _NAMEDLG_CXX 81cdf0e10cSrcweir private: 82cdf0e10cSrcweir void Init(); 83cdf0e10cSrcweir void UpdateChecks(); 84cdf0e10cSrcweir void UpdateNames(); 85cdf0e10cSrcweir void CalcCurTableAssign( String& aAssign, sal_uInt16 nPos ); 86cdf0e10cSrcweir 87cdf0e10cSrcweir // Handler: 88cdf0e10cSrcweir DECL_LINK( OkBtnHdl, void * ); 89cdf0e10cSrcweir DECL_LINK( CancelBtnHdl, void * ); 90cdf0e10cSrcweir DECL_LINK( AddBtnHdl, void * ); 91cdf0e10cSrcweir DECL_LINK( RemoveBtnHdl, void * ); 92cdf0e10cSrcweir DECL_LINK( EdModifyHdl, Edit * ); 93cdf0e10cSrcweir DECL_LINK( NameSelectHdl, void * ); 94cdf0e10cSrcweir DECL_LINK( AssignGetFocusHdl, void * ); 95cdf0e10cSrcweir #endif 96cdf0e10cSrcweir 97cdf0e10cSrcweir protected: 98cdf0e10cSrcweir 99cdf0e10cSrcweir virtual void RefInputDone( sal_Bool bForced = sal_False ); 100cdf0e10cSrcweir 101cdf0e10cSrcweir 102cdf0e10cSrcweir public: 103cdf0e10cSrcweir ScNameDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, 104cdf0e10cSrcweir ScViewData* ptrViewData, 105cdf0e10cSrcweir const ScAddress& aCursorPos ); 106cdf0e10cSrcweir ~ScNameDlg(); 107cdf0e10cSrcweir 108cdf0e10cSrcweir virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); 109cdf0e10cSrcweir virtual sal_Bool IsRefInputMode() const; 110cdf0e10cSrcweir 111cdf0e10cSrcweir virtual void SetActive(); 112cdf0e10cSrcweir virtual sal_Bool Close(); 113cdf0e10cSrcweir 114cdf0e10cSrcweir }; 115cdf0e10cSrcweir 116cdf0e10cSrcweir 117cdf0e10cSrcweir 118cdf0e10cSrcweir #endif // SC_NAMEDLG_HXX 119cdf0e10cSrcweir 120