Kaydet (Commit) e0de9f83 authored tarafından Michael Stahl's avatar Michael Stahl

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.
üst 6c15b856
......@@ -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() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment