chart2/Library_chartcontroller.mk                            |    2 
 chart2/UIConfig_chart2.mk                                    |    1 
 chart2/source/controller/dialogs/ChartResourceGroupDlgs.cxx  |  131 ++
 chart2/source/controller/dialogs/ChartResourceGroups.cxx     |   99 -
 chart2/source/controller/dialogs/tp_ChartType.cxx            |    1 
 chart2/source/controller/sidebar/Chart2PanelFactory.cxx      |    3 
 chart2/source/controller/sidebar/ChartTypePanel.cxx          |  553 +++++++++++
 chart2/source/controller/sidebar/ChartTypePanel.hxx          |  138 ++
 chart2/source/inc/ChartResourceGroupDlgs.hxx                 |   65 +
 chart2/source/inc/ChartResourceGroups.hxx                    |   42 
 chart2/uiconfig/ui/sidebartype.ui                            |  367 +++++++
 desktop/qa/desktop_lib/test_desktop_lib.cxx                  |   97 +
 desktop/source/lib/init.cxx                                  |   54 +
 editeng/source/editeng/editview.cxx                          |    8 
 editeng/source/editeng/impedit.cxx                           |   61 +
 include/LibreOfficeKit/LibreOfficeKit.h                      |   10 
 include/LibreOfficeKit/LibreOfficeKit.hxx                    |   23 
 include/LibreOfficeKit/LibreOfficeKitEnums.h                 |   15 
 include/sfx2/lokhelper.hxx                                   |    2 
 include/sfx2/objsh.hxx                                       |    2 
 include/svl/macitem.hxx                                      |    2 
 include/vcl/ITiledRenderable.hxx                             |    5 
 libreofficekit/source/gtk/lokdocview.cxx                     |    1 
 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu |   23 
 package/source/xstor/xstorage.hxx                            |    6 
 sc/inc/docuno.hxx                                            |    3 
 sc/inc/pivot.hxx                                             |    1 
 sc/inc/scmatrix.hxx                                          |    3 
 sc/source/core/data/funcdesc.cxx                             |    2 
 sc/source/core/data/pivot2.cxx                               |    8 
 sc/source/ui/app/inputhdl.cxx                                |   81 +
 sc/source/ui/app/inputwin.cxx                                |  132 ++
 sc/source/ui/docshell/docsh.cxx                              |    6 
 sc/source/ui/drawfunc/fudraw.cxx                             |   11 
 sc/source/ui/inc/docsh.hxx                                   |    2 
 sc/source/ui/inc/inputhdl.hxx                                |    2 
 sc/source/ui/inc/inputwin.hxx                                |    5 
 sc/source/ui/unoobj/docuno.cxx                               |   10 
 sc/source/ui/view/cellsh3.cxx                                |   12 
 sc/source/ui/view/gridwin.cxx                                |   31 
 sc/source/ui/view/gridwin2.cxx                               |   26 
 sc/source/ui/view/gridwin4.cxx                               |   11 
 sc/source/ui/view/tabview.cxx                                |    1 
 sc/source/ui/view/tabvwshc.cxx                               |   11 
 sfx2/source/appl/workwin.cxx                                 |    3 
 sfx2/source/doc/SfxRedactionHelper.cxx                       |    2 
 sfx2/source/doc/objserv.cxx                                  |    1 
 sfx2/source/doc/objstor.cxx                                  |    7 
 sfx2/source/view/ipclient.cxx                                |   11 
 sfx2/source/view/lokhelper.cxx                               |    7 
 svl/source/items/macitem.cxx                                 |   12 
 svl/source/numbers/zformat.cxx                               |   16 
 svl/source/numbers/zforscan.hxx                              |    1 
 svx/uiconfig/ui/sidebartextpanel.ui                          |   29 
 sw/qa/extras/ooxmlexport/data/tdf132514.docx                 |binary
 sw/qa/extras/ooxmlexport/ooxmlexport6.cxx                    |   10 
 sw/qa/extras/tiledrendering/data/hyperlink.odt               |binary
 sw/qa/extras/tiledrendering/tiledrendering.cxx               |   38 
 sw/source/core/crsr/viscrs.cxx                               |   53 -
 sw/source/core/doc/docredln.cxx                              |    6 
 sw/source/core/inc/mvsave.hxx                                |    7 
 sw/source/filter/ww8/ww8par.cxx                              |    5 
 sw/source/filter/ww8/ww8par.hxx                              |    1 
 sw/source/uibase/docvw/edtwin.cxx                            |    6 
 sw/source/uibase/uiview/view2.cxx                            |   32 
 sw/source/uibase/uno/unotxdoc.cxx                            |    4 
 vcl/inc/widgetdraw/WidgetDefinition.hxx                      |   14 
 vcl/qa/cppunit/pdfexport/pdfexport.cxx                       |    5 
 vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx     |   37 
 vcl/qa/cppunit/widgetdraw/data/definitionSettings1.xml       |    5 
 vcl/qa/cppunit/widgetdraw/data/definitionSettings2.xml       |    6 
 vcl/qa/cppunit/widgetdraw/data/definitionSettings3.xml       |   13 
 vcl/source/app/salvtables.cxx                                |   10 
 vcl/source/gdi/FileDefinitionWidgetDraw.cxx                  |   65 +
 vcl/source/gdi/WidgetDefinition.cxx                          |    2 
 vcl/source/gdi/WidgetDefinitionReader.cxx                    |   37 
 vcl/source/uitest/uiobject.cxx                               |    7 
 vcl/source/window/cursor.cxx                                 |    4 
 vcl/source/window/paint.cxx                                  |    6 
 vcl/source/window/seleng.cxx                                 |   11 
 vcl/uiconfig/theme_definitions/ios/definition.xml            |   47 
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx     |    3 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx     |   17 
 writerfilter/source/dmapper/DomainMapperTableManager.hxx     |    3 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx            |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx            |   10 
 writerfilter/source/dmapper/PropertyMap.hxx                  |    9 
 xmloff/source/core/attrlist.cxx                              |    6 
 xmloff/source/style/xmlprmap.cxx                             |   17 
 89 files changed, 2335 insertions(+), 321 deletions(-)

New commits:
commit e9c9d11e302ee3dced992debc08fae4811d9e8a1
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Fri May 15 15:52:17 2020 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:48:03 2020 +0200

    Handle conversion of locale modifiers not of the same originating locale
    
    This popped up when attempting to replace the zh-CN keyword
    'General' with '常规' for tdf#88233, which led to
    CppunitTest_sc_subsequent_export_test failing for
    ScExportTest::testNatNumInNumberFormatXLSX with
    
    - Expected: [DBNum2][$-804]General;[RED][DBNum2][$-804]General
    - Actual  : [$-1F000804]ge\ner"al";[RED][$-1F000804]ge\ner"al"
    
    The reason was that from the English format string loaded from .xlsx
    [DBNum2][$-804]General;[RED][DBNum2][$-804]General
    the resulting zh-CN format was
    [DBNum2]General;[RED][DBNum2][$-804]General
    like before, which when reparsed in a zh-CN locale now without the
    'General' keyword first led to
    [DBNum2]GEnERal;[RED][DBNum2][$-804]GEnERal
    with GE and ER calendar keywords, which then is exported correctly as
    [$-1F000804]ge\ner"al";[RED][$-1F000804]ge\ner"al"
    
    So when detecting the "format belongs to another locale" condition
    also switch the target locale of the ongoing conversion, which
    results in the then correct
    [DBNum2]常规;[RED][DBNum2][$-804]常规
    exported as
    [DBNum2][$-804]General;[RED][DBNum2][$-804]General
    again.
    
    Such could had happened with any format code using a [$-...]
    locale modifier if keywords differ between originating and target
    locale, but cases seem to be not that widespread.
    
    Change-Id: Ib4d444a4085ace251d03e87498eb0f4871eadc8d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94313
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <er...@redhat.com>
    (cherry picked from commit 18956dc02a936d781efe6800b7dc457ebda49fc2)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94276
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index ce04f095c68f..01eb9c319d92 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1036,6 +1036,22 @@ SvNumberformat::SvNumberformat(OUString& rString,
                             {
                                 maLocale = aTmpLocale;
                                 eLan = aTmpLocale.meLanguage;   // return to 
caller
+
+                                // Set new target locale also at scanner.
+                                // We have to do this because switching locale
+                                // may make replacing keywords and separators
+                                // necessary.
+                                // We can do this because it's the first
+                                // subformat and we're still at parsing the
+                                // modifiers, not keywords.
+                                rScan.SetNewLnge( eLan);
+                                // We can not force conversion though because
+                                // the caller may have explicitly not set it.
+                                // In the usual case the target locale is the
+                                // originating locale the conversion is not
+                                // necessary, when reading alien documents
+                                // conversion is enabled anyway.
+
                                 /* TODO: fiddle with scanner to make this
                                  * known? A change in the locale may affect
                                  * separators and keywords. On the other
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index 77f8eef513a8..a5e7ecaa8b3e 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -161,6 +161,7 @@ public:
     bool GetConvertMode() const     { return bConvertMode; }
     LanguageType GetNewLnge() const { return eNewLnge; } // Read access on 
ConvertMode and convert country/language
     LanguageType GetTmpLnge() const { return eTmpLnge; } // Read access on 
StartCountry/Language
+    void SetNewLnge( LanguageType e ) { eNewLnge = e; }  // Set new convert 
country/language
 
                                                 /// get Thai T speciality
     sal_uInt8 GetNatNumModifier() const      { return nNatNumModifier; }
commit bca545ebeeda22ffaf10ed6a8ba3d19a24e03c51
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Thu May 14 12:31:55 2020 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:47:57 2020 +0200

    tdf#132788 vcl: fix redraw on theme change
    
    Regression from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1
    (tdf#92079 vcl: fix missing image background on dialog from basic,
    2019-06-13), the original scenario was about an unexpected change from
    bitmap wallpaper to a non-bitmap one.
    
    That means the condition for the above change can be more strict: just
    restore the old wallpaper if it's now a non-bitmap one, otherwise leave
    it alone. This way the above scenario keeps working and changing themes
    again doesn't require a restart of the process.
    
    (cherry picked from commit 52389ed19da6bcfdedef909532913ff3e2ab4afc)
    
    Change-Id: I256372ad30184cc150d6819dd61cdd38af7d83ba
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94194
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 9f110e600a31..42a3139b47a9 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -302,9 +302,11 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
             // direct painting
             Wallpaper aBackground = m_pWindow->GetBackground();
             m_pWindow->ApplySettings(*m_pWindow);
-            // Restore lost bitmap background.
-            if (aBackground.IsBitmap())
+            // Restore bitmap background if it was lost.
+            if (aBackground.IsBitmap() && 
!m_pWindow->GetBackground().IsBitmap())
+            {
                 m_pWindow->SetBackground(aBackground);
+            }
             m_pWindow->PushPaintHelper(this, *m_pWindow);
             m_pWindow->Paint(*m_pWindow, m_aPaintRect);
         }
commit 9ff11fa5f4963a5ffa5a23b87b20a330d4345601
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri May 15 09:45:19 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:47:49 2020 +0200

    tdf#131333 SalMenus propogate to parent their selected id conditionally
    
    Menu::Select depends on its handler returning false to allow propogating a
    submens's selected id to its parent menu to become its selected id.
    
    without this, while gen menus already have propogated this to its parent in
    MenuFloatingWindow::EndExecute, SalMenus as used under kf5/macOS won't
    propogate the selected id
    
    Change-Id: I1d87cb0deacdf5fbfb837acc21c2d23b79525aae
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94268
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    Tested-by: Jenkins

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 46eaacfce0e3..77334c1cc90d 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -900,7 +900,15 @@ public:
 IMPL_LINK_NOARG(SalInstanceMenu, SelectMenuHdl, ::Menu*, bool)
 {
     signal_activate(m_xMenu->GetCurItemIdent());
-    return true;
+    /* tdf#131333 Menu::Select depends on a false here to allow
+       propogating a submens's selected id to its parent menu to become its
+       selected id.
+
+       without this, while gen menus already have propogated this to its parent
+       in MenuFloatingWindow::EndExecute, SalMenus as used under kf5/macOS
+       won't propogate the selected id
+    */
+    return false;
 }
 
 class SalInstanceToolbar : public SalInstanceWidget, public virtual 
weld::Toolbar
commit 4973f508a29846cbd9b58efb49aea6d2e19a41a5
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Nov 25 16:52:49 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:47:43 2020 +0200

    Remove some redundantly user-declared copy ctors and assignment ops
    
    ...that trigger -Werror,-Wdeprecated-copy ("definition of implicit copy
    {constructor, assignment operator} for ... is deprecated beause it has a
    user-declared copy {assignment operator, constructor}") new in recent Clang 
10
    trunk (and which apparently warns about more cases then its GCC 
counterpart, for
    which we already adapted the code in the past, see e.g. the various
    "-Werror=deprecated-copy (GCC trunk towards GCC 9)" commits)
    
    Change-Id: Ie37bd820e6c0c05c74e1a862bb1d4ead5fb7cc9c
    Reviewed-on: https://gerrit.libreoffice.org/83698
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93694
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/include/svl/macitem.hxx b/include/svl/macitem.hxx
index 7a062f2aec47..f796d1d3586b 100644
--- a/include/svl/macitem.hxx
+++ b/include/svl/macitem.hxx
@@ -60,8 +60,6 @@ public:
     ScriptType GetScriptType() const        { return eType; }
 
     bool HasMacro() const { return !aMacName.isEmpty(); }
-
-    SvxMacro& operator=( const SvxMacro& rBase );
 };
 
 inline SvxMacro::SvxMacro( const OUString &rMacName, const OUString &rLibName,
diff --git a/package/source/xstor/xstorage.hxx 
b/package/source/xstor/xstorage.hxx
index d4f48e282627..0c6cc442acde 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -104,12 +104,6 @@ struct StorageHolder_Impl
     css::uno::WeakReference< css::embed::XStorage > m_xWeakRef;
 
     explicit inline StorageHolder_Impl( OStorage* pStorage );
-
-    StorageHolder_Impl( const StorageHolder_Impl& aSH )
-    : m_pPointer( aSH.m_pPointer )
-    , m_xWeakRef( aSH.m_xWeakRef )
-    {
-    }
 };
 
 class SwitchablePersistenceStream;
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index 2dcb9b2f1e0b..6bdd24353285 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -122,7 +122,6 @@ struct ScPivotField
     sal_uInt8   mnDupCount;
 
     explicit ScPivotField( SCCOL nNewCol = 0 );
-    ScPivotField( const ScPivotField& r );
 
     long getOriginalDim() const;
 };
diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx
index 3856eef9aaef..ca9d3496be7a 100644
--- a/sc/inc/scmatrix.hxx
+++ b/sc/inc/scmatrix.hxx
@@ -149,9 +149,6 @@ public:
 
         IterateResult(double fFirst, double fRest, size_t nCount) :
             mfFirst(fFirst), mfRest(fRest), mnCount(nCount) {}
-
-        IterateResult(const IterateResult& r) :
-            mfFirst(r.mfFirst), mfRest(r.mfRest), mnCount(r.mnCount) {}
     };
 
     /** Checks nC or nR for zero and uses GetElementsMax() whether a matrix of
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 3c1ce479a845..111df0a0947c 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -80,14 +80,6 @@ ScPivotField::ScPivotField(SCCOL nNewCol) :
     mnDupCount(0)
 {}
 
-ScPivotField::ScPivotField( const ScPivotField& rPivotField ) :
-    maFieldRef(rPivotField.maFieldRef),
-    mnOriginalDim(rPivotField.mnOriginalDim),
-    nFuncMask(rPivotField.nFuncMask),
-    nCol(rPivotField.nCol),
-    mnDupCount(rPivotField.mnDupCount)
-{}
-
 long ScPivotField::getOriginalDim() const
 {
     return mnOriginalDim >= 0 ? mnOriginalDim : static_cast<long>(nCol);
diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index 5f923774b513..37a895d3673e 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -55,18 +55,6 @@ OUString SvxMacro::GetLanguage()const
     return aLibName;
 }
 
-SvxMacro& SvxMacro::operator=( const SvxMacro& rBase )
-{
-    if( this != &rBase )
-    {
-        aMacName = rBase.aMacName;
-        aLibName = rBase.aLibName;
-        eType = rBase.eType;
-    }
-    return *this;
-}
-
-
 SvxMacroTableDtor& SvxMacroTableDtor::operator=( const SvxMacroTableDtor& rTbl 
)
 {
     if (this != &rTbl)
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index c8ff124af161..bdbab23f08ab 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -165,13 +165,6 @@ class ZSortFly
 public:
     ZSortFly( const SwFrameFormat* pFrameFormat, const SwFormatAnchor* 
pFlyAnchor,
                 sal_uInt32 nArrOrdNum );
-    ZSortFly& operator=( const ZSortFly& rCpy )
-    {
-        pFormat = rCpy.pFormat;
-        pAnchor = rCpy.pAnchor;
-        nOrdNum = rCpy.nOrdNum;
-        return *this;
-    }
 
     bool operator==( const ZSortFly& ) const { return false; }
     bool operator<( const ZSortFly& rCmp ) const
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 22877ca19ea3..b0ea96fc7f51 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6545,11 +6545,6 @@ namespace sw
         {
         }
 
-        Position::Position(const Position &rPos)
-            : maPtNode(rPos.maPtNode), mnPtContent(rPos.mnPtContent)
-        {
-        }
-
         Position::operator SwPosition() const
         {
             SwPosition aRet(maPtNode);
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index bdd625364f09..d178bbbeda9a 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -548,7 +548,6 @@ namespace sw
             sal_Int32 mnPtContent;
         public:
             explicit Position(const SwPosition &rPos);
-            Position(const Position &rPos);
             operator SwPosition() const;
             const SwNodeIndex& GetPtNode() const { return maPtNode; };
             sal_Int32 GetPtContent() const { return mnPtContent; };
diff --git a/xmloff/source/core/attrlist.cxx b/xmloff/source/core/attrlist.cxx
index 805cafdd45b6..5db3e8c27b18 100644
--- a/xmloff/source/core/attrlist.cxx
+++ b/xmloff/source/core/attrlist.cxx
@@ -38,12 +38,6 @@ struct SvXMLTagAttribute_Impl
     {
     }
 
-    SvXMLTagAttribute_Impl( const SvXMLTagAttribute_Impl& r ) :
-        sName(r.sName),
-        sValue(r.sValue)
-    {
-    }
-
     OUString sName;
     OUString sValue;
 };
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index ff55ebd3b7a5..bad5361c1408 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -63,9 +63,6 @@ struct XMLPropertySetMapperEntry_Impl
         const XMLPropertyMapEntry& rMapEntry,
         const rtl::Reference< XMLPropertyHandlerFactory >& rFactory );
 
-    XMLPropertySetMapperEntry_Impl(
-        const XMLPropertySetMapperEntry_Impl& rEntry );
-
     sal_uInt32 GetPropType() const { return nType & XML_TYPE_PROP_MASK; }
 };
 
@@ -85,20 +82,6 @@ 
XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
     assert(pHdl);
 }
 
-XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
-        const XMLPropertySetMapperEntry_Impl& rEntry ) :
-    sXMLAttributeName( rEntry.sXMLAttributeName),
-    sAPIPropertyName( rEntry.sAPIPropertyName),
-    nType( rEntry.nType),
-    nXMLNameSpace( rEntry.nXMLNameSpace),
-    nContextId( rEntry.nContextId),
-    nEarliestODFVersionForExport( rEntry.nEarliestODFVersionForExport ),
-    bImportOnly( rEntry.bImportOnly),
-    pHdl( rEntry.pHdl)
-{
-    assert(pHdl);
-}
-
 struct XMLPropertySetMapper::Impl
 {
     std::vector<XMLPropertySetMapperEntry_Impl> maMapEntries;
commit ed4d8eeca8754c91e22050a4717ec9975f1f8f36
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Mon May 4 13:42:14 2020 +0200
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:47:36 2020 +0200

    tdf#132514 DOCX import: fix lost table style with footer
    
    Table paragraphs collected for table style processing
    were mixed when both body text and footer contain tables,
    i.e. clearing paragraph vector at processing the first table
    resulted missing paragraph vector and table style processing
    for the other one. (Note: only missing bottom paragraph margin
    and line spacing were the problems here, not all table style
    based paragraph settings, as in branch 'master'.)
    
    Now tables in footer, also nested tables collect their
    paragraphs in separated table paragraph vectors.
    
    Regression from commit 6c5da2cd7af5c2d90e4d8e9635ba8c9989c87923
    (tdf#119054 DOCX: fix not table style based bottom margin).
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93415
    Tested-by: Jenkins
    Reviewed-by: László Németh <nem...@numbertext.org>
    
    (cherry picked from commit 81ce88aa80f8e7cde4fdc5b211e9500a3599643c)
    
    Conflicts:
            sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
            writerfilter/source/dmapper/DomainMapperTableHandler.cxx
            writerfilter/source/dmapper/DomainMapperTableManager.cxx
            writerfilter/source/dmapper/DomainMapper_Impl.cxx
            writerfilter/source/dmapper/PropertyMap.hxx
    
    Change-Id: Ib8568d8379cfb7da869120cdc7fe12895252d661
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93525
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf132514.docx 
b/sw/qa/extras/ooxmlexport/data/tdf132514.docx
new file mode 100644
index 000000000000..d32f84104e26
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf132514.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index d460679b50ba..a459e8a57f27 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -480,6 +480,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119054, "tdf119054.docx")
     assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "line", 
"240");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf132514, "tdf132514.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport();
+    if (!pXmlDoc)
+        return;
+    // Keep table style setting, when the footer also contain a table
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:p[2]/w:pPr/w:spacing", "before", 
"0");
+    assertXPath(pXmlDoc, 
"/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:p[2]/w:pPr/w:spacing", "after", 
"0");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
 {
     /*
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx 
b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index a0b214a76555..5a0ee4eb8b16 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -1026,7 +1026,7 @@ void 
DomainMapperTableHandler::ApplyParaProperty(css::beans::PropertyValues aTab
     if (pTableProp != aTableProperties.end())
     {
         uno::Any aValue = pTableProp->Value;
-        for (const auto& rParaProp : m_rDMapper_Impl.m_aParagraphsToEndTable)
+        for (const auto& rParaProp : 
*m_rDMapper_Impl.getTableManager().getCurrentParagraphs())
         {
             // there is no direct paragraph formatting
             if (!rParaProp.m_pPropertyMap->isSet(eId))
@@ -1224,7 +1224,6 @@ void DomainMapperTableHandler::endTable(unsigned int 
nestedTableLevel, bool bTab
     m_aCellProperties.clear();
     m_aRowProperties.clear();
     m_bHadFootOrEndnote = false;
-    m_rDMapper_Impl.m_aParagraphsToEndTable.clear();
 
 #ifdef DBG_UTIL
     TagLogger::getInstance().endElement();
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx 
b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index f4d025739915..618ca603efe6 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -57,6 +57,7 @@ DomainMapperTableManager::DomainMapperTableManager() :
     m_bPushCurrentWidth(false),
     m_bTableSizeTypeInserted(false),
     m_nLayoutType(0),
+    m_aParagraphsToEndTable(),
     m_pTablePropsHandler(new TablePropertiesHandler())
 {
     m_pTablePropsHandler->SetTableManager( this );
@@ -430,6 +431,11 @@ TablePositionHandler* 
DomainMapperTableManager::getCurrentTableRealPosition()
         return nullptr;
 }
 
+TableParagraphVectorPtr DomainMapperTableManager::getCurrentParagraphs( )
+{
+    return m_aParagraphsToEndTable.top( );
+}
+
 void DomainMapperTableManager::setIsInShape(bool bIsInShape)
 {
     m_bIsInShape = bIsInShape;
@@ -446,6 +452,12 @@ void DomainMapperTableManager::startLevel( )
         oCurrentWidth = m_aCellWidths.back()->back();
         m_aCellWidths.back()->pop_back();
     }
+    boost::optional<TableParagraph> oParagraph;
+    if (getTableDepthDifference() > 0 && !m_aParagraphsToEndTable.empty() && 
!m_aParagraphsToEndTable.top()->empty())
+    {
+        oParagraph = m_aParagraphsToEndTable.top()->back();
+        m_aParagraphsToEndTable.top()->pop_back();
+    }
 
     IntVectorPtr pNewGrid( new vector<sal_Int32> );
     IntVectorPtr pNewSpans( new vector<sal_Int32> );
@@ -464,10 +476,14 @@ void DomainMapperTableManager::startLevel( )
     m_aGridBefore.push_back( 0 );
     m_nTableWidth = 0;
     m_nLayoutType = 0;
+    TableParagraphVectorPtr pNewParagraphs( new vector<TableParagraph> );
+    m_aParagraphsToEndTable.push( pNewParagraphs );
 
     // And push it back to the right level.
     if (oCurrentWidth)
         m_aCellWidths.back()->push_back(*oCurrentWidth);
+    if (oParagraph)
+        m_aParagraphsToEndTable.top()->push_back(*oParagraph);
 }
 
 void DomainMapperTableManager::endLevel( )
@@ -511,6 +527,7 @@ void DomainMapperTableManager::endLevel( )
     // Pop back the table position after endLevel as it's used
     // in the endTable method called in endLevel.
     m_aTablePositions.pop_back();
+    m_aParagraphsToEndTable.pop();
 }
 
 void DomainMapperTableManager::endOfCellAction()
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx 
b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
index 219986870ef3..a3a8487b22d9 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx
@@ -65,6 +65,8 @@ class DomainMapperTableManager : public TableManager
     bool m_bTableSizeTypeInserted;
     /// Table layout algorithm, IOW if we should consider fixed column width 
or not.
     sal_uInt32 m_nLayoutType;
+    /// Collected table paragraphs for table style handling
+    std::stack< TableParagraphVectorPtr > m_aParagraphsToEndTable;
 
     std::unique_ptr<TablePropertiesHandler> m_pTablePropsHandler;
     PropertyMapPtr            m_pStyleProps;
@@ -94,6 +96,7 @@ public:
     IntVectorPtr const & getCurrentSpans( );
     IntVectorPtr const & getCurrentCellWidths( );
     sal_uInt32 getCurrentGridBefore( );
+    TableParagraphVectorPtr getCurrentParagraphs( );
 
     /// Turn the attributes collected so far in m_aTableLook into a property 
and clear the container.
     void finishTableLook();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 5535db1cc1c5..d37082120bdd 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1739,7 +1739,7 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap, con
                 if (xParaProps && m_nTableDepth > 0)
                 {
                     TableParagraph aPending{pParaContext, xParaProps};
-                    m_aParagraphsToEndTable.push_back(aPending);
+                    
getTableManager().getCurrentParagraphs()->push_back(aPending);
                 }
 
                 // tdf#118521 set paragraph top or bottom margin based on the 
paragraph style
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 6b1548af83fd..a37b4913bb5b 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -422,13 +422,6 @@ struct SymbolData
     { }
 };
 
-/// Information about a paragraph to be finished after a table end.
-struct TableParagraph
-{
-    PropertyMapPtr m_pPropertyMap;
-    css::uno::Reference<css::beans::XPropertySet> m_rPropertySet;
-};
-
 class DomainMapper;
 class DomainMapper_Impl final
 {
@@ -1069,9 +1062,6 @@ public:
     bool m_bIsActualParagraphFramed;
     std::vector<css::uno::Any> aFramedRedlines;
 
-    /// Table paragraph properties may need style update based on table style
-    std::vector<TableParagraph> m_aParagraphsToEndTable;
-
 private:
     void PushPageHeaderFooter(bool bHeader, SectionPropertyMap::PageType 
eType);
     // Start a new index section; if needed, finish current paragraph
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx 
b/writerfilter/source/dmapper/PropertyMap.hxx
index 64e9969fa038..608496083636 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -576,6 +576,15 @@ public:
 
 typedef tools::SvRef< TablePropertyMap > TablePropertyMapPtr;
 
+/// Information about a paragraph to be finished after a table end.
+struct TableParagraph
+{
+    PropertyMapPtr m_pPropertyMap;
+    css::uno::Reference<css::beans::XPropertySet> m_rPropertySet;
+};
+
+typedef std::shared_ptr< std::vector<TableParagraph> > TableParagraphVectorPtr;
+
 } // namespace dmapper
 } // namespace writerfilter
 
commit 1a2db42562feec95af98e43d76107058e8e68102
Author:     Mert Tumer <mert.tu...@collabora.com>
AuthorDate: Thu Apr 9 19:36:53 2020 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:46:16 2020 +0200

    mobile: fix double tap on chart doesn't get into editmode
    
    Sometimes double tapping on a chart when it is not selected
    in the beginning, starts the input mode instead of chart
    editing.
    
    Change-Id: Iee2a01c1ac909ac4060e91cdacfa9161dc4f1c3b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91992
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    (cherry picked from commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92291
    Tested-by: Jenkins

diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index bd6ac3c96c09..eb05faccc730 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -25,6 +25,7 @@
 #include <svx/ImageMapInfo.hxx>
 #include <sfx2/dispatch.hxx>
 #include <sfx2/viewfrm.hxx>
+#include <sfx2/lokhelper.hxx>
 
 #include <sc.hrc>
 #include <fudraw.hxx>
@@ -34,6 +35,7 @@
 #include <userdat.hxx>
 #include <docsh.hxx>
 #include <drawview.hxx>
+#include <comphelper/lok.hxx>
 
 // base class for draw module specific functions
 FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
@@ -244,6 +246,15 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                 if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
                 {
                     SdrObject* pObj = rMarkList.GetMark( 0 
)->GetMarkedSdrObj();
+                    bool isMobilePhone = 
comphelper::LibreOfficeKit::isActive() && 
comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView());
+                    // Double tapping on charts on phone may result in 
activating the edit mode which is not wanted.
+                    // It happens due to the delay of selection message of the 
object from kit to javascript
+                    // in that case F2 is sent instead of double click
+                    if (isMobilePhone && ScDocument::IsChart(pObj))
+                    {
+                        rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( 
pObj ), 0 );
+                        break;
+                    }
                     if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) )        
    // start text edit for suitable object
                         bReturn = true;
                 }
commit 458d8a48be21c06cfad6e99b9aa0732c8fceaa92
Author:     Mert Tumer <mert.tu...@collabora.com>
AuthorDate: Fri Apr 3 15:34:37 2020 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:44:52 2020 +0200

    mobile: cannot change linestyle on impress
    
    Change-Id: I6e63c951f7a7d4fc70eed424cc2f7da60dbad9b5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91632
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    (cherry picked from commit e4f28d0642e4663d558a55e99ec1cc2ea9ad27ed)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92172
    Tested-by: Jenkins

diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 201a05e02bb7..95a300416734 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -22,6 +22,7 @@
 #include <vcl/uitest/logger.hxx>
 
 #include <comphelper/string.hxx>
+#include <comphelper/lok.hxx>
 
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
@@ -995,7 +996,11 @@ ListBoxUIObject::~ListBoxUIObject()
 void ListBoxUIObject::execute(const OUString& rAction,
         const StringMap& rParameters)
 {
-    if (!mxListBox->IsEnabled() || !mxListBox->IsReallyVisible())
+    if (!mxListBox->IsEnabled())
+        return;
+
+    bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
+    if (!isTiledRendering && !mxListBox->IsReallyVisible())
         return;
 
     if (rAction == "SELECT")
commit d1539530ccc5139c4baa030fa52ddcf07ea698bc
Author:     Mert Tumer <mert.tu...@collabora.com>
AuthorDate: Tue Mar 31 15:04:38 2020 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:40:22 2020 +0200

    added Clear Direct Formatting button to sidebar
    
    Change-Id: I8d723f50cdc9bb768c082b7b5d9eafe1a6d7f9f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91398
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/svx/uiconfig/ui/sidebartextpanel.ui 
b/svx/uiconfig/ui/sidebartextpanel.ui
index c2c995490525..64b19a115db2 100644
--- a/svx/uiconfig/ui/sidebartextpanel.ui
+++ b/svx/uiconfig/ui/sidebartextpanel.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.22.1 -->
 <interface domain="svx">
   <requires lib="gtk+" version="3.18"/>
   <requires lib="LibreOffice" version="1.0"/>
@@ -273,7 +273,7 @@
               <object class="sfxlo-SidebarToolBox" id="colorbar_background">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                 <child>
+                <child>
                   <object class="GtkMenuToolButton" id="backgroundcolor">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
@@ -293,6 +293,31 @@
                 <property name="position">2</property>
               </packing>
             </child>
+            <child>
+              <object class="sfxlo-SidebarToolBox" id="resetattr">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="show_arrow">False</property>
+                <child>
+                  <object class="GtkToolButton" id="resetattributes">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="is_important">True</property>
+                    <property 
name="action_name">.uno:ResetAttributes</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="homogeneous">True</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">3</property>
+              </packing>
+            </child>
             <child>
               <object class="sfxlo-SidebarToolBox" id="position">
                 <property name="visible">True</property>
commit 59d5af1214b467e959ee6764978ef650244632e0
Author:     Mert Tumer <mert.tu...@collabora.com>
AuthorDate: Wed Feb 26 18:48:46 2020 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:39:53 2020 +0200

    fix ToC links give unhelpful url popups
    
    core expects ctrl+click for internal links too and
    it should not expect it if it is tiled rendering
    
    Change-Id: Id841f0e9729e46f00988ea0b4eb29bd65098a740
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89559
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    (cherry picked from commit 3fe9dfca2d44d9e41ee329883f199359c673f382)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89919
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index db03e164110c..ed493192282b 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2194,14 +2194,18 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
         if ( GetEditUrl( rMEvt.GetPosPixel(), &aName, &aUrl, &aTarget ) )
         {
             nMouseStatus = SC_GM_NONE;              // Ignore double-click
-
+            bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
             // ScGlobal::OpenURL() only understands Calc A1 style syntax.
             // Convert it to Calc A1 before calling OpenURL().
             if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
             {
+                if (aUrl.startsWith("#")) {
+                        ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
+                        return;
+                }
                 // in mobile view there is no ctrl+click and for hyperlink 
popup
                 // the cell coordinates must be sent along with click position 
for elegance
-                if (comphelper::LibreOfficeKit::isActive() &&
+                if (isTiledRendering &&
                      
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
                 {
                     ScTabViewShell* pViewShell = pViewData->GetViewShell();
@@ -2252,7 +2256,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt 
)
                     aBuf.append('#');
                     OUString 
aUrlCalcA1(aTempAddr.Format(ScRefFlags::ADDR_ABS_3D, pDoc, 
formula::FormulaGrammar::CONV_OOO));
                     aBuf.append(aUrlCalcA1);
-                    ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
+                    ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget, 
isTiledRendering);
                 }
             }
 
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 0cf38b1632b2..8aaa7a5cdb2a 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4674,6 +4674,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
                             }
                             else if ( IsAttrAtPos::InetAttr == 
aContentAtPos.eContentAtPos )
                             {
+                                if (comphelper::LibreOfficeKit::isActive())
+                                {
+                                    OUString val((*static_cast<const 
SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr)).GetValue());
+                                    if (val.startsWith("#"))
+                                        bExecHyperlinks = true;
+                                }
                                 if ( bExecHyperlinks && 
aContentAtPos.aFnd.pAttr )
                                     rSh.ClickToINetAttr( *static_cast<const 
SwFormatINetFormat*>(aContentAtPos.aFnd.pAttr), nFilter );
                             }
commit e6b1027872563f69c2af82f23e23c1e863a59efe
Author:     Mert Tumer <mert.tu...@collabora.com>
AuthorDate: Thu Feb 20 18:33:04 2020 +0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:39:33 2020 +0200

    send hyperlinkclicked callback on calc mobile
    
    for opening links ctrl+click must be pressed
    but in mobile this cant be done
    This patch allows it to send the callback and also
    cell coordinates for hyperlink popup
    
    Change-Id: I8c0fac167627ef449d9cf20a36a7a5a77978ae0f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89121
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Michael Meeks <michael.me...@collabora.com>
    (cherry picked from commit 9bfa939f87f28cdaed2a24c3dc5f9a21004b19da)
    
    Blind build fix for Android
    
    After 9bfa939f87f28cdaed2a24c3dc5f9a21004b19da
    
    Also, replace chained OStringBuffer::append() with operator+
    
    Change-Id: I7012667b3c4173cc0193720e0197992e5942bc7d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89164
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89693
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 17484920d0ba..db03e164110c 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2198,7 +2198,26 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
             // ScGlobal::OpenURL() only understands Calc A1 style syntax.
             // Convert it to Calc A1 before calling OpenURL().
             if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
-                ScGlobal::OpenURL(aUrl, aTarget);
+            {
+                // in mobile view there is no ctrl+click and for hyperlink 
popup
+                // the cell coordinates must be sent along with click position 
for elegance
+                if (comphelper::LibreOfficeKit::isActive() &&
+                     
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+                {
+                    ScTabViewShell* pViewShell = pViewData->GetViewShell();
+                    Point aPos = rMEvt.GetPosPixel();
+                    SCCOL nPosX;
+                    SCROW nPosY;
+                    pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, 
nPosX, nPosY );
+                    auto pForTabView = dynamic_cast<const ScTabViewShell 
*>(pViewShell);
+                    OString aCursor = 
pForTabView->GetViewData().describeCellCursorAt(nPosX, nPosY);
+                    double fPPTX = pForTabView->GetViewData().GetPPTX();
+                    int mouseX = aPos.X() / fPPTX;
+                    OString aMsg(aUrl.toUtf8() + " coordinates: " + aCursor + 
", " + OString::number(mouseX));
+                    
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, 
aMsg.getStr());
+                } else
+                    ScGlobal::OpenURL(aUrl, aTarget);
+            }
             else
             {
                 ScAddress aTempAddr;
commit 736432dc8edbbc3248aaa9de45064f540a6cd7ca
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Thu Mar 5 11:43:51 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:37:03 2020 +0200

    lok: get the formula input bar focused after inserting '='
    
    Change-Id: I7f86ea7135fcb4071cc0162c233c63be6c9485bd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92083
    Tested-by: Jenkins
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 95c15e8c557d..c1d1e6b50445 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -403,6 +403,8 @@ void ScInputWindow::Select()
                 EditView* pView = aTextWindow.GetEditView();
                 if (pView)
                 {
+                    if (comphelper::LibreOfficeKit::isActive())
+                        TextGrabFocus();
                     pView->SetSelection( ESelection(0, nStartPos, 0, nEndPos) 
);
                     pScMod->InputChanged(pView);
                     SetOkCancelMode();
commit dbb73165d4ca969dde0a332d9fb46a4b0296be09
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Thu Feb 20 14:47:13 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:35:52 2020 +0200

    formula manager: wrong category returned by ScFuncDesc::getCategory
    
    In the function manager the index associated to each category starts
    from 0 while in ScFuncDesc starts from 1 (data member
    ScFuncDesc::nCategory)
    
    Change-Id: I92d0cd2a1a2871785e45faafd797dcf3a500bec7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89198
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Dennis Francis <dennis.fran...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90072
    Tested-by: Jenkins
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index abeccaba4b9f..8a6c11e3a14f 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -280,7 +280,7 @@ OUString ScFuncDesc::getFunctionName() const
 
 const formula::IFunctionCategory* ScFuncDesc::getCategory() const
 {
-    return ScGlobal::GetStarCalcFunctionMgr()->getCategory(nCategory);
+    return ScGlobal::GetStarCalcFunctionMgr()->getCategory(nCategory - 1);
 }
 
 OUString ScFuncDesc::getDescription() const
commit 0bc994583382b32f8b107380fbde05602355d00f
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Wed Feb 12 14:41:17 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:35:28 2020 +0200

    lok: calc: unwanted cell range selection occurs when clicking on a cell
    
    When user clicks on a cell after the browser has lost focus user gets
    the cell range from A1 to the current clicked cell selected
    
    Change-Id: I1dd495f42ca7e5ee8cad1d2354dcebc0cb05d65f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88549
    Tested-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90071
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index ee8f8a9d985f..17484920d0ba 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2666,7 +2666,7 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt )
             MouseButtonUp( aUpEvt );
         }
     }
-    else
+    else if ( !comphelper::LibreOfficeKit::isActive() )
         MouseMove( rMEvt );
 }
 
commit aced8f7d53d1627606677c902565e91c37a551f2
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Thu Feb 6 11:19:32 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:35:02 2020 +0200

    lok: calc: formula input bar: set text selection as requested by client
    
    Change-Id: If04ed3c1637249329530a73d20df9b9296d1004e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88089
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Tested-by: Marco Cecchetti <marco.cecche...@collabora.com>
    (cherry picked from commit 01f0d42f5ca9fb0e6e45b7bfcf51cb33c1a27bec)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88117
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 28001b4a68f3..ad75b751a190 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2827,10 +2827,11 @@ void DesktopLOKTest::testABI()
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(57), offsetof(struct 
_LibreOfficeKitDocumentClass, renderFontOrientation));
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(58), offsetof(struct 
_LibreOfficeKitDocumentClass, paintWindowForView));
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(59), offsetof(struct 
_LibreOfficeKitDocumentClass, completeFunction));
+    CPPUNIT_ASSERT_EQUAL(documentClassOffset(60), offsetof(struct 
_LibreOfficeKitDocumentClass, setWindowTextSelection));
 
     // Extending is fine, update this, and add new assert for the offsetof the
     // new method
-    CPPUNIT_ASSERT_EQUAL(documentClassOffset(60), sizeof(struct 
_LibreOfficeKitDocumentClass));
+    CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 776d0ec371f5..1ca1d6e7144a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1040,6 +1040,11 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis,
                                const char* pCommand,
                                const char* pArguments,
                                bool bNotifyWhenFinished);
+static void doc_setWindowTextSelection(LibreOfficeKitDocument* pThis,
+                                       unsigned nLOKWindowId,
+                                       bool swap,
+                                       int nX,
+                                       int nY);
 static void doc_setTextSelection (LibreOfficeKitDocument* pThis,
                                   int nType,
                                   int nX,
@@ -1204,6 +1209,7 @@ LibLODocument_Impl::LibLODocument_Impl(const 
uno::Reference <css::lang::XCompone
         m_pDocumentClass->sendDialogEvent = doc_sendDialogEvent;
         m_pDocumentClass->postUnoCommand = doc_postUnoCommand;
         m_pDocumentClass->setTextSelection = doc_setTextSelection;
+        m_pDocumentClass->setWindowTextSelection = doc_setWindowTextSelection;
         m_pDocumentClass->getTextSelection = doc_getTextSelection;
         m_pDocumentClass->getSelectionType = doc_getSelectionType;
         m_pDocumentClass->getClipboard = doc_getClipboard;
@@ -3934,6 +3940,31 @@ static void doc_setTextSelection(LibreOfficeKitDocument* 
pThis, int nType, int n
     pDoc->setTextSelection(nType, nX, nY);
 }
 
+static void doc_setWindowTextSelection(LibreOfficeKitDocument* /*pThis*/, 
unsigned nLOKWindowId, bool swap, int nX, int nY)
+{
+    comphelper::ProfileZone aZone("doc_setWindowTextSelection");
+
+    SolarMutexGuard aGuard;
+    SetLastExceptionMsg();
+
+    VclPtr<Window> pWindow = vcl::Window::FindLOKWindow(nLOKWindowId);
+    if (!pWindow)
+    {
+        SetLastExceptionMsg("Document doesn't support dialog rendering, or 
window not found.");
+        return;
+    }
+
+
+    Size aOffset(pWindow->GetOutOffXPixel(), pWindow->GetOutOffYPixel());
+    Point aCursorPos(nX, nY);
+    aCursorPos.Move(aOffset);
+    sal_uInt16 nModifier = swap ? KEY_MOD1 + KEY_MOD2 : KEY_SHIFT;
+
+    MouseEvent aCursorEvent(aCursorPos, 1, MouseEventModifiers::SIMPLECLICK, 
0, nModifier);
+    Application::PostMouseEvent(VclEventId::WindowMouseButtonDown, pWindow, 
&aCursorEvent);
+    Application::PostMouseEvent(VclEventId::WindowMouseButtonUp, pWindow, 
&aCursorEvent);
+}
+
 static bool getFromTransferrable(
     const css::uno::Reference<css::datatransfer::XTransferable> &xTransferable,
     const OString &aInMimeType, OString &aRet);
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index b4278625ccb0..6203c11fb044 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -439,6 +439,13 @@ struct _LibreOfficeKitDocumentClass
     /// @see lok::Document::completeFunction().
     void (*completeFunction) (LibreOfficeKitDocument* pThis, int nIndex);
 
+    /// @see lok::Document::setWindowTextSelection
+    void (*setWindowTextSelection) (LibreOfficeKitDocument* pThis,
+                                    unsigned nWindowId,
+                                    bool bSwap,
+                                    int nX,
+                                    int nY);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 19f0b2663552..cbb5a1d9d51a 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -767,6 +767,19 @@ public:
         mpDoc->pClass->completeFunction(mpDoc, nIndex);
     }
 
