1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_INSTBDLG_HXX
21 #define SC_INSTBDLG_HXX
23 #include "address.hxx"
25 #include <vcl/button.hxx>
26 #include <vcl/group.hxx>
27 #include <vcl/lstbox.hxx>
28 #include <vcl/edit.hxx>
29 #include <vcl/fixed.hxx>
30 #include <vcl/dialog.hxx>
32 #include <sfx2/objsh.hxx>
33 #include <vcl/field.hxx>
34 #include "expftext.hxx"
40 namespace sfx2
{ class DocumentInserter
; }
41 namespace sfx2
{ class FileDialogHelper
; }
43 //------------------------------------------------------------------------
45 class ScInsertTableDlg
: public ModalDialog
48 ScInsertTableDlg( Window
* pParent
, ScViewData
& rViewData
, SCTAB nTabCount
, bool bFromFile
);
51 virtual short Execute(); // overloaded to set parent dialog
53 sal_Bool
GetTablesFromFile() const { return m_pBtnFromFile
->IsChecked(); }
54 sal_Bool
GetTablesAsLink() const { return m_pBtnLink
->IsChecked(); }
56 const OUString
* GetFirstTable( sal_uInt16
* pN
= NULL
);
57 const OUString
* GetNextTable( sal_uInt16
* pN
= NULL
);
58 ScDocShell
* GetDocShellTables() { return pDocShTables
; }
59 sal_Bool
IsTableBefore() const { return m_pBtnBefore
->IsChecked(); }
60 SCTAB
GetTableCount() const { return nTableCount
;}
63 RadioButton
* m_pBtnBefore
;
64 RadioButton
* m_pBtnBehind
;
65 RadioButton
* m_pBtnNew
;
66 RadioButton
* m_pBtnFromFile
;
67 FixedText
* m_pFtCount
;
68 NumericField
* m_pNfCount
;
73 PushButton
* m_pBtnBrowse
;
78 ScViewData
& rViewData
;
80 ScDocShell
* pDocShTables
;
81 sfx2::DocumentInserter
* pDocInserter
;
82 SfxObjectShellRef aDocShTablesRef
;
85 sal_uInt16 nSelTabIndex
; // for GetFirstTable() / GetNextTable()
86 OUString aStrCurSelTable
;
88 OUString m_sSheetDotDotDot
;
90 #ifdef SC_INSTBDLG_CXX
91 void Init_Impl( bool bFromFile
);
92 void SetNewTable_Impl();
93 void SetFromTo_Impl();
94 void FillTables_Impl( ScDocument
* pSrcDoc
);
97 DECL_LINK(BrowseHdl_Impl
, void *);
98 DECL_LINK(ChoiceHdl_Impl
, void *);
99 DECL_LINK(SelectHdl_Impl
, void *);
100 DECL_LINK(CountHdl_Impl
, void *);
101 DECL_LINK(DoEnterHdl
, void *);
102 DECL_LINK(BrowseTimeoutHdl
, void *);
103 DECL_LINK( DialogClosedHdl
, sfx2::FileDialogHelper
* );
107 #endif // SC_INSTBDLG_HXX
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */