summaryrefslogtreecommitdiff
path: root/cui/source/options/optgdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options/optgdlg.cxx')
-rw-r--r--cui/source/options/optgdlg.cxx44
1 files changed, 44 insertions, 0 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index b9a181a28438..e2fe5a273474 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -204,6 +204,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
aFileDlgFL ( this, CUI_RES( FL_FILEDLG ) ),
aFileDlgROImage ( this, CUI_RES( FI_FILEDLG_RO ) ),
aFileDlgCB ( this, CUI_RES( CB_FILEDLG ) ),
+ aODMADlgCB ( this, CUI_RES( CB_ODMADLG ) ),
aPrintDlgFL ( this, CUI_RES( FL_PRINTDLG ) ),
aPrintDlgCB ( this, CUI_RES( CB_PRINTDLG ) ),
aDocStatusFL ( this, CUI_RES( FL_DOCSTATUS ) ),
@@ -227,6 +228,31 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
aPrintDlgCB.Hide();
#endif
+#ifdef WNT
+ aFileDlgCB.SetToggleHdl( LINK( this, OfaMiscTabPage, OnFileDlgToggled ) );
+#else
+ {
+ aODMADlgCB.Hide();
+ // rearrange the following controls
+ Point aNewPos = aDocStatusFL.GetPosPixel();
+ long nDelta = aNewPos.Y() - aODMADlgCB.GetPosPixel().Y();
+
+ Window* pWins[] =
+ {
+ &aDocStatusFL, &aDocStatusCB, &aTwoFigureFL,
+ &aInterpretFT, &aYearValueField, &aToYearFT
+ };
+ Window** pCurrent = pWins;
+ const sal_Int32 nCount = sizeof( pWins ) / sizeof( pWins[ 0 ] );
+ for ( sal_Int32 i = 0; i < nCount; ++i, ++pCurrent )
+ {
+ aNewPos = (*pCurrent)->GetPosPixel();
+ aNewPos.Y() -= nDelta;
+ (*pCurrent)->SetPosPixel( aNewPos );
+ }
+ }
+#endif
+
if ( !aFileDlgCB.IsVisible() )
{
// rearrange the following controls
@@ -316,6 +342,14 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) :
}
}
+#ifdef WNT
+IMPL_LINK( OfaMiscTabPage, OnFileDlgToggled, CheckBox*, EMPTYARG )
+{
+ aODMADlgCB.Enable( !aFileDlgCB.IsChecked() );
+ return 0;
+}
+#endif
+
// -----------------------------------------------------------------------
OfaMiscTabPage::~OfaMiscTabPage()
@@ -370,6 +404,13 @@ BOOL OfaMiscTabPage::FillItemSet( SfxItemSet& rSet )
bModified = TRUE;
}
+ if ( aODMADlgCB.IsChecked() != aODMADlgCB.GetSavedValue() )
+ {
+ SvtMiscOptions aMiscOpt;
+ aMiscOpt.SetTryODMADialog( aODMADlgCB.IsChecked() );
+ bModified = TRUE;
+ }
+
if ( aDocStatusCB.IsChecked() != aDocStatusCB.GetSavedValue() )
{
SvtPrintWarningOptions aPrintOptions;
@@ -419,6 +460,9 @@ void OfaMiscTabPage::Reset( const SfxItemSet& rSet )
aPrintDlgCB.Check( !aMiscOpt.UseSystemPrintDialog() );
aPrintDlgCB.SaveValue();
+ aODMADlgCB.Check( aMiscOpt.TryODMADialog() );
+ aODMADlgCB.SaveValue();
+
SvtPrintWarningOptions aPrintOptions;
aDocStatusCB.Check(aPrintOptions.IsModifyDocumentOnPrintingAllowed());
aDocStatusCB.SaveValue();