summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/grfsh.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-02-14 16:04:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-02-15 07:53:58 +0100
commit552f5835fdc775a77022a49bdc77f84eab697bcf (patch)
treed6ba6d9bd199e7dac2580cf6aa207cef71b3d87b /sw/source/uibase/shells/grfsh.cxx
parent457220bc2c0142c5b6f4135cb688ccfc99fec792 (diff)
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 <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/uibase/shells/grfsh.cxx')
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
1 files changed, 1 insertions, 1 deletions
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);