summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-31 14:50:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-31 16:38:11 +0200
commit8ac06469dc0338ed57af76cba9d96117d753422c (patch)
tree54576b935ed0f57921dbd0b158b89ae4e985fcef
parent847f899cb3f9607b55fd5989b2043a0b513dec22 (diff)
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 <sbergman@redhat.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/view/formatsh.cxx2
1 files changed, 1 insertions, 1 deletions
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
{