[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 11 commits - lo.xcent.in Makefile.in registry/Module_registry.mk Repository.mk sw/qa sw/source vcl/Module_vcl.mk writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Sat Jun 11 13:21:40 UTC 2016


 Makefile.in                                       |   27 ++++++++++++++++-----
 Repository.mk                                     |    6 +++-
 lo.xcent.in                                       |    7 -----
 registry/Module_registry.mk                       |    6 +++-
 sw/qa/extras/ooxmlimport/data/tdf99074.docx       |binary
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx          |    8 ++++++
 sw/qa/extras/rtfexport/data/pgndec.rtf            |   23 ++++++++++++++++++
 sw/qa/extras/rtfexport/data/pgnlcltr.rtf          |   23 ++++++++++++++++++
 sw/qa/extras/rtfexport/data/pgnlcrm.rtf           |   23 ++++++++++++++++++
 sw/qa/extras/rtfexport/data/pgnucrm.rtf           |   23 ++++++++++++++++++
 sw/qa/extras/rtfexport/rtfexport.cxx              |   24 ++++++++++++++++++
 sw/source/uibase/uno/SwXDocumentSettings.cxx      |   16 ++++++++++++
 vcl/Module_vcl.mk                                 |    2 -
 writerfilter/source/dmapper/DomainMapper.cxx      |   16 ++++++++++++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    4 +++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx    |   28 ++++++++++++++++++----
 16 files changed, 214 insertions(+), 22 deletions(-)

New commits:
commit 278967e03360f78796ec7eff38c8dfd91e1ec107
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sat Apr 23 20:34:57 2016 +0200

    Related: tdf#65642 RTF filter: import \pgndec
    
    This as a side effect also implements support for DOCX <w:pgNumType
    w:fmt="decimal" .../>.
    
    Reviewed-on: https://gerrit.libreoffice.org/24457
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit b94d753ac9e3894da055d31bbb7bb20e11b97b5a)
    
    Change-Id: I747c3f610dc13f614b6f962c2a498c987765ebb6

diff --git a/sw/qa/extras/rtfexport/data/pgndec.rtf b/sw/qa/extras/rtfexport/data/pgndec.rtf
new file mode 100644
index 0000000..7f38c69
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/pgndec.rtf
@@ -0,0 +1,23 @@
+{\rtf1
+\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+{\field\fldedit
+{\*\fldinst
+{ PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{1}
+}
+}
+\sect
+\sectd\pgnrestart\pgnlcrm\pgndec
+{\field\fldedit
+{\*\fldinst
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid525329  PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid9597790 1}
+}
+}
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13321744
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 4a367a0..fb2b63b 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -1009,6 +1009,12 @@ DECLARE_RTFEXPORT_TEST(testPgnlcrm, "pgnlcrm.rtf")
     CPPUNIT_ASSERT_EQUAL(style::NumberingType::ROMAN_LOWER, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
 }
 
+DECLARE_RTFEXPORT_TEST(testPgndec, "pgndec.rtf")
+{
+    // The second page's numbering type: this was style::NumberingType::ROMAN_LOWER.
+    CPPUNIT_ASSERT_EQUAL(style::NumberingType::ARABIC, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 22a9653..f00326d 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -969,6 +969,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
             {
                 switch (nIntValue)
                 {
+                case NS_ooxml::LN_Value_ST_NumberFormat_decimal:
+                    // 1, 2, ...
+                    pSectionContext->SetPageNumberType(style::NumberingType::ARABIC);
+                break;
                 case NS_ooxml::LN_Value_ST_NumberFormat_upperLetter:
                     // A, B, ...
                     pSectionContext->SetPageNumberType(style::NumberingType::CHARS_UPPER_LETTER_N);
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 42377c2..a809802 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3286,7 +3286,6 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         m_aStates.top().aSectionSprms.set(NS_ooxml::LN_EG_SectPrContents_formProt, pValue);
     }
     break;
-    case RTF_PGNDEC:
     case RTF_PGNBIDIA:
     case RTF_PGNBIDIB:
         // These should be mapped to NS_ooxml::LN_EG_SectPrContents_pgNumType, but dmapper has no API for that at the moment.
@@ -3628,6 +3627,12 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
     }
     break;
+    case RTF_PGNDEC:
+    {
+        auto pIntValue = std::make_shared<RTFValue>(NS_ooxml::LN_Value_ST_NumberFormat_decimal);
+        lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
+    }
+    break;
     default:
     {
         SAL_INFO("writerfilter", "TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
commit fe932b941d3b1df2ffdbe3a3c3227c41ad12beca
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Apr 21 08:36:20 2016 +0200

    Related: tdf#65642 RTF filter: import \pgnlcrm
    
    This as a side effect also implements support for DOCX <w:pgNumType
    w:fmt="lowerRoman" .../>.
    
    Reviewed-on: https://gerrit.libreoffice.org/24273
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 91b18cee97b110fe60391faa945a6fd166f1d8aa)
    
    Change-Id: Ifb524b25236a8bc774690266a4fa205154204109

diff --git a/sw/qa/extras/rtfexport/data/pgnlcrm.rtf b/sw/qa/extras/rtfexport/data/pgnlcrm.rtf
new file mode 100644
index 0000000..4ef9b61
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/pgnlcrm.rtf
@@ -0,0 +1,23 @@
+{\rtf1
+\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+{\field\fldedit
+{\*\fldinst
+{ PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{1}
+}
+}
+\sect
+\sectd\pgnrestart\pgnlcrm
+{\field\fldedit
+{\*\fldinst
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid525329  PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid9597790 i}
+}
+}
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13321744
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 2b54961..4a367a0 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -1003,6 +1003,12 @@ DECLARE_RTFEXPORT_TEST(testPgnucrm, "pgnucrm.rtf")
     CPPUNIT_ASSERT_EQUAL(style::NumberingType::ROMAN_UPPER, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
 }
 
+DECLARE_RTFEXPORT_TEST(testPgnlcrm, "pgnlcrm.rtf")
+{
+    // The second page's numbering type: this was style::NumberingType::ARABIC.
+    CPPUNIT_ASSERT_EQUAL(style::NumberingType::ROMAN_LOWER, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 5d65165..22a9653 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -981,6 +981,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                     // I, II, ...
                     pSectionContext->SetPageNumberType(style::NumberingType::ROMAN_UPPER);
                 break;
+                case NS_ooxml::LN_Value_ST_NumberFormat_lowerRoman:
+                    // i, ii, ...
+                    pSectionContext->SetPageNumberType(style::NumberingType::ROMAN_LOWER);
+                break;
                 }
             }
         break;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index b64bc91..42377c2 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3287,7 +3287,6 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     }
     break;
     case RTF_PGNDEC:
-    case RTF_PGNLCRM:
     case RTF_PGNBIDIA:
     case RTF_PGNBIDIB:
         // These should be mapped to NS_ooxml::LN_EG_SectPrContents_pgNumType, but dmapper has no API for that at the moment.
@@ -3623,6 +3622,12 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
     }
     break;
+    case RTF_PGNLCRM:
+    {
+        auto pIntValue = std::make_shared<RTFValue>(NS_ooxml::LN_Value_ST_NumberFormat_lowerRoman);
+        lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
+    }
+    break;
     default:
     {
         SAL_INFO("writerfilter", "TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
commit 72b4a191aec12e0853b18702ce19cbfb49dd4434
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Apr 14 08:08:04 2016 +0200

    Related: tdf#65642 RTF filter: import \pgnucrm
    
    This as a side effect also implements support for DOCX <w:pgNumType
    w:fmt="upperRoman" .../>.
    
    Reviewed-on: https://gerrit.libreoffice.org/24073
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 235dcc11e7e5291188e134f37a03849d741c4f6e)
    
    Change-Id: Ibf3bedca03c6c2a2b96eecb36ff6c4cf6e2281b4

diff --git a/sw/qa/extras/rtfexport/data/pgnucrm.rtf b/sw/qa/extras/rtfexport/data/pgnucrm.rtf
new file mode 100644
index 0000000..ce0bbf2
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/pgnucrm.rtf
@@ -0,0 +1,23 @@
+{\rtf1
+\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+{\field\fldedit
+{\*\fldinst
+{ PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{1}
+}
+}
+\sect
+\sectd\pgnrestart\pgnucrm
+{\field\fldedit
+{\*\fldinst
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid525329  PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid9597790 A}
+}
+}
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13321744
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 1c8b03f..2b54961 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -997,6 +997,12 @@ DECLARE_RTFEXPORT_TEST(testPgnlcltr, "pgnlcltr.rtf")
     CPPUNIT_ASSERT_EQUAL(style::NumberingType::CHARS_LOWER_LETTER_N, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
 }
 
+DECLARE_RTFEXPORT_TEST(testPgnucrm, "pgnucrm.rtf")
+{
+    // The second page's numbering type: this was style::NumberingType::ARABIC.
+    CPPUNIT_ASSERT_EQUAL(style::NumberingType::ROMAN_UPPER, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 05328c7..5d65165 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -977,6 +977,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                     // a, b, ...
                     pSectionContext->SetPageNumberType(style::NumberingType::CHARS_LOWER_LETTER_N);
                 break;
+                case NS_ooxml::LN_Value_ST_NumberFormat_upperRoman:
+                    // I, II, ...
+                    pSectionContext->SetPageNumberType(style::NumberingType::ROMAN_UPPER);
+                break;
                 }
             }
         break;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 46a7329..b64bc91 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3287,7 +3287,6 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     }
     break;
     case RTF_PGNDEC:
-    case RTF_PGNUCRM:
     case RTF_PGNLCRM:
     case RTF_PGNBIDIA:
     case RTF_PGNBIDIB:
@@ -3618,6 +3617,12 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
     }
     break;
+    case RTF_PGNUCRM:
+    {
+        auto pIntValue = std::make_shared<RTFValue>(NS_ooxml::LN_Value_ST_NumberFormat_upperRoman);
+        lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
+    }
+    break;
     default:
     {
         SAL_INFO("writerfilter", "TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
commit 9ed536261906078cdac19d3cf9edd04a26903591
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Mar 30 09:05:04 2016 +0200

    Related: tdf#65642 RTF filter: import \pgnlcltr
    
    This as a side effect also implements support for DOCX <w:pgNumType
    w:fmt="lowerLetter" .../>.
    
    Change-Id: I47b60a0390ef081dc15b26e40393e35bf7bad130
    (cherry picked from commit 43a17602fb894c10931581b20deec4a47889f310)

diff --git a/sw/qa/extras/rtfexport/data/pgnlcltr.rtf b/sw/qa/extras/rtfexport/data/pgnlcltr.rtf
new file mode 100644
index 0000000..6bc3035
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/pgnlcltr.rtf
@@ -0,0 +1,23 @@
+{\rtf1
+\pard\plain \ltrpar\ql \li0\ri0\sa200\sl276\slmult1\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af31507\afs22\alang1025 \ltrch\fcs0
+{\field\fldedit
+{\*\fldinst
+{ PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{1}
+}
+}
+\sect
+\sectd\pgnrestart\pgnlcltr
+{\field\fldedit
+{\*\fldinst
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid525329  PAGE   \\* MERGEFORMAT }
+}
+{\fldrslt
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid9597790 A}
+}
+}
+{\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid13321744
+\par }
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 11b92e8..1c8b03f 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -991,6 +991,12 @@ DECLARE_RTFEXPORT_TEST(testTdf98806, "tdf98806.rtf")
     CPPUNIT_ASSERT_EQUAL(OUString("BBB"), xBookmark->getAnchor()->getString());
 }
 
+DECLARE_RTFEXPORT_TEST(testPgnlcltr, "pgnlcltr.rtf")
+{
+    // The second page's numbering type: this was style::NumberingType::ARABIC.
+    CPPUNIT_ASSERT_EQUAL(style::NumberingType::CHARS_LOWER_LETTER_N, getProperty<sal_Int16>(getStyles("PageStyles")->getByName("Converted1"), "NumberingType"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 80206df..05328c7 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -973,6 +973,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
                     // A, B, ...
                     pSectionContext->SetPageNumberType(style::NumberingType::CHARS_UPPER_LETTER_N);
                 break;
+                case NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter:
+                    // a, b, ...
+                    pSectionContext->SetPageNumberType(style::NumberingType::CHARS_LOWER_LETTER_N);
+                break;
                 }
             }
         break;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 69e4324..46a7329 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3289,7 +3289,6 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
     case RTF_PGNDEC:
     case RTF_PGNUCRM:
     case RTF_PGNLCRM:
-    case RTF_PGNLCLTR:
     case RTF_PGNBIDIA:
     case RTF_PGNBIDIB:
         // These should be mapped to NS_ooxml::LN_EG_SectPrContents_pgNumType, but dmapper has no API for that at the moment.
@@ -3613,6 +3612,12 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
         lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
     }
     break;
+    case RTF_PGNLCLTR:
+    {
+        auto pIntValue = std::make_shared<RTFValue>(NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter);
+        lcl_putNestedAttribute(m_aStates.top().aSectionSprms, NS_ooxml::LN_EG_SectPrContents_pgNumType, NS_ooxml::LN_CT_PageNumber_fmt, pIntValue);
+    }
+    break;
     default:
     {
         SAL_INFO("writerfilter", "TODO handle flag '" << lcl_RtfToString(nKeyword) << "'");
commit c1fcc9efe7f9a0aae158b9173236b2850ec64726
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Apr 4 12:26:11 2016 +0200

    tdf#99074 DOCX import: handle <w:view w:val="web"/>
    
    Instead of always using the Normal view, use the Web view when the DOCX
    file contains Web Layout.
    
    For this to work, expose sw's DocumentSettingId::BROWSE_MODE via
    css.document.Settings.
    
    Change-Id: I7787ca058d8cb8a346b2001a2bd70c3df86d8673
    Reviewed-on: https://gerrit.libreoffice.org/23806
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit e0f9bb795251d950b5dd960fcd030170c8eb67aa)

diff --git a/sw/qa/extras/ooxmlimport/data/tdf99074.docx b/sw/qa/extras/ooxmlimport/data/tdf99074.docx
new file mode 100644
index 0000000..d7be418
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf99074.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 1c026e6..1bd5a87 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -3208,6 +3208,14 @@ DECLARE_SW_IMPORT_TEST(testHFLinkToPrev, "headerfooter-link-to-prev.docx",
         OUString("Odd page footer for sections 2 and 3 only"));
 }
 
+DECLARE_OOXMLIMPORT_TEST(testTdf99074, "tdf99074.docx")
+{
+    uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+    uno::Reference<uno::XInterface> xSettings = xFactory->createInstance("com.sun.star.document.Settings");
+    // This was false, Web Layout was ignored on import.
+    CPPUNIT_ASSERT(getProperty<bool>(xSettings, "InBrowseMode"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 6964cba..1dad3e0 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -131,6 +131,7 @@ enum SwDocumentSettingsPropertyHandles
     HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING,
     HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE,
     HANDLE_SUBTRACT_FLYS,
+    HANDLE_BROWSE_MODE,
 };
 
 static MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -205,6 +206,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
         { OUString("ApplyParagraphMarkFormatToNumbering"), HANDLE_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING, cppu::UnoType<bool>::get(), 0},
         { OUString("PropLineSpacingShrinksFirstLine"),       HANDLE_PROP_LINE_SPACING_SHRINKS_FIRST_LINE,         cppu::UnoType<bool>::get(),           0},
         { OUString("SubtractFlysAnchoredAtFlys"),       HANDLE_SUBTRACT_FLYS,         cppu::UnoType<bool>::get(),           0},
+        { OUString("InBrowseMode"), HANDLE_BROWSE_MODE, cppu::UnoType<bool>::get(), 0},
 /*
  * As OS said, we don't have a view when we need to set this, so I have to
  * find another solution before adding them to this property set - MTG
@@ -845,6 +847,15 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
             }
         }
         break;
+        case HANDLE_BROWSE_MODE:
+        {
+            bool bTmp;
+            if (rValue >>= bTmp)
+            {
+                mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::BROWSE_MODE, bTmp);
+            }
+        }
+        break;
         default:
             throw UnknownPropertyException();
     }
@@ -1249,6 +1260,11 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::SUBTRACT_FLYS);
         }
         break;
+        case HANDLE_BROWSE_MODE:
+        {
+            rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE);
+        }
+        break;
         default:
             throw UnknownPropertyException();
     }
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index ddaa8b7..832c38b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5033,6 +5033,10 @@ void DomainMapper_Impl::ApplySettingsTable()
             if( m_pSettingsTable->GetEmbedSystemFonts())
                 xSettings->setPropertyValue( getPropertyName( PROP_EMBED_SYSTEM_FONTS ), uno::makeAny(true) );
             xSettings->setPropertyValue("AddParaTableSpacing", uno::makeAny(m_pSettingsTable->GetDoNotUseHTMLParagraphAutoSpacing()));
+
+            // Web Layout.
+            if (m_pSettingsTable->GetView() == NS_ooxml::LN_Value_doc_ST_View_web)
+                xSettings->setPropertyValue("InBrowseMode", uno::makeAny(true));
         }
         catch(const uno::Exception&)
         {
commit 4b0c0fe60c057782315de2468be327476c75fe91
Author: Andras Timar <andras.timar at collabora.com>
Date:   Tue Mar 8 14:34:24 2016 +0100

    s/LibreOffice/CollaboraOffice/
    
    Change-Id: Ia2de1634657ffd6e456c96042b124f8a6a3bd1d0
    (cherry picked from commit 4524204e78b2e9b8b95bce108a2951b530c54051)

diff --git a/Makefile.in b/Makefile.in
index 0905d68..c68ffe3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -307,37 +307,37 @@ ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 #
 # Create Resources/*.lproj directories for languages supported by OS X
 	set -x; for lang in ca cs da de el en es fi fr hr hu id it ja ko ms nl no pl pt pt_PT ro ru sk sv th tr uk vi zh_CN zh_TW; do \
-		lproj=$(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Resources/$$lang.lproj; \
+		lproj=$(TESTINSTALLDIR)/CollaboraOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Resources/$$lang.lproj; \
 		mkdir $$lproj; \
 	done
 #
 # And remove the "bin" folder which should not be there
-	rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin
+	rm -rf $(TESTINSTALLDIR)/CollaboraOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin
 #
 # Remove unnecessary executables in the LibreOfficePython framework
-	rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
+	rm -rf $(TESTINSTALLDIR)/CollaboraOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
 #
 # Remove the python.o object file which is weird and interferes with app store uploading
 # And with it removed, presumably the other stuff in the Python lib/python3.3/config-3.3m probably does not make sense either.
-	rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
+	rm -rf $(TESTINSTALLDIR)/CollaboraOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
 #
 ifneq ($ENABLE_MACOSX_SANDBOX),)
 # Remove the gengal.bin binary and unopkg script that we don't want
-	rm $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/gengal.bin
-	rm $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/unopkg
+	rm $(TESTINSTALLDIR)/CollaboraOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/gengal.bin
+	rm $(TESTINSTALLDIR)/CollaboraOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/unopkg
 endif
 #
 # Then use the macosx-codesign-app-bundle script
-	@$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app
+	@$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/CollaboraOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app
 endif
 endif
 	@$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR))
 
 mac-app-store-package: test-install
 ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),)
-	rm -rf "$(MACOSX_APP_NAME).app"
-	mv "$(TESTINSTALLDIR)/$(PRODUCTNAME).app" "$(MACOSX_APP_NAME).app"
-	productbuild --component "$(MACOSX_APP_NAME).app" /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(shell echo "$(MACOSX_APP_NAME)" | tr ' ' '-').pkg
+	rm -rf CollaboraOffice.app
+	mv "$(TESTINSTALLDIR)/CollaboraOffice.app" "CollaboraOffice.app"
+	productbuild --component "CollaboraOffice.app" /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) CollaboraOffice.pkg
 else
 	@echo You did not provide an installer signing identity with --enable-macosx-package-signing
 	@exit 1
commit bd12286c4e5b6f5f50d7355d1fb011ebc989b064
Author: Andras Timar <andras.timar at collabora.com>
Date:   Sun May 17 10:56:20 2015 +0200

    Don't build ui-previewer in the App Store case
    
    Conflicts:
    	vcl/Module_vcl.mk
    
    Change-Id: I1b095586b66fbbe582b0e7266609895bb288c6fb
    (cherry picked from commit bb431cd1e089aa5f4f7d28bdd07e594dacaaaf0d)

diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 3c7d5b4..edbd0c9 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -26,7 +26,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
 	Package_opengl_blacklist \
     $(if $(filter DESKTOP,$(BUILD_TYPE)), \
         StaticLibrary_vclmain \
-		$(if $(ENABLE_HEADLESS),, \
+		$(if $(ENABLE_MACOSX_SANDBOX),, \
 			Executable_ui-previewer) \
 		$(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
 			Executable_outdevgrind \
commit ae7f373dd32b2bfe71f324ddabfa17683eb03722
Author: Andras Timar <andras.timar at collabora.com>
Date:   Sun May 17 11:43:08 2015 +0200

    remove unopkg script from MacOSX folder of sandboxed app
    
    Change-Id: Ib59953225480e6923e418b966cce289f07f863b5
    (cherry picked from commit 5b004e8ab7c5c6780e339d92bb111fe94aba2b61)

diff --git a/Makefile.in b/Makefile.in
index 6d53907..0905d68 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -322,8 +322,9 @@ ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 	rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
 #
 ifneq ($ENABLE_MACOSX_SANDBOX),)
-# Remove the gengal.bin binary that we don't want
+# Remove the gengal.bin binary and unopkg script that we don't want
 	rm $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/gengal.bin
+	rm $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/unopkg
 endif
 #
 # Then use the macosx-codesign-app-bundle script
commit 03b4369c787de28a341839444882e53669599e40
Author: Tor Lillqvist <tml at collabora.com>
Date:   Tue Sep 23 00:27:58 2014 +0300

    We need the gengal program at build time
    
    But don't bother shipping it on OS X, at least not in the sandboxed
    (App Store) case.
    
    (cherry picked from commit 11b4f4bfbee257d63f6a52808fb02b903ddea0d5)
    
    Conflicts:
    	Makefile.in
    	Repository.mk
    
    Conflicts:
    	Makefile.in
    
    (cherry picked from commit ff489b6161654d378c70ed5e3f6be82e24ec09c9)
    
    Change-Id: Id73bef1ba71d126c2d2962fe846e9c31963d6c24

diff --git a/Makefile.in b/Makefile.in
index 7ceabf3..6d53907 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -313,6 +313,20 @@ ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
 #
 # And remove the "bin" folder which should not be there
 	rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin
+#
+# Remove unnecessary executables in the LibreOfficePython framework
+	rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
+#
+# Remove the python.o object file which is weird and interferes with app store uploading
+# And with it removed, presumably the other stuff in the Python lib/python3.3/config-3.3m probably does not make sense either.
+	rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
+#
+ifneq ($ENABLE_MACOSX_SANDBOX),)
+# Remove the gengal.bin binary that we don't want
+	rm $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/gengal.bin
+endif
+#
+# Then use the macosx-codesign-app-bundle script
 	@$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app
 endif
 endif
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index ab26b9f..67dbe01 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -37,7 +37,6 @@ $(eval $(call gb_Module_add_check_targets,svx,\
 ))
 
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
-ifeq (,$(ENABLE_MACOSX_SANDBOX))
 $(eval $(call gb_Module_add_targets,svx,\
     Executable_gengal \
     $(if $(filter-out WNT,$(OS)), \
@@ -45,7 +44,6 @@ $(eval $(call gb_Module_add_targets,svx,\
         Executable_pixelctl) \
 ))
 endif
-endif
 
 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,svx,\
commit f56af595612206ca04c1799d6b3b7dca5757a6f4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Sep 20 01:01:09 2014 +0300

    Skip some executables in the OS X sandboxed (Mac App Store) case
    
    I doubt end-users will miss gengal.bin, regview, or regmerge.
    
    (cherry picked from commit beb30bbd867f9a28878e0d004458c3507f6c0956)
    
    Conflicts:
    	Repository.mk
    
    (cherry picked from commit 72e8d549fae0aa6278a6b2d64cf65d4df8f27f94)
    
    Change-Id: I353610c0d039f25fa415f35902fe2b9890cd423f

diff --git a/Repository.mk b/Repository.mk
index 101334b..b94eec6 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -190,8 +190,10 @@ endif
 
 $(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\
 	$(if $(and $(ENABLE_JAVA),$(filter-out MACOSX WNT,$(OS)),$(filter DESKTOP,$(BUILD_TYPE))),javaldx) \
-	regmerge \
-	regview \
+	$(if $(ENABLE_MACOSX_SANDBOX),, \
+		regmerge \
+		regview \
+	) \
 	$(if $(filter DESKTOP,$(BUILD_TYPE)),uno) \
 ))
 
diff --git a/registry/Module_registry.mk b/registry/Module_registry.mk
index fb962c6..5f70ed9 100644
--- a/registry/Module_registry.mk
+++ b/registry/Module_registry.mk
@@ -12,8 +12,10 @@ $(eval $(call gb_Module_Module,registry))
 $(eval $(call gb_Module_add_targets,registry,\
 	Library_reg \
 	$(if $(filter-out $(OS),IOS), \
-		Executable_regmerge \
-		Executable_regview \
+		$(if $(ENABLE_MACOSX_SANDBOX),, \
+			Executable_regmerge \
+			Executable_regview \
+		) \
 		StaticLibrary_registry_helper \
 	) \
 ))
diff --git a/svx/Module_svx.mk b/svx/Module_svx.mk
index 67dbe01..ab26b9f 100644
--- a/svx/Module_svx.mk
+++ b/svx/Module_svx.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_check_targets,svx,\
 ))
 
 ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
+ifeq (,$(ENABLE_MACOSX_SANDBOX))
 $(eval $(call gb_Module_add_targets,svx,\
     Executable_gengal \
     $(if $(filter-out WNT,$(OS)), \
@@ -44,6 +45,7 @@ $(eval $(call gb_Module_add_targets,svx,\
         Executable_pixelctl) \
 ))
 endif
+endif
 
 ifneq ($(OOO_JUNIT_JAR),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,svx,\
commit 274ac175a33730503815d998fd596bfabc4666fc
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Sep 21 23:55:38 2014 +0300

    We don't build the Apple Remote code when sandboxed
    
    So no need for the related entitlements.
    
    Change-Id: I54ba7c0586ee77f30096b50755a9a85bbb7965a5
    (cherry picked from commit a1379c6d2555c77b1b096165ac2aab42808e90a7)
    (cherry picked from commit d0f39bc3b82e4835ede9b136e81ff2e18bd12cd6)

diff --git a/lo.xcent.in b/lo.xcent.in
index 9b1f028..02d8929 100644
--- a/lo.xcent.in
+++ b/lo.xcent.in
@@ -18,13 +18,6 @@
 	<true/>
 	<key>com.apple.security.device.bluetooth</key>
 	<true/>
-	<!-- usb needed for the apple_remote thingie... -->
-	<key>com.apple.security.device.usb</key>
-	<true/>
-	<key>com.apple.security.temporary-exception.apple-events</key>
-	<array>
-		<string>mac.remotecontrols</string>
-	</array>
 	<key>com.apple.security.print</key>
 	<true/>
 </dict>


More information about the Libreoffice-commits mailing list