diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-03-17 17:42:25 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-03-17 17:42:25 +0100 |
commit | 801ea2a13eaa24b530315f8ff5666c17f911e670 (patch) | |
tree | 9d4fe877d82485641e48d6fbfc1ac128e1ae608a /svx/source/sdr/properties | |
parent | cce231413598c21b748921d4c49a8b00cd70b2b1 (diff) |
impress187 #i109515# avoid styles from other ItemPools
Diffstat (limited to 'svx/source/sdr/properties')
-rw-r--r-- | svx/source/sdr/properties/attributeproperties.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 15142a86b9cf..5abd9c4b26f1 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -281,7 +281,19 @@ namespace sdr // set stylesheet (if used) if(pStySheet) { - ImpAddStyleSheet(pStySheet, sal_True); + // #i109515# + SfxItemPool* pStyleSheetPool = &pStySheet->GetPool().GetPool(); + + if(pStyleSheetPool == pDestPool) + { + // just re-set stylesheet + ImpAddStyleSheet(pStySheet, sal_True); + } + else + { + // StyleSheet is NOT from the correct pool; use default + ImpAddStyleSheet(pNewModel->GetDefaultStyleSheet(), sal_True); + } } delete pOldSet; |