xref: /aoo41x/main/cui/source/inc/pastedlg.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 _PASTEDLG_HXX
29 #define _PASTEDLG_HXX
30 
31 #ifndef _TABLE_HXX //autogen
32 #include <tools/table.hxx>
33 #endif
34 #include <sot/formats.hxx>
35 #include <tools/globname.hxx>
36 #include <svtools/transfer.hxx>
37 
38 #include <vcl/dialog.hxx>
39 #include <vcl/fixed.hxx>
40 #include <vcl/button.hxx>
41 #include <vcl/edit.hxx>
42 #include <vcl/lstbox.hxx>
43 
44 /********************** SvPasteObjectDialog ******************************
45 *************************************************************************/
46 
47 struct TransferableObjectDescriptor;
48 class DataFlavorExVecor;
49 class TransferableDataHelper;
50 
51 class SvPasteObjectDialog : public ModalDialog
52 {
53     FixedText aFtSource;
54     FixedText aFtObjectSource;
55     RadioButton aRbPaste;
56     RadioButton aRbPasteLink;
57     CheckBox aCbDisplayAsIcon;
58     PushButton aPbChangeIcon;
59     FixedLine aFlChoice;
60 	ListBox aLbInsertList;
61     OKButton aOKButton1;
62     CancelButton aCancelButton1;
63     HelpButton aHelpButton1;
64     String aSObject;
65 	Table       	aSupplementTable;
66 	SvGlobalName	aObjClassName;
67 	String			aObjName;
68 	sal_uInt16      	nAspect;
69 	sal_Bool        	bLink;
70 
71 	ListBox&		ObjectLB()		{ return aLbInsertList; }
72 	FixedText&		ObjectSource()	{ return aFtObjectSource; }
73 	RadioButton&	PasteLink()		{ return aRbPasteLink; }
74 	CheckBox&		AsIconBox()		{ return aCbDisplayAsIcon; }
75 
76 	const String& 	GetObjString()	{ return aSObject; }
77 	void			SelectObject();
78 	DECL_LINK( SelectHdl, ListBox * );
79 	DECL_LINK( DoubleClickHdl, ListBox * );
80 	void        	SetDefault();
81 	sal_uInt16      GetAspect() const { return nAspect; }
82 	sal_Bool        ShouldLink() const { return bLink; }
83 
84 public:
85                 SvPasteObjectDialog( Window* pParent );
86 				~SvPasteObjectDialog();
87 
88 	void        Insert( SotFormatStringId nFormat, const String & rFormatName );
89     void        SetObjName( const SvGlobalName & rClass, const String & rObjName );
90     sal_uLong       GetFormat( const TransferableDataHelper& aHelper,
91                         const DataFlavorExVector* pFormats=0,
92                         const TransferableObjectDescriptor* pDesc=0 );
93 };
94 
95 #endif // _PASTEDLG_HXX
96