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: instbdlg.hxx,v $
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 ************************************************************************/
31 #ifndef SC_INSTBDLG_HXX
32 #define SC_INSTBDLG_HXX
34 #include "address.hxx"
36 #ifndef _BUTTON_HXX //autogen
37 #include <vcl/button.hxx>
39 #ifndef _GROUP_HXX //autogen
40 #include <vcl/group.hxx>
42 #ifndef _LSTBOX_HXX //autogen
43 #include <vcl/lstbox.hxx>
45 #ifndef _EDIT_HXX //autogen
46 #include <vcl/edit.hxx>
48 #ifndef _FIXED_HXX //autogen
49 #include <vcl/fixed.hxx>
51 #ifndef _DIALOG_HXX //autogen
52 #include <vcl/dialog.hxx>
55 #include <sfx2/objsh.hxx>
56 #include <vcl/field.hxx>
57 #include "expftext.hxx"
59 #include <layout/layout.hxx>
60 #include <layout/layout-pre.hxx>
66 namespace sfx2
{ class DocumentInserter
; }
67 namespace sfx2
{ class FileDialogHelper
; }
69 //------------------------------------------------------------------------
71 class ScInsertTableDlg
: public ModalDialog
74 ScInsertTableDlg( Window
* pParent
, ScViewData
& rViewData
, SCTAB nTabCount
, bool bFromFile
);
77 virtual short Execute(); // ueberladen, um Dialog-Parent zu setzen
79 BOOL
GetTablesFromFile() { return aBtnFromFile
.IsChecked(); }
80 BOOL
GetTablesAsLink() { return aBtnLink
.IsChecked(); }
82 const String
* GetFirstTable( USHORT
* pN
= NULL
);
83 const String
* GetNextTable( USHORT
* pN
= NULL
);
84 ScDocShell
* GetDocShellTables() { return pDocShTables
; }
85 BOOL
IsTableBefore() { return aBtnBefore
.IsChecked(); }
86 SCTAB
GetTableCount() { return nTableCount
;}
89 RadioButton aBtnBefore
;
90 RadioButton aBtnBehind
;
93 RadioButton aBtnFromFile
;
95 NumericField aNfCount
;
98 MultiListBox aLbTables
;
99 ScExpandedFixedText aFtPath
;
100 PushButton aBtnBrowse
;
104 CancelButton aBtnCancel
;
108 ScViewData
& rViewData
;
110 ScDocShell
* pDocShTables
;
111 sfx2::DocumentInserter
* pDocInserter
;
112 SfxObjectShellRef aDocShTablesRef
;
115 USHORT nSelTabIndex
; // fuer GetFirstTable() / GetNextTable()
116 String aStrCurSelTable
;
119 #ifdef SC_INSTBDLG_CXX
120 void Init_Impl( bool bFromFile
);
121 void SetNewTable_Impl();
122 void SetFromTo_Impl();
123 void FillTables_Impl( ScDocument
* pSrcDoc
);
124 void DoEnable_Impl();
126 DECL_LINK( BrowseHdl_Impl
, PushButton
* );
127 DECL_LINK( ChoiceHdl_Impl
, RadioButton
* );
128 DECL_LINK( SelectHdl_Impl
, MultiListBox
* );
129 DECL_LINK( CountHdl_Impl
, NumericField
* );
130 DECL_LINK( DoEnterHdl
, PushButton
* );
131 DECL_LINK( BrowseTimeoutHdl
, Timer
* );
132 DECL_LINK( DialogClosedHdl
, sfx2::FileDialogHelper
* );
136 #include <layout/layout-post.hxx>
138 #endif // SC_INSTBDLG_HXX