summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBoris Dušek <me@dusek.me>2013-08-17 17:23:40 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-08-19 15:52:34 +0000
commitcc0dd9f8bd4ee52e5a26c0630e7960386aeffb15 (patch)
tree6593fb67eedb25f3b3c9b0bd2bf67bb2e42f5a83 /sw
parentfa0e48c5e4ffc2bf05a60ce0e878073643db8cbe (diff)
fdo#68219: Parent style text attributes missing in accessibility
Thanks to Niklas Johansson for testing. Change-Id: I550076e7d62f8db389cdbf902fce0ff7f8f98165 Reviewed-on: https://gerrit.libreoffice.org/5480 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/accpara.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index c97d1627fe78..f9afed91007b 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1197,6 +1197,14 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
return aValues;
}
+static void SetPutRecursive(SfxItemSet &targetSet, const SfxItemSet &sourceSet)
+{
+ const SfxItemSet *const pParentSet = sourceSet.GetParent();
+ if (pParentSet)
+ SetPutRecursive(targetSet, *pParentSet);
+ targetSet.Put(sourceSet);
+}
+
// #i63870#
void SwAccessibleParagraph::_getDefaultAttributesImpl(
const uno::Sequence< OUString >& aRequestedAttributes,
@@ -1243,7 +1251,7 @@ void SwAccessibleParagraph::_getDefaultAttributesImpl(
SfxItemSet aCharSet( const_cast<SwAttrPool&>(pTxtNode->GetDoc()->GetAttrPool()),
RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
0 );
- aCharSet.Put( pTxtNode->GetTxtColl()->GetAttrSet() );
+ SetPutRecursive( aCharSet, pTxtNode->GetTxtColl()->GetAttrSet() );
pSet->Put( aCharSet );
}