vcl119: persistent window state for print dialog
This commit is contained in:
parent
46f05469df
commit
c7908996ac
1 changed files with 11 additions and 0 deletions
11
vcl/source/window/printdlg.cxx
Normal file → Executable file
11
vcl/source/window/printdlg.cxx
Normal file → Executable 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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue