From 60b62da93a5d04cb5f21bfe315eb79fa6310ac36 Mon Sep 17 00:00:00 2001 From: Travis Carter Date: Thu, 21 Jun 2012 19:25:19 -0500 Subject: [PATCH] Properly store position and current page settings for bot Ok and Apply buttons Change-Id: Iddee68a7b22749db50c8c78613be11c8ba5500c6 --- sfx2/source/dialog/tabdlg.cxx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index fe4e8be..231e846 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -468,11 +468,6 @@ SfxTabDialog::SfxTabDialog SfxTabDialog::~SfxTabDialog() { - // save settings (screen position and current page) - SvtViewOptions aDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) ); - aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(WINDOWSTATE_MASK_POS),RTL_TEXTENCODING_ASCII_US)); - aDlgOpt.SetPageID( aTabCtrl.GetCurPageId() ); - const sal_uInt16 nCount = pImpl->pData->Count(); for ( sal_uInt16 i = 0; i < nCount; ++i ) { @@ -884,6 +879,10 @@ short SfxTabDialog::Ok() /* [Description] Ok handler for the Dialogue. + + Dialog's current location and current page are saved for the next time + the dialog is shown. + The OutputSet is created and for each page this or the special OutputSet is set by calling the method , to insert the entered data by the user into the set. @@ -895,6 +894,11 @@ short SfxTabDialog::Ok() */ { + // save settings (screen position and current page) + SvtViewOptions aDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) ); + aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(WINDOWSTATE_MASK_POS),RTL_TEXTENCODING_ASCII_US)); + aDlgOpt.SetPageID( aTabCtrl.GetCurPageId() ); + pImpl->bInOK = sal_True; if ( !pOutSet ) -- 1.7.9.5