[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 4 commits - compilerplugins/clang editeng/source sc/source vcl/unx

Justin Luth justin_luth at sil.org
Mon Feb 20 20:57:40 UTC 2017


 compilerplugins/clang/sallogareas.cxx |    2 
 editeng/source/editeng/impedit2.cxx   |    1 
 sc/source/core/data/dpoutput.cxx      |  118 ++++++++++++++++++++--------------
 vcl/unx/gtk/gtksalframe.cxx           |    4 -
 vcl/unx/gtk3/gtk3gtkframe.cxx         |    4 -
 5 files changed, 76 insertions(+), 53 deletions(-)

New commits:
commit 2af7b1827a55e693ababfba0604516a908141e69
Author: Justin Luth <justin_luth at sil.org>
Date:   Mon Feb 20 10:35:25 2017 +0300

    tdf#105256 gtk findfocus return only if focused
    
    A patch related to tdf#96685 (commit 598e6a024163f1510d076000788b7745625f5ed5)
    caused the initial regression that Japanese-mozc would freeze(tdf#100903).
    That patch only modified what happened when the text was marked as focused.
    
    However, the regression fix for Japanese bug 100903 (commit
    1c81af2c1814e8bd12701f85e09cebf5fe206647) was not placed
    inside of the "if focused" code, and so it applies to more situations
    than were broken by the first regression, thus causing new bug 105256.
    
    So, applying fix 100903 ONLY when focused solves both problems.
    
    Change-Id: I1d8381f2d8cf793d481287ae975ce8a485b6c573
    Reviewed-on: https://gerrit.libreoffice.org/34453
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Tested-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>
    (cherry picked from commit 1c3a784d38fc5986c78bab8d283c4661347baf43)
    Reviewed-on: https://gerrit.libreoffice.org/34486
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit c6a48e66deef01aa82409aec0ab3c2a9201d467b)

diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index d83ebe4..7590a71 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -3777,9 +3777,9 @@ uno::Reference<accessibility::XAccessibleEditableText>
                 uno::Reference<accessibility::XAccessibleEditableText>(xContext, uno::UNO_QUERY);
             if (xText.is())
                 return xText;
+            if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS))
+                return uno::Reference< accessibility::XAccessibleEditableText >();
         }
-        if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS))
-            return uno::Reference< accessibility::XAccessibleEditableText >();
     }
 
     for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 1a74fb5..4b65a55 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3987,9 +3987,9 @@ uno::Reference<accessibility::XAccessibleEditableText>
                 uno::Reference<accessibility::XAccessibleEditableText>(xContext, uno::UNO_QUERY);
             if (xText.is())
                 return xText;
+            if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS))
+                return uno::Reference< accessibility::XAccessibleEditableText >();
         }
-        if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS))
-            return uno::Reference< accessibility::XAccessibleEditableText >();
     }
 
     for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
commit 83cf57a6f4f0db452cefad14200d84ecaff7e417
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Feb 20 13:11:32 2017 +0200

    SAL_DEBUG_TRACE is like SAL_DEBUG
    
    Change-Id: I7b4585259255b9869e5f6ec03fc901db29c10bc8
    Reviewed-on: https://gerrit.libreoffice.org/34481
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    (cherry picked from commit 962c820d34d0e00dc3d947b17db752110cf35e40)

