diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-02-01 00:11:21 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-02-09 16:02:10 +0000 |
commit | 5b48d5e25c8e7918f4669195144afb1fae049d41 (patch) | |
tree | 17b9336ec5f4c26fb00509eb0adc53190ac03101 /sw/source/core/unocore/unocrsrhelper.cxx | |
parent | 0bc37cf20044fe8fee0cc7dd5af3ee58304a3a0f (diff) |
Related: tdf#88583 writerfilter: import paragraph color as fill attributes
In theory this is to be in sync with the ODF import. In practice the old
UNO property seems not to have a proper fallback to populate the doc
model with the fillattributes, so without this even if the import result
is visible, it would be lost on ODF export.
Additionally, this detected a bug in SwUnoCursorHelper::makeRedline(),
where paragraph format redline tried to use the map of a text portion
instead of a paragraph.
(cherry picked from commit 24077b2d52ab3d0fd0db5afb25d8b94b62386e3e)
Change-Id: I026e38e1990ed2a460624a8d967a16ae3fb6c512
Reviewed-on: https://gerrit.libreoffice.org/14353
Tested-by: Michael Stahl <mstahl@redhat.com>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/core/unocore/unocrsrhelper.cxx')
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index efe476afc1cf..faa268c6ecba 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1219,9 +1219,13 @@ void makeRedline( SwPaM& rPaM, // Check if the value exists if ( aRevertPropertiesValue >>= aRevertProperties ) { - // sw/source/core/unocore/unoport.cxx#83 is where it's decided what map gets used for a text portion - // so it's PROPERTY_MAP_TEXTPORTION_EXTENSIONS, unless it's a redline portion - SfxItemPropertySet const& rPropSet = (*aSwMapProvider.GetPropertySet(PROPERTY_MAP_TEXTPORTION_EXTENSIONS)); + int nMap = 0; + // Make sure that paragraph format gets its own map, otherwise e.g. fill attributes are not preserved. + if (eType == nsRedlineType_t::REDLINE_PARAGRAPH_FORMAT) + nMap = PROPERTY_MAP_PARAGRAPH; + else + nMap = PROPERTY_MAP_TEXTPORTION_EXTENSIONS; + SfxItemPropertySet const& rPropSet = (*aSwMapProvider.GetPropertySet(nMap)); // Check if there are any properties if (aRevertProperties.getLength()) |