[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/qa xmloff/source
David Vogt (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 18 10:18:34 UTC 2019
sw/qa/extras/odfimport/data/tdf113289.odt |binary
sw/qa/extras/odfimport/odfimport.cxx | 9 +++++++++
xmloff/source/style/XMLFootnoteSeparatorImport.cxx | 5 ++++-
3 files changed, 13 insertions(+), 1 deletion(-)
New commits:
commit a601e0867d0ac2c80342308622bfcc3546fce746
Author: David Vogt <david.vogt at adfinis-sygroup.ch>
AuthorDate: Wed Mar 13 13:11:39 2019 +0100
Commit: Xisco FaulĂ <xiscofauli at libreoffice.org>
CommitDate: Thu Apr 18 12:17:44 2019 +0200
tdf#113289: Default value for footnote separator
In old versions of LO/AOO, separator style was defaulting to a solid
line. When you have an old document that doesn't have the style set
explicitly, the line would disappear.
Since newer versions explicitly set the style, we should set the default
to what it was before.
Change-Id: I8dacea75fcf2f95f9bc145442b22ab0d173e7c5a
Reviewed-on: https://gerrit.libreoffice.org/69167
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
(cherry picked from commit 4aa8a6ab08b755e3d82860e8dbc294f854336477)
Reviewed-on: https://gerrit.libreoffice.org/70892
Reviewed-by: Xisco FaulĂ <xiscofauli at libreoffice.org>
diff --git a/sw/qa/extras/odfimport/data/tdf113289.odt b/sw/qa/extras/odfimport/data/tdf113289.odt
new file mode 100644
index 000000000000..01aa5700c6d5
Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf113289.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 0d71f95cb8e1..4df20d9e42a8 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -13,6 +13,7 @@
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/style/PageStyleLayout.hpp>
+#include <com/sun/star/style/FootnoteLineStyle.hpp>
#include <com/sun/star/table/XCell.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/table/BorderLine.hpp>
@@ -926,5 +927,13 @@ DECLARE_ODFIMPORT_TEST(testTdf123829, "tdf123829.odt")
pDoc->getIDocumentSettingAccess().get(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA));
}
+DECLARE_ODFIMPORT_TEST(testTdf113289, "tdf113289.odt")
+{
+ uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int8>(style::FootnoteLineStyle::SOLID),
+ getProperty<sal_Int8>(aPageStyle, "FootnoteLineStyle"));
+}
+
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
index a41a31d725f9..bfc57f62b27a 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
@@ -80,7 +80,10 @@ void XMLFootnoteSeparatorImport::StartElement(
text::HorizontalAdjust eLineAdjust = text::HorizontalAdjust_LEFT;
sal_Int32 nLineTextDistance = 0;
sal_Int32 nLineDistance = 0;
- sal_Int8 nLineStyle = 0;
+
+ // Default separator line style should be SOLID (used to be default before
+ // the choice selector was available)
+ sal_Int8 nLineStyle = 1;
// iterate over xattribute list and fill values
sal_Int16 nLength = xAttrList->getLength();
More information about the Libreoffice-commits
mailing list