diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-08-31 23:36:19 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-09-01 10:17:19 +0000 |
commit | 056b394ae241c66fed6ff12a3ed086372a2870b1 (patch) | |
tree | ec35bf627e985b28bcd4e7f5ed25aba11085ea96 /sw | |
parent | b9939b0642afefe96ae33cd964d6726dc405843d (diff) |
let's make Impress crash less - SfxStyleFamily edition
Commit bcb41235deaf4b7ca90522bda3ba21a686819e6e - in addition to
introducing the enum SfxStyleFamily - inconsistently converted one
call of DrawDocShell::SetStyleFamily to use enum SfxStyleFamily
instead of a mysterious "5", but did not adapt all of the code that
extracts the SfxUInt16Item that subsequently extracts this value and
expects a number 0-5.
Since it's clearly inexcusably stupid to have 2 different public sets
of integers identifying styles, make the usage of the second "array
index" integers private to templdlg.cxx; the SfxUInt16 item now always
contains enum SfxStyleFamily.
(regression from bcb41235deaf4b7ca90522bda3ba21a686819e6e)
(cherry picked from commit 75c39b903f06b656293edf20ec4a5173a0755fb6)
sfx2: SfxCommonTemplateDialog_Impl can't even decide if...
...no family selection should be represented as "0" or "0xffff".
(cherry picked from commit 813a8944bdb337a0018208381aa30118151872ff)
Change-Id: I333575c504277c2046f8f5a6b36ae3f86b3b3201
Reviewed-on: https://gerrit.libreoffice.org/28569
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index 635a0daca4bc..f7bbf80fdcf4 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -113,7 +113,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem.get()); if (pFamilyItem) { - nActualFamily = SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()); + nActualFamily = static_cast<SfxStyleFamily>(pFamilyItem->GetValue()); } } |