diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-14 13:57:15 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-14 17:45:17 +0100 |
commit | 8c12f8145388a586536b874359ad0bae37ffcc3b (patch) | |
tree | f960990297bc34dc4cd48519da00a27fd5c43d1e | |
parent | f3f71b087d25966d39a4c883bbe0b60b27419119 (diff) |
This RES_FRM_SIZE item is apparently SwFormatFrameSize, not SvxSizeItem
...as reported by -fsanitize=vptr when doing "Format - Page..." in Writer
(though both types have a Size member at the same location, so didn't cause any
real problems):
> sw/source/ui/misc/pgfnote.cxx:283:32: runtime error: downcast of address 0x604000e23f50 which does not point to an object of type 'const SvxSizeItem'
> 0x604000e23f50: note: object is of type 'SwFormatFrameSize'
> 94 01 00 3d 90 ae ee 90 ff 7e 00 00 06 00 00 00 58 00 00 be d0 2f 00 00 00 00 00 00 e0 3d 00 00
> ^~~~~~~~~~~~~~~~~~~~~~~
> vptr for 'SwFormatFrameSize'
> #0 0x7efd1c8d01e2 in SwFootNotePage::ActivatePage(SfxItemSet const&) sw/source/ui/misc/pgfnote.cxx:283:32
> #1 0x7efd1c8cbf07 in SwFootNotePage::Reset(SfxItemSet const*) sw/source/ui/misc/pgfnote.cxx:230:5
> #2 0x7f002e149560 in SfxTabDialog::ActivatePageHdl(TabControl*) sfx2/source/dialog/tabdlg.cxx:1117:19
> #3 0x7f002e1400e3 in SfxTabDialog::LinkStubActivatePageHdl(void*, TabControl*) sfx2/source/dialog/tabdlg.cxx:1035:1
> #4 0x7f0008248f37 in Link<TabControl*, void>::Call(TabControl*) const include/tools/link.hxx:84:45
> #5 0x7f0008204caa in TabControl::ActivatePage() vcl/source/control/tabctrl.cxx:1601:19
Change-Id: I73df2438565a7069153b22140197897df810b2aa
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 691105f269ad..44f6d033c781 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -18,6 +18,7 @@ */ #include <cmdid.h> +#include <fmtfsize.hxx> #include <hintids.hxx> #include <svx/dialmgr.hxx> #include <svx/dialogs.hrc> @@ -280,8 +281,8 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet) void SwFootNotePage::ActivatePage(const SfxItemSet& rSet) { - const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get( RES_FRM_SIZE )); - lMaxHeight = rSize.GetSize().Height(); + auto const & rSize = static_cast<SwFormatFrameSize const &>(rSet.Get( RES_FRM_SIZE )); + lMaxHeight = rSize.GetHeight(); const SfxPoolItem* pItem; if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) ) |