+    /**
+     * Sets the start or end of a text selection for a dialog.
+     *
+     * @param nWindowId
+     * @param bSwap swap anchor and cursor position of current selection
+     * @param nX horizontal position in document coordinates
+     * @param nY vertical position in document coordinates
+     */
+    void setWindowTextSelection(unsigned nWindowId, bool bSwap, int nX, int nY)
+    {
+        mpDoc->pClass->setWindowTextSelection(mpDoc, nWindowId, bSwap, nX, nY);
+    }
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index cb3b19056bcd..41d0d5f89ec9 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -119,7 +119,9 @@ bool SelectionEngine::SelMouseButtonDown( const MouseEvent& 
rMEvt )
         return false;
 
     sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods;
-    if ( nModifier & KEY_MOD2 )
+    bool nSwap = comphelper::LibreOfficeKit::isActive() && (nModifier & 
KEY_MOD1) && (nModifier & KEY_MOD2);
+
+    if ( !nSwap && (nModifier & KEY_MOD2) )
         return false;
     // in SingleSelection: filter Control-Key,
     // so that a D&D can be also started with a Ctrl-Click
@@ -139,6 +141,13 @@ bool SelectionEngine::SelMouseButtonDown( const 
MouseEvent& rMEvt )
         nModifier = 0;
     }
 
