[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 9 commits - compilerplugins/clang connectivity/source external/python3 extras/source include/editeng include/vcl sc/source sw/CppunitTest_sw_core_doc.mk sw/qa sw/source toolkit/source vcl/source winaccessibility/source

Serge Krot (via logerrit) logerrit at kemper.freedesktop.org
Sat Jun 6 09:43:30 UTC 2020


 compilerplugins/clang/referencecasting.cxx      |    3 +++
 connectivity/source/parse/sqlflex.l             |    4 +++-
 external/python3/python-3.7.6-msvc-ssl.patch.1  |   15 +++++++++++++++
 extras/source/shellnew/soffice.odg              |binary
 extras/source/shellnew/soffice.ods              |binary
 extras/source/shellnew/soffice.odt              |binary
 include/editeng/numitem.hxx                     |    8 ++++++--
 include/vcl/errinf.hxx                          |    1 +
 sc/source/ui/app/inputhdl.cxx                   |   11 +++++++++++
 sc/source/ui/view/cellsh3.cxx                   |   16 ++++++++++------
 sw/CppunitTest_sw_core_doc.mk                   |    1 +
 sw/qa/core/doc/data/textbox-textrotateangle.odt |binary
 sw/qa/core/doc/doc.cxx                          |   22 ++++++++++++++++++++++
 sw/source/core/doc/number.cxx                   |    4 ++--
 sw/source/core/doc/textboxhelper.cxx            |   14 ++++++++++++--
 sw/source/core/unocore/unosett.cxx              |    7 ++++---
 sw/source/filter/ww8/wrtw8num.cxx               |    2 +-
 sw/source/ui/dbui/mmresultdialogs.cxx           |    4 +++-
 sw/source/uibase/dbui/dbmgr.cxx                 |    3 ++-
 toolkit/source/controls/stdtabcontroller.cxx    |   16 +++++++++-------
 vcl/source/window/errinf.cxx                    |    6 ++++++
 winaccessibility/source/UAccCOM/MAccessible.cxx |    4 ++++
 22 files changed, 115 insertions(+), 26 deletions(-)

New commits:
commit 2631f65a9b64c86456f9083e282f7f05af82fca1
Author:     Serge Krot <Serge.Krot at cib.de>
AuthorDate: Fri May 22 13:20:23 2020 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:33:00 2020 +0100

    tdf#133270 MAILMERGE progress is not updated during export of many files
    
    See also https://gerrit.libreoffice.org/c/core/+/90686 for a similar
    change.
    
    Change-Id: I063394f7ef0a68c79366f09c9d2cf5775a57e640
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94663
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 80cea3682b2cf07f1685852cd8809d9db58a1cb5)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95481
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Tested-by: Jenkins

diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 53a76b8eb2bb..9d507f204ce9 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -45,6 +45,7 @@
 #include <vcl/svapp.hxx>
 #include <vcl/weld.hxx>
 #include <sfx2/dinfdlg.hxx>
