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_EDITSH_HXX 25 #define SC_EDITSH_HXX 26 27 #include <sfx2/shell.hxx> 28 #include <sfx2/module.hxx> 29 #include <tools/link.hxx> 30 31 #include "shellids.hxx" 32 #include <editeng/editview.hxx> 33 34 class EditView; 35 class ScViewData; 36 class ScInputHandler; 37 class SvxURLField; 38 class TransferableDataHelper; 39 class TransferableClipboardListener; 40 41 class ScEditShell : public SfxShell 42 { 43 private: 44 EditView* pEditView; 45 ScViewData* pViewData; 46 TransferableClipboardListener* pClipEvtLstnr; 47 sal_Bool bPastePossible; 48 sal_Bool bIsInsertMode; 49 50 const SvxURLField* GetURLField(); 51 ScInputHandler* GetMyInputHdl(); 52 53 DECL_LINK( ClipboardChanged, TransferableDataHelper* ); 54 55 public: 56 TYPEINFO(); 57 SFX_DECL_INTERFACE(SCID_EDIT_SHELL) 58 59 ScEditShell(EditView* pView, ScViewData* pData); 60 ~ScEditShell(); 61 62 void SetEditView(EditView* pView); GetEditView()63 EditView* GetEditView() {return pEditView;} 64 65 void Execute(SfxRequest& rReq); 66 void ExecuteTrans(SfxRequest& rReq); 67 void GetState(SfxItemSet &rSet); 68 void GetClipState(SfxItemSet& rSet); 69 70 void ExecuteAttr(SfxRequest& rReq); 71 void GetAttrState(SfxItemSet &rSet); 72 73 void ExecuteUndo(SfxRequest& rReq); 74 void GetUndoState(SfxItemSet &rSet); 75 76 String GetSelectionText( sal_Bool bWholeWord ); 77 }; 78 79 80 81 #endif 82 83