xref: /aoo41x/main/sc/source/ui/inc/cellsh.hxx (revision cdf0e10c)
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_CELLSH_HXX
29 #define SC_CELLSH_HXX
30 
31 #include <sfx2/shell.hxx>
32 #include "shellids.hxx"
33 #include <sfx2/module.hxx>
34 #include <svx/svdmark.hxx>
35 #include <tools/link.hxx>
36 #include "formatsh.hxx"
37 
38 class SvxClipboardFmtItem;
39 class TransferableDataHelper;
40 class TransferableClipboardListener;
41 class AbstractScLinkedAreaDlg;
42 class ScTabViewShell;
43 
44 struct CellShell_Impl
45 {
46     TransferableClipboardListener*  m_pClipEvtLstnr;
47     AbstractScLinkedAreaDlg*        m_pLinkedDlg;
48     SfxRequest*                     m_pRequest;
49 
50     CellShell_Impl() :
51         m_pClipEvtLstnr( NULL ),
52         m_pLinkedDlg( NULL ),
53         m_pRequest( NULL ) {}
54 };
55 
56 class ScCellShell: public ScFormatShell
57 {
58 private:
59     CellShell_Impl* pImpl;
60     sal_Bool            bPastePossible;
61 
62 	void		GetPossibleClipboardFormats( SvxClipboardFmtItem& rFormats );
63     void        ExecuteExternalSource(
64                     const String& _rFile, const String& _rFilter, const String& _rOptions,
65                     const String& _rSource, sal_uLong _nRefresh, SfxRequest& _rRequest );
66 
67     DECL_LINK( ClipboardChanged, TransferableDataHelper* );
68     DECL_LINK( DialogClosed, AbstractScLinkedAreaDlg* );
69 
70 public:
71 
72 	TYPEINFO();
73 	SFX_DECL_INTERFACE(SCID_CELL_SHELL)
74 
75 				ScCellShell(ScViewData* pData);
76 	virtual		~ScCellShell();
77 
78 	void		Execute(SfxRequest &);
79 	void		GetState(SfxItemSet &);
80 
81 	void		ExecuteEdit( SfxRequest& rReq );
82 	void		ExecuteTrans( SfxRequest& rReq );
83 
84 	void		GetBlockState( SfxItemSet& rSet );
85 	void		GetCellState( SfxItemSet& rSet );
86 
87 	void		ExecuteDB( SfxRequest& rReq );
88 	void		GetDBState( SfxItemSet& rSet );
89 
90 	void		ExecImageMap(SfxRequest& rReq);		// ImageMap
91 	void		GetImageMapState(SfxItemSet& rSet);
92 
93 	void		GetClipState( SfxItemSet& rSet );
94 	void		GetHLinkState( SfxItemSet& rSet );
95 
96 	void		ExecuteCursor( SfxRequest& rReq );
97 	void		ExecuteCursorSel( SfxRequest& rReq );
98 	void		ExecutePage( SfxRequest& rReq );
99 	void		ExecutePageSel( SfxRequest& rReq );
100 	void		ExecuteMove( SfxRequest& rReq );
101 	void		GetStateCursor( SfxItemSet& rSet );
102 
103 	static void PasteFromClipboard( ScViewData* pViewData, ScTabViewShell* pTabViewShell, bool bShowDialog );
104 };
105 
106 #endif
107