cui/uiconfig/ui/qrcodegen.ui                                 |    1 
 helpcontent2                                                 |    2 
 include/svl/zformat.hxx                                      |    3 
 oox/qa/unit/data/tdf153258_VML_import_WordArt_detection.docx |binary
 oox/qa/unit/vml.cxx                                          |   18 
 oox/source/vml/vmlshape.cxx                                  |    7 
 sc/source/ui/app/inputwin.cxx                                |    9 
 sc/source/ui/inc/inputwin.hxx                                |    2 
 svl/source/numbers/zforlist.cxx                              |   85 -
 svl/source/numbers/zformat.cxx                               |   20 
 sw/source/core/doc/docedt.cxx                                |    4 
 sw/source/core/unocore/unosrch.cxx                           |   18 
 sw/source/filter/ww8/docxattributeoutput.cxx                 |   17 
 sw/source/uibase/inc/conttree.hxx                            |    5 
 sw/source/uibase/utlui/content.cxx                           |  670 +++++------
 ucb/source/ucp/webdav-curl/CurlSession.cxx                   |   24 
 ucb/source/ucp/webdav-curl/DAVException.hxx                  |    1 
 vcl/qt5/QtGraphics_Controls.cxx                              |    1 
 vcl/source/control/PriorityMergedHBox.cxx                    |    6 
 vcl/unx/gtk3/gtkframe.cxx                                    |   10 
 vcl/win/window/salframe.cxx                                  |    4 
 21 files changed, 510 insertions(+), 397 deletions(-)

New commits:
commit ae928386ece4708236038f0d14f0870c4ef01bf6
Author:     Laurent Balland <laurent.ball...@mailo.fr>
AuthorDate: Mon Jan 2 18:39:35 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:12 2023 +0100

    tdf#152722 Number Format: keep NatNum modifiers
    
    When modifying number format with UI (decimal places, negative in red...) 
NatNum modifiers must be preserved
    Implement an helper to get NatNum string
    As NatNum12 already inserts currency unit, do not treat it
    
    Change-Id: I38be1da08a44d75ef663eaf50fccb3820ff9ed5e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144963
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <er...@redhat.com>
    (cherry picked from commit 8ba7657a9653f8ae5d1b865356d11138df7b2093)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146406

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 43f6ad9775f4..ea08234e93a2 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -459,6 +459,9 @@ public:
     void GetNatNumXml(
             css::i18n::NativeNumberXmlAttributes2& rAttr,
             sal_uInt16 nNumFor ) const;
