From 6412a74b35a3e6089b65b4ad04549262e4bf93c8 Mon Sep 17 00:00:00 2001 From: Skyler Grey Date: Fri, 20 Oct 2023 14:30:31 +0000 Subject: Enable STYLEREF flag export/import with ODF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit enables exporting the following STYLEREF flags with ODF - Search from bottom to top - Hide non numerical After this commit, the following steps have been implemented - The document model (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19) - The layout (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19) - The UI (I7d8f455ffe90cface4f3b1acf6b9bef6a045ed19) - UNO (Ib664fec059aa1f7f130acc76c253d5d298fa59f7) - DOCX/ODF filters (here and Ib664fec059aa1f7f130acc76c253d5d298fa59f7) Change-Id: Iad8e8001807f5ceeaedc9665838672695174a936 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158351 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- xmloff/inc/txtfld.hxx | 28 ++++++++++++++++++++++++++++ xmloff/inc/txtflde.hxx | 9 +++++++++ xmloff/inc/txtfldi.hxx | 2 ++ 3 files changed, 39 insertions(+) create mode 100644 xmloff/inc/txtfld.hxx (limited to 'xmloff/inc') diff --git a/xmloff/inc/txtfld.hxx b/xmloff/inc/txtfld.hxx new file mode 100644 index 000000000000..c562644a5f18 --- /dev/null +++ b/xmloff/inc/txtfld.hxx @@ -0,0 +1,28 @@ +/* -*- 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 . + */ + +/** @#file + * Constants, helpers etc. that need to be shared between text field import + * and export + */ + +#pragma once + +#define REFFLDFLAG_STYLE_FROM_BOTTOM 0xc100 +#define REFFLDFLAG_STYLE_HIDE_NON_NUMERICAL 0xc200 diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx index 459dea29f550..f98fb7c5c421 100644 --- a/xmloff/inc/txtflde.hxx +++ b/xmloff/inc/txtflde.hxx @@ -34,6 +34,8 @@ #include #include +#include "txtfld.hxx" + class SvXMLExport; struct XMLPropertyState; @@ -239,6 +241,13 @@ private: bool i_bAutoStyles, bool i_bProgress, bool & rPrevCharIsSpace); + + void ProcessBoolean( + enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token + bool bBool, /// attribute value + bool bDefault, + sal_uInt16 nPrefix); /// namespace + /// export a boolean attribute void ProcessBoolean( enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text) diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index 0a15329c31ec..3d56c547811e 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -34,6 +34,7 @@ #include #include #include +#include "txtfld.hxx" namespace com::sun::star { namespace xml::sax { class XAttributeList; } @@ -795,6 +796,7 @@ class XMLReferenceFieldImportContext final : public XMLTextFieldImportContext sal_Int32 nElementToken; sal_Int16 nSource; sal_Int16 nType; + sal_uInt16 nFlags; bool bNameOK; bool bTypeOK; -- cgit