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