+    /** Return empty string if no NatNum modifier or unvalid nNumFor
+        otherwhise return "[NatNum1]" or "[NatNum12 ...]" */
+    OUString GetNatNumModifierString( sal_uInt16 nNumFor = 0 ) const;
 
     /** Switches to the first non-"gregorian" calendar, but only if the current
         calendar is "gregorian"; original calendar name and date/time returned,
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index cee75fc9265e..ca8b6524b9e2 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3231,6 +3231,15 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 
nIndex,
         sString.append(GetNumDecimalSep());
         padToLength(sString, sString.getLength() + nPrecision, '0');
     }
+
+    // Native Number
+    const OUString sPosNatNumModifier = pFormat ? 
pFormat->GetNatNumModifierString( 0 ) : "";
+    const OUString sNegNatNumModifier = pFormat ?
+            // if a negative format already exists, use its NatNum modifier
+            // else use NatNum modifier of positive format
+            ( pFormat->GetNumForString( 1, 0 )  ? 
pFormat->GetNatNumModifierString( 1 ) : sPosNatNumModifier )
+            : "";
+
     if (eType == SvNumFormatType::PERCENT)
     {
         sString.append( pFormat->GetPercentString() );
@@ -3254,50 +3263,62 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 
nIndex,
         OUString aCurr;
         const NfCurrencyEntry* pEntry;
         bool bBank;
-        if ( GetNewCurrencySymbolString( nIndex, aCurr, &pEntry, &bBank ) )
+        bool isPosNatNum12 = sPosNatNumModifier.startsWith( "[NatNum12" );
+        bool isNegNatNum12 = sNegNatNumModifier.startsWith( "[NatNum12" );
+        if ( !isPosNatNum12 || !isNegNatNum12 )
         {
-            if ( pEntry )
+            if ( GetNewCurrencySymbolString( nIndex, aCurr, &pEntry, &bBank ) )
             {
-                sal_uInt16 nPosiForm = 
NfCurrencyEntry::GetEffectivePositiveFormat(
-                    xLocaleData->getCurrPositiveFormat(),
-                    pEntry->GetPositiveFormat(), bBank );
-                sal_uInt16 nNegaForm = 
NfCurrencyEntry::GetEffectiveNegativeFormat(
-                    xLocaleData->getCurrNegativeFormat(),
-                    pEntry->GetNegativeFormat(), bBank );
-                pEntry->CompletePositiveFormatString( sString, bBank, 
nPosiForm );
-                pEntry->CompleteNegativeFormatString( sNegStr, bBank, 
nNegaForm );
+                if ( pEntry )
+                {
+                    sal_uInt16 nPosiForm = 
NfCurrencyEntry::GetEffectivePositiveFormat(
+                        xLocaleData->getCurrPositiveFormat(),
+                        pEntry->GetPositiveFormat(), bBank );
+                    sal_uInt16 nNegaForm = 
NfCurrencyEntry::GetEffectiveNegativeFormat(
+                        xLocaleData->getCurrNegativeFormat(),
+                        pEntry->GetNegativeFormat(), bBank );
+                    if ( !isPosNatNum12 )
+                        pEntry->CompletePositiveFormatString( sString, bBank, 
nPosiForm );
+                    if ( !isNegNatNum12 )
+                        pEntry->CompleteNegativeFormatString( sNegStr, bBank, 
nNegaForm );
+                }
+                else
+                {   // assume currency abbreviation (AKA banking symbol), not 
symbol
+                    sal_uInt16 nPosiForm = 
NfCurrencyEntry::GetEffectivePositiveFormat(
+                        xLocaleData->getCurrPositiveFormat(),
+                        xLocaleData->getCurrPositiveFormat(), true );
+                    sal_uInt16 nNegaForm = 
NfCurrencyEntry::GetEffectiveNegativeFormat(
+                        xLocaleData->getCurrNegativeFormat(),
+                        xLocaleData->getCurrNegativeFormat(), true );
+                    if ( !isPosNatNum12 )
+                        NfCurrencyEntry::CompletePositiveFormatString( 
sString, aCurr, nPosiForm );
+                    if ( !isNegNatNum12 )
+                        NfCurrencyEntry::CompleteNegativeFormatString( 
sNegStr, aCurr, nNegaForm );
+                }
             }
             else
-            {   // assume currency abbreviation (AKA banking symbol), not 
symbol
-                sal_uInt16 nPosiForm = 
NfCurrencyEntry::GetEffectivePositiveFormat(
-                    xLocaleData->getCurrPositiveFormat(),
-                    xLocaleData->getCurrPositiveFormat(), true );
-                sal_uInt16 nNegaForm = 
NfCurrencyEntry::GetEffectiveNegativeFormat(
-                    xLocaleData->getCurrNegativeFormat(),
-                    xLocaleData->getCurrNegativeFormat(), true );
-                NfCurrencyEntry::CompletePositiveFormatString( sString, aCurr, 
nPosiForm );
-                NfCurrencyEntry::CompleteNegativeFormatString( sNegStr, aCurr, 
nNegaForm );
+            {   // "automatic" old style
+                OUString aSymbol, aAbbrev;
+                GetCompatibilityCurrency( aSymbol, aAbbrev );
+                if ( !isPosNatNum12 )
+                    NfCurrencyEntry::CompletePositiveFormatString( sString,
+                                        aSymbol, 
xLocaleData->getCurrPositiveFormat() );
+                if ( !isNegNatNum12 )
+                    NfCurrencyEntry::CompleteNegativeFormatString( sNegStr,
+                                        aSymbol, 
xLocaleData->getCurrNegativeFormat() );
             }
         }
-        else
-        {   // "automatic" old style
-            OUString aSymbol, aAbbrev;
-            GetCompatibilityCurrency( aSymbol, aAbbrev );
-            NfCurrencyEntry::CompletePositiveFormatString( sString,
-                                aSymbol, xLocaleData->getCurrPositiveFormat() 
);
-            NfCurrencyEntry::CompleteNegativeFormatString( sNegStr,
-                                aSymbol, xLocaleData->getCurrNegativeFormat() 
);
-        }
+        sString.append( ';' );
         if (IsRed)
         {
-            sString.append(';');
             sString.append('[');
             sString.append(pFormatScanner->GetRedString());
             sString.append(']');
         }
-        else
+        sString.append( sNegNatNumModifier );
+        if ( isNegNatNum12 )
         {
-            sString.append(';');
+            sString.append( '-' );
         }
         sString.append(sNegStr);
     }
@@ -3343,6 +3364,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 
nIndex,
                 sTmpStr.append(pFormatScanner->GetRedString());
                 sTmpStr.append(']');
             }
+            sTmpStr.append( sNegNatNumModifier );
 
             if (insertBrackets)
             {
@@ -3358,6 +3380,7 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 
nIndex,
             sString = sTmpStr;
         }
     }
+    sString.insert( 0, sPosNatNumModifier );
     return sString.makeStringAndClear();
 }
 
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index b675ed7cca99..eb790ee425b0 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -5765,6 +5765,26 @@ void SvNumberformat::GetNatNumXml( 
css::i18n::NativeNumberXmlAttributes2& rAttr,
     }
 }
 
+OUString SvNumberformat::GetNatNumModifierString( sal_uInt16 nNumFor ) const
+{
+    if ( nNumFor > 3 )
+        return "";
+    const SvNumberNatNum& rNum = NumFor[nNumFor].GetNatNum();
+    if ( !rNum.IsSet() )
+        return "";
+    OUStringBuffer sNatNumModifier = "[NatNum";
+    const sal_Int32 nNum = rNum.GetNatNum();
+    sNatNumModifier.append( nNum );
+    if ( NatNumTakesParameters( nNum ) )
+    {
+        sNatNumModifier.append( " " );
+        sNatNumModifier.append( rNum.GetParams() );
+    }
+    sNatNumModifier.append( "]" );
+
+    return sNatNumModifier.makeStringAndClear();
+}
+
 // static
 bool SvNumberformat::HasStringNegativeSign( const OUString& rStr )
 {
commit d06435292cc881e3784f6633a7538068cdc3d6f6
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Wed Jan 25 12:08:14 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:12 2023 +0100

    tdf#152493 ucb WebDAV: fix upload using HTTP 1.0 fallback
    
    Fix broken libcurl upload to Vibe 4.0.6 WebDAV server
    using HTTP 1.0 fallback.
    
    Regression from commit 023ebf17898db4bca63129f079fd90b5cf76c1a9
    "ucb: remove --with-webdav=neon" (Neon had no such upload
    problem).
    
    HTTP 1.0 fallback found by Pál Zoltán Kochis.
    Fallback for CURLE_UNSUPPORTED_PROTOCOL
    suggested by Michael Stahl. Thanks for their and
    Attila Bakos' help.
    
    Michael Stahl's comment: "'HTTP/0.9' in the [curl] error
    message is very misleading: it simply means that a header
    was expected but there was no header, so what is received
    is interpreted as body.
    
    Note: the HTTP/1.0 works because it does not use the
    'Expect: 100-continue' so there should be no intermediate
    100 Continue response from the server at all - instead
    libcurl directly sends the XML document for the PROPFIND
    and the server sends the response, and the problem does
    not occur."
    
    Co-authored-by: Michael Stahl <michael.st...@allotropia.de>
    
    Change-Id: I8bd79154de14b6425e0324f4d8f6e64512c08264
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146067
    Tested-by: László Németh <nem...@numbertext.org>
    Reviewed-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit 30ca48f4dc0e65a3798e6b21574bc80f6d4953fa)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146315
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx 
b/ucb/source/ucp/webdav-curl/CurlSession.cxx
index 705d4e34d44a..dcf71a8869b3 100644
--- a/ucb/source/ucp/webdav-curl/CurlSession.cxx
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -964,6 +964,8 @@ auto CurlProcessor::ProcessRequestImpl(
                  "curl_easy_perform failed: " << GetErrorString(rc, 
rSession.m_ErrorBuffer));
         switch (rc)
         {
+            case CURLE_UNSUPPORTED_PROTOCOL:
+                throw DAVException(DAVException::DAV_UNSUPPORTED);
             case CURLE_COULDNT_RESOLVE_PROXY:
                 throw DAVException(
                     DAVException::DAV_HTTP_LOOKUP,
@@ -1250,6 +1252,7 @@ auto CurlProcessor::ProcessRequest(
         }
     }
     bool isRetry(false);
+    bool isFallbackHTTP10(false);
     int nAuthRequests(0);
     int nAuthRequestsProxy(0);
 
@@ -1473,6 +1476,27 @@ auto CurlProcessor::ProcessRequest(
                     }
                 }
             }
+            else if (rException.getError() == DAVException::DAV_UNSUPPORTED)
+            {
+                // tdf#152493 libcurl can't handle "Transfer-Encoding: chunked"
+                // in HTTP/1.1 100 Continue response.
+                // workaround: if HTTP/1.1 didn't work, try HTTP/1.0
+                // (but fallback only once - to prevent infinite loop)
+                if (isFallbackHTTP10)
+                {
+                    throw DAVException(DAVException::DAV_HTTP_ERROR);
+                }
+                isFallbackHTTP10 = true;
+                // note: this is not reset - future requests to this URI use 
it!
+                auto rc = curl_easy_setopt(rSession.m_pCurl.get(), 
CURLOPT_HTTP_VERSION,
+                                           CURL_HTTP_VERSION_1_0);
+                if (rc != CURLE_OK)
+                {
+                    throw DAVException(DAVException::DAV_HTTP_ERROR);
+                }
+                SAL_INFO("ucb.ucp.webdav.curl", "attempting fallback to 
HTTP/1.0");
+                isRetry = true;
+            }
             if (!isRetry)
             {
                 throw; // everything else: re-throw
diff --git a/ucb/source/ucp/webdav-curl/DAVException.hxx 
b/ucb/source/ucp/webdav-curl/DAVException.hxx
index 84dba895485c..759e43f25f8e 100644
--- a/ucb/source/ucp/webdav-curl/DAVException.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVException.hxx
@@ -130,6 +130,7 @@ class DAVException : public std::exception
             DAV_SESSION_CREATE, // session creation error,
                                 // mData = server[:port]
             DAV_INVALID_ARG,    // invalid argument
+            DAV_UNSUPPORTED,    // internal to CurlSession
 
             DAV_LOCK_EXPIRED,   // DAV lock expired
 
commit 6faeed67f5ff530efa366b8222dfaa20d95de36a
Author:     Regina Henschel <rb.hensc...@t-online.de>
AuthorDate: Thu Feb 2 15:22:52 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:12 2023 +0100

    tdf#153258 VML import improve WordArt detection
    
    There exists WordArt types whose internal name do not start with
    'fontwork', e.g. mso_sptTextDeflateInflateDeflate has 'mso-spt167'.
    The fix uses the MSO_SPT enum directly.
    
    Change-Id: Idb32b3ef9957bef5d948e1d86507d71fef006e91
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146503
    Tested-by: Jenkins
    Reviewed-by: Regina Henschel <rb.hensc...@t-online.de>
    (cherry picked from commit 2598f40521c6a8dee6d59ca41c3e58e65a98b17f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146517
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/oox/qa/unit/data/tdf153258_VML_import_WordArt_detection.docx 
b/oox/qa/unit/data/tdf153258_VML_import_WordArt_detection.docx
new file mode 100644
index 000000000000..15944490e9ed
Binary files /dev/null and 
b/oox/qa/unit/data/tdf153258_VML_import_WordArt_detection.docx differ
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index be99a281af04..c46475efe418 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -224,6 +224,24 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, 
testWriterFontworkTrimTrue)
     CPPUNIT_ASSERT_DOUBLES_EQUAL(4999, aSize.Height, 2);
 }
 
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, testVMLDetectWordArtOnImport)
+{
+    // The document contains a WordArt shape with type other than 
"fontwork-foo". Error was that
+    // WordArt was not detected and thus shrinking shape to text content was 
not prevented.
+    loadFromURL(u"tdf153258_VML_import_WordArt_detection.docx");
+
+    uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, 
uno::UNO_QUERY);
+    uno::Reference<drawing::XShape> 
xShape(xDrawPageSupplier->getDrawPage()->getByIndex(0),
+                                           uno::UNO_QUERY);
+
+    // Make sure the shape width and height is not changed.
+    awt::Size aSize = xShape->getSize();
+    // Without the fix the test would have failed with expected 7514 actual 
1453.
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(7514, aSize.Width, 2);
+    // Without the fix the test would have failed with expected 4540 actual 
309.
+    CPPUNIT_ASSERT_DOUBLES_EQUAL(4540, aSize.Height, 2);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index abbf4fd7f9d6..bdbea0c86fc4 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -63,7 +63,7 @@
 #include <oox/vml/vmltextbox.hxx>
 #include <oox/core/xmlfilterbase.hxx>
 #include <oox/helper/containerhelper.hxx>
-#include <svx/EnhancedCustomShapeTypeNames.hxx>
+#include <svx/msdffdef.hxx>
 #include <svx/sdtagitm.hxx>
 #include <svx/svdobj.hxx>
 #include <comphelper/sequence.hxx>
@@ -716,10 +716,11 @@ Reference< XShape > SimpleShape::implConvertAndInsert( 
const Reference< XShapes
     SdrObject* pShape = SdrObject::getSdrObjectFromXShape(xShape);
     if( pShape && getShapeType() >= 0 )
     {
-        OUString aShapeType = EnhancedCustomShapeTypeNames::Get( static_cast< 
MSO_SPT >(getShapeType()) );
         //The resize autoshape to fit text attr of FontWork/Word-Art should 
always be false
         //for the fallback geometry.
-        if(aShapeType.startsWith("fontwork"))
+        sal_Int32 nType = getShapeType();
+        if((mso_sptTextSimple <= nType && nType <= mso_sptTextOnRing)
+            || (mso_sptTextPlainText <= nType && nType <= mso_sptTextCanDown))
         {
             pShape->SetMergedItem(makeSdrTextAutoGrowHeightItem(false));
             pShape->SetMergedItem(makeSdrTextAutoGrowWidthItem(false));
commit 878697399f279d61bd041e870e57ee91f5b08bd3
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Feb 2 16:35:28 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:11 2023 +0100

    tdf#153078: Revert "tdf#141684 fix disappearance of icons in Groupedbar and 
Groupedbar compact UI"
    
    This reverts commit 801e6272dc299d4468ec094ce11b66494eb5018b.
    
    Revert it for now, until a better solution for tdf#141684
    is found
    
    Change-Id: I6c9fd7fb12149b67fe572d64cf00e6a3ec98611f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146504
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>
    (cherry picked from commit bcf9e47791d5b3e1d6a75c73f3b8c9940abda8eb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146518
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/vcl/source/control/PriorityMergedHBox.cxx 
b/vcl/source/control/PriorityMergedHBox.cxx
index c5e21c7c002c..75a26daa52c1 100644
--- a/vcl/source/control/PriorityMergedHBox.cxx
+++ b/vcl/source/control/PriorityMergedHBox.cxx
@@ -27,7 +27,6 @@
 
 #define DUMMY_WIDTH 50
 #define BUTTON_WIDTH 30
-#define TEMP_WIDTH 200
 
 /*
 * PriorityMergedHBox is a VclHBox which hides its own children if there is no 
sufficient space.
@@ -58,9 +57,6 @@ void PriorityMergedHBox::Resize()
     }
 
     tools::Long nWidth = GetSizePixel().Width();
-    if (nWidth <= 1 || nWidth == TEMP_WIDTH || nWidth == TEMP_WIDTH + 6)
-        return VclHBox::Resize();
-
     tools::Long nCurrentWidth = VclHBox::calculateRequisition().getWidth() + 
BUTTON_WIDTH;
 
     // Hide lower priority controls
@@ -159,7 +155,7 @@ Size PriorityMergedHBox::calculateRequisition() const
         accumulateMaxes(aChildSize, aSize);
     }
 
-    setPrimaryDimension(aSize, TEMP_WIDTH);
+    setPrimaryDimension(aSize, 200);
     return finalizeMaxes(aSize, nVisibleChildren);
 }
 
commit b530de1b474db21aaf353ddf15ad82007a50cd67
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Thu Jan 26 16:52:32 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:11 2023 +0100

    tdf#151682 Fix gap above input bar
    
    Remove vertical offset, looks like it's not needed anymore.
    
    Change-Id: If0f7f7dce7a7e4249036930b60fe353890b495fc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146179
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
    (cherry picked from commit f7544650cc4e31da67873898e2d587afa846b9b4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146199
    Reviewed-by: Kohei Yoshida <ko...@libreoffice.org>

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 14ef498976ba..14249fe2eb04 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -495,7 +495,7 @@ void ScInputWindow::Resize()
         if (pGroupBar->GetNumLines() > 1)
         {
             Size aGroupBarSize = pGroupBar->GetSizePixel();
-            aSize.setHeight(aGroupBarSize.Height() + 2 * 
(pGroupBar->GetVertOffset() + 1));
+            aSize.setHeight(aGroupBarSize.Height());
         }
     }
     SetSizePixel(aSize);
@@ -847,7 +847,6 @@ ScInputBarGroup::ScInputBarGroup(vcl::Window* pParent, 
ScTabViewShell* pViewSh)
     , mxTextWndGroup(new ScTextWndGroup(*this, pViewSh))
     , mxButtonUp(m_xBuilder->weld_button("up"))
     , mxButtonDown(m_xBuilder->weld_button("down"))
-    , mnVertOffset(0)
 {
     InitControlBase(m_xContainer.get());
 
@@ -1083,12 +1082,6 @@ void ScInputBarGroup::TriggerToolboxLayout()
     ScInputWindow &rParent = dynamic_cast<ScInputWindow&>(*w);
     SfxViewFrame* pViewFrm = SfxViewFrame::Current();
 
-    // Capture the vertical position of this window in the toolbar, when we 
increase
-    // the size of the toolbar to accommodate expanded line input we need to 
take this
-    // into account
-    if ( !mnVertOffset )
-        mnVertOffset = rParent.GetItemPosRect( rParent.GetItemCount() - 1 
).Top();
-
     if ( !pViewFrm )
         return;
 
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 12bc461f2836..ac96062af137 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -262,7 +262,6 @@ public:
     void                    DecrementVerticalSize();
     void                    NumLinesChanged();
     virtual tools::Long            GetNumLines() const override { return 
mxTextWndGroup->GetNumLines(); }
-    tools::Long                    GetVertOffset() const { return  
mnVertOffset; }
 
     int GetPixelHeightForLines() const
     {
@@ -278,7 +277,6 @@ private:
     std::unique_ptr<ScTextWndGroup> mxTextWndGroup;
     std::unique_ptr<weld::Button> mxButtonUp;
     std::unique_ptr<weld::Button> mxButtonDown;
-    tools::Long                   mnVertOffset;
 
     DECL_LINK(ClickHdl, weld::Button&, void);
 };
commit fc121327260479c7981187816e4c7dfde5de85e1
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Sun Jan 1 17:47:11 2023 -0900
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:11 2023 +0100

    SwNavigator: Improve mouse move handler for bringing objects to
    
    attention in the document view
    
    Fixes crash that happens in SalInstanceTreeView iter_compare when the
    mouse enters the content tree at a point that has no tree entry and
    is then moved over an entry.
    
    Moves code to bring entry content to attention in the document view
    from the mouse move handler to it's own function.
    
    Renames the overlay timer handler function and moves it to the area
    of the code having related functions.
    
    Checks added for visible content and if the type has any content to
    bring to attention.
    
    Change-Id: I381eed6ffcf7ddb095c4c09650578a7f7fd874b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145168
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146507

diff --git a/sw/source/uibase/inc/conttree.hxx 
b/sw/source/uibase/inc/conttree.hxx
index 1e6bacbcd4db..b4f352bb6950 100644
--- a/sw/source/uibase/inc/conttree.hxx
+++ b/sw/source/uibase/inc/conttree.hxx
@@ -136,8 +136,9 @@ class SwContentTree final : public SfxListener
     std::unique_ptr<weld::TreeIter> m_xOverlayCompareEntry;
     std::unique_ptr<sdr::overlay::OverlayObject> m_xOverlayObject;
 
-    void OverlayObject(std::vector<basegfx::B2DRange>&& aRanges);
+    void OverlayObject(std::vector<basegfx::B2DRange>&& aRanges = {});
 
+    void BringEntryToAttention(const weld::TreeIter& rEntry);
     void BringFramesToAttention(const std::vector<const SwFrameFormat*>& 
rFrameFormats);
     void BringBookmarksToAttention(const std::vector<OUString>& rNames);
     void BringURLFieldsToAttention(const SwGetINetAttrs& rINetAttrsArr);
@@ -202,7 +203,7 @@ class SwContentTree final : public SfxListener
     DECL_LINK(QueryTooltipHdl, const weld::TreeIter&, OUString);
     DECL_LINK(DragBeginHdl, bool&, bool);
     DECL_LINK(TimerUpdate, Timer *, void);
-    DECL_LINK(m_aOverlayObjectDelayTimerHdl, Timer *, void);
+    DECL_LINK(OverlayObjectDelayTimerHdl, Timer *, void);
     DECL_LINK(MouseMoveHdl, const MouseEvent&, bool);
 
 public:
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index aca8f4208907..93acaa102692 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1092,7 +1092,6 @@ 
SwContentTree::SwContentTree(std::unique_ptr<weld::TreeView> xTreeView, SwNaviga
     , m_bIsLastReadOnly(false)
     , m_bIsOutlineMoveable(true)
     , m_bViewHasChanged(false)
-    , m_xOverlayCompareEntry(m_xTreeView->make_iterator())
 {
     m_xTreeView->set_size_request(m_xTreeView->get_approximate_digit_width() * 
30,
                                   m_xTreeView->get_text_height() * 14);
@@ -1133,7 +1132,7 @@ 
SwContentTree::SwContentTree(std::unique_ptr<weld::TreeView> xTreeView, SwNaviga
 
     m_aUpdTimer.SetInvokeHandler(LINK(this, SwContentTree, TimerUpdate));
     m_aUpdTimer.SetTimeout(1000);
-    m_aOverlayObjectDelayTimer.SetInvokeHandler(LINK(this, SwContentTree, 
m_aOverlayObjectDelayTimerHdl));
+    m_aOverlayObjectDelayTimer.SetInvokeHandler(LINK(this, SwContentTree, 
OverlayObjectDelayTimerHdl));
     m_aOverlayObjectDelayTimer.SetTimeout(500);
 }
 
@@ -1153,8 +1152,21 @@ IMPL_LINK(SwContentTree, MouseMoveHdl, const 
MouseEvent&, rMEvt, bool)
 {
     if (m_eState == State::HIDDEN)
         return false;
-    if (rMEvt.IsLeaveWindow())
+    if (std::unique_ptr<weld::TreeIter> xEntry(m_xTreeView->make_iterator());
+            m_xTreeView->get_dest_row_at_pos(rMEvt.GetPosPixel(), 
xEntry.get(), false, false) &&
+            !rMEvt.IsLeaveWindow())
+    {
+        if (!m_xOverlayCompareEntry)
+            
m_xOverlayCompareEntry.reset(m_xTreeView->make_iterator().release());
+        else if (m_xTreeView->iter_compare(*xEntry, *m_xOverlayCompareEntry) 
== 0)
+            return false; // The entry under the mouse has not changed.
+        m_xTreeView->copy_iterator(*xEntry, *m_xOverlayCompareEntry);
+        BringEntryToAttention(*xEntry);
+    }
+    else
     {
+        if (m_xOverlayCompareEntry)
+            m_xOverlayCompareEntry.reset();
         m_aOverlayObjectDelayTimer.Stop();
         if (m_xOverlayObject && m_xOverlayObject->getOverlayManager())
         {
@@ -1162,296 +1174,6 @@ IMPL_LINK(SwContentTree, MouseMoveHdl, const 
MouseEvent&, rMEvt, bool)
             m_xOverlayObject.reset();
         }
     }
-    else if (std::unique_ptr<weld::TreeIter> 
xEntry(m_xTreeView->make_iterator());
-            m_xTreeView->get_dest_row_at_pos(rMEvt.GetPosPixel(), 
xEntry.get(), false, false))
-    {
-        // Remove the overlay object if the pointer is over a different entry 
than the last time
-        // it was here. Guard against doing the iter_compare when entering the 
window to work
-        // around a bug that causes sal backends to crash when 
m_xOverlayCompareEntry iterator is
-        // nullptr which is the case on initial window entry.
-        if (!rMEvt.IsEnterWindow() &&
-                m_xTreeView->iter_compare(*xEntry, *m_xOverlayCompareEntry) != 
0)
-        {
-            m_aOverlayObjectDelayTimer.Stop();
-            if (m_xOverlayObject && m_xOverlayObject->getOverlayManager())
-            {
-                
m_xOverlayObject->getOverlayManager()->remove(*m_xOverlayObject);
-                m_xOverlayObject.reset();
-            }
-        }
-        if (lcl_IsContent(*xEntry, *m_xTreeView)) // content entry
-        {
-            SwContent* pCnt = 
weld::fromId<SwContent*>(m_xTreeView->get_id(*xEntry));
-            const ContentTypeId nType = pCnt->GetParent()->GetType();
-            if (!pCnt->IsInvisible() && (rMEvt.IsEnterWindow() ||
-                    m_xTreeView->iter_compare(*xEntry, 
*m_xOverlayCompareEntry) != 0))
-            {
-                if (nType == ContentTypeId::OUTLINE)
-                {
-                    
BringTypesWithFlowFramesToAttention({m_pActiveShell->GetNodes().
-                        
GetOutLineNds()[static_cast<SwOutlineContent*>(pCnt)->GetOutlinePos()]});
-                }
-                else if (nType == ContentTypeId::TABLE)
-                {
-                    if (const SwFrameFormats* pFrameFormats =
-                            m_pActiveShell->GetDoc()->GetTableFrameFormats())
-                        if (const SwFrameFormat* pFrameFormat =
-                                
pFrameFormats->FindFormatByName(pCnt->GetName()))
-                        {
-                            SwTable* pTable = SwTable::FindTable(pFrameFormat);
-                            if (pTable)
-                                
BringTypesWithFlowFramesToAttention({pTable->GetTableNode()});
-                        }
-                }
-                else if (nType == ContentTypeId::FRAME || nType == 
ContentTypeId::GRAPHIC ||
-                         nType == ContentTypeId::OLE)
-                {
-                    SwNodeType eNodeType = SwNodeType::Text;
-                    if(nType == ContentTypeId::GRAPHIC)
-                        eNodeType = SwNodeType::Grf;
-                    else if(nType == ContentTypeId::OLE)
-                        eNodeType = SwNodeType::Ole;
-                    if (const SwFrameFormat* pFrameFormat =
-                            
m_pActiveShell->GetDoc()->FindFlyByName(pCnt->GetName(), eNodeType))
-                        BringFramesToAttention(std::vector<const 
SwFrameFormat*> {pFrameFormat});
-                }
-                else if (nType == ContentTypeId::BOOKMARK)
-                {
-                    BringBookmarksToAttention(std::vector<OUString> 
{pCnt->GetName()});
-                }
-                else if (nType == ContentTypeId::REGION|| nType == 
ContentTypeId::INDEX)
-                {
-                    const SwSectionFormats& rFormats = 
m_pActiveShell->GetDoc()->GetSections();
-                    const SwSectionFormat* pFormat = 
rFormats.FindFormatByName(pCnt->GetName());
-                    if (pFormat)
-                        
BringTypesWithFlowFramesToAttention({pFormat->GetSectionNode()});
-                }
-                else if (nType == ContentTypeId::URLFIELD)
-                {
-                    BringURLFieldsToAttention(SwGetINetAttrs 
{SwGetINetAttr(pCnt->GetName(),
-                                        
*static_cast<SwURLFieldContent*>(pCnt)->GetINetAttr())});
-                }
-                else if (nType == ContentTypeId::REFERENCE)
-                {
-                    if (const SwTextAttr* pTextAttr =
-                            
m_pActiveShell->GetDoc()->GetRefMark(pCnt->GetName())->GetTextRefMark())
-                    {
-                        std::vector<const SwTextAttr*> aTextAttrArr 
{pTextAttr};
-                        BringReferencesToAttention(aTextAttrArr);
-                    }
-                }
-                else if (nType == ContentTypeId::POSTIT)
-                {
-                    if (const SwTextAttr* pTextAttr =
-                            
static_cast<SwPostItContent*>(pCnt)->GetPostIt()->GetTextField())
-                    {
-                        std::vector<const SwTextAttr*> aTextAttrArr 
{pTextAttr};
-                        BringPostItFieldsToAttention(aTextAttrArr);
-                    }
-                }
-                else if (nType == ContentTypeId::DRAWOBJECT)
-                {
-                    std::vector<const SdrObject*> aSdrObjectArr 
{GetDrawingObjectsByContent(pCnt)};
-                    BringDrawingObjectsToAttention(aSdrObjectArr);
-                }
-                else if (nType == ContentTypeId::TEXTFIELD)
-                {
-                    if (const SwTextAttr* pTextAttr =
-                            
static_cast<SwTextFieldContent*>(pCnt)->GetFormatField()->GetTextField())
-                    {
-                        std::vector<const SwTextAttr*> aTextAttrArr 
{pTextAttr};
-                        BringTextFieldsToAttention(aTextAttrArr);
-                    }
-                }
-                else if (nType == ContentTypeId::FOOTNOTE || nType == 
ContentTypeId::ENDNOTE)
-                {
-                    if (const SwTextAttr* pTextAttr =
-                            static_cast<SwTextFootnoteContent*> 
(pCnt)->GetTextFootnote())
-                    {
-                        std::vector<const SwTextAttr*> aTextAttrArr 
{pTextAttr};
-                        BringFootnotesToAttention(aTextAttrArr);
-                    }
-                }
-            }
-        }
-        else // content type entry
-        {
-            const ContentTypeId nType =
-                    
weld::fromId<SwContentType*>(m_xTreeView->get_id(*xEntry))->GetType();
-            if (rMEvt.IsEnterWindow() ||
-                    m_xTreeView->iter_compare(*xEntry, 
*m_xOverlayCompareEntry) != 0)
-            {
-                if (nType == ContentTypeId::OUTLINE)
-                {
-                    std::vector<const SwNode*> aNodesArr(
-                                
m_pActiveShell->GetNodes().GetOutLineNds().begin(),
-                                
m_pActiveShell->GetNodes().GetOutLineNds().end());
-                    BringTypesWithFlowFramesToAttention(aNodesArr);
-                }
-                else if (nType == ContentTypeId::TABLE)
-                {
-                    std::vector<const SwNode*> aNodesArr;
-                    const size_t nCount = 
m_pActiveShell->GetTableFrameFormatCount(false);
-                    const SwFrameFormats* pFrameFormats =
-                            m_pActiveShell->GetDoc()->GetTableFrameFormats();
-                    SwAutoFormatGetDocNode aGetHt(&m_pActiveShell->GetNodes());
-                    for(size_t i = 0; i < nCount; ++i)
-                    {
-                        if (const SwTableFormat* pTableFormat =
-                                
static_cast<SwTableFormat*>(pFrameFormats->GetFormat(i)))
-                            if (!pTableFormat->GetInfo(aGetHt))  // skip 
deleted tables
-                            {
-                                SwTable* pTable = 
SwTable::FindTable(pTableFormat);
-                                if (pTable)
-                                    
aNodesArr.push_back(pTable->GetTableNode());
-                            }
-                    }
-                    BringTypesWithFlowFramesToAttention(aNodesArr);
-                }
-                else if (nType == ContentTypeId::FRAME || nType == 
ContentTypeId::GRAPHIC ||
-                         nType == ContentTypeId::OLE)
-                {
-                    FlyCntType eType = FLYCNTTYPE_FRM;
-                    if(nType == ContentTypeId::GRAPHIC)
-                        eType = FLYCNTTYPE_GRF;
-                    else if(nType == ContentTypeId::OLE)
-                        eType = FLYCNTTYPE_OLE;
-                    
BringFramesToAttention(m_pActiveShell->GetFlyFrameFormats(eType, true));
-                }
-                else if (nType == ContentTypeId::BOOKMARK)
-                {
-                    std::vector<OUString> aNames;
-                    const auto nCount = 
m_aActiveContentArr[nType]->GetMemberCount();
-                    for (size_t i = 0; i < nCount; i++)
-                    {
-                        const SwContent* pMember = 
m_aActiveContentArr[nType]->GetMember(i);
-                        if (pMember && !pMember->IsInvisible())
-                            aNames.push_back(pMember->GetName());
-                    }
-                    BringBookmarksToAttention(aNames);
-                }
-                else if (nType == ContentTypeId::REGION || nType == 
ContentTypeId::INDEX)
-                {
-                    std::vector<const SwNode*> aNodesArr;
-                    const SwSectionFormats& rFormats = 
m_pActiveShell->GetDoc()->GetSections();
-                    const size_t nSize = rFormats.size();
-                    for (SwSectionFormats::size_type n = nSize; n;)
-                    {
-                        const SwSectionFormat* pSectionFormat = rFormats[--n];
-                        if (pSectionFormat && pSectionFormat->IsInNodesArr())
-                        {
-                            const SwSection* pSection = 
pSectionFormat->GetSection();
-                            if (pSection && !pSection->IsHiddenFlag())
-                            {
-                                const SectionType eSectionType = 
pSection->GetType();
-                                if (nType == ContentTypeId::REGION &&
-                                        (eSectionType == 
SectionType::ToxContent ||
-                                         eSectionType == 
SectionType::ToxHeader))
-                                    continue;
-                                if (nType == ContentTypeId::INDEX &&
-                                        eSectionType != 
SectionType::ToxContent)
-                                    continue;
-                                if (const SwNode* pNode = 
pSectionFormat->GetSectionNode())
-                                    aNodesArr.push_back(pNode);
-                            }
-                        }
-                    }
-                    BringTypesWithFlowFramesToAttention(aNodesArr);
-                }
-                else if (nType == ContentTypeId::URLFIELD)
-                {
-                    SwGetINetAttrs aINetAttrsArr;
-                    m_pActiveShell->GetINetAttrs(aINetAttrsArr, false);
-                    BringURLFieldsToAttention(aINetAttrsArr);
-                }
-                else if (nType == ContentTypeId::REFERENCE)
-                {
-                    std::vector<const SwTextAttr*> aTextAttrArr;
-                    for (const SfxPoolItem* pItem :
-                         
m_pActiveShell->GetAttrPool().GetItemSurrogates(RES_TXTATR_REFMARK))
-                    {
-                        if (const auto pRefMark = dynamic_cast<const 
SwFormatRefMark*>(pItem))
-                        {
-                            const SwTextRefMark* pTextRef = 
pRefMark->GetTextRefMark();
-                            if (pTextRef && 
&pTextRef->GetTextNode().GetNodes() ==
-                                    &m_pActiveShell->GetNodes())
-                                aTextAttrArr.push_back(pTextRef);
-                        }
-                    }
-                    BringReferencesToAttention(aTextAttrArr);
-                }
-                else if (nType == ContentTypeId::POSTIT)
-                {
-                    std::vector<const SwTextAttr*> aTextAttrArr;
-                    const auto nCount = 
m_aActiveContentArr[nType]->GetMemberCount();
-                    for (size_t i = 0; i < nCount; i++)
-                    {
-                        const SwPostItContent* pPostItContent = 
static_cast<const SwPostItContent*>(
-                                    m_aActiveContentArr[nType]->GetMember(i));
-                        if (pPostItContent && !pPostItContent->IsInvisible())
-                            if (const SwFormatField* pFormatField = 
pPostItContent->GetPostIt())
-                                if (const SwTextAttr* pTextAttr = 
pFormatField->GetTextField())
-                                    aTextAttrArr.push_back(pTextAttr);
-                    }
-                    BringPostItFieldsToAttention(aTextAttrArr);
-                }
-                else if (nType == ContentTypeId::DRAWOBJECT)
-                {
-                    IDocumentDrawModelAccess& rIDDMA = 
m_pActiveShell->getIDocumentDrawModelAccess();
-                    if (const SwDrawModel* pModel = rIDDMA.GetDrawModel())
-                    {
-                        if (const SdrPage* pPage = pModel->GetPage(0))
-                        {
-                            if (const size_t nCount = pPage->GetObjCount())
-                            {
-                                std::vector<const SdrObject*> aSdrObjectArr;
-                                for (size_t i = 0; i < nCount; ++i)
-                                {
-                                    const SdrObject* pObject = 
pPage->GetObj(i);
-                                    if (pObject && 
!pObject->GetName().isEmpty() &&
-                                            
rIDDMA.IsVisibleLayerId(pObject->GetLayer()))
-                                        aSdrObjectArr.push_back(pObject);
-                                }
-                                BringDrawingObjectsToAttention(aSdrObjectArr);
-                            }
-                        }
-                    }
-                }
-                else if (nType == ContentTypeId::TEXTFIELD)
-                {
-                    std::vector<const SwTextAttr*> aTextAttrArr;
-                    const auto nCount = 
m_aActiveContentArr[nType]->GetMemberCount();
-                    for (size_t i = 0; i < nCount; i++)
-                    {
-                        const SwTextFieldContent* pTextFieldCnt =
-                                static_cast<const SwTextFieldContent*>(
-                                    m_aActiveContentArr[nType]->GetMember(i));
-                        if (pTextFieldCnt && !pTextFieldCnt->IsInvisible())
-                            if (const SwFormatField* pFormatField = 
pTextFieldCnt->GetFormatField())
-                                if (const SwTextAttr* pTextAttr = 
pFormatField->GetTextField())
-                                    aTextAttrArr.push_back(pTextAttr);
-                    }
-                    BringTextFieldsToAttention(aTextAttrArr);
-                }
-                else if (nType == ContentTypeId::FOOTNOTE || nType == 
ContentTypeId::ENDNOTE)
-                {
-                    std::vector<const SwTextAttr*> aTextAttrArr;
-                    const auto nCount = 
m_aActiveContentArr[nType]->GetMemberCount();
-                    for (size_t i = 0; i < nCount; i++)
-                    {
-                        const SwTextFootnoteContent* pTextFootnoteCnt =
-                                static_cast<const SwTextFootnoteContent*>(
-                                    m_aActiveContentArr[nType]->GetMember(i));
-                        if (pTextFootnoteCnt && 
!pTextFootnoteCnt->IsInvisible())
-                            if (const SwTextAttr* pTextAttr = 
pTextFootnoteCnt->GetTextFootnote())
-                                aTextAttrArr.push_back(pTextAttr);
-                    }
-                    BringFootnotesToAttention(aTextAttrArr);
-                }
-            }
-        }
-        m_xTreeView->copy_iterator(*xEntry, *m_xOverlayCompareEntry);
-    }
     return false;
 }
 
@@ -5172,23 +4894,6 @@ void SwContentTree::ShowActualView()
     GetParentWindow()->UpdateListBox();
 }
 
-IMPL_LINK_NOARG(SwContentTree, m_aOverlayObjectDelayTimerHdl, Timer *, void)
-{
-    m_aOverlayObjectDelayTimer.Stop();
-    if (m_xOverlayObject)
-    {
-        if (SdrView* pView = m_pActiveShell->GetDrawView())
-        {
-            if (SdrPaintWindow* pPaintWindow = pView->GetPaintWindow(0))
-            {
-                const rtl::Reference<sdr::overlay::OverlayManager>& 
xOverlayManager =
-                        pPaintWindow->GetOverlayManager();
-                xOverlayManager->add(*m_xOverlayObject);
-            }
-        }
-    }
-}
-
 IMPL_LINK_NOARG(SwContentTree, SelectHdl, weld::TreeView&, void)
 {
     if (m_pConfig->IsNavigateOnSelect())
@@ -5776,6 +5481,314 @@ void 
SwContentTree::SelectContentType(std::u16string_view rContentTypeName)
     } while (m_xTreeView->iter_next_sibling(*xIter));
 }
 
+IMPL_LINK_NOARG(SwContentTree, OverlayObjectDelayTimerHdl, Timer *, void)
+{
+    m_aOverlayObjectDelayTimer.Stop();
+    if (m_xOverlayObject)
+    {
+        if (SdrView* pView = m_pActiveShell->GetDrawView())
+        {
+            if (SdrPaintWindow* pPaintWindow = pView->GetPaintWindow(0))
+            {
+                const rtl::Reference<sdr::overlay::OverlayManager>& 
xOverlayManager =
+                        pPaintWindow->GetOverlayManager();
+                xOverlayManager->add(*m_xOverlayObject);
+            }
+        }
+    }
+}
+
+void SwContentTree::OverlayObject(std::vector<basegfx::B2DRange>&& aRanges)
+{
+    m_aOverlayObjectDelayTimer.Stop();
+    if (m_xOverlayObject && m_xOverlayObject->getOverlayManager())
+        m_xOverlayObject->getOverlayManager()->remove(*m_xOverlayObject);
+    if (aRanges.empty())
+        m_xOverlayObject.reset();
+    else
+    {
+        m_xOverlayObject.reset(new sdr::overlay::OverlaySelection(
+                                   sdr::overlay::OverlayType::Invert,
+                                   Color(), std::move(aRanges), true/*unused 
for Invert type*/));
+        m_aOverlayObjectDelayTimer.Start();
+    }
+}
+
+void SwContentTree::BringEntryToAttention(const weld::TreeIter& rEntry)
+{
+    if (lcl_IsContent(rEntry, *m_xTreeView)) // content entry
+    {
+        SwContent* pCnt = 
weld::fromId<SwContent*>(m_xTreeView->get_id(rEntry));
+        if (pCnt->IsInvisible())
+            OverlayObject();
+        else
+        {
+            const ContentTypeId nType = pCnt->GetParent()->GetType();
+            if (nType == ContentTypeId::OUTLINE)
+            {
+                
BringTypesWithFlowFramesToAttention({m_pActiveShell->GetNodes().
+                        
GetOutLineNds()[static_cast<SwOutlineContent*>(pCnt)->GetOutlinePos()]});
+            }
+            else if (nType == ContentTypeId::TABLE)
+            {
+                if (const SwFrameFormats* pFrameFormats =
+                        m_pActiveShell->GetDoc()->GetTableFrameFormats())
+                    if (const SwFrameFormat* pFrameFormat =
+                            pFrameFormats->FindFormatByName(pCnt->GetName()))
+                    {
+                        SwTable* pTable = SwTable::FindTable(pFrameFormat);
+                        if (pTable)
+                            
BringTypesWithFlowFramesToAttention({pTable->GetTableNode()});
+                    }
+            }
+            else if (nType == ContentTypeId::FRAME || nType == 
ContentTypeId::GRAPHIC ||
+                     nType == ContentTypeId::OLE)
+            {
+                SwNodeType eNodeType = SwNodeType::Text;
+                if(nType == ContentTypeId::GRAPHIC)
+                    eNodeType = SwNodeType::Grf;
+                else if(nType == ContentTypeId::OLE)
+                    eNodeType = SwNodeType::Ole;
+                if (const SwFrameFormat* pFrameFormat =
+                        
m_pActiveShell->GetDoc()->FindFlyByName(pCnt->GetName(), eNodeType))
+                    BringFramesToAttention(std::vector<const SwFrameFormat*> 
{pFrameFormat});
+            }
+            else if (nType == ContentTypeId::BOOKMARK)
+            {
+                BringBookmarksToAttention(std::vector<OUString> 
{pCnt->GetName()});
+            }
+            else if (nType == ContentTypeId::REGION|| nType == 
ContentTypeId::INDEX)
+            {
+                const SwSectionFormats& rFormats = 
m_pActiveShell->GetDoc()->GetSections();
+                const SwSectionFormat* pFormat = 
rFormats.FindFormatByName(pCnt->GetName());
+                if (pFormat)
+                    
BringTypesWithFlowFramesToAttention({pFormat->GetSectionNode()});
+            }
+            else if (nType == ContentTypeId::URLFIELD)
+            {
+                BringURLFieldsToAttention(SwGetINetAttrs 
{SwGetINetAttr(pCnt->GetName(),
+                                        
*static_cast<SwURLFieldContent*>(pCnt)->GetINetAttr())});
+            }
+            else if (nType == ContentTypeId::REFERENCE)
+            {
+                if (const SwTextAttr* pTextAttr =
+                        
m_pActiveShell->GetDoc()->GetRefMark(pCnt->GetName())->GetTextRefMark())
+                {
+                    std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
+                    BringReferencesToAttention(aTextAttrArr);
+                }
+            }
+            else if (nType == ContentTypeId::POSTIT)
+            {
+                if (const SwTextAttr* pTextAttr =
+                        
static_cast<SwPostItContent*>(pCnt)->GetPostIt()->GetTextField())
+                {
+                    std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
+                    BringPostItFieldsToAttention(aTextAttrArr);
+                }
+            }
+            else if (nType == ContentTypeId::DRAWOBJECT)
+            {
+                std::vector<const SdrObject*> aSdrObjectArr 
{GetDrawingObjectsByContent(pCnt)};
+                BringDrawingObjectsToAttention(aSdrObjectArr);
+            }
+            else if (nType == ContentTypeId::TEXTFIELD)
+            {
+                if (const SwTextAttr* pTextAttr =
+                        
static_cast<SwTextFieldContent*>(pCnt)->GetFormatField()->GetTextField())
+                {
+                    std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
+                    BringTextFieldsToAttention(aTextAttrArr);
+                }
+            }
+            else if (nType == ContentTypeId::FOOTNOTE || nType == 
ContentTypeId::ENDNOTE)
+            {
+                if (const SwTextAttr* pTextAttr =
+                        static_cast<SwTextFootnoteContent*> 
(pCnt)->GetTextFootnote())
+                {
+                    std::vector<const SwTextAttr*> aTextAttrArr {pTextAttr};
+                    BringFootnotesToAttention(aTextAttrArr);
+                }
+            }
+        }
+    }
+    else // content type entry
+    {
+        SwContentType* pCntType = 
weld::fromId<SwContentType*>(m_xTreeView->get_id(rEntry));
+        if (pCntType->GetMemberCount() == 0)
+            OverlayObject();
+        else
+        {
+            const ContentTypeId nType = pCntType->GetType();
+            if (nType == ContentTypeId::OUTLINE)
+            {
+                std::vector<const SwNode*> aNodesArr(
+                            m_pActiveShell->GetNodes().GetOutLineNds().begin(),
+                            m_pActiveShell->GetNodes().GetOutLineNds().end());
+                BringTypesWithFlowFramesToAttention(aNodesArr);
+            }
+            else if (nType == ContentTypeId::TABLE)
+            {
+                std::vector<const SwNode*> aNodesArr;
+                const size_t nCount = 
m_pActiveShell->GetTableFrameFormatCount(false);
+                const SwFrameFormats* pFrameFormats =
+                        m_pActiveShell->GetDoc()->GetTableFrameFormats();
+                SwAutoFormatGetDocNode aGetHt(&m_pActiveShell->GetNodes());
+                for(size_t i = 0; i < nCount; ++i)
+                {
+                    if (const SwTableFormat* pTableFormat =
+                            
static_cast<SwTableFormat*>(pFrameFormats->GetFormat(i)))
+                        if (!pTableFormat->GetInfo(aGetHt))  // skip deleted 
tables
+                        {
+                            SwTable* pTable = SwTable::FindTable(pTableFormat);
+                            if (pTable)
+                                aNodesArr.push_back(pTable->GetTableNode());
+                        }
+                }
+                BringTypesWithFlowFramesToAttention(aNodesArr);
+            }
+            else if (nType == ContentTypeId::FRAME || nType == 
ContentTypeId::GRAPHIC ||
+                     nType == ContentTypeId::OLE)
+            {
+                FlyCntType eType = FLYCNTTYPE_FRM;
+                if(nType == ContentTypeId::GRAPHIC)
+                    eType = FLYCNTTYPE_GRF;
+                else if(nType == ContentTypeId::OLE)
+                    eType = FLYCNTTYPE_OLE;
+                
BringFramesToAttention(m_pActiveShell->GetFlyFrameFormats(eType, true));
+            }
+            else if (nType == ContentTypeId::BOOKMARK)
+            {
+                std::vector<OUString> aNames;
+                const auto nCount = pCntType->GetMemberCount();
+                for (size_t i = 0; i < nCount; i++)
+                {
+                    const SwContent* pMember = pCntType->GetMember(i);
+                    if (pMember && !pMember->IsInvisible())
+                        aNames.push_back(pMember->GetName());
+                }
+                BringBookmarksToAttention(aNames);
+            }
+            else if (nType == ContentTypeId::REGION || nType == 
ContentTypeId::INDEX)
+            {
+                std::vector<const SwNode*> aNodesArr;
+                const SwSectionFormats& rFormats = 
m_pActiveShell->GetDoc()->GetSections();
+                const size_t nSize = rFormats.size();
+                for (SwSectionFormats::size_type n = nSize; n;)
+                {
+                    const SwSectionFormat* pSectionFormat = rFormats[--n];
+                    if (pSectionFormat && pSectionFormat->IsInNodesArr())
+                    {
+                        const SwSection* pSection = 
pSectionFormat->GetSection();
+                        if (pSection && !pSection->IsHiddenFlag())
+                        {
+                            const SectionType eSectionType = 
pSection->GetType();
+                            if (nType == ContentTypeId::REGION &&
+                                    (eSectionType == SectionType::ToxContent ||
+                                     eSectionType == SectionType::ToxHeader))
+                                continue;
+                            if (nType == ContentTypeId::INDEX &&
+                                    eSectionType != SectionType::ToxContent)
+                                continue;
+                            if (const SwNode* pNode = 
pSectionFormat->GetSectionNode())
+                                aNodesArr.push_back(pNode);
+                        }
+                    }
+                }
+                BringTypesWithFlowFramesToAttention(aNodesArr);
+            }
+            else if (nType == ContentTypeId::URLFIELD)
+            {
+                SwGetINetAttrs aINetAttrsArr;
+                m_pActiveShell->GetINetAttrs(aINetAttrsArr, false);
+                BringURLFieldsToAttention(aINetAttrsArr);
+            }
+            else if (nType == ContentTypeId::REFERENCE)
+            {
+                std::vector<const SwTextAttr*> aTextAttrArr;
+                for (const SfxPoolItem* pItem :
+                     
m_pActiveShell->GetAttrPool().GetItemSurrogates(RES_TXTATR_REFMARK))
+                {
+                    if (const auto pRefMark = dynamic_cast<const 
SwFormatRefMark*>(pItem))
+                    {
+                        const SwTextRefMark* pTextRef = 
pRefMark->GetTextRefMark();
+                        if (pTextRef && &pTextRef->GetTextNode().GetNodes() ==
+                                &m_pActiveShell->GetNodes())
+                            aTextAttrArr.push_back(pTextRef);
+                    }
+                }
+                BringReferencesToAttention(aTextAttrArr);
+            }
+            else if (nType == ContentTypeId::POSTIT)
+            {
+                std::vector<const SwTextAttr*> aTextAttrArr;
+                const auto nCount = pCntType->GetMemberCount();
+                for (size_t i = 0; i < nCount; i++)
+                {
+                    const SwPostItContent* pPostItContent = static_cast<const 
SwPostItContent*>(
+                                pCntType->GetMember(i));
+                    if (pPostItContent && !pPostItContent->IsInvisible())
+                        if (const SwFormatField* pFormatField = 
pPostItContent->GetPostIt())
+                            if (const SwTextAttr* pTextAttr = 
pFormatField->GetTextField())
+                                aTextAttrArr.push_back(pTextAttr);
+                }
+                BringPostItFieldsToAttention(aTextAttrArr);
+            }
+            else if (nType == ContentTypeId::DRAWOBJECT)
+            {
+                IDocumentDrawModelAccess& rIDDMA = 
m_pActiveShell->getIDocumentDrawModelAccess();
+                if (const SwDrawModel* pModel = rIDDMA.GetDrawModel())
+                {
+                    if (const SdrPage* pPage = pModel->GetPage(0))
+                    {
+                        if (const size_t nCount = pPage->GetObjCount())
+                        {
+                            std::vector<const SdrObject*> aSdrObjectArr;
+                            for (size_t i = 0; i < nCount; ++i)
+                            {
+                                const SdrObject* pObject = pPage->GetObj(i);
+                                if (pObject && !pObject->GetName().isEmpty() &&
+                                        
rIDDMA.IsVisibleLayerId(pObject->GetLayer()))
+                                    aSdrObjectArr.push_back(pObject);
+                            }
+                            BringDrawingObjectsToAttention(aSdrObjectArr);
+                        }
+                    }
+                }
+            }
+            else if (nType == ContentTypeId::TEXTFIELD)
+            {
+                std::vector<const SwTextAttr*> aTextAttrArr;
+                const auto nCount = pCntType->GetMemberCount();
+                for (size_t i = 0; i < nCount; i++)
+                {
+                    const SwTextFieldContent* pTextFieldCnt =
+                            static_cast<const 
SwTextFieldContent*>(pCntType->GetMember(i));
+                    if (pTextFieldCnt && !pTextFieldCnt->IsInvisible())
+                        if (const SwFormatField* pFormatField = 
pTextFieldCnt->GetFormatField())
+                            if (const SwTextAttr* pTextAttr = 
pFormatField->GetTextField())
+                                aTextAttrArr.push_back(pTextAttr);
+                }
+                BringTextFieldsToAttention(aTextAttrArr);
+            }
+            else if (nType == ContentTypeId::FOOTNOTE || nType == 
ContentTypeId::ENDNOTE)
+            {
+                std::vector<const SwTextAttr*> aTextAttrArr;
+                const auto nCount = pCntType->GetMemberCount();
+                for (size_t i = 0; i < nCount; i++)
+                {
+                    const SwTextFootnoteContent* pTextFootnoteCnt =
+                            static_cast<const 
SwTextFootnoteContent*>(pCntType->GetMember(i));
+                    if (pTextFootnoteCnt && !pTextFootnoteCnt->IsInvisible())
+                        if (const SwTextAttr* pTextAttr = 
pTextFootnoteCnt->GetTextFootnote())
+                            aTextAttrArr.push_back(pTextAttr);
+                }
+                BringFootnotesToAttention(aTextAttrArr);
+            }
+        }
+    }
+}
+
 static void lcl_CalcOverlayRanges(const SwTextFrame* pStartFrame, const 
SwTextFrame* pEndFrame,
                                   const SwPosition& aStartPos, const 
SwPosition& aEndPos,
                                   std::vector<basegfx::B2DRange>& aRanges)