+    if (nSwap)
+    {
+        pFunctionSet->CreateAnchor();
+        pFunctionSet->SetCursorAtPoint( aPos );
+        return true;
+    }
+
     switch ( nModifier )
     {
         case 0:     // KEY_NO_KEY
commit 45fba9cf381aa43ee5bf71a5e47c1f6afb253063
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Wed Jan 29 12:09:27 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:34:36 2020 +0200

    lok: avoid to send visible cursor msg for formula bar edit view
    
    Cursor visible msg should be sent only if the window linked to the
    edit view is the document window.
    
    Change-Id: Ib4001dbddd191b06fa02d5b8ddab14460270b327
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87680
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Tested-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90070
    Tested-by: Jenkins

diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 8c7ab6058e8e..ec4aae63b63a 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -486,6 +486,10 @@ void EditView::ShowCursor( bool bGotoCursor, bool 
bForceVisCursor, bool bActivat
 
         if (pImpEditView->mpViewShell && !bActivate)
         {
+            VclPtr<vcl::Window> pParent = 
pImpEditView->pOutWin->GetParentWithLOKNotifier();
+            if (pParent && pParent->GetLOKWindowId() != 0)
+                return;
+
             OString aPayload = OString::boolean(true);
             
pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE,
 aPayload.getStr());
             
pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, 
"visible", aPayload);
@@ -499,6 +503,10 @@ void EditView::HideCursor(bool bDeactivate)
 
     if (pImpEditView->mpViewShell && !bDeactivate)
     {
+        VclPtr<vcl::Window> pParent = 
pImpEditView->pOutWin->GetParentWithLOKNotifier();
+        if (pParent && pParent->GetLOKWindowId() != 0)
+            return;
+
         OString aPayload = OString::boolean(false);
         
pImpEditView->mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE,
 aPayload.getStr());
         
pImpEditView->mpViewShell->NotifyOtherViews(LOK_CALLBACK_VIEW_CURSOR_VISIBLE, 
"visible", aPayload);
commit aa5c2b63f623906bed30996d2fd979f8cf3a2487
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Tue Jan 14 14:35:11 2020 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:34:12 2020 +0200

    lok: calc: send text selection rectangles for the input bar
    
    Change-Id: I3caeaddd7a5ddc6e496650539b88e2fd81b37e6e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86790
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90069
    Tested-by: Jenkins
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index ed67fcb887d3..e7e1c661fef1 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -384,6 +384,33 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, 
vcl::Region* pRegion,
 
         if (comphelper::LibreOfficeKit::isActive() && mpViewShell && 
!pOldRegion && pOutWin)
         {
+            VclPtr<vcl::Window> pParent = pOutWin->GetParentWithLOKNotifier();
+            if (pParent && pParent->GetLOKWindowId() != 0)
+            {
+                const long nX = pOutWin->GetOutOffXPixel() - 
pParent->GetOutOffXPixel();
+                const long nY = pOutWin->GetOutOffYPixel() - 
pParent->GetOutOffYPixel();
+
+                std::vector<tools::Rectangle> aRectangles;
+                pRegion->GetRegionRectangles(aRectangles);
+
+                std::vector<OString> v;
+                for (tools::Rectangle & rRectangle : aRectangles)
+                {
+                    rRectangle = pOutWin->LogicToPixel(rRectangle);
+                    rRectangle.Move(nX, nY);
+                    v.emplace_back(rRectangle.toString().getStr());
+                }
+                OString sRectangle = comphelper::string::join("; ", v);
+
+                const vcl::ILibreOfficeKitNotifier* pNotifier = 
pParent->GetLOKNotifier();
+                const OUString rAction("text_selection");
+                std::vector<vcl::LOKPayloadItem> aItems;
+                aItems.emplace_back("rectangles", sRectangle);
+                pNotifier->notifyWindow(pParent->GetLOKWindowId(), rAction, 
aItems);
+                pPolyPoly.reset();
+                return;
+            }
+
             pOutWin->Push(PushFlags::MAPMODE);
             if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::MapTwip)
             {
@@ -1715,6 +1742,19 @@ void ImpEditView::DeselectAll()
     aNewSelection.Min() = aNewSelection.Max();
     SetEditSelection(aNewSelection);
     // const_cast<EditPaM&>(GetEditSelection().Min()) = 
GetEditSelection().Max();
+
+    if (comphelper::LibreOfficeKit::isActive() && mpViewShell)
+    {
+        VclPtr<vcl::Window> pParent = pOutWin->GetParentWithLOKNotifier();
+        if (pParent && pParent->GetLOKWindowId())
+        {
+            const vcl::ILibreOfficeKitNotifier* pNotifier = 
pParent->GetLOKNotifier();
+            const OUString rAction("text_selection");
+            std::vector<vcl::LOKPayloadItem> aItems;
+            aItems.emplace_back("rectangles", "");
+            pNotifier->notifyWindow(pParent->GetLOKWindowId(), rAction, 
aItems);
+        }
+    }
 }
 
 bool ImpEditView::IsSelectionAtPoint( const Point& rPosPixel )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index f52a0f02b918..95c15e8c557d 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1488,6 +1488,9 @@ void ScTextWnd::InitEditEngine()
     mpEditView = std::make_unique<EditView>(mpEditEngine.get(), this);
     mpEditView->SetInsertMode(bIsInsertMode);
 
+    if (comphelper::LibreOfficeKit::isActive())
+        mpEditView->RegisterViewShell(mpViewShell);
+
     // Text from Clipboard is taken over as ASCII in a single row
     EVControlBits n = mpEditView->GetControlWord();
     mpEditView->SetControlWord( n | EVControlBits::SINGLELINEPASTE );
@@ -2004,6 +2007,8 @@ void ScTextWnd::MakeDialogEditView()
     mpEditEngine->SetUpdateMode( true );
 
     mpEditView = std::make_unique<EditView>(mpEditEngine.get(), this);
+    if (comphelper::LibreOfficeKit::isActive())
+        mpEditView->RegisterViewShell(mpViewShell);
     mpEditEngine->InsertView( mpEditView.get(), EE_APPEND );
 
     Resize();
commit 90736b93895063df41e9bc68cba801a4a15902d9
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Thu Dec 19 12:22:59 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 11:33:43 2020 +0200

    tdf#129394: Create formula bar also in non-DESKTOP case
    
    Having SfxWorkWindow::bIsFullScreen set to true prevented the formula
    bar from being created.
    
    Change-Id: I17196aae270e67ab1eb960dd42f4ebb4e0ae86b1
    Reviewed-on: https://gerrit.libreoffice.org/85522
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>
    (cherry picked from commit da91403315f76ae36da6db6729f5b2a2870e3aa2)

diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 5feb326243fc..413f26890290 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -462,11 +462,10 @@ SfxWorkWindow::SfxWorkWindow( vcl::Window *pWin, SfxFrame 
*pFrm, SfxFrame* pMast
     bDockingAllowed(true),
     bInternalDockingAllowed(true),
     bAllChildrenVisible(true),
-#if HAVE_FEATURE_DESKTOP
     bIsFullScreen( false ),
+#if HAVE_FEATURE_DESKTOP
     bShowStatusBar( true ),
 #else
-    bIsFullScreen( sal_True ),
     bShowStatusBar( sal_False ),
 #endif
     m_nLock( 0 ),
commit e45ac7edaf0520a80ddc4e0880e41d9f8e6be61a
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Tue Dec 10 10:57:32 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 10:52:51 2020 +0200

    lok: calc: zoomed text entry not rendered
    
    Change-Id: I829966d81bd68571a0651feb458a817587e4d88e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/84992
    Tested-by: Jenkins
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9426c8842bf0..2f1285e1a4e2 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -945,8 +945,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
                             rDevice.SetMapMode(aDrawMode);
 
                             static const double twipFactor = 15 * 1.76388889; 
// 26.45833335
-                            aOrigin = Point(aOrigin.getX() * twipFactor,
-                                            aOrigin.getY() * twipFactor);
+                            // keep into account the zoom factor
+                            aOrigin = Point((aOrigin.getX() * twipFactor) / 
static_cast<double>(aDrawMode.GetScaleX()),
+                                            (aOrigin.getY() * twipFactor) / 
static_cast<double>(aDrawMode.GetScaleY()));
+
                             MapMode aNew = rDevice.GetMapMode();
                             aNew.SetOrigin(aOrigin);
                             rDevice.SetMapMode(aNew);
@@ -1017,8 +1019,9 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, 
const ScTableInfo& rTableI
             aOrigin.setX(aOrigin.getX() / TWIPS_PER_PIXEL + nScrX);
             aOrigin.setY(aOrigin.getY() / TWIPS_PER_PIXEL + nScrY);
             static const double twipFactor = 15 * 1.76388889; // 26.45833335
-            aOrigin = Point(aOrigin.getX() * twipFactor,
-                            aOrigin.getY() * twipFactor);
+            // keep into account the zoom factor
+            aOrigin = Point((aOrigin.getX() * twipFactor) / 
static_cast<double>(aDrawMode.GetScaleX()),
+                            (aOrigin.getY() * twipFactor) / 
static_cast<double>(aDrawMode.GetScaleY()));
             MapMode aNew = rDevice.GetMapMode();
             aNew.SetOrigin(aOrigin);
             rDevice.SetMapMode(aNew);
commit 195d1bb087a497fffe5d9a322ba75f9372110eab
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Wed Nov 27 22:53:38 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 10:52:23 2020 +0200

    lok: formula bar: function completion
    
    lok clients can request to complete a function name partially typed in
    the formula input box.
    
    Change-Id: I8771fd4d2a7f79c20138d9183162da23a92f2ba4
    Reviewed-on: https://gerrit.libreoffice.org/83984
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Tested-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/84258
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 6962bc36e182..28001b4a68f3 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2826,10 +2826,11 @@ void DesktopLOKTest::testABI()
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(56), offsetof(struct 
_LibreOfficeKitDocumentClass, sendDialogEvent));
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(57), offsetof(struct 
_LibreOfficeKitDocumentClass, renderFontOrientation));
     CPPUNIT_ASSERT_EQUAL(documentClassOffset(58), offsetof(struct 
_LibreOfficeKitDocumentClass, paintWindowForView));
+    CPPUNIT_ASSERT_EQUAL(documentClassOffset(59), offsetof(struct 
_LibreOfficeKitDocumentClass, completeFunction));
 
     // Extending is fine, update this, and add new assert for the offsetof the
     // new method
