summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/txtnode/thints.cxx35
1 files changed, 15 insertions, 20 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index f021b17b3a28..c2d9d1f09569 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2054,6 +2054,17 @@ bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
{
assert(!rSet.Count()); // handled inconsistently, typically an error?
+ // get the node's automatic attributes
+ SfxItemSet aFormatSet( *rSet.GetPool(), rSet.GetRanges() );
+ if (!bOnlyTextAttr)
+ {
+ SwContentNode::GetAttr( aFormatSet );
+ if ( bMergeIndentValuesOfNumRule )
+ {
+ lcl_MergeListLevelIndentAsLRSpaceItem( *this, aFormatSet );
+ }
+ }
+
if( HasHints() )
{
// First, check which text attributes are valid in the range.
@@ -2071,17 +2082,6 @@ bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
= bGetFromChrFormat ? &lcl_MergeAttr_ExpandChrFormat
: &lcl_MergeAttr;
- // get the node's automatic attributes
- SfxItemSet aFormatSet( *rSet.GetPool(), rSet.GetRanges() );
- if( !bOnlyTextAttr )
- {
- SwContentNode::GetAttr( aFormatSet );
- if ( bMergeIndentValuesOfNumRule )
- {
- lcl_MergeListLevelIndentAsLRSpaceItem( *this, aFormatSet );
- }
- }
-
const size_t nSize = m_pSwpHints->Count();
if (nStt == nEnd) // no range:
@@ -2249,18 +2249,13 @@ bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
{
// remove all from the format-set that are also set in the text-set
aFormatSet.Differentiate( rSet );
- // now "merge" everything
- rSet.Put( aFormatSet );
}
}
- else if( !bOnlyTextAttr )
+
+ if (aFormatSet.Count())
{
- // get the node's automatic attributes
- SwContentNode::GetAttr( rSet );
- if ( bMergeIndentValuesOfNumRule )
- {
- lcl_MergeListLevelIndentAsLRSpaceItem( *this, rSet );
- }
+ // now "merge" everything
+ rSet.Put( aFormatSet );
}
return rSet.Count() != 0;