+#include <vcl/scheduler.hxx>
 #include <sfx2/printer.hxx>
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/viewfrm.hxx>
@@ -664,7 +665,8 @@ IMPL_LINK_NOARG(SwMMResultSaveDialog, SaveOutputHdl_Impl, weld::Button&, void)
             while(true)
             {
                 //time for other slots is needed
-                Application::Reschedule( true );
+                Scheduler::ProcessEventsToIdle();
+
                 bool bFailed = false;
                 try
                 {
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 0b28c048bffb..2daa67893592 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -45,6 +45,7 @@
 #include <com/sun/star/ui/dialogs/XFilterManager.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <vcl/errinf.hxx>
+#include <vcl/scheduler.hxx>
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/filedlghelper.hxx>
 #include <sfx2/viewfrm.hxx>
@@ -1436,7 +1437,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
                     //TODO xProgressDlg->queue_draw();
                 }
 
-                Application::Reschedule( true );
+                Scheduler::ProcessEventsToIdle();
 
                 // Create a copy of the source document and work with that one instead of the source.
                 // If we're not in the single file mode (which requires modifying the document for the merging),
commit a3bba79435537982445d7ce0a8fa9f4c3450b49f
Author:     Jan-Marek Glogowski <jan-marek.glogowski at extern.cib.de>
AuthorDate: Fri Jan 24 13:33:37 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:32:54 2020 +0100

    python3+WIN: don't fail copy of openssl DLLs+PDBs
    
    The LO python3 target fails for me on Windows with:
      C:\lode\dev\core\workdir\UnpackedTarball\python3\PCBuild\openssl.props(24,5):
        error MSB3030: Datei "C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libcrypto-1_1.dll"
        konnte nicht kopiert werden, da die Datei nicht gefunden wurde.
        [C:\lode\dev\core\workdir\UnpackedTarball\python3\PCBuild\_ssl.vcxproj]
    
    Same for
      "C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libssl-1_1.pdb"
      "C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libcrypto-1_1.pdb"
      "C:/lode/dev/core/workdir/UnpackedTarball/openssl/out32dll\libssl-1_1.dll"
    
    Other files were also renamed in a previous hunk of this patch.
    
    For other people these failures are silently ignored, but they
    show up in their python3 build.log. But my msbuild version
    15.9.21+g9802d43bc3 from VS2017 fails hard on these errors.
    
    So this just adapt the pdb and dll names to match the previous
    renames, which passes the copy calls, so the build continues.
    
    Change-Id: Iffc848c334caec534f6e99f8bf83a42da570bbb1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87358
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Tested-by: Jenkins
    (cherry picked from commit 4ff12ba6f4639c73587f2bb58afcc3ca6fb30105)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95559
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/external/python3/python-3.7.6-msvc-ssl.patch.1 b/external/python3/python-3.7.6-msvc-ssl.patch.1
index 14e7cca0a8ce..e8e94f674c1f 100644
--- a/external/python3/python-3.7.6-msvc-ssl.patch.1
+++ b/external/python3/python-3.7.6-msvc-ssl.patch.1
@@ -23,3 +23,18 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
      </Link>
    </ItemDefinitionGroup>
    <PropertyGroup>
+@@ -15,10 +15,10 @@
+     <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
+   </PropertyGroup>
+   <ItemGroup>
+-    <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
+-    <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).pdb" />
+-    <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" />
+-    <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" />
++    <_SSLDLL Include="$(opensslOutDir)\libeay32.dll" />
++    <_SSLDLL Include="$(opensslOutDir)\libeay32.pdb" />
++    <_SSLDLL Include="$(opensslOutDir)\ssleay32.dll" />
++    <_SSLDLL Include="$(opensslOutDir)\ssleay32.pdb" />
+   </ItemGroup>
+   <Target Name="_CopySSLDLL" Inputs="@(_SSLDLL)" Outputs="@(_SSLDLL->'$(OutDir)%(Filename)%(Extension)')" AfterTargets="Build">
+     <Copy SourceFiles="@(_SSLDLL)" DestinationFolder="$(OutDir)" />
commit 1ba48e15840c50463b07db441806a21714715c38
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Jun 2 09:07:48 2020 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:31:03 2020 +0100

    tdf#133271 sw textbox: handle TextRotateAngle shape property
    
    Shape with btlr text direction is imported as TextPreRotateAngle=-270
    from DOCX. Saving this to ODT turns the property name into
    TextRotateAngle and its type into double.
    
    Handle that as well to survive the ODF roundtrip of a shape+textbox
    where the textbox has a btlr text direction.
    
    (Also add a way to make multiple tests in a suite to be more independent
    from each other: depending on ordering, the new test made the old test
    fail. Calling ErrorRegistry::Reset() makes that go away.)
    
    Change-Id: Iea9212f3bbb01059caf3b0f2d809e48debf52953
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95340
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 413791a65597a1808d9b98e4887864f3624b70cc)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95318
    (cherry picked from commit e05a39f75cd304bfc1bd59aa2eebe4889cae109f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95411
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/include/vcl/errinf.hxx b/include/vcl/errinf.hxx
index 37805b7f710c..76ee7aca37aa 100644
--- a/include/vcl/errinf.hxx
+++ b/include/vcl/errinf.hxx
@@ -59,6 +59,7 @@ public:
 
     static void                 RegisterDisplay(BasicDisplayErrorFunc*);
     static void                 RegisterDisplay(WindowDisplayErrorFunc*);
+    static void                 Reset();
 
 private:
     DisplayFnPtr                pDsp;
diff --git a/sw/CppunitTest_sw_core_doc.mk b/sw/CppunitTest_sw_core_doc.mk
index 487e02322ef4..856f007cb9b1 100644
--- a/sw/CppunitTest_sw_core_doc.mk
+++ b/sw/CppunitTest_sw_core_doc.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_doc, \
     comphelper \
     cppu \
     cppuhelper \
+    editeng \
     sal \
     sfx \
     sw \
diff --git a/sw/qa/core/doc/data/textbox-textrotateangle.odt b/sw/qa/core/doc/data/textbox-textrotateangle.odt
new file mode 100644
index 000000000000..2ce4c3e0b7ec
Binary files /dev/null and b/sw/qa/core/doc/data/textbox-textrotateangle.odt differ
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index 3141c12011cc..72895861f713 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -13,6 +13,8 @@
 #include <comphelper/classids.hxx>
 #include <tools/globname.hxx>
 #include <svtools/embedhlp.hxx>
+#include <editeng/frmdiritem.hxx>
+#include <vcl/errinf.hxx>
 
 #include <wrtsh.hxx>
 #include <fmtanchr.hxx>
@@ -58,6 +60,26 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testMathInsertAnchorType)
     // - Actual  : 4
     // i.e. the anchor type was at-char, not as-char.
     CPPUNIT_ASSERT_EQUAL(RndStdIds::FLY_AS_CHAR, rAnchor.GetAnchorId());
