Hi all,

On Mon, 2011-05-23 at 14:06 +0200, Cedric Bosdonnat wrote:
> Don't apply that one... I had remorse all the week-end for all the
> non-conforming documents that may loose that property. I'll hack a
> better patch to still read the old property.

Here is an augmented patch handling the old attribute in import and
exporting the valid one.

Could anyone review and push it to 3.4 and 3.4.0?

Regards,

-- 
Cédric Bosdonnat
LibreOffice hacker
http://documentfoundation.org
OOo Eclipse Integration developer
http://cedric.bosdonnat.free.fr
>From e6110128746a4d705b20a499a4c1d8455ff5600e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cedric.bosdonnat....@free.fr>
Date: Fri, 20 May 2011 17:29:08 +0200
Subject: [PATCH] fdo#37390, make style:layout-grid-snap-to-characters fit to ODF spec.

---
 xmloff/inc/xmloff/xmltoken.hxx             |    1 +
 xmloff/source/core/xmltoken.cxx            |    3 ++-
 xmloff/source/style/PageMasterStyleMap.cxx |    1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
index d361c38..932daeb 100644
--- a/xmloff/inc/xmloff/xmltoken.hxx
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -2105,6 +2105,7 @@ namespace xmloff { namespace token {
         XML_LAYOUT_GRID_STANDARD_MODE,
         XML_LAYOUT_GRID_BASE_WIDTH,
         XML_LAYOUT_GRID_SNAP_TO_CHARS,
+        XML_LAYOUT_GRID_SNAP_TO,
 
         XML_SNAP_TO_LAYOUT_GRID,
         XML_DONT_BALANCE_TEXT_COLUMNS,
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 0a11903..ef00f9b 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -2113,7 +2113,8 @@ namespace xmloff { namespace token {
         TOKEN( "default-page-layout",             XML_DEFAULT_PAGE_LAYOUT ),
         TOKEN( "layout-grid-standard-mode",       XML_LAYOUT_GRID_STANDARD_MODE ),
         TOKEN( "layout-grid-base-width",          XML_LAYOUT_GRID_BASE_WIDTH ),
-        TOKEN( "layout-grid-snap-to-characters",       XML_LAYOUT_GRID_SNAP_TO_CHARS ),
+        TOKEN( "layout-grid-snap-to-characters",  XML_LAYOUT_GRID_SNAP_TO_CHARS ),
+        TOKEN( "layout-grid-snap-to",             XML_LAYOUT_GRID_SNAP_TO ),
 
         TOKEN( "snap-to-layout-grid",             XML_SNAP_TO_LAYOUT_GRID ),
 
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 61449e7..7dafe3a 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -110,6 +110,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
 
     //text grid enhancement for better CJK support
     PLMAP( "GridBaseWidth", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_BASE_WIDTH, XML_TYPE_MEASURE, CTP_PM_GRID_BASE_WIDTH ),
+    PLMAP( "GridSnapToChars", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_SNAP_TO, XML_TYPE_BOOL, CTP_PM_GRID_SNAP_TO_CHARS ),
     PLMAP( "GridSnapToChars", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_SNAP_TO_CHARS, XML_TYPE_BOOL, CTP_PM_GRID_SNAP_TO_CHARS ),
       //export as a default attribute
     PLMAP( "StandardPageMode", XML_NAMESPACE_STYLE, XML_LAYOUT_GRID_STANDARD_MODE, XML_TYPE_BOOL|MID_FLAG_DEFAULT_ITEM_EXPORT, CTF_PM_STANDARD_MODE ),
-- 
1.7.3.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to