Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_SC_SOURCE_UI_INC_MVTABDLG_HXX
21 : #define INCLUDED_SC_SOURCE_UI_INC_MVTABDLG_HXX
22 :
23 : #include "address.hxx"
24 : #include <vcl/dialog.hxx>
25 : #include <vcl/button.hxx>
26 : #include <vcl/lstbox.hxx>
27 : #include <vcl/fixed.hxx>
28 : #include <vcl/edit.hxx>
29 :
30 : class ScMoveTableDlg : public ModalDialog
31 : {
32 : public:
33 : ScMoveTableDlg(vcl::Window* pParent, const OUString& rDefault);
34 : virtual ~ScMoveTableDlg();
35 : virtual void dispose() SAL_OVERRIDE;
36 :
37 0 : sal_uInt16 GetSelectedDocument () const { return nDocument; }
38 0 : SCTAB GetSelectedTable () const { return nTable; }
39 0 : bool GetCopyTable () const { return bCopyTable; }
40 0 : bool GetRenameTable () const { return bRenameTable; }
41 : void GetTabNameString( OUString& rString ) const;
42 : void SetForceCopyTable ();
43 : void EnableCopyTable (bool bFlag=true);
44 : void EnableRenameTable (bool bFlag=true);
45 :
46 : private:
47 : void ResetRenameInput();
48 : void CheckNewTabName();
49 : ScDocument* GetSelectedDoc();
50 : bool IsCurrentDocSelected() const;
51 :
52 : private:
53 : VclPtr<RadioButton> pBtnMove;
54 : VclPtr<RadioButton> pBtnCopy;
55 : VclPtr<ListBox> pLbDoc;
56 : VclPtr<ListBox> pLbTable;
57 : VclPtr<Edit> pEdTabName;
58 : VclPtr<FixedText> pFtWarn;
59 : VclPtr<OKButton> pBtnOk;
60 :
61 : OUString msCurrentDoc;
62 : OUString msNewDoc;
63 :
64 : OUString msStrTabNameUsed;
65 : OUString msStrTabNameEmpty;
66 : OUString msStrTabNameInvalid;
67 :
68 : const OUString maDefaultName;
69 :
70 : sal_uInt16 mnCurrentDocPos;
71 : sal_uInt16 nDocument;
72 : SCTAB nTable;
73 : bool bCopyTable:1;
74 : bool bRenameTable:1;
75 : bool mbEverEdited:1;
76 :
77 : void Init ();
78 : void InitBtnRename ();
79 : void InitDocListBox ();
80 : DECL_LINK( OkHdl, void * );
81 : DECL_LINK( SelHdl, ListBox * );
82 : DECL_LINK( CheckBtnHdl, void * );
83 : DECL_LINK( CheckNameHdl, Edit * );
84 : };
85 :
86 : #endif // INCLUDED_SC_SOURCE_UI_INC_MVTABDLG_HXX
87 :
88 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|