summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris DuĊĦek <me@dusek.me>2013-08-17 17:23:40 +0200
committerTor Lillqvist <tml@iki.fi>2013-08-20 13:37:45 +0000
commite5c7249382c12349e4e032c225c0153f6f41cccc (patch)
tree38b3c7cc6ce4bcaa3a456c678cc84486ce0d2492
parent6fd191c80a8c4637a1757b9d5132a33c6602f13b (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/5499 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
-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 3b6ef33fdbff..34d9dbd8387c 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 );
}