summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/inc/sfx2/tabdlg.hxx10
-rw-r--r--sfx2/source/dialog/tabdlg.cxx10
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx2
3 files changed, 13 insertions, 9 deletions
diff --git a/sfx2/inc/sfx2/tabdlg.hxx b/sfx2/inc/sfx2/tabdlg.hxx
index 164dae330514..594731fd3047 100644
--- a/sfx2/inc/sfx2/tabdlg.hxx
+++ b/sfx2/inc/sfx2/tabdlg.hxx
@@ -201,13 +201,9 @@ public:
void SetApplyHandler(const Link& _rHdl);
SAL_DLLPRIVATE void Start_Impl();
- bool OK_Impl()
- {
- bool bRet = PrepareLeaveCurrentPage();
- if (bRet)
- Ok();
- return bRet;
- }
+
+ //calls Ok without closing dialog
+ bool Apply();
};
namespace sfx { class ItemConnectionBase; }
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index eda237570f9a..0015972f6e05 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -1090,7 +1090,7 @@ IMPL_LINK_NOARG(SfxTabDialog, OkHdl)
{
pImpl->bInOK = sal_True;
- if ( OK_Impl() )
+ if (PrepareLeaveCurrentPage())
{
if ( pImpl->bModal )
EndDialog( Ok() );
@@ -1103,6 +1103,14 @@ IMPL_LINK_NOARG(SfxTabDialog, OkHdl)
return 0;
}
+bool SfxTabDialog::Apply()
+{
+ bool bApplied = false;
+ if (PrepareLeaveCurrentPage())
+ bApplied = (Ok() == RET_OK);
+ return bApplied;
+}
+
// -----------------------------------------------------------------------
bool SfxTabDialog::PrepareLeaveCurrentPage()
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 70beaa92e86d..9bc0c870a824 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -159,7 +159,7 @@ String AbstractTabDialog_Impl::GetText() const
IMPL_LINK_NOARG(AbstractApplyTabDialog_Impl, ApplyHdl)
{
- if (pDlg->OK_Impl())
+ if (pDlg->Apply())
m_aHandler.Call(NULL);
return 0;
}