summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-02-02 12:51:46 +0100
committerMichael Stahl <mstahl@redhat.com>2012-02-02 14:36:18 +0100
commite0de9f832f8f27de473242440ca4b544ab7b9216 (patch)
tree2e456baacff0ca65b6fe0f5ef2291bc0e46f2378 /xmloff
parent6c15b856242127ddca766da700002489ba287e21 (diff)
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.cxx2
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() );