[Libreoffice-commits] core.git: Branch 'distro/collabora/lov-5.2' - 11 commits - avmedia/Library_avmedia.mk chart2/Library_chartcore.mk chart2/Module_chart2.mk config_host.mk.in configure.ac cui/Library_cui.mk icon-themes/sifr instsetoo_native/util Makefile.in postprocess/CustomTarget_registry.mk postprocess/Rdb_services.mk registry/Module_registry.mk sc/inc scp2/InstallModule_impress.mk scp2/source slideshow/Library_slideshow.mk slideshow/Module_slideshow.mk solenv/bin svl/source svx/Library_svxcore.mk sw/qa sw/source sysui/desktop toolkit/Library_tk.mk vcl/CppunitTest_vcl_bitmap_test.mk vcl/Executable_icontest.mk vcl/Executable_vcldemo.mk vcl/Library_vcl.mk writerfilter/source

Yousuf Philips philipz85 at hotmail.com
Fri Aug 5 09:23:26 UTC 2016


 Makefile.in                                        |   24 ++--
 avmedia/Library_avmedia.mk                         |    2 
 chart2/Library_chartcore.mk                        |    8 -
 chart2/Module_chart2.mk                            |    2 
 config_host.mk.in                                  |    4 
 configure.ac                                       |   35 ++---
 cui/Library_cui.mk                                 |    2 
 icon-themes/sifr/links.txt                         |    4 
 instsetoo_native/util/openoffice.lst.in            |    2 
 postprocess/CustomTarget_registry.mk               |    2 
 postprocess/Rdb_services.mk                        |    8 -
 registry/Module_registry.mk                        |    3 
 sc/inc/global.hxx                                  |    6 -
 scp2/InstallModule_impress.mk                      |    2 
 scp2/source/ooo/directory_ooo_macosx.scp           |    2 
 slideshow/Library_slideshow.mk                     |    2 
 slideshow/Module_slideshow.mk                      |    2 
 solenv/bin/macosx-codesign-app-bundle              |  123 ++++++++++-----------
 solenv/bin/ooinstall                               |    2 
 svl/source/numbers/zforscan.cxx                    |    8 +
 svx/Library_svxcore.mk                             |    2 
 sw/qa/extras/rtfimport/data/tdf78506.rtf           |   24 ++++
 sw/qa/extras/rtfimport/rtfimport.cxx               |   17 ++
 sw/source/core/text/itrcrsr.cxx                    |    1 
 sw/source/core/text/porfly.cxx                     |    5 
 sw/source/core/text/porfly.hxx                     |    1 
 sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx |    8 -
 sysui/desktop/macosx/Info.plist.in                 |    4 
 toolkit/Library_tk.mk                              |    2 
 vcl/CppunitTest_vcl_bitmap_test.mk                 |    2 
 vcl/Executable_icontest.mk                         |    2 
 vcl/Executable_vcldemo.mk                          |    2 
 vcl/Library_vcl.mk                                 |    2 
 writerfilter/source/rtftok/rtfdispatchvalue.cxx    |    3 
 writerfilter/source/rtftok/rtfdocumentimpl.cxx     |   20 +++
 writerfilter/source/rtftok/rtfdocumentimpl.hxx     |    2 
 36 files changed, 212 insertions(+), 128 deletions(-)

New commits:
commit d44099706c4981cfcaa10943e6d380827599cce2
Author: Yousuf Philips <philipz85 at hotmail.com>
Date:   Thu Aug 4 13:50:33 2016 +0400

    Sifr: Add thesaurus duplicate to links.txt
    
    Change-Id: I0cfecbef999bb251c1fd8829aed0a4f0268e176c
    Reviewed-on: https://gerrit.libreoffice.org/27870
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Yousuf Philips <philipz85 at hotmail.com>
    (cherry picked from commit c63aaa624aa6e949e127fb8ef00c4f3744c72b76)
    Reviewed-on: https://gerrit.libreoffice.org/27876
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit c3a84517466820386aaf43193052ffe027f637aa)

diff --git a/icon-themes/sifr/links.txt b/icon-themes/sifr/links.txt
index dc1e369..c17cb57 100644
--- a/icon-themes/sifr/links.txt
+++ b/icon-themes/sifr/links.txt
@@ -54,6 +54,10 @@ sc/imglst/nc06.png cmd/sc_insertannotation.png
 sc/imglst/nc08.png cmd/sc_insertdraw.png
 sc/res/table.png cmd/sc_inserttable.png
 
+# Thesaurus
+cmd/lc_thesaurusdialog.png cmd/lc_thesaurus.png
+cmd/sc_thesaurusdialog.png cmd/sc_thesaurus.png
+
 # File Menu
 cmd/sc_exporttopdf.png cmd/sc_exportdirecttopdf.png
 
commit a6a06cf5e4be5b077f6809190cb72243870441a9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Aug 4 12:37:30 2016 +0200

    tdf#78506 RTF import: fix handling of invalid \levelnumbers
    
    In case ';' is written in \u form in \levelnumbers, then Word ignores the whole
    \levelnumbers contents, do the same.
    
    (cherry picked from commit 428a1da60b88415e7db21353a42bed85b8b76ed9)
    
    Change-Id: I93ce5810af2b5ed703e804199c0b236d2c4c36b5
    Reviewed-on: https://gerrit.libreoffice.org/27873
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 100321e9b39687e8021763ee0aec95de856c497c)

diff --git a/sw/qa/extras/rtfimport/data/tdf78506.rtf b/sw/qa/extras/rtfimport/data/tdf78506.rtf
new file mode 100644
index 0000000..2978734
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/tdf78506.rtf
@@ -0,0 +1,24 @@
+{\rtf \ansi \ansicpg0 \deff0 \stshfdbch1 \stshfloch0 \stshfhich0 \deflang1033 \deflangfe1033 
+{\*\listtable 
+{\list \listtemplateid700648999 \listhybrid 
+{\listlevel \levelnfc0 \levelnfcn0 \leveljc0 \leveljcn0 \levelstartat1 \levelfollow0 \levelspace0 \levelindent0 \levellegal0 \levelnorestart0
+{\leveltext
+{\uc1 \u2 ?}
+{\uc1 \u0 ?}
+{\uc1 \u46 ?}
+{\uc1 \u59 ?}
+}
+{\levelnumbers \'01
+{\uc1 \u59 ?}
+}
+\li720 \lin720 \fi-360 }
+{\listname ;}
+\listid697112958 }
+}
+{\*\listoverridetable 
+{\listoverride \listid697112958 \listoverridecount0 \ls1 }
+}
+\pard \plain \ls1
+Test.
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 73096c8..1f2a7fb 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2661,6 +2661,23 @@ DECLARE_RTFIMPORT_TEST(testFlip, "flip.rtf")
     CPPUNIT_ASSERT(!aMap["MirroredY"].hasValue());
 }
 