-    CPPUNIT_ASSERT_EQUAL(documentClassOffset(59), sizeof(struct 
_LibreOfficeKitDocumentClass));
+    CPPUNIT_ASSERT_EQUAL(documentClassOffset(60), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 806f43c30118..776d0ec371f5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1133,6 +1133,7 @@ static size_t 
doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
 static void doc_resizeWindow(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId,
                              const int nWidth, const int nHeight);
 
+static void doc_completeFunction(LibreOfficeKitDocument* pThis, int nIndex);
 } // extern "C"
 
 namespace {
@@ -1244,6 +1245,7 @@ LibLODocument_Impl::LibLODocument_Impl(const 
uno::Reference <css::lang::XCompone
         m_pDocumentClass->postWindowGestureEvent = doc_postWindowGestureEvent;
 
         m_pDocumentClass->createViewWithOptions = doc_createViewWithOptions;
+        m_pDocumentClass->completeFunction = doc_completeFunction;
 
         gDocumentClass = m_pDocumentClass;
     }
@@ -5441,6 +5443,21 @@ static void doc_resizeWindow(LibreOfficeKitDocument* 
/*pThis*/, unsigned nLOKWin
     pWindow->SetSizePixel(Size(nWidth, nHeight));
 }
 
+static void doc_completeFunction(LibreOfficeKitDocument* pThis, int nIndex)
+{
+    SolarMutexGuard aGuard;
+    SetLastExceptionMsg();
+
+    ITiledRenderable* pDoc = getTiledRenderable(pThis);
+    if (!pDoc)
+    {
+        SetLastExceptionMsg("Document doesn't support tiled rendering");
+        return;
+    }
+
+    pDoc->completeFunction(nIndex);
+}
+
 static char* lo_getError (LibreOfficeKit *pThis)
 {
     comphelper::ProfileZone aZone("lo_getError");
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index a486886c15de..b4278625ccb0 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -436,6 +436,9 @@ struct _LibreOfficeKitDocumentClass
                                 const double dpiscale,
                                 int viewId);
 
+    /// @see lok::Document::completeFunction().
+    void (*completeFunction) (LibreOfficeKitDocument* pThis, int nIndex);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 318bf943cca9..19f0b2663552 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -757,6 +757,16 @@ public:
         mpDoc->pClass->removeTextContext(mpDoc, nWindowId, nBefore, nAfter);
     }
 
