summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorCzeber László Ádám <czeber.laszloadam@nisz.hu>2023-04-27 09:48:50 +0200
committerAndras Timar <andras.timar@collabora.com>2023-05-13 20:05:28 +0200
commit705588547ff262a038a4203efbf641713a6b67b3 (patch)
tree982ce75607a4f1f97d5ec72096ed02dafde5087e /writerfilter
parentc498b5cbd80013e0c5e1a7f8ba8fee25833e8396 (diff)
tdf#131722 DOCX import: fix lost first character in date selector
Fix another date selector control bug, date picker first character goes out of the control. The first character of the date separator in the first row of the table is out of control. The fix takes into account the placement of the dummy paragraph in the first row of the table, which caused the date separator to be corrupted. Thanks to Gabor Kelemen for pointing out this error to me. Follow-up to commit e898f95bfab16ddd9b04e516293cb6eb7e0a3847 "tdf#138093 DOCX import: fix broken date selector control in table". Change-Id: I91d272b786a3d3dc047334c2a4a039f987c94ce0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151087 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151164 Tested-by: Jenkins
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 46112c22f45f..73d2ec44afa7 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -381,9 +381,10 @@ void SdtHelper::createDateContentControl()
{
xCrsr->gotoRange(m_xDateFieldStartRange, false);
// tdf#138093: Date selector reset, if placed inside table
- // Modified to XOR relationship
+ // Modified to XOR relationship and adding dummy paragraph conditions
bool bIsInTable = (m_rDM_Impl.hasTableManager() && m_rDM_Impl.getTableManager().isInTable())
- != (m_rDM_Impl.m_nTableDepth > 0);
+ != (m_rDM_Impl.m_nTableDepth > 0)
+ && m_rDM_Impl.GetIsDummyParaAddedForTableInSection();
if (bIsInTable)
xCrsr->goRight(1, false);
xCrsr->gotoEnd(true);