summaryrefslogtreecommitdiffstats
path: root/oox/inc/drawingml/table
diff options
context:
space:
mode:
Diffstat (limited to 'oox/inc/drawingml/table')
-rw-r--r--oox/inc/drawingml/table/tablebackgroundstylecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablecell.hxx111
-rw-r--r--oox/inc/drawingml/table/tablecellcontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablepartstylecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tableproperties.hxx83
-rw-r--r--oox/inc/drawingml/table/tablerow.hxx45
-rw-r--r--oox/inc/drawingml/table/tablerowcontext.hxx46
-rw-r--r--oox/inc/drawingml/table/tablestyle.hxx84
-rw-r--r--oox/inc/drawingml/table/tablestylecellstylecontext.hxx45
-rw-r--r--oox/inc/drawingml/table/tablestylecontext.hxx46
-rw-r--r--oox/inc/drawingml/table/tablestylelist.hxx54
-rw-r--r--oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx48
-rw-r--r--oox/inc/drawingml/table/tablestylepart.hxx70
-rw-r--r--oox/inc/drawingml/table/tablestyletextstylecontext.hxx46
15 files changed, 858 insertions, 0 deletions
diff --git a/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx b/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx
new file mode 100644
index 000000000..d90597497
--- /dev/null
+++ b/oox/inc/drawingml/table/tablebackgroundstylecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLEBACKGROUNDSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEBACKGROUNDSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestyle.hxx>
+
+namespace oox::drawingml::table {
+
+class TableBackgroundStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableBackgroundStyleContext( ::oox::core::ContextHandler2Helper const & rParent, TableStyle& rTableStyle );
+ virtual ~TableBackgroundStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+
+ TableStyle& mrTableStyle;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablecell.hxx b/oox/inc/drawingml/table/tablecell.hxx
new file mode 100644
index 000000000..988b0d057
--- /dev/null
+++ b/oox/inc/drawingml/table/tablecell.hxx
@@ -0,0 +1,111 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLECELL_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
+
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <drawingml/textfont.hxx>
+#include <com/sun/star/table/XCell.hpp>
+
+#include <drawingml/fillproperties.hxx>
+#include <drawingml/lineproperties.hxx>
+
+namespace oox::drawingml::table {
+
+class TableCellContext;
+class TableProperties;
+class TableStyle;
+
+class TableCell
+{
+ friend class TableCellContext;
+
+public:
+
+ TableCell();
+
+ sal_Int32 getRowSpan() const { return mnRowSpan; };
+ void setRowSpan( sal_Int32 nRowSpan ){ mnRowSpan = nRowSpan; };
+ sal_Int32 getGridSpan() const { return mnGridSpan; };
+ void setGridSpan( sal_Int32 nGridSpan ){ mnGridSpan = nGridSpan; };
+ bool gethMerge() const { return mbhMerge; };
+ void sethMerge( bool bhMerge ){ mbhMerge = bhMerge; };
+ bool getvMerge() const { return mbvMerge; };
+ void setvMerge( bool bvMerge ){ mbvMerge = bvMerge; };
+ sal_Int32 getLeftMargin() const { return mnMarL; };
+ void setLeftMargin( sal_Int32 nMargin ){ mnMarL = nMargin; };
+ sal_Int32 getRightMargin() const { return mnMarR; };
+ void setRightMargin( sal_Int32 nMargin ){ mnMarR = nMargin; };
+ sal_Int32 getTopMargin() const { return mnMarT; };
+ void setTopMargin( sal_Int32 nMargin ){ mnMarT = nMargin; };
+ sal_Int32 getBottomMargin() const { return mnMarB; };
+ void setBottomMargin( sal_Int32 nMargin ){ mnMarB = nMargin; };
+ sal_Int32 getVertToken() const { return mnVertToken; };
+ void setVertToken( sal_Int32 nToken ){ mnVertToken = nToken; };
+ sal_Int32 getAnchorToken() const { return mnAnchorToken; };
+ void setAnchorToken( sal_Int32 nToken ){ mnAnchorToken = nToken; };
+ void setAnchorCtr( bool bAnchorCtr ){ mbAnchorCtr = bAnchorCtr; };
+ void setHorzOverflowToken( sal_Int32 nToken ){ mnHorzOverflowToken = nToken; };
+
+ void setTextBody( const oox::drawingml::TextBodyPtr& pTextBody ){ mpTextBody = pTextBody; };
+ const oox::drawingml::TextBodyPtr& getTextBody() const { return mpTextBody; };
+
+ void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase,
+ const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
+ const css::uno::Reference < css::table::XCell >& rxCell,
+ const TableProperties& rTableProperties,
+ const TableStyle& rTable,
+ sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow );
+
+private:
+
+ oox::drawingml::TextBodyPtr mpTextBody;
+
+ oox::drawingml::LineProperties maLinePropertiesLeft;
+ oox::drawingml::LineProperties maLinePropertiesRight;
+ oox::drawingml::LineProperties maLinePropertiesTop;
+ oox::drawingml::LineProperties maLinePropertiesBottom;
+ oox::drawingml::LineProperties maLinePropertiesInsideH;
+ oox::drawingml::LineProperties maLinePropertiesInsideV;
+ oox::drawingml::LineProperties maLinePropertiesTopLeftToBottomRight;
+ oox::drawingml::LineProperties maLinePropertiesBottomLeftToTopRight;
+
+ oox::drawingml::FillProperties maFillProperties;
+
+ sal_Int32 mnRowSpan;
+ sal_Int32 mnGridSpan;
+ bool mbhMerge;
+ bool mbvMerge;
+
+ sal_Int32 mnMarL;
+ sal_Int32 mnMarR;
+ sal_Int32 mnMarT;
+ sal_Int32 mnMarB;
+ sal_Int32 mnVertToken;
+ sal_Int32 mnAnchorToken;
+ bool mbAnchorCtr;
+ sal_Int32 mnHorzOverflowToken;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLECELL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablecellcontext.hxx b/oox/inc/drawingml/table/tablecellcontext.hxx
new file mode 100644
index 000000000..24a8a2830
--- /dev/null
+++ b/oox/inc/drawingml/table/tablecellcontext.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLECELLCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECELLCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablecell.hxx>
+
+namespace oox::drawingml::table
+{
+class TableCellContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableCellContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttribs, TableCell& rTableCell);
+ virtual ~TableCellContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ TableCell& mrTableCell;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablecontext.hxx b/oox/inc/drawingml/table/tablecontext.hxx
new file mode 100644
index 000000000..3004333d2
--- /dev/null
+++ b/oox/inc/drawingml/table/tablecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLECONTEXT_HXX
+
+#include <oox/drawingml/shapecontext.hxx>
+
+namespace oox::drawingml::table
+{
+class TableProperties;
+
+class TableContext final : public ShapeContext
+{
+public:
+ TableContext(::oox::core::ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr);
+ virtual ~TableContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ TableProperties& mrTableProperties;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablepartstylecontext.hxx b/oox/inc/drawingml/table/tablepartstylecontext.hxx
new file mode 100644
index 000000000..c2f5baada
--- /dev/null
+++ b/oox/inc/drawingml/table/tablepartstylecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLEPARTSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEPARTSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestylepart.hxx>
+
+namespace oox::drawingml::table {
+
+class TablePartStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TablePartStyleContext( ::oox::core::ContextHandler2Helper const & rParent, TableStylePart& rTableStylePart );
+ virtual ~TablePartStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+
+ TableStylePart& mrTableStylePart;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tableproperties.hxx b/oox/inc/drawingml/table/tableproperties.hxx
new file mode 100644
index 000000000..34e361b18
--- /dev/null
+++ b/oox/inc/drawingml/table/tableproperties.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 .
+ */
+
+#ifndef INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
+
+#include <drawingml/table/tablerow.hxx>
+#include <drawingml/table/tablestyle.hxx>
+#include <oox/drawingml/color.hxx>
+
+#include <memory>
+#include <vector>
+
+namespace oox::drawingml::table {
+
+class TableProperties
+{
+public:
+
+ TableProperties();
+
+ std::vector< sal_Int32 >& getTableGrid() { return mvTableGrid; };
+ std::vector< TableRow >& getTableRows() { return mvTableRows; };
+
+ OUString& getStyleId() { return maStyleId; };
+ std::shared_ptr< TableStyle >& getTableStyle() { return mpTableStyle; };
+ bool isFirstRow() const { return mbFirstRow; };
+ void setFirstRow(bool b) { mbFirstRow = b; };
+ bool isFirstCol() const { return mbFirstCol; };
+ void setFirstCol(bool b) { mbFirstCol = b; };
+ bool isLastRow() const { return mbLastRow; };
+ void setLastRow(bool b) { mbLastRow = b; };
+ bool isLastCol() const { return mbLastCol; };
+ void setLastCol(bool b) { mbLastCol = b; };
+ bool isBandRow() const { return mbBandRow; };
+ void setBandRow(bool b) { mbBandRow = b; };
+ bool isBandCol() const { return mbBandCol; };
+ void setBandCol(bool b) { mbBandCol = b; };
+ Color& getBgColor(){ return maBgColor; };
+
+ void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase,
+ const css::uno::Reference < css::beans::XPropertySet > & xPropSet,
+ const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle );
+
+private:
+
+ const TableStyle& getUsedTableStyle(const ::oox::core::XmlFilterBase& rFilterBase, std::unique_ptr<TableStyle>& rTableStyleToDelete);
+
+ OUString maStyleId; // either StyleId is available
+ std::shared_ptr< TableStyle > mpTableStyle; // or the complete TableStyle
+ std::vector< sal_Int32 > mvTableGrid;
+ std::vector< TableRow > mvTableRows;
+ Color maBgColor;
+
+ bool mbFirstRow;
+ bool mbFirstCol;
+ bool mbLastRow;
+ bool mbLastCol;
+ bool mbBandRow;
+ bool mbBandCol;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEPROPERTIES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablerow.hxx b/oox/inc/drawingml/table/tablerow.hxx
new file mode 100644
index 000000000..7f8d212c1
--- /dev/null
+++ b/oox/inc/drawingml/table/tablerow.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLEROW_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX
+
+#include <drawingml/table/tablecell.hxx>
+#include <vector>
+
+namespace oox::drawingml::table
+{
+class TableRow
+{
+public:
+ TableRow();
+
+ void setHeight(sal_Int32 nHeight) { mnHeight = nHeight; };
+ sal_Int32 getHeight() const { return mnHeight; };
+ std::vector<TableCell>& getTableCells() { return mvTableCells; };
+
+private:
+ sal_Int32 mnHeight;
+ std::vector<TableCell> mvTableCells;
+};
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLEROW_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablerowcontext.hxx b/oox/inc/drawingml/table/tablerowcontext.hxx
new file mode 100644
index 000000000..1b18e45d1
--- /dev/null
+++ b/oox/inc/drawingml/table/tablerowcontext.hxx
@@ -0,0 +1,46 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLEROWCONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLEROWCONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+
+namespace oox::drawingml::table
+{
+class TableRow;
+
+class TableRowContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableRowContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttribs, TableRow& rTableRow);
+ virtual ~TableRowContext() override;
+
+ virtual ::oox::core::ContextHandlerRef
+ onCreateContext(::sal_Int32 Element, const ::oox::AttributeList& rAttribs) override;
+
+private:
+ TableRow& mrTableRow;
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestyle.hxx b/oox/inc/drawingml/table/tablestyle.hxx
new file mode 100644
index 000000000..26c4216a7
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestyle.hxx
@@ -0,0 +1,84 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX
+
+#include <drawingml/table/tablestylepart.hxx>
+#include <oox/drawingml/drawingmltypes.hxx>
+#include <oox/drawingml/shape.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyle
+{
+public:
+
+ TableStyle();
+
+ OUString& getStyleId(){ return maStyleId; }
+ OUString& getStyleName() { return maStyleName; }
+
+ ::oox::drawingml::ShapeStyleRef& getBackgroundFillStyleRef(){ return maFillStyleRef; }
+
+ ::oox::drawingml::FillPropertiesPtr& getBackgroundFillProperties(){ return mpFillProperties; }
+
+ TableStylePart& getWholeTbl() { return maWholeTbl; }
+ TableStylePart& getBand1H() { return maBand1H; }
+ TableStylePart& getBand2H() { return maBand2H; }
+ TableStylePart& getBand1V() { return maBand1V; }
+ TableStylePart& getBand2V() { return maBand2V; }
+ TableStylePart& getLastCol() { return maLastCol; }
+ TableStylePart& getFirstCol() { return maFirstCol; }
+ TableStylePart& getLastRow() { return maLastRow; }
+ TableStylePart& getSeCell() { return maSeCell; }
+ TableStylePart& getSwCell() { return maSwCell; }
+ TableStylePart& getFirstRow() { return maFirstRow; }
+ TableStylePart& getNeCell() { return maNeCell; }
+ TableStylePart& getNwCell() { return maNwCell; }
+
+private:
+
+ OUString maStyleId;
+ OUString maStyleName;
+
+ ::oox::drawingml::ShapeStyleRef maFillStyleRef;
+
+ ::oox::drawingml::FillPropertiesPtr mpFillProperties;
+
+ TableStylePart maWholeTbl;
+ TableStylePart maBand1H;
+ TableStylePart maBand2H;
+ TableStylePart maBand1V;
+ TableStylePart maBand2V;
+ TableStylePart maLastCol;
+ TableStylePart maFirstCol;
+ TableStylePart maLastRow;
+ TableStylePart maSeCell;
+ TableStylePart maSwCell;
+ TableStylePart maFirstRow;
+ TableStylePart maNeCell;
+ TableStylePart maNwCell;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylecellstylecontext.hxx b/oox/inc/drawingml/table/tablestylecellstylecontext.hxx
new file mode 100644
index 000000000..404e86a49
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylecellstylecontext.hxx
@@ -0,0 +1,45 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLESTYLECELLSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECELLSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestylepart.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleCellStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableStyleCellStyleContext( ::oox::core::ContextHandler2Helper const & rParent, TableStylePart& rTableStylePart );
+ virtual ~TableStyleCellStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TableStylePart& mrTableStylePart;
+ sal_Int32 mnLineType;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylecontext.hxx b/oox/inc/drawingml/table/tablestylecontext.hxx
new file mode 100644
index 000000000..1ab003496
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylecontext.hxx
@@ -0,0 +1,46 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLESTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestyle.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableStyleContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ TableStyle& rTableStyle );
+ virtual ~TableStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TableStyle& mrTableStyle;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylelist.hxx b/oox/inc/drawingml/table/tablestylelist.hxx
new file mode 100644
index 000000000..7c0d1e2b1
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylelist.hxx
@@ -0,0 +1,54 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX
+
+#include <rtl/ustring.hxx>
+#include <memory>
+#include <vector>
+
+namespace oox::drawingml::table {
+
+class TableStyle;
+
+class TableStyleList
+{
+public:
+
+ TableStyleList();
+ ~TableStyleList();
+
+ OUString& getDefaultStyleId() { return maDefaultStyleId; };
+ std::vector< TableStyle >& getTableStyles(){ return maTableStyles; };
+
+private:
+
+ OUString maDefaultStyleId;
+ std::vector< TableStyle > maTableStyles;
+
+};
+
+typedef std::shared_ptr< TableStyleList > TableStyleListPtr;
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx b/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx
new file mode 100644
index 000000000..456877cbb
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylelistfragmenthandler.hxx
@@ -0,0 +1,48 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLESTYLELISTFRAGMENTHANDLER_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLELISTFRAGMENTHANDLER_HXX
+
+#include <drawingml/table/tablestylelist.hxx>
+#include <oox/core/fragmenthandler2.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleListFragmentHandler final : public ::oox::core::FragmentHandler2
+{
+public:
+ explicit TableStyleListFragmentHandler(
+ ::oox::core::XmlFilterBase& rFilter,
+ const OUString& rFragmentPath,
+ TableStyleList& rTableStyleList );
+ virtual ~TableStyleListFragmentHandler() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const AttributeList& rAttribs ) override;
+
+private:
+
+ TableStyleList& mrTableStyleList;
+};
+
+} // namespace oox::drawingml::table
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestylepart.hxx b/oox/inc/drawingml/table/tablestylepart.hxx
new file mode 100644
index 000000000..3d1251731
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestylepart.hxx
@@ -0,0 +1,70 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX
+
+#include <optional>
+#include <oox/drawingml/color.hxx>
+#include <drawingml/textfont.hxx>
+#include <oox/drawingml/shape.hxx>
+
+#include <map>
+
+namespace oox::drawingml::table {
+
+class TableStylePart
+{
+public:
+
+ TableStylePart();
+
+ ::oox::drawingml::Color& getTextColor(){ return maTextColor; }
+ ::std::optional< bool >& getTextBoldStyle(){ return maTextBoldStyle; }
+ ::std::optional< bool >& getTextItalicStyle(){ return maTextItalicStyle; }
+ ::oox::drawingml::TextFont& getAsianFont(){ return maAsianFont; }
+ ::oox::drawingml::TextFont& getComplexFont(){ return maComplexFont; }
+ ::oox::drawingml::TextFont& getSymbolFont(){ return maSymbolFont; }
+ ::oox::drawingml::TextFont& getLatinFont(){ return maLatinFont; }
+
+ ::oox::drawingml::FillPropertiesPtr& getFillProperties(){ return mpFillProperties; }
+ std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& getLineBorders(){ return maLineBorders; }
+
+ ::oox::drawingml::ShapeStyleRefMap& getStyleRefs(){ return maStyleRefs; }
+
+private:
+
+ ::oox::drawingml::Color maTextColor;
+ ::std::optional< bool > maTextBoldStyle;
+ ::std::optional< bool > maTextItalicStyle;
+ ::oox::drawingml::TextFont maAsianFont;
+ ::oox::drawingml::TextFont maComplexFont;
+ ::oox::drawingml::TextFont maSymbolFont;
+ ::oox::drawingml::TextFont maLatinFont;
+
+ ::oox::drawingml::FillPropertiesPtr mpFillProperties;
+ std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr > maLineBorders;
+ ::oox::drawingml::ShapeStyleRefMap maStyleRefs;
+};
+
+}
+
+#endif // INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLEPART_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/inc/drawingml/table/tablestyletextstylecontext.hxx b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx
new file mode 100644
index 000000000..7edeef1e8
--- /dev/null
+++ b/oox/inc/drawingml/table/tablestyletextstylecontext.hxx
@@ -0,0 +1,46 @@
+/* -*- 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_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX
+#define INCLUDED_OOX_DRAWINGML_TABLE_TABLESTYLETEXTSTYLECONTEXT_HXX
+
+#include <oox/core/contexthandler2.hxx>
+#include <drawingml/table/tablestylepart.hxx>
+
+namespace oox::drawingml::table {
+
+class TableStyleTextStyleContext final : public ::oox::core::ContextHandler2
+{
+public:
+ TableStyleTextStyleContext( ::oox::core::ContextHandler2Helper const & rParent,
+ const ::oox::AttributeList& rAttribs,
+ TableStylePart& rTableStylePart );
+ virtual ~TableStyleTextStyleContext() override;
+
+ virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+
+private:
+ TableStylePart& mrTableStylePart;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */