xref: /trunk/main/cui/source/inc/pastedlg.hxx (revision c4eee24d)
1*c4eee24dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*c4eee24dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*c4eee24dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*c4eee24dSAndrew Rist  * distributed with this work for additional information
6*c4eee24dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*c4eee24dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*c4eee24dSAndrew Rist  * "License"); you may not use this file except in compliance
9*c4eee24dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*c4eee24dSAndrew Rist  *
11*c4eee24dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*c4eee24dSAndrew Rist  *
13*c4eee24dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*c4eee24dSAndrew Rist  * software distributed under the License is distributed on an
15*c4eee24dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*c4eee24dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*c4eee24dSAndrew Rist  * specific language governing permissions and limitations
18*c4eee24dSAndrew Rist  * under the License.
19*c4eee24dSAndrew Rist  *
20*c4eee24dSAndrew Rist  *************************************************************/
21*c4eee24dSAndrew Rist 
22*c4eee24dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _PASTEDLG_HXX
25cdf0e10cSrcweir #define _PASTEDLG_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef _TABLE_HXX //autogen
28cdf0e10cSrcweir #include <tools/table.hxx>
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir #include <sot/formats.hxx>
31cdf0e10cSrcweir #include <tools/globname.hxx>
32cdf0e10cSrcweir #include <svtools/transfer.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <vcl/dialog.hxx>
35cdf0e10cSrcweir #include <vcl/fixed.hxx>
36cdf0e10cSrcweir #include <vcl/button.hxx>
37cdf0e10cSrcweir #include <vcl/edit.hxx>
38cdf0e10cSrcweir #include <vcl/lstbox.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir /********************** SvPasteObjectDialog ******************************
41cdf0e10cSrcweir *************************************************************************/
42cdf0e10cSrcweir 
43cdf0e10cSrcweir struct TransferableObjectDescriptor;
44cdf0e10cSrcweir class DataFlavorExVecor;
45cdf0e10cSrcweir class TransferableDataHelper;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class SvPasteObjectDialog : public ModalDialog
48cdf0e10cSrcweir {
49cdf0e10cSrcweir     FixedText aFtSource;
50cdf0e10cSrcweir     FixedText aFtObjectSource;
51cdf0e10cSrcweir     RadioButton aRbPaste;
52cdf0e10cSrcweir     RadioButton aRbPasteLink;
53cdf0e10cSrcweir     CheckBox aCbDisplayAsIcon;
54cdf0e10cSrcweir     PushButton aPbChangeIcon;
55cdf0e10cSrcweir     FixedLine aFlChoice;
56cdf0e10cSrcweir 	ListBox aLbInsertList;
57cdf0e10cSrcweir     OKButton aOKButton1;
58cdf0e10cSrcweir     CancelButton aCancelButton1;
59cdf0e10cSrcweir     HelpButton aHelpButton1;
60cdf0e10cSrcweir     String aSObject;
61cdf0e10cSrcweir 	Table       	aSupplementTable;
62cdf0e10cSrcweir 	SvGlobalName	aObjClassName;
63cdf0e10cSrcweir 	String			aObjName;
64cdf0e10cSrcweir 	sal_uInt16      	nAspect;
65cdf0e10cSrcweir 	sal_Bool        	bLink;
66cdf0e10cSrcweir 
ObjectLB()67cdf0e10cSrcweir 	ListBox&		ObjectLB()		{ return aLbInsertList; }
ObjectSource()68cdf0e10cSrcweir 	FixedText&		ObjectSource()	{ return aFtObjectSource; }
PasteLink()69cdf0e10cSrcweir 	RadioButton&	PasteLink()		{ return aRbPasteLink; }
AsIconBox()70cdf0e10cSrcweir 	CheckBox&		AsIconBox()		{ return aCbDisplayAsIcon; }
71cdf0e10cSrcweir 
GetObjString()72cdf0e10cSrcweir 	const String& 	GetObjString()	{ return aSObject; }
73cdf0e10cSrcweir 	void			SelectObject();
74cdf0e10cSrcweir 	DECL_LINK( SelectHdl, ListBox * );
75cdf0e10cSrcweir 	DECL_LINK( DoubleClickHdl, ListBox * );
76cdf0e10cSrcweir 	void        	SetDefault();
GetAspect() const77cdf0e10cSrcweir 	sal_uInt16      GetAspect() const { return nAspect; }
ShouldLink() const78cdf0e10cSrcweir 	sal_Bool        ShouldLink() const { return bLink; }
79cdf0e10cSrcweir 
80cdf0e10cSrcweir public:
81cdf0e10cSrcweir                 SvPasteObjectDialog( Window* pParent );
82cdf0e10cSrcweir 				~SvPasteObjectDialog();
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 	void        Insert( SotFormatStringId nFormat, const String & rFormatName );
85cdf0e10cSrcweir     void        SetObjName( const SvGlobalName & rClass, const String & rObjName );
86cdf0e10cSrcweir     sal_uLong       GetFormat( const TransferableDataHelper& aHelper,
87cdf0e10cSrcweir                         const DataFlavorExVector* pFormats=0,
88cdf0e10cSrcweir                         const TransferableObjectDescriptor* pDesc=0 );
89cdf0e10cSrcweir };
90cdf0e10cSrcweir 
91cdf0e10cSrcweir #endif // _PASTEDLG_HXX
92