This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch odf-devel in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit b070ffe226b0fe6b9082bf681e963fc1a4632a0a Author: Jim Jagielski <[email protected]> AuthorDate: Fri Oct 23 06:33:39 2026 -0400 xmloff: don't write text:anchor-page-number for page 0 --- main/xmloff/source/text/txtparae.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main/xmloff/source/text/txtparae.cxx b/main/xmloff/source/text/txtparae.cxx index cadb3d5a71..806a80fba2 100644 --- a/main/xmloff/source/text/txtparae.cxx +++ b/main/xmloff/source/text/txtparae.cxx @@ -2547,10 +2547,13 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes( { sal_Int16 nPage = 0; rPropSet->getPropertyValue( sAnchorPageNo ) >>= nPage; - GetExport().GetMM100UnitConverter().convertNumber( sValue, - (sal_Int32)nPage ); - GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_PAGE_NUMBER, - sValue.makeStringAndClear() ); + if( nPage > 0 ) + { + GetExport().GetMM100UnitConverter().convertNumber( sValue, + (sal_Int32)nPage ); + GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ANCHOR_PAGE_NUMBER, + sValue.makeStringAndClear() ); + } } else {
