sc/source/ui/unoobj/chart2uno.cxx     |   14 +++++++-------
 vcl/inc/jsdialog/jsdialogregister.hxx |    4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit f19b16d5d1ee9d7ce8797fed3ad7d0904d31a91c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Dec 7 14:36:05 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Dec 11 10:32:19 2024 +0100

    cid#1607842 Overflowed constant
    
    Change-Id: I4768cf58a14c0664257b74160d0c09497efec574
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178075
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sc/source/ui/unoobj/chart2uno.cxx 
b/sc/source/ui/unoobj/chart2uno.cxx
index d98a372ced1b..aa96806886bb 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -739,19 +739,19 @@ void Chart2Positioner::createPositionMap()
         SCCOL nCol1 = s.Col(), nCol2 = e.Col();
         SCROW nRow1 = s.Row(), nRow2 = e.Row();
         SCTAB nTab1 = s.Tab(), nTab2 = e.Tab();
-        assert(nTab2 < MAXTABCOUNT);
 
         for (SCTAB nTab = nTab1; nTab <= nTab2; ++nTab)
         {
-            // columns on secondary sheets are appended; we treat them as if
-            // all columns are on the same sheet.  TODO: We can't assume that
-            // the column range is 16-bit; remove that restriction.
-            sal_uInt32 nInsCol = (static_cast<sal_uInt32>(nTab) << 16) |
-                (bNoGlue ? 0 : static_cast<sal_uInt32>(nCol1));
+            assert (nCol1 >= 0);
+            sal_uInt32 nInsCol = bNoGlue ? 0 : static_cast<sal_uInt32>(nCol1) 
& 0xFFFF;
 
             for (SCCOL nCol = nCol1; nCol <= nCol2; ++nCol, ++nInsCol)
             {
-                FormulaTokenMap& rCol = aCols[nInsCol];
+                // columns on secondary sheets are appended; we treat them as 
if
+                // all columns are on the same sheet.  TODO: We can't assume 
that
+                // the column range is 16-bit; remove that restriction.
+                sal_uInt32 nInsKey = (static_cast<sal_uInt32>(nTab) << 16) | 
nInsCol;
+                FormulaTokenMap& rCol = aCols[nInsKey];
 
                 auto nInsRow = bNoGlue ? nNoGlueRow : nRow1;
                 for (SCROW nRow = nRow1; nRow <= nRow2; ++nRow, ++nInsRow)
commit ce688c1a24cd3755bbddfaf6b610a86cb3516d79
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Dec 11 08:18:16 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Dec 11 10:32:06 2024 +0100

    cid#1636674 COPY_INSTEAD_OF_MOVE
    
    and
    
    cid#1557211 COPY_INSTEAD_OF_MOVE
    
    Change-Id: Idf6e060a75abd2d7cb231318ea924e2c02ddfc04
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178283
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/vcl/inc/jsdialog/jsdialogregister.hxx 
b/vcl/inc/jsdialog/jsdialogregister.hxx
index 85a772679a55..2fc0715882c8 100644
--- a/vcl/inc/jsdialog/jsdialogregister.hxx
+++ b/vcl/inc/jsdialog/jsdialogregister.hxx
@@ -21,12 +21,12 @@ template <class T> class WidgetRegister
     std::map<OUString, T>& Map() { return m_aWidgetMap; }
 
 public:
-    void Remember(const OUString& rId, T pWidget);
+    void Remember(const OUString& rId, const T& pWidget);
     void Forget(const OUString& rId);
     T Find(const OUString& rId);
 };
 
-template <class T> void WidgetRegister<T>::Remember(const OUString& nWindowId, 
T pMenu)
+template <class T> void WidgetRegister<T>::Remember(const OUString& nWindowId, 
const T& pMenu)
 {
     Map()[nWindowId] = pMenu;
 }

Reply via email to