From 2f631dbdb7f506b9e0612d221056ce949dae897b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 6 Dec 2010 23:15:19 -0500 Subject: [PATCH] Put the ODMA dialog check box on its own row. * Put the ODMA dialog check box on its own row, and push everything downward to make some room. * Remove the Help Formatting controls to make more room. Without this the enable experimental check box would go outside the visible area on Mac. This fixes fdo#32133. --- cui/source/options/optgdlg.cxx | 26 ++++++++++++++++++++++++++ cui/source/options/optgdlg.hrc | 19 +++++++++++++------ cui/source/options/optgdlg.src | 28 +++++++++++++++------------- 3 files changed, 54 insertions(+), 19 deletions(-) diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 293cfc3..dbbabf2 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -221,6 +221,11 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : { FreeResource(); +#if not ENABLE_HELP_FORMATTING + aHelpFormatFT.Hide(); + aHelpFormatLB.Hide(); +#endif + if (!lcl_HasSystemFilePicker()) { aFileDlgFL.Hide(); @@ -238,6 +243,27 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet ) : aODMADlgCB.Hide(); #endif + if (!aODMADlgCB.IsVisible()) + { + // rearrange the following controls + Point aNewPos = aPrintDlgFL.GetPosPixel(); + long nDelta = aNewPos.Y() - aODMADlgCB.GetPosPixel().Y(); + + Window* pWins[] = + { + &aPrintDlgFL, &aPrintDlgCB, &aDocStatusFL, &aDocStatusCB, &aSaveAlwaysCB, + &aTwoFigureFL, &aInterpretFT, &aYearValueField, &aToYearFT, &aExperimentalCB + }; + Window** pCurrent = pWins; + const sal_Int32 nCount = SAL_N_ELEMENTS( pWins ); + for ( sal_Int32 i = 0; i < nCount; ++i, ++pCurrent ) + { + aNewPos = (*pCurrent)->GetPosPixel(); + aNewPos.Y() -= nDelta; + (*pCurrent)->SetPosPixel( aNewPos ); + } + } + if ( !aFileDlgCB.IsVisible() ) { // rearrange the following controls diff --git a/cui/source/options/optgdlg.hrc b/cui/source/options/optgdlg.hrc index 425e608..4247de3 100644 --- a/cui/source/options/optgdlg.hrc +++ b/cui/source/options/optgdlg.hrc @@ -30,6 +30,8 @@ // defines for positions and sizes --------------------------------------- +#define ENABLE_HELP_FORMATTING 0 + #define WHOLE_WIDTH 248 #define EDIT_WIDTH 30 #define UNIT_WIDTH 40 @@ -46,19 +48,24 @@ #define ROWSPACE RSC_SP_CTRL_DESC_Y #define ROW0 3 #define ROW1 (ROW0 +RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) +#if ENABLE_HELP_FORMATTING #define ROW2 (ROW1 +RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) +#else +#define ROW2 (ROW1) +#endif #define ROW3 (ROW2 +RSC_CD_DROPDOWN_HEIGHT+ROWSPACE) #define ROW4 (ROW3 +RSC_CD_PUSHBUTTON_HEIGHT+ROWSPACE) #define ROW5 (ROW4 +RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) #define ROW6 (ROW5 +RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) -#define ROW7 (ROW6 +RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) -#define ROW8 (ROW7 +RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) -#define ROW9 (ROW8 +RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) -#define ROW10 (ROW9 +RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) +#define ROW7 (ROW6 +RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) +#define ROW8 (ROW7 +RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) +#define ROW9 (ROW8 +RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) +#define ROW10 (ROW9 +RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) #define ROW11 (ROW10+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) -#define ROW12 (ROW11+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) -#define ROW13 (ROW12+RSC_CD_PUSHBUTTON_HEIGHT+ROWSPACE) +#define ROW12 (ROW11+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) +#define ROW13 (ROW12+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) #define ROW14 (ROW13+RSC_CD_CHECKBOX_HEIGHT+ROWSPACE) +#define ROW15 (ROW14+RSC_CD_FIXEDLINE_HEIGHT+ROWSPACE) #define DIFF(v1,v2) (v2-v1) #define OFFS_TEXTBOX_FIXEDTEXT(base) (base+(RSC_CD_TEXTBOX_HEIGHT-RSC_CD_FIXEDTEXT_HEIGHT)/2) diff --git a/cui/source/options/optgdlg.src b/cui/source/options/optgdlg.src index 5b14e93..e2c3478 100644 --- a/cui/source/options/optgdlg.src +++ b/cui/source/options/optgdlg.src @@ -60,6 +60,7 @@ TabPage OFA_TP_MISC Size = MAP_APPFONT( WHOLE_WIDTH - COL3, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "~Extended tips"; }; +#if ENABLE_HELP_FORMATTING FixedText FT_HELPFORMAT { Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT(ROW2) ); @@ -82,6 +83,7 @@ TabPage OFA_TP_MISC < "High Contrast White" ; > ; }; }; +#endif CheckBox CB_HELPAGENT { Pos = MAP_APPFONT( COL1, ROW3 ); @@ -109,62 +111,62 @@ TabPage OFA_TP_MISC CheckBox CB_FILEDLG { Pos = MAP_APPFONT( COL1, ROW5 ); - Size = MAP_APPFONT( COL3 - COL1, RSC_CD_CHECKBOX_HEIGHT ); + Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "~Use %PRODUCTNAME dialogs"; }; CheckBox CB_ODMADLG { - Pos = MAP_APPFONT( COL3, ROW5 ); - Size = MAP_APPFONT( WHOLE_WIDTH - COL4, RSC_CD_CHECKBOX_HEIGHT ); + Pos = MAP_APPFONT( COL1, ROW6 ); + Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "Show ODMA DMS dialogs first"; Text [ en-GB ] = "Show ODMA DMS dialogues first"; }; FixedLine FL_PRINTDLG { - Pos = MAP_APPFONT( COL0, ROW6 ); + Pos = MAP_APPFONT( COL0, ROW7 ); Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ); Text [ en-US ] = "Print dialogs"; }; CheckBox CB_PRINTDLG { - Pos = MAP_APPFONT( COL1, ROW7 ); + Pos = MAP_APPFONT( COL1, ROW8 ); Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "Use %PRODUCTNAME ~dialogs"; }; FixedLine FL_DOCSTATUS { - Pos = MAP_APPFONT( COL0, ROW8 ); + Pos = MAP_APPFONT( COL0, ROW9 ); Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ); Text [ en-US ] = "Document status"; }; CheckBox CB_DOCSTATUS { - Pos = MAP_APPFONT( COL1, ROW9 ); + Pos = MAP_APPFONT( COL1, ROW10 ); Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "~Printing sets \"document modified\" status"; }; CheckBox CB_SAVE_ALWAYS { - Pos = MAP_APPFONT( COL1, ROW10 ); + Pos = MAP_APPFONT( COL1, ROW11 ); Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "Allow to save document even when the document is not modified"; }; FixedLine FL_TWOFIGURE { - Pos = MAP_APPFONT( COL0, ROW11 ); + Pos = MAP_APPFONT( COL0, ROW12 ); Size = MAP_APPFONT( WHOLE_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ); Text [ en-US ] = "Year (two digits)" ; }; FixedText FT_INTERPRET { - Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT(ROW12) ); + Pos = MAP_APPFONT( COL1, OFFS_TEXTBOX_FIXEDTEXT(ROW13) ); Size = MAP_APPFONT( DIFF( COL1, COL3), RSC_CD_FIXEDTEXT_HEIGHT ); Text [ en-US ] = "Interpret as years between"; }; NumericField NF_YEARVALUE { Border = TRUE ; - Pos = MAP_APPFONT( COL4, ROW12 ); + Pos = MAP_APPFONT( COL4, ROW13 ); Size = MAP_APPFONT( EDIT_WIDTH, RSC_CD_TEXTBOX_HEIGHT ); Minimum = 1583 ; Maximum = 9857 ; @@ -173,13 +175,13 @@ TabPage OFA_TP_MISC }; FixedText FT_TOYEAR { - Pos = MAP_APPFONT( COL6, OFFS_TEXTBOX_FIXEDTEXT(ROW12) ); + Pos = MAP_APPFONT( COL6, OFFS_TEXTBOX_FIXEDTEXT(ROW13) ); Size = MAP_APPFONT( WHOLE_WIDTH - COL6, RSC_CD_FIXEDTEXT_HEIGHT ); Text [ en-US ] = "and " ; }; CheckBox CB_EXPERIMENTAL { - Pos = MAP_APPFONT( COL0, ROW13 ); + Pos = MAP_APPFONT( COL1, ROW15 ); Size = MAP_APPFONT( WHOLE_WIDTH - COL1, RSC_CD_CHECKBOX_HEIGHT ); Text [ en-US ] = "Enable experimental (unstable) features"; }; -- 1.7.3.1