svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 2 +- sw/qa/extras/rtfimport/data/tdf90315.rtf | 4 ++++ sw/qa/extras/rtfimport/rtfimport.cxx | 9 +++++++++ writerfilter/source/dmapper/SectionColumnHandler.cxx | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-)
New commits: commit 5101c13a3e54256bd79c412484e71d6d0f269187 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Sat May 23 19:23:05 2015 +0100 tdf#90315 RTF import: fix \colsx default value See SectPageInformation::mnColsx on the libreoffice-3-6 branch + the spec agrees, too. Change-Id: I6f70a125f8d962621f319e3e75e2865e5f126859 (cherry picked from commit e18adb7369d140f33b947668a69da2fa78738e7b) diff --git a/sw/qa/extras/rtfimport/data/tdf90315.rtf b/sw/qa/extras/rtfimport/data/tdf90315.rtf new file mode 100644 index 0000000..df99754 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf90315.rtf @@ -0,0 +1,4 @@ +{\rtf1\cols2 +foo\par +bar\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index e74d694..86dddfc 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2292,6 +2292,15 @@ DECLARE_RTFIMPORT_TEST(testTdf86814, "tdf86814.rtf") CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(getParagraph(1), 1), "CharWeight")); } +DECLARE_RTFIMPORT_TEST(testTdf90315, "tdf90315.rtf") +{ + uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xTextSection(xTextSections->getByIndex(0), uno::UNO_QUERY); + // This was 0, but default should be 720 twips. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), getProperty<sal_Int32>(xTextSection->getPropertyValue("TextColumns"), "AutomaticDistance")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/writerfilter/source/dmapper/SectionColumnHandler.cxx b/writerfilter/source/dmapper/SectionColumnHandler.cxx index 3a35754..91dfc91 100644 --- a/writerfilter/source/dmapper/SectionColumnHandler.cxx +++ b/writerfilter/source/dmapper/SectionColumnHandler.cxx @@ -31,7 +31,7 @@ using namespace ::com::sun::star; SectionColumnHandler::SectionColumnHandler() : LoggedProperties("SectionColumnHandler") , bEqualWidth(false) - , nSpace(0) + , nSpace(1270) // 720 twips , nNum(0) , bSep(false) { commit 92a9c03e5100952dd364e38366ec0f80999cbc43 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu May 21 15:12:10 2015 +0100 tdf#91095 svx: avoid unconditional SdrObject -> SdrObjCustomShape static_cast Change-Id: I5ed86633e909c13f14ee382b4d9ec8f9c264df1d (cherry picked from commit 23cba1f55f1937c27c2a1bc27f9d3fd7b1ef1b47) diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx index 2beb70f..c78641f 100644 --- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx @@ -273,7 +273,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render() throw ( RuntimeException, std::exception ) { Reference< drawing::XShape > xShape; - SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) ); + SdrObject* pSdrObjCustomShape( PTR_CAST( SdrObjCustomShape, GetSdrObjectFromXShape( mxShape ) ) ); if ( pSdrObjCustomShape ) { // retrieving the TextPath property to check if feature is enabled _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits