diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-27 14:18:12 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-27 18:15:53 +0200 |
commit | e0c7f21c1e9a2e2e60c4650643232266d3428e4f (patch) | |
tree | 4457b0d901f83868c3fccce04d8a14d42997a4b4 /writerfilter/source | |
parent | 36977f7404c8c3255792dc9995d213510a2cdb11 (diff) |
writerfilter: SvxFrameDirectionItem::PutValue() wants an UNO short
And not an UNO com.sun.star.text.WritingMode. This fixes the following
warnings during DOCX import:
warn:legacy.osl:12884:1:writerfilter/source/dmapper/PropertyMap.cxx:1484: Exception in SectionPropertyMap::ApplyProperties_
warn:legacy.osl:12884:1:writerfilter/source/dmapper/PropertyMap.cxx:1496: Exception in SectionPropertyMap::ApplyProperties_
Change-Id: Ib4f392b3e4328311baa5767b5a2079730218fca3
Reviewed-on: https://gerrit.libreoffice.org/37028
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter/source')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index ca2091f77a0b..0ce36604fda3 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1439,13 +1439,13 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) { if (nIntValue != 0) { - rContext->Insert(PROP_WRITING_MODE, uno::makeAny( text::WritingMode2::RL_TB )); + rContext->Insert(PROP_WRITING_MODE, uno::makeAny( sal_Int16(text::WritingMode2::RL_TB) )); if (!IsRTFImport()) rContext->Insert(PROP_PARA_ADJUST, uno::makeAny( style::ParagraphAdjust_RIGHT ), /*bOverwrite=*/false); } else { - rContext->Insert(PROP_WRITING_MODE, uno::makeAny( text::WritingMode2::LR_TB )); + rContext->Insert(PROP_WRITING_MODE, uno::makeAny( sal_Int16(text::WritingMode2::LR_TB) )); if (!IsRTFImport()) rContext->Insert(PROP_PARA_ADJUST, uno::makeAny( style::ParagraphAdjust_LEFT ), /*bOverwrite=*/false); } @@ -1454,7 +1454,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) break; case NS_ooxml::LN_EG_SectPrContents_bidi: if (pSectionContext != nullptr) - pSectionContext->Insert(PROP_WRITING_MODE, uno::makeAny( text::WritingMode2::RL_TB)); + pSectionContext->Insert(PROP_WRITING_MODE, uno::makeAny( sal_Int16(text::WritingMode2::RL_TB) )); break; case NS_ooxml::LN_EG_RPrBase_highlight: { @@ -1790,7 +1790,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) pTargetContext = pSectionContext; } - pTargetContext->Insert(PROP_WRITING_MODE, uno::makeAny( nDirection ) ); + pTargetContext->Insert(PROP_WRITING_MODE, uno::makeAny( sal_Int16(nDirection) ) ); } break; // sprmSTextFlow // the following are not part of the official documentation diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 7884d3cfdc95..7b2d188346f6 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -376,7 +376,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) case NS_ooxml::LN_CT_TblPrBase_bidiVisual: { TablePropertyMapPtr pPropMap(new TablePropertyMap()); - pPropMap->Insert(PROP_WRITING_MODE, uno::makeAny(nIntValue ? text::WritingMode2::RL_TB : text::WritingMode2::LR_TB)); + pPropMap->Insert(PROP_WRITING_MODE, uno::makeAny(sal_Int16(nIntValue ? text::WritingMode2::RL_TB : text::WritingMode2::LR_TB))); insertTableProps(pPropMap); break; } |