diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-07-29 15:57:42 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-08-15 13:08:17 +0200 |
commit | 203eaefb4ac012c36a1ecdd3753e1cb2c5876efc (patch) | |
tree | bec856e355c47cf7bf528865bcfa0232d28a16ee /xmloff/source/chart/SchXMLDataTableContext.hxx | |
parent | 5861af0da5179689870d5b4f5ff56a5ea0a79901 (diff) |
xmloff: import and export for the chart data table
This change adds import and export code for the the chart's data
table properties to the ODF format for chart documents. The data
table properties are exported to a new element "data-table", which
then references a auto style with all the properties of a data
table + new data table specific properties: HBorder, VBorder,
Outline, Keys which are mapped to "show-horizontal-border",
"show-vertical-border", "show-outline" and "show-keys" chart
attributes.
Also adds a test for the import and export:
imports xlsx -> exports to ods -> imports ods
Change-Id: Id45d9369fd619959e4d6eba7ca51c8ddce9c8f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138260
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'xmloff/source/chart/SchXMLDataTableContext.hxx')
-rw-r--r-- | xmloff/source/chart/SchXMLDataTableContext.hxx | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/xmloff/source/chart/SchXMLDataTableContext.hxx b/xmloff/source/chart/SchXMLDataTableContext.hxx new file mode 100644 index 000000000000..716f445ed61e --- /dev/null +++ b/xmloff/source/chart/SchXMLDataTableContext.hxx @@ -0,0 +1,40 @@ +/* -*- 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 <com/sun/star/xml/sax/XAttributeList.hpp> + +#include <xmloff/SchXMLImportHelper.hxx> +#include <xmloff/xmlictxt.hxx> + +class SchXMLDataTableContext : public SvXMLImportContext +{ +public: + SchXMLDataTableContext(SchXMLImportHelper& rImpHelper, SvXMLImport& rImport); + virtual ~SchXMLDataTableContext() override; + + virtual void SAL_CALL startFastElement( + sal_Int32 nElement, + const css::uno::Reference<css::xml::sax::XFastAttributeList>& xAttrList) override; + +private: + SchXMLImportHelper& mrImportHelper; +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |