Kaydet (Commit) 56152a8f authored tarafından Pavel Kacer's avatar Pavel Kacer Kaydeden (comit) Caolán McNamara

Converted Tools->Options->(Web/)Writer->View dialogue.

Change-Id: Ifa11da48867303dbecd2ef104f2c0842aaeb5d72
Reviewed-on: https://gerrit.libreoffice.org/3325Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst acc671ec
...@@ -100,6 +100,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\ ...@@ -100,6 +100,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/tabletextflowpage \ sw/uiconfig/swriter/ui/tabletextflowpage \
sw/uiconfig/swriter/ui/textgridpage \ sw/uiconfig/swriter/ui/textgridpage \
sw/uiconfig/swriter/ui/titlepage \ sw/uiconfig/swriter/ui/titlepage \
sw/uiconfig/swriter/ui/viewoptionspage \
sw/uiconfig/swriter/ui/wordcount \ sw/uiconfig/swriter/ui/wordcount \
)) ))
......
...@@ -24,170 +24,6 @@ ...@@ -24,170 +24,6 @@
#include "optdlg.hrc" #include "optdlg.hrc"
#include "helpid.h" #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 TabPage TP_STD_FONT
{ {
HelpID = HID_STD_FONT ; HelpID = HID_STD_FONT ;
......
...@@ -67,54 +67,60 @@ ...@@ -67,54 +67,60 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
/*--------------------------------------------------------
Tools->Options->Writer->View
Tools->Options->Writer/Web->View
--------------------------------------------------------- */
SwContentOptPage::SwContentOptPage( Window* pParent, SwContentOptPage::SwContentOptPage( Window* pParent,
const SfxItemSet& rCoreSet ) : const SfxItemSet& rCoreSet ) :
SfxTabPage( pParent, SW_RES( TP_CONTENT_OPT ), rCoreSet ), SfxTabPage(pParent, "ViewOptionsPage",
aLineFL ( this, SW_RES( FL_LINE ) ), "modules/swriter/ui/viewoptionspage.ui", rCoreSet)
aCrossCB ( this, SW_RES( CB_CROSS ) ), {
get (m_pCrossCB, "helplines");
aWindowFL ( this, SW_RES( FL_WINDOW ) ),
aHScrollBox ( this, SW_RES( CB_HSCROLL ) ), get (m_pHScrollBox, "hscrollbar");
aVScrollBox ( this, SW_RES( CB_VSCROLL ) ), get (m_pVScrollBox, "vscrollbar");
aAnyRulerCB ( this, SW_RES( CB_ANY_RULER ) ), get (m_pAnyRulerCB, "ruler");
aHRulerCBox ( this, SW_RES( CB_HRULER ) ), get (m_pHRulerCBox, "hruler");
aHMetric ( this, SW_RES( LB_HMETRIC ) ), get (m_pHMetric, "hrulercombobox");
aVRulerCBox ( this, SW_RES( CB_VRULER ) ), get (m_pVRulerCBox, "vruler");
aVRulerRightCBox( this, SW_RES( CB_VRULER_RIGHT ) ), get (m_pVRulerRightCBox, "vrulerright");
aVMetric ( this, SW_RES( LB_VMETRIC ) ), get (m_pVMetric, "vrulercombobox");
aSmoothCBox ( this, SW_RES( CB_SMOOTH_SCROLL ) ), get (m_pSmoothCBox, "smoothscroll");
aDispFL ( this, SW_RES( FL_DISP ) ), get (m_pGrfCB, "graphics");
aGrfCB ( this, SW_RES( CB_GRF ) ), get (m_pTblCB, "tables");
aTblCB ( this, SW_RES( CB_TBL ) ), get (m_pDrwCB, "drawings");
aDrwCB ( this, SW_RES( CB_DRWFAST ) ), get (m_pFldNameCB, "fieldcodes");
aFldNameCB ( this, SW_RES( CB_FIELD ) ), get (m_pPostItCB, "comments");
aPostItCB ( this, SW_RES( CB_POSTIT ) ),
get (m_pSettingsFrame, "settingsframe");
aSettingsFL ( this, SW_RES( FL_SETTINGS ) ), get (m_pSettingsLabel, "settingslabel");
aMetricFT ( this, SW_RES( FT_METRIC ) ), get (m_pMetricLabel, "measureunitlabel");
aMetricLB ( this, SW_RES( LB_METRIC ) ) get (m_pMetricLB, "measureunit");
{
FreeResource(); /* This part is visible only with Writer/Web->View dialogue. */
const SfxPoolItem* pItem; const SfxPoolItem* pItem;
if(SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem ) if (! (SFX_ITEM_SET == rCoreSet.GetItemState(SID_HTML_MODE, sal_False, &pItem )
&& ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON) && ((SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON))
{ {
aMetricLB.Show(); m_pSettingsFrame->Hide();
aSettingsFL.Show(); m_pSettingsLabel->Hide();
aMetricFT.Show(); m_pMetricLabel->Hide();
m_pMetricLB->Hide();
} }
SvtCJKOptions aCJKOptions; SvtCJKOptions aCJKOptions;
if(aCJKOptions.IsVerticalTextEnabled() ) if(aCJKOptions.IsVerticalTextEnabled() )
{ {
Point aSmoothPos(aSmoothCBox.GetPosPixel()); Point aSmoothPos(m_pSmoothCBox->GetPosPixel());
aSmoothPos.Y() += aSmoothPos.Y() - aVRulerCBox.GetPosPixel().Y(); aSmoothPos.Y() += aSmoothPos.Y() - m_pVRulerCBox->GetPosPixel().Y();
aSmoothCBox.SetPosPixel(aSmoothPos); m_pSmoothCBox->SetPosPixel(aSmoothPos);
} }
else else
aVRulerRightCBox.Hide(); m_pVRulerRightCBox->Hide();
aVRulerCBox.SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl )); m_pVRulerCBox->SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl ));
aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl)); m_pAnyRulerCB->SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) ); SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i ) for ( sal_uInt16 i = 0; i < aMetricArr.Count(); ++i )
...@@ -137,16 +143,16 @@ SwContentOptPage::SwContentOptPage( Window* pParent, ...@@ -137,16 +143,16 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
// there isn't 'line' unit in HTML format // there isn't 'line' unit in HTML format
if ( eFUnit != FUNIT_LINE ) if ( eFUnit != FUNIT_LINE )
{ {
sal_uInt16 nPos = aMetricLB.InsertEntry( sMetric ); sal_uInt16 nPos = m_pMetricLB->InsertEntry( sMetric );
aMetricLB.SetEntryData( nPos, (void*)(long)eFUnit ); m_pMetricLB->SetEntryData( nPos, (void*)(long)eFUnit );
aHMetric.InsertEntry( sMetric ); m_pHMetric->InsertEntry( sMetric );
aHMetric.SetEntryData( nPos, (void*)(long)eFUnit ); m_pHMetric->SetEntryData( nPos, (void*)(long)eFUnit );
} }
// a vertical ruler has not the 'character' unit // a vertical ruler has not the 'character' unit
if ( eFUnit != FUNIT_CHAR ) if ( eFUnit != FUNIT_CHAR )
{ {
sal_uInt16 nPos = aVMetric.InsertEntry( sMetric ); sal_uInt16 nPos = m_pVMetric->InsertEntry( sMetric );
aVMetric.SetEntryData( nPos, (void*)(long)eFUnit ); m_pVMetric->SetEntryData( nPos, (void*)(long)eFUnit );
} }
} }
default:;//prevent warning default:;//prevent warning
...@@ -164,22 +170,22 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent, ...@@ -164,22 +170,22 @@ SfxTabPage* SwContentOptPage::Create( Window* pParent,
return new SwContentOptPage(pParent, rAttrSet); 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; const SfxPoolItem* pItem;
if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE ) if( rSet.GetItemState( nSID, sal_False, &pItem ) >= SFX_ITEM_AVAILABLE )
{ {
FieldUnit eFieldUnit = (FieldUnit)((SfxUInt16Item*)pItem)->GetValue(); 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; break;
} }
} }
} }
rMetric.SaveValue(); rMetric->SaveValue();
} }
void SwContentOptPage::Reset(const SfxItemSet& rSet) void SwContentOptPage::Reset(const SfxItemSet& rSet)
...@@ -190,25 +196,25 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet) ...@@ -190,25 +196,25 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
(const SfxPoolItem**)&pElemAttr ); (const SfxPoolItem**)&pElemAttr );
if(pElemAttr) if(pElemAttr)
{ {
aTblCB .Check (pElemAttr->bTable ); m_pTblCB->Check (pElemAttr->bTable);
aGrfCB.Check (pElemAttr->bGraphic ); m_pGrfCB->Check (pElemAttr->bGraphic);
aDrwCB .Check (pElemAttr->bDrawing ); m_pDrwCB->Check (pElemAttr->bDrawing);
aFldNameCB .Check (pElemAttr->bFieldName ); m_pFldNameCB->Check (pElemAttr->bFieldName);
aPostItCB .Check (pElemAttr->bNotes ); m_pPostItCB->Check (pElemAttr->bNotes);
aCrossCB .Check( pElemAttr->bCrosshair ); m_pCrossCB->Check (pElemAttr->bCrosshair);
aHScrollBox.Check( pElemAttr->bHorzScrollbar ); m_pHScrollBox->Check (pElemAttr->bHorzScrollbar);
aVScrollBox.Check( pElemAttr->bVertScrollbar ); m_pVScrollBox->Check (pElemAttr->bVertScrollbar);
aAnyRulerCB.Check( pElemAttr->bAnyRuler ); m_pAnyRulerCB->Check (pElemAttr->bAnyRuler);
aHRulerCBox.Check( pElemAttr->bHorzRuler ); m_pHRulerCBox->Check (pElemAttr->bHorzRuler);
aVRulerCBox.Check( pElemAttr->bVertRuler ); m_pVRulerCBox->Check (pElemAttr->bVertRuler);
aVRulerRightCBox.Check(pElemAttr->bVertRulerRight); m_pVRulerRightCBox->Check (pElemAttr->bVertRulerRight);
aSmoothCBox.Check( pElemAttr->bSmoothScroll ); m_pSmoothCBox->Check (pElemAttr->bSmoothScroll);
} }
aMetricLB.SetNoSelection(); m_pMetricLB->SetNoSelection();
lcl_SelectMetricLB(aMetricLB, SID_ATTR_METRIC, rSet); lcl_SelectMetricLB(m_pMetricLB, SID_ATTR_METRIC, rSet);
lcl_SelectMetricLB(aHMetric, FN_HSCROLL_METRIC, rSet); lcl_SelectMetricLB(m_pHMetric, FN_HSCROLL_METRIC, rSet);
lcl_SelectMetricLB(aVMetric, FN_VSCROLL_METRIC, rSet); lcl_SelectMetricLB(m_pVMetric, FN_VSCROLL_METRIC, rSet);
AnyRulerHdl(&aAnyRulerCB); AnyRulerHdl(m_pAnyRulerCB);
} }
sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
...@@ -219,47 +225,48 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) ...@@ -219,47 +225,48 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
SwElemItem aElem; SwElemItem aElem;
if(pOldAttr) if(pOldAttr)
aElem = *pOldAttr; aElem = *pOldAttr;
aElem.bTable = aTblCB .IsChecked(); aElem.bTable = m_pTblCB->IsChecked();
aElem.bGraphic = aGrfCB.IsChecked(); aElem.bGraphic = m_pGrfCB->IsChecked();
aElem.bDrawing = aDrwCB .IsChecked(); aElem.bDrawing = m_pDrwCB->IsChecked();
aElem.bFieldName = aFldNameCB .IsChecked(); aElem.bFieldName = m_pFldNameCB->IsChecked();
aElem.bNotes = aPostItCB .IsChecked(); aElem.bNotes = m_pPostItCB->IsChecked();
aElem.bCrosshair = aCrossCB .IsChecked(); aElem.bCrosshair = m_pCrossCB->IsChecked();
aElem.bHorzScrollbar = aHScrollBox.IsChecked(); aElem.bHorzScrollbar = m_pHScrollBox->IsChecked();
aElem.bVertScrollbar = aVScrollBox.IsChecked(); aElem.bVertScrollbar = m_pVScrollBox->IsChecked();
aElem.bAnyRuler = aAnyRulerCB.IsChecked(); aElem.bAnyRuler = m_pAnyRulerCB->IsChecked();
aElem.bHorzRuler = aHRulerCBox.IsChecked(); aElem.bHorzRuler = m_pHRulerCBox->IsChecked();
aElem.bVertRuler = aVRulerCBox.IsChecked(); aElem.bVertRuler = m_pVRulerCBox->IsChecked();
aElem.bVertRulerRight= aVRulerRightCBox.IsChecked(); aElem.bVertRulerRight = m_pVRulerRightCBox->IsChecked();
aElem.bSmoothScroll = aSmoothCBox.IsChecked(); aElem.bSmoothScroll = m_pSmoothCBox->IsChecked();
sal_Bool bRet = !pOldAttr || aElem != *pOldAttr; sal_Bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet) if(bRet)
bRet = 0 != rSet.Put(aElem); bRet = 0 != rSet.Put(aElem);
sal_uInt16 nMPos = aMetricLB.GetSelectEntryPos();
sal_uInt16 nMPos = m_pMetricLB->GetSelectEntryPos();
sal_uInt16 nGlobalMetricPos = nMPos; sal_uInt16 nGlobalMetricPos = nMPos;
if ( nMPos != aMetricLB.GetSavedValue() ) if ( nMPos != m_pMetricLB->GetSavedValue() )
{ {
// Double-Cast for VA3.0 // 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 ) ); rSet.Put( SfxUInt16Item( SID_ATTR_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True; bRet = sal_True;
} }
nMPos = aHMetric.GetSelectEntryPos(); nMPos = m_pHMetric->GetSelectEntryPos();
if ( nMPos != aHMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) if ( nMPos != m_pHMetric->GetSavedValue() || nMPos != nGlobalMetricPos )
{ {
// Double-Cast for VA3.0 // 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 ) ); rSet.Put( SfxUInt16Item( FN_HSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True; bRet = sal_True;
} }
nMPos = aVMetric.GetSelectEntryPos(); nMPos = m_pVMetric->GetSelectEntryPos();
if ( nMPos != aVMetric.GetSavedValue() || nMPos != nGlobalMetricPos ) if ( nMPos != m_pVMetric->GetSavedValue() || nMPos != nGlobalMetricPos )
{ {
// Double-Cast for VA3.0 // 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 ) ); rSet.Put( SfxUInt16Item( FN_VSCROLL_METRIC, (sal_uInt16)nFieldUnit ) );
bRet = sal_True; bRet = sal_True;
} }
...@@ -268,18 +275,18 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet) ...@@ -268,18 +275,18 @@ sal_Bool SwContentOptPage::FillItemSet(SfxItemSet& rSet)
IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox) IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox)
{ {
aVRulerRightCBox.Enable(pBox->IsEnabled() && pBox->IsChecked()); m_pVRulerRightCBox->Enable(pBox->IsEnabled() && pBox->IsChecked());
return 0; return 0;
} }
IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox) IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
{ {
sal_Bool bChecked = pBox->IsChecked(); sal_Bool bChecked = pBox->IsChecked();
aHRulerCBox .Enable(bChecked); m_pHRulerCBox->Enable(bChecked);
aHMetric .Enable(bChecked); m_pHMetric->Enable(bChecked);
aVRulerCBox .Enable(bChecked); m_pVRulerCBox->Enable(bChecked);
aVMetric .Enable(bChecked); m_pVMetric->Enable(bChecked);
VertRulerHdl(&aVRulerCBox); VertRulerHdl(m_pVRulerCBox);
return 0; return 0;
} }
/*------------------------------------------------------ /*------------------------------------------------------
......
...@@ -37,35 +37,34 @@ class SwStdFontConfig; ...@@ -37,35 +37,34 @@ class SwStdFontConfig;
class SwWrtShell; class SwWrtShell;
class FontList; class FontList;
/*--------------------------------------------------------
Tools->Options->Writer->View
Tools->Options->Writer/Web->View
--------------------------------------------------------- */
class SwContentOptPage : public SfxTabPage class SwContentOptPage : public SfxTabPage
{ {
//visual aids CheckBox* m_pCrossCB;
FixedLine aLineFL;
CheckBox aCrossCB; CheckBox* m_pHScrollBox;
CheckBox* m_pVScrollBox;
//view CheckBox* m_pAnyRulerCB;
FixedLine aWindowFL; CheckBox* m_pHRulerCBox;
CheckBox aHScrollBox; ListBox* m_pHMetric;
CheckBox aVScrollBox; CheckBox* m_pVRulerCBox;
CheckBox aAnyRulerCB; CheckBox* m_pVRulerRightCBox;
CheckBox aHRulerCBox; ListBox* m_pVMetric;
ListBox aHMetric; CheckBox* m_pSmoothCBox;
CheckBox aVRulerCBox;
CheckBox aVRulerRightCBox;
ListBox aVMetric;
CheckBox aSmoothCBox;
//display
FixedLine aDispFL;
CheckBox aGrfCB;
CheckBox aTblCB;
CheckBox aDrwCB;
CheckBox aFldNameCB;
CheckBox aPostItCB;
FixedLine aSettingsFL; CheckBox* m_pGrfCB;
FixedText aMetricFT; CheckBox* m_pTblCB;
ListBox aMetricLB; 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(VertRulerHdl, CheckBox*);
DECL_LINK(AnyRulerHdl, CheckBox*); DECL_LINK(AnyRulerHdl, CheckBox*);
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkBox" id="ViewOptionsPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<property name="column_homogeneous">True</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFrame" id="guidesframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCheckButton" id="helplines">
<property name="label" translatable="yes">Helplines While Moving</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="guideslabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Guides</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="displayframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCheckButton" id="graphics">
<property name="label" translatable="yes">Graphics and objects</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="tables">
<property name="label" translatable="yes">Tables</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="drawings">
<property name="label" translatable="yes">Drawings and controls</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="fieldcodes">
<property name="label" translatable="yes">Field codes</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="comments">
<property name="label" translatable="yes">Comments</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="displaylabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Display</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFrame" id="viewframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCheckButton" id="hscrollbar">
<property name="label" translatable="yes">Horizontal scrollbar</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="vscrollbar">
<property name="label" translatable="yes">Vertical scrollbar</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="ruler">
<property name="label" translatable="yes">Ruler</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">18</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkCheckButton" id="hruler">
<property name="label" translatable="yes">Horizontal ruler</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="hrulercombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">18</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkCheckButton" id="vruler">
<property name="label" translatable="yes">Vertical ruler</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="vrulercombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="vrulerright">
<property name="label" translatable="yes">Right-aligned</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="margin_left">36</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">5</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="smoothscroll">
<property name="label" translatable="yes">Smooth scroll</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">6</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">View</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="settingsframe">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="column_spacing">10</property>
<child>
<object class="GtkComboBox" id="measureunit">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="measureunitlabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Measurement unit</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="settingslabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Settings</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment