summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docst.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app/docst.cxx')
-rw-r--r--sw/source/uibase/app/docst.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 36e29fc85b9e..6ea1f326465d 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/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)