@@ -5807,16 +5820,6 @@ static void lcl_CalcOverlayRanges(const SwTextFrame* 
pStartFrame, const SwTextFr
     }
 }
 
-void SwContentTree::OverlayObject(std::vector<basegfx::B2DRange>&& aRanges)
-{
-    if (m_xOverlayObject && m_xOverlayObject->getOverlayManager())
-        m_xOverlayObject->getOverlayManager()->remove(*m_xOverlayObject);
-    m_xOverlayObject.reset(new 
sdr::overlay::OverlaySelection(sdr::overlay::OverlayType::Invert,
-                                                              Color(), 
std::move(aRanges),
-                                                              true /*unused 
for Invert type*/));
-    m_aOverlayObjectDelayTimer.Start();
-}
-
 void SwContentTree::BringFramesToAttention(const std::vector<const 
SwFrameFormat*>& rFrameFormats)
 {
     std::vector<basegfx::B2DRange> aRanges;
@@ -5829,8 +5832,7 @@ void SwContentTree::BringFramesToAttention(const 
std::vector<const SwFrameFormat
             aRanges.emplace_back(aFrameRect.Left(), aFrameRect.Top(), 
aFrameRect.Right(),
                                  aFrameRect.Bottom());
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringBookmarksToAttention(const std::vector<OUString>& 
rNames)
@@ -5868,8 +5870,7 @@ void SwContentTree::BringBookmarksToAttention(const 
std::vector<OUString>& rName
         }
         lcl_CalcOverlayRanges(pMarkStartFrame, pMarkEndFrame, aMarkStart, 
aMarkEnd, aRanges);
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringTypesWithFlowFramesToAttention(const 
std::vector<const SwNode*>& rNodes)
@@ -5895,8 +5896,7 @@ void 
SwContentTree::BringTypesWithFlowFramesToAttention(const std::vector<const
             pFrame = &pFollow->GetFrame();
         }
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringURLFieldsToAttention(const SwGetINetAttrs& 
rINetAttrsArr)
@@ -5914,8 +5914,7 @@ void SwContentTree::BringURLFieldsToAttention(const 
SwGetINetAttrs& rINetAttrsAr
             lcl_CalcOverlayRanges(pFrame, pFrame, aStartPos, aEndPos, aRanges);
         }
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringReferencesToAttention(std::vector<const SwTextAttr*>& 
rTextAttrsArr)
@@ -5938,8 +5937,7 @@ void 
SwContentTree::BringReferencesToAttention(std::vector<const SwTextAttr*>& r
             lcl_CalcOverlayRanges(pFrame, pFrame, aStartPos, aEndPos, aRanges);
         }
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringPostItFieldsToAttention(std::vector<const 
SwTextAttr*>& rTextAttrsArr)
@@ -5977,8 +5975,7 @@ void 
SwContentTree::BringPostItFieldsToAttention(std::vector<const SwTextAttr*>&
         lcl_CalcOverlayRanges(pMarkStartFrame, pMarkEndFrame, aMarkStart,
                               aMarkEnd, aRanges);
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringFootnotesToAttention(std::vector<const SwTextAttr*>& 
rTextAttrsArr)
@@ -6001,8 +5998,7 @@ void 
SwContentTree::BringFootnotesToAttention(std::vector<const SwTextAttr*>& rT
             lcl_CalcOverlayRanges(pFrame, pFrame, aStartPos, aEndPos, aRanges);
         }
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringDrawingObjectsToAttention(std::vector<const 
SdrObject*>& rDrawingObjectsArr)
@@ -6017,8 +6013,7 @@ void 
SwContentTree::BringDrawingObjectsToAttention(std::vector<const SdrObject*>
                 aRanges.emplace_back(aRect.Left(), aRect.Top(), aRect.Right(), 
aRect.Bottom());
         }
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 void SwContentTree::BringTextFieldsToAttention(std::vector<const SwTextAttr*>& 
rTextAttrsArr)
@@ -6043,8 +6038,7 @@ void 
SwContentTree::BringTextFieldsToAttention(std::vector<const SwTextAttr*>& r
             lcl_CalcOverlayRanges(pFrame, pFrame, aStartPos, aEndPos, aRanges);
         }
     }
-    if (aRanges.size())
-        OverlayObject(std::move(aRanges));
+    OverlayObject(std::move(aRanges));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 70ccd56a1baeec9dcb689dbe3910495d52d7c925
Author:     Andrea Gelmini <andrea.gelm...@gelma.net>
AuthorDate: Sat Dec 10 19:46:59 2022 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:11 2023 +0100

    Fix typo
    
    Change-Id: I9bded67c9e044ed4e96f8520a3a5486b8d3ecf0b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143937
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146506
    Tested-by: Jenkins

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index d0d05db0a346..aca8f4208907 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1166,7 +1166,7 @@ IMPL_LINK(SwContentTree, MouseMoveHdl, const MouseEvent&, 
rMEvt, bool)
             m_xTreeView->get_dest_row_at_pos(rMEvt.GetPosPixel(), 
xEntry.get(), false, false))
     {
         // Remove the overlay object if the pointer is over a different entry 
than the last time
-        // it was here. Gaurd against doing the iter_compare when entering the 
window to work
+        // it was here. Guard against doing the iter_compare when entering the 
window to work
         // around a bug that causes sal backends to crash when 
m_xOverlayCompareEntry iterator is
         // nullptr which is the case on initial window entry.
         if (!rMEvt.IsEnterWindow() &&
commit 3040b2af378b80e3bea624471118477b4a19c0d6
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Feb 2 09:24:37 2023 +0000
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:10 2023 +0100

    add missing mnemonic-widget
    
    Change-Id: Ib0b53fe8fed8ca1d53b7691a8609ce1e14bcce89
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146492
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
    Tested-by: Jenkins

diff --git a/cui/uiconfig/ui/qrcodegen.ui b/cui/uiconfig/ui/qrcodegen.ui
index 2a55eaa01901..a3d25996e16c 100644
--- a/cui/uiconfig/ui/qrcodegen.ui
+++ b/cui/uiconfig/ui/qrcodegen.ui
@@ -116,6 +116,7 @@
                         <property name="valign">start</property>
                         <property name="label" translatable="yes" 
context="qrcodegen|label_text" comments="Text to be stored in the 
QR">URL/Text:</property>
                         <property name="use-underline">True</property>
+                        <property name="mnemonic-widget">edit_text</property>
                         <property name="xalign">0</property>
                       </object>
                       <packing>
commit 439b7fef81841e650599e4f275768f830f58f651
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jan 24 12:33:45 2023 +0000
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:10 2023 +0100

    tdf#152404 crash with ibus-mozc with ctrl+alt+c during ExtTextInput
    
    Change-Id: I86e19387d93a57c3ad263f0c2dc9222a5f3480be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146078
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/vcl/unx/gtk3/gtkframe.cxx b/vcl/unx/gtk3/gtkframe.cxx
index 864e8934c7ad..1d72e46ff21a 100644
--- a/vcl/unx/gtk3/gtkframe.cxx
+++ b/vcl/unx/gtk3/gtkframe.cxx
@@ -451,6 +451,16 @@ bool GtkSalFrame::doKeyCallback( guint state,
     bool bStopProcessingKey;
     if (bDown)
     {
+        // tdf#152404 Commit uncommitted text before dispatching key 
shortcuts. In
+        // certain cases such as pressing Control-Alt-C in a Writer document 
while
+        // there is uncommitted text will call GtkSalFrame::EndExtTextInput() 
which
+        // will dispatch a SalEvent::EndExtTextInput event. Writer's handler 
for that
+        // event will delete the uncommitted text and then insert the 
committed text
+        // but LibreOffice will crash when deleting the uncommitted text 
because
+        // deletion of the text also removes and deletes the newly inserted 
comment.
+        if (m_pIMHandler && !m_pIMHandler->m_aInputEvent.maText.isEmpty() && 
(aEvent.mnCode & (KEY_MOD1 | KEY_MOD2)))
+            m_pIMHandler->doCallEndExtTextInput();
+
         bStopProcessingKey = CallCallbackExc(SalEvent::KeyInput, &aEvent);
         // #i46889# copy AlternateKeyCode handling from generic plugin
         if (!bStopProcessingKey)
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 6a7eecdb71b1..dc804a76ab35 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -3424,8 +3424,8 @@ static void UnsetAltIfAltGr(SalKeyEvent& rKeyEvt, 
sal_uInt16 nModCode)
 }
 
 // tdf#152404 Commit uncommitted text before dispatching key shortcuts. In
-// certain cases such as pressing Command-Option-C in a Writer document while
-// there is uncommitted text will call AquaSalFrame::EndExtTextInput() which
+// certain cases such as pressing Control-Alt-C in a Writer document while
+// there is uncommitted text will call WinSalFrame::EndExtTextInput() which
 // will dispatch a SalEvent::EndExtTextInput event. Writer's handler for that
 // event will delete the uncommitted text and then insert the committed text
 // but LibreOffice will crash when deleting the uncommitted text because
commit ad5302b0e25d8749d6629ac0ea874000ffce1493
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Jan 31 16:08:53 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:10 2023 +0100

    tdf#152073 qt: Draw background when drawing frame
    
    For native drawing of a frame (border), use
    the window background color as default color.
    
    As mentioned in commit f39f21d92ec83c3a5062f29dd26214fc83012c06
    ("tdf#138010 (IV) VclScrolledWindow: Use actual border width"),
    the Qt/KDE Breeze style uses a frame width of 2, with the
    actual 1 pixel border being surrounded by a 1 pixel
    padding/margin.
    
    Transparent background did not ensure that the 1 pixel
    padding/margin is repainted and could thus result
    in artifacts from what was painted to that location
    previously (s. the Basic IDE editor example from
    tdf#152073).
    
    Use the window background for the default image color
    when drawing a frame to avoid this.
    
    The gtk3 VCL plugin also explicitly draws a background
    for the corresponding code path, using
    `gtk_render_background`.
    
    An alternative might be to explicitly draw the
    background further up the call stack, or pass
    an explicit background color from
    `DecorationView::DrawFrame` and only apply
    a default color in `QtGraphics_Controls::drawNativeControl`
    when a background color (other than `COL_DEFAULT`)
    is passed to that method.
    
    Sample bt for gtk3:
    
        1   GtkSalGraphics::drawNativeControl     salnativewidgets-gtk.cxx 1835 
0x7fffe6271f92
        2   SalGraphics::DrawNativeControl        salgdilayout.cxx         807  
0x7fffee887739
        3   OutputDevice::DrawNativeControl       nativecontrols.cxx       287  
0x7fffee58906e
        4   (anonymous namespace)::ImplDrawFrame  decoview.cxx             600  
0x7fffee1b2055
        5   DecorationView::DrawFrame             decoview.cxx             886  
0x7fffee1b32c8
        6   ImplSmallBorderWindowView::DrawWindow brdwin.cxx               742  
0x7fffee0ea3ea
        7   ImplBorderWindow::Paint               brdwin.cxx               1630 
0x7fffee0ee99a
        8   PaintHelper::DoPaint                  paint.cxx                313  
0x7fffee0c9f1c
        9   vcl::Window::ImplCallPaint            paint.cxx                617  
0x7fffee0cb4b3
        10  PaintHelper::~PaintHelper             paint.cxx                552  
0x7fffee0cae14
        11  vcl::Window::ImplCallPaint            paint.cxx                623  
0x7fffee0cb513
    
    Many thanks to Rafael Lima for the
    very helpful analysis in [1] and [2].
    
    [1] https://bugs.documentfoundation.org/show_bug.cgi?id=152073#c2
    [2] https://bugs.documentfoundation.org/show_bug.cgi?id=152073#c3
    
    Change-Id: I08e6d05d0fc3d0e54952a65cd28dee92615df0a3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146419
    Reviewed-by: Rafael Lima <rafael.palma.l...@gmail.com>
    Tested-by: Jenkins
    (cherry picked from commit 6f4b8b7cfe2907b7da46eec6951a0e09b836a6de)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146402
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/vcl/qt5/QtGraphics_Controls.cxx b/vcl/qt5/QtGraphics_Controls.cxx
index e6e3d820da59..e08b84719e61 100644
--- a/vcl/qt5/QtGraphics_Controls.cxx
+++ b/vcl/qt5/QtGraphics_Controls.cxx
@@ -283,6 +283,7 @@ bool QtGraphics_Controls::drawNativeControl(ControlType 
type, ControlPart part,
                 break;
             }
             [[fallthrough]]; // QPalette::Window
+        case ControlType::Frame:
         case ControlType::Menubar:
         case ControlType::WindowBackground:
             
m_image->fill(QApplication::palette().color(QPalette::Window).rgb());
commit 64f28f8c529509d9a502c6fe83ca73005e41e651
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Mon Jan 30 22:00:31 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:10 2023 +0100

    tdf#153272: add some missing properties in SwSearchProperties
    
    RES_CHRATR_RELIEF
    RES_CHRATR_ROTATE
    RES_CHRATR_SCALEW
    RES_PARATR_VERTALIGN
    
    Change-Id: Ic4a3323a4b4b4231dee083016a6112a9e2674c86
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146370
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit 2d9570523b16dd157eeee384040642e3c2e0ed05)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146401
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/unocore/unosrch.cxx 
b/sw/source/core/unocore/unosrch.cxx
index ee260c077b61..646d5955ba90 100644
--- a/sw/source/core/unocore/unosrch.cxx
+++ b/sw/source/core/unocore/unosrch.cxx
@@ -140,7 +140,11 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& 
rSet, bool bIsValueSearch)
     pCTLLangItem,
     pCTLPostureItem,
     pCTLWeightItem,
-    pShadowItem ;
+    pShadowItem,
+    pCharReliefItem,
+    pCharRotate,
+    pCharScaleWidth,
+    pParaVertAlign;
 
     auto funcClone = [&rSet](sal_uInt16 nWID, std::unique_ptr<SfxPoolItem> & 
rpPoolItem)
     {
@@ -298,6 +302,18 @@ void SwSearchProperties_Impl::FillItemSet(SfxItemSet& 
rSet, bool bIsValueSearch)
             case RES_CHRATR_SHADOW:
                 pTempItem = funcClone(nWID, pShadowItem);
             break;
+            case RES_CHRATR_RELIEF:
+                pTempItem = funcClone(nWID, pCharReliefItem);
+            break;
+            case RES_CHRATR_ROTATE:
+                pTempItem = funcClone(nWID, pCharRotate);
+            break;
+            case RES_CHRATR_SCALEW:
+                pTempItem = funcClone(nWID, pCharScaleWidth);
+            break;
+            case RES_PARATR_VERTALIGN:
+                pTempItem = funcClone(nWID, pParaVertAlign);
+            break;
         }
         if(pTempItem)
         {
commit d6eb17465316b80396f085da40b64d77f6df2326
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Thu Feb 2 08:14:14 2023 -0300
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:09 2023 +0100

    Update git submodules
    
    * Update helpcontent2 from branch 'libreoffice-7-5'
      to 17e29a631823bfc2a61d6eeb7571c6c0612f608c
      - Update 7.5 release video
    
        Change-Id: I046063162992e71c60d0c3f6fba9265e172cedeb
        Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146446
        Tested-by: Jenkins
        Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>
        (cherry picked from commit 36367761a21809320eb5e01875f5734c0cf59727)
        Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146403
        Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/helpcontent2 b/helpcontent2
index 406cdee110dc..17e29a631823 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 406cdee110dc4966fb2942f5319af3cb464df311
+Subproject commit 17e29a631823bfc2a61d6eeb7571c6c0612f608c
commit 59a43f47b4623f3327c17ae675bf3c834b0510bb
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed Feb 1 12:31:46 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:09 2023 +0100

    tdf#148952 sw: DOCX export: ECMA-376 1st ed does not allow title
    
    ... attribute, so fallback to merge the value with the description
    into the descr attribute.
    
    Change-Id: I4e83a67788d0c82dd762c075f06db358a7884675
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146444
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit d09996a0d66c51908103afef9c56679b891570d8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146460
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index b361e5b171a0..5bc80127f6a7 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5742,9 +5742,22 @@ void DocxAttributeOutput::FlyFrameGraphic( const 
SwGrfNode* pGrfNode, const Size
     rtl::Reference<::sax_fastparser::FastAttributeList> docPrattrList = 
FastSerializerHelper::createAttrList();
     docPrattrList->add( XML_id, OString::number( m_anchorId++).getStr());
     docPrattrList->add( XML_name, OUStringToOString( pFrameFormat->GetName(), 
RTL_TEXTENCODING_UTF8 ) );
-    docPrattrList->add( XML_descr, OUStringToOString( pGrfNode ? 
pGrfNode->GetDescription() : pOLEFrameFormat->GetObjDescription(), 
RTL_TEXTENCODING_UTF8 ));
+    OUString const descr(pGrfNode ? pGrfNode->GetDescription() : 
pOLEFrameFormat->GetObjDescription());
+    OUString const title(pGrfNode ? pGrfNode->GetTitle() : 
pOLEFrameFormat->GetObjTitle());
     if( GetExport().GetFilter().getVersion( ) != oox::core::ECMA_DIALECT )
-        docPrattrList->add( XML_title, OUStringToOString( pGrfNode ? 
pGrfNode->GetTitle() : pOLEFrameFormat->GetObjTitle(), RTL_TEXTENCODING_UTF8 ));
+    {
+        docPrattrList->add(XML_descr, OUStringToOString(descr, 
RTL_TEXTENCODING_UTF8));
+        docPrattrList->add(XML_title, OUStringToOString(title, 
RTL_TEXTENCODING_UTF8));
+    }
+    else
+    {   // tdf#148952 no title attribute, merge it into descr
+        OUString const value(title.isEmpty()
+            ? descr
+            : descr.isEmpty()
+                ? title
+                : title + OUString::Concat("\n") + descr);
+        docPrattrList->add(XML_descr, OUStringToOString(value, 
RTL_TEXTENCODING_UTF8));
+    }
     m_pSerializer->startElementNS( XML_wp, XML_docPr, docPrattrList );
 
     OUString sURL, sRelId;
commit 10ae5ff0d5363e8a12e45d531ec20e4b9ca2598c
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Wed Feb 1 18:00:25 2023 +0100
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Fri Feb 3 23:33:09 2023 +0100

    tdf#152738 sw: fix lost SwPosition in spelling dialog
    
    Which resulted broken spell checking.
    
    Regression from commit b484e5d9e0d22b794c2d1c73741191836158a4ad
    "use more SwPosition::Assign".
    
    Change-Id: I7be215f629ed73a3009f8358172ee3a7e2e72ffc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146465
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins
    Reviewed-by: László Németh <nem...@numbertext.org>
    Tested-by: László Németh <nem...@numbertext.org>
    (cherry picked from commit 2780b026f912a103aea3f8dc19319b998d19a43a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146407

diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 3a085c1d060e..7898af3b540d 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -607,8 +607,8 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
                                             
pSpellArgs->pStartPos->GetContentIndex();
                             if( nCurrNd != nEndNd )
                             {
-                                pSttPos->Assign(nCurrNd);
-                                pEndPos->Assign(nCurrNd);
+                                pSttPos->Assign(nCurrNd, 
pSttPos->GetContentIndex());
+                                pEndPos->Assign(nCurrNd, 
pEndPos->GetContentIndex());
                                 nCurrNd = nEndNd;
                             }
                         }

Reply via email to