+DECLARE_RTFIMPORT_TEST(testTdf78506, "tdf78506.rtf")
+{
+    uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+    uno::Sequence<beans::PropertyValue> aProps;
+    xLevels->getByIndex(0) >>= aProps; // 1sd level
+
+    for (int i = 0; i < aProps.getLength(); ++i)
+    {
+        const beans::PropertyValue& rProp = aProps[i];
+
+        if (rProp.Name == "Suffix")
+            // This was '0', invalid \levelnumbers wasn't ignored.
+            CPPUNIT_ASSERT_EQUAL(CHAR_ZWSP, rProp.Value.get<OUString>().toChar());
+    }
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
index 4302f27..dfd9dff 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -627,6 +627,9 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
             {
                 if (nParam != ';')
                     m_aStates.top().aLevelNumbers.push_back(sal_Int32(nParam));
+                else
+                    // ';' in \u form is not considered valid.
+                    m_aStates.top().bLevelNumbersValid = false;
             }
             else
                 m_aUnicodeBuffer.append(static_cast<sal_Unicode>(nParam));
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 9dc5f79..8268a2f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2004,11 +2004,16 @@ RTFError RTFDocumentImpl::popState()
     }
     break;
     case Destination::LEVELNUMBERS:
-        if (aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_lvlText))
+    {
+        bool bNestedLevelNumbers = false;
+        if (m_aStates.size() > 1)
+            // Current destination is levelnumbers and parent destination is levelnumbers as well.
+            bNestedLevelNumbers = m_aStates[m_aStates.size() - 2].eDestination == Destination::LEVELNUMBERS;
+        if (!bNestedLevelNumbers && aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_lvlText))
         {
             RTFSprms& rAttributes = aState.aTableSprms.find(NS_ooxml::LN_CT_Lvl_lvlText)->getAttributes();
             RTFValue::Pointer_t pValue = rAttributes.find(NS_ooxml::LN_CT_LevelText_val);
-            if (pValue)
+            if (pValue && aState.bLevelNumbersValid)
             {
                 OUString aOrig = pValue->getString();
 
@@ -2029,8 +2034,12 @@ RTFError RTFDocumentImpl::popState()
 
                 pValue->setString(aBuf.makeStringAndClear());
             }
+            else if (pValue)
+                // Have a value, but levelnumbers is not valid -> ignore it.
+                pValue->setString(OUString());
         }
         break;
+    }
     case Destination::SHAPEPROPERTYNAME:
         if (&m_aStates.top().aDestinationText != m_aStates.top().pDestinationText)
             break; // not for nested group
@@ -2911,7 +2920,13 @@ RTFError RTFDocumentImpl::popState()
         break;
     case Destination::LEVELNUMBERS:
         if (!m_aStates.empty())
+        {
             m_aStates.top().aTableSprms = aState.aTableSprms;
+            if (aState.eDestination == Destination::LEVELNUMBERS)
+                // Both current and parent state is levelnumbers: mark parent
+                // as invalid as well if necessary.
+                m_aStates.top().bLevelNumbersValid = aState.bLevelNumbersValid;
+        }
         break;
     case Destination::FIELDINSTRUCTION:
         if (!m_aStates.empty())
@@ -3168,6 +3183,7 @@ RTFParserState::RTFParserState(RTFDocumentImpl* pDocumentImpl)
       nListLevelNum(0),
       aListLevelEntries(),
       aLevelNumbers(),
+      bLevelNumbersValid(true),
       aPicture(),
       aShape(),
       aDrawingObject(),
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
index 8f20e6b..8870737 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx
@@ -258,6 +258,8 @@ public:
 
     /// List of character positions in leveltext to replace.
     std::vector<sal_Int32> aLevelNumbers;
+    /// If aLevelNumbers should be read at all.
+    bool bLevelNumbersValid;
 
     RTFPicture aPicture;
     RTFShape aShape;
commit c6f2b65dba7c22b5b9d75b39fc02f3b1a2aac34a
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Wed Aug 3 11:56:16 2016 +0200

    tdf#101147 New approach to fix minute/month detection
    
    Other formats may be differently interpreted
    HH YY/MM => Month expected
    HH DD/MM => Month expected
    
    Change-Id: Iabb17911bf2907c02b6b898052b6933692f8074a
    Reviewed-on: https://gerrit.libreoffice.org/27886
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit 85badce0b8dce3c1c1cc4b7af2d71ec2ff8da4ef)

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 7e4b259..228afe7 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1162,6 +1162,8 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
                    That are the Excel rules. BUT, we break it because certainly
                    in something like {HH YYYY-MM-DD} the MM is NOT meant to be
                    minute, so not if MM is between YY and DD or DD and YY.
+                   Actually not if any date specific keyword followed a time
+                   setting keyword.
                 */
                 nIndexPre = PreviousKeyword(i);
                 nIndexNex = NextKeyword(i);
@@ -1169,12 +1171,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
                     nIndexPre == NF_KEY_HH  ||      // HH
                     nIndexNex == NF_KEY_S   ||      // S
                     nIndexNex == NF_KEY_SS  ||      // SS
-                    (bIsTimeDetected &&
-                     !(((nIndexPre == NF_KEY_YY || nIndexPre == NF_KEY_YYYY) &&
-                        (nIndexNex == NF_KEY_D  || nIndexNex == NF_KEY_DD)) ||
-                       ((nIndexPre == NF_KEY_D  || nIndexPre == NF_KEY_DD) &&
-                        (nIndexNex == NF_KEY_YY || nIndexNex == NF_KEY_YYYY)))
-                    )                       ||      // tdf#101147
+                    bIsTimeDetected         ||      // tdf#101147
                     PreviousChar(i) == '['  )       // [M
                 {
                     eNewType = css::util::NumberFormat::TIME;
@@ -1212,6 +1209,7 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
             case NF_KEY_R :                         // R
             case NF_KEY_RR :                        // RR
                 eNewType = css::util::NumberFormat::DATE;
+                bIsTimeDetected = false;
                 break;
             case NF_KEY_CCC:                        // CCC
                 eNewType = css::util::NumberFormat::CURRENCY;
commit ac84afdc1b6291bd87d3585904b9486ee2e70a97
Author: Eike Rathke <erack at redhat.com>
Date:   Tue Aug 2 23:46:22 2016 +0200

    break the Excel rule for YMD and DMY, tdf#101147 follow-up
    
    Clearly in {HH YYYY-MM-DD} the MM should not be minute. Also not in
    {HH DD.MM.YY}. Don't follow every bullshit. Period.
    
    It is debatable how to treat MDY, {HH:MM DD/YY} should be different from
    {HH MM/DD/YY}, Excel ironically takes both as minute, even in an en-US locale.
    
    (cherry picked from commit 88134dcba680418496f7a1c70a47fde0159ce390)
    
     Conflicts:
    	svl/qa/unit/svl.cxx
    
    Change-Id: I13d39a36294e3c40cc0e9bf72026804b299bb264
    Reviewed-on: https://gerrit.libreoffice.org/27813
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 0b168901ed5e767651262686af65994029b3039b)

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 37ec6db..7e4b259 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -1156,9 +1156,12 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
                    Minute if one of:
                    * preceded by time keyword H (ignoring separators)
                    * followed by time keyword S (ignoring separators)
