summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapper.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-02-24 10:07:08 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-02-25 10:57:04 +0100
commit861ca1f5030f2f6b7fbdc3bb3ded3d11130673ed (patch)
tree86a3b9efd2c64ab798c6e01389b07ce509d065ca /writerfilter/source/dmapper/DomainMapper.cxx
parente469c262e289ad86e3e2fa2857f8388b7b16df47 (diff)
tdf#140572 writerfilter: ignore position in docDefaults
Despite the documentation saying that anything in docDefaults should apply everywhere unless it is overridden in a higher priority style, the subscript/superscript setting in docDefaults seems to be ignored. Makes sense in a way, but perhaps document those exceptions? I looked for documentation in both "docDefaults" and "position" and didn't see anything suggesting why it is ignored. Change-Id: If676415b112921e4cb8f7306b8c8ad93a6fd8cde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111442 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapper.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index a3b04a014ca8..964abf0e58fd 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1811,8 +1811,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
{
if ( !IsStyleSheetImport() )
m_pImpl->deferCharacterProperty( nSprmId, uno::makeAny( nIntValue ));
- else
+ else if (!m_pImpl->IsDocDefaultsImport())
{
+ // For some undocumented reason, MS Word seems to ignore this in docDefaults
+
// DON'T FIXME: Truly calculating this for Character Styles will be tricky,
// because it depends on the final fontsize - regardless of
// where it is set. So at the style level,
@@ -4023,6 +4025,11 @@ OUString DomainMapper::GetListStyleName(sal_Int32 nListId) const
return m_pImpl->GetListStyleName( nListId );
}
+void DomainMapper::SetDocDefaultsImport(bool bSet)
+{
+ m_pImpl->SetDocDefaultsImport(bSet);
+}
+
bool DomainMapper::IsStyleSheetImport() const
{
return m_pImpl->IsStyleSheetImport();