+    /**
+     * Select the Calc function to be pasted into the formula input box
+     *
+     * @param nIndex is the index of the selected function
+     */
+    void completeFunction(int nIndex)
+    {
+        mpDoc->pClass->completeFunction(mpDoc, nIndex);
+    }
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index fc4be7c3805e..e26c1387b6e1 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -284,6 +284,11 @@ public:
      * bDuplicate: to copy (true), or to move (false).
      */
     virtual void moveSelectedParts(int /*nPosition*/, bool /*bDuplicate*/) {}
+
+    /// @see lok::Document::completeFunction().
+    virtual void completeFunction(int /*nIndex*/)
+    {
+    }
 };
 } // namespace vcl
 
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index bb8174132577..46461142af3d 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -386,6 +386,9 @@ public:
 
     /// @see vcl::ITiledRenderable::getPostItsPos().
     OUString getPostItsPos() override;
+
+    /// @see vcl::ITiledRenderable::completeFunction().
+    virtual void completeFunction(int nIndex) override;
 };
 
 class ScDrawPagesObj final : public cppu::WeakImplHelper<
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index a620908c07f4..bf88e234ddc9 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <iterator>
 #include <memory>
 #include <string_view>
 
@@ -1576,6 +1577,21 @@ void ScInputHandler::PasteFunctionData()
         pActiveView->ShowCursor();
 }
 
+void ScInputHandler::LOKPasteFunctionData( sal_uInt32 nIndex )
+{
+    if (pFormulaData  && miAutoPosFormula != pFormulaData->end() && nIndex < 
pFormulaData->size())
+    {
+        auto aPos = pFormulaData->begin();
+        sal_uInt32 nCurIndex = std::distance(aPos, miAutoPosFormula);
+        nIndex += nCurIndex;
+        if (nIndex >= pFormulaData->size())
+            nIndex -= pFormulaData->size();
+        std::advance(aPos, nIndex);
+        miAutoPosFormula = aPos;
+        PasteFunctionData();
+    }
+}
+
 // Calculate selection and display as tip help
 static OUString lcl_Calculate( const OUString& rFormula, ScDocument* pDoc, 
const ScAddress &rPos )
 {
diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx
index ff60dcdbb4c3..71dfec832de5 100644
--- a/sc/source/ui/inc/inputhdl.hxx
+++ b/sc/source/ui/inc/inputhdl.hxx
@@ -287,6 +287,8 @@ public:
     static ReferenceMark GetReferenceMark( ScViewData& rViewData, ScDocShell* 
pDocSh,
                                     long nX1, long nX2, long nY1, long nY2,
                                     long nTab, const Color& rColor );
+
+    void            LOKPasteFunctionData( sal_uInt32 nIndex );
 };
 
 //  ScInputHdlState
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 8f831dfca9ed..6cd831b802bc 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1069,6 +1069,16 @@ OUString ScModelObj::getPostItsPos()
     return OUString::fromUtf8(aStream.str().c_str());
 }
 
+void ScModelObj::completeFunction(int nIndex)
+{
+    ScInputHandler* pHdl = SC_MOD()->GetInputHdl();
+    if (pHdl)
+    {
+        assert(nIndex >= 0);
+        pHdl->LOKPasteFunctionData(nIndex);
+    }
+}
+
 void ScModelObj::initializeForTiledRendering(const 
css::uno::Sequence<css::beans::PropertyValue>& /*rArguments*/)
 {
     SolarMutexGuard aGuard;
commit 581767d4d66362b344bd9cd1dcf6e765d8d2b4f8
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Mon Nov 25 21:35:42 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 10:51:58 2020 +0200

    lok: calc formula bar tunneling: function list callback
    
    Added a lok callback for sending the list of functions matching the
    current characters typed by the user.
    
    Change-Id: Ia971fc55ec5eb961b4098592a8049dd0eed3ba14
    Reviewed-on: https://gerrit.libreoffice.org/83750
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0ec91fe23d58..806f43c30118 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1394,6 +1394,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
         case LOK_CALLBACK_TEXT_VIEW_SELECTION:
         case LOK_CALLBACK_INVALIDATE_HEADER:
         case LOK_CALLBACK_WINDOW:
+        case LOK_CALLBACK_CALC_FUNCTION_LIST:
         {
             const auto& pos = std::find_if(m_queue.rbegin(), m_queue.rend(),
                     [type] (const queue_type::value_type& elem) { return 
(elem.Type == type); });
@@ -1470,6 +1471,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
             case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
             case LOK_CALLBACK_TEXT_VIEW_SELECTION:
             case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
+            case LOK_CALLBACK_CALC_FUNCTION_LIST:
             {
                 const int nViewId = lcl_getViewId(payload);
                 removeAll(
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index cfb046baf8d7..c621fb8d4f82 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -715,6 +715,12 @@ typedef enum
      * the description.
      */
     LOK_CALLBACK_JSDIALOG = 46,
+
+    /**
+     * Send the list of functions whose name starts with the characters entered
+     * by the user in the formula input bar.
+     */
+    LOK_CALLBACK_CALC_FUNCTION_LIST = 47
 }
 LibreOfficeKitCallbackType;
 
@@ -837,6 +843,8 @@ static inline const char* lokCallbackTypeToString(int nType)
         return "LOK_CALLBACK_REFERENCE_MARKS";
     case LOK_CALLBACK_JSDIALOG:
         return "LOK_CALLBACK_JSDIALOG";
+    case LOK_CALLBACK_CALC_FUNCTION_LIST:
+        return "LOK_CALLBACK_CALC_FUNCTION_LIST";
     }
 
     assert(!"Unknown LibreOfficeKitCallbackType type.");
diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index b4fe85f2c939..87675fb0e1c4 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1381,6 +1381,7 @@ callback (gpointer pData)
     case LOK_CALLBACK_CELL_AUTO_FILL_AREA:
     case LOK_CALLBACK_TABLE_SELECTED:
     case LOK_CALLBACK_JSDIALOG:
+    case LOK_CALLBACK_CALC_FUNCTION_LIST:
     {
         // TODO: Implement me
         break;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 33975e24baf5..a620908c07f4 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1028,6 +1028,11 @@ bool lcl_hasSingleToken(const OUString& s, sal_Unicode c)
 
 void ScInputHandler::ShowArgumentsTip( OUString& rSelText )
 {
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        return;
+    }
+
     ScDocShell* pDocSh = pActiveViewSh->GetViewData().GetDocShell();
     const sal_Unicode cSep = ScCompiler::GetNativeSymbolChar(ocSep);
     const sal_Unicode cSheetSep = 
lcl_getSheetSeparator(&pDocSh->GetDocument());
@@ -1282,6 +1287,58 @@ bool ScInputHandler::GetFuncName( OUString& aStart, 
OUString& aResult )
 
 void ScInputHandler::ShowFuncList( const ::std::vector< OUString > & 
rFuncStrVec )
 {
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        SfxViewShell* pViewShell = SfxViewShell::Current();
+        if (pViewShell && rFuncStrVec.size())
+        {
+            OUString aFuncNameStr;
+            OUString aDescFuncNameStr;
+            OStringBuffer aPayload;
+            aPayload.append("[ ");
+            for (const OUString& rFunc : rFuncStrVec)
+            {
+                if ( rFunc[rFunc.getLength()-1] == cParenthesesReplacement )
+                {
+                    aFuncNameStr = rFunc.copy(0, rFunc.getLength()-1);
+                }
+                else
+                {
+                    aFuncNameStr = rFunc;
+                }
+
+                FormulaHelper aHelper(ScGlobal::GetStarCalcFunctionMgr());
+                aDescFuncNameStr = aFuncNameStr + "()";
+                sal_Int32 nNextFStart = 0;
+                const IFunctionDescription* ppFDesc;
+                ::std::vector< OUString > aArgs;
+                OUString eqPlusFuncName = "=" + aDescFuncNameStr;
+                if ( aHelper.GetNextFunc( eqPlusFuncName, false, nNextFStart, 
nullptr, &ppFDesc, &aArgs ) )
+                {
+                    if ( !ppFDesc->getFunctionName().isEmpty() )
+                    {
+                        aPayload.append("{");
+                        aPayload.append("\"signature\": \"");
+                        OUString aSignature = ppFDesc->getSignature();
+                        aPayload.append(OUStringToOString(aSignature, 
RTL_TEXTENCODING_UTF8));
+                        aPayload.append("\", ");
+                        aPayload.append("\"description\": \"");
+                        OUString aFuncDescr = ppFDesc->getDescription();
+                        aPayload.append(OUStringToOString(aFuncDescr, 
RTL_TEXTENCODING_UTF8));
+                        aPayload.append("\"}, ");
+                    }
+                }
+            }
+            sal_Int32 nLen = aPayload.getLength();
+            aPayload[nLen - 2] = ' ';
+            aPayload[nLen - 1] = ']';
+
+            OString s = aPayload.makeStringAndClear();
+            
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CALC_FUNCTION_LIST, 
s.getStr());
+        }
+        return;
+    }
+
     OUStringBuffer aTipStr;
     OUString aFuncNameStr;
     OUString aDescFuncNameStr;
commit 94eee55880f61788934dc20a1f7bded88a0f9fcf
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Wed Nov 20 18:32:25 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 10:51:37 2020 +0200

    lok: calc formula bar tunneling: resize the main window
    
    When a resize msg is forwarded from the client to the core for the
    formula bar, for instance because of a browser window resizing, we
    need to resize the whole main app window not the formula bar only.
    On the contrary we have 2 issues:
    1) each time the formula bar get focus the layout manager tries to set
    the size of the formula bar back so that it fits inside the app window
    2) the part of the formula bar outside the app window doesn't respond
    to mouse events on the client side.
    
    Change-Id: I13ddc40a2a8e543808a4bf36a04022deb3700163
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89858
    Tested-by: Jenkins
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 7b2c3fdfad43..f52a0f02b918 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -446,6 +446,28 @@ void ScInputWindow::PixelInvalidate(const 
tools::Rectangle* pRectangle)
     }
 }
 
+void ScInputWindow::SetSizePixel( const Size& rNewSize )
+{
+    const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier();
+    if (pNotifier)
+    {
+        if (vcl::Window* pFrameWindowImpl = GetParent())
+        {
+            if (vcl::Window* pWorkWindow = pFrameWindowImpl->GetParent())
+            {
+                if (vcl::Window* pImplBorderWindow = pWorkWindow->GetParent())
+                {
+                    Size aSize = pImplBorderWindow->GetSizePixel();
+                    aSize.setWidth(rNewSize.getWidth());
+                    pImplBorderWindow->SetSizePixel(aSize);
+                }
+            }
+        }
+    }
+
+    ToolBox::SetSizePixel(rNewSize);
+}
+
 void ScInputWindow::Resize()
 {
     ToolBox::Resize();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 34bb7e66d88e..d831cfe0e3b1 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -258,6 +258,7 @@ public:
 
     virtual void    Paint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect ) override;
     virtual void    PixelInvalidate(const tools::Rectangle* pRectangle) 
override;
+    virtual void    SetSizePixel( const Size& rNewSize ) override;
     virtual void    Resize() override;
     virtual void    Select() override;
 
commit 1f0943e5e9432f96daff9f3b006388d5bc7415b2
Author:     Marco Cecchetti <marco.cecche...@collabora.com>
AuthorDate: Mon Nov 4 17:10:45 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 10:51:18 2020 +0200

    lok: calc formula bar tunneling
    
    Change-Id: I92026098222e04a163796225a048c6d7dc1b37c5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89857
    Tested-by: Jenkins
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 659817138c27..0ec91fe23d58 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3848,7 +3848,9 @@ static void 
doc_postWindowMouseEvent(LibreOfficeKitDocument* /*pThis*/, unsigned
         return;
     }
 
-    const Point aPos(nX, nY);
+    Size aOffset(pWindow->GetOutOffXPixel(), pWindow->GetOutOffYPixel());
+    Point aPos(nX, nY);
+    aPos.Move(aOffset);
     MouseEvent aEvent(aPos, nCount, MouseEventModifiers::SIMPLECLICK, 
nButtons, nModifier);
 
     if (Dialog* pDialog = dynamic_cast<Dialog*>(pWindow.get()))
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index c50ea4ad22e8..33975e24baf5 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -772,6 +772,12 @@ ScInputHandler::ScInputHandler()
     pDelayTimer.reset( new Timer( "ScInputHandlerDelay timer" ) );
     pDelayTimer->SetTimeout( 500 ); // 500 ms delay
     pDelayTimer->SetInvokeHandler( LINK( this, ScInputHandler, DelayTimer ) );
+
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        ScInputHandler::bOptLoaded = true;            // Evaluate App options
+        ScInputHandler::bAutoComplete = true;         // Is set in KeyInput
+    }
 }
 
 ScInputHandler::~ScInputHandler()
@@ -3693,7 +3699,7 @@ void ScInputHandler::InputCommand( const CommandEvent& 
rCEvt )
             {
                 if (pTableView)
                     pTableView->Command( rCEvt );
-                if (pTopView)
+                if (pTopView && !comphelper::LibreOfficeKit::isActive())
                     pTopView->Command( rCEvt );
 
                 if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 7ead3b5df503..7b2c3fdfad43 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -165,6 +165,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
         pRuntimeWindow  ( lcl_chooseRuntimeImpl( this, pBind ) ),
         aTextWindow     ( *pRuntimeWindow ),
         pInputHdl       ( nullptr ),
+        mpViewShell     ( nullptr ),
         mnMaxY          (0),
         bIsOkCancelMode ( false ),
         bInResize       ( false )
@@ -181,10 +182,15 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
     }
     OSL_ENSURE( pViewSh, "no view shell for input window" );
 
+    mpViewShell = pViewSh;
+
     // Position window, 3 buttons, input window
-    InsertWindow    (1, aWndPos.get(), ToolBoxItemBits::NONE, 0);
-    InsertSeparator (1);
-    InsertItem      (SID_INPUT_FUNCTION, Image(StockImage::Yes, 
RID_BMP_INPUT_FUNCTION), ToolBoxItemBits::NONE, 2);
+    if (!comphelper::LibreOfficeKit::isActive())
+    {
+        InsertWindow    (1, aWndPos.get(), ToolBoxItemBits::NONE, 0);
+        InsertSeparator (1);
+        InsertItem      (SID_INPUT_FUNCTION, Image(StockImage::Yes, 
RID_BMP_INPUT_FUNCTION), ToolBoxItemBits::NONE, 2);
+    }
     InsertItem      (SID_INPUT_SUM,      Image(StockImage::Yes, 
RID_BMP_INPUT_SUM), ToolBoxItemBits::DROPDOWNONLY, 3);
     InsertItem      (SID_INPUT_EQUAL,    Image(StockImage::Yes, 
RID_BMP_INPUT_EQUAL), ToolBoxItemBits::NONE, 4);
     InsertItem      (SID_INPUT_CANCEL,   Image(StockImage::Yes, 
RID_BMP_INPUT_CANCEL), ToolBoxItemBits::NONE, 5);
@@ -193,14 +199,20 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
     InsertWindow    (7, &aTextWindow, ToolBoxItemBits::NONE, 8);
     SetDropdownClickHdl( LINK( this, ScInputWindow, DropdownClickHdl ));
 
-    aWndPos   ->SetQuickHelpText(ScResId(SCSTR_QHELP_POSWND));
-    aWndPos   ->SetHelpId       (HID_INSWIN_POS);
+    if (!comphelper::LibreOfficeKit::isActive())
+    {
+        aWndPos   ->SetQuickHelpText(ScResId(SCSTR_QHELP_POSWND));
+        aWndPos   ->SetHelpId       (HID_INSWIN_POS);
+    }
     aTextWindow.SetQuickHelpText(ScResId(SCSTR_QHELP_INPUTWND));
     aTextWindow.SetHelpId       (HID_INSWIN_INPUT);
 
-    // No SetHelpText: the helptexts come from the Help
-    SetItemText (SID_INPUT_FUNCTION, ScResId(SCSTR_QHELP_BTNCALC));
-    SetHelpId   (SID_INPUT_FUNCTION, HID_INSWIN_CALC);
+    if (!comphelper::LibreOfficeKit::isActive())
+    {
+        // No SetHelpText: the helptexts come from the Help
+        SetItemText (SID_INPUT_FUNCTION, ScResId(SCSTR_QHELP_BTNCALC));
+        SetHelpId   (SID_INPUT_FUNCTION, HID_INSWIN_CALC);
+    }
 
     SetItemText (SID_INPUT_SUM, ScResId( SCSTR_QHELP_BTNSUM ) );
     SetHelpId   (SID_INPUT_SUM, HID_INSWIN_SUMME);
@@ -222,7 +234,8 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
 
     SetHelpId( HID_SC_INPUTWIN ); // For the whole input row
 
-    aWndPos   ->Show();
+    if (!comphelper::LibreOfficeKit::isActive())
+        aWndPos   ->Show();
     aTextWindow.Show();
 
     pInputHdl = SC_MOD()->GetInputHdl( pViewSh, false ); // use own handler 
even if ref-handler is set
@@ -285,6 +298,15 @@ void ScInputWindow::dispose()
         }
     }
 
+    if (comphelper::LibreOfficeKit::isActive())
+    {
+        if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+        {
+            pNotifier->notifyWindow(GetLOKWindowId(), "close");
+            ReleaseLOKNotifier();
+        }
+    }
+
     pRuntimeWindow.disposeAndClear();
     aWndPos.disposeAndClear();
 
@@ -394,6 +416,9 @@ void ScInputWindow::Select()
 
 void ScInputWindow::Paint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect)
 {
+    if (comphelper::LibreOfficeKit::isActive() && 
!comphelper::LibreOfficeKit::isDialogPainting())
+        return;
+
     ToolBox::Paint(rRenderContext, rRect);
 
     // draw a line at the bottom to distinguish that from the grid
@@ -404,6 +429,23 @@ void ScInputWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::Recta
                             Point(aSize.Width() - 1, aSize.Height() - 1));
 }
 
+void ScInputWindow::PixelInvalidate(const tools::Rectangle* pRectangle)
+{
+    if (comphelper::LibreOfficeKit::isDialogPainting() || 
!comphelper::LibreOfficeKit::isActive())
+        return;
+
+    if (pRectangle)
+    {
+        const Point aPos(pRectangle->getX() - GetOutOffXPixel(), 
pRectangle->getY() - GetOutOffYPixel());
+        const tools::Rectangle aRect(aPos, pRectangle->GetSize());
+        Window::PixelInvalidate(&aRect);
+    }
+    else
+    {
+        Window::PixelInvalidate(nullptr);
+    }
+}
+
 void ScInputWindow::Resize()
 {
     ToolBox::Resize();
@@ -426,9 +468,37 @@ void ScInputWindow::Resize()
         }
     }
     SetSizePixel(aSize);
+
+    if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+    {
+        std::vector<vcl::LOKPayloadItem> aItems;
+        aItems.emplace_back("size", GetSizePixel().toString());
+        pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
+    }
+
     Invalidate();
 }
 
+void ScInputWindow::NotifyLOKClient()
+{
+    if (comphelper::LibreOfficeKit::isActive() && !GetLOKNotifier() && 
mpViewShell)
+        SetLOKNotifier(mpViewShell);
+
+    if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
+    {
+        Size aSize = GetSizePixel();
+        if (aSize.Width() != 0 && aSize.Height() != 0)
+        {
+            std::vector<vcl::LOKPayloadItem> aItems;
+            aItems.emplace_back("type", "calc-input-win");
+            aItems.emplace_back(std::make_pair("position", Point(0, 
0).toString()));
+            aItems.emplace_back(std::make_pair("size", aSize.toString()));
+            pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems);
+        }
+
+    }
+}
+
 void ScInputWindow::SetFuncString( const OUString& rString, bool bDoEdit )
 {
     //! new method at ScModule to query if function autopilot is open
@@ -1165,6 +1235,10 @@ IMPL_LINK_NOARG(ScTextWndGroup, Impl_ScrollHdl, 
ScrollBar*, void)
 
 void ScTextWnd::Paint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect )
 {
+    if (comphelper::LibreOfficeKit::isActive() && 
!comphelper::LibreOfficeKit::isDialogPainting())
+        return;
+
+    tools::Rectangle aRect = comphelper::LibreOfficeKit::isActive() ? 
this->PixelToLogic(rRect) : rRect;
     EditView* pView = GetEditView();
     if (pView)
     {
@@ -1173,7 +1247,7 @@ void ScTextWnd::Paint( vcl::RenderContext& 
rRenderContext, const tools::Rectangl
             pView->Invalidate();
             mbInvalidate = false;
         }
-        mpEditView->Paint(rRect, &rRenderContext);
+        mpEditView->Paint(aRect, &rRenderContext);
     }
 }
 
@@ -1558,6 +1632,15 @@ void ScTextWnd::Command( const CommandEvent& rCEvt )
                 }
             }
         }
+        else if ( nCommand == CommandEventId::EndExtTextInput )
+        {
+            if (bFormulaMode)
+            {
+                ScInputHandler* pHdl = SC_MOD()->GetInputHdl();
+                if (pHdl)
+                    pHdl->InputCommand(rCEvt);
+            }
+        }
         else if ( nCommand == CommandEventId::CursorPos )
         {
             //  don't call InputChanged for CommandEventId::CursorPos
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index a60d879cb091..34bb7e66d88e 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -257,6 +257,7 @@ public:
     virtual void    dispose() override;
 
     virtual void    Paint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect ) override;
+    virtual void    PixelInvalidate(const tools::Rectangle* pRectangle) 
override;
     virtual void    Resize() override;
     virtual void    Select() override;
 
@@ -294,6 +295,8 @@ public:
     virtual void    MouseButtonDown( const MouseEvent& rMEvt ) override;
     virtual void    MouseMove( const MouseEvent& rMEvt ) override;
 
+    void            NotifyLOKClient();
+
     DECL_LINK( MenuHdl, Menu *, bool );
     DECL_LINK( DropdownClickHdl, ToolBox*, void );
 
@@ -304,6 +307,7 @@ private:
     VclPtr<ScTextWndBase> pRuntimeWindow;
     ScTextWndBase&  aTextWindow;
     ScInputHandler* pInputHdl;
+    ScTabViewShell* mpViewShell;
     long            mnMaxY;
     bool            bIsOkCancelMode;
     bool            bInResize;
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index b936e5553a0d..48474a468170 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -51,6 +51,7 @@
 #include <xmlsourcedlg.hxx>
 #include <condformatdlgitem.hxx>
 #include <formdata.hxx>
