diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-02-02 12:51:46 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-02-02 14:36:18 +0100 |
commit | e0de9f832f8f27de473242440ca4b544ab7b9216 (patch) | |
tree | 2e456baacff0ca65b6fe0f5ef2291bc0e46f2378 /xmloff | |
parent | fdo#45534: ODF export: fix draw:fit-to-size (diff) | |
download | core-e0de9f832f8f27de473242440ca4b544ab7b9216.tar.gz core-e0de9f832f8f27de473242440ca4b544ab7b9216.zip |
fdo#45447: add an assertion when anchored to page 0
XMLTextParagraphExport::addTextFrameAttributes: detect invalid anchor
page number; this really should be fixed in Writer/writerfilter though.
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 0335b744f68d..3cd935a1cd7a 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -2501,6 +2501,8 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes( { sal_Int16 nPage = 0; rPropSet->getPropertyValue( sAnchorPageNo ) >>= nPage; + SAL_WARN_IF(nPage <= 0, "xmloff", + "ERROR: writing invalid anchor-page-number 0"); ::sax::Converter::convertNumber( sValue, (sal_Int32)nPage ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_PAGE_NUMBER, sValue.makeStringAndClear() ); |