summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-10 11:01:26 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-09-11 11:13:23 +0000
commita212ef2b6ebadb22a9abf6d042aa2b5fd9ac1cf0 (patch)
treeaee754ccd8da5e209278c0ffe99c49e7a991f371 /sfx2
parent88b6dd3ea77ca9f6d5fac2965cea6ff0634e6ba5 (diff)
tdf#93901: apply handling in style/edit dialog improved
introduced SfxTabPage::ChangesApplied() to enable resetting values to their initial state while editing styles Change-Id: I60fd68d8464e12e795b0e0d2f2e53882a225c181 Reviewed-on: https://gerrit.libreoffice.org/18467 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/tabdlg.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 26a97b624639..987932529660 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -296,7 +296,9 @@ void SfxTabPage::PageCreated( const SfxAllItemSet& /*aSet*/ )
DBG_ASSERT(false, "SfxTabPage::PageCreated should not be called");
}
-
+void SfxTabPage::ChangesApplied()
+{
+}
void SfxTabPage::AddItemConnection( sfx::ItemConnectionBase* pConnection )
{
@@ -924,7 +926,18 @@ bool SfxTabDialog::Apply()
{
bool bApplied = false;
if (PrepareLeaveCurrentPage())
+ {
bApplied = (Ok() == RET_OK);
+ //let the pages update their saved values
+ GetInputSetImpl()->Put(*GetOutputItemSet());
+ sal_uInt16 pageCount = m_pTabCtrl->GetPageCount();
+ for (sal_uInt16 pageIdx = 0; pageIdx < pageCount; ++pageIdx)
+ {
+ SfxTabPage* pPage = dynamic_cast<SfxTabPage*> (m_pTabCtrl->GetTabPage(m_pTabCtrl->GetPageId(pageIdx)));
+ if (pPage)
+ pPage->ChangesApplied();
+ }
+ }
return bApplied;
}