sw/source/uibase/shells/grfsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 552f5835fdc775a77022a49bdc77f84eab697bcf Author: Stephan Bergmann <[email protected]> Date: Wed Feb 14 16:04:30 2018 +0100 SID_ATTR_TRANSFORM_ANGLE is an SfxInt32Item ...as reported by UBSan when rotating an image in Writer: > sw/source/uibase/shells/grfsh.cxx:531:52: runtime error: downcast of address 0x00000bba8d80 which does not point to an object of type 'const SfxUInt32Item' > 0x00000bba8d80: note: object is of type 'SfxInt32Item' > 00 00 00 00 f8 8f 04 42 8f 7f 00 00 01 00 00 00 6f 27 00 00 d4 17 00 00 00 00 00 00 41 00 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SfxInt32Item' > #0 0x7f8eaf7fcdad in SwGrfShell::Execute(SfxRequest&) sw/source/uibase/shells/grfsh.cxx:531:52 > #1 0x7f8eaf7ed2f5 in SfxStubSwGrfShellExecute(SfxShell*, SfxRequest&) workdir/SdiTarget/sw/sdi/swslots.hxx:12460:1 > #2 0x7f8f3ff4637a in SfxShell::CallExec(void (*)(SfxShell*, SfxRequest&), SfxRequest&) include/sfx2/shell.hxx:211:35 ... Code had been introduced with a42b0985c7619efdc934bb1cf19e5e2c2b6faea2 "RotGrfFlyFrame: Initial adaptions". Change-Id: Id402244d723bcf653e414a3cd45ce07ad216e29f Reviewed-on: https://gerrit.libreoffice.org/49738 Tested-by: Jenkins <[email protected]> Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 0fd6daf05927..0ed1ec139f27 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -528,7 +528,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) // RotGrfFlyFrame: Get and process evtl. changed RotationAngle if ( SfxItemState::SET == pSet->GetItemState(SID_ATTR_TRANSFORM_ANGLE, false, &pItem )) { - const sal_uInt32 aNewRotation((static_cast<const SfxUInt32Item*>(pItem)->GetValue() / 10) % 3600); + const sal_Int32 aNewRotation((static_cast<const SfxInt32Item*>(pItem)->GetValue() / 10) % 3600); // RotGrfFlyFrame: Possible rotation change here, SwFlyFrameAttrMgr aMgr is available aMgr.SetRotation(nCurrentRotation, aNewRotation, aUnrotatedSize); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
