diff options
author | Daniel Vogelheim <dvo@openoffice.org> | 2001-05-30 09:21:38 +0000 |
---|---|---|
committer | Daniel Vogelheim <dvo@openoffice.org> | 2001-05-30 09:21:38 +0000 |
commit | 0e5c904af768636ee77e47e3be765a3a250186ee (patch) | |
tree | db7b7fc0773df14da7b8099419618439f3d58c1f /xmloff/source/text | |
parent | a8ade54af8e512625ec57c0fe0faff6be7f3023d (diff) |
#87257# check for valid character style in line numbering config
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLLineNumberingImportContext.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx index 54c69c027a37..4e739e57c3f7 100644 --- a/xmloff/source/text/XMLLineNumberingImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLLineNumberingImportContext.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: mib $ $Date: 2001-03-19 09:41:43 $ + * last change: $Author: dvo $ $Date: 2001-05-30 10:21:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -306,9 +306,13 @@ void XMLLineNumberingImportContext::CreateAndInsert( { Any aAny; - // TODO: check if style name exists - aAny <<= sStyleName; - xLineNumbering->setPropertyValue(sCharStyleName, aAny); + // set style name (if it exists) + if ( GetImport().GetStyles()->FindStyleChildContext( + XML_STYLE_FAMILY_TEXT_TEXT, sStyleName ) != NULL ) + { + aAny <<= sStyleName; + xLineNumbering->setPropertyValue(sCharStyleName, aAny); + } aAny <<= sSeparator; xLineNumbering->setPropertyValue(sSeparatorText, aAny); |