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_SIMPREF_HXX 25cdf0e10cSrcweir #define SC_SIMPREF_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #ifndef _GROUP_HXX //autogen 28cdf0e10cSrcweir #include <vcl/group.hxx> 29cdf0e10cSrcweir #endif 30cdf0e10cSrcweir 31cdf0e10cSrcweir #ifndef _COMBOBOX_HXX //autogen 32cdf0e10cSrcweir #include <vcl/combobox.hxx> 33cdf0e10cSrcweir #endif 34cdf0e10cSrcweir 35cdf0e10cSrcweir #ifndef _FIXED_HXX //autogen 36cdf0e10cSrcweir #include <vcl/fixed.hxx> 37cdf0e10cSrcweir #endif 38cdf0e10cSrcweir 39cdf0e10cSrcweir #ifndef _MOREBTN_HXX //autogen 40cdf0e10cSrcweir #include <vcl/morebtn.hxx> 41cdf0e10cSrcweir #endif 42cdf0e10cSrcweir #include "anyrefdg.hxx" 43cdf0e10cSrcweir #include "dbcolect.hxx" 44cdf0e10cSrcweir #include "expftext.hxx" 45cdf0e10cSrcweir 46cdf0e10cSrcweir class ScViewData; 47cdf0e10cSrcweir class ScDocument; 48cdf0e10cSrcweir 49cdf0e10cSrcweir 50cdf0e10cSrcweir //============================================================================ 51cdf0e10cSrcweir 52cdf0e10cSrcweir class ScSimpleRefDlg: public ScAnyRefDlg 53cdf0e10cSrcweir { 54cdf0e10cSrcweir private: 55cdf0e10cSrcweir Link aCloseHdl; 56cdf0e10cSrcweir Link aDoneHdl; 57cdf0e10cSrcweir Link aAbortedHdl; 58cdf0e10cSrcweir Link aChangeHdl; 59cdf0e10cSrcweir 60cdf0e10cSrcweir FixedText aFtAssign; 61cdf0e10cSrcweir formula::RefEdit aEdAssign; 62cdf0e10cSrcweir formula::RefButton aRbAssign; 63cdf0e10cSrcweir 64cdf0e10cSrcweir OKButton aBtnOk; 65cdf0e10cSrcweir CancelButton aBtnCancel; 66cdf0e10cSrcweir HelpButton aBtnHelp; 67cdf0e10cSrcweir 68cdf0e10cSrcweir ScViewData* pViewData; 69cdf0e10cSrcweir ScDocument* pDoc; 70cdf0e10cSrcweir sal_Bool bRefInputMode; 71cdf0e10cSrcweir 72cdf0e10cSrcweir ScRange theCurArea; 73cdf0e10cSrcweir sal_Bool bCloseFlag; 74cdf0e10cSrcweir sal_Bool bAutoReOpen; 75cdf0e10cSrcweir sal_Bool bCloseOnButtonUp; 76cdf0e10cSrcweir sal_Bool bSingleCell; 77cdf0e10cSrcweir sal_Bool bMultiSelection; 78cdf0e10cSrcweir 79cdf0e10cSrcweir void Init(); 80cdf0e10cSrcweir 81cdf0e10cSrcweir DECL_LINK( CancelBtnHdl, void * ); 82cdf0e10cSrcweir DECL_LINK( OkBtnHdl, void * ); 83cdf0e10cSrcweir 84cdf0e10cSrcweir 85cdf0e10cSrcweir protected: 86cdf0e10cSrcweir 87cdf0e10cSrcweir virtual void RefInputDone( sal_Bool bForced = sal_False ); 88cdf0e10cSrcweir 89cdf0e10cSrcweir public: 90cdf0e10cSrcweir ScSimpleRefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent, 91cdf0e10cSrcweir ScViewData* ptrViewData ); 92cdf0e10cSrcweir ~ScSimpleRefDlg(); 93cdf0e10cSrcweir 94cdf0e10cSrcweir virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); 95cdf0e10cSrcweir 96cdf0e10cSrcweir virtual sal_Bool IsRefInputMode() const; 97cdf0e10cSrcweir virtual void SetActive(); 98cdf0e10cSrcweir virtual sal_Bool Close(); 99cdf0e10cSrcweir 100cdf0e10cSrcweir void StartRefInput(); 101cdf0e10cSrcweir 102cdf0e10cSrcweir virtual String GetRefString() const; 103cdf0e10cSrcweir virtual void SetRefString(const String &rStr); 104cdf0e10cSrcweir virtual void FillInfo(SfxChildWinInfo&) const; 105cdf0e10cSrcweir 106cdf0e10cSrcweir void SetCloseHdl( const Link& rLink ); 107cdf0e10cSrcweir void SetUnoLinks( const Link& rDone, const Link& rAbort, 108cdf0e10cSrcweir const Link& rChange ); 109cdf0e10cSrcweir 110cdf0e10cSrcweir void SetFlags( sal_Bool bSetCloseOnButtonUp, sal_Bool bSetSingleCell, sal_Bool bSetMultiSelection ); 111cdf0e10cSrcweir SetAutoReOpen(sal_Bool bFlag)112cdf0e10cSrcweir void SetAutoReOpen(sal_Bool bFlag) {bAutoReOpen=bFlag;} 113cdf0e10cSrcweir }; 114cdf0e10cSrcweir 115cdf0e10cSrcweir 116cdf0e10cSrcweir 117cdf0e10cSrcweir #endif // SC_DBNAMDLG_HXX 118cdf0e10cSrcweir 119