1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef SC_EDITSH_HXX 29 #define SC_EDITSH_HXX 30 31 #include <sfx2/shell.hxx> 32 #include <sfx2/module.hxx> 33 #include <tools/link.hxx> 34 35 #include "shellids.hxx" 36 #include <editeng/editview.hxx> 37 38 class EditView; 39 class ScViewData; 40 class ScInputHandler; 41 class SvxURLField; 42 class TransferableDataHelper; 43 class TransferableClipboardListener; 44 45 class ScEditShell : public SfxShell 46 { 47 private: 48 EditView* pEditView; 49 ScViewData* pViewData; 50 TransferableClipboardListener* pClipEvtLstnr; 51 sal_Bool bPastePossible; 52 sal_Bool bIsInsertMode; 53 54 const SvxURLField* GetURLField(); 55 ScInputHandler* GetMyInputHdl(); 56 57 DECL_LINK( ClipboardChanged, TransferableDataHelper* ); 58 59 public: 60 TYPEINFO(); 61 SFX_DECL_INTERFACE(SCID_EDIT_SHELL) 62 63 ScEditShell(EditView* pView, ScViewData* pData); 64 ~ScEditShell(); 65 66 void SetEditView(EditView* pView); 67 EditView* GetEditView() {return pEditView;} 68 69 void Execute(SfxRequest& rReq); 70 void ExecuteTrans(SfxRequest& rReq); 71 void GetState(SfxItemSet &rSet); 72 void GetClipState(SfxItemSet& rSet); 73 74 void ExecuteAttr(SfxRequest& rReq); 75 void GetAttrState(SfxItemSet &rSet); 76 77 void ExecuteUndo(SfxRequest& rReq); 78 void GetUndoState(SfxItemSet &rSet); 79 80 String GetSelectionText( sal_Bool bWholeWord ); 81 }; 82 83 84 85 #endif 86 87