[Libreoffice-commits] core.git: include/vcl vcl/inc vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sun Jul 12 19:31:38 UTC 2020


 include/vcl/ivctrl.hxx          |   50 ------------------------
 vcl/inc/verticaltabctrl.hxx     |   83 ++++++++++++++++++++++++++++++++++++++++
 vcl/source/app/salvtables.cxx   |    1 
 vcl/source/control/imivctl1.cxx |    1 
 vcl/source/control/ivctrl.cxx   |    1 
 vcl/source/uitest/uiobject.cxx  |    1 
 vcl/source/window/builder.cxx   |    1 
 7 files changed, 88 insertions(+), 50 deletions(-)

New commits:
commit 2f04d2c4d9fdcc5871d536690a946c1d79df4eb6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 12 19:12:18 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Jul 12 21:30:57 2020 +0200

    VerticalTabControl can be in private header
    
    Change-Id: I95ee7a1477fb84eb9fcf2f70ab7d262b9eb47088
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98606
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/ivctrl.hxx b/include/vcl/ivctrl.hxx
index 399079c69f9d..753b5ed4a6c2 100644
--- a/include/vcl/ivctrl.hxx
+++ b/include/vcl/ivctrl.hxx
@@ -23,7 +23,6 @@
 #include <memory>
 #include <vcl/dllapi.h>
 #include <vcl/ctrl.hxx>
-#include <vcl/layout.hxx>
 #include <tools/link.hxx>
 #include <vcl/image.hxx>
 #include <o3tl/deleter.hxx>
@@ -278,55 +277,6 @@ public:
     virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
 };
 
-struct VerticalTabPageData;
-
-class VerticalTabControl final : public VclHBox
-{
-    VclPtr<SvtIconChoiceCtrl> m_xChooser;
-    VclPtr<VclVBox> m_xBox;
-
-    std::vector<std::unique_ptr<VerticalTabPageData>> maPageList;
-    OString m_sCurrentPageId;
-
-    Link<VerticalTabControl*,void> m_aActivateHdl;
-    Link<VerticalTabControl*,bool> m_aDeactivateHdl;
-
-    DECL_LINK(ChosePageHdl_Impl, SvtIconChoiceCtrl*, void);
-
-    void ActivatePage();
-    bool DeactivatePage();
-
-    VerticalTabPageData* GetPageData(const OString& rId) const;
-    VerticalTabPageData* GetPageData(const SvxIconChoiceCtrlEntry* pEntry) const;
-
-public:
-    VerticalTabControl(vcl::Window* pParent);
-    virtual ~VerticalTabControl() override;
-    virtual void dispose() override;
-
-    sal_uInt16 GetPageCount() const { return m_xChooser->GetEntryCount(); }
-
-    OString GetCurPageId() const { return m_sCurrentPageId; }
-    void SetCurPageId(const OString& rId);
-
-    sal_uInt16 GetPagePos(const OString& rPageId) const;
-    OString GetPageId(sal_uInt16 nIndex) const;
-    VclPtr<vcl::Window> GetPage(const OString& rPageId);
-
-    void RemovePage(const OString& rPageId);
-    void InsertPage(const OString& rPageId, const OUString& rLabel, const Image& rImage, const OUString& rTooltip, VclPtr<vcl::Window> xPage, int nPos = -1);
-
-    void SetActivatePageHdl( const Link<VerticalTabControl*,void>& rLink ) { m_aActivateHdl = rLink; }
-    void SetDeactivatePageHdl( const Link<VerticalTabControl*, bool>& rLink ) { m_aDeactivateHdl = rLink; }
-
-    OUString GetPageText(const OString& rPageId) const;
-    void SetPageText(const OString& rPageId, const OUString& rText);
-
-    vcl::Window* GetPageParent() { return m_xBox.get(); }
-
-    virtual FactoryFunction GetUITestFactory() const override;
-};
-
 #endif // INCLUDED_VCL_IVCTRL_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/verticaltabctrl.hxx b/vcl/inc/verticaltabctrl.hxx
