fdo#82859 RTF import: fillColor is unsigned
Otherwise ARGB 0xFFFFFFFF would turn into black. Change-Id: I690f34d888ca9a013e8ce1af2c7ef8ed88ee28b0
This commit is contained in:
25
sw/qa/extras/rtfimport/data/fdo82859.rtf
Normal file
25
sw/qa/extras/rtfimport/data/fdo82859.rtf
Normal file
@@ -0,0 +1,25 @@
|
||||
{\rtf1
|
||||
{\shp
|
||||
{\*\shpinst\shpbypara\shpbyignore\shptop4154\shpbottom11234\shpbxcolumn\shpbxignore\shpleft-90\shpright9270
|
||||
{\sp
|
||||
{\sn fillColor}
|
||||
{\sv 4294967295}
|
||||
}
|
||||
{\sp
|
||||
{\sn shapeType}
|
||||
{\sv 202}
|
||||
}
|
||||
{\sp
|
||||
{\sn posrelv}
|
||||
{\sv 2}
|
||||
}
|
||||
{\sp
|
||||
{\sn posrelh}
|
||||
{\sv 2}
|
||||
}
|
||||
{\shptxt
|
||||
}
|
||||
}
|
||||
}
|
||||
\par
|
||||
}
|
@@ -1990,6 +1990,12 @@ DECLARE_RTFIMPORT_TEST(testFdo85179, "fdo85179.rtf")
|
||||
CPPUNIT_ASSERT_EQUAL(sal_uInt32(50800/360), getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
|
||||
}
|
||||
|
||||
DECLARE_RTFIMPORT_TEST(testFdo82859, "fdo82859.rtf")
|
||||
{
|
||||
// This was 0: "0xffffff" was converted to 0, i.e. the background was black instead of the default.
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), getProperty<sal_Int32>(getShape(1), "BackColor"));
|
||||
}
|
||||
|
||||
CPPUNIT_PLUGIN_IMPLEMENT();
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -357,7 +357,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
|
||||
}
|
||||
else if (i->first == "fillColor" && xPropertySet.is())
|
||||
{
|
||||
aAny <<= msfilter::util::BGRToRGB(i->second.toInt32());
|
||||
aAny <<= msfilter::util::BGRToRGB(i->second.toUInt32());
|
||||
if (m_bTextFrame)
|
||||
xPropertySet->setPropertyValue("BackColor", aAny);
|
||||
else
|
||||
|
Reference in New Issue
Block a user