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