bump product version to 7.2.5.1
[LibreOffice.git] / svx / source / form / labelitemwindow.cxx
blob77965cbd4a4e48bb8b24db809347058344f8a912
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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/.
8 */
10 #include <svx/labelitemwindow.hxx>
12 LabelItemWindow::LabelItemWindow(vcl::Window* pParent, const OUString& rLabel)
13 : InterimItemWindow(pParent, "svx/ui/labelbox.ui", "LabelBox")
14 , m_xLabel(m_xBuilder->weld_label("label"))
16 InitControlBase(m_xLabel.get());
18 m_xLabel->set_label(rLabel);
20 SetOptimalSize();
22 m_xLabel->set_toolbar_background();
25 void LabelItemWindow::SetOptimalSize()
27 Size aSize(m_xLabel->get_preferred_size());
28 aSize.AdjustWidth(12);
30 SetSizePixel(aSize);
33 void LabelItemWindow::set_label(const OUString& rLabel) { m_xLabel->set_label(rLabel); }
35 OUString LabelItemWindow::get_label() const { return m_xLabel->get_label(); }
37 void LabelItemWindow::dispose()
39 m_xLabel.reset();
40 InterimItemWindow::dispose();
43 LabelItemWindow::~LabelItemWindow() { disposeOnce(); }
45 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */