[Libreoffice-commits] core.git: 2 commits - writerfilter/Library_writerfilter.mk writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Jan 28 05:38:05 PST 2014


 writerfilter/Library_writerfilter.mk          |    1 +
 writerfilter/source/dmapper/GraphicImport.cxx |   24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+)

New commits:
commit 3dda94c22f83aa7133f5439d356f505c1831ec84
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 28 14:28:08 2014 +0100

    DOCX import: initial support for wp14:sizeRelH/V relativeFrom
    
    For now just warn on unexpected values, and ignore margin, what is the
    only value supported by Writer.
    
    Change-Id: Ia4fc7293839610c1bbe2dceda2320a5ba2d3a15b

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 29300cd..7f2079a 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -733,6 +733,30 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
             val.getString();
             //TODO: does it need to be handled?
         break;
+        case NS_ooxml::LN_CT_SizeRelH_relativeFrom:
+            {
+                switch (nIntValue)
+                {
+                case NS_ooxml::LN_ST_SizeRelFromH_margin:
+                    break;
+                default:
+                    SAL_WARN("writerfilter", "GraphicImport::lcl_attribute: unhandled NS_ooxml::LN_CT_SizeRelH_relativeFrom value: " << nIntValue);
+                    break;
+                }
+            }
+            break;
+        case NS_ooxml::LN_CT_SizeRelV_relativeFrom:
+            {
+                switch (nIntValue)
+                {
+                case NS_ooxml::LN_ST_SizeRelFromV_margin:
+                    break;
+                default:
+                    SAL_WARN("writerfilter", "GraphicImport::lcl_attribute: unhandled NS_ooxml::LN_CT_SizeRelV_relativeFrom value: " << nIntValue);
+                    break;
+                }
+            }
+            break;
         default:
 #ifdef DEBUG_DMAPPER_GRAPHIC_IMPORT
             dmapper_logger->element("unhandled");
commit 1eb516f5a5b1a7360e304f6015570d5c81e65cfd
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Jan 28 14:21:56 2014 +0100

    writerfiler: define DEBUG_DMAPPER_GRAPHIC_IMPORT when dbglevel == 2
    
    Change-Id: I8cfdb020d2b3e8ad886c0a9507e4eb8d0a29f87d

diff --git a/writerfilter/Library_writerfilter.mk b/writerfilter/Library_writerfilter.mk
index 9c88b38..71d798e 100644
--- a/writerfilter/Library_writerfilter.mk
+++ b/writerfilter/Library_writerfilter.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_Library_add_defs,writerfilter,\
 		-DDEBUG_TABLE \
 		-DDEBUG_DMAPPER_SETTINGS_TABLE \
 		-DDEBUG_FACTORY \
+		-DDEBUG_DMAPPER_GRAPHIC_IMPORT \
 	) \
 ))
 


More information about the Libreoffice-commits mailing list