Kaydet (Commit) 4aa8a6ab authored tarafından David Vogt's avatar David Vogt Kaydeden (comit) Miklos Vajna

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: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 044fa501
......@@ -14,6 +14,7 @@
#include <com/sun/star/drawing/BitmapMode.hpp>
#include <com/sun/star/lang/IndexOutOfBoundsException.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>
......@@ -927,5 +928,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: */
......@@ -81,7 +81,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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment