LibreOffice Module sc (master) 1
mvtabdlg.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <types.hxx>
23#include <vcl/weld.hxx>
24
25class ScDocument;
26
28{
29public:
30 ScMoveTableDlg(weld::Window* pParent, OUString aDefault);
31 virtual ~ScMoveTableDlg() override;
32
33 sal_uInt16 GetSelectedDocument () const { return nDocument; }
34 SCTAB GetSelectedTable () const { return nTable; }
35 bool GetCopyTable () const { return bCopyTable; }
36 bool GetRenameTable () const { return bRenameTable; }
37 void GetTabNameString( OUString& rString ) const;
38 void SetForceCopyTable ();
39 void EnableRenameTable (bool bFlag);
40 void SetOkBtnLabel ();
41
42private:
43 void ResetRenameInput();
44 void CheckNewTabName();
46
47private:
48 OUString msCurrentDoc;
49 OUString msNewDoc;
50
54
55 const OUString maDefaultName;
56
57 sal_uInt16 mnCurrentDocPos;
58 sal_uInt16 nDocument;
60 bool bCopyTable:1;
63
64 // tdf#96854 - remember last used option for copy/move sheet
65 static bool mbRememeberedCopy;
66
67 std::unique_ptr<weld::RadioButton> m_xBtnMove;
68 std::unique_ptr<weld::RadioButton> m_xBtnCopy;
69 std::unique_ptr<weld::Label> m_xFtDoc;
70 std::unique_ptr<weld::ComboBox> m_xLbDoc;
71 std::unique_ptr<weld::TreeView> m_xLbTable;
72 std::unique_ptr<weld::Entry> m_xEdTabName;
73 std::unique_ptr<weld::Label> m_xFtWarn;
74 std::unique_ptr<weld::Button> m_xBtnOk;
75 std::unique_ptr<weld::Label> m_xUnusedLabel;
76 std::unique_ptr<weld::Label> m_xEmptyLabel;
77 std::unique_ptr<weld::Label> m_xInvalidLabel;
78
79 void Init ();
80 void InitDocListBox ();
81 DECL_LINK(OkHdl, weld::Button&, void);
82 DECL_LINK(SelHdl, weld::ComboBox&, void);
83 DECL_LINK(CheckBtnHdl, weld::Toggleable&, void);
84 DECL_LINK(CheckNameHdl, weld::Entry&, void);
85};
86
87/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString msStrTabNameInvalid
Definition: mvtabdlg.hxx:53
void EnableRenameTable(bool bFlag)
Definition: mvtabdlg.cxx:83
std::unique_ptr< weld::ComboBox > m_xLbDoc
Definition: mvtabdlg.hxx:70
void GetTabNameString(OUString &rString) const
Definition: mvtabdlg.cxx:71
DECL_LINK(CheckNameHdl, weld::Entry &, void)
DECL_LINK(CheckBtnHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Label > m_xFtWarn
Definition: mvtabdlg.hxx:73
void ResetRenameInput()
Definition: mvtabdlg.cxx:90
std::unique_ptr< weld::RadioButton > m_xBtnCopy
Definition: mvtabdlg.hxx:68
OUString msStrTabNameEmpty
Definition: mvtabdlg.hxx:52
sal_uInt16 mnCurrentDocPos
Definition: mvtabdlg.hxx:57
ScMoveTableDlg(weld::Window *pParent, OUString aDefault)
Definition: mvtabdlg.cxx:33
bool GetRenameTable() const
Definition: mvtabdlg.hxx:36
static bool mbRememeberedCopy
Definition: mvtabdlg.hxx:65
std::unique_ptr< weld::TreeView > m_xLbTable
Definition: mvtabdlg.hxx:71
sal_uInt16 nDocument
Definition: mvtabdlg.hxx:58
std::unique_ptr< weld::Label > m_xUnusedLabel
Definition: mvtabdlg.hxx:75
void InitDocListBox()
Definition: mvtabdlg.cxx:210
OUString msCurrentDoc
Definition: mvtabdlg.hxx:48
void SetForceCopyTable()
Definition: mvtabdlg.cxx:76
ScDocument * GetSelectedDoc()
Definition: mvtabdlg.cxx:182
std::unique_ptr< weld::Button > m_xBtnOk
Definition: mvtabdlg.hxx:74
OUString msStrTabNameUsed
Definition: mvtabdlg.hxx:51
void SetOkBtnLabel()
Definition: mvtabdlg.cxx:247
const OUString maDefaultName
Definition: mvtabdlg.hxx:55
bool mbEverEdited
Definition: mvtabdlg.hxx:62
SCTAB GetSelectedTable() const
Definition: mvtabdlg.hxx:34
DECL_LINK(OkHdl, weld::Button &, void)
void CheckNewTabName()
Definition: mvtabdlg.cxx:130
std::unique_ptr< weld::Entry > m_xEdTabName
Definition: mvtabdlg.hxx:72
std::unique_ptr< weld::Label > m_xEmptyLabel
Definition: mvtabdlg.hxx:76
OUString msNewDoc
Definition: mvtabdlg.hxx:49
bool GetCopyTable() const
Definition: mvtabdlg.hxx:35
bool bRenameTable
Definition: mvtabdlg.hxx:61
std::unique_ptr< weld::Label > m_xFtDoc
Definition: mvtabdlg.hxx:69
std::unique_ptr< weld::RadioButton > m_xBtnMove
Definition: mvtabdlg.hxx:67
std::unique_ptr< weld::Label > m_xInvalidLabel
Definition: mvtabdlg.hxx:77
virtual ~ScMoveTableDlg() override
Definition: mvtabdlg.cxx:69
sal_uInt16 GetSelectedDocument() const
Definition: mvtabdlg.hxx:33
DECL_LINK(SelHdl, weld::ComboBox &, void)
sal_Int16 SCTAB
Definition: types.hxx:22