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 :
36 0 : sal_uInt16 GetSelectedDocument () const { return nDocument; }
37 0 : SCTAB GetSelectedTable () const { return nTable; }
38 0 : bool GetCopyTable () const { return bCopyTable; }
39 0 : bool GetRenameTable () const { return bRenameTable; }
40 : void GetTabNameString( OUString& rString ) const;
41 : void SetForceCopyTable ();
42 : void EnableCopyTable (bool bFlag=true);
43 : void EnableRenameTable (bool bFlag=true);
44 :
45 : private:
46 : void ResetRenameInput();
47 : void CheckNewTabName();
48 : ScDocument* GetSelectedDoc();
49 : bool IsCurrentDocSelected() const;
50 :
51 : private:
52 : RadioButton* pBtnMove;
53 : RadioButton* pBtnCopy;
54 : ListBox* pLbDoc;
55 : ListBox* pLbTable;
56 : Edit* pEdTabName;
57 : FixedText* pFtWarn;
58 : OKButton* pBtnOk;
59 :
60 : OUString msCurrentDoc;
61 : OUString msNewDoc;
62 :
63 : OUString msStrTabNameUsed;
64 : OUString msStrTabNameEmpty;
65 : OUString msStrTabNameInvalid;
66 :
67 : const OUString maDefaultName;
68 :
69 : sal_uInt16 mnCurrentDocPos;
70 : sal_uInt16 nDocument;
71 : SCTAB nTable;
72 : bool bCopyTable:1;
73 : bool bRenameTable:1;
74 : bool mbEverEdited:1;
75 :
76 : void Init ();
77 : void InitBtnRename ();
78 : void InitDocListBox ();
79 : DECL_LINK( OkHdl, void * );
80 : DECL_LINK( SelHdl, ListBox * );
81 : DECL_LINK( CheckBtnHdl, void * );
82 : DECL_LINK( CheckNameHdl, Edit * );
83 : };
84 :
85 : #endif // INCLUDED_SC_SOURCE_UI_INC_MVTABDLG_HXX
86 :
87 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|