Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / source / ui / inc / mvtabdlg.hxx
blob1a0c26b10e1ed45553044d287ebd104cfd535c27
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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_MVTABDLG_HXX
21 #define SC_MVTABDLG_HXX
24 #include "address.hxx"
25 #include <vcl/dialog.hxx>
26 #include <vcl/button.hxx>
27 #include <vcl/lstbox.hxx>
28 #include <vcl/fixed.hxx>
29 #include <vcl/edit.hxx>
31 //------------------------------------------------------------------------
33 class ScMoveTableDlg : public ModalDialog
35 public:
36 ScMoveTableDlg(Window* pParent, const OUString& rDefault);
37 ~ScMoveTableDlg();
39 sal_uInt16 GetSelectedDocument () const;
40 SCTAB GetSelectedTable () const;
41 bool GetCopyTable () const;
42 bool GetRenameTable () const;
43 void GetTabNameString( OUString& rString ) const;
44 void SetForceCopyTable ();
45 void EnableCopyTable (sal_Bool bFlag=true);
46 void EnableRenameTable (sal_Bool bFlag=true);
48 private:
49 void ResetRenameInput();
50 void CheckNewTabName();
51 ScDocument* GetSelectedDoc();
52 bool IsCurrentDocSelected() const;
54 private:
55 RadioButton* pBtnMove;
56 RadioButton* pBtnCopy;
57 ListBox* pLbDoc;
58 ListBox* pLbTable;
59 Edit* pEdTabName;
60 FixedText* pFtWarn;
61 OKButton* pBtnOk;
63 OUString msCurrentDoc;
64 OUString msNewDoc;
66 OUString msStrTabNameUsed;
67 OUString msStrTabNameEmpty;
68 OUString msStrTabNameInvalid;
70 const OUString maDefaultName;
72 sal_uInt16 mnCurrentDocPos;
73 sal_uInt16 nDocument;
74 SCTAB nTable;
75 bool bCopyTable:1;
76 bool bRenameTable:1;
77 bool mbEverEdited:1;
79 //--------------------------------------
80 void Init ();
81 void InitBtnRename ();
82 void InitDocListBox ();
83 DECL_LINK( OkHdl, void * );
84 DECL_LINK( SelHdl, ListBox * );
85 DECL_LINK( CheckBtnHdl, void * );
86 DECL_LINK( CheckNameHdl, Edit * );
89 #endif // SC_MVTABDLG_HXX
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */