summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorTravis Carter <bugs@traviswcarter.com>2012-06-21 19:25:19 -0500
committerCaolán McNamara <caolanm@redhat.com>2012-06-26 15:26:58 +0100
commitd800847be075dc7420e2655ba8167cc4f9436dc9 (patch)
tree9517ded617250bd125d475d4fe8100d9c52ca0ab /sfx2
parentf3daae2f80bbe5dae7e9eb14b8ac346dd73a2968 (diff)
Properly store dialog's position and current page
Dialog's position and current page weren't always being stored. Moved code from the destructor to SfxTabDialog::Ok() so that it will execute everytime Ok or Apply is clicked. Change-Id: Iddee68a7b22749db50c8c78613be11c8ba5500c6
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/tabdlg.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 9096f8c06ad4..5d8411842ddd 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 )
{
@@ -883,6 +878,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 <SfxTabPage::FillItemSet(SfxItemSet &)>, to
insert the entered data by the user into the set.
@@ -894,6 +893,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 )