vcl119: persistent window state for print dialog

This commit is contained in:
Philipp Lohmann [pl] 2011-02-23 13:19:04 +01:00
parent 46f05469df
commit c7908996ac

11
vcl/source/window/printdlg.cxx Normal file → Executable file
View file

@ -1055,6 +1055,13 @@ void PrintDialog::readFromSettings()
}
}
maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText );
// persistent window state
rtl::OUString aWinState( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WindowState" ) ) ) );
if( aWinState.getLength() )
SetWindowState( rtl::OUStringToOString( aWinState, RTL_TEXTENCODING_UTF8 ) );
if( maOptionsPage.maToFileBox.IsChecked() )
{
maPController->resetPrinterOptions( true );
@ -1077,6 +1084,10 @@ void PrintDialog::storeToSettings()
pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPage" ) ),
maTabCtrl.GetPageText( maTabCtrl.GetCurPageId() ) );
pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WindowState" ) ),
rtl::OStringToOUString( GetWindowState(), RTL_TEXTENCODING_UTF8 )
);
pItem->Commit();
}