summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unostyle.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/unocore/unostyle.cxx')
-rw-r--r--sw/source/core/unocore/unostyle.cxx23
1 files changed, 17 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 57ab928ac3a1..2329c7422257 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2919,14 +2919,20 @@ uno::Sequence< beans::PropertyState > SwXStyle::getPropertyStates(
bDone = true;
}
- //UUUU for FlyFrames we need to mark all properties from type RES_BACKGROUND
+ //UUUU for FlyFrames we need to mark the used properties from type RES_BACKGROUND
// as beans::PropertyState_DIRECT_VALUE to let users of this property call
// getPropertyValue where the member properties will be mapped from the
// fill attributes to the according SvxBrushItem entries
- if(!bDone && RES_BACKGROUND == pEntry->nWID
- && SWUnoHelper::needToMapFillItemsToSvxBrushItemTypes(*pSourceSet))
+ if (!bDone && RES_BACKGROUND == pEntry->nWID)
{
- pStates[i] = beans::PropertyState_DIRECT_VALUE;
+ if (SWUnoHelper::needToMapFillItemsToSvxBrushItemTypes(*pSourceSet, pEntry->nMemberId))
+ {
+ pStates[i] = beans::PropertyState_DIRECT_VALUE;
+ }
+ else
+ {
+ pStates[i] = beans::PropertyState_DEFAULT_VALUE;
+ }
bDone = true;
}
@@ -4873,11 +4879,16 @@ uno::Sequence< beans::PropertyState > SwXAutoStyle::getPropertyStates(
}
case RES_BACKGROUND:
{
- if(SWUnoHelper::needToMapFillItemsToSvxBrushItemTypes(*mpSet))
+ if (SWUnoHelper::needToMapFillItemsToSvxBrushItemTypes(*mpSet,
+ pEntry->nMemberId))
{
pStates[i] = beans::PropertyState_DIRECT_VALUE;
- bDone = true;
}
+ else
+ {
+ pStates[i] = beans::PropertyState_DEFAULT_VALUE;
+ }
+ bDone = true;
break;
}