From 56152a8fab12c270d96a8fe5a63928b6e35be49d Mon Sep 17 00:00:00 2001 From: Pavel Kacer Date: Thu, 11 Apr 2013 11:19:01 +0200 Subject: Converted Tools->Options->(Web/)Writer->View dialogue. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ifa11da48867303dbecd2ef104f2c0842aaeb5d72 Reviewed-on: https://gerrit.libreoffice.org/3325 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/UIConfig_swriter.mk | 1 + sw/source/ui/config/optdlg.src | 164 ---------- sw/source/ui/config/optpage.cxx | 199 ++++++------ sw/source/ui/inc/optpage.hxx | 53 ++-- sw/uiconfig/swriter/ui/viewoptionspage.ui | 482 ++++++++++++++++++++++++++++++ 5 files changed, 612 insertions(+), 287 deletions(-) create mode 100644 sw/uiconfig/swriter/ui/viewoptionspage.ui (limited to 'sw') diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index bf47c75855ab..1e7a8075db33 100644 --- a/sw/UIConfig_swriter.mk +++ b/sw/UIConfig_swriter.mk @@ -100,6 +100,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ sw/uiconfig/swriter/ui/tabletextflowpage \ sw/uiconfig/swriter/ui/textgridpage \ sw/uiconfig/swriter/ui/titlepage \ + sw/uiconfig/swriter/ui/viewoptionspage \ sw/uiconfig/swriter/ui/wordcount \ )) diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src index 9b8cf4200f32..889408f9ea37 100644 --- a/sw/source/ui/config/optdlg.src +++ b/sw/source/ui/config/optdlg.src @@ -24,170 +24,6 @@ #include "optdlg.hrc" #include "helpid.h" -/**************************************************************************/ -/* */ -/* TabPage View/Content */ -/* */ -/**************************************************************************/ -TabPage TP_CONTENT_OPT -{ - HelpID = HID_CONTENT_OPT ; - SVLook = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - Hide = TRUE ; - FixedLine FL_LINE - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 118 , 8 ) ; - Group = TRUE ; - Text [ en-US ] = "Guides"; - }; - CheckBox CB_CROSS - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_CROSS"; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 118 , 10 ) ; - Text [ en-US ] = "Helplines ~While Moving"; - }; - FixedLine FL_WINDOW - { - Pos = MAP_APPFONT ( 130 , 3 ) ; - Size = MAP_APPFONT ( 124 , 8 ) ; - Group = TRUE ; - Text [ en-US ] = "View"; - }; - CheckBox CB_HSCROLL - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HSCROLL"; - Pos = MAP_APPFONT ( 136 , 14 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "H~orizontal scrollbar" ; - }; - CheckBox CB_VSCROLL - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VSCROLL"; - Pos = MAP_APPFONT ( 136 , 27 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "~Vertical scrollbar" ; - }; - CheckBox CB_ANY_RULER - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_ANY_RULER"; - Pos = MAP_APPFONT ( 136 , 40 ) ; - Size = MAP_APPFONT ( 65 , 10 ) ; - Text [ en-US ] = "R~uler" ; - }; - CheckBox CB_HRULER - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_HRULER"; - Pos = MAP_APPFONT ( 142 , 53 ) ; - Size = MAP_APPFONT ( 62 , 10 ) ; - Text [ en-US ] = "Hori~zontal ruler" ; - }; - ListBox LB_HMETRIC - { - HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_HMETRIC"; - Pos = MAP_APPFONT ( 206 , 51 ) ; - Size = MAP_APPFONT ( 45 , 60 ) ; - DropDown = TRUE; - }; - CheckBox CB_VRULER - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER"; - Pos = MAP_APPFONT ( 142 , 66 ) ; - Size = MAP_APPFONT ( 62 , 10 ) ; - Text [ en-US ] = "Verti~cal ruler" ; - }; - CheckBox CB_VRULER_RIGHT - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_VRULER_RIGHT"; - Pos = MAP_APPFONT ( 148 , 79 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - Text [ en-US ] = "Right-aligned"; - }; - ListBox LB_VMETRIC - { - HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_VMETRIC"; - Pos = MAP_APPFONT ( 206 , 64 ) ; - Size = MAP_APPFONT ( 45 , 60 ) ; - DropDown = TRUE; - }; - CheckBox CB_SMOOTH_SCROLL - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_SMOOTH_SCROLL"; - Pos = MAP_APPFONT ( 136 , 79 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "S~mooth scroll" ; - }; - FixedLine FL_DISP - { - Pos = MAP_APPFONT ( 6 , 30 ) ; - Size = MAP_APPFONT ( 118 , 8 ) ; - Text [ en-US ] = "Display" ; - Group = TRUE ; - }; - CheckBox CB_GRF - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_GRF"; - Pos = MAP_APPFONT ( 12 , 41 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "~Graphics and objects" ; - TabStop = TRUE ; - Group = TRUE ; - }; - CheckBox CB_TBL - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_TBL"; - Pos = MAP_APPFONT ( 12 , 54 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "~Tables " ; - }; - CheckBox CB_DRWFAST - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_DRWFAST"; - Pos = MAP_APPFONT ( 12 , 67 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "Dra~wings and controls" ; - }; - CheckBox CB_FIELD - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_FIELD"; - Pos = MAP_APPFONT ( 12 , 80 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "~Field codes" ; - }; - CheckBox CB_POSTIT - { - HelpID = "sw:CheckBox:TP_CONTENT_OPT:CB_POSTIT"; - Pos = MAP_APPFONT ( 12 , 93 ) ; - Size = MAP_APPFONT ( 108 , 10 ) ; - Text [ en-US ] = "~Comments" ; - }; - FixedLine FL_SETTINGS - { - Pos = MAP_APPFONT ( 130 , 122 ) ; - Size = MAP_APPFONT ( 124 , 8 ) ; - Text [ en-US ] = "Settings"; - Hide = TRUE; - }; - FixedText FT_METRIC - { - Pos = MAP_APPFONT ( 136 , 135 ) ; - Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "Measurement unit"; - Hide = TRUE; - }; - ListBox LB_METRIC - { - HelpID = "sw:ListBox:TP_CONTENT_OPT:LB_METRIC"; - Pos = MAP_APPFONT ( 199, 133 ) ; - Size = MAP_APPFONT ( 50 , 50 ) ; - Border = TRUE ; - DropDown = TRUE ; - Hide = TRUE; - }; -}; - TabPage TP_STD_FONT { HelpID = HID_STD_FONT ; diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index bfe09fee95ca..82ef325125a7 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -67,54 +67,60 @@ using namespace ::com::sun::star; +/*-------------------------------------------------------- + Tools->Options->Writer->View + Tools->Options->Writer/Web->View +--------------------------------------------------------- */ SwContentOptPage::SwContentOptPage( Window* pParent, const SfxItemSet& rCoreSet ) : - SfxTabPage( pParent, SW_RES( TP_CONTENT_OPT ), rCoreSet ), - aLineFL ( this, SW_RES( FL_LINE ) ), - aCrossCB ( this, SW_RES( CB_CROSS ) ), - - aWindowFL ( this, SW_RES( FL_WINDOW ) ), - aHScrollBox ( this, SW_RES( CB_HSCROLL ) ), - aVScrollBox ( this, SW_RES( CB_VSCROLL ) ), - aAnyRulerCB ( this, SW_RES( CB_ANY_RULER ) ), - aHRulerCBox ( this, SW_RES( CB_HRULER ) ), - aHMetric ( this, SW_RES( LB_HMETRIC ) ), - aVRulerCBox ( this, SW_RES( CB_VRULER ) ), - aVRulerRightCBox( this, SW_RES( CB_VRULER_RIGHT ) ), - aVMetric ( this, SW_RES( LB_VMETRIC ) ), - aSmoothCBox ( this, SW_RES( CB_SMOOTH_SCROLL ) ), - - aDispFL ( this, SW_RES( FL_DISP ) ), - aGrfCB ( this, SW_RES( CB_GRF ) ), - aTblCB ( this, SW_RES( CB_TBL ) ), - aDrwCB ( this, SW_RES( CB_DRWFAST ) ), - aFldNameCB ( this, SW_RES( CB_FIELD ) ), - aPostItCB ( this, SW_RES( CB_POSTIT ) ), - - aSettingsFL ( this, SW_RES( FL_SETTINGS ) ), - aMetricFT ( this, SW_RES( FT_METRIC ) ), - aMetricLB ( this, SW_RES( LB_METRIC ) ) -{ - FreeResource(); + SfxTabPage(pParent, "ViewOptionsPage", + "modules/swriter/ui/viewoptionspage.ui", rCoreSet) +{ + get (m_pCrossCB, "helplines"); + + get (m_pHScrollBox, "hscrollbar"); + get (m_pVScrollBox, "vscrollbar"); + get (m_pAnyRulerCB, "ruler"); + get (m_pHRulerCBox, "hruler"); + get (m_pHMetric, "hrulercombobox"); + get (m_pVRulerCBox, "vruler"); + get (m_pVRulerRightCBox, "vrulerright"); + get (m_pVMetric, "vrulercombobox"); + get (m_pSmoothCBox, "smoothscroll"); + + get (m_pGrfCB, "graphics"); + get (m_pTblCB, "tables"); + get (m_pDrwCB, "drawings"); + get (m_pFldNameCB, "fieldcodes"); + get (m_pPostItCB, "comments"); + + get (m_pSettingsFrame, "settingsframe"); + get (m_pSettingsLabel, "settingslabel"); + get (m_pMetricLabel, "measureunitlabel"); + get (m_pMetricLB, "measureunit"); + + /* This part is visible only with Writer/Web->View dialogue. */ const SfxPoolItem* pItem; - if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) - && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) + if (! (SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) + && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)) { - aMetricLB.Show(); - aSettingsFL.Show(); - aMetricFT.Show(); + m_pSettingsFrame->Hide(); + m_pSettingsLabel->Hide(); + m_pMetricLabel->Hide(); + m_pMetricLB->Hide(); } + SvtCJKOptions aCJKOptions; if(aCJKOptions.IsVerticalTextEnabled() ) { - Point aSmoothPos(aSmoothCBox.GetPosPixel()); - aSmoothPos.Y() += aSmoothPos.Y() - aVRulerCBox.GetPosPixel().Y(); - aSmoothCBox.SetPosPixel(aSmoothPos); + Point aSmoothPos(m_pSmoothCBox->GetPosPixel()); + aSmoothPos.Y() += aSmoothPos.Y() - m_pVRulerCBox->GetPosPixel().Y(); + m_pSmoothCBox->SetPosPixel(aSmoothPos); } else - aVRulerRightCBox.Hide(); - aVRulerCBox.SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl )); - aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl)); + m_pVRulerRightCBox->Hide(); + m_pVRulerCBox->SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl )); + m_pAnyRulerCB->SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl)); SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) @@ -137,16 +143,16 @@ SwContentOptPage::SwContentOptPage( Window* pParent, // there isn't 'line' unit in HTML format if ( eFUnit != FUNIT_LINE ) { - sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); - aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); - aHMetric.InsertEntry( sMetric ); - aHMetric.SetEntryData( nPos, (void*)(long)eFUnit ); + sal_uInt16 nPos = m_pMetricLB->InsertEntry( sMetric ); + m_pMetricLB->SetEntryData( nPos, (void*)(long)eFUnit ); + m_pHMetric->InsertEntry( sMetric ); + m_pHMetric->SetEntryData( nPos, (void*)(long)eFUnit ); } // a vertical ruler has not the 'character' unit if ( eFUnit != FUNIT_CHAR ) { - sal_uInt16 nPos = aVMetric.InsertEntry( sMetric ); - aVMetric.SetEntryData( nPos, (void*)(long)eFUnit ); + sal_uInt16 nPos = m_pVMetric->InsertEntry( sMetric ); + m_pVMetric->SetEntryData( nPos, (void*)(long)eFUnit ); } } default:;//prevent warning @@ -164,22 +170,22 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, return new SwContentOptPage(pParent, rAttrSet); } -static void lcl_SelectMetricLB(ListBox& rMetric, sal_uInt16 nSID, const SfxItemSet& rSet) +static void lcl_SelectMetricLB(ListBox* rMetric, sal_uInt16 nSID, const SfxItemSet& rSet) { const SfxPoolItem* pItem; if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE ) { FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); - for ( sal_uInt16 i = 0; i < rMetric.GetEntryCount(); ++i ) + for ( sal_uInt16 i = 0; i < rMetric->GetEntryCount(); ++i ) { - if ( (int)(sal_IntPtr)rMetric.GetEntryData( i ) == (int)eFieldUnit ) + if ( (int)(sal_IntPtr)rMetric->GetEntryData( i ) == (int)eFieldUnit ) { - rMetric.SelectEntryPos( i ); + rMetric->SelectEntryPos( i ); break; } } } - rMetric.SaveValue(); + rMetric->SaveValue(); } void SwContentOptPage::Reset(const SfxItemSet& rSet) @@ -190,25 +196,25 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) (const SfxPoolItem**)&pElemAttr ); if(pElemAttr) { - aTblCB .Check (pElemAttr->bTable ); - aGrfCB.Check (pElemAttr->bGraphic ); - aDrwCB .Check (pElemAttr->bDrawing ); - aFldNameCB .Check (pElemAttr->bFieldName ); - aPostItCB .Check (pElemAttr->bNotes ); - aCrossCB .Check( pElemAttr->bCrosshair ); - aHScrollBox.Check( pElemAttr->bHorzScrollbar ); - aVScrollBox.Check( pElemAttr->bVertScrollbar ); - aAnyRulerCB.Check( pElemAttr->bAnyRuler ); - aHRulerCBox.Check( pElemAttr->bHorzRuler ); - aVRulerCBox.Check( pElemAttr->bVertRuler ); - aVRulerRightCBox.Check(pElemAttr->bVertRulerRight); - aSmoothCBox.Check( pElemAttr->bSmoothScroll ); - } - aMetricLB.SetNoSelection(); - lcl_SelectMetricLB(aMetricLB, SID_ATTR_METRIC, rSet); - lcl_SelectMetricLB(aHMetric, FN_HSCROLL_METRIC, rSet); - lcl_SelectMetricLB(aVMetric, FN_VSCROLL_METRIC, rSet); - AnyRulerHdl(&aAnyRulerCB); + m_pTblCB->Check (pElemAttr->bTable); + m_pGrfCB->Check (pElemAttr->bGraphic); + m_pDrwCB->Check (pElemAttr->bDrawing); + m_pFldNameCB->Check (pElemAttr->bFieldName); + m_pPostItCB->Check (pElemAttr->bNotes); + m_pCrossCB->Check (pElemAttr->bCrosshair); + m_pHScrollBox->Check (pElemAttr->bHorzScrollbar); + m_pVScrollBox->Check (pElemAttr->bVertScrollbar); + m_pAnyRulerCB->Check (pElemAttr->bAnyRuler); + m_pHRulerCBox->Check (pElemAttr->bHorzRuler); + m_pVRulerCBox->Check (pElemAttr->bVertRuler); + m_pVRulerRightCBox->Check (pElemAttr->bVertRulerRight); + m_pSmoothCBox->Check (pElemAttr->bSmoothScroll); + } + m_pMetricLB->SetNoSelection(); + lcl_SelectMetricLB(m_pMetricLB, SID_ATTR_METRIC, rSet); + lcl_SelectMetricLB(m_pHMetric, FN_HSCROLL_METRIC, rSet); + lcl_SelectMetricLB(m_pVMetric, FN_VSCROLL_METRIC, rSet); + AnyRulerHdl(m_pAnyRulerCB); } sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) @@ -219,47 +225,48 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) SwElemItem aElem; if(pOldAttr) aElem = *pOldAttr; - aElem.bTable = aTblCB .IsChecked(); - aElem.bGraphic = aGrfCB.IsChecked(); - aElem.bDrawing = aDrwCB .IsChecked(); - aElem.bFieldName = aFldNameCB .IsChecked(); - aElem.bNotes = aPostItCB .IsChecked(); - aElem.bCrosshair = aCrossCB .IsChecked(); - aElem.bHorzScrollbar = aHScrollBox.IsChecked(); - aElem.bVertScrollbar = aVScrollBox.IsChecked(); - aElem.bAnyRuler = aAnyRulerCB.IsChecked(); - aElem.bHorzRuler = aHRulerCBox.IsChecked(); - aElem.bVertRuler = aVRulerCBox.IsChecked(); - aElem.bVertRulerRight= aVRulerRightCBox.IsChecked(); - aElem.bSmoothScroll = aSmoothCBox.IsChecked(); + aElem.bTable = m_pTblCB->IsChecked(); + aElem.bGraphic = m_pGrfCB->IsChecked(); + aElem.bDrawing = m_pDrwCB->IsChecked(); + aElem.bFieldName = m_pFldNameCB->IsChecked(); + aElem.bNotes = m_pPostItCB->IsChecked(); + aElem.bCrosshair = m_pCrossCB->IsChecked(); + aElem.bHorzScrollbar = m_pHScrollBox->IsChecked(); + aElem.bVertScrollbar = m_pVScrollBox->IsChecked(); + aElem.bAnyRuler = m_pAnyRulerCB->IsChecked(); + aElem.bHorzRuler = m_pHRulerCBox->IsChecked(); + aElem.bVertRuler = m_pVRulerCBox->IsChecked(); + aElem.bVertRulerRight = m_pVRulerRightCBox->IsChecked(); + aElem.bSmoothScroll = m_pSmoothCBox->IsChecked(); sal_Bool bRet = !pOldAttr || aElem != *pOldAttr; if(bRet) bRet = 0 != rSet.Put(aElem); - sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos(); + + sal_uInt16 nMPos = m_pMetricLB->GetSelectEntryPos(); sal_uInt16 nGlobalMetricPos = nMPos; - if ( nMPos != aMetricLB.GetSavedValue() ) + if ( nMPos != m_pMetricLB->GetSavedValue() ) { // Double-Cast for VA3.0 - sal_uInt16 nFieldUnit = (sal_uInt16)(long)aMetricLB.GetEntryData( nMPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)m_pMetricLB->GetEntryData( nMPos ); rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) ); bRet = sal_True; } - nMPos = aHMetric.GetSelectEntryPos(); - if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) + nMPos = m_pHMetric->GetSelectEntryPos(); + if ( nMPos != m_pHMetric->GetSavedValue() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 - sal_uInt16 nFieldUnit = (sal_uInt16)(long)aHMetric.GetEntryData( nMPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)m_pHMetric->GetEntryData( nMPos ); rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) ); bRet = sal_True; } - nMPos = aVMetric.GetSelectEntryPos(); - if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) + nMPos = m_pVMetric->GetSelectEntryPos(); + if ( nMPos != m_pVMetric->GetSavedValue() || nMPos != nGlobalMetricPos ) { // Double-Cast for VA3.0 - sal_uInt16 nFieldUnit = (sal_uInt16)(long)aVMetric.GetEntryData( nMPos ); + sal_uInt16 nFieldUnit = (sal_uInt16)(long)m_pVMetric->GetEntryData( nMPos ); rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) ); bRet = sal_True; } @@ -268,18 +275,18 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox) { - aVRulerRightCBox.Enable(pBox->IsEnabled() && pBox->IsChecked()); + m_pVRulerRightCBox->Enable(pBox->IsEnabled() && pBox->IsChecked()); return 0; } IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox) { sal_Bool bChecked = pBox->IsChecked(); - aHRulerCBox .Enable(bChecked); - aHMetric .Enable(bChecked); - aVRulerCBox .Enable(bChecked); - aVMetric .Enable(bChecked); - VertRulerHdl(&aVRulerCBox); + m_pHRulerCBox->Enable(bChecked); + m_pHMetric->Enable(bChecked); + m_pVRulerCBox->Enable(bChecked); + m_pVMetric->Enable(bChecked); + VertRulerHdl(m_pVRulerCBox); return 0; } /*------------------------------------------------------ diff --git a/sw/source/ui/inc/optpage.hxx b/sw/source/ui/inc/optpage.hxx index 88ea2a9f59d4..e61c847b2701 100644 --- a/sw/source/ui/inc/optpage.hxx +++ b/sw/source/ui/inc/optpage.hxx @@ -37,35 +37,34 @@ class SwStdFontConfig; class SwWrtShell; class FontList; +/*-------------------------------------------------------- + Tools->Options->Writer->View + Tools->Options->Writer/Web->View +--------------------------------------------------------- */ class SwContentOptPage : public SfxTabPage { - //visual aids - FixedLine aLineFL; - CheckBox aCrossCB; - - //view - FixedLine aWindowFL; - CheckBox aHScrollBox; - CheckBox aVScrollBox; - CheckBox aAnyRulerCB; - CheckBox aHRulerCBox; - ListBox aHMetric; - CheckBox aVRulerCBox; - CheckBox aVRulerRightCBox; - ListBox aVMetric; - CheckBox aSmoothCBox; - - //display - FixedLine aDispFL; - CheckBox aGrfCB; - CheckBox aTblCB; - CheckBox aDrwCB; - CheckBox aFldNameCB; - CheckBox aPostItCB; - - FixedLine aSettingsFL; - FixedText aMetricFT; - ListBox aMetricLB; + CheckBox* m_pCrossCB; + + CheckBox* m_pHScrollBox; + CheckBox* m_pVScrollBox; + CheckBox* m_pAnyRulerCB; + CheckBox* m_pHRulerCBox; + ListBox* m_pHMetric; + CheckBox* m_pVRulerCBox; + CheckBox* m_pVRulerRightCBox; + ListBox* m_pVMetric; + CheckBox* m_pSmoothCBox; + + CheckBox* m_pGrfCB; + CheckBox* m_pTblCB; + CheckBox* m_pDrwCB; + CheckBox* m_pFldNameCB; + CheckBox* m_pPostItCB; + + VclFrame* m_pSettingsFrame; + FixedText* m_pSettingsLabel; + FixedText* m_pMetricLabel; + ListBox* m_pMetricLB; DECL_LINK(VertRulerHdl, CheckBox*); DECL_LINK(AnyRulerHdl, CheckBox*); diff --git a/sw/uiconfig/swriter/ui/viewoptionspage.ui b/sw/uiconfig/swriter/ui/viewoptionspage.ui new file mode 100644 index 000000000000..22832717d8c0 --- /dev/null +++ b/sw/uiconfig/swriter/ui/viewoptionspage.ui @@ -0,0 +1,482 @@ + + + + + True + False + 6 + vertical + 12 + + + True + False + 6 + 6 + True + + + True + False + vertical + + + True + False + 0 + none + + + True + False + 6 + 12 + + + True + False + + + Helplines While Moving + True + True + False + 0 + True + + + 0 + 0 + 1 + 1 + + + + + + + + + True + False + Guides + + + + + + + + False + True + 0 + + + + + True + False + 0 + none + + + True + False + 6 + 12 + + + True + False + + + Graphics and objects + True + True + False + 0 + True + + + 0 + 0 + 1 + 1 + + + + + Tables + True + True + False + 0 + True + + + 0 + 1 + 1 + 1 + + + + + Drawings and controls + True + True + False + 0 + True + + + 0 + 2 + 1 + 1 + + + + + Field codes + True + True + False + 0 + True + + + 0 + 3 + 1 + 1 + + + + + Comments + True + True + False + 0 + True + + + 0 + 4 + 1 + 1 + + + + + + + + + True + False + Display + + + + + + + + False + True + 1 + + + + + 0 + 0 + 1 + 1 + + + + + True + False + vertical + + + True + False + 0 + none + + + True + False + 6 + 12 + + + True + False + + + Horizontal scrollbar + True + True + False + 0 + True + + + 0 + 0 + 1 + 1 + + + + + Vertical scrollbar + True + True + False + 0 + True + + + 0 + 1 + 1 + 1 + + + + + Ruler + True + True + False + 0 + True + + + 0 + 2 + 1 + 1 + + + + + True + False + 18 + True + + + Horizontal ruler + True + True + False + 0 + True + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + 0 + 3 + 1 + 1 + + + + + True + False + 18 + True + + + Vertical ruler + True + True + False + 0 + True + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + + + + 0 + 4 + 1 + 1 + + + + + Right-aligned + True + True + False + 36 + 0 + True + + + 0 + 5 + 1 + 1 + + + + + Smooth scroll + True + True + False + 0 + True + + + 0 + 6 + 1 + 1 + + + + + + + + + True + False + View + + + + + + + + False + True + 0 + + + + + True + False + 0 + none + + + True + False + 6 + 12 + + + True + False + 10 + + + True + False + + + 1 + 0 + 1 + 1 + + + + + True + False + Measurement unit + + + 0 + 0 + 1 + 1 + + + + + + + + + True + False + Settings + + + + + + + + False + True + 1 + + + + + 1 + 0 + 1 + 1 + + + + + False + True + 0 + + + + -- cgit