sw/qa/extras/ooxmlexport/data/tdf121663.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport13.cxx | 7 +++++++ sw/source/uibase/shells/basesh.cxx | 6 ++++++ writerfilter/source/dmapper/DomainMapper.cxx | 9 ++++++++- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 +- 5 files changed, 22 insertions(+), 2 deletions(-)
New commits: commit 5afcf42108a522841440f795e4a74d3acea3755f Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Sun Sep 8 21:37:43 2019 -0800 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Wed Sep 18 11:33:25 2019 +0200 tdf#126833 fix table auto format undo/redo Fixes regression caused by fix for tdf#123516 Change-Id: If7b6bf9cba30085585fc495898f3dfb308197495 Reviewed-on: https://gerrit.libreoffice.org/78770 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> (cherry picked from commit 1d5b89eccdccb3090b5503a60f829c54c077f328) Reviewed-on: https://gerrit.libreoffice.org/79045 Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 0c76cd643f9a..f89a71383fff 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -112,6 +112,7 @@ #include <SwStyleNameMapper.hxx> #include <poolfmt.hxx> #include <shellres.hxx> +#include <UndoTable.hxx> FlyMode SwBaseShell::eFrameMode = FLY_DRAG_END; @@ -2709,7 +2710,12 @@ void SwBaseShell::InsertTable( SfxRequest& _rRequest ) { SwTableNode* pTableNode = const_cast<SwTableNode*>( rSh.IsCursorInTable() ); if ( pTableNode ) + { pTableNode->GetTable().SetTableStyleName( aAutoName ); + SwUndoTableAutoFormat* pUndo = new SwUndoTableAutoFormat( *pTableNode, *pTAFormat ); + if ( pUndo ) + rSh.GetIDocumentUndoRedo().AppendUndo( std::unique_ptr<SwUndo>(pUndo) ); + } } rSh.EndAllAction(); commit 129d5e09e0bc351bf77762067aa817b02bbb8e2f Author: László Németh <nem...@numbertext.org> AuthorDate: Tue Jul 9 21:36:29 2019 +0200 Commit: Xisco Faulí <xiscofa...@libreoffice.org> CommitDate: Wed Sep 18 11:33:10 2019 +0200 tdf#121663 DOCX import: fix missing space in line numbering Auto distance of line numbering is 0.5 cm, not zero. Change-Id: Ic451424bffb3eb3fe386bcaef5a476a5679faff2 Reviewed-on: https://gerrit.libreoffice.org/75317 Tested-by: Jenkins Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit d828429f81e63d3c6beb4574fe3c52b001ea0a5b) Reviewed-on: https://gerrit.libreoffice.org/79053 Reviewed-by: Xisco Faulí <xiscofa...@libreoffice.org> diff --git a/sw/qa/extras/ooxmlexport/data/tdf121663.docx b/sw/qa/extras/ooxmlexport/data/tdf121663.docx new file mode 100644 index 000000000000..dd2614169a8b Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf121663.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx index 27dd95db7fc6..cb06ef8f331f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx @@ -435,6 +435,13 @@ DECLARE_OOXMLEXPORT_TEST(tdf119809, "tdf119809.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<OUString> >(xPropertySet, "StringItemList").getLength()); } +DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121663, "tdf121663.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + // auto distance of line numbering is 0.5 cm + assertXPath(pXmlDoc, "//w:lnNumType", "distance", "283"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index a6ad783afd20..ffcc6f4d7064 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1952,8 +1952,15 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_IS_ON ), uno::makeAny(true) ); if( aSettings.nInterval ) xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_INTERVAL ), uno::makeAny(static_cast<sal_Int16>(aSettings.nInterval)) ); - if( aSettings.nDistance ) + if( aSettings.nDistance != -1 ) xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_DISTANCE ), uno::makeAny(aSettings.nDistance) ); + else + { + // set Auto value (0.5 cm) + xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_DISTANCE ), uno::makeAny(static_cast<sal_Int32>(500)) ); + if( pSectionContext ) + pSectionContext->SetdxaLnn( static_cast<sal_Int32>(283) ); + } xLineNumberingPropSet->setPropertyValue(getPropertyName( PROP_RESTART_AT_EACH_PAGE ), uno::makeAny(aSettings.bRestartAtEachPage) ); } catch( const uno::Exception& ) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 793631530d66..e5bd1efdbe85 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -348,7 +348,7 @@ struct LineNumberSettings sal_Int32 nInterval; bool bRestartAtEachPage; LineNumberSettings() : - nDistance(0) + nDistance(-1) ,nInterval(0) ,bRestartAtEachPage(true) {} _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits