Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _PASTEDLG_HXX
30 : : #define _PASTEDLG_HXX
31 : :
32 : : #include <map>
33 : : #include <sot/formats.hxx>
34 : : #include <tools/globname.hxx>
35 : : #include <svtools/transfer.hxx>
36 : :
37 : : #include <vcl/dialog.hxx>
38 : : #include <vcl/fixed.hxx>
39 : : #include <vcl/button.hxx>
40 : : #include <vcl/edit.hxx>
41 : : #include <vcl/lstbox.hxx>
42 : :
43 : : /********************** SvPasteObjectDialog ******************************
44 : : *************************************************************************/
45 : :
46 : : struct TransferableObjectDescriptor;
47 : : class TransferableDataHelper;
48 : :
49 : : class SvPasteObjectDialog : public ModalDialog
50 : : {
51 : : FixedText aFtSource;
52 : : FixedText aFtObjectSource;
53 : : RadioButton aRbPaste;
54 : : RadioButton aRbPasteLink;
55 : : CheckBox aCbDisplayAsIcon;
56 : : PushButton aPbChangeIcon;
57 : : FixedLine aFlChoice;
58 : : ListBox aLbInsertList;
59 : : OKButton aOKButton1;
60 : : CancelButton aCancelButton1;
61 : : HelpButton aHelpButton1;
62 : : ::std::map< SotFormatStringId, String > aSupplementMap;
63 : : SvGlobalName aObjClassName;
64 : : String aObjName;
65 : : sal_uInt16 nAspect;
66 : : sal_Bool bLink;
67 : :
68 : 0 : ListBox& ObjectLB() { return aLbInsertList; }
69 : 0 : FixedText& ObjectSource() { return aFtObjectSource; }
70 : 0 : RadioButton& PasteLink() { return aRbPasteLink; }
71 : 0 : CheckBox& AsIconBox() { return aCbDisplayAsIcon; }
72 : :
73 : : void SelectObject();
74 : : DECL_LINK( SelectHdl, ListBox * );
75 : : DECL_LINK( DoubleClickHdl, ListBox * );
76 : : void SetDefault();
77 : : sal_uInt16 GetAspect() const { return nAspect; }
78 : : 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 : :
93 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|