+    ErrorRegistry::Reset();
+}
+
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextboxTextRotateAngle)
+{
+    // Check the writing direction of the only TextFrame in the document.
+    SwDoc* pDoc = createDoc("textbox-textrotateangle.odt");
+    SwFrameFormats& rFrameFormats = *pDoc->GetSpzFrameFormats();
+    CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rFrameFormats.size());
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(RES_DRAWFRMFMT), rFrameFormats[0]->Which());
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(RES_FLYFRMFMT), rFrameFormats[1]->Which());
+    SvxFrameDirection eActual = rFrameFormats[1]->GetAttrSet().GetItem(RES_FRAMEDIR)->GetValue();
+
+    // Without the accompanying fix in place, this test would have failed with:
+    // - Expected: 5 (btlr)
+    // - Actual  : 0 (lrtb)
+    // i.e. the writing direction was in the ODT file, but it was lost on import in the textbox
+    // case.
+    CPPUNIT_ASSERT_EQUAL(SvxFrameDirection::Vertical_LR_BT, eActual);
+    ErrorRegistry::Reset();
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 37939224daf6..4656e3bec14c 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -358,11 +358,21 @@ void SwTextBoxHelper::syncProperty(SwFrameFormat* pShape, const OUString& rPrope
 
         comphelper::SequenceAsHashMap aCustomShapeGeometry(rValue);
         auto it = aCustomShapeGeometry.find("TextPreRotateAngle");
+        if (it == aCustomShapeGeometry.end())
+        {
+            it = aCustomShapeGeometry.find("TextRotateAngle");
+        }
+
         if (it != aCustomShapeGeometry.end())
         {
-            auto nTextPreRotateAngle = it->second.get<sal_Int32>();
+            auto nAngle = it->second.has<sal_Int32>() ? it->second.get<sal_Int32>() : 0;
+            if (nAngle == 0)
+            {
+                nAngle = it->second.has<double>() ? it->second.get<double>() : 0;
+            }
+
             sal_Int16 nDirection = 0;
-            switch (nTextPreRotateAngle)
+            switch (nAngle)
             {
                 case -90:
                     nDirection = text::WritingMode2::TB_RL;
diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx
index f1e9109f5afb..31bec6e085a0 100644
--- a/vcl/source/window/errinf.cxx
+++ b/vcl/source/window/errinf.cxx
@@ -69,6 +69,12 @@ void ErrorRegistry::RegisterDisplay(WindowDisplayErrorFunc *aDsp)
     rData.pDsp = reinterpret_cast< DisplayFnPtr >(aDsp);
 }
 
+void ErrorRegistry::Reset()
+{
+    ErrorRegistry &rData = TheErrorRegistry::get();
+    rData = ErrorRegistry();
+}
+
 static void aDspFunc(const OUString &rErr, const OUString &rAction)
 {
     SAL_WARN("vcl", "Action: " << rAction << " Error: " << rErr);
commit f694ac14bd5f5b582c43dc65b79cc4ce61c737c3
Author:     Lionel Elie Mamane <lionel at mamane.lu>
AuthorDate: Fri May 8 07:51:53 2020 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:30:57 2020 +0100

    tdf#122461 SQL identifiers (names) can contain newlines
    
    Change-Id: Ic58e6b65e146b2e0d9cb656aa5fa06cfe955d11d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93690
    Tested-by: Jenkins
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    (cherry picked from commit b6ab865a371f5c46f96d931721f03afde82b7ec1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93787
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l
index 1002ecef7970..2269d1c6e52c 100644
--- a/connectivity/source/parse/sqlflex.l
+++ b/connectivity/source/parse/sqlflex.l
@@ -526,6 +526,8 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp)
     int ch;
     OStringBuffer sBuffer(256);
 
+    assert(nTyp == 0 || nTyp == 1 || nTyp == 2);
+
     while (!checkeof(ch = yyinput()))
     {
         if (ch == delim)
@@ -554,7 +556,7 @@ sal_Int32 gatherString(int delim, sal_Int32 nTyp)
             }
 
         }
-        else if (nTyp != 1 && (ch == '\r' || ch == '\n') )
+        else if (nTyp == 2 && (ch == '\r' || ch == '\n') )
             break;
         else
         {
commit 662ffed0d6e64c5976d0eb412e0db51e28d2b29b
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Fri May 15 18:17:34 2020 +0300
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:30:50 2020 +0100

    tdf#120394: list format string can be empty
    
    We need to distunguish when we have list format string, but it
    is empty (no level text will be diplayed) or it does not exist
    at all, so we need to fallback to old prefix-suffix syntax.
    
    Change-Id: Ifd4ccd5a676db86c39d2ef48e91d191d92b9b2a0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94322
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit d8329149394e4e5758a9e293b0162db050379a4e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95413

diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 52cb14858c1f..b1fa7c66b039 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -31,6 +31,7 @@
 #include <editeng/editengdllapi.h>
 #include <o3tl/typed_flags_set.hxx>
 #include <memory>
+#include <optional>
 #include <algorithm>
 
 class SvxBrushItem;
@@ -102,7 +103,9 @@ public:
 private:
     OUString            sPrefix;
     OUString            sSuffix;
-    OUString            sListFormat;        // Format string ">%1.%2<" can be used instead of prefix/suffix
+    std::optional<OUString> sListFormat;        // Format string ">%1.%2<" can be used instead of prefix/suffix
+                                                // Right now it is optional value to dostinguish empty list format
+                                                // and not set list format when we need to fallback to prefix/suffix.
 
     SvxAdjust           eNumAdjust;
 
@@ -168,7 +171,8 @@ public:
     void            SetSuffix(const OUString& rSet) { sSuffix = rSet;}
     const OUString& GetSuffix() const { return sSuffix;}
     void            SetListFormat(const OUString& rSet) { sListFormat = rSet; }
-    const OUString& GetListFormat() const { return sListFormat; }
+    bool            HasListFormat() const { return sListFormat.has_value(); }
+    const OUString& GetListFormat() const { return *sListFormat; }
 
     void                    SetCharFormatName(const OUString& rSet){ sCharStyleName = rSet; }
     virtual OUString        GetCharFormatName()const;
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index df3dcf76bfff..481ebfada8eb 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -641,9 +641,9 @@ OUString SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVecto
         {
             css::lang::Locale aLocale( LanguageTag::convertToLocale(nLang));
 
-            OUString sLevelFormat = rMyNFormat.GetListFormat();
-            if (!sLevelFormat.isEmpty())
+            if (rMyNFormat.HasListFormat())
             {
+                OUString sLevelFormat = rMyNFormat.GetListFormat();
                 // In this case we are ignoring GetIncludeUpperLevels: we put all
                 // level nubers requested by level format
                 for (SwNumberTree::tNumberVector::size_type i=0; i <= nLevel; ++i)
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 8f0d95005a2a..1f68135f7a4a 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1343,11 +1343,12 @@ uno::Sequence<beans::PropertyValue> SwXNumberingRules::GetPropertiesForNumFormat
     aPropertyValues.push_back(comphelper::makePropertyValue("Suffix", aUString));
 
     //listformat
-    aUString = rFormat.GetListFormat();
-    aPropertyValues.push_back(comphelper::makePropertyValue("ListFormat", aUString));
+    if (rFormat.HasListFormat())
+    {
+        aPropertyValues.push_back(comphelper::makePropertyValue("ListFormat", rFormat.GetListFormat()));
+    }
 
     //char style name
-
     aUString.clear();
     SwStyleNameMapper::FillProgName( rCharFormatName, aUString, SwGetPoolIdFromName::ChrFmt);
     aPropertyValues.push_back(comphelper::makePropertyValue("CharStyleName", aUString));
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index b89d40445e50..bde15c7ea279 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -503,7 +503,7 @@ void MSWordExportBase::NumberingLevel(
     const vcl::Font* pBulletFont=nullptr;
     rtl_TextEncoding eChrSet=0;
     FontFamily eFamily=FAMILY_DECORATIVE;
-    if (!rRule.Get(nLvl).GetListFormat().isEmpty())
+    if (rRule.Get(nLvl).HasListFormat())
     {
         // Nothing to construct: we have it already
         sNumStr = rRule.Get(nLvl).GetListFormat();
commit 5a1ee1341b6c680a3ec3ea519fa9bcdeeebb30d6
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Wed Jun 3 14:07:39 2020 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:30:44 2020 +0100

    tdf#133633 winaccessibility: Add null check
    
    The call to 'AccObjectManagerAgent::GetIAccessibleFromResID'
    may set 'pImAcc' to nullptr here (s.
    'AccObjectWinManager::GetIAccessibleFromResID', which is called
    from there), so handle that case gracefully.
    
    Change-Id: I0dbd48974fd012ff086835b147cd9b9cfc8a052b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95430
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit f5f9cac0c5f04246718c438b4673b36e803fda29)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95420
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx
index d681c38a793c..6a844f8d7ce6 100644
--- a/winaccessibility/source/UAccCOM/MAccessible.cxx
+++ b/winaccessibility/source/UAccCOM/MAccessible.cxx
@@ -786,6 +786,10 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP CMAccessible::get_accFocus(VARIANT *pvarChild)
         {
             IMAccessible* pIMAcc = nullptr;
             g_pAgent->GetIAccessibleFromResID(m_dFocusChildID,&pIMAcc);
+            if (pIMAcc == nullptr)
+            {
+                return E_FAIL;
+            }
             pIMAcc->AddRef();
             pvarChild->vt = VT_DISPATCH;
             pvarChild->pdispVal = pIMAcc;
commit 4bfd2950f3949bfc110625aae40ab30c4907de7f
Author:     Rene Engelhard <rene at debian.org>
AuthorDate: Mon Jun 1 09:24:40 2020 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:30:36 2020 +0100

    deb#961473 set A4 in extras/source/shellnew templates
    
    it's far more used in the world than "US Letter"
    
    Change-Id: I7dbbefc9bde543967e1f3039890bbff91fc1459c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95422
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/extras/source/shellnew/soffice.odg b/extras/source/shellnew/soffice.odg
index 0df6408db875..ac06d224ec84 100644
Binary files a/extras/source/shellnew/soffice.odg and b/extras/source/shellnew/soffice.odg differ
diff --git a/extras/source/shellnew/soffice.ods b/extras/source/shellnew/soffice.ods
index 2f3bcbc60319..33782b08fedf 100644
Binary files a/extras/source/shellnew/soffice.ods and b/extras/source/shellnew/soffice.ods differ
diff --git a/extras/source/shellnew/soffice.odt b/extras/source/shellnew/soffice.odt
index 679cc6493cc6..be6efc69f714 100644
Binary files a/extras/source/shellnew/soffice.odt and b/extras/source/shellnew/soffice.odt differ
commit bb34e20d24f1864bd0cd53685482c924fba7c01d
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jun 1 13:51:51 2020 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Sat Jun 6 09:30:30 2020 +0100

    Revert "tdf#125609 toolkit: don't use XTabController::getControls"
    
    This reverts LO6.4 commit 5cf057c3365a0feafc8f2e4f4a9e24d69a581999,
    in order to fix tdf#133158.
    
    This commit is obsolete, but was left in place since it
    seemed to have fixed a problem (in =gtk3 anyway).
    But now SAL_USE_VCLPLUGIN=gen behaves differently,
    so obviously a fix in one place must have broken another.
    
    Better the problems you have always known than
    a new problem, especially since this patch
    isn't used to fix anything specific in gtk3 anymore
    (since those changes were also reverted).
    
    An earlier gerrit version of this revert (which
    didn't just have an ignore-this-clang-rule exception)
    half-worked, but failed if multiple documents
    were opened.
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95282
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit d5e222cd86b82a429c28cb19583521d581efaf2b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95311
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit a1c7ccc84ff596c5977644a67802e65b51919d49)
    
    Change-Id: Ie8ddb7b9669fa46067d04c35e157ea08701df0da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95326
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/referencecasting.cxx b/compilerplugins/clang/referencecasting.cxx
index 45b65d3e7f26..ea69efbd0f83 100644
--- a/compilerplugins/clang/referencecasting.cxx
+++ b/compilerplugins/clang/referencecasting.cxx
@@ -43,6 +43,9 @@ public:
         // macros
         if (fn == SRCDIR "/dbaccess/source/ui/browser/formadapter.cxx")
             return false;
+        // UNO aggregation
+        if (fn == SRCDIR "/toolkit/source/controls/stdtabcontroller.cxx")
+            return false;
         return true;
     }
 
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index b989f3f5a8e5..858047012a7a 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -303,17 +303,19 @@ void StdTabController::activateTabOrder(  )
     if ( !xC.is() || !xVclContainerPeer.is() )
         return;
 
+    // This may return a TabController, which returns desired list of controls faster
+    // (the dreaded UNO aggregration, retrieve the thing that we are part of)
+    Reference<XTabController> xTabController( static_cast<XTabController*>(this), UNO_QUERY );
+
     // Get a flattened list of controls sequences
     Sequence< Reference< XControlModel > > aModels = mxModel->getControlModels();
     Sequence< Reference< XWindow > > aCompSeq;
     Sequence< Any> aTabSeq;
 
-    // Previously used aControls = xTabController->getControls() "for the sake of optimization",
-    // but that list isn't valid during the creation phase (missing last created control) because
-    // listenermultiplexer.cxx handles fmvwimp::elementinserted before formcontroller::elementInserted
-    // Perhaps other places using the same optimization need to be reviewed?  (tdf#125609)
-    Sequence< Reference< XControl > > aCachedControls = getControls();
-    Sequence< Reference< XControl > > aControls = aCachedControls;
+    // DG: For the sake of optimization, retrieve Controls from getControls(),
+    // this may sound counterproductive, but leads to performance improvements
+    // in practical scenarios (Forms)
+    Sequence< Reference< XControl > > aControls = xTabController->getControls();
 
     // #58317# Some Models may be missing from the Container. Plus there is a
     // autoTabOrder call later on.
@@ -331,7 +333,7 @@ void StdTabController::activateTabOrder(  )
     {
         mxModel->getGroup( nG, aThisGroupModels, aName );
 
-        aControls = aCachedControls;
+        aControls = xTabController->getControls();
             // ImplCreateComponentSequence has a really strange semantics regarding it's first parameter:
             // upon method entry, it expects a super set of the controls which it returns
             // this means we need to completely fill this sequence with all available controls before
commit 9e1f901393ce5105f3c613a55cbbdbbdc3dd3611
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Jul 16 11:58:11 2019 +0200
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Jun 5 14:47:06 2020 +0100

    LOK: Emit the doc. modified state even when changing the cell inline.
    
    The "LOK: emit modified status on entering cell data" patch did this
    only for the formula input line, and did not change the state when the
    user just clicked on the cell and started modifying it; so this patch
    extends it.
    
    Also change the actual DocumentModified state of the document directly
    instead of just sending a flag, so that the state in LOOLWSD and in the
    core don't get out of sync.
    
    Change-Id: Ie516ce5a74d94247d79cf993517d7f4a6657cc94
    Reviewed-on: https://gerrit.libreoffice.org/75701
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 74e17af75782..0c02f73966a3 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2750,6 +2750,9 @@ void ScInputHandler::InvalidateAttribs()
         rBindings.Invalidate( SID_SET_SUB_SCRIPT );
         rBindings.Invalidate( SID_ATTR_CHAR_STRIKEOUT );
         rBindings.Invalidate( SID_ATTR_CHAR_SHADOWED );
+
+        rBindings.Invalidate( SID_SAVEDOC );
+        rBindings.Invalidate( SID_DOC_MODIFIED );
     }
 }
 
@@ -3763,6 +3766,14 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false
             // #i114511# don't count cursor keys as modification
             bool bSetModified = !bCursorKey;
             DataChanged(false, bSetModified); // also calls UpdateParenthesis()
+
+            // In the LOK case, we want to set the document modified state
+            // right away at the start of the edit, so that the content is
+            // saved even when the user leaves the document before hitting
+            // Enter
+            if (comphelper::LibreOfficeKit::isActive() && bSetModified && pActiveViewSh && !pActiveViewSh->GetViewData().GetDocShell()->IsModified())
+                pActiveViewSh->GetViewData().GetDocShell()->SetModified();
+
             InvalidateAttribs();        //! in DataChanged?
         }
     }
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 15d6fce90c0b..e7d0c9a69607 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -267,13 +267,17 @@ void ScCellShell::Execute( SfxRequest& rReq )
             {
                 if ( pReqArgs )
                 {
-                    if (comphelper::LibreOfficeKit::isActive())
+                    // In the LOK case, we want to set the document modified state
+                    // right away at the start of the edit, so that the content is
+                    // saved even when the user leaves the document before hitting
+                    // Enter
+                    // NOTE: This also means we want to set the modified state
+                    // regardless of the DontCommit parameter's value.
+                    if (comphelper::LibreOfficeKit::isActive() && !GetViewData()->GetDocShell()->IsModified())
                     {
-                        // Let the client know about our entry, so if they save
-                        // (say because the user closes the document or window,)
-                        // this change gets persisted (assuming DontTerminateEdit
-                        // is set to false in the .uno:Save command).
-                        SfxLokHelper::notifyAllViews(LOK_CALLBACK_STATE_CHANGED, ".uno:ModifiedStatus=true");
+                        GetViewData()->GetDocShell()->SetModified();
+                        rBindings.Invalidate(SID_SAVEDOC);
+                        rBindings.Invalidate(SID_DOC_MODIFIED);
                     }
 
                     OUString aStr( static_cast<const SfxStringItem&>(pReqArgs->


More information about the Libreoffice-commits mailing list