diff options
Diffstat (limited to 'sw/source/core/uibase/app/docst.cxx')
-rw-r--r-- | sw/source/core/uibase/app/docst.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/uibase/app/docst.cxx b/sw/source/core/uibase/app/docst.cxx index 75e38c6c1c49..dc5af5c35665 100644 --- a/sw/source/core/uibase/app/docst.cxx +++ b/sw/source/core/uibase/app/docst.cxx @@ -100,9 +100,14 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) else { SfxViewFrame* pFrame = pShell->GetView().GetViewFrame(); - const ISfxTemplateCommon* pCommon = SFX_APP()->GetCurrentTemplateCommon(pFrame->GetBindings()); - if( pCommon ) - nActualFamily = static_cast< sal_uInt16 >(pCommon->GetActualFamily()); + SfxPoolItem* pItem = NULL; + pFrame->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); + SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); + if (pFamilyItem) + { + nActualFamily = static_cast<sal_uInt16>(SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue())); + } + delete pItem; } while (nWhich) |