new file mode 100644
index 000000000000..060777c65602
--- /dev/null
+++ b/vcl/inc/verticaltabctrl.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+#include <vcl/dllapi.h>
+#include <vcl/ivctrl.hxx>
+#include <vcl/layout.hxx>
+
+struct VerticalTabPageData;
+
+class VerticalTabControl final : public VclHBox
+{
+    VclPtr<SvtIconChoiceCtrl> m_xChooser;
+    VclPtr<VclVBox> m_xBox;
+
+    std::vector<std::unique_ptr<VerticalTabPageData>> maPageList;
+    OString m_sCurrentPageId;
+
+    Link<VerticalTabControl*, void> m_aActivateHdl;
+    Link<VerticalTabControl*, bool> m_aDeactivateHdl;
+
+    DECL_LINK(ChosePageHdl_Impl, SvtIconChoiceCtrl*, void);
+
+    void ActivatePage();
+    bool DeactivatePage();
+
+    VerticalTabPageData* GetPageData(const OString& rId) const;
+    VerticalTabPageData* GetPageData(const SvxIconChoiceCtrlEntry* pEntry) const;
+
+public:
+    VerticalTabControl(vcl::Window* pParent);
+    virtual ~VerticalTabControl() override;
+    virtual void dispose() override;
+
+    sal_uInt16 GetPageCount() const { return m_xChooser->GetEntryCount(); }
+
+    OString GetCurPageId() const { return m_sCurrentPageId; }
+    void SetCurPageId(const OString& rId);
+
+    sal_uInt16 GetPagePos(const OString& rPageId) const;
+    OString GetPageId(sal_uInt16 nIndex) const;
+    VclPtr<vcl::Window> GetPage(const OString& rPageId);
+
+    void RemovePage(const OString& rPageId);
+    void InsertPage(const OString& rPageId, const OUString& rLabel, const Image& rImage,
+                    const OUString& rTooltip, VclPtr<vcl::Window> xPage, int nPos = -1);
+
+    void SetActivatePageHdl(const Link<VerticalTabControl*, void>& rLink)
+    {
+        m_aActivateHdl = rLink;
+    }
+    void SetDeactivatePageHdl(const Link<VerticalTabControl*, bool>& rLink)
+    {
+        m_aDeactivateHdl = rLink;
+    }
+
+    OUString GetPageText(const OString& rPageId) const;
+    void SetPageText(const OString& rPageId, const OUString& rText);
+
+    vcl::Window* GetPageParent() { return m_xBox.get(); }
+
+    virtual FactoryFunction GetUITestFactory() const override;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index d28a7cc3f0d4..d371f2cd2d67 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -71,6 +71,7 @@
 #include <vcl/virdev.hxx>
 #include <bitmaps.hlst>
 #include <calendar.hxx>
+#include <verticaltabctrl.hxx>
 #include <wizdlg.hxx>
 #include <salvtables.hxx>
 
diff --git a/vcl/source/control/imivctl1.cxx b/vcl/source/control/imivctl1.cxx
index 0da0fa88d509..aa088ab5ca37 100644
--- a/vcl/source/control/imivctl1.cxx
+++ b/vcl/source/control/imivctl1.cxx
@@ -24,6 +24,7 @@
 #include <vcl/wall.hxx>
 #include <vcl/help.hxx>
 #include <vcl/decoview.hxx>
+#include <vcl/event.hxx>
 #include <vcl/svapp.hxx>
 #include <tools/poly.hxx>
 #include <vcl/lineinfo.hxx>
diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index c0c78a986b0d..71b6b98df54f 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -28,6 +28,7 @@
 #include <vcl/tabctrl.hxx>
 #include <vcl/vclevent.hxx>
 #include <vcl/uitest/uiobject.hxx>
+#include <verticaltabctrl.hxx>
 
 using namespace ::com::sun::star::accessibility;
 
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index fc32de562701..477f1ff06af9 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -29,6 +29,7 @@
 #include <vcl/vclmedit.hxx>
 #include <vcl/uitest/logger.hxx>
 #include <uiobject-internal.hxx>
+#include <verticaltabctrl.hxx>
 
 #include <comphelper/string.hxx>
 #include <comphelper/lok.hxx>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 259cc45fb432..d6fa4a3dae60 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -66,6 +66,7 @@
 #include <strings.hrc>
 #include <treeglue.hxx>
 #include <tools/diagnose_ex.h>
+#include <verticaltabctrl.hxx>
 #include <wizdlg.hxx>
 #include <tools/svlibrary.h>
 #include <jsdialog/jsdialogbuilder.hxx>


More information about the Libreoffice-commits mailing list