[Libreoffice-commits] core.git: include/svx svx/inc svx/Library_svxcore.mk svx/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu May 21 18:15:38 UTC 2020


 include/svx/labelitemwindow.hxx                |    3 +
 svx/Library_svxcore.mk                         |    1 
 svx/inc/pch/precompiled_svx.hxx                |    2 -
 svx/source/dialog/srchdlg.cxx                  |    2 -
 svx/source/form/labelitemwindow.cxx            |   43 +++++++++++++++++++++++++
 svx/source/form/tbxform.cxx                    |   42 ------------------------
 svx/source/tbxctrls/tbunosearchcontrollers.cxx |    2 -
 7 files changed, 50 insertions(+), 45 deletions(-)

New commits:
commit 6124f6726a8f6da9088024fabac9c3ccc3dca08a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 21 09:52:30 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 21 20:15:01 2020 +0200

    split out labelitemwindow
    
    Change-Id: If5121b58538708a47783aee099bc426408989cbf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94636
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/inc/labelitemwindow.hxx b/include/svx/labelitemwindow.hxx
similarity index 89%
rename from svx/source/inc/labelitemwindow.hxx
rename to include/svx/labelitemwindow.hxx
index 798369c10fa0..4f79113339ea 100644
--- a/svx/source/inc/labelitemwindow.hxx
+++ b/include/svx/labelitemwindow.hxx
@@ -10,8 +10,9 @@
 #pragma once
 
 #include <svtools/InterimItemWindow.hxx>
+#include <svx/svxdllapi.h>
 
-class LabelItemWindow final : public InterimItemWindow
+class SVXCORE_DLLPUBLIC LabelItemWindow final : public InterimItemWindow
 {
 private:
     std::unique_ptr<weld::Label> m_xLabel;
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index f18e60d54d5d..cf23b824ca3e 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -433,6 +433,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
     svx/source/form/datalistener \
     svx/source/form/datanavi \
     svx/source/form/delayedevent \
+    svx/source/form/labelitemwindow \
     svx/source/form/fmcontrolbordermanager \
     svx/source/form/fmcontrollayout \
     svx/source/form/fmdmod \
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index e692c3de4f25..45da207e9fb8 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -370,7 +370,6 @@
 #include <fmprop.hxx>
 #include <fmservs.hxx>
 #include <helpids.h>
-#include <labelitemwindow.hxx>
 #include <svx/AccessibleControlShape.hxx>
 #include <svx/AccessibleShape.hxx>
 #include <svx/AccessibleShapeInfo.hxx>
@@ -394,6 +393,7 @@
 #include <svx/galmisc.hxx>
 #include <svx/itemwin.hxx>
 #include <svx/itextprovider.hxx>
+#include <svx/labelitemwindow.hxx>
 #include <svx/obj3d.hxx>
 #include <svx/pageitem.hxx>
 #include <svx/rotmodit.hxx>
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 371bac5c75cf..ffd8d0e90adb 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -74,8 +74,8 @@
 #include <memory>
 
 #include <findtextfield.hxx>
-#include <labelitemwindow.hxx>
 
+#include <svx/labelitemwindow.hxx>
 #include <svx/xdef.hxx>
 #include <officecfg/Office/Common.hxx>
 
diff --git a/svx/source/form/labelitemwindow.cxx b/svx/source/form/labelitemwindow.cxx
new file mode 100644
index 000000000000..45c5160f4c4f
--- /dev/null
+++ b/svx/source/form/labelitemwindow.cxx
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <svx/labelitemwindow.hxx>
+
+LabelItemWindow::LabelItemWindow(vcl::Window* pParent, const OUString& rLabel)
+    : InterimItemWindow(pParent, "svx/ui/labelbox.ui", "LabelBox")
+    , m_xLabel(m_xBuilder->weld_label("label"))
+{
+    m_xLabel->set_label(rLabel);
+
+    SetOptimalSize();
+
+    m_xLabel->set_toolbar_background();
+}
+
+void LabelItemWindow::SetOptimalSize()
+{
+    Size aSize(m_xLabel->get_preferred_size());
+    aSize.AdjustWidth(12);
+
+    SetSizePixel(aSize);
+}
+
+void LabelItemWindow::set_label(const OUString& rLabel) { m_xLabel->set_label(rLabel); }
+
+OUString LabelItemWindow::get_label() const { return m_xLabel->get_label(); }
+
+void LabelItemWindow::dispose()
+{
+    m_xLabel.reset();
+    InterimItemWindow::dispose();
+}
+
+LabelItemWindow::~LabelItemWindow() { disposeOnce(); }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index 035dfca802bf..837aa154aabf 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -23,9 +23,9 @@
 #include <vcl/event.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/settings.hxx>
-#include <labelitemwindow.hxx>
 
 #include <svx/dialmgr.hxx>
+#include <svx/labelitemwindow.hxx>
 #include <svx/svxids.hrc>
 #include <svx/strings.hrc>
 #include <tbxform.hxx>
@@ -157,46 +157,6 @@ SvxFmTbxCtlRecText::~SvxFmTbxCtlRecText()
 {
 }
 
-LabelItemWindow::LabelItemWindow(vcl::Window *pParent, const OUString& rLabel)
-    : InterimItemWindow(pParent, "svx/ui/labelbox.ui", "LabelBox")
-    , m_xLabel(m_xBuilder->weld_label("label"))
-{
-    m_xLabel->set_label(rLabel);
-
-    SetOptimalSize();
-
-    m_xLabel->set_toolbar_background();
-}
-
-void LabelItemWindow::SetOptimalSize()
-{
-    Size aSize(m_xLabel->get_preferred_size());
-    aSize.AdjustWidth(12);
-
-    SetSizePixel(aSize);
-}
-
-void LabelItemWindow::set_label(const OUString& rLabel)
-{
-    m_xLabel->set_label(rLabel);
-}
-
-OUString LabelItemWindow::get_label() const
-{
-    return m_xLabel->get_label();
-}
-
-void LabelItemWindow::dispose()
-{
-    m_xLabel.reset();
-    InterimItemWindow::dispose();
-}
-
-LabelItemWindow::~LabelItemWindow()
-{
-    disposeOnce();
-}
-
 VclPtr<InterimItemWindow> SvxFmTbxCtlRecText::CreateItemWindow( vcl::Window* pParent )
 {
     OUString aText(SvxResId(RID_STR_REC_TEXT));
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 584784387da3..c68c168b6599 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -56,11 +56,11 @@
 #include <vcl/toolbox.hxx>
 #include <vcl/svapp.hxx>
 #include <rtl/instance.hxx>
+#include <svx/labelitemwindow.hxx>
 #include <svx/srchdlg.hxx>
 #include <vcl/event.hxx>
 
 #include <findtextfield.hxx>
-#include <labelitemwindow.hxx>
 
 using namespace css;
 


More information about the Libreoffice-commits mailing list