diff --git a/compilerplugins/clang/sallogareas.cxx b/compilerplugins/clang/sallogareas.cxx
index 512177d..a91461b 100644
--- a/compilerplugins/clang/sallogareas.cxx
+++ b/compilerplugins/clang/sallogareas.cxx
@@ -84,7 +84,7 @@ bool SalLogAreas::VisitCallExpr( const CallExpr* call )
                          loc = source.getImmediateExpansionRange( loc ).first )
                         {
                         StringRef inMacro = Lexer::getImmediateMacroName( loc, source, compiler.getLangOpts());
-                        if( inMacro == "SAL_DEBUG" )
+                        if( inMacro == "SAL_DEBUG" || inMacro == "SAL_DEBUG_TRACE" )
                             return true; // ok
                         }
                     report( DiagnosticsEngine::Warning, "missing log area",
commit d3509c8405bcf4f2deca1f22c6559ffc4e2fdfa5
Author: Justin Luth <justin_luth at sil.org>
Date:   Sat Feb 18 16:36:32 2017 +0300

    revert tdf#101815 editeng SetMustRepaint when InsertText
    
    It wasn't targetted enough at the specific problem, and caused paint
    problems. This fixes tdf#106056.
    
    Change-Id: I2d87bc78627a558c62cb0efc24e49c7656662976
    Reviewed-on: https://gerrit.libreoffice.org/34403
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit a189b27ebeac8f179b9cce959e66862a16c4dd52)
    Reviewed-on: https://gerrit.libreoffice.org/34405
    (cherry picked from commit 9431ab38da9e8e1c438a88a97b9fc4172a3f7213)

diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index c08dde3..b38db62 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2696,7 +2696,6 @@ EditPaM ImpEditEngine::ImpInsertText(const EditSelection& aCurSel, const OUStrin
             }
             ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
             OSL_ENSURE( pPortion, "Blind Portion in InsertText" );
-            pPortion->SetMustRepaint(true);
 
             if ( GetStatus().DoOnlineSpelling() )
             {
commit 59ae99832d22a40b8b92762ed60b0da9d4e49f36
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Feb 17 14:10:37 2017 +0100

    Resolves: tdf#105858 check SC_DPOUT_MAXLEVELS to prevent crash
    
    This is a combination of 2 commits.
    
    Resolves: tdf#105858 check nDataCount<SC_DPOUT_MAXLEVELS to prevent crash
    
    (cherry picked from commit 9bdf971b0202c6d55d88e61861b251459de9586b)
    
    more counts<SC_DPOUT_MAXLEVELS to check, tdf#105858 related
    
    Also for row, column and page field arrays.
    
    (cherry picked from commit 7fbdd8b7d3741d55b229977f9e6d6213af5fa542)
    
    1dccdf139af778a2c0dc550be0b573c984256a2d
    
    Change-Id: If9084543a0a191d08da37b5b8a187bce46440871
    Reviewed-on: https://gerrit.libreoffice.org/34369
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    (cherry picked from commit e38914af31b0150a383cc556e634da48eceb1dbc)

diff --git a/sc/source/core/data/dpoutput.cxx b/sc/source/core/data/dpoutput.cxx
index 031aa12..6f1faf8 100644
--- a/sc/source/core/data/dpoutput.cxx
+++ b/sc/source/core/data/dpoutput.cxx
@@ -344,9 +344,10 @@ void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount,
 
     OUString aDataNames[SC_DPOUT_MAXLEVELS];
     sal_uInt32 nDataFormats[SC_DPOUT_MAXLEVELS];
-    long nDataCount = 0;
-    long nDimCount = xDims->getCount();
-    for (long nDim=0; nDim<nDimCount; nDim++)
+    size_t nDataCount = 0;
+    sal_Int32 nDimCount = xDims->getCount();
+    sal_Int32 nDim = 0;
+    for ( ; nDim < nDimCount && nDataCount < SC_DPOUT_MAXLEVELS; nDim++)
     {
         uno::Reference<uno::XInterface> xDim =
                 ScUnoHelpFunctions::AnyToInterface( xDims->getByIndex(nDim) );
@@ -369,6 +370,8 @@ void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount,
             }
         }
     }
+    SAL_WARN_IF( nDim < nDimCount && nDataCount == SC_DPOUT_MAXLEVELS, "sc.core",
+            "lcl_FillNumberFormats - may have lost an output level due to SC_DPOUT_MAXLEVELS=" << SC_DPOUT_MAXLEVELS);
 
     if (!nDataCount)
         return;
@@ -394,7 +397,7 @@ void lcl_FillNumberFormats( sal_uInt32*& rFormats, long& rCount,
                 aName = pArray[nPos].Name;
 
             sal_uInt32 nFormat = 0;
-            for (long i=0; i<nDataCount; i++)
+            for (size_t i=0; i<nDataCount; i++)
                 if (aName == aDataNames[i])         //TODO: search more efficiently?
                 {
                     nFormat = nDataFormats[i];
@@ -615,53 +618,74 @@ ScDPOutput::ScDPOutput( ScDocument* pD, const uno::Reference<sheet::XDimensionsS
                                 switch ( eDimOrient )
                                 {
                                     case sheet::DataPilotFieldOrientation_COLUMN:
-                                        pColFields[nColFieldCount].nDim    = nDim;
-                                        pColFields[nColFieldCount].nHier   = nHierarchy;
-                                        pColFields[nColFieldCount].nLevel  = nLev;
-                                        pColFields[nColFieldCount].nDimPos = nDimPos;
-                                        pColFields[nColFieldCount].aResult = xLevRes->getResults();
-                                        pColFields[nColFieldCount].mnSrcNumFmt = nNumFmt;
-                                        pColFields[nColFieldCount].maName  = aName;
-                                        pColFields[nColFieldCount].maCaption= aCaption;
-                                        pColFields[nColFieldCount].mfValue = fValue;
-                                        pColFields[nColFieldCount].mbHasHiddenMember = bHasHiddenMember;
-                                        pColFields[nColFieldCount].mbDataLayout = bIsDataLayout;
-                                        if (!lcl_MemberEmpty(pColFields[nColFieldCount].aResult))
-                                            ++nColFieldCount;
-                                        break;
+                                        if (nColFieldCount < SC_DPOUT_MAXLEVELS)
+                                        {
+                                            pColFields[nColFieldCount].nDim    = nDim;
+                                            pColFields[nColFieldCount].nHier   = nHierarchy;
+                                            pColFields[nColFieldCount].nLevel  = nLev;
+                                            pColFields[nColFieldCount].nDimPos = nDimPos;
+                                            pColFields[nColFieldCount].aResult = xLevRes->getResults();
+                                            pColFields[nColFieldCount].mnSrcNumFmt = nNumFmt;
+                                            pColFields[nColFieldCount].maName  = aName;
+                                            pColFields[nColFieldCount].maCaption= aCaption;
+                                            pColFields[nColFieldCount].mfValue = fValue;
+                                            pColFields[nColFieldCount].mbHasHiddenMember = bHasHiddenMember;
+                                            pColFields[nColFieldCount].mbDataLayout = bIsDataLayout;
+                                            if (!lcl_MemberEmpty(pColFields[nColFieldCount].aResult))
+                                                ++nColFieldCount;
+                                        }
+                                        else
+                                        {
+                                            SAL_WARN("sc.core","ScDPOutput - nColFieldCount already at SC_DPOUT_MAXLEVELS=" << SC_DPOUT_MAXLEVELS);
+                                        }
+                                    break;
                                     case sheet::DataPilotFieldOrientation_ROW:
-                                        pRowFields[nRowFieldCount].nDim    = nDim;
-                                        pRowFields[nRowFieldCount].nHier   = nHierarchy;
-                                        pRowFields[nRowFieldCount].nLevel  = nLev;
-                                        pRowFields[nRowFieldCount].nDimPos = nDimPos;
-                                        pRowFields[nRowFieldCount].aResult = xLevRes->getResults();
-                                        pRowFields[nRowFieldCount].mnSrcNumFmt = nNumFmt;
-                                        pRowFields[nRowFieldCount].maName  = aName;
-                                        pRowFields[nRowFieldCount].maCaption= aCaption;
-                                        pRowFields[nRowFieldCount].mfValue = fValue;
-                                        pRowFields[nRowFieldCount].mbHasHiddenMember = bHasHiddenMember;
-                                        pRowFields[nRowFieldCount].mbDataLayout = bIsDataLayout;
-                                        if (!lcl_MemberEmpty(pRowFields[nRowFieldCount].aResult))
+                                        if (nRowFieldCount < SC_DPOUT_MAXLEVELS)
                                         {
-                                            ++nRowFieldCount;
-                                            bRowFieldHasMember = true;
+                                            pRowFields[nRowFieldCount].nDim    = nDim;
+                                            pRowFields[nRowFieldCount].nHier   = nHierarchy;
+                                            pRowFields[nRowFieldCount].nLevel  = nLev;
+                                            pRowFields[nRowFieldCount].nDimPos = nDimPos;
+                                            pRowFields[nRowFieldCount].aResult = xLevRes->getResults();
+                                            pRowFields[nRowFieldCount].mnSrcNumFmt = nNumFmt;
+                                            pRowFields[nRowFieldCount].maName  = aName;
+                                            pRowFields[nRowFieldCount].maCaption= aCaption;
+                                            pRowFields[nRowFieldCount].mfValue = fValue;
+                                            pRowFields[nRowFieldCount].mbHasHiddenMember = bHasHiddenMember;
+                                            pRowFields[nRowFieldCount].mbDataLayout = bIsDataLayout;
+                                            if (!lcl_MemberEmpty(pRowFields[nRowFieldCount].aResult))
+                                            {
+                                                ++nRowFieldCount;
+                                                bRowFieldHasMember = true;
+                                            }
                                         }
-                                        break;
+                                        else
+                                        {
+                                            SAL_WARN("sc.core","ScDPOutput - nRowFieldCount already at SC_DPOUT_MAXLEVELS=" << SC_DPOUT_MAXLEVELS);
+                                        }
+                                    break;
                                     case sheet::DataPilotFieldOrientation_PAGE:
-                                        pPageFields[nPageFieldCount].nDim    = nDim;
-                                        pPageFields[nPageFieldCount].nHier   = nHierarchy;
-                                        pPageFields[nPageFieldCount].nLevel  = nLev;
-                                        pPageFields[nPageFieldCount].nDimPos = nDimPos;
-                                        pPageFields[nPageFieldCount].aResult = getVisiblePageMembersAsResults(xLevel);
-                                        pPageFields[nPageFieldCount].mnSrcNumFmt = nNumFmt;
-                                        pPageFields[nPageFieldCount].maName  = aName;
-                                        pPageFields[nPageFieldCount].maCaption= aCaption;
-                                        pPageFields[nPageFieldCount].mfValue = fValue;
-                                        pPageFields[nPageFieldCount].mbHasHiddenMember = bHasHiddenMember;
-                                        pPageFields[nPageFieldCount].mbPageDim = true;
-                                        // no check on results for page fields
-                                        ++nPageFieldCount;
-                                        break;
+                                        if (nPageFieldCount < SC_DPOUT_MAXLEVELS)
+                                        {
+                                            pPageFields[nPageFieldCount].nDim    = nDim;
+                                            pPageFields[nPageFieldCount].nHier   = nHierarchy;
+                                            pPageFields[nPageFieldCount].nLevel  = nLev;
+                                            pPageFields[nPageFieldCount].nDimPos = nDimPos;
+                                            pPageFields[nPageFieldCount].aResult = getVisiblePageMembersAsResults(xLevel);
+                                            pPageFields[nPageFieldCount].mnSrcNumFmt = nNumFmt;
+                                            pPageFields[nPageFieldCount].maName  = aName;
+                                            pPageFields[nPageFieldCount].maCaption= aCaption;
+                                            pPageFields[nPageFieldCount].mfValue = fValue;
+                                            pPageFields[nPageFieldCount].mbHasHiddenMember = bHasHiddenMember;
+                                            pPageFields[nPageFieldCount].mbPageDim = true;
+                                            // no check on results for page fields
+                                            ++nPageFieldCount;
+                                        }
+                                        else
+                                        {
+                                            SAL_WARN("sc.core","ScDPOutput - nPageFieldCount already at SC_DPOUT_MAXLEVELS=" << SC_DPOUT_MAXLEVELS);
+                                        }
+                                    break;
                                     default:
                                     {
                                         // added to avoid warnings


More information about the Libreoffice-commits mailing list