diff options
author | Gert Faller <gertfaller@aliceadsl.fr> | 2011-03-07 15:50:09 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedricbosdo@openoffice.org> | 2011-03-07 16:01:18 +0100 |
commit | 2be280399613be646ae1e0add4dddd51b85acbe2 (patch) | |
tree | 7ba7387690731c24bb0627523c0ca85c24653ec4 | |
parent | 1bb9e8ad9bc4a1ff2e702c71fc0edfc365416c19 (diff) |
fdo#30917: Storing the hierarchical view of style browser
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index b96d876c51..db41cb6ec5 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1778,7 +1778,10 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FilterSelectHdl, ListBox *, pBox ) ((StyleTreeListBox_Impl*)pTreeBox)-> SetDropHdl(LINK(this, SfxCommonTemplateDialog_Impl, DropHdl)); pTreeBox->SetIndent(10); - + SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); + SfxObjectShell *pDocShell = pViewFrame->GetObjectShell(); + if (pDocShell) + SaveFactoryStyleFilter( pDocShell, -2 ); FillTreeBox(); SelectStyle(aSelectEntry); pTreeBox->Show(); @@ -2273,6 +2276,9 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl( { pDlgWindow->FreeResource(); + SfxViewFrame* pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); + pCurObjShell = pViewFrame->GetObjectShell(); + USHORT nSavedFilter = static_cast< USHORT >( LoadFactoryStyleFilter( pCurObjShell ) ); Initialize(); m_aActionTbL.SetSelectHdl(LINK(this, SfxTemplateDialog_Impl, ToolBoxLSelect)); @@ -2284,6 +2290,12 @@ SfxTemplateDialog_Impl::SfxTemplateDialog_Impl( aFont.SetWeight( WEIGHT_NORMAL ); aFilterLb.SetFont( aFont ); m_aActionTbL.SetHelpId( HID_TEMPLDLG_TOOLBOX_LEFT ); + if( nSavedFilter == 0xfffe ) + { + bHierarchical = FALSE; + aFilterLb.SelectEntry(String(SfxResId(STR_STYLE_FILTER_HIERARCHICAL))); + FilterSelectHdl(&aFilterLb); + } } // ------------------------------------------------------------------------ |