From cb553bdba77c80f323dbed1874874cf2465abd83 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Sun, 31 Mar 2013 14:52:34 -0300 Subject: Convert Calc sheet page style to Widget UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6714ccc710d266a047032166c738063602e6e30d Reviewed-on: https://gerrit.libreoffice.org/3140 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/UI_scalc.mk | 1 + sc/inc/sc.hrc | 2 +- sc/source/ui/inc/tptable.hxx | 49 ++- sc/source/ui/pagedlg/pagedlg.hrc | 38 +- sc/source/ui/pagedlg/pagedlg.src | 244 +------------ sc/source/ui/pagedlg/tptable.cxx | 248 ++++++------- sc/uiconfig/scalc/ui/sheetprintpage.ui | 629 +++++++++++++++++++++++++++++++++ 7 files changed, 774 insertions(+), 437 deletions(-) create mode 100644 sc/uiconfig/scalc/ui/sheetprintpage.ui diff --git a/sc/UI_scalc.mk b/sc/UI_scalc.mk index 678bb465a58a..9b8f7a4f2aa5 100644 --- a/sc/UI_scalc.mk +++ b/sc/UI_scalc.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UI_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/insertname \ sc/uiconfig/scalc/ui/insertsheet \ sc/uiconfig/scalc/ui/printeroptions \ + sc/uiconfig/scalc/ui/sheetprintpage \ sc/uiconfig/scalc/ui/sortcriteriapage \ sc/uiconfig/scalc/ui/sortkey \ sc/uiconfig/scalc/ui/sortoptionspage \ diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index ad9ee123dd5b..08365fad5a6a 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -975,7 +975,7 @@ #define RID_SCDLG_PIVOTSUBT (SC_DIALOGS_START + 38) #define RID_SCDLG_NEWSCENARIO (SC_DIALOGS_START + 39) #define RID_SCDLG_INSERT_TABLE (SC_DIALOGS_START + 42) -#define RID_SCPAGE_TABLE (SC_DIALOGS_START + 43) + #define RID_SCPAGE_AREAS (SC_DIALOGS_START + 44) #define RID_SCDLG_STYLES_PAR (SC_DIALOGS_START + 46) #define RID_SCDLG_STYLES_PAGE (SC_DIALOGS_START + 48) diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx index 9fb56ce6abe9..92d654c8da32 100644 --- a/sc/source/ui/inc/tptable.hxx +++ b/sc/source/ui/inc/tptable.hxx @@ -63,36 +63,29 @@ private: void ShowImage(); private: - FixedLine aFlPageDir; - RadioButton aBtnTopDown; - RadioButton aBtnLeftRight; - FixedImage aBmpPageDir; - Image aImgLeftRight; - Image aImgTopDown; - CheckBox aBtnPageNo; - NumericField aEdPageNo; + RadioButton* m_pBtnTopDown; + RadioButton* m_pBtnLeftRight; + FixedImage* m_pBmpPageDir; + CheckBox* m_pBtnPageNo; + NumericField* m_pEdPageNo; - FixedLine aFlPrint; - CheckBox aBtnHeaders; - CheckBox aBtnGrid; - CheckBox aBtnNotes; - CheckBox aBtnObjects; - CheckBox aBtnCharts; - CheckBox aBtnDrawings; - CheckBox aBtnFormulas; - CheckBox aBtnNullVals; + CheckBox* m_pBtnHeaders; + CheckBox* m_pBtnGrid; + CheckBox* m_pBtnNotes; + CheckBox* m_pBtnObjects; + CheckBox* m_pBtnCharts; + CheckBox* m_pBtnDrawings; + CheckBox* m_pBtnFormulas; + CheckBox* m_pBtnNullVals; - FixedLine aFlScale; - FixedText aFtScaleMode; - ListBox aLbScaleMode; - FixedText aFtScaleAll; - MetricField aEdScaleAll; - FixedText aFtScalePageWidth; - EmptyNumericField aEdScalePageWidth; - FixedText aFtScalePageHeight; - EmptyNumericField aEdScalePageHeight; - FixedText aFtScalePageNum; - NumericField aEdScalePageNum; + ListBox* m_pLbScaleMode; + VclHBox* m_pBxScaleAll; + MetricField* m_pEdScaleAll; + VclGrid* m_pGrHeightWidth; + NumericField* m_pEdScalePageWidth; + NumericField* m_pEdScalePageHeight; + VclHBox* m_pBxScalePageNum; + NumericField* m_pEdScalePageNum; private: //------------------------------------ diff --git a/sc/source/ui/pagedlg/pagedlg.hrc b/sc/source/ui/pagedlg/pagedlg.hrc index c9ddaf3aae64..abadb487c9d4 100644 --- a/sc/source/ui/pagedlg/pagedlg.hrc +++ b/sc/source/ui/pagedlg/pagedlg.hrc @@ -29,42 +29,8 @@ //================================================ // TabPage: Tabelle -#define BTN_GRID 10 -#define BTN_HEADER 11 -#define BTN_NOTES 12 -#define BTN_CHARTS 13 -#define BTN_OBJECTS 14 -#define BTN_DRAWINGS 15 -#define BTN_FORMULAS 16 -#define BTN_NULLVALS 17 -#define FL_PRINT 19 - -#define BTN_TOPDOWN 20 -#define BTN_LEFTRIGHT 21 -#define BMP_PAGEDIR 22 -#define IMG_LEFTRIGHT 23 -#define IMG_TOPDOWN 24 -#define BTN_PAGENO 25 -#define ED_PAGENO 26 -#define FL_PAGEDIR 29 - -#define FT_SCALEMODE 30 -#define LB_SCALEMODE 31 -#define ED_SCALEALL 32 -#define ED_SCALEPAGENUM 34 -#define ED_SCALEPAGEWIDTH 35 -#define ED_SCALEPAGEHEIGHT 36 -#define FL_SCALE 39 - -#define FT_SCALEFACTOR 51 -#define FT_SCALEPAGEWIDTH 52 -#define FT_SCALEPAGEHEIGHT 53 -#define FT_SCALEPAGENUM 54 - -// List box entries "Scaling mode" -#define SC_TPTABLE_SCALE_PERCENT 0 -#define SC_TPTABLE_SCALE_TO 1 -#define SC_TPTABLE_SCALE_TO_PAGES 2 +#define IMG_LEFTRIGHT (SC_DIALOGS_START + 43 + 23) +#define IMG_TOPDOWN (SC_DIALOGS_START + 43 + 24) //================================================ // Dialog: Druckbereiche diff --git a/sc/source/ui/pagedlg/pagedlg.src b/sc/source/ui/pagedlg/pagedlg.src index 3a5e213ed433..2c174a017e06 100644 --- a/sc/source/ui/pagedlg/pagedlg.src +++ b/sc/source/ui/pagedlg/pagedlg.src @@ -150,254 +150,16 @@ ModelessDialog RID_SCDLG_AREAS }; }; -TabPage RID_SCPAGE_TABLE -{ - Hide = TRUE ; - HelpId = HID_SCPAGE_TABLE ; - SVLook = TRUE ; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - CheckBox BTN_HEADER - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_HEADER"; - Pos = MAP_APPFONT ( 12 , 73 ) ; - Size = MAP_APPFONT ( 142 , 10 ) ; - Text [ en-US ] = "~Column and row headers" ; - TabStop = TRUE ; - }; - CheckBox BTN_GRID - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_GRID"; - Pos = MAP_APPFONT ( 12 , 87 ) ; - Size = MAP_APPFONT ( 142 , 10 ) ; - Text [ en-US ] = "~Grid" ; - TabStop = TRUE ; - }; - CheckBox BTN_NOTES - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_NOTES"; - Pos = MAP_APPFONT ( 12 , 101 ) ; - Size = MAP_APPFONT ( 142 , 10 ) ; - Text [ en-US ] = "~Comments" ; - TabStop = TRUE ; - }; - CheckBox BTN_OBJECTS - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_OBJECTS"; - Pos = MAP_APPFONT ( 12 , 115 ) ; - Size = MAP_APPFONT ( 142 , 10 ) ; - Text [ en-US ] = "~Objects/graphics" ; - TabStop = TRUE ; - }; - CheckBox BTN_CHARTS - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_CHARTS"; - Pos = MAP_APPFONT ( 160 , 73 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; - Text [ en-US ] = "Ch~arts" ; - TabStop = TRUE ; - }; - CheckBox BTN_DRAWINGS - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_DRAWINGS"; - Pos = MAP_APPFONT ( 160 , 87 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; - Text [ en-US ] = "~Drawing objects" ; - TabStop = TRUE ; - }; - CheckBox BTN_FORMULAS - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_FORMULAS"; - Pos = MAP_APPFONT ( 160 , 101 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; - Text [ en-US ] = "~Formulas" ; - TabStop = TRUE ; - }; - CheckBox BTN_NULLVALS - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_NULLVALS"; - Pos = MAP_APPFONT ( 160 , 115 ) ; - Size = MAP_APPFONT ( 91 , 10 ) ; - Text [ en-US ] = "Zero ~values" ; - TabStop = TRUE ; - }; - FixedLine FL_PRINT - { - Pos = MAP_APPFONT ( 6 , 62 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Print" ; - }; - RadioButton BTN_TOPDOWN - { - HelpID = "sc:RadioButton:RID_SCPAGE_TABLE:BTN_TOPDOWN"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 142 , 10 ) ; - Text [ en-US ] = "~Top to bottom, then right" ; - TabStop = TRUE ; - }; - RadioButton BTN_LEFTRIGHT - { - HelpID = "sc:RadioButton:RID_SCPAGE_TABLE:BTN_LEFTRIGHT"; - Pos = MAP_APPFONT ( 12 , 28 ) ; - Size = MAP_APPFONT ( 142 , 10 ) ; - Text [ en-US ] = "~Left to right, then down" ; - TabStop = TRUE ; - }; - FixedImage BMP_PAGEDIR - { - Pos = MAP_APPFONT ( 160 , 14 ) ; - Size = MAP_APPFONT ( 25 , 25 ) ; - }; - Image IMG_LEFTRIGHT +Image IMG_LEFTRIGHT { ImageBitmap = Bitmap { File = "lftrgt.png" ; }; MaskColor = STD_MASKCOLOR; }; - Image IMG_TOPDOWN +Image IMG_TOPDOWN { ImageBitmap = Bitmap { File = "topdown.png" ; }; MaskColor = STD_MASKCOLOR; }; - CheckBox BTN_PAGENO - { - HelpID = "sc:CheckBox:RID_SCPAGE_TABLE:BTN_PAGENO"; - Pos = MAP_APPFONT ( 12 , 46 ) ; - Size = MAP_APPFONT ( 90 , 10 ) ; - Text [ en-US ] = "First ~page number" ; - TabStop = TRUE ; - }; - NumericField ED_PAGENO - { - HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_PAGENO"; - Border = TRUE ; - Pos = MAP_APPFONT ( 106 , 44 ) ; - Size = MAP_APPFONT ( 30 , 12 ) ; - TabStop = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 9999 ; - SpinSize = 1 ; - Repeat = TRUE ; - }; - FixedLine FL_PAGEDIR - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Page order" ; - }; - FixedText FT_SCALEMODE - { - Pos = MAP_APPFONT( 12, 144 ); - Size = MAP_APPFONT( 124, 8 ); - Text [ en-US ] = "Scaling ~mode"; - }; - ListBox LB_SCALEMODE - { - HelpID = "sc:ListBox:RID_SCPAGE_TABLE:LB_SCALEMODE"; - Border = TRUE; - Pos = MAP_APPFONT( 12, 155 ); - Size = MAP_APPFONT( 124, 60 ); - DropDown = TRUE; - StringList [ en-US ] = - { - < "Reduce/enlarge printout"; SC_TPTABLE_SCALE_PERCENT; >; - < "Fit print range(s) to width/height"; SC_TPTABLE_SCALE_TO; >; - < "Fit print range(s) on number of pages"; SC_TPTABLE_SCALE_TO_PAGES; >; - }; - }; - MetricField ED_SCALEALL - { - HelpID = "sc:MetricField:RID_SCPAGE_TABLE:ED_SCALEALL"; - Border = TRUE ; - Pos = MAP_APPFONT ( 218 , 155 ) ; - Size = MAP_APPFONT ( 30 , 12 ) ; - TabStop = TRUE ; - Spin = TRUE ; - Repeat = TRUE ; - Minimum = 10 ; - Maximum = 400 ; - First = 15 ; - Last = 200 ; - SpinSize = 1 ; - Unit = FUNIT_CUSTOM ; - CustomUnitText = "%" ; - }; - NumericField ED_SCALEPAGEWIDTH - { - HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGEWIDTH"; - Border = TRUE ; - Pos = MAP_APPFONT ( 218 , 144 ) ; - Size = MAP_APPFONT ( 30 , 12 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Spin = TRUE ; - Repeat = TRUE ; - Minimum = 1 ; - Maximum = 1000 ; - SpinSize = 1 ; - }; - NumericField ED_SCALEPAGEHEIGHT - { - HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGEHEIGHT"; - Border = TRUE ; - Pos = MAP_APPFONT ( 218 , 160 ) ; - Size = MAP_APPFONT ( 30 , 12 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Spin = TRUE ; - Repeat = TRUE ; - Minimum = 1 ; - Maximum = 1000 ; - SpinSize = 1 ; - }; - NumericField ED_SCALEPAGENUM - { - HelpID = "sc:NumericField:RID_SCPAGE_TABLE:ED_SCALEPAGENUM"; - Border = TRUE ; - Pos = MAP_APPFONT ( 218 , 155 ) ; - Size = MAP_APPFONT ( 30 , 12 ) ; - TabStop = TRUE ; - Hide = TRUE ; - Spin = TRUE ; - Repeat = TRUE ; - Minimum = 1 ; - Maximum = 1000 ; - SpinSize = 1 ; - }; - FixedText FT_SCALEFACTOR - { - Pos = MAP_APPFONT( 148, 157 ); - Size = MAP_APPFONT( 68 , 8 ); - Hide = TRUE; - Text [ en-US ] = "~Scaling factor"; - }; - FixedText FT_SCALEPAGEWIDTH - { - Pos = MAP_APPFONT( 148, 146 ); - Size = MAP_APPFONT( 68 , 8 ); - Hide = TRUE; - Text [ en-US ] = "~Width in pages"; - }; - FixedText FT_SCALEPAGEHEIGHT - { - Pos = MAP_APPFONT( 148, 162 ); - Size = MAP_APPFONT( 68 , 8 ); - Hide = TRUE; - Text [ en-US ] = "H~eight in pages"; - }; - FixedText FT_SCALEPAGENUM - { - Pos = MAP_APPFONT( 148, 157 ); - Size = MAP_APPFONT( 68, 8 ); - Hide = TRUE; - Text [ en-US ] = "N~umber of pages"; - }; - FixedLine FL_SCALE - { - Pos = MAP_APPFONT ( 6 , 131 ) ; - Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Scale" ; - }; -}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index 58824985eb49..21efc163b51b 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -104,63 +104,57 @@ static sal_Bool lcl_PutBoolItem( sal_uInt16 nWhich, #define GET_USHORT(sid,set) (sal_uInt16)((const SfxUInt16Item&)((set).Get(GetWhich((sid))))).GetValue() #define GET_SHOW(sid,set) ( ScVObjMode( ((const ScViewObjectModeItem&)((set).Get(GetWhich((sid))))).GetValue() ) \ == VOBJ_MODE_SHOW ) +// List box entries "Scaling mode" +#define SC_TPTABLE_SCALE_PERCENT 0 +#define SC_TPTABLE_SCALE_TO 1 +#define SC_TPTABLE_SCALE_TO_PAGES 2 //======================================================================== ScTablePage::ScTablePage( Window* pParent, const SfxItemSet& rCoreAttrs ) : - SfxTabPage( pParent, ScResId( RID_SCPAGE_TABLE ), rCoreAttrs ), - - aFlPageDir ( this, ScResId( FL_PAGEDIR ) ), - aBtnTopDown ( this, ScResId( BTN_TOPDOWN ) ), - aBtnLeftRight ( this, ScResId( BTN_LEFTRIGHT ) ), - aBmpPageDir ( this, ScResId( BMP_PAGEDIR ) ), - aImgLeftRight ( ScResId( IMG_LEFTRIGHT ) ), - aImgTopDown ( ScResId( IMG_TOPDOWN ) ), - aBtnPageNo ( this, ScResId( BTN_PAGENO ) ), - aEdPageNo ( this, ScResId( ED_PAGENO ) ), - aFlPrint ( this, ScResId( FL_PRINT ) ), - aBtnHeaders ( this, ScResId( BTN_HEADER ) ), - aBtnGrid ( this, ScResId( BTN_GRID ) ), - aBtnNotes ( this, ScResId( BTN_NOTES ) ), - aBtnObjects ( this, ScResId( BTN_OBJECTS ) ), - aBtnCharts ( this, ScResId( BTN_CHARTS ) ), - aBtnDrawings ( this, ScResId( BTN_DRAWINGS ) ), - aBtnFormulas ( this, ScResId( BTN_FORMULAS ) ), - aBtnNullVals ( this, ScResId( BTN_NULLVALS ) ), - aFlScale ( this, ScResId( FL_SCALE ) ), - aFtScaleMode ( this, ScResId( FT_SCALEMODE ) ), - aLbScaleMode ( this, ScResId( LB_SCALEMODE ) ), - aFtScaleAll ( this, ScResId( FT_SCALEFACTOR ) ), - aEdScaleAll ( this, ScResId( ED_SCALEALL ) ), - aFtScalePageWidth ( this, ScResId( FT_SCALEPAGEWIDTH ) ), - aEdScalePageWidth ( this, ScResId( ED_SCALEPAGEWIDTH ) ), - aFtScalePageHeight ( this, ScResId( FT_SCALEPAGEHEIGHT ) ), - aEdScalePageHeight ( this, ScResId( ED_SCALEPAGEHEIGHT ) ), - aFtScalePageNum ( this, ScResId( FT_SCALEPAGENUM ) ), - aEdScalePageNum ( this, ScResId( ED_SCALEPAGENUM ) ) + SfxTabPage( pParent, "SheetPrintPage","modules/scalc/ui/sheetprintpage.ui", rCoreAttrs ) { - SetExchangeSupport(); - aBtnPageNo.SetClickHdl( PAGENO_HDL ); - aBtnTopDown.SetClickHdl( PAGEDIR_HDL ); - aBtnLeftRight.SetClickHdl( PAGEDIR_HDL ); - aLbScaleMode.SetSelectHdl( SCALE_HDL ); + get(m_pBtnTopDown,"radioBTN_TOPDOWN"); + get(m_pBtnLeftRight,"radioBTN_LEFTRIGHT"); + get(m_pBmpPageDir,"imageBMP_PAGEDIR"); + get(m_pBtnPageNo,"checkBTN_PAGENO"); + get(m_pEdPageNo,"spinED_PAGENO"); + + get(m_pBtnHeaders,"checkBTN_HEADER"); + get(m_pBtnGrid,"checkBTN_GRID"); + get(m_pBtnNotes,"checkBTN_NOTES"); + get(m_pBtnObjects,"checkBTN_OBJECTS"); + get(m_pBtnCharts,"checkBTN_CHARTS"); + get(m_pBtnDrawings,"checkBTN_DRAWINGS"); + get(m_pBtnFormulas,"checkBTN_FORMULAS"); + get(m_pBtnNullVals,"checkBTN_NULLVALS"); + + get(m_pLbScaleMode,"comboLB_SCALEMODE"); + get(m_pBxScaleAll,"boxSCALEALL"); + get(m_pEdScaleAll,"spinED_SCALEALL"); + get(m_pGrHeightWidth,"gridWH"); + get(m_pEdScalePageWidth,"spinED_SCALEPAGEWIDTH"); + get(m_pEdScalePageHeight,"spinED_SCALEPAGEHEIGHT"); + get(m_pBxScalePageNum,"boxNP"); + get(m_pEdScalePageNum,"spinED_SCALEPAGENUM"); - Size aBmpSize = Image( ScResId( IMG_LEFTRIGHT ) ).GetSizePixel(); - aBmpPageDir.SetOutputSizePixel( aBmpSize ); + SetExchangeSupport(); - FreeResource(); + m_pBtnPageNo->SetClickHdl( PAGENO_HDL ); + m_pBtnTopDown->SetClickHdl( PAGEDIR_HDL ); + m_pBtnLeftRight->SetClickHdl( PAGEDIR_HDL ); + m_pLbScaleMode->SetSelectHdl( SCALE_HDL ); - aEdPageNo.SetAccessibleName(aBtnPageNo.GetText()); - aEdPageNo.SetAccessibleRelationLabeledBy(&aBtnPageNo); } // ----------------------------------------------------------------------- void ScTablePage::ShowImage() { - bool bLeftRight = aBtnLeftRight.IsChecked(); - aBmpPageDir.SetImage( (bLeftRight ? aImgLeftRight : aImgTopDown) ); + Image aImg = Image( ScResId( (m_pBtnLeftRight->IsChecked()) ? IMG_LEFTRIGHT : IMG_TOPDOWN ) ); + m_pBmpPageDir->SetImage( aImg ); + m_pBmpPageDir->SetOutputSizePixel( aImg.GetSizePixel() ); } // ----------------------------------------------------------------------- @@ -193,28 +187,28 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) //----------- // sal_Bool-Flags //----------- - aBtnNotes .Check( GET_BOOL(SID_SCATTR_PAGE_NOTES,rCoreSet) ); - aBtnGrid .Check( GET_BOOL(SID_SCATTR_PAGE_GRID,rCoreSet) ); - aBtnHeaders .Check( GET_BOOL(SID_SCATTR_PAGE_HEADERS,rCoreSet) ); - aBtnFormulas .Check( GET_BOOL(SID_SCATTR_PAGE_FORMULAS,rCoreSet) ); - aBtnNullVals .Check( GET_BOOL(SID_SCATTR_PAGE_NULLVALS,rCoreSet) ); - aBtnTopDown .Check( bTopDown ); - aBtnLeftRight .Check( !bTopDown ); + m_pBtnNotes->Check( GET_BOOL(SID_SCATTR_PAGE_NOTES,rCoreSet) ); + m_pBtnGrid->Check( GET_BOOL(SID_SCATTR_PAGE_GRID,rCoreSet) ); + m_pBtnHeaders->Check( GET_BOOL(SID_SCATTR_PAGE_HEADERS,rCoreSet) ); + m_pBtnFormulas->Check( GET_BOOL(SID_SCATTR_PAGE_FORMULAS,rCoreSet) ); + m_pBtnNullVals->Check( GET_BOOL(SID_SCATTR_PAGE_NULLVALS,rCoreSet) ); + m_pBtnTopDown->Check( bTopDown ); + m_pBtnLeftRight->Check( !bTopDown ); //------------------ // Erste Druckseite: //------------------ sal_uInt16 nPage = GET_USHORT(SID_SCATTR_PAGE_FIRSTPAGENO,rCoreSet); - aBtnPageNo.Check( nPage != 0 ); - aEdPageNo.SetValue( (nPage != 0) ? nPage : 1 ); + m_pBtnPageNo->Check( nPage != 0 ); + m_pEdPageNo->SetValue( (nPage != 0) ? nPage : 1 ); PageNoHdl( NULL ); //------------------- // Objektdarstellung: //------------------- - aBtnCharts .Check( GET_SHOW( SID_SCATTR_PAGE_CHARTS, rCoreSet ) ); - aBtnObjects .Check( GET_SHOW( SID_SCATTR_PAGE_OBJECTS, rCoreSet ) ); - aBtnDrawings .Check( GET_SHOW( SID_SCATTR_PAGE_DRAWINGS, rCoreSet ) ); + m_pBtnCharts->Check( GET_SHOW( SID_SCATTR_PAGE_CHARTS, rCoreSet ) ); + m_pBtnObjects->Check( GET_SHOW( SID_SCATTR_PAGE_OBJECTS, rCoreSet ) ); + m_pBtnDrawings->Check( GET_SHOW( SID_SCATTR_PAGE_DRAWINGS, rCoreSet ) ); //------------ // Skalierung: @@ -225,8 +219,8 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) { sal_uInt16 nScale = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue(); if( nScale > 0 ) - aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_PERCENT ); - aEdScaleAll.SetValue( (nScale > 0) ? nScale : 100 ); + m_pLbScaleMode->SelectEntryPos( SC_TPTABLE_SCALE_PERCENT ); + m_pEdScaleAll->SetValue( (nScale > 0) ? nScale : 100 ); } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETO); @@ -240,9 +234,9 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) Dialog shows width=height=1 then. */ bool bValid = nWidth || nHeight; if( bValid ) - aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_TO ); - aEdScalePageWidth.SetValue( bValid ? nWidth : 1 ); - aEdScalePageHeight.SetValue( bValid ? nHeight : 1 ); + m_pLbScaleMode->SelectEntryPos( SC_TPTABLE_SCALE_TO ); + m_pEdScalePageWidth->SetValue( bValid ? nWidth : 1 ); + m_pEdScalePageHeight->SetValue( bValid ? nHeight : 1 ); } nWhich = GetWhich(SID_SCATTR_PAGE_SCALETOPAGES); @@ -250,39 +244,39 @@ void ScTablePage::Reset( const SfxItemSet& rCoreSet ) { sal_uInt16 nPages = ((const SfxUInt16Item&)rCoreSet.Get(nWhich)).GetValue(); if( nPages > 0 ) - aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_TO_PAGES ); - aEdScalePageNum.SetValue( (nPages > 0) ? nPages : 1 ); + m_pLbScaleMode->SelectEntryPos( SC_TPTABLE_SCALE_TO_PAGES ); + m_pEdScalePageNum->SetValue( (nPages > 0) ? nPages : 1 ); } - if( aLbScaleMode.GetSelectEntryCount() == 0 ) + if( m_pLbScaleMode->GetSelectEntryCount() == 0 ) { // fall back to 100% OSL_FAIL( "ScTablePage::Reset - missing scaling item" ); - aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_PERCENT ); - aEdScaleAll.SetValue( 100 ); + m_pLbScaleMode->SelectEntryPos( SC_TPTABLE_SCALE_PERCENT ); + m_pEdScaleAll->SetValue( 100 ); } PageDirHdl( NULL ); ScaleHdl( NULL ); // merken fuer FillItemSet - aBtnFormulas .SaveValue(); - aBtnNullVals .SaveValue(); - aBtnNotes .SaveValue(); - aBtnGrid .SaveValue(); - aBtnHeaders .SaveValue(); - aBtnTopDown .SaveValue(); - aBtnLeftRight .SaveValue(); - aLbScaleMode .SaveValue(); - aBtnCharts .SaveValue(); - aBtnObjects .SaveValue(); - aBtnDrawings .SaveValue(); - aBtnPageNo .SaveValue(); - aEdPageNo .SaveValue(); - aEdScaleAll .SaveValue(); - aEdScalePageWidth.SaveValue(); - aEdScalePageHeight.SaveValue(); - aEdScalePageNum .SaveValue(); + m_pBtnFormulas->SaveValue(); + m_pBtnNullVals->SaveValue(); + m_pBtnNotes->SaveValue(); + m_pBtnGrid->SaveValue(); + m_pBtnHeaders->SaveValue(); + m_pBtnTopDown->SaveValue(); + m_pBtnLeftRight->SaveValue(); + m_pLbScaleMode->SaveValue(); + m_pBtnCharts->SaveValue(); + m_pBtnObjects->SaveValue(); + m_pBtnDrawings->SaveValue(); + m_pBtnPageNo->SaveValue(); + m_pEdPageNo->SaveValue(); + m_pEdScaleAll->SaveValue(); + m_pEdScalePageWidth->SaveValue(); + m_pEdScalePageHeight->SaveValue(); + m_pEdScalePageNum->SaveValue(); } // ----------------------------------------------------------------------- @@ -299,50 +293,50 @@ sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NOTES), rCoreSet, rOldSet, - aBtnNotes.IsChecked(), - aBtnNotes.GetSavedValue() != STATE_NOCHECK ); + m_pBtnNotes->IsChecked(), + m_pBtnNotes->GetSavedValue() != STATE_NOCHECK ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_GRID), rCoreSet, rOldSet, - aBtnGrid.IsChecked(), - aBtnGrid.GetSavedValue() != STATE_NOCHECK ); + m_pBtnGrid->IsChecked(), + m_pBtnGrid->GetSavedValue() != STATE_NOCHECK ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_HEADERS), rCoreSet, rOldSet, - aBtnHeaders.IsChecked(), - aBtnHeaders.GetSavedValue() != STATE_NOCHECK ); + m_pBtnHeaders->IsChecked(), + m_pBtnHeaders->GetSavedValue() != STATE_NOCHECK ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_TOPDOWN), rCoreSet, rOldSet, - aBtnTopDown.IsChecked(), - aBtnTopDown.GetSavedValue() ); + m_pBtnTopDown->IsChecked(), + m_pBtnTopDown->GetSavedValue() ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_FORMULAS), rCoreSet, rOldSet, - aBtnFormulas.IsChecked(), - aBtnFormulas.GetSavedValue() != STATE_NOCHECK ); + m_pBtnFormulas->IsChecked(), + m_pBtnFormulas->GetSavedValue() != STATE_NOCHECK ); bDataChanged |= lcl_PutBoolItem( GetWhich(SID_SCATTR_PAGE_NULLVALS), rCoreSet, rOldSet, - aBtnNullVals.IsChecked(), - aBtnNullVals.GetSavedValue() != STATE_NOCHECK ); + m_pBtnNullVals->IsChecked(), + m_pBtnNullVals->GetSavedValue() != STATE_NOCHECK ); //------------------ // Erste Druckseite: //------------------ - sal_Bool bUseValue = aBtnPageNo.IsChecked(); + sal_Bool bUseValue = m_pBtnPageNo->IsChecked(); if ( WAS_DEFAULT(nWhichPageNo,rOldSet) - && ( (!bUseValue && bUseValue == aBtnPageNo.GetSavedValue()) - || ( bUseValue && bUseValue == aBtnPageNo.GetSavedValue() - && aEdPageNo.GetText() == aEdPageNo.GetSavedValue() ) ) ) + && ( (!bUseValue && bUseValue == m_pBtnPageNo->GetSavedValue()) + || ( bUseValue && bUseValue == m_pBtnPageNo->GetSavedValue() + && m_pEdPageNo->GetText() == m_pEdPageNo->GetSavedValue() ) ) ) { rCoreSet.ClearItem( nWhichPageNo ); } else { - sal_uInt16 nPage = (sal_uInt16)( aBtnPageNo.IsChecked() - ? aEdPageNo.GetValue() + sal_uInt16 nPage = (sal_uInt16)( m_pBtnPageNo->IsChecked() + ? m_pEdPageNo->GetValue() : 0 ); rCoreSet.Put( SfxUInt16Item( nWhichPageNo, nPage ) ); @@ -354,38 +348,38 @@ sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet ) //------------------- bDataChanged |= lcl_PutVObjModeItem( GetWhich(SID_SCATTR_PAGE_CHARTS), - rCoreSet, rOldSet, aBtnCharts ); + rCoreSet, rOldSet, *m_pBtnCharts ); bDataChanged |= lcl_PutVObjModeItem( GetWhich(SID_SCATTR_PAGE_OBJECTS), - rCoreSet, rOldSet, aBtnObjects ); + rCoreSet, rOldSet, *m_pBtnObjects ); bDataChanged |= lcl_PutVObjModeItem( GetWhich(SID_SCATTR_PAGE_DRAWINGS), - rCoreSet, rOldSet, aBtnDrawings ); + rCoreSet, rOldSet, *m_pBtnDrawings ); //------------ // Skalierung: //------------ - if( !aEdScalePageWidth.GetValue() && !aEdScalePageHeight.GetValue() ) + if( !m_pEdScalePageWidth->GetValue() && !m_pEdScalePageHeight->GetValue() ) { - aLbScaleMode.SelectEntryPos( SC_TPTABLE_SCALE_PERCENT ); - aEdScaleAll.SetValue( 100 ); + m_pLbScaleMode->SelectEntryPos( SC_TPTABLE_SCALE_PERCENT ); + m_pEdScaleAll->SetValue( 100 ); } bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALE), rCoreSet, rOldSet, - aLbScaleMode, SC_TPTABLE_SCALE_PERCENT, - aEdScaleAll, (sal_uInt16)aEdScaleAll.GetValue() ); + *m_pLbScaleMode, SC_TPTABLE_SCALE_PERCENT, + *m_pEdScaleAll, (sal_uInt16)m_pEdScaleAll->GetValue() ); bDataChanged |= lcl_PutScaleItem2( GetWhich(SID_SCATTR_PAGE_SCALETO), rCoreSet, rOldSet, - aLbScaleMode, SC_TPTABLE_SCALE_TO, - aEdScalePageWidth, aEdScalePageHeight ); + *m_pLbScaleMode, SC_TPTABLE_SCALE_TO, + *m_pEdScalePageWidth, *m_pEdScalePageHeight ); bDataChanged |= lcl_PutScaleItem( GetWhich(SID_SCATTR_PAGE_SCALETOPAGES), rCoreSet, rOldSet, - aLbScaleMode, SC_TPTABLE_SCALE_TO_PAGES, - aEdScalePageNum, (sal_uInt16)aEdScalePageNum.GetValue() ); + *m_pLbScaleMode, SC_TPTABLE_SCALE_TO_PAGES, + *m_pEdScalePageNum, (sal_uInt16)m_pEdScalePageNum->GetValue() ); return bDataChanged; } @@ -423,14 +417,14 @@ IMPL_LINK_NOARG(ScTablePage, PageDirHdl) IMPL_LINK( ScTablePage, PageNoHdl, CheckBox*, pBtn ) { - if ( aBtnPageNo.IsChecked() ) + if ( m_pBtnPageNo->IsChecked() ) { - aEdPageNo.Enable(); + m_pEdPageNo->Enable(); if ( pBtn ) - aEdPageNo.GrabFocus(); + m_pEdPageNo->GrabFocus(); } else - aEdPageNo.Disable(); + m_pEdPageNo->Disable(); return 0; } @@ -439,22 +433,14 @@ IMPL_LINK( ScTablePage, PageNoHdl, CheckBox*, pBtn ) IMPL_LINK_NOARG(ScTablePage, ScaleHdl) { - // controls for "Reduce/enlarge" - bool bPercent = (aLbScaleMode.GetSelectEntryPos() == SC_TPTABLE_SCALE_PERCENT); - aFtScaleAll.Show( bPercent ); - aEdScaleAll.Show( bPercent ); - - // controls for "Scale to width/height" - bool bScaleTo = (aLbScaleMode.GetSelectEntryPos() == SC_TPTABLE_SCALE_TO); - aFtScalePageWidth.Show( bScaleTo ); - aEdScalePageWidth.Show( bScaleTo ); - aFtScalePageHeight.Show( bScaleTo ); - aEdScalePageHeight.Show( bScaleTo ); - - // controls for "Scale to pages" - bool bScalePages = (aLbScaleMode.GetSelectEntryPos() == SC_TPTABLE_SCALE_TO_PAGES); - aFtScalePageNum.Show( bScalePages ); - aEdScalePageNum.Show( bScalePages ); + // controls for Box "Reduce/enlarge" + m_pBxScaleAll->Show(m_pLbScaleMode->GetSelectEntryPos() == SC_TPTABLE_SCALE_PERCENT); + + // controls for Grid "Scale to width/height" + m_pGrHeightWidth->Show(m_pLbScaleMode->GetSelectEntryPos() == SC_TPTABLE_SCALE_TO); + + // controls for Box "Scale to pages" + m_pBxScalePageNum->Show(m_pLbScaleMode->GetSelectEntryPos() == SC_TPTABLE_SCALE_TO_PAGES); return 0; } diff --git a/sc/uiconfig/scalc/ui/sheetprintpage.ui b/sc/uiconfig/scalc/ui/sheetprintpage.ui new file mode 100644 index 000000000000..85318a1f4def --- /dev/null +++ b/sc/uiconfig/scalc/ui/sheetprintpage.ui @@ -0,0 +1,629 @@ + + + + + 999 + 1 + 10 + + + 100 + 1 + 10 + + + True + False + True + 6 + 12 + True + True + + + True + False + True + 0 + none + + + True + False + True + True + 6 + 12 + + + True + False + True + + + True + False + start + True + 6 + 12 + + + _Top to bottom, then right + True + True + False + center + True + 0 + True + radioBTN_LEFTRIGHT + + + 0 + 0 + 1 + 1 + + + + + _Left to right, then down + True + True + False + start + center + none + True + 0 + True + True + + + 0 + 1 + 1 + 1 + + + + + First _page number: + True + True + False + True + 0 + True + + + 0 + 2 + 1 + 1 + + + + + True + True + 5 + + adjustmentPage + + + 1 + 2 + 1 + 1 + + + + + + + + + + + False + True + 0 + + + + + True + False + start + center + 6 + 6 + gtk-missing-image + + + False + True + 1 + + + + + + + + + True + False + Page order + + + + + + + + 0 + 0 + 1 + 1 + + + + + True + False + 0 + none + + + True + False + 6 + 12 + + + True + False + 6 + 12 + True + True + + + _Columns and row headers + True + True + False + True + 0 + True + + + 0 + 0 + 1 + 1 + + + + + _Grid + True + True + False + True + 0 + 0.55000001192092896 + True + + + 0 + 1 + 1 + 1 + + + + + _Comments + True + True + False + True + 0 + True + + + 0 + 2 + 1 + 1 + + + + + _Objects/graphics + True + True + False + True + 0 + True + + + 0 + 3 + 1 + 1 + + + + + Charts + True + True + False + True + 0 + True + + + 2 + 0 + 1 + 1 + + + + + _Drawing objects + True + True + False + True + 0 + True + + + 2 + 1 + 1 + 1 + + + + + _Formulas + True + True + False + True + 0 + True + + + 2 + 2 + 1 + 1 + + + + + + + + + + + + + + + + + _Zero values + True + True + False + True + 0 + True + + + 2 + 3 + 1 + 1 + + + + + + + + + True + False + Print + + + + + + + + 0 + 1 + 1 + 1 + + + + + True + False + 0 + none + + + True + False + 12 + + + True + False + 6 + 12 + + + True + False + Scaling _mode: + True + comboLB_SCALEMODE + + + 0 + 0 + 1 + 1 + + + + + True + False + vertical + 6 + + + True + False + 6 + True + + + True + False + _Scaling factor: + True + spinED_SCALEALL:0% + + + False + True + 0 + + + + + True + True + + True + adjustmentScalingFactor + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 6 + 6 + True + True + + + True + False + _Width in pages: + True + spinED_SCALEPAGEWIDTH + + + 0 + 0 + 1 + 1 + + + + + True + False + _Height in pages: + True + + + 0 + 1 + 1 + 1 + + + + + True + True + + none + True + adjustmentPage + + + 1 + 0 + 1 + 1 + + + + + True + True + + True + adjustmentPage + + + 1 + 1 + 1 + 1 + + + + + False + True + 1 + + + + + True + False + 6 + True + + + True + False + N_umber of pages: + True + spinED_SCALEPAGENUM + + + False + True + 0 + + + + + True + True + + True + adjustmentPage + if-valid + + + False + True + 1 + + + + + False + True + 2 + + + + + 1 + 1 + 1 + 1 + + + + + + + + True + False + liststoreScaleMode + + + 1 + 0 + 1 + 1 + + + + + + + + + True + False + Scale + + + + + + + + 0 + 2 + 1 + 1 + + + + + + + + + + + + + Reduce/enlarge printout + 0 + + + Fit print range(s) to width/height + 0 + + + Fit print range(s) on number of pages + 0 + + + + -- cgit v1.2.3