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