diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-20 09:12:36 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-04-20 10:43:42 +0200 |
commit | 41bc9d4d467495c9fbf05c920a41fa299ac0ace3 (patch) | |
tree | 16445e387a497aa51166aeb2e5a3c888cf98a1b8 /writerfilter/source/dmapper | |
parent | 7bcea5c8bae73d289c5203cbc51f70605c3a3599 (diff) |
Related: tdf#106690 DOCX import: don't reduce auto-space accross cells
As suggested at <https://gerrit.libreoffice.org/#/c/36142/>, and it
indeed matches the Word behavior.
Change-Id: I1ba5b70fc5a7acab52fa4baf816e9f6cd2f913ba
Reviewed-on: https://gerrit.libreoffice.org/36719
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'writerfilter/source/dmapper')
5 files changed, 20 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 8fa604a3710c..b79a1d71214b 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -1266,6 +1266,11 @@ void DomainMapperTableHandler::setHadFootOrEndnote(bool bHadFootOrEndnote) m_bHadFootOrEndnote = bHadFootOrEndnote; } +DomainMapper_Impl& DomainMapperTableHandler::getDomainMapperImpl() +{ + return m_rDMapper_Impl; +} + }} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx index 83dafa49a776..4881f37a8d9d 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.hxx @@ -116,6 +116,8 @@ public: void endCell(const css::uno::Reference< css::text::XTextRange > & end); void setHadFootOrEndnote(bool bHadFootOrEndnote); + + DomainMapper_Impl& getDomainMapperImpl(); }; }} diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c9369de68e31..912bb6672977 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2181,6 +2181,11 @@ bool DomainMapper_Impl::IsDiscardHeaderFooter() return m_bDiscardHeaderFooter; } +void DomainMapper_Impl::ClearPreviousParagraph() +{ + m_xPreviousParagraph.clear(); +} + sal_Int16 lcl_ParseNumberingType( const OUString& rCommand ) { sal_Int16 nRet = style::NumberingType::PAGE_DESCRIPTOR; diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 82547b14325b..de7c95dda550 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -882,6 +882,10 @@ public: void SetParaAutoBefore(bool bParaAutoBefore) { m_bParaAutoBefore = bParaAutoBefore; } + /// Forget about the previous paragraph, as it's not inside the same + /// start/end node. + void ClearPreviousParagraph(); + private: void PushPageHeaderFooter(bool bHeader, SectionPropertyMap::PageType eType); std::vector<css::uno::Reference< css::drawing::XShape > > m_vTextFramesForChaining ; diff --git a/writerfilter/source/dmapper/TableManager.cxx b/writerfilter/source/dmapper/TableManager.cxx index c14ec25b0d28..32b77410e332 100644 --- a/writerfilter/source/dmapper/TableManager.cxx +++ b/writerfilter/source/dmapper/TableManager.cxx @@ -19,6 +19,7 @@ #include <TableManager.hxx> #include <DomainMapperTableHandler.hxx> +#include <DomainMapper_Impl.hxx> #include <util.hxx> namespace writerfilter @@ -201,6 +202,9 @@ void TableManager::closeCell(const css::uno::Reference<css::text::XTextRange>& r TableData::Pointer_t pTableData = mTableDataStack.top(); pTableData->endCell(rHandle); + + if (mpTableDataHandler) + mpTableDataHandler->getDomainMapperImpl().ClearPreviousParagraph(); } } |