diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-09-25 21:47:16 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-09-25 21:47:16 +0200 |
commit | 4c8fba36e0b8955ecb49293e6218829ad7cd40a9 (patch) | |
tree | d24e9d1b546873c85d4f5aaef4b719a315692ca3 /xmloff/source/text/txtimp.cxx | |
parent | e3441919174583045e0b7c8110b2a2d4119b66d1 (diff) | |
parent | 5228b9163b7c889a62b553e543fea51800099f7a (diff) |
merge commit
Diffstat (limited to 'xmloff/source/text/txtimp.cxx')
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 0f5f3384e9..23422c10f6 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1163,30 +1163,38 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (pListBlock || pNumberedParagraph) { - sal_Bool bSameNumRules = xNewNumRules == xNumRules; - if( !bSameNumRules && xNewNumRules.is() && xNumRules.is() ) + // --> OD 2009-08-24 #i101349# + // Assure that list style of automatic paragraph style is applied at paragraph. + sal_Bool bApplyNumRules = pStyle && pStyle->IsListStyleSet(); + if ( !bApplyNumRules ) { - // If the interface pointers are different then this does - // not mean that the num rules are different. Further tests - // are required then. However, if only one num rule is - // set, no tests are required of course. - Reference< XNamed > xNewNamed( xNewNumRules, UNO_QUERY ); - Reference< XNamed > xNamed( xNumRules, UNO_QUERY ); - if( xNewNamed.is() && xNamed.is() ) + sal_Bool bSameNumRules = xNewNumRules == xNumRules; + if( !bSameNumRules && xNewNumRules.is() && xNumRules.is() ) { - bSameNumRules = xNewNamed->getName() == xNamed->getName(); - } - else - { - Reference< XAnyCompare > xNumRuleCompare( xNumRules, UNO_QUERY ); - if( xNumRuleCompare.is() ) + // If the interface pointers are different then this does + // not mean that the num rules are different. Further tests + // are required then. However, if only one num rule is + // set, no tests are required of course. + Reference< XNamed > xNewNamed( xNewNumRules, UNO_QUERY ); + Reference< XNamed > xNamed( xNumRules, UNO_QUERY ); + if( xNewNamed.is() && xNamed.is() ) { - bSameNumRules = (xNumRuleCompare->compare( Any(xNumRules), Any(xNewNumRules) ) == 0); + bSameNumRules = xNewNamed->getName() == xNamed->getName(); + } + else + { + Reference< XAnyCompare > xNumRuleCompare( xNumRules, UNO_QUERY ); + if( xNumRuleCompare.is() ) + { + bSameNumRules = (xNumRuleCompare->compare( Any(xNumRules), Any(xNewNumRules) ) == 0); + } } } + bApplyNumRules = !bSameNumRules; } - if( !bSameNumRules ) + if ( bApplyNumRules ) + // <-- { // #102607# This may except when xNewNumRules contains // a Writer-NumRule-Implementation bug gets applied to |