Kaydet (Commit) 13826939 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#108955 RTF import: fix missing paragraph background

See commit 1be0a3fa (n#825305:
writerfilter RTF import: override style properties like Word,
2014-06-17) for the context.

Here the problem was that details of the paragraph background were
removed during the style deduplication, but not the paragraph background
sprm itself. That was interpreted (correctly) by dmapper as "no
background", rather than "inherit from style".

Change-Id: I88904cbd0a3c7686ede1f98d06df8fc875978afc
Reviewed-on: https://gerrit.libreoffice.org/40099Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 8fc84347
{\rtf1\adeflang1037\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033\themelang1033\themelangfe0\themelangcs1037
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;
\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;
\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red255\green255\blue153;}
\noqfpromote
{\stylesheet
{\s2 \cbpat17 heading 2;}
}
\pard\plain \s2\cbpat17 Lorum qua spo
\par }
}
......@@ -932,6 +932,13 @@ DECLARE_RTFEXPORT_TEST(testHyphpar, "hyphpar.rtf")
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getParagraph(2), "ParaIsHyphenation"));
}
DECLARE_RTFEXPORT_TEST(testTdf108955, "tdf108955.rtf")
{
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
// This was 0xffffff, i.e. non-white background was overwritten from the paragraph style.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xffff99), getProperty<sal_Int32>(getParagraph(1), "FillColor"));
}
DECLARE_RTFEXPORT_TEST(testTdf80708, "tdf80708.rtf")
{
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
......
......@@ -185,6 +185,9 @@ static bool isSPRMChildrenExpected(Id nId)
case NS_ooxml::LN_CT_PBdr_bottom:
case NS_ooxml::LN_CT_PBdr_right:
// Expected children are NS_ooxml::LN_CT_Border_*.
SAL_FALLTHROUGH;
case NS_ooxml::LN_CT_PrBase_shd:
// Expected children are NS_ooxml::LN_CT_Shd_*.
return true;
default:
......
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