summaryrefslogtreecommitdiff
path: root/sw/source/core/inc/DocumentContentOperationsManager.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-05-14 11:34:33 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-05-14 11:39:16 +0200
commit3c0805e1f4f4d14e92c7e655d59c87de5c207e48 (patch)
treef83e033781b6724aa77a19537e035d3cfced524e /sw/source/core/inc/DocumentContentOperationsManager.hxx
parent7e9a4944e53d95f7defb1da384b665e65b2ebc55 (diff)
tdf#86639 SwEditShell: when setting para style, reset char attrs if needed
The old internal RTF filter used to call SwTxtNode::SetAttr() without setting SetAttrMode::NOFORMATATTR, so character attributes which cover the whole node got converted to paragraph attributes. The new UNO filter goes through SwXText::insertTextPortion(), which sets SetAttrMode::NOFORMATATTR, so this doesn't happen. The result of this is that when the UI sets a new paragraph style on the text node, then such character attributes are no longer removed. Given that in RTF you can't really have character properties on a paragraph, going back to the document model produced by the old internal filter doesn't sound like the good direction -- not to mention that changing SwXText::insertTextPortion() this way would be an implicit API change. Fix the problem by tweaking SwEditShell::SetTxtFmtColl() instead, so that it removes these full-text-node character attributes, too. The logic in SwTxtNode::RstTxtAttr() can be extended later if necessary to delete more attributes, but to be on the safe side, just handle the bare minimum necessary to fix the problem for now. Change-Id: I5faa3226fc0f9c18e005da185fe0830d8c393256
Diffstat (limited to 'sw/source/core/inc/DocumentContentOperationsManager.hxx')
-rw-r--r--sw/source/core/inc/DocumentContentOperationsManager.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index f2ad52b9c1f2..d9122780fad9 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -127,6 +127,8 @@ public:
bool bResetListAttrs; // #i62575#
bool bResetAll;
bool bInclRefToxMark;
+ /// From the attributes included in the range, delete only the ones which have exactly same range. Don't delete the ones which are simply included in the range.
+ bool bExactRange;
ParaRstFmt(const SwPosition* pStt, const SwPosition* pEnd,
SwHistory* pHst, sal_uInt16 nWhch = 0, const SfxItemSet* pSet = 0)
@@ -140,6 +142,7 @@ public:
, bResetListAttrs(false)
, bResetAll(true)
, bInclRefToxMark(false)
+ , bExactRange(false)
{
}
};