This is an automated email from the ASF dual-hosted git repository.
jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new 064a65d452 xmloff: write style:layout-grid-standard-mode in page
layouts in extended mode
064a65d452 is described below
commit 064a65d4524ebf0657e88c8e800ab83bf342ea19
Author: Jim Jagielski <[email protected]>
AuthorDate: Wed Oct 28 11:19:45 2026 -0400
xmloff: write style:layout-grid-standard-mode in page layouts in extended
mode
---
main/xmloff/source/style/PageMasterExportPropMapper.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/main/xmloff/source/style/PageMasterExportPropMapper.cxx
b/main/xmloff/source/style/PageMasterExportPropMapper.cxx
index 571b8bbd07..3c20a06f2c 100644
--- a/main/xmloff/source/style/PageMasterExportPropMapper.cxx
+++ b/main/xmloff/source/style/PageMasterExportPropMapper.cxx
@@ -29,6 +29,7 @@
#include <xmloff/PageMasterStyleMap.hxx>
#include <tools/debug.hxx>
#include <rtl/ustrbuf.hxx>
+#include <unotools/saveopt.hxx>
#include <comphelper/extract.hxx>
//UUUU
@@ -527,7 +528,9 @@ void XMLPageMasterExportPropMapper::ContextFilter(
lcl_RemoveState(pPMGridSnapToChars);
}
- if( pPMGridBaseWidth && pPMStandardMode )
+ // ODF 1.2 allows style:layout-grid-standard-mode in the default page
layout only, so the other modes
+ // drop it; extended mode keeps it so that a page style in standard
mode survives a round trip
+ if( pPMGridBaseWidth && pPMStandardMode &&
SvtSaveOptions().GetODFDefaultVersion() != SvtSaveOptions::ODFVER_LATEST )
lcl_RemoveState(pPMStandardMode);
aPageBuffer.ContextFilter( rPropState );