summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper_Impl.cxx
diff options
context:
space:
mode:
authorSkyler Grey <skyler.grey@collabora.com>2023-10-20 13:07:12 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-30 20:04:01 +0100
commite195c22533de44cd4f6afab7836c7eb6a613d202 (patch)
treee59ed742c91328d3b7f6abc18667646d9c5b6dd3 /writerfilter/source/dmapper/DomainMapper_Impl.cxx
parent186398e2661c8be9c4d8447d2c8fada443b26ad4 (diff)
Enable STYLEREF flag export/import with OOXML
This commit enables exporting the following STYLEREF flags with OOXML - 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 - DOCX filter Change-Id: Ib664fec059aa1f7f130acc76c253d5d298fa59f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158350 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapper_Impl.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index ae121ea2b2d3..ae69b3ba5b89 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -126,6 +126,9 @@
#include <unicode/errorcode.h>
#include <unicode/regex.h>
+#define REFFLDFLAG_STYLE_FROM_BOTTOM 0xc100
+#define REFFLDFLAG_STYLE_HIDE_NON_NUMERICAL 0xc200
+
using namespace ::com::sun::star;
using namespace oox;
namespace writerfilter::dmapper{
@@ -7600,6 +7603,21 @@ void DomainMapper_Impl::CloseFieldCommand()
xFieldProperties->setPropertyValue(
getPropertyName(PROP_SOURCE_NAME), aStyleDisplayName);
+
+ sal_uInt16 nFlags = 0;
+ OUString sValue;
+ if( lcl_FindInCommand( pContext->GetCommand(), 'l', sValue ))
+ {
+ //search-below-first
+ nFlags |= REFFLDFLAG_STYLE_FROM_BOTTOM;
+ }
+ if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue ))
+ {
+ //suppress-nondelimiter
+ nFlags |= REFFLDFLAG_STYLE_HIDE_NON_NUMERICAL;
+ }
+ xFieldProperties->setPropertyValue(
+ getPropertyName( PROP_REFERENCE_FIELD_FLAGS ), uno::Any(nFlags) );
}
else
{