summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-02-07 13:55:32 +0100
committerJan Holesovsky <kendy@collabora.com>2014-02-07 13:58:09 +0100
commit4af737df9fb1746a34d461770b5ec8b09664aea1 (patch)
tree0f8243b427338eb98acf68343bb969fd26242fef /sfx2
parent014c5761e2132ba65138f86f0fe0b42d4b858c26 (diff)
templatemanager: Fix empty dialog when saving templates.
We used to call just mpTabControl->Clear() in setSaveMode(); but that worked only with .src dialogs, as the tab pages could have existed even without TabControl containing them. This is not possible with .ui definitions any more (and rightly so!), so show just one tab here for now, until we do a bigger Template manager rework. Change-Id: I400dbcc326e883a1c1f526e94974162c3641f8ae
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/templatedlg.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 1464b1480e39..16b023f40254 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -320,7 +320,14 @@ void SfxTemplateManagerDlg::setSaveMode()
{
mbIsSaveMode = true;
- mpTabControl->Clear();
+ // FIXME We used to call just mpTabControl->Clear() here; but that worked
+ // only with .src dialogs, as the tab pages could have existed even
+ // without TabControl containing them. This is not possible with .ui
+ // definitions any more (and rightly so!), so leave just one tab here for
+ // now, until we do a bigger Template manager rework.
+ while (mpTabControl->GetPageCount() > 1)
+ mpTabControl->RemovePage(mpTabControl->GetPageId(1));
+
mpCurView->filterItems(ViewFilter_Application(FILTER_APP_NONE));
mpViewBar->ShowItem(VIEWBAR_SAVE);