1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cellsh.hxx,v $
10 * $Revision: 1.9.90.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
34 #include <sfx2/shell.hxx>
35 #include "shellids.hxx"
36 #include <sfx2/module.hxx>
37 #include <svx/svdmark.hxx>
38 #include <tools/link.hxx>
39 #include "formatsh.hxx"
40 #include "address.hxx"
42 class SvxClipboardFmtItem
;
43 class TransferableDataHelper
;
44 class TransferableClipboardListener
;
45 class AbstractScLinkedAreaDlg
;
50 TransferableClipboardListener
* m_pClipEvtLstnr
;
51 AbstractScLinkedAreaDlg
* m_pLinkedDlg
;
52 SfxRequest
* m_pRequest
;
55 m_pClipEvtLstnr( NULL
),
60 class ScCellShell
: public ScFormatShell
63 CellShell_Impl
* pImpl
;
66 void GetPossibleClipboardFormats( SvxClipboardFmtItem
& rFormats
);
67 void ExecuteExternalSource(
68 const String
& _rFile
, const String
& _rFilter
, const String
& _rOptions
,
69 const String
& _rSource
, ULONG _nRefresh
, SfxRequest
& _rRequest
);
71 DECL_LINK( ClipboardChanged
, TransferableDataHelper
* );
72 DECL_LINK( DialogClosed
, AbstractScLinkedAreaDlg
* );
77 SFX_DECL_INTERFACE(SCID_CELL_SHELL
)
79 ScCellShell(ScViewData
* pData
);
80 virtual ~ScCellShell();
82 void Execute(SfxRequest
&);
83 void GetState(SfxItemSet
&);
85 void ExecuteEdit( SfxRequest
& rReq
);
86 void ExecuteTrans( SfxRequest
& rReq
);
88 void GetBlockState( SfxItemSet
& rSet
);
89 void GetCellState( SfxItemSet
& rSet
);
91 void ExecuteDB( SfxRequest
& rReq
);
92 void GetDBState( SfxItemSet
& rSet
);
94 void ExecImageMap(SfxRequest
& rReq
); // ImageMap
95 void GetImageMapState(SfxItemSet
& rSet
);
97 void GetClipState( SfxItemSet
& rSet
);
98 void GetHLinkState( SfxItemSet
& rSet
);
100 void ExecuteCursor( SfxRequest
& rReq
);
101 void ExecuteCursorSel( SfxRequest
& rReq
);
102 void ExecutePage( SfxRequest
& rReq
);
103 void ExecutePageSel( SfxRequest
& rReq
);
104 void ExecuteMove( SfxRequest
& rReq
);
105 void GetStateCursor( SfxItemSet
& rSet
);
107 static void PasteFromClipboard( ScViewData
* pViewData
, ScTabViewShell
* pTabViewShell
, bool bShowDialog
);