-                   * H or S was detected
+                   * H or S was detected and this is the first M following
                    * preceded by '[' amount bracket
                    Else month.
+                   That are the Excel rules. BUT, we break it because certainly
+                   in something like {HH YYYY-MM-DD} the MM is NOT meant to be
+                   minute, so not if MM is between YY and DD or DD and YY.
                 */
                 nIndexPre = PreviousKeyword(i);
                 nIndexNex = NextKeyword(i);
@@ -1166,7 +1169,12 @@ sal_Int32 ImpSvNumberformatScan::ScanType()
                     nIndexPre == NF_KEY_HH  ||      // HH
                     nIndexNex == NF_KEY_S   ||      // S
                     nIndexNex == NF_KEY_SS  ||      // SS
-                    bIsTimeDetected         ||      // tdf#101147
+                    (bIsTimeDetected &&
+                     !(((nIndexPre == NF_KEY_YY || nIndexPre == NF_KEY_YYYY) &&
+                        (nIndexNex == NF_KEY_D  || nIndexNex == NF_KEY_DD)) ||
+                       ((nIndexPre == NF_KEY_D  || nIndexPre == NF_KEY_DD) &&
+                        (nIndexNex == NF_KEY_YY || nIndexNex == NF_KEY_YYYY)))
+                    )                       ||      // tdf#101147
                     PreviousChar(i) == '['  )       // [M
                 {
                     eNewType = css::util::NumberFormat::TIME;
commit 1520b7164fd5cac71ba9dd0307a46bd0377157c4
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 4 08:50:57 2016 +0100

    Resolves: tdf#101269 cannot click/edit text inside a frame
    
    regression from...
    
    commit b0c0a074a2318a231f3f635784da494f1b713c53
    Date:   Mon Apr 18 11:03:43 2016 +0200
    
        clang-tidy clang-analyzer-deadcode.DeadStores
    
        suspect that some of these may reveal latent bugs....
    
    and restore method then removed by
    
    commit 47f62540bd2c2f107313bb0c6f141cd4460b6379
    Date:   Thu May 19 10:31:47 2016 +0200
    
        loplugin:unusedmethods in sw
    
    Change-Id: I14826eecadbc1a74e408f8907eea8746debe4db4
    (cherry picked from commit 24c009de4d6d27233027e9bcd86ea181d230be8f)
    
    pPos can never be null
    
    Change-Id: Ib7b57d628fbd80a1d2214917cd439e09d4803d91
    (cherry picked from commit 2702796806cae2b28ae78e78d29c3559bf97607e)
    
    SwLinePortion::GetCursorOfst is const and its ret is ignored here
    
    so nOfst is unnecessary
    
    Change-Id: I27f73057b55ebdf30eb69a19ee1b0647ba25583e
    (cherry picked from commit 35f4248206e844cabd83757ec57ddde1c2ef66b4)
    
    only called if !bDraw
    
    Change-Id: I7310b5f8cbbc4176e76d92ce2bcd49168470843c
    (cherry picked from commit cc7a55450658696009fe01e94632e80bb3785d5b)
    
    the sole caller is ok with rPoint being modified, so change to non-const arg
    
    Change-Id: I40a24502e2e8ad312e13e0c47ee1fde3118d2251
    (cherry picked from commit 2b3112b30a8dea8a009c11ddb209e12697f72e32)
    Reviewed-on: https://gerrit.libreoffice.org/27865
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 5703c3bdf1f4b60067207993f9f42430d9901e1c)

diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 3f8acaa..b6f9928 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1713,6 +1713,7 @@ sal_Int32 SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoint,
                 if( bChgNodeInner && pTmp->Frame().IsInside( aTmpPoint ) &&
                     !( pTmp->IsProtected() ) )
                 {
+                    static_cast<SwFlyCntPortion*>(pPor)->GetFlyCursorOfst(aTmpPoint, *pPos, pCMS);
                     // After a change of the frame, our font must be still
                     // available for/in the OutputDevice.
                     // For comparison: Paint and new SwFlyCntPortion !
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 0eca9ca..e38e99d 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -414,6 +414,11 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase,
     }
 }
 
+void SwFlyCntPortion::GetFlyCursorOfst(Point &rPoint, SwPosition &rPos, SwCursorMoveState* pCMS) const
+{
+    GetFlyFrame()->GetCursorOfst(&rPos, rPoint, pCMS);
+}
+
 sal_Int32 SwFlyCntPortion::GetCursorOfst( const sal_uInt16 nOfst ) const
 {
     // OSL_FAIL("SwFlyCntPortion::GetCursorOfst: use GetFlyCursorOfst()");
diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx
index 417c347..129bf39 100644
--- a/sw/source/core/text/porfly.hxx
+++ b/sw/source/core/text/porfly.hxx
@@ -79,6 +79,7 @@ public:
                   long nLnAscent, long nLnDescent,
                   long nFlyAscent, long nFlyDescent,
                   AsCharFlags nFlags );
+    void GetFlyCursorOfst(Point &rPoint, SwPosition& rPos, SwCursorMoveState* pCMS) const;
     virtual bool Format( SwTextFormatInfo &rInf ) override;
     virtual void Paint( const SwTextPaintInfo &rInf ) const override;
     OUTPUT_OPERATOR_OVERRIDE
commit 9b11ac26d03374ab00bb75699f260d41b53e36f6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 3 20:10:05 2016 +0200

    add more nullptr checks, related tdf#100820
    
    See
    http://crashreport.libreoffice.org/stats/crash_details/8569250c-b04a-43b0-b4b8-4b3a94daffe1
    
    Change-Id: I9070be3db57e77befe70c0a32ef6aa54c6c1cf85
    Reviewed-on: https://gerrit.libreoffice.org/27842
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit 626a1aa960ed36f5c3370e2aab1e72d41df875cf)
    Reviewed-on: https://gerrit.libreoffice.org/27859
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 4fcb04ba5a127cd960ec65fc7788a51b13d3e036)

diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
index 3a23913..3c4e2cc 100644
--- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
+++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
@@ -205,7 +205,7 @@ uno::Reference<awt::XWindow> MMCurrentEntryController::createItemWindow(const un
 IMPL_LINK_TYPED(MMCurrentEntryController, CurrentEditUpdatedHdl, Edit&, rEdit, void)
 {
     SwView* pView = ::GetActiveView();
-    SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
+    SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
 
     if (!pConfigItem)
         return;
@@ -226,7 +226,7 @@ void MMCurrentEntryController::statusChanged(const frame::FeatureStateEvent& rEv
         return;
 
     SwView* pView = ::GetActiveView();
-    SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
+    SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
 
     if (!pConfigItem || !rEvent.IsEnabled)
     {
@@ -277,7 +277,7 @@ uno::Reference<awt::XWindow> MMExcludeEntryController::createItemWindow(const un
 IMPL_STATIC_LINK_TYPED(MMExcludeEntryController, ExcludeHdl, CheckBox&, rCheckbox, void)
 {
     SwView* pView = ::GetActiveView();
-    SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
+    SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
 
     if (pConfigItem)
         pConfigItem->ExcludeRecord(pConfigItem->GetResultSetPosition(), rCheckbox.IsChecked());
@@ -289,7 +289,7 @@ void MMExcludeEntryController::statusChanged(const frame::FeatureStateEvent& rEv
         return;
 
     SwView* pView = ::GetActiveView();
-    SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
+    SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
 
     if (!pConfigItem || !rEvent.IsEnabled)
     {
commit 25da69c56a0296e1ada599f57bce6aac798c4d50
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 3 16:14:03 2016 +0100

    Resolves: tdf#97193 restore pre 5-1 values for INS_INSROWS and INS_INSCOLS
    
    i.e. INS_INSCOLS_BEFORE and INS_INSROWS_BEFORE have the same
    meaning as the old INS_INSROWS and INS_INSCOWS, so reorder the enum
    so they are at the positions of their corresponding originals.
    
    This makes macros recorded before 5-1 work like they did prior to 5-1-0.
    This unfortunately will have the same effect to macros recorded during
    the 5-1 period that the original change did.
    
    regression since...
    
    commit f97beeef352fdd9fd4f157a7a4c4f6af8341cbe6
    Date:   Wed May 20 16:54:27 2015 +0200
    
        Calc: Insert row/col before/after [1/2]
    
        This part renames all INSROW / INSCOL to
        INSROWS_BEFORE / INSCOLS_BEFORE which is
        the current (default) behaviour.
    
    Change-Id: Ide90b8cfebe4af1a3718d93c34657663c20ccc62
    (cherry picked from commit 7ec4a495291c7427bba5256bf2c54f1da999ea52)
    Reviewed-on: https://gerrit.libreoffice.org/27834
    Reviewed-by: jan iversen <jani at documentfoundation.org>
    Tested-by: jan iversen <jani at documentfoundation.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    (cherry picked from commit 7d7386bd5476dfe761978684715d3008b12701dd)

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index d06d58b..9c1bb5e 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -275,10 +275,10 @@ enum InsCellCmd
         INS_CELLSDOWN,
         INS_CELLSRIGHT,
         INS_INSROWS_BEFORE,
-        INS_INSROWS_AFTER,
         INS_INSCOLS_BEFORE,
-        INS_INSCOLS_AFTER,
-        INS_NONE
+        INS_NONE,
+        INS_INSROWS_AFTER,
+        INS_INSCOLS_AFTER
     };
 
 enum UpdateRefMode
commit 6dde7bf7c78969adfe13ed98bc020caef95a5e9c
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 4 17:32:29 2016 +0300

    Update to match what has been used for the products in the Mac App Store
    
    Hopefully will not break building for a dmg-stye distribution.
    
    Change-Id: Ibf32bb8e43fe4745461eb78e9e7e60d37163934f

diff --git a/solenv/bin/macosx-codesign-app-bundle b/solenv/bin/macosx-codesign-app-bundle
index 37245c1..e7942eb 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -1,9 +1,8 @@
 #!/bin/bash
 
-# Script to sign dylibs and frameworks in an app bundle plus the
-# bundle itself. Called from
-# installer::simplepackage::create_package() in
-# solenv/bin/modules/installer/simplepackage.pm
+# Script to sign executables, dylibs and frameworks in an app bundle
+# plus the bundle itself. Called from
+# the test-install target in Makefile.in
 
 test `uname` = Darwin || { echo This is for OS X only; exit 1; }
 
@@ -19,91 +18,97 @@ for V in \
     fi
 done
 
-echo "codesigning using MACSOX_CODESIGNING_IDENTITY=[${MACOSX_CODESIGNING_IDENTITY?}]"
-
 APP_BUNDLE="$1"
 
+if test -n "$ENABLE_MACOSX_SANDBOX"; then
+    # In a sandboxed build executables need the entitlements
+    entitlements="--entitlements $BUILDDIR/lo.xcent"
+    # We use --enable-canonical-installation-tree-structure so all
+    # data files in Resources are included in the app bundle signature
+    # through that. I think.
+    other_files=''
+else
+    # In a non-sandboxed build (distributed outside the App Store)
+    # we traditionally have use --resource-rules. Let's not touch that?
+    resource_rules="--resource-rules $SRCDIR/setup_native/source/mac/CodesignRules.plist"
+    # And there we then want to sign data files, too, hmm.
+    other_files="\
+ -or -name '*.fodt' -or -name 'schema.strings' -or -name 'schema.xml' \
+ -or -name '*.jar' -or -name '*.jnilib' -or -name 'LICENSE' -or -name 'LICENSE.html' \
+ -or -name '*.applescript' -or -name '*.odt'"
+fi
+
 # Sign dylibs
 #
-# Executables get signed right after linking, see
-# solenv/gbuild/platform/macosx.mk. But many of our dylibs are built
-# by ad-hoc or 3rd-party mechanisms, so we can't easily sign them
-# right after linking. So do it here.
-#
 # The dylibs in the Python framework are called *.so. Go figure
 #
 # On Mavericks also would like to have data files signed...
 # add some where it makes sense. Make a depth-first search to sign the contents
 # of e.g. the spotlight plugin before attempting to sign the plugin itself
 
-find -d "$APP_BUNDLE" \( -name '*.dylib' -or -name '*.so' -or -name '*.fodt' -or -name '*.odt' \
-        -or -name 'schema.strings' -or -name 'schema.xml' -or -name '*.mdimporter' \
-        -or -name '*.jar' -or -name '*.jnilib' -or -name 'LICENSE' -or -name 'LICENSE.html' \
-        -or -name '*.applescript' \) ! -type l | grep -v "LibreOfficePython\.framework" | \
+find "$APP_BUNDLE" \( -name '*.dylib' -or -name '*.dylib.*' -or -name '*.so' \
+        $other_files \) ! -type l |
 while read file; do
     id=`echo ${file#${APP_BUNDLE}/Contents/} | sed -e 's,/,.,g'`
     codesign --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$file" || exit 1
 done
 
-find "$APP_BUNDLE" -name '*.dylib.*' ! -type l | \
-while read dylib; do \
-    id=`basename "$dylib"`; \
-    id=`echo $id | sed -e 's/dylib.*/dylib/'`; \
-    codesign --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$dylib" || exit 1
+# Sign executables
+
+find "$APP_BUNDLE/Contents/MacOS" -type f |
+while read file; do
+    id=`echo ${file#${APP_BUNDLE}/Contents/} | sed -e 's,/,.,g'`
+    codesign --force --verbose --identifier=$MACOSX_BUNDLE_IDENTIFIER.$id --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$file"
 done
 
-# The executables have already been signed by
-# gb_LinkTarget__command_dynamiclink in
-# solenv/gbuild/platform/macosx.mk, but sign the handful of scripts remaining
-# in MacOS
-# (<https://developer.apple.com/library/mac/technotes/tn2206/_index.html> "OS X
-# Code Signing In Depth" suggests we should get rid of them rather sooner than
-# later, but they appear to be OK for now):
-
-for i in python senddoc unoinfo
-do
-    if [ -f "$APP_BUNDLE/Contents/MacOS/$i" ]
-    then
-        codesign --verbose --identifier="$MACOSX_BUNDLE_IDENTIFIER.$i" \
-            --sign "$MACOSX_CODESIGNING_IDENTITY" "$APP_BUNDLE/Contents/MacOS/$i" \
-        || exit 1
-    fi
+# Sign included bundles. First .app ones (i.e. the Python.app inside
+# the LibreOfficePython.framework. Be generic for kicks...)
+
+find "$APP_BUNDLE" -name '*.app' -type d |
+while read app; do
+    fn=`basename "$app"`
+    fn=${fn%.*}
+    # Assume the app has a XML (and not binary) Info.plist
+    id=`grep -A 1 '<key>CFBundleIdentifier</key>' $app/Contents/Info.plist | tail -1 | sed -e 's,.*<string>,,' -e 's,</string>.*,,'`
+    codesign --verbose --identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$app"
 done
 
-# Sign frameworks.
-#
-# Yeah, we don't bundle any other framework than our Python one, and
-# it has just one version, so this generic search is mostly for
-# completeness.
+# Then .framework ones. Again, be generic just for kicks.
 
-find "$APP_BUNDLE" -name '*.framework' -type d -print0 | \
-while IFS= read -r -d '' framework; do \
-    fn=$(basename "$framework")
+find "$APP_BUNDLE" -name '*.framework' -type d |
+while read framework; do
+    fn=`basename "$framework"`
     fn=${fn%.*}
-    for version in "$framework"/Versions/*; do \
+    for version in "$framework"/Versions/*; do
         if test ! -L "$version" -a -d "$version"; then
-            codesign --force --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. --sign "$MACOSX_CODESIGNING_IDENTITY" "$version/$fn" || exit 1
-            codesign --force --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. --sign "$MACOSX_CODESIGNING_IDENTITY" "$version" || exit 1
-        fi; \
-    done; \
+	    # Assume the framework has a XML (and not binary) Info.plist
+	    id=`grep -A 1 '<key>CFBundleIdentifier</key>' $version/Resources/Info.plist | tail -1 | sed -e 's,.*<string>,,' -e 's,</string>.*,,'`
+            codesign --verbose --identifier=$id --sign "$MACOSX_CODESIGNING_IDENTITY" "$version"
+        fi
+    done
+done
+
+# Then mdimporters
+
+find "$APP_BUNDLE" -name '*.mdimporter' -type d |
+while read bundle; do
+    codesign --verbose --prefix=$MACOSX_BUNDLE_IDENTIFIER. --sign "$MACOSX_CODESIGNING_IDENTITY" "$bundle"
 done
 
-# Sign the app bundle as a whole which means finally signing the
-# CFBundleExecutable from Info.plist, i.e. soffice (which is exempted from the
-# on-the-go executable signing in gb_LinkTarget__command_dynamiclink in
-# solenv/gbuild/platform/macosx.mk), plus the contents
+# Sign the app bundle as a whole which means (re-)signing the
+# CFBundleExecutable from Info.plist, i.e. soffice, plus the contents
 # of the Resources tree (which unless you used
 # --enable-canonical-installation-tree-structure is not much, far from
 # all of our non-code "resources").
 #
 # At this stage we also attach the entitlements in the sandboxing case
+#
+# Also omit some files from the Bundle's seal via the resource-rules
+# (bootstraprc and similar that the user might adjust and image files)
+# See also https://developer.apple.com/library/mac/technotes/tn2206/
 
 id=`echo ${PRODUCTNAME} | tr ' ' '-'`
 
-if test -n "$ENABLE_MACOSX_SANDBOX"; then
-    entitlements="--entitlements $BUILDDIR/lo.xcent"
-fi
-
-codesign --force --verbose --identifier="${MACOSX_BUNDLE_IDENTIFIER}.$id" --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$APP_BUNDLE" || exit 1
+codesign --force --verbose --identifier="${MACOSX_BUNDLE_IDENTIFIER}" $resource_rules --sign "$MACOSX_CODESIGNING_IDENTITY" $entitlements "$APP_BUNDLE"
 
 exit 0
commit 2d4060f4e1aea6a26ebc9a826d5c3f17cb66b445
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 4 13:15:16 2016 +0300

    We don't build regmerge when ENABLE_MACOSX_SANDBOX
    
    So skip CustomTarget_regcompare_test. But maybe we should build it and
    just drop it from the app bundle we package?
    
    Change-Id: Ibd8556ef686d2e9b7d4004110bf8beb93faf8202

diff --git a/registry/Module_registry.mk b/registry/Module_registry.mk
index 907b90f..89dd100 100644
--- a/registry/Module_registry.mk
+++ b/registry/Module_registry.mk
@@ -22,10 +22,13 @@ $(eval $(call gb_Module_add_targets,registry,\
 
 ifneq ($(OS),IOS) # missing regmerge (see above), needed within test
 
+ifeq ($(ENABLE_MACOSX_SANDBOX),) # ditto
+
 $(eval $(call gb_Module_add_check_targets,registry, \
     CustomTarget_regcompare_test \
 ))
 
 endif
+endif
 
 # vim:set noet sw=4 ts=4:
commit 2ed242a1c4721e83e630fc11fc1819e0c096f2bc
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Aug 4 09:17:20 2016 +0300

    Introduce --with-product-name superseding --with-macosx-app-name
    
    The new option thoroughly replaces the product name mentioned in the
    AC_INIT() call. Work in progress.
    
    Also take care of spaces in the product name in a more systematic
    fashion.
    
    This should affect mainly OS X where the final app bundle that is
    installed should use the product name as such, including spaces, if
    any. However, our build system does not cope that well with having an
    app bundle with spaces in it in instdir. So in instdir, and also in
    test-install, spaces are stripped away from the product name when used
    as part of the app bundle name.
    
    Change-Id: Ic16b5039f23c96a4f39387a1869faeb25e05aafb

diff --git a/Makefile.in b/Makefile.in
index 9a83a0c..d3c6297 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -319,37 +319,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; \
-		mkdir $$lproj; \
+		lproj=$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).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)/$(PRODUCTNAME_WITHOUT_SPACES).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)/$(PRODUCTNAME_WITHOUT_SPACES).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)/$(PRODUCTNAME_WITHOUT_SPACES).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
+# Remove the gengal binary and unopkg script that we don't want
+	rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/gengal
+	rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).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)/$(PRODUCTNAME_WITHOUT_SPACES).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 "$(PRODUCTNAME).app"
+	mv "$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app" "$(PRODUCTNAME).app"
+	productbuild --component "$(PRODUCTNAME).app" /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(PRODUCTNAME_WITHOUT_SPACES).pkg
 else
 	@echo You did not provide an installer signing identity with --enable-macosx-package-signing
 	@exit 1
diff --git a/config_host.mk.in b/config_host.mk.in
index 4f2e992..6cc24dc 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -369,7 +369,6 @@ export LIBXSLT_LIBS=$(gb_SPACE)@LIBXSLT_LIBS@
 export LINK_X64_BINARY=@LINK_X64_BINARY@
 @x_Cygwin@ export LS=@WIN_LS@
 export MACOSX_BUNDLE_IDENTIFIER=@MACOSX_BUNDLE_IDENTIFIER@
-export MACOSX_APP_NAME=@MACOSX_APP_NAME@
 export MACOSX_CODESIGNING_IDENTITY=@MACOSX_CODESIGNING_IDENTITY@
 export MACOSX_DEPLOYMENT_TARGET=@MACOSX_DEPLOYMENT_TARGET@
 export MACOSX_PACKAGE_SIGNING_IDENTITY=@MACOSX_PACKAGE_SIGNING_IDENTITY@
@@ -459,6 +458,7 @@ export POSTGRESQL_INC=@POSTGRESQL_INC@
 export POSTGRESQL_LIB=@POSTGRESQL_LIB@
 export PREFIXDIR=@PREFIXDIR@
 export PRODUCTNAME=@PRODUCTNAME@
+export PRODUCTNAME_WITHOUT_SPACES=@PRODUCTNAME_WITHOUT_SPACES@
 export PRODUCTVERSION=@PRODUCTVERSION@
 export PROGRESSBARCOLOR=@PROGRESSBARCOLOR@
 export PROGRESSFRAMECOLOR=@PROGRESSFRAMECOLOR@
diff --git a/configure.ac b/configure.ac
index c31d452..f9a58f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,11 +153,16 @@ AC_CANONICAL_HOST
 
 AC_MSG_CHECKING([for product name])
 PRODUCTNAME="AC_PACKAGE_NAME"
+if test -n "$with_product_name" -a "$with_product_name" != no; then
+    PRODUCTNAME="$with_product_name"
+fi
 if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
     PRODUCTNAME="${PRODUCTNAME}Dev"
 fi
 AC_MSG_RESULT([$PRODUCTNAME])
 AC_SUBST(PRODUCTNAME)
+PRODUCTNAME_WITHOUT_SPACES=${PRODUCTNAME// /}
+AC_SUBST(PRODUCTNAME_WITHOUT_SPACES)
 
 dnl ===================================================================
 dnl Our version is defined by the AC_INIT() at the top of this script.
@@ -720,7 +725,7 @@ darwin*) # Mac OS X or iOS
             mac_sanitize_path
             AC_MSG_NOTICE([sanitized the PATH to $PATH])
         fi
-        INSTROOTSUFFIX=/$PRODUCTNAME.app/Contents
+        INSTROOTSUFFIX=/$PRODUCTNAME_WITHOUT_SPACES.app/Contents
         SDKDIRNAME=AC_PACKAGE_NAME${PRODUCTVERSION}_SDK
     fi
     enable_systray=no
@@ -1433,10 +1438,10 @@ AC_ARG_WITH(macosx-bundle-identifier,
          org.libreoffice.script ("script", huh?).]),
 ,with_macosx_bundle_identifier=org.libreoffice.script)
 
-AC_ARG_WITH(macosx-app-name,
-    AS_HELP_STRING([--with-macosx-app-name='My Own Office Suite'],
-        [Define the OS X app name. Default is AC_PACKAGE_NAME.]),
-,with_macosx_app_name=$PRODUCTNAME)
+AC_ARG_WITH(product-name,
+    AS_HELP_STRING([--with-product-name='My Own Office Suite'],
+        [Define the product name. Default is AC_PACKAGE_NAME.]),
+,with_product_name=$PRODUCTNAME)
 
 AC_ARG_ENABLE(ios-simulator,
     AS_HELP_STRING([--enable-ios-simulator],
@@ -2958,11 +2963,6 @@ if test $_os = Darwin; then
     AC_MSG_CHECKING([what OS X app bundle identifier to use])
     MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
     AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
-
-    AC_MSG_CHECKING([what OS X app name to use])
-    MACOSX_APP_NAME="$with_macosx_app_name"
-    AC_MSG_RESULT([$MACOSX_APP_NAME])
-
 fi
 AC_SUBST(MACOSX_SDK_PATH)
 AC_SUBST(MACOSX_SDK_VERSION)
@@ -2975,7 +2975,6 @@ AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
 AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
 AC_SUBST(ENABLE_MACOSX_SANDBOX)
 AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
-AC_SUBST(MACOSX_APP_NAME)
 
 dnl ===================================================================
 dnl Check iOS SDK and compiler
diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index 5f51117..7a8b9b8 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -44,7 +44,7 @@ LibreOffice
     {
         variables
         {
-            PRODUCTNAME LibreOffice
+            PRODUCTNAME @PRODUCTNAME@
             PRODUCTVERSION @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR@
             PRODUCTEXTENSION . at LIBO_VERSION_MICRO@. at LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
             POSTVERSIONEXTENSION
diff --git a/scp2/source/ooo/directory_ooo_macosx.scp b/scp2/source/ooo/directory_ooo_macosx.scp
index 0bc7bfd..b717460 100644
--- a/scp2/source/ooo/directory_ooo_macosx.scp
+++ b/scp2/source/ooo/directory_ooo_macosx.scp
@@ -21,7 +21,7 @@
 #ifdef MACOSX
 Directory gid_Dir_Bundle
     ParentID = PD_PROGDIR;
-    HostName = "%PRODUCTNAME.app";
+    HostName = "%ONEWORDPRODUCTNAME.app";
 End
 
 Directory gid_Dir_Bundle_Contents
diff --git a/solenv/bin/macosx-codesign-app-bundle b/solenv/bin/macosx-codesign-app-bundle
index afd3e68..37245c1 100755
--- a/solenv/bin/macosx-codesign-app-bundle
+++ b/solenv/bin/macosx-codesign-app-bundle
@@ -98,7 +98,7 @@ done
 #
 # At this stage we also attach the entitlements in the sandboxing case
 
-id=`echo ${MACOSX_APP_NAME} | tr ' ' '-'`
+id=`echo ${PRODUCTNAME} | tr ' ' '-'`
 
 if test -n "$ENABLE_MACOSX_SANDBOX"; then
     entitlements="--entitlements $BUILDDIR/lo.xcent"
diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall
index f9034cd..8d0f5be 100755
--- a/solenv/bin/ooinstall
+++ b/solenv/bin/ooinstall
@@ -93,7 +93,7 @@ system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " .
         "perl " .
         (scalar keys(%DB::sub) ? "-d " : "") .
         "-w $ENV{SRCDIR}/solenv/bin/make_installer.pl " .
-        "-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p $ENV{PRODUCTNAME}" . " " .
+        "-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p LibreOffice " .
         "-u $tmp_dir " .
         "-buildid $BUILD $destdir $strip $msi " .
         "-simple $path") && die "Failed to install: $!";
diff --git a/sysui/desktop/macosx/Info.plist.in b/sysui/desktop/macosx/Info.plist.in
index bd10c26..75980de 100755
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1828,7 +1828,7 @@
     <key>CFBundleExecutable</key>
     <string>soffice</string>
     <key>CFBundleGetInfoString</key>
-    <string>@MACOSX_APP_NAME@ @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR at .@LIBO_VERSION_MICRO at .@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@</string>
+    <string>@PRODUCTNAME@ @LIBO_VERSION_MAJOR at .@LIBO_VERSION_MINOR at .@LIBO_VERSION_MICRO at .@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@</string>
     <key>CFBundleIconFile</key>
     <string>main.icns</string>
     <key>CFBundleShortVersionString</key>
@@ -1840,7 +1840,7 @@
     <key>CFBundleInfoDictionaryVersion</key>
     <string>6.0</string>
     <key>CFBundleName</key>
-    <string>@MACOSX_APP_NAME@</string>
+    <string>@PRODUCTNAME@</string>
     <key>CFBundlePackageType</key>
     <string>APPL</string>
     <key>CFBundleSignature</key>
commit f97180b763793fc89af7b52953fe60eee6a209a8
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Aug 3 22:12:29 2016 +0300

    Reduce ENABLE_OPENGL / ENABLE_HEADLESS confusion
    
    ENABLE_OPENGL means whether to enable the OpenGL slideshow transition
    code. It does not mean whether to enable use of OpenGL in general. So
    rename it to ENABLE_OPENGL_TRANSITIONS while at it.
    
    ENABLE_HEADLESS means whether to disable use of X11 and OpenGL on X11
    (and Wayland) platforms, I think, meaning Linux and maybe Solaris and
    the BSDs. Maybe it should be renamed to DISABLE_X11_AND_OPENGL.
    
    Change-Id: Ibb30f51646b1bcc477fe691a3fa38c7a1e3944ae

diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk
index 6a0c35b..4c028ca 100644
--- a/avmedia/Library_avmedia.mk
+++ b/avmedia/Library_avmedia.mk
@@ -27,7 +27,7 @@ $(eval $(call gb_Library_use_externals,avmedia,\
 	boost_headers \
 ))
 
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_use_externals,avmedia,\
     glew \
 ))
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index 7040ade..33c204f 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -30,7 +30,7 @@ $(eval $(call gb_Library_use_externals,chartcore,\
 	glm_headers \
 ))
 
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_use_externals,chartcore,\
     glew \
 ))
@@ -119,7 +119,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
     chart2/source/view/main/VPolarTransformation \
     chart2/source/view/main/VTitle \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_add_exception_objects,chartcore,\
     chart2/source/view/main/3DChartObjects \
     chart2/source/view/main/GL3DPlotterBase \
@@ -265,12 +265,12 @@ else ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
 $(eval $(call gb_Library_add_libs,chartcore,\
 	$(DLOPEN_LIBS) \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_add_libs,chartcore,\
     -lGL \
     -lX11 \
 ))
-endif #ENABLE_OPENGL
+endif #!ENABLE_HEADLESS
 
 endif
 
diff --git a/chart2/Module_chart2.mk b/chart2/Module_chart2.mk
index 3b32e1c..5a88f18 100644
--- a/chart2/Module_chart2.mk
+++ b/chart2/Module_chart2.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Module_add_targets,chart2,\
     Library_chartcontroller \
     Library_chartcore \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Module_add_targets,chart2,\
      Library_chartopengl \
      Package_opengl \
diff --git a/config_host.mk.in b/config_host.mk.in
index ddd144e..4f2e992 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -159,7 +159,7 @@ export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
 export ENABLE_ONLINE_UPDATE_MAR=@ENABLE_ONLINE_UPDATE_MAR@
 export ENABLE_EXTENSION_UPDATE=@ENABLE_EXTENSION_UPDATE@
 export ENABLE_OOENV=@ENABLE_OOENV@
-export ENABLE_OPENGL=@ENABLE_OPENGL@
+export ENABLE_OPENGL_TRANSITIONS=@ENABLE_OPENGL_TRANSITIONS@
 export ENABLE_OPENGL_CANVAS=@ENABLE_OPENGL_CANVAS@
 export ENABLE_PCH=@ENABLE_PCH@
 export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@
diff --git a/configure.ac b/configure.ac
index d4540f5..c31d452 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10371,29 +10371,29 @@ else
 fi
 AC_SUBST(ENABLE_VLC)
 
-# this is for opengl transitions in impress slideshow
-ENABLE_OPENGL=
+ENABLE_OPENGL_TRANSITIONS=
+ENABLE_OPENGL_CANVAS=
 if test $_os = iOS -o $_os = Android; then
    : # disable
 elif test "$_os" = "Darwin"; then
     # We use frameworks on Mac OS X, no need for detail checks
-    ENABLE_OPENGL=TRUE
+    ENABLE_OPENGL_TRANSITIONS=TRUE
     AC_DEFINE(HAVE_FEATURE_OPENGL,1)
     ENABLE_OPENGL_CANVAS=TRUE
 elif test $_os = WINNT; then
-    ENABLE_OPENGL=TRUE
+    ENABLE_OPENGL_TRANSITIONS=TRUE
     AC_DEFINE(HAVE_FEATURE_OPENGL,1)
     ENABLE_OPENGL_CANVAS=TRUE
 else
     if test "$USING_X11" = TRUE; then
         AC_CHECK_LIB(GL, glBegin, [:], AC_MSG_ERROR([libGL required.]))
-        ENABLE_OPENGL=TRUE
+        ENABLE_OPENGL_TRANSITIONS=TRUE
         AC_DEFINE(HAVE_FEATURE_OPENGL,1)
         ENABLE_OPENGL_CANVAS=TRUE
     fi
 fi
 
-AC_SUBST(ENABLE_OPENGL)
+AC_SUBST(ENABLE_OPENGL_TRANSITIONS)
 AC_SUBST(ENABLE_OPENGL_CANVAS)
 
 dnl =================================================
@@ -12757,7 +12757,7 @@ if test "$enable_mpl_subset" = "yes"; then
         esac
     done
 
-    ENABLE_OPENGL=
+    ENABLE_OPENGL_TRANSITIONS=
 
     if test "$enable_lpsolve" != "no" -o "x$ENABLE_LPSOLVE" = "xTRUE"; then
         AC_MSG_ERROR([need to --disable-lpsolve - calc linear programming solver.])
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 7bb181d..50217fa 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -70,7 +70,7 @@ $(eval $(call gb_Library_use_externals,cui,\
     icuuc \
     icu_headers \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_use_externals,cui,\
      glew \
  ))
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 6a9e2d1..b1479b0 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -443,7 +443,7 @@ postprocess_FILES_onlineupdate := \
 	$(call gb_XcuModuleTarget_get_target,extensions/source/update/check)/org/openoffice/Office/Jobs-onlineupdate.xcu
 endif
 
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_OPENGL_TRANSITIONS),TRUE)
 postprocess_XCDS += ogltrans.xcd
 postprocess_DEPS_ogltrans := main
 postprocess_FILES_ogltrans := \
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index c411fc1..775022a 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -213,7 +213,7 @@ $(eval $(call gb_Rdb_add_components,services,\
 		extensions/source/update/check/updchk.uno \
 		extensions/source/update/ui/updchk \
 	) \
-	$(if $(ENABLE_OPENGL), \
+	$(if $(ENABLE_OPENGL_TRANSITIONS), \
 		slideshow/source/engine/OGLTrans/ogltrans \
 	) \
 	$(if $(ENABLE_TDE), \
@@ -229,10 +229,8 @@ $(eval $(call gb_Rdb_add_components,services,\
 		wizards/com/sun/star/wizards/report/report \
 		wizards/com/sun/star/wizards/table/table \
 	) \
-    $(if $(ENABLE_OPENGL), \
-        $(if $(ENABLE_GLTF), \
-			$(call gb_Helper_optional,AVMEDIA,avmedia/source/opengl/avmediaogl) \
-		) \
+    $(if $(ENABLE_GLTF), \
+		$(call gb_Helper_optional,AVMEDIA,avmedia/source/opengl/avmediaogl) \
 	) \
 ))
 
diff --git a/scp2/InstallModule_impress.mk b/scp2/InstallModule_impress.mk
index c8d04a4..fc097b5 100644
--- a/scp2/InstallModule_impress.mk
+++ b/scp2/InstallModule_impress.mk
@@ -28,7 +28,7 @@ $(eval $(call gb_InstallModule_add_scpfiles,scp2/impress,\
 ))
 
 $(eval $(call gb_InstallModule_add_scpfiles,scp2/impress,\
-	$(if $(filter TRUE,$(ENABLE_OPENGL)),\
+	$(if $(filter TRUE,$(ENABLE_OPENGL_TRANSITIONS)),\
 		scp2/source/impress/module_ogltrans \
 	) \
 ))
diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk
index 3834dfd..3a9aac6 100644
--- a/slideshow/Library_slideshow.mk
+++ b/slideshow/Library_slideshow.mk
@@ -29,7 +29,7 @@ $(eval $(call gb_Library_set_precompiled_header,slideshow,$(SRCDIR)/slideshow/in
 $(eval $(call gb_Library_use_externals,slideshow,\
 	boost_headers \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_use_externals,slideshow,\
      glew \
  ))
diff --git a/slideshow/Module_slideshow.mk b/slideshow/Module_slideshow.mk
index 01d1058..8d98a97 100644
--- a/slideshow/Module_slideshow.mk
+++ b/slideshow/Module_slideshow.mk
@@ -12,7 +12,7 @@ $(eval $(call gb_Module_Module,slideshow))
 $(eval $(call gb_Module_add_targets,slideshow,\
     Library_slideshow \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_OPENGL_TRANSITIONS),TRUE)
 $(eval $(call gb_Module_add_targets,slideshow,\
     Library_OGLTrans \
     Package_opengl \
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 40db407..35f33fb 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -86,7 +86,7 @@ $(eval $(call gb_Library_use_externals,svxcore,\
 	icu_headers \
 	libxml2 \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_use_externals,svxcore,\
      glew \
  ))
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index ecb376e..27bd721 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -25,7 +25,7 @@ $(eval $(call gb_Library_use_externals,tk,\
     boost_headers \
 ))
 
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_use_externals,tk,\
     glew \
 ))
diff --git a/vcl/CppunitTest_vcl_bitmap_test.mk b/vcl/CppunitTest_vcl_bitmap_test.mk
index 1104181..ab1235a 100644
--- a/vcl/CppunitTest_vcl_bitmap_test.mk
+++ b/vcl/CppunitTest_vcl_bitmap_test.mk
@@ -17,7 +17,7 @@ $(eval $(call gb_CppunitTest_use_externals,vcl_bitmap_test,\
 	boost_headers \
 	glm_headers \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_CppunitTest_use_externals,vcl_bitmap_test,\
      glew \
  ))
diff --git a/vcl/Executable_icontest.mk b/vcl/Executable_icontest.mk
index 58efd05..102697b 100644
--- a/vcl/Executable_icontest.mk
+++ b/vcl/Executable_icontest.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Executable_use_externals,icontest,\
     boost_headers \
 	glm_headers \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Executable_use_externals,icontest,\
     glew \
 ))
diff --git a/vcl/Executable_vcldemo.mk b/vcl/Executable_vcldemo.mk
index 6003ecd..bff091e 100644
--- a/vcl/Executable_vcldemo.mk
+++ b/vcl/Executable_vcldemo.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_Executable_use_externals,vcldemo,\
 	boost_headers \
 	glm_headers \
 ))
-ifeq ($(ENABLE_OPENGL),TRUE)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Executable_use_externals,vcldemo,\
     glew \
 ))
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 761fcbe..06b366f 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -121,7 +121,7 @@ $(eval $(call gb_Library_use_externals,vcl,\
 	lcms2 \
 	mdds_headers \
 ))
-ifneq ($(ENABLE_OPENGL)$(if $(filter ANDROID,$(OS)),TRUE),)
+ifeq ($(ENABLE_HEADLESS),)
 $(eval $(call gb_Library_use_externals,vcl,\
      glew \
  ))


More information about the Libreoffice-commits mailing list