bump product version to 6.3.0.0.beta1
[LibreOffice.git] / cui / source / dialogs / insrc.cxx
blob3da4c32eab5d75360354acff6714023a6e6e94cd
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 #include <dialmgr.hxx>
21 #include <svx/svxdlg.hxx>
22 #include <vcl/svapp.hxx>
23 #include <strings.hrc>
24 #include <insrc.hxx>
26 bool SvxInsRowColDlg::isInsertBefore() const
28 return !m_xAfterBtn->get_active();
31 sal_uInt16 SvxInsRowColDlg::getInsertCount() const
33 return m_xCountEdit->get_value();
36 SvxInsRowColDlg::SvxInsRowColDlg(weld::Window* pParent, bool bColumn, const OString& rHelpId)
37 : GenericDialogController(pParent, "cui/ui/insertrowcolumn.ui", "InsertRowColumnDialog")
38 , m_xCountEdit(m_xBuilder->weld_spin_button("insert_number"))
39 , m_xBeforeBtn(m_xBuilder->weld_radio_button("insert_before"))
40 , m_xAfterBtn(m_xBuilder->weld_radio_button("insert_after"))
42 m_xDialog->set_title(bColumn ? CuiResId(RID_SVXSTR_COL) : CuiResId(RID_SVXSTR_ROW));
44 // tdf#119293
45 if (bColumn) {
46 m_xBeforeBtn->set_label(CuiResId(RID_SVXSTR_INSERTCOL_BEFORE));
47 m_xAfterBtn->set_label(CuiResId(RID_SVXSTR_INSERTCOL_AFTER));
48 } else {
49 m_xBeforeBtn->set_label(CuiResId(RID_SVXSTR_INSERTROW_BEFORE));
50 m_xAfterBtn->set_label(CuiResId(RID_SVXSTR_INSERTROW_AFTER));
53 m_xDialog->set_help_id(rHelpId);
56 short SvxInsRowColDlg::Execute()
58 return run();
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */