summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-04 16:01:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-04 20:57:38 +0100
commitb4993358c89f4c43fe65aeeb2a8adff4d1e04fed (patch)
tree0f731cba6d7c82965d2cf852a119a6bc5196cce7
parent56d5b221f91f792fa6ff215a54a343c3672d6e24 (diff)
remove intermediate TableDesignPanel
Change-Id: Icdc1aef7a0d53239ee41e818a56d137aa959249c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111973 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sd/Library_sd.mk1
-rw-r--r--sd/source/ui/inc/TableDesignPane.hxx (renamed from sd/source/ui/table/TableDesignPane.hxx)7
-rw-r--r--sd/source/ui/inc/createtabledesignpanel.hxx40
-rw-r--r--sd/source/ui/sidebar/PanelFactory.cxx4
-rw-r--r--sd/source/ui/sidebar/TableDesignPanel.cxx57
-rw-r--r--sd/source/ui/sidebar/TableDesignPanel.hxx48
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx16
-rw-r--r--solenv/clang-format/excludelist4
8 files changed, 11 insertions, 166 deletions
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index b4a029c81920..be4d3e77ffac 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -341,7 +341,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/sidebar/RecentlyUsedMasterPages \
sd/source/ui/sidebar/RecentMasterPagesSelector \
sd/source/ui/sidebar/SlideBackground \
- sd/source/ui/sidebar/TableDesignPanel \
sd/source/ui/slideshow/PaneHider \
sd/source/ui/slideshow/SlideShowRestarter \
sd/source/ui/slideshow/showwin \
diff --git a/sd/source/ui/table/TableDesignPane.hxx b/sd/source/ui/inc/TableDesignPane.hxx
index d03a3260303a..69a8c6142907 100644
--- a/sd/source/ui/table/TableDesignPane.hxx
+++ b/sd/source/ui/inc/TableDesignPane.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SD_SOURCE_UI_TABLE_TABLEDESIGNPANE_HXX
#include <svtools/valueset.hxx>
+#include <sfx2/sidebar/ILayoutableWindow.hxx>
#include <sfx2/sidebar/PanelLayout.hxx>
#include <vcl/weld.hxx>
@@ -102,6 +103,7 @@ private:
};
class TableDesignPane : public PanelLayout
+ , public sfx2::sidebar::ILayoutableWindow
{
private:
std::unique_ptr<TableDesignWidget> m_xImpl;
@@ -113,6 +115,11 @@ public:
{
m_pInitialFocusWidget = m_xImpl->GetInitialFocusWidget();
}
+ virtual css::ui::LayoutSize GetHeightForWidth(const sal_Int32 /*nWidth*/) override
+ {
+ sal_Int32 nMinimumHeight = get_preferred_size().Height();
+ return css::ui::LayoutSize(nMinimumHeight, -1, nMinimumHeight);
+ }
virtual void dispose() override
{
m_xImpl.reset();
diff --git a/sd/source/ui/inc/createtabledesignpanel.hxx b/sd/source/ui/inc/createtabledesignpanel.hxx
deleted file mode 100644
index 2ed8ec9672e1..000000000000
--- a/sd/source/ui/inc/createtabledesignpanel.hxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- 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 .
- */
-
-#ifndef INCLUDED_SD_SOURCE_UI_INC_CREATETABLEDESIGNPANEL_HXX
-#define INCLUDED_SD_SOURCE_UI_INC_CREATETABLEDESIGNPANEL_HXX
-
-#include <sal/config.h>
-#include <vcl/vclptr.hxx>
-
-namespace vcl
-{
-class Window;
-}
-
-class ViewShellBase;
-
-namespace sd
-{
-VclPtr<vcl::Window> createTableDesignPanel(vcl::Window* pParent, ViewShellBase& rBase);
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx
index baa2938320ad..4fd154ef974f 100644
--- a/sd/source/ui/sidebar/PanelFactory.cxx
+++ b/sd/source/ui/sidebar/PanelFactory.cxx
@@ -28,7 +28,7 @@
#include <CustomAnimationPane.hxx>
#include "NavigatorWrapper.hxx"
#include <SlideTransitionPane.hxx>
-#include "TableDesignPanel.hxx"
+#include <TableDesignPane.hxx>
#include "SlideBackground.hxx"
#include <sfx2/sidebar/SidebarPanelBase.hxx>
@@ -113,7 +113,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
else if (rsUIElementResourceURL.endsWith("/SlideTransitions"))
pControl = VclPtr<SlideTransitionPane>::Create(pParentWindow, *pBase, xFrame);
else if (rsUIElementResourceURL.endsWith("/TableDesign"))
- pControl = VclPtr<TableDesignPanel>::Create(pParentWindow, *pBase);
+ pControl = VclPtr<TableDesignPane>::Create(pParentWindow, *pBase);
else if (rsUIElementResourceURL.endsWith("/NavigatorPanel"))
pControl = VclPtr<NavigatorWrapper>::Create(pParentWindow, *pBase, pBindings);
else if (rsUIElementResourceURL.endsWith("/SlideBackgroundPanel"))
diff --git a/sd/source/ui/sidebar/TableDesignPanel.cxx b/sd/source/ui/sidebar/TableDesignPanel.cxx
deleted file mode 100644
index f756c46e0107..000000000000
--- a/sd/source/ui/sidebar/TableDesignPanel.cxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- 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 .
- */
-
-#include "TableDesignPanel.hxx"
-#include <createtabledesignpanel.hxx>
-
-#include <ViewShellBase.hxx>
-
-namespace sd::sidebar {
-
-TableDesignPanel::TableDesignPanel (
- vcl::Window* pParentWindow,
- ViewShellBase& rViewShellBase)
- : PanelBase(pParentWindow, rViewShellBase)
-{
-#ifdef DEBUG
- SetText(OUString("sd:TableDesignPanel"));
-#endif
-}
-
-TableDesignPanel::~TableDesignPanel()
-{
-}
-
-vcl::Window* TableDesignPanel::CreateWrappedControl (
- vcl::Window* pParentWindow,
- ViewShellBase& rViewShellBase)
-{
- return createTableDesignPanel(pParentWindow, rViewShellBase);
-}
-
-css::ui::LayoutSize TableDesignPanel::GetHeightForWidth (const sal_Int32 /*nWidth*/)
-{
- Window *pControl = mpWrappedControl.get();
- sal_Int32 nMinimumHeight = pControl ? pControl->get_preferred_size().Height() : 0;
- return css::ui::LayoutSize(nMinimumHeight,-1, nMinimumHeight);
-}
-
-} // end of namespace sd::sidebar
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/sidebar/TableDesignPanel.hxx b/sd/source/ui/sidebar/TableDesignPanel.hxx
deleted file mode 100644
index 7a2f15832fc9..000000000000
--- a/sd/source/ui/sidebar/TableDesignPanel.hxx
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- 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 .
- */
-#ifndef INCLUDED_SD_SOURCE_UI_SIDEBAR_TABLEDESIGNPANEL_HXX
-#define INCLUDED_SD_SOURCE_UI_SIDEBAR_TABLEDESIGNPANEL_HXX
-
-#include "PanelBase.hxx"
-
-namespace sd::sidebar {
-
-class TableDesignPanel
- : public PanelBase
-{
-public:
- TableDesignPanel (
- vcl::Window* pParentWindow,
- ViewShellBase& rViewShellBase);
- virtual ~TableDesignPanel() override;
-
- // ILayoutableWindow
- virtual css::ui::LayoutSize GetHeightForWidth (const sal_Int32 nWidth) override;
-
-protected:
- virtual vcl::Window* CreateWrappedControl (
- vcl::Window* pParentWindow,
- ViewShellBase& rViewShellBase) override;
-};
-
-} // end of namespace sd::sidebar
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 3e4fa36b05d8..01e615d103dd 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -51,8 +51,7 @@
#include <svx/sdr/table/tabledesign.hxx>
#include <o3tl/enumrange.hxx>
-#include "TableDesignPane.hxx"
-#include <createtabledesignpanel.hxx>
+#include <TableDesignPane.hxx>
#include <ViewShell.hxx>
#include <ViewShellBase.hxx>
@@ -759,19 +758,6 @@ void TableDesignWidget::FillDesignPreviewControl()
m_xValueSet->SelectItem(nSelectedItem);
}
-VclPtr<vcl::Window> createTableDesignPanel( vcl::Window* pParent, ViewShellBase& rBase )
-{
- VclPtr<TableDesignPane> pRet = nullptr;
- try
- {
- pRet = VclPtr<TableDesignPane>::Create( pParent, rBase );
- }
- catch (const uno::Exception&)
- {
- }
- return pRet;
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index cb3bfdfa8299..f19542f244bc 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -9844,6 +9844,7 @@ sd/source/ui/inc/SlideSorter.hxx
sd/source/ui/inc/SlideSorterViewShell.hxx
sd/source/ui/inc/SlideTransitionPane.hxx
sd/source/ui/inc/TabControl.hxx
+sd/source/ui/inc/TableDesignPane.hxx
sd/source/ui/inc/TextObjectBar.hxx
sd/source/ui/inc/ToolBarManager.hxx
sd/source/ui/inc/View.hxx
@@ -10021,8 +10022,6 @@ sd/source/ui/sidebar/SlideBackground.cxx
sd/source/ui/sidebar/SlideBackground.hxx
sd/source/ui/sidebar/SlideTransitionPanel.cxx
sd/source/ui/sidebar/SlideTransitionPanel.hxx
-sd/source/ui/sidebar/TableDesignPanel.cxx
-sd/source/ui/sidebar/TableDesignPanel.hxx
sd/source/ui/slideshow/SlideShowRestarter.cxx
sd/source/ui/slideshow/showwin.cxx
sd/source/ui/slideshow/showwindow.hxx
@@ -10100,7 +10099,6 @@ sd/source/ui/slidesorter/view/SlsTheme.cxx
sd/source/ui/slidesorter/view/SlsToolTip.cxx
sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
sd/source/ui/table/TableDesignPane.cxx
-sd/source/ui/table/TableDesignPane.hxx
sd/source/ui/table/tablefunction.cxx
sd/source/ui/table/tableobjectbar.cxx
sd/source/ui/table/tableobjectbar.hxx