diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-17 17:08:52 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-17 17:08:52 +0100 |
commit | 2f46a7d1b255232b979b4fcca02e25b09edf949e (patch) | |
tree | 279af6b3d6c258a7e1abe450b92037eb842883da /sw | |
parent | 721cbf443744661c3c83a45186eb0b72d6e20e41 (diff) |
Avoid -fsanitize=enum
...when doing Writer "Insert - Table of Contents and Index - Table of Contents,
Index or Bibliography...":
> sw/source/uibase/inc/cnttab.hxx:58:16: runtime error: load of value 65535, which is not a valid value for type 'TOXTypes'
> #0 0x7fbed9c2c9c8 in CurTOXType::operator==(CurTOXType const&) sw/source/uibase/inc/cnttab.hxx:58:16
> #1 0x7fbed9b711b1 in SwTOXEntryTabPage::ActivatePage(SfxItemSet const&) sw/source/ui/index/cnttab.cxx:2071:25
> #2 0x7fc217524056 in SfxTabDialog::ActivatePageHdl(TabControl*) sfx2/source/dialog/tabdlg.cxx:1126:19
> #3 0x7fc217519ac3 in SfxTabDialog::LinkStubActivatePageHdl(void*, TabControl*) sfx2/source/dialog/tabdlg.cxx:1035:1
> #4 0x7fc1f15c0e37 in Link<TabControl*, void>::Call(TabControl*) const include/tools/link.hxx:84:45
> #5 0x7fc1f157cbaa in TabControl::ActivatePage() vcl/source/control/tabctrl.cxx:1601:19
Change-Id: I458e010b10dfdf3e944c389f61595869cc41036f
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/toxe.hxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/inc/toxe.hxx b/sw/inc/toxe.hxx index 5bf5c9d5a735..417cc10cbebd 100644 --- a/sw/inc/toxe.hxx +++ b/sw/inc/toxe.hxx @@ -33,7 +33,10 @@ enum SwTOIKeyType TOI_SECONDARY }; -enum TOXTypes +// Somewhat redundantly fix TOXType's underlying type to int, so that +// SwTOXEntryTabPage (sw/source/ui/index/cnttab.cxx) can initialize +// aLastTOXType.eType to (TOXTypes)USHRT_MAX without causing -fsanitize=enum: +enum TOXTypes: int { TOX_INDEX, TOX_USER, |