+#include <inputwin.hxx>
 
 #include <RandomNumberGeneratorDialog.hxx>
 #include <SamplingDialog.hxx>
@@ -436,6 +437,16 @@ int ScTabViewShell::getPart() const
 void ScTabViewShell::afterCallbackRegistered()
 {
     UpdateInputHandler(true, false);
+
+    ScInputHandler* pHdl = mpInputHandler ? mpInputHandler.get() : 
SC_MOD()->GetInputHdl();
+    if (pHdl)
+    {
+        ScInputWindow* pInputWindow = pHdl->GetInputWindow();
+        if (pInputWindow)
+        {
+            pInputWindow->NotifyLOKClient();
+        }
+    }
 }
 
 void ScTabViewShell::NotifyCursor(SfxViewShell* pOtherShell) const
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 3bdd19b08ddf..c67bc186026a 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -244,8 +244,8 @@ void vcl::Cursor::LOKNotify( vcl::Window* pWindow, const 
OUString& rAction )
             aItems.emplace_back("visible", mpData->mbCurVisible ? "true" : 
"false");
         else if (rAction == "cursor_invalidate")
         {
-            const long nX = pWindow->GetOutOffXPixel() + 
pWindow->LogicToPixel(GetPos()).X();
-            const long nY = pWindow->GetOutOffYPixel() + 
pWindow->LogicToPixel(GetPos()).Y();
+            const long nX = pWindow->GetOutOffXPixel() + 
pWindow->LogicToPixel(GetPos()).X() - pParent->GetOutOffXPixel();
+            const long nY = pWindow->GetOutOffYPixel() + 
pWindow->LogicToPixel(GetPos()).Y() - pParent->GetOutOffYPixel();
             Size aSize = pWindow->LogicToPixel(GetSize());
             if (!aSize.Width())
                 aSize.setWidth( 
pWindow->GetSettings().GetStyleSettings().GetCursorSize() );
commit 05c2deedba1926eceb7d18531152f81f72b5feab
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Sat Nov 23 23:01:48 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 10:47:52 2020 +0200

    widget theme: add new settings to ios theme
    
    Change-Id: I98b4632501bb8e7f826a9dd2664a6663f4a7a208
    Reviewed-on: https://gerrit.libreoffice.org/83592
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/vcl/uiconfig/theme_definitions/ios/definition.xml 
b/vcl/uiconfig/theme_definitions/ios/definition.xml
index 310f450f0f04..8725e14ee1f2 100644
--- a/vcl/uiconfig/theme_definitions/ios/definition.xml
+++ b/vcl/uiconfig/theme_definitions/ios/definition.xml
@@ -57,15 +57,44 @@
         <fontColor value="#000000"/>
     </style>
 
-    <!--  <state> attributes:
-            enabled="any"
-            focused="any"
-            pressed="any"
-            rollover="any"
-            default="any"
-            selected="any"
-            button-value="any"
-            extra="any"
+    <!--
+        Various setting for controls that aren't style colors.
+        Empty "value" attribute or if setting is not present means default 
will be used.
+    -->
+
+    <settings>
+        <noActiveTabTextRaise value="true"/>
+        <centeredTabs value="true"/>
+        <listBoxEntryMargin value="20"/>
+        <defaultFontSize value="10"/>
+        <titleHeight value="16"/>
+        <floatTitleHeight value="12"/>
+        <listBoxPreviewDefaultLogicWidth value="16"/>
+        <listBoxPreviewDefaultLogicHeight value="16"/>
+    </settings>
+
+    <!--
+    Follows the definitions od various controls.
+    The definition is always in form:
+
+    <{ControlType} attributes...>
+        <{ControlPart} attributes...>
+            <state attributes...>
+                {draw commands}
+                ...
+            </state>
+        </{ControlPart}>
+    </{ControlType}>
+
+    Supported <state> attributes are:
+        enabled="true|false|any"
+        focused="true|false|any"
+        pressed="true|false|any"
+        rollover="true|false|any"
+        default="true|false|any"
+        selected="true|false|any"
+        button-value="true|false|any"
+        extra="{various}"
     -->
 
     <pushbutton>
commit 6527b24f173894e1fca93d8bd5a11adf5cf7d9be
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Sat Nov 23 22:09:50 2019 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sun May 17 10:47:31 2020 +0200

    widget theme: add additional settings to the theme definition
    
    Change-Id: Ib50ebadf73979068d3595f09de113aa8745eccb9
    Reviewed-on: https://gerrit.libreoffice.org/83591
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>

diff --git a/vcl/inc/widgetdraw/WidgetDefinition.hxx 
b/vcl/inc/widgetdraw/WidgetDefinition.hxx
index 50a853a6c1a6..a1406e1c743f 100644
--- a/vcl/inc/widgetdraw/WidgetDefinition.hxx
+++ b/vcl/inc/widgetdraw/WidgetDefinition.hxx
@@ -204,7 +204,14 @@ public:
 class VCL_DLLPUBLIC WidgetDefinitionSettings
 {
 public:
+    OString msNoActiveTabTextRaise;
     OString msCenteredTabs;
+    OString msListBoxEntryMargin;
+    OString msDefaultFontSize;
+    OString msTitleHeight;
+    OString msFloatTitleHeight;
+    OString msListBoxPreviewDefaultLogicWidth;
+    OString msListBoxPreviewDefaultLogicHeight;
 };
 
 class VCL_DLLPUBLIC WidgetDefinitionStyle
diff --git a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx 
b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
index cd7945fba82c..d5d0167b70e7 100644
--- a/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
+++ b/vcl/qa/cppunit/widgetdraw/WidgetDefinitionReaderTest.cxx
@@ -56,7 +56,16 @@ void WidgetDefinitionReaderTest::testReadSettings()
         vcl::WidgetDefinition aDefinition;
         vcl::WidgetDefinitionReader 
aReader(getFullUrl("definitionSettings3.xml"), getFullUrl(""));
         CPPUNIT_ASSERT(aReader.read(aDefinition));
+        CPPUNIT_ASSERT_EQUAL(OString("true"), 
aDefinition.mpSettings->msNoActiveTabTextRaise);
         CPPUNIT_ASSERT_EQUAL(OString("false"), 
aDefinition.mpSettings->msCenteredTabs);
+        CPPUNIT_ASSERT_EQUAL(OString("0"), 
aDefinition.mpSettings->msListBoxEntryMargin);
+        CPPUNIT_ASSERT_EQUAL(OString("10"), 
aDefinition.mpSettings->msDefaultFontSize);
+        CPPUNIT_ASSERT_EQUAL(OString("16"), 
aDefinition.mpSettings->msTitleHeight);
+        CPPUNIT_ASSERT_EQUAL(OString("12"), 
aDefinition.mpSettings->msFloatTitleHeight);
+        CPPUNIT_ASSERT_EQUAL(OString("15"),
+                             
aDefinition.mpSettings->msListBoxPreviewDefaultLogicWidth);
+        CPPUNIT_ASSERT_EQUAL(OString("7"),
+                             
aDefinition.mpSettings->msListBoxPreviewDefaultLogicHeight);
     }
 }
 
diff --git a/vcl/qa/cppunit/widgetdraw/data/definitionSettings3.xml 
b/vcl/qa/cppunit/widgetdraw/data/definitionSettings3.xml
index 20541b2a219e..9ad88dd54569 100644
--- a/vcl/qa/cppunit/widgetdraw/data/definitionSettings3.xml
+++ b/vcl/qa/cppunit/widgetdraw/data/definitionSettings3.xml
@@ -1,6 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <widgets>
     <settings>
+        <noActiveTabTextRaise value="true"/>
         <centeredTabs value="false"/>
+        <listBoxEntryMargin value="0"/>
+        <defaultFontSize value="10"/>
+        <titleHeight value="16"/>
+        <floatTitleHeight value="12"/>
+        <listBoxPreviewDefaultLogicWidth value="15"/>
+        <listBoxPreviewDefaultLogicHeight value="7"/>
     </settings>
 </widgets>
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx 
b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 580f3783143b..f24b1970887e 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -30,6 +30,7 @@
 #include <comphelper/seqstream.hxx>
 #include <comphelper/processfactory.hxx>
 #include <comphelper/lok.hxx>
+#include <comphelper/string.hxx>
 
 #include <com/sun/star/graphic/SvgTools.hpp>
 #include <basegfx/DrawCommands.hxx>
@@ -85,6 +86,15 @@ std::shared_ptr<WidgetDefinition> const& 
getWidgetDefinitionForTheme(OUString co
     return spDefinition;
 }
 
+int getSettingValueInteger(OString const& rValue, int nDefault)
+{
+    if (rValue.isEmpty())
+        return nDefault;
+    if (!comphelper::string::isdigitAsciiString(rValue))
+        return nDefault;
+    return rValue.toInt32();
+}
+
 bool getSettingValueBool(OString const& rValue, bool bDefault)
 {
     if (rValue.isEmpty())
@@ -109,16 +119,21 @@ 
FileDefinitionWidgetDraw::FileDefinitionWidgetDraw(SalGraphics& rGraphics)
 
     if (m_pWidgetDefinition)
     {
+        auto& pSettings = m_pWidgetDefinition->mpSettings;
+
         ImplSVData* pSVData = ImplGetSVData();
         pSVData->maNWFData.mbNoFocusRects = true;
         pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
-        pSVData->maNWFData.mbNoActiveTabTextRaise = true;
-        pSVData->maNWFData.mbCenteredTabs
-            = 
getSettingValueBool(m_pWidgetDefinition->mpSettings->msCenteredTabs, true);
+        pSVData->maNWFData.mbNoActiveTabTextRaise
+            = getSettingValueBool(pSettings->msNoActiveTabTextRaise, true);
+        pSVData->maNWFData.mbCenteredTabs = 
getSettingValueBool(pSettings->msCenteredTabs, true);
         pSVData->maNWFData.mbProgressNeedsErase = true;
         pSVData->maNWFData.mnStatusBarLowerRightOffset = 10;
         pSVData->maNWFData.mbCanDrawWidgetAnySize = true;
-        pSVData->maNWFData.mnListBoxEntryMargin = 20;
+
+        int nDefaultListboxEntryMargin = 
pSVData->maNWFData.mnListBoxEntryMargin;
+        pSVData->maNWFData.mnListBoxEntryMargin
+            = getSettingValueInteger(pSettings->msListBoxEntryMargin, 
nDefaultListboxEntryMargin);
 
         m_bIsActive = true;
     }
@@ -951,7 +966,7 @@ bool FileDefinitionWidgetDraw::updateSettings(AllSettings& 
rSettings)
 {
     StyleSettings aStyleSet = rSettings.GetStyleSettings();
 
-    auto pDefinitionStyle = m_pWidgetDefinition->mpStyle;
+    auto& pDefinitionStyle = m_pWidgetDefinition->mpStyle;
 
     aStyleSet.SetFaceColor(pDefinitionStyle->maFaceColor);
     aStyleSet.SetCheckedColor(pDefinitionStyle->maCheckedColor);
@@ -1007,7 +1022,10 @@ bool 
FileDefinitionWidgetDraw::updateSettings(AllSettings& rSettings)
     aStyleSet.SetToolTextColor(pDefinitionStyle->maToolTextColor);
     aStyleSet.SetFontColor(pDefinitionStyle->maFontColor);
 
-    vcl::Font aFont(FAMILY_SWISS, Size(0, 10));
+    auto& pSettings = m_pWidgetDefinition->mpSettings;
+
+    int nFontSize = getSettingValueInteger(pSettings->msDefaultFontSize, 10);
+    vcl::Font aFont(FAMILY_SWISS, Size(0, nFontSize));
     aFont.SetCharSet(osl_getThreadTextEncoding());
     aFont.SetWeight(WEIGHT_NORMAL);
     aFont.SetFamilyName("Liberation Sans");

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to