sc/source/ui/view/formatsh.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8ac06469dc0338ed57af76cba9d96117d753422c
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed May 31 14:50:06 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed May 31 16:38:11 2023 +0200

    Fix dynamic-type-mismatch
    
    After
        commit 5315e6069e425aad88873beb5344bb8ea31e0c55
        use more TypedWhichId
    
    flushed out some inconsistency in how SID_NUMBER_TYPE_FORMAT
    was being used, by managed to miss one place
    
    Which started to cause CppunitTest_sc_shapetest
    CPPUNIT_TEST_NAME=testTdf137355_UndoHideRows::TestBody to fail with
    
    > sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx:185:46: runtime
    error: downcast of address 0x503000ef5ae0 which does not point to an
    object of type 'const SfxUInt16Item'
    > 0x503000ef5ae0: note: object is of type 'SfxInt16Item'
    >  00 00 00 00  90 28 c9 3d f7 7f 00 00  01 00 00 00 21 67 00 be  00 00
    be be be be be be  00 00 00 00
    >               ^~~~~~~~~~~~~~~~~~~~~~~
    
    Change-Id: I4b4f9c88b8c587a9e08955728b3085eb5acece12
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152427
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index d264fd78ab69..c2acb2a3940e 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1870,7 +1870,7 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
                         if( nFormatCategory == -1 )
                             rSet.InvalidateItem( nWhich );
                         else
-                            rSet.Put( SfxInt16Item( nWhich, nFormatCategory ) 
);
+                            rSet.Put( SfxUInt16Item( nWhich, nFormatCategory ) 
);
                     }
                     else
                     {

Reply via email to