summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/templdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/dialog/templdlg.cxx')
-rw-r--r--sfx2/source/dialog/templdlg.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 31920f202a36..c5f2870eb67b 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1045,10 +1045,14 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
bSelect = sal_False;
else
{
- aFmtLb.MakeVisible( pEntry );
- aFmtLb.Select( pEntry );
- bWaterDisabled = (aFmtLb.GetSelectionCount() <=1 ? sal_False : sal_True);
- FmtSelectHdl( NULL );
+ if (!aFmtLb.IsSelected(pEntry))
+ {
+ aFmtLb.MakeVisible( pEntry );
+ aFmtLb.SelectAll(false);
+ aFmtLb.Select( pEntry );
+ bWaterDisabled = (aFmtLb.GetSelectionCount() <=1 ? sal_False : sal_True);
+ FmtSelectHdl( NULL );
+ }
}
}