[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 3 commits - solenv/gbuild xmloff/source

Michael Stahl mstahl at redhat.com
Mon Jun 1 07:47:55 PDT 2015


 solenv/gbuild/gbuild.help.txt |   21 +++++++++++++--------
 xmloff/source/core/xmlexp.cxx |    3 ++-
 2 files changed, 15 insertions(+), 9 deletions(-)

New commits:
commit cee2ca155f7eb68d242307cbbbcd96b12722d3ff
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 1 16:24:23 2015 +0200

    xmloff: don't add FIELD namespace twice
    
    The first place already checks SvXMLExportFlags::CONTENT, so the second
    Add is unnecessary (and for versions <= 1.2 it shouldn't be exported).
    
    Change-Id: If2e471b50fcf21ad8977de48c433b628c5c03305
    (cherry picked from commit 15cd958a8a5c0b8dbe8891e2ce47aea6c91ba914)

diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index d34e1fb..72cc29f 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -336,7 +336,6 @@ void SvXMLExport::_InitCtor()
         mpNamespaceMap->Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
     }
 
-    bool bAddFieldNM = false;
     // namespaces for documents
     if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
     {
@@ -364,7 +363,7 @@ void SvXMLExport::_InitCtor()
             mpNamespaceMap->Add(
                 GetXMLToken(XML_NP_LO_EXT), GetXMLToken(XML_N_LO_EXT),
                 XML_NAMESPACE_LO_EXT);
-            bAddFieldNM = true;
+            mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
         }
     }
     if( getExportFlags() & (SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
@@ -383,12 +382,8 @@ void SvXMLExport::_InitCtor()
         mpNamespaceMap->Add( GetXMLToken(XML_NP_XSD), GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_XSI), GetXMLToken(XML_N_XSI), XML_NAMESPACE_XSI );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_FORMX), GetXMLToken(XML_N_FORMX), XML_NAMESPACE_FORMX );
-        bAddFieldNM = true;
     }
 
-    if (bAddFieldNM)
-        mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
-
     // RDFa: needed for content and header/footer styles
     if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
     {
commit 6069985602b179cae4aa724da864fb691667c006
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri May 22 10:59:01 2015 +0100

    add field namespace to styles.xml when saving fdo85232-1.docx to .odt
    
    when >= SvtSaveOptions::ODFVER_012
    
    Change-Id: I0414bc4a83ae4787e10cd8a215555f249da7e65a
    (cherry picked from commit 9bc314e38b6bcc268fe519b6d771a60087a1af9e)

diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index fe100a0..d34e1fb 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -336,6 +336,7 @@ void SvXMLExport::_InitCtor()
         mpNamespaceMap->Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
     }
 
+    bool bAddFieldNM = false;
     // namespaces for documents
     if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
     {
@@ -363,6 +364,7 @@ void SvXMLExport::_InitCtor()
             mpNamespaceMap->Add(
                 GetXMLToken(XML_NP_LO_EXT), GetXMLToken(XML_N_LO_EXT),
                 XML_NAMESPACE_LO_EXT);
+            bAddFieldNM = true;
         }
     }
     if( getExportFlags() & (SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
@@ -380,9 +382,13 @@ void SvXMLExport::_InitCtor()
         mpNamespaceMap->Add( GetXMLToken(XML_NP_XFORMS_1_0), GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_XSD), GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_XSI), GetXMLToken(XML_N_XSI), XML_NAMESPACE_XSI );
-        mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
         mpNamespaceMap->Add( GetXMLToken(XML_NP_FORMX), GetXMLToken(XML_N_FORMX), XML_NAMESPACE_FORMX );
+        bAddFieldNM = true;
     }
+
+    if (bAddFieldNM)
+        mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
+
     // RDFa: needed for content and header/footer styles
     if( getExportFlags() & (SvXMLExportFlags::STYLES|SvXMLExportFlags::AUTOSTYLES|SvXMLExportFlags::MASTERSTYLES|SvXMLExportFlags::CONTENT) )
     {
commit 6b5d7b238b5471c23bfe05a1b1643e52c6c55c72
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 1 14:37:28 2015 +0200

    gbuild: document what CFLAGS/CXXFLAGS etc. *actually* do
    
    Looks like following GNU build system standards isn't necessarily the
    best idea, if even the documentation gets it wrong.
    Also document the ENVCFLAGS/ENVCFLAGSCXX variables.
    
    see also: i#116959 and:
    http://www.gnu.org/software/autoconf/manual/standards.html#Command-Variables
    
    Change-Id: I56d8623cbbc800ef80da1610f6fd104ac29beaf9
    (cherry picked from commit d3171eb7d0291e3020d542cfc06d0725e039dbfb)

diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index be744fc..adb9634 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -108,14 +108,19 @@ INTERACTIVE VARIABLES:
        PARALLELISM     If not empty, pass argument on as the -j switch
                        to recursive make invocations. Useful to
                        lower/increase build parallelism individually.
-       LEXFLAGS        Add as flags for LEX scanner generator invocation.
-       YACCFLAGS       Add as flags for YACC parser generator invocation.
-       CPPFLAGS        Add as preprocessor flags for C/C++/ObjC/ObjC++ compilation.
-       CFLAGS          Add as compiler flags for plain C compilation.
-       CXXFLAGS        Add as compiler flags for C++ compilation.
-       OBJCFLAGS       Add as compiler flags for Objective C compilation.
-       OBJCXXFLAGS     Add as compiler flags for Objective C++ compilation.
-       LDFLAGS         Add as linker flags.
+       LEXFLAGS        Append flags for LEX scanner generator invocation.
+       YACCFLAGS       Append flags for YACC parser generator invocation.
+       CPPFLAGS        Append preprocessor flags for C/C++/ObjC/ObjC++ compilation.
+       CFLAGS          Override compiler flags for plain C compilation.
+       ENVCFLAGS       Append compiler flags for plain C compilation.
+       CXXFLAGS        Override compiler flags for C++ compilation.
+                       Note: this overrides default optimization and debug
+                       flags; to append flags without overriding, use:
+                       CXXFLAGS='$(call gb_LinkTarget__get_debugcxxflags,$(1)) -Wfoo'
+       ENVCFLAGSCXX    Append compiler flags for C++ compilation.
+       OBJCFLAGS       Override compiler flags for Objective C compilation.
+       OBJCXXFLAGS     Override compiler flags for Objective C++ compilation.
+       LDFLAGS         Override linker flags.
        gb_FULLDEPS     Generate and use dependencies (on by default, handle with care).
        gb_COLOR        Use ASCII color output.
        gb_TITLES       Show progress in terminal title.


More information about the Libreoffice-commits mailing list