summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2011-03-07 15:50:09 +0100
committerCédric Bosdonnat <cedricbosdo@openoffice.org>2011-03-07 16:01:18 +0100
commit6e5659212308452d96ef445e6a0de4ebdee30920 (patch)
treee92e5f6c09f27fda1c5c3a1efb0e18723522588f /sfx2
parent058cae6939cb43814565290041c025ab8cbff6a0 (diff)
fdo#30917: Storing the hierarchical view of style browser
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/templdlg.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 35d13a97ea95..92cdea37fd8e 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);
+ }
}
// ------------------------------------------------------------------------