summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brauer <mib@openoffice.org>2001-05-21 08:21:53 +0000
committerMichael Brauer <mib@openoffice.org>2001-05-21 08:21:53 +0000
commit3ca8aec6e112d7bd8323da59298973924ed636d0 (patch)
tree9d1d1bf9dadc18333ac9429bcde5cf0c78346a3d
parentc658b246674b9af5aba998d57cf13b1cb7cffe7d (diff)
#87252#: Don't export real numbering styles as automatic ones
-rw-r--r--xmloff/source/text/txtparae.cxx27
1 files changed, 20 insertions, 7 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index a3943f8cae8d..2f937a5ca95f 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: txtparae.cxx,v $
*
- * $Revision: 1.79 $
+ * $Revision: 1.80 $
*
- * last change: $Author: dvo $ $Date: 2001-05-17 16:13:53 $
+ * last change: $Author: mib $ $Date: 2001-05-21 09:21:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -341,13 +341,26 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
OUString sName;
if( xNamed.is() )
sName = xNamed->getName();
- if( !sName.getLength() || !pListAutoPool->HasName( sName ) )
+ sal_Bool bAdd = !sName.getLength();
+ if( !bAdd )
{
- // HasName returns false if the num rule is a style,
- // because all style names have been registered while
- // all automatic rules not.
- pListAutoPool->Add( xNumRule );
+ Reference < XPropertySet > xNumPropSet( xNumRule,
+ UNO_QUERY );
+ OUString sIsAutomatic( RTL_CONSTASCII_USTRINGPARAM( "IsAutomatic" ) );
+ if( xNumPropSet.is() &&
+ xNumPropSet->getPropertySetInfo()
+ ->hasPropertyByName( sIsAutomatic ) )
+ {
+ aAny = xNumPropSet->getPropertyValue( sIsAutomatic );
+ bAdd = *(sal_Bool *)aAny.getValue();
+ }
+ else
+ {
+ bAdd = sal_True;
+ }
}
+ if( bAdd )
+ pListAutoPool->Add( xNumRule );
}
}
break;