summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-05 14:46:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-06 13:09:49 +0200
commit4d96e375c28f9fe2dded40cba4ee8c67f77817f3 (patch)
treed5f3be07570199a4019863482d6b67a9e140a57a
parent488b69db9844e40fb432b847a271a92fd9e7414a (diff)
move SVTXGridControl to toolkit
Change-Id: I513a2885027d0295f70e7c64269d1653a6c2642b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137870 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--solenv/clang-format/excludelist55
-rw-r--r--svtools/Library_svt.mk12
-rw-r--r--svtools/source/uno/svtxgridcontrol.hxx110
-rw-r--r--svtools/source/uno/unoiface.cxx50
-rw-r--r--toolkit/Library_tk.mk11
-rw-r--r--toolkit/inc/awt/vclxwindows.hxx82
-rw-r--r--toolkit/inc/controls/table/defaultinputhandler.hxx (renamed from svtools/inc/table/defaultinputhandler.hxx)5
-rw-r--r--toolkit/inc/controls/table/gridtablerenderer.hxx (renamed from svtools/inc/table/gridtablerenderer.hxx)2
-rw-r--r--toolkit/inc/controls/table/mousefunction.hxx (renamed from svtools/inc/mousefunction.hxx)2
-rw-r--r--toolkit/inc/controls/table/tablecontrol.hxx (renamed from svtools/inc/table/tablecontrol.hxx)2
-rw-r--r--toolkit/inc/controls/table/tablecontrolinterface.hxx (renamed from svtools/inc/table/tablecontrolinterface.hxx)4
-rw-r--r--toolkit/inc/controls/table/tableinputhandler.hxx (renamed from svtools/inc/table/tableinputhandler.hxx)0
-rw-r--r--toolkit/inc/controls/table/tablemodel.hxx (renamed from svtools/inc/table/tablemodel.hxx)10
-rw-r--r--toolkit/inc/controls/table/tablerenderer.hxx (renamed from svtools/inc/table/tablerenderer.hxx)2
-rw-r--r--toolkit/inc/controls/table/tablesort.hxx (renamed from svtools/inc/table/tablesort.hxx)3
-rw-r--r--toolkit/inc/controls/table/tabletypes.hxx (renamed from svtools/inc/table/tabletypes.hxx)0
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx9
-rw-r--r--toolkit/source/controls/svtxgridcontrol.cxx (renamed from svtools/source/uno/svtxgridcontrol.cxx)11
-rw-r--r--toolkit/source/controls/table/cellvalueconversion.cxx (renamed from svtools/source/table/cellvalueconversion.cxx)0
-rw-r--r--toolkit/source/controls/table/cellvalueconversion.hxx (renamed from svtools/source/table/cellvalueconversion.hxx)0
-rw-r--r--toolkit/source/controls/table/defaultinputhandler.cxx (renamed from svtools/source/table/defaultinputhandler.cxx)6
-rw-r--r--toolkit/source/controls/table/gridtablerenderer.cxx (renamed from svtools/source/table/gridtablerenderer.cxx)4
-rw-r--r--toolkit/source/controls/table/mousefunction.cxx (renamed from svtools/source/table/mousefunction.cxx)7
-rw-r--r--toolkit/source/controls/table/tablecontrol.cxx (renamed from svtools/source/table/tablecontrol.cxx)2
-rw-r--r--toolkit/source/controls/table/tablecontrol_impl.cxx (renamed from svtools/source/table/tablecontrol_impl.cxx)6
-rw-r--r--toolkit/source/controls/table/tablecontrol_impl.hxx (renamed from svtools/source/table/tablecontrol_impl.hxx)4
-rw-r--r--toolkit/source/controls/table/tabledatawindow.cxx (renamed from svtools/source/table/tabledatawindow.cxx)2
-rw-r--r--toolkit/source/controls/table/tabledatawindow.hxx (renamed from svtools/source/table/tabledatawindow.hxx)0
-rw-r--r--toolkit/source/controls/table/tablegeometry.cxx (renamed from svtools/source/table/tablegeometry.cxx)0
-rw-r--r--toolkit/source/controls/table/tablegeometry.hxx (renamed from svtools/source/table/tablegeometry.hxx)4
-rw-r--r--toolkit/source/controls/unocontroltablemodel.cxx (renamed from svtools/source/uno/unocontroltablemodel.cxx)4
-rw-r--r--toolkit/source/controls/unocontroltablemodel.hxx (renamed from svtools/source/uno/unocontroltablemodel.hxx)4
-rw-r--r--toolkit/source/controls/unogridcolumnfacade.cxx (renamed from svtools/source/uno/unogridcolumnfacade.cxx)0
-rw-r--r--toolkit/source/controls/unogridcolumnfacade.hxx (renamed from svtools/source/uno/unogridcolumnfacade.hxx)2
34 files changed, 169 insertions, 246 deletions
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 57c338efbd9d..2f49fd77545a 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -11198,15 +11198,6 @@ svl/source/uno/pathservice.cxx
svl/unx/source/svdde/ddedummy.cxx
svtools/inc/strings.hxx
svtools/inc/framestatuslistener.hxx
-svtools/inc/table/defaultinputhandler.hxx
-svtools/inc/table/gridtablerenderer.hxx
-svtools/inc/table/tablecontrol.hxx
-svtools/inc/table/tablecontrolinterface.hxx
-svtools/inc/table/tableinputhandler.hxx
-svtools/inc/table/tablemodel.hxx
-svtools/inc/table/tablerenderer.hxx
-svtools/inc/table/tablesort.hxx
-svtools/inc/table/tabletypes.hxx
svtools/langsupport/langsupport.cxx
svtools/source/brwbox/brwbox1.cxx
svtools/source/brwbox/brwbox2.cxx
@@ -11289,19 +11280,6 @@ svtools/source/svrtf/parrtf.cxx
svtools/source/svrtf/rtfkeywd.cxx
svtools/source/svrtf/rtfout.cxx
svtools/source/svrtf/svparser.cxx
-svtools/source/table/cellvalueconversion.cxx
-svtools/source/table/cellvalueconversion.hxx
-svtools/source/table/defaultinputhandler.cxx
-svtools/source/table/gridtablerenderer.cxx
-svtools/source/table/mousefunction.cxx
-svtools/source/table/mousefunction.hxx
-svtools/source/table/tablecontrol.cxx
-svtools/source/table/tablecontrol_impl.cxx
-svtools/source/table/tablecontrol_impl.hxx
-svtools/source/table/tabledatawindow.cxx
-svtools/source/table/tabledatawindow.hxx
-svtools/source/table/tablegeometry.cxx
-svtools/source/table/tablegeometry.hxx
svtools/source/uno/addrtempuno.cxx
svtools/source/uno/fpicker.cxx
svtools/source/uno/fpicker.hxx
@@ -11311,14 +11289,8 @@ svtools/source/uno/miscservices.cxx
svtools/source/uno/popupmenucontrollerbase.cxx
svtools/source/uno/popupwindowcontroller.cxx
svtools/source/uno/statusbarcontroller.cxx
-svtools/source/uno/svtxgridcontrol.cxx
-svtools/source/uno/svtxgridcontrol.hxx
svtools/source/uno/toolboxcontroller.cxx
-svtools/source/uno/unocontroltablemodel.cxx
-svtools/source/uno/unocontroltablemodel.hxx
svtools/source/uno/unoevent.cxx
-svtools/source/uno/unogridcolumnfacade.cxx
-svtools/source/uno/unogridcolumnfacade.hxx
svtools/source/uno/unoiface.cxx
svtools/source/uno/unoimap.cxx
svtools/source/uno/wizard/unowizard.cxx
@@ -13646,6 +13618,15 @@ toolkit/inc/controls/roadmapentry.hxx
toolkit/inc/controls/stdtabcontroller.hxx
toolkit/inc/controls/stdtabcontrollermodel.hxx
toolkit/inc/controls/svmedit.hxx
+toolkit/inc/controls/table/defaultinputhandler.hxx
+toolkit/inc/controls/table/gridtablerenderer.hxx
+toolkit/inc/controls/table/tablecontrol.hxx
+toolkit/inc/controls/table/tablecontrolinterface.hxx
+toolkit/inc/controls/table/tableinputhandler.hxx
+toolkit/inc/controls/table/tablemodel.hxx
+toolkit/inc/controls/table/tablerenderer.hxx
+toolkit/inc/controls/table/tablesort.hxx
+toolkit/inc/controls/table/tabletypes.hxx
toolkit/inc/controls/tabpagecontainer.hxx
toolkit/inc/controls/tabpagemodel.hxx
toolkit/inc/controls/tkscrollbar.hxx
@@ -13702,6 +13683,20 @@ toolkit/source/controls/roadmapentry.cxx
toolkit/source/controls/spinningprogress.cxx
toolkit/source/controls/stdtabcontroller.cxx
toolkit/source/controls/stdtabcontrollermodel.cxx
+toolkit/source/controls/svtxgridcontrol.cxx
+toolkit/source/controls/table/cellvalueconversion.cxx
+toolkit/source/controls/table/cellvalueconversion.hxx
+toolkit/source/controls/table/defaultinputhandler.cxx
+toolkit/source/controls/table/gridtablerenderer.cxx
+toolkit/source/controls/table/mousefunction.cxx
+toolkit/source/controls/table/mousefunction.hxx
+toolkit/source/controls/table/tablecontrol.cxx
+toolkit/source/controls/table/tablecontrol_impl.cxx
+toolkit/source/controls/table/tablecontrol_impl.hxx
+toolkit/source/controls/table/tabledatawindow.cxx
+toolkit/source/controls/table/tabledatawindow.hxx
+toolkit/source/controls/table/tablegeometry.cxx
+toolkit/source/controls/table/tablegeometry.hxx
toolkit/source/controls/tabpagecontainer.cxx
toolkit/source/controls/tabpagemodel.cxx
toolkit/source/controls/tkscrollbar.cxx
@@ -13715,6 +13710,10 @@ toolkit/source/controls/unocontrolcontainer.cxx
toolkit/source/controls/unocontrolcontainermodel.cxx
toolkit/source/controls/unocontrolmodel.cxx
toolkit/source/controls/unocontrols.cxx
+toolkit/source/controls/unocontroltablemodel.cxx
+toolkit/source/controls/unocontroltablemodel.hxx
+toolkit/source/controls/unogridcolumnfacade.cxx
+toolkit/source/controls/unogridcolumnfacade.hxx
toolkit/source/hatchwindow/documentcloser.cxx
toolkit/source/hatchwindow/hatchwindow.cxx
toolkit/source/hatchwindow/hatchwindow.hxx
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 9050425d3dd8..bc7d07b3bd48 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -145,14 +145,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/svrtf/rtfkeywd \
svtools/source/svrtf/rtfout \
svtools/source/svrtf/svparser \
- svtools/source/table/defaultinputhandler \
- svtools/source/table/gridtablerenderer \
- svtools/source/table/tablecontrol \
- svtools/source/table/tablecontrol_impl \
- svtools/source/table/tabledatawindow \
- svtools/source/table/mousefunction \
- svtools/source/table/cellvalueconversion \
- svtools/source/table/tablegeometry \
svtools/source/uno/addrtempuno \
svtools/source/uno/fpicker \
svtools/source/uno/framestatuslistener \
@@ -161,12 +153,8 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
svtools/source/uno/popupmenucontrollerbase \
svtools/source/uno/popupwindowcontroller \
svtools/source/uno/statusbarcontroller \
- svtools/source/uno/svtxgridcontrol \
svtools/source/uno/toolboxcontroller \
- svtools/source/uno/unocontroltablemodel \
- svtools/source/uno/unogridcolumnfacade \
svtools/source/uno/unoevent \
- svtools/source/uno/unoiface \
svtools/source/uno/unoimap \
svtools/source/uno/wizard/unowizard \
svtools/source/uno/wizard/wizardpagecontroller \
diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx
deleted file mode 100644
index 9e4fd85fee89..000000000000
--- a/svtools/source/uno/svtxgridcontrol.hxx
+++ /dev/null
@@ -1,110 +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 .
- */
-
-#pragma once
-
-#include "unocontroltablemodel.hxx"
-#include <table/tablecontrol.hxx>
-#include <com/sun/star/awt/grid/XGridControl.hpp>
-#include <com/sun/star/awt/grid/XGridRowSelection.hpp>
-#include <com/sun/star/awt/grid/XGridDataListener.hpp>
-#include <com/sun/star/awt/grid/GridDataEvent.hpp>
-#include <com/sun/star/awt/grid/XGridSelectionListener.hpp>
-#include <com/sun/star/container/XContainerListener.hpp>
-#include <toolkit/awt/vclxwindow.hxx>
-#include <cppuhelper/implbase.hxx>
-#include <toolkit/helper/listenermultiplexer.hxx>
-
-
-namespace svt::table {
- class TableControl;
-}
-
-typedef ::cppu::ImplInheritanceHelper < VCLXWindow
- , css::awt::grid::XGridControl
- , css::awt::grid::XGridRowSelection
- , css::awt::grid::XGridDataListener
- , css::container::XContainerListener
- > SVTXGridControl_Base;
-class SVTXGridControl final : public SVTXGridControl_Base
-{
-public:
- SVTXGridControl();
- virtual ~SVTXGridControl() override;
-
- // XGridDataListener
- virtual void SAL_CALL rowsInserted( const css::awt::grid::GridDataEvent& Event ) override;
- virtual void SAL_CALL rowsRemoved( const css::awt::grid::GridDataEvent& Event ) override;
- virtual void SAL_CALL dataChanged( const css::awt::grid::GridDataEvent& Event ) override;
- virtual void SAL_CALL rowHeadingChanged( const css::awt::grid::GridDataEvent& Event ) override;
-
- // XContainerListener
- virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
- virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
- virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
-
- // XEventListener
- virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
-
- // XGridControl
- virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) override;
- virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) override;
- virtual ::sal_Int32 SAL_CALL getCurrentColumn( ) override;
- virtual ::sal_Int32 SAL_CALL getCurrentRow( ) override;
- virtual void SAL_CALL goToCell( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) override;
-
- // XGridRowSelection
- virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) override;
- virtual void SAL_CALL selectAllRows() override;
- virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) override;
- virtual void SAL_CALL deselectAllRows() override;
- virtual css::uno::Sequence< ::sal_Int32 > SAL_CALL getSelectedRows() override;
- virtual sal_Bool SAL_CALL hasSelectedRows() override;
- virtual sal_Bool SAL_CALL isRowSelected(::sal_Int32 index) override;
- virtual void SAL_CALL addSelectionListener(const css::uno::Reference< css::awt::grid::XGridSelectionListener > & listener) override;
- virtual void SAL_CALL removeSelectionListener(const css::uno::Reference< css::awt::grid::XGridSelectionListener > & listener) override;
-
- void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
- css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
-
- // css::lang::XComponent
- void SAL_CALL dispose( ) override;
-
- // XWindow
- void SAL_CALL setEnable( sal_Bool bEnable ) override;
-
-private:
- // VCLXWindow
- virtual void SetWindow( const VclPtr< vcl::Window > &pWindow ) override;
-
- void impl_updateColumnsFromModel_nothrow();
- void impl_checkTableModelInit();
-
- void impl_checkColumnIndex_throw( ::svt::table::TableControl const & i_table, sal_Int32 const i_columnIndex ) const;
- void impl_checkRowIndex_throw( ::svt::table::TableControl const & i_table, sal_Int32 const i_rowIndex ) const;
-
- virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
- void ImplCallItemListeners();
-
- std::shared_ptr< ::svt::table::UnoControlTableModel > m_xTableModel;
- bool m_bTableModelInitCompleted;
- SelectionListenerMultiplexer m_aSelectionListeners;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
deleted file mode 100644
index 71bc18150c08..000000000000
--- a/svtools/source/uno/unoiface.cxx
+++ /dev/null
@@ -1,50 +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 <unoiface.hxx>
-#include "svtxgridcontrol.hxx"
-#include <table/tablecontrol.hxx>
-
-// help function for the toolkit...
-
-extern "C" {
-
-SAL_DLLPUBLIC_EXPORT vcl::Window* CreateWindow( rtl::Reference<VCLXWindow>* ppNewComp, const css::awt::WindowDescriptor* pDescriptor, vcl::Window* pParent, WinBits nWinBits )
-{
- vcl::Window* pWindow = nullptr;
- OUString aServiceName( pDescriptor->WindowServiceName );
- if ( aServiceName.equalsIgnoreAsciiCase( "Grid" ) )
- {
- if ( pParent )
- {
- pWindow = VclPtr< ::svt::table::TableControl>::Create(pParent, nWinBits);
- *ppNewComp = new SVTXGridControl;
- }
- else
- {
- *ppNewComp = nullptr;
- return nullptr;
- }
- }
- return pWindow;
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index 018c44ddb2be..266f64d95507 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -90,6 +90,7 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/controls/grid/gridcontrol \
toolkit/source/controls/roadmapcontrol \
toolkit/source/controls/roadmapentry \
+ toolkit/source/controls/svtxgridcontrol \
toolkit/source/controls/svmedit \
toolkit/source/controls/tabpagecontainer \
toolkit/source/controls/tabpagemodel \
@@ -99,6 +100,14 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/controls/tkspinbutton \
toolkit/source/controls/animatedimages \
toolkit/source/controls/spinningprogress \
+ toolkit/source/controls/table/cellvalueconversion \
+ toolkit/source/controls/table/defaultinputhandler \
+ toolkit/source/controls/table/gridtablerenderer \
+ toolkit/source/controls/table/mousefunction \
+ toolkit/source/controls/table/tablecontrol \
+ toolkit/source/controls/table/tablecontrol_impl \
+ toolkit/source/controls/table/tabledatawindow \
+ toolkit/source/controls/table/tablegeometry \
toolkit/source/controls/tree/treecontrol \
toolkit/source/controls/tree/treecontrolpeer \
toolkit/source/controls/tree/treedatamodel \
@@ -107,7 +116,9 @@ $(eval $(call gb_Library_add_exception_objects,tk,\
toolkit/source/controls/unocontrolcontainer \
toolkit/source/controls/unocontrolcontainermodel \
toolkit/source/controls/unocontrolmodel \
+ toolkit/source/controls/unocontroltablemodel \
toolkit/source/controls/unocontrols \
+ toolkit/source/controls/unogridcolumnfacade \
toolkit/source/hatchwindow/documentcloser \
toolkit/source/hatchwindow/hatchwindow \
toolkit/source/hatchwindow/hatchwindowfactory \
diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx
index 21950271e95e..46f7b8181c86 100644
--- a/toolkit/inc/awt/vclxwindows.hxx
+++ b/toolkit/inc/awt/vclxwindows.hxx
@@ -30,6 +30,12 @@
#include <com/sun/star/awt/XSimpleTabController.hpp>
#include <com/sun/star/awt/XTextArea.hpp>
#include <com/sun/star/awt/XTimeField.hpp>
+#include <com/sun/star/awt/grid/XGridControl.hpp>
+#include <com/sun/star/awt/grid/XGridRowSelection.hpp>
+#include <com/sun/star/awt/grid/XGridDataListener.hpp>
+#include <com/sun/star/awt/grid/GridDataEvent.hpp>
+#include <com/sun/star/awt/grid/XGridSelectionListener.hpp>
+#include <com/sun/star/container/XContainerListener.hpp>
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/Date.hpp>
@@ -694,4 +700,80 @@ public:
virtual void GetPropertyIds( std::vector< sal_uInt16 > &aIds ) override { return ImplGetPropertyIds( aIds ); }
};
+namespace svt::table {
+ class TableControl;
+ class UnoControlTableModel;
+}
+
+typedef ::cppu::ImplInheritanceHelper < VCLXWindow
+ , css::awt::grid::XGridControl
+ , css::awt::grid::XGridRowSelection
+ , css::awt::grid::XGridDataListener
+ , css::container::XContainerListener
+ > SVTXGridControl_Base;
+class SVTXGridControl final : public SVTXGridControl_Base
+{
+public:
+ SVTXGridControl();
+ virtual ~SVTXGridControl() override;
+
+ // XGridDataListener
+ virtual void SAL_CALL rowsInserted( const css::awt::grid::GridDataEvent& Event ) override;
+ virtual void SAL_CALL rowsRemoved( const css::awt::grid::GridDataEvent& Event ) override;
+ virtual void SAL_CALL dataChanged( const css::awt::grid::GridDataEvent& Event ) override;
+ virtual void SAL_CALL rowHeadingChanged( const css::awt::grid::GridDataEvent& Event ) override;
+
+ // XContainerListener
+ virtual void SAL_CALL elementInserted( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementRemoved( const css::container::ContainerEvent& Event ) override;
+ virtual void SAL_CALL elementReplaced( const css::container::ContainerEvent& Event ) override;
+
+ // XEventListener
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
+
+ // XGridControl
+ virtual ::sal_Int32 SAL_CALL getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) override;
+ virtual ::sal_Int32 SAL_CALL getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) override;
+ virtual ::sal_Int32 SAL_CALL getCurrentColumn( ) override;
+ virtual ::sal_Int32 SAL_CALL getCurrentRow( ) override;
+ virtual void SAL_CALL goToCell( ::sal_Int32 i_columnIndex, ::sal_Int32 i_rowIndex ) override;
+
+ // XGridRowSelection
+ virtual void SAL_CALL selectRow( ::sal_Int32 i_rowIndex ) override;
+ virtual void SAL_CALL selectAllRows() override;
+ virtual void SAL_CALL deselectRow( ::sal_Int32 i_rowIndex ) override;
+ virtual void SAL_CALL deselectAllRows() override;
+ virtual css::uno::Sequence< ::sal_Int32 > SAL_CALL getSelectedRows() override;
+ virtual sal_Bool SAL_CALL hasSelectedRows() override;
+ virtual sal_Bool SAL_CALL isRowSelected(::sal_Int32 index) override;
+ virtual void SAL_CALL addSelectionListener(const css::uno::Reference< css::awt::grid::XGridSelectionListener > & listener) override;
+ virtual void SAL_CALL removeSelectionListener(const css::uno::Reference< css::awt::grid::XGridSelectionListener > & listener) override;
+
+ void SAL_CALL setProperty( const OUString& PropertyName, const css::uno::Any& Value ) override;
+ css::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) override;
+
+ // css::lang::XComponent
+ void SAL_CALL dispose( ) override;
+
+ // XWindow
+ void SAL_CALL setEnable( sal_Bool bEnable ) override;
+
+private:
+ // VCLXWindow
+ virtual void SetWindow( const VclPtr< vcl::Window > &pWindow ) override;
+
+ void impl_updateColumnsFromModel_nothrow();
+ void impl_checkTableModelInit();
+
+ void impl_checkColumnIndex_throw( ::svt::table::TableControl const & i_table, sal_Int32 const i_columnIndex ) const;
+ void impl_checkRowIndex_throw( ::svt::table::TableControl const & i_table, sal_Int32 const i_rowIndex ) const;
+
+ virtual void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) override;
+ void ImplCallItemListeners();
+
+ std::shared_ptr< ::svt::table::UnoControlTableModel > m_xTableModel;
+ bool m_bTableModelInitCompleted;
+ SelectionListenerMultiplexer m_aSelectionListeners;
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/inc/table/defaultinputhandler.hxx b/toolkit/inc/controls/table/defaultinputhandler.hxx
index add1a06935a0..3f3d425a69cb 100644
--- a/svtools/inc/table/defaultinputhandler.hxx
+++ b/toolkit/inc/controls/table/defaultinputhandler.hxx
@@ -19,13 +19,12 @@
#pragma once
-#include <table/tableinputhandler.hxx>
+#include <controls/table/mousefunction.hxx>
+#include <controls/table/tableinputhandler.hxx>
#include <rtl/ref.hxx>
-#include <mousefunction.hxx>
#include <vector>
-
namespace svt::table
{
diff --git a/svtools/inc/table/gridtablerenderer.hxx b/toolkit/inc/controls/table/gridtablerenderer.hxx
index e372de3241e5..e2634b2d260f 100644
--- a/svtools/inc/table/gridtablerenderer.hxx
+++ b/toolkit/inc/controls/table/gridtablerenderer.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <table/tablemodel.hxx>
+#include <controls/table/tablemodel.hxx>
#include <vcl/image.hxx>
#include <memory>
diff --git a/svtools/inc/mousefunction.hxx b/toolkit/inc/controls/table/mousefunction.hxx
index 00313b0f4497..ef68dc89cea4 100644
--- a/svtools/inc/mousefunction.hxx
+++ b/toolkit/inc/controls/table/mousefunction.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include "table/tabletypes.hxx"
+#include "tabletypes.hxx"
#include <salhelper/simplereferenceobject.hxx>
diff --git a/svtools/inc/table/tablecontrol.hxx b/toolkit/inc/controls/table/tablecontrol.hxx
index 82a1ddbead69..960d33dca326 100644
--- a/svtools/inc/table/tablecontrol.hxx
+++ b/toolkit/inc/controls/table/tablecontrol.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <table/tablemodel.hxx>
+#include <controls/table/tablemodel.hxx>
#include <vcl/accessibletable.hxx>
#include <vcl/ctrl.hxx>
diff --git a/svtools/inc/table/tablecontrolinterface.hxx b/toolkit/inc/controls/table/tablecontrolinterface.hxx
index 6a592728494e..008fe9b2b293 100644
--- a/svtools/inc/table/tablecontrolinterface.hxx
+++ b/toolkit/inc/controls/table/tablecontrolinterface.hxx
@@ -23,8 +23,8 @@
#include <vcl/seleng.hxx>
#include <vcl/window.hxx>
-#include <table/tabletypes.hxx>
-#include <table/tablemodel.hxx>
+#include <controls/table/tabletypes.hxx>
+#include <controls/table/tablemodel.hxx>
namespace svt::table
{
diff --git a/svtools/inc/table/tableinputhandler.hxx b/toolkit/inc/controls/table/tableinputhandler.hxx
index 9d11df38db3d..9d11df38db3d 100644
--- a/svtools/inc/table/tableinputhandler.hxx
+++ b/toolkit/inc/controls/table/tableinputhandler.hxx
diff --git a/svtools/inc/table/tablemodel.hxx b/toolkit/inc/controls/table/tablemodel.hxx
index b3bcc36e9f8c..7add49629a2a 100644
--- a/svtools/inc/table/tablemodel.hxx
+++ b/toolkit/inc/controls/table/tablemodel.hxx
@@ -19,10 +19,10 @@
#pragma once
-#include <svtools/svtdllapi.h>
-#include <table/tabletypes.hxx>
-#include <table/tablerenderer.hxx>
-#include <table/tableinputhandler.hxx>
+#include <toolkit/dllapi.h>
+#include <controls/table/tabletypes.hxx>
+#include <controls/table/tablerenderer.hxx>
+#include <controls/table/tableinputhandler.hxx>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/style/HorizontalAlignment.hpp>
@@ -238,7 +238,7 @@ namespace svt::table
/** declares the interface to implement by an abstract table model
*/
- class SAL_NO_VTABLE SVT_DLLPUBLIC ITableModel
+ class SAL_NO_VTABLE TOOLKIT_DLLPUBLIC ITableModel
{
public:
/** returns the number of columns in the table
diff --git a/svtools/inc/table/tablerenderer.hxx b/toolkit/inc/controls/table/tablerenderer.hxx
index c43bac81875d..a4d7a48a6256 100644
--- a/svtools/inc/table/tablerenderer.hxx
+++ b/toolkit/inc/controls/table/tablerenderer.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <table/tabletypes.hxx>
+#include <controls/table/tabletypes.hxx>
#include <rtl/ustring.hxx>
diff --git a/svtools/inc/table/tablesort.hxx b/toolkit/inc/controls/table/tablesort.hxx
index 699086352c9c..691beea4eddd 100644
--- a/svtools/inc/table/tablesort.hxx
+++ b/toolkit/inc/controls/table/tablesort.hxx
@@ -19,8 +19,7 @@
#pragma once
-#include <table/tabletypes.hxx>
-
+#include <controls/table/tabletypes.hxx>
namespace svt::table
{
diff --git a/svtools/inc/table/tabletypes.hxx b/toolkit/inc/controls/table/tabletypes.hxx
index 8fdb18a830d8..8fdb18a830d8 100644
--- a/svtools/inc/table/tabletypes.hxx
+++ b/toolkit/inc/controls/table/tabletypes.hxx
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 67e33e8bc3db..da81df17b2dd 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -89,6 +89,7 @@
#include <toolkit/helper/convert.hxx>
#include <controls/filectrl.hxx>
#include <controls/svmedit.hxx>
+#include <controls/table/tablecontrol.hxx>
#include <controls/treecontrolpeer.hxx>
#include <vcl/toolkit/button.hxx>
#include <vcl/toolkit/calendar.hxx>
@@ -729,6 +730,7 @@ ComponentInfo const aComponentInfos [] =
{ std::u16string_view(u"formattedfield"), WindowType::CONTROL },
{ std::u16string_view(u"frame"), WindowType::GROUPBOX },
{ std::u16string_view(u"framewindow"), WindowType::TOOLKIT_FRAMEWINDOW },
+ { std::u16string_view(u"grid"), WindowType::CONTROL },
{ std::u16string_view(u"groupbox"), WindowType::GROUPBOX },
{ std::u16string_view(u"helpbutton"), WindowType::HELPBUTTON },
{ std::u16string_view(u"imagebutton"), WindowType::IMAGEBUTTON },
@@ -1835,6 +1837,11 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( rtl::Reference<VCLXWindow>* ppNewCom
*ppNewComp = newComp;
newComp->SetFormatter( static_cast<FormatterBase*>(static_cast<DateField*>(pNewWindow.get())) );
}
+ else if (aServiceName == "grid")
+ {
+ pNewWindow = VclPtr<::svt::table::TableControl>::Create(pParent, nWinBits);
+ *ppNewComp = new SVTXGridControl;
+ }
break;
default:
OSL_ENSURE( false, "VCLXToolkit::ImplCreateWindow: unknown window type!" );
@@ -1907,7 +1914,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
fnSvtCreateWindow = reinterpret_cast<FN_SvtCreateWindow>(osl_getFunctionSymbol( hSvToolsLib, aFunctionName.pData ));
}
#else
- fnSvtCreateWindow = CreateWindow;
+ fnSvtCreateWindow = nullptr;
#endif
}
// ask the SvTool creation function
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/toolkit/source/controls/svtxgridcontrol.cxx
index 4aee46f2c9ea..1fd7de1f29b1 100644
--- a/svtools/source/uno/svtxgridcontrol.cxx
+++ b/toolkit/source/controls/svtxgridcontrol.cxx
@@ -17,11 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "svtxgridcontrol.hxx"
+#include <awt/vclxwindows.hxx>
+#include <cppuhelper/implbase.hxx>
+#include <toolkit/helper/listenermultiplexer.hxx>
#include <com/sun/star/view/SelectionType.hpp>
-#include <table/tablecontrolinterface.hxx>
-#include <table/gridtablerenderer.hxx>
-#include <table/tablecontrol.hxx>
+#include <controls/table/tablecontrol.hxx>
+#include <controls/table/tablecontrolinterface.hxx>
+#include <controls/table/gridtablerenderer.hxx>
+#include <controls/table/tablecontrol.hxx>
#include "unocontroltablemodel.hxx"
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
diff --git a/svtools/source/table/cellvalueconversion.cxx b/toolkit/source/controls/table/cellvalueconversion.cxx
index 53177af0d88f..53177af0d88f 100644
--- a/svtools/source/table/cellvalueconversion.cxx
+++ b/toolkit/source/controls/table/cellvalueconversion.cxx
diff --git a/svtools/source/table/cellvalueconversion.hxx b/toolkit/source/controls/table/cellvalueconversion.hxx
index 2e05707e5bab..2e05707e5bab 100644
--- a/svtools/source/table/cellvalueconversion.hxx
+++ b/toolkit/source/controls/table/cellvalueconversion.hxx
diff --git a/svtools/source/table/defaultinputhandler.cxx b/toolkit/source/controls/table/defaultinputhandler.cxx
index 0263b29689f5..ef1ff3c51c60 100644
--- a/svtools/source/table/defaultinputhandler.cxx
+++ b/toolkit/source/controls/table/defaultinputhandler.cxx
@@ -17,14 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#include <table/defaultinputhandler.hxx>
-#include <table/tablecontrolinterface.hxx>
+#include <controls/table/defaultinputhandler.hxx>
+#include <controls/table/tablecontrolinterface.hxx>
#include <vcl/event.hxx>
#include <osl/diagnose.h>
-
namespace svt::table
{
diff --git a/svtools/source/table/gridtablerenderer.cxx b/toolkit/source/controls/table/gridtablerenderer.cxx
index f814fc64d708..e9597bb0a9eb 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/toolkit/source/controls/table/gridtablerenderer.cxx
@@ -19,8 +19,8 @@
#include "cellvalueconversion.hxx"
-#include <table/gridtablerenderer.hxx>
-#include <table/tablesort.hxx>
+#include <controls/table/gridtablerenderer.hxx>
+#include <controls/table/tablesort.hxx>
#include <com/sun/star/graphic/XGraphic.hpp>
diff --git a/svtools/source/table/mousefunction.cxx b/toolkit/source/controls/table/mousefunction.cxx
index 8bb30390a286..42d2db320102 100644
--- a/svtools/source/table/mousefunction.cxx
+++ b/toolkit/source/controls/table/mousefunction.cxx
@@ -17,10 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
-#include <mousefunction.hxx>
-#include <table/tablecontrolinterface.hxx>
-#include <table/tablesort.hxx>
+#include <controls/table/mousefunction.hxx>
+#include <controls/table/tablecontrolinterface.hxx>
+#include <controls/table/tablesort.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/ptrstyle.hxx>
diff --git a/svtools/source/table/tablecontrol.cxx b/toolkit/source/controls/table/tablecontrol.cxx
index 5ed46f9d4d6b..3caf4f6f0a18 100644
--- a/svtools/source/table/tablecontrol.cxx
+++ b/toolkit/source/controls/table/tablecontrol.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <table/tablecontrol.hxx>
+#include <controls/table/tablecontrol.hxx>
#include "tablecontrol_impl.hxx"
#include "tabledatawindow.hxx"
diff --git a/svtools/source/table/tablecontrol_impl.cxx b/toolkit/source/controls/table/tablecontrol_impl.cxx
index c82a272762cd..9b70c0c2ddb1 100644
--- a/svtools/source/table/tablecontrol_impl.cxx
+++ b/toolkit/source/controls/table/tablecontrol_impl.cxx
@@ -18,9 +18,9 @@
*/
-#include <table/tablecontrol.hxx>
-#include <table/defaultinputhandler.hxx>
-#include <table/tablemodel.hxx>
+#include <controls/table/tablecontrol.hxx>
+#include <controls/table/defaultinputhandler.hxx>
+#include <controls/table/tablemodel.hxx>
#include "tabledatawindow.hxx"
#include "tablecontrol_impl.hxx"
diff --git a/svtools/source/table/tablecontrol_impl.hxx b/toolkit/source/controls/table/tablecontrol_impl.hxx
index 727dea92ba94..9e4d0649729f 100644
--- a/svtools/source/table/tablecontrol_impl.hxx
+++ b/toolkit/source/controls/table/tablecontrol_impl.hxx
@@ -19,8 +19,8 @@
#pragma once
-#include <table/tablemodel.hxx>
-#include <table/tablecontrolinterface.hxx>
+#include <controls/table/tablemodel.hxx>
+#include <controls/table/tablecontrolinterface.hxx>
#include <vcl/svtaccessiblefactory.hxx>
#include <vcl/accessibletable.hxx>
diff --git a/svtools/source/table/tabledatawindow.cxx b/toolkit/source/controls/table/tabledatawindow.cxx
index 701b9ea4321b..8a024a9bc736 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/toolkit/source/controls/table/tabledatawindow.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <table/tablecontrol.hxx>
+#include <controls/table/tablecontrol.hxx>
#include "tabledatawindow.hxx"
#include "tablecontrol_impl.hxx"
diff --git a/svtools/source/table/tabledatawindow.hxx b/toolkit/source/controls/table/tabledatawindow.hxx
index e42a054939db..e42a054939db 100644
--- a/svtools/source/table/tabledatawindow.hxx
+++ b/toolkit/source/controls/table/tabledatawindow.hxx
diff --git a/svtools/source/table/tablegeometry.cxx b/toolkit/source/controls/table/tablegeometry.cxx
index 5b18826c50f7..5b18826c50f7 100644
--- a/svtools/source/table/tablegeometry.cxx
+++ b/toolkit/source/controls/table/tablegeometry.cxx
diff --git a/svtools/source/table/tablegeometry.hxx b/toolkit/source/controls/table/tablegeometry.hxx
index 9fb6d03f0d68..dde156ffd253 100644
--- a/svtools/source/table/tablegeometry.hxx
+++ b/toolkit/source/controls/table/tablegeometry.hxx
@@ -19,11 +19,9 @@
#pragma once
-#include <table/tabletypes.hxx>
-
+#include <controls/table/tabletypes.hxx>
#include <tools/gen.hxx>
-
namespace svt::table
{
diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/toolkit/source/controls/unocontroltablemodel.cxx
index 14f9c6977fca..8f663eb56225 100644
--- a/svtools/source/uno/unocontroltablemodel.cxx
+++ b/toolkit/source/controls/unocontroltablemodel.cxx
@@ -20,8 +20,8 @@
#include "unocontroltablemodel.hxx"
#include "unogridcolumnfacade.hxx"
-#include <table/defaultinputhandler.hxx>
-#include <table/gridtablerenderer.hxx>
+#include <controls/table/defaultinputhandler.hxx>
+#include <controls/table/gridtablerenderer.hxx>
#include <com/sun/star/awt/grid/XSortableGridData.hpp>
#include <com/sun/star/util/Color.hpp>
diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/toolkit/source/controls/unocontroltablemodel.hxx
index 4a69357626ae..2619407941f5 100644
--- a/svtools/source/uno/unocontroltablemodel.hxx
+++ b/toolkit/source/controls/unocontroltablemodel.hxx
@@ -19,8 +19,8 @@
#pragma once
-#include <table/tablemodel.hxx>
-#include <table/tablesort.hxx>
+#include <controls/table/tablemodel.hxx>
+#include <controls/table/tablesort.hxx>
#include <tools/color.hxx>
#include <com/sun/star/awt/grid/GridDataEvent.hpp>
diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/toolkit/source/controls/unogridcolumnfacade.cxx
index c41600ceee3b..c41600ceee3b 100644
--- a/svtools/source/uno/unogridcolumnfacade.cxx
+++ b/toolkit/source/controls/unogridcolumnfacade.cxx
diff --git a/svtools/source/uno/unogridcolumnfacade.hxx b/toolkit/source/controls/unogridcolumnfacade.hxx
index 672397276b90..580aee52bc89 100644
--- a/svtools/source/uno/unogridcolumnfacade.hxx
+++ b/toolkit/source/controls/unogridcolumnfacade.hxx
@@ -19,7 +19,7 @@
#pragma once
-#include <table/tablemodel.hxx>
+#include <controls/table/tablemodel.hxx>
#include <com/sun/star/awt/grid/XGridColumn.hpp>
#include <com/sun/star/style/HorizontalAlignment.hpp>