summaryrefslogtreecommitdiff
path: root/sw/source/ui/config
diff options
context:
space:
mode:
authorOliver Specht <os@openoffice.org>2002-09-20 11:10:10 +0000
committerOliver Specht <os@openoffice.org>2002-09-20 11:10:10 +0000
commit6361e50130e1cc9ec5b7559e67fc58b3430b4e5a (patch)
treead8c92d2172c5610f42815d63e9767470d34948c /sw/source/ui/config
parent4dde6906c3b1d3687820aa84c9548462ceae71a6 (diff)
#103376# function to switch both rulers at once added
Diffstat (limited to 'sw/source/ui/config')
-rw-r--r--sw/source/ui/config/cfgitems.cxx20
-rw-r--r--sw/source/ui/config/optdlg.hrc5
-rw-r--r--sw/source/ui/config/optdlg.src27
-rw-r--r--sw/source/ui/config/optpage.cxx26
-rw-r--r--sw/source/ui/config/usrpref.cxx73
-rw-r--r--sw/source/ui/config/viewopt.cxx6
6 files changed, 96 insertions, 61 deletions
diff --git a/sw/source/ui/config/cfgitems.cxx b/sw/source/ui/config/cfgitems.cxx
index 7492735f008b..8e22ccaca999 100644
--- a/sw/source/ui/config/cfgitems.cxx
+++ b/sw/source/ui/config/cfgitems.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cfgitems.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mba $ $Date: 2002-05-27 14:35:24 $
+ * last change: $Author: os $ $Date: 2002-09-20 12:09:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -205,6 +205,7 @@ SwElemItem::SwElemItem( USHORT nWhich ) :
{
bHorzScrollbar =
bVertScrollbar =
+ bAnyRuler =
bHorzRuler =
bVertRuler =
bVertRulerRight=
@@ -236,8 +237,9 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt, USHORT nWhich) :
{
bHorzScrollbar = rVOpt.IsViewHScrollBar();
bVertScrollbar = rVOpt.IsViewVScrollBar();
- bHorzRuler = rVOpt.IsViewTabwin();
- bVertRuler = rVOpt.IsViewVLin();
+ bAnyRuler = rVOpt.IsViewAnyRuler();
+ bHorzRuler = rVOpt.IsViewHRuler(TRUE);
+ bVertRuler = rVOpt.IsViewVRuler(TRUE);
bVertRulerRight = rVOpt.IsVRulerRight();
bCrosshair = rVOpt.IsCrossHair();
bHandles = rVOpt.IsSolidMarkHdl();
@@ -272,6 +274,7 @@ int SwElemItem::operator==( const SfxPoolItem& rAttr ) const
return ( bHorzScrollbar == rItem.bHorzScrollbar &&
bVertScrollbar == rItem.bVertScrollbar &&
+ bAnyRuler == rItem.bAnyRuler &&
bHorzRuler == rItem.bHorzRuler &&
bVertRuler == rItem.bVertRuler &&
bVertRulerRight == rItem.bVertRulerRight&&
@@ -295,6 +298,7 @@ void SwElemItem::operator=( const SwElemItem& rElemItem)
{
bHorzScrollbar = rElemItem. bHorzScrollbar ;
bVertScrollbar = rElemItem. bVertScrollbar ;
+ bAnyRuler = rElemItem. bAnyRuler;
bHorzRuler = rElemItem. bHorzRuler ;
bVertRuler = rElemItem. bVertRuler ;
bVertRulerRight = rElemItem. bVertRulerRight ;
@@ -317,8 +321,9 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const
{
rVOpt.SetViewHScrollBar(bHorzScrollbar );
rVOpt.SetViewVScrollBar(bVertScrollbar );
- rVOpt.SetViewTabwin(bHorzRuler );
- rVOpt.SetViewVLin(bVertRuler );
+ rVOpt.SetViewAnyRuler(bAnyRuler);
+ rVOpt.SetViewHRuler(bHorzRuler );
+ rVOpt.SetViewVRuler(bVertRuler );
rVOpt.SetVRulerRight(bVertRulerRight );
rVOpt.SetCrossHair(bCrosshair );
rVOpt.SetSolidMarkHdl(bHandles );
@@ -486,6 +491,9 @@ int SwTestItem::operator==( const SfxPoolItem& rAttr ) const
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.6 2002/05/27 14:35:24 mba
+ #98405#: Put/QueryValue implemented
+
Revision 1.5 2002/04/25 13:57:39 os
#97695# color configuration entries added/moved/removed
diff --git a/sw/source/ui/config/optdlg.hrc b/sw/source/ui/config/optdlg.hrc
index 726525fd982b..1ceca93d5086 100644
--- a/sw/source/ui/config/optdlg.hrc
+++ b/sw/source/ui/config/optdlg.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: optdlg.hrc,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: os $ $Date: 2002-06-11 08:38:12 $
+ * last change: $Author: os $ $Date: 2002-09-20 12:09:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,6 +75,7 @@
#define CB_SHYPH 9
#define CB_HIDDEN 10
#define CB_BREAK 11
+#define CB_ANY_RULER 12
#define CB_CROSS 14
#define CB_HSCROLL 15
#define CB_VSCROLL 16
diff --git a/sw/source/ui/config/optdlg.src b/sw/source/ui/config/optdlg.src
index 7fe0c1dc564e..d2e69e49f9b8 100644
--- a/sw/source/ui/config/optdlg.src
+++ b/sw/source/ui/config/optdlg.src
@@ -2,9 +2,9 @@
*
* $RCSfile: optdlg.src,v $
*
- * $Revision: 1.82 $
+ * $Revision: 1.83 $
*
- * last change: $Author: kz $ $Date: 2002-09-17 13:28:12 $
+ * last change: $Author: os $ $Date: 2002-09-20 12:09:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -282,10 +282,17 @@ TabPage TP_CONTENT_OPT
Text[ catalan ] = "Barra de desplaament ~vertical";
Text[ thai ] = "แถบเลื่อนแนว~ตั้ง";
};
- CheckBox CB_HRULER
+ CheckBox CB_ANY_RULER
{
Pos = MAP_APPFONT ( 136 , 40 ) ;
Size = MAP_APPFONT ( 65 , 10 ) ;
+ Text = "Line~al" ;
+ Text [ english_us ] = "R~uler" ;
+ };
+ CheckBox CB_HRULER
+ {
+ Pos = MAP_APPFONT ( 142 , 53 ) ;
+ Size = MAP_APPFONT ( 61 , 10 ) ;
Text = "Horizontales ~Lineal" ;
Text [ ENGLISH ] = "~Horic. ruler" ;
Text [ norwegian ] = "~Horic. ruler" ;
@@ -314,14 +321,14 @@ TabPage TP_CONTENT_OPT
};
ListBox LB_HMETRIC
{
- Pos = MAP_APPFONT ( 206 , 38 ) ;
+ Pos = MAP_APPFONT ( 206 , 51 ) ;
Size = MAP_APPFONT ( 45 , 60 ) ;
DropDown = TRUE;
};
CheckBox CB_VRULER
{
- Pos = MAP_APPFONT ( 136 , 53 ) ;
- Size = MAP_APPFONT ( 65 , 10 ) ;
+ Pos = MAP_APPFONT ( 142 , 66 ) ;
+ Size = MAP_APPFONT ( 61 , 10 ) ;
Text = "Vertik~ales Lineal" ;
Text [ ENGLISH ] = "~Vert. ruler" ;
Text [ norwegian ] = "~Vert. ruler" ;
@@ -350,8 +357,8 @@ TabPage TP_CONTENT_OPT
};
CheckBox CB_VRULER_RIGHT
{
- Pos = MAP_APPFONT ( 142 , 66 ) ;
- Size = MAP_APPFONT ( 102 , 10 ) ;
+ Pos = MAP_APPFONT ( 148 , 79 ) ;
+ Size = MAP_APPFONT ( 100 , 10 ) ;
Text = "Rechts ausgerichtet" ;
Text [ ENGLISH ] = "Right aligned" ;
Text[ english_us ] = "Right-aligned";
@@ -378,13 +385,13 @@ TabPage TP_CONTENT_OPT
};
ListBox LB_VMETRIC
{
- Pos = MAP_APPFONT ( 206 , 51 ) ;
+ Pos = MAP_APPFONT ( 206 , 64 ) ;
Size = MAP_APPFONT ( 45 , 60 ) ;
DropDown = TRUE;
};
CheckBox CB_SMOOTH_SCROLL
{
- Pos = MAP_APPFONT ( 136 , 66 ) ;
+ Pos = MAP_APPFONT ( 136 , 79 ) ;
Size = MAP_APPFONT ( 108 , 10 ) ;
Text = "~Weiches Scrollen" ;
Text [ ENGLISH ] = "S~mooth scroll" ;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index c252d1081160..9505d177ea8a 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: optpage.cxx,v $
*
- * $Revision: 1.31 $
+ * $Revision: 1.32 $
*
- * last change: $Author: os $ $Date: 2002-08-30 10:31:22 $
+ * last change: $Author: os $ $Date: 2002-09-20 12:09:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -220,6 +220,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
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 ) ),
@@ -255,6 +256,7 @@ SwContentOptPage::SwContentOptPage( Window* pParent,
else
aVRulerRightCBox.Hide();
aVRulerCBox.SetClickHdl(LINK(this, SwContentOptPage, VertRulerHdl ));
+ aAnyRulerCB.SetClickHdl(LINK(this, SwContentOptPage, AnyRulerHdl));
SvxStringArray aMetricArr( SW_RES( STR_ARR_METRIC ) );
for ( USHORT i = 0; i < aMetricArr.Count(); ++i )
@@ -338,17 +340,17 @@ void SwContentOptPage::Reset(const SfxItemSet& rSet)
aBigHandleCB.Check(pElemAttr->bBigHandles );
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 );
-// bHtmlMode
}
aMetricLB.SetNoSelection();
lcl_SelectMetricLB(aMetricLB, SID_ATTR_METRIC, rSet);
lcl_SelectMetricLB(aHMetric, FN_HSCROLL_METRIC, rSet);
lcl_SelectMetricLB(aVMetric, FN_VSCROLL_METRIC, rSet);
- VertRulerHdl(&aVRulerCBox);
+ AnyRulerHdl(&aAnyRulerCB);
}
/*-----------------31.08.96 13.58-------------------
@@ -372,6 +374,7 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
aElem.bBigHandles = aBigHandleCB.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();
@@ -413,7 +416,20 @@ BOOL SwContentOptPage::FillItemSet(SfxItemSet& rSet)
---------------------------------------------------------------------------*/
IMPL_LINK(SwContentOptPage, VertRulerHdl, CheckBox*, pBox)
{
- aVRulerRightCBox.Enable(pBox->IsChecked());
+ aVRulerRightCBox.Enable(pBox->IsEnabled() && pBox->IsChecked());
+ return 0;
+}
+/* -----------------20.09.2002 11:30-----------------
+ *
+ * --------------------------------------------------*/
+IMPL_LINK( SwContentOptPage, AnyRulerHdl, CheckBox*, pBox)
+{
+ BOOL bChecked = pBox->IsChecked();
+ aHRulerCBox .Enable(bChecked);
+ aHMetric .Enable(bChecked);
+ aVRulerCBox .Enable(bChecked);
+ aVMetric .Enable(bChecked);
+ VertRulerHdl(&aVRulerCBox);
return 0;
}
/*----------------- OS 27.01.95 -----------------------
diff --git a/sw/source/ui/config/usrpref.cxx b/sw/source/ui/config/usrpref.cxx
index e73ec3ddcf26..fd44e2e5427e 100644
--- a/sw/source/ui/config/usrpref.cxx
+++ b/sw/source/ui/config/usrpref.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: usrpref.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: os $ $Date: 2002-08-13 15:00:05 $
+ * last change: $Author: os $ $Date: 2002-09-20 12:09:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -286,18 +286,19 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames()
"Line/LargeControlPoint", // 2
"Window/HorizontalScroll", // 3
"Window/VerticalScroll", // 4
- "Window/HorizontalRuler", // 5
- "Window/VerticalRuler", // 6
- "Window/HorizontalRulerUnit", // 7
- "Window/VerticalRulerUnit", // 8
- "Window/SmoothScroll", // 9
- "Zoom/Value", //10
- "Zoom/Type", //11
- "Other/MeasureUnit", //12
- "Other/TabStop", //13
- "Window/IsVerticalRulerRight" //14
+ "Window/ShowRulers", // 5
+ "Window/HorizontalRuler", // 6
+ "Window/VerticalRuler", // 7
+ "Window/HorizontalRulerUnit", // 8
+ "Window/VerticalRulerUnit", // 9
+ "Window/SmoothScroll", //10
+ "Zoom/Value", //11
+ "Zoom/Type", //12
+ "Other/MeasureUnit", //13
+ "Other/TabStop", //14
+ "Window/IsVerticalRulerRight" //15
};
- const int nCount = bWeb ? 13 : 15;
+ const int nCount = bWeb ? 14 : 16;
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
@@ -343,24 +344,25 @@ void SwLayoutViewConfig::Commit()
case 2: bSet = rParent.IsBigMarkHdl(); break;// "Line/LargeControlPoint",
case 3: bSet = rParent.IsViewHScrollBar(); break;// "Window/HorizontalScroll",
case 4: bSet = rParent.IsViewVScrollBar(); break;// "Window/VerticalScroll",
- case 5: bSet = rParent.IsViewTabwin(); break;// "Window/HorizontalRuler",
- case 6: bSet = rParent.IsViewVLin(); break;// "Window/VerticalRuler",
- case 7:
+ case 5: bSet = rParent.IsViewAnyRuler(); break; // "Window/ShowRulers"
+ case 6: bSet = rParent.IsViewHRuler(); break;// "Window/HorizontalRuler",
+ case 7: bSet = rParent.IsViewVRuler(); break;// "Window/VerticalRuler",
+ case 8:
if(rParent.bIsHScrollMetricSet)
pValues[nProp] <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit"
break;
- case 8:
+ case 9:
if(rParent.bIsVScrollMetricSet)
pValues[nProp] <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit"
break;
- case 9: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll",
- case 10: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value",
- case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type",
- case 12: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit",
- case 13: pValues[nProp] <<= TWIP_TO_MM100(rParent.GetDefTab()); break;// "Other/TabStop",
- case 14: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight",
+ case 10: bSet = rParent.IsSmoothScroll(); break;// "Window/SmoothScroll",
+ case 11: pValues[nProp] <<= (sal_Int32)rParent.GetZoom(); break;// "Zoom/Value",
+ case 12: pValues[nProp] <<= (sal_Int32)rParent.GetZoomType(); break;// "Zoom/Type",
+ case 13: pValues[nProp] <<= (sal_Int32)rParent.GetMetric(); break;// "Other/MeasureUnit",
+ case 14: pValues[nProp] <<= TWIP_TO_MM100(rParent.GetDefTab()); break;// "Other/TabStop",
+ case 15: bSet = rParent.IsVRulerRight(); break;// "Window/IsVerticalRulerRight",
}
- if(nProp < 7 || nProp == 9)
+ if(nProp < 8 || nProp == 10)
pValues[nProp].setValue(&bSet, ::getBooleanCppuType());
}
PutProperties(aNames, aValues);
@@ -380,7 +382,7 @@ void SwLayoutViewConfig::Load()
{
if(pValues[nProp].hasValue())
{
- sal_Bool bSet = nProp < 7 || nProp == 9 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False;
+ sal_Bool bSet = nProp < 8 || nProp == 10 ? *(sal_Bool*)pValues[nProp].getValue() : sal_False;
switch(nProp)
{
case 0: rParent.SetCrossHair(bSet); break;// "Line/Guide",
@@ -388,48 +390,49 @@ void SwLayoutViewConfig::Load()
case 2: rParent.SetBigMarkHdl(bSet); break;// "Line/LargeControlPoint",
case 3: rParent.SetViewHScrollBar(bSet); break;// "Window/HorizontalScroll",
case 4: rParent.SetViewVScrollBar(bSet); break;// "Window/VerticalScroll",
- case 5: rParent.SetViewTabwin(bSet); break;// "Window/HorizontalRuler",
- case 6: rParent.SetViewVLin(bSet); break;// "Window/VerticalRuler",
- case 7:
+ case 5: rParent.SetViewAnyRuler(bSet);break; // "Window/ShowRulers"
+ case 6: rParent.SetViewHRuler(bSet); break;// "Window/HorizontalRuler",
+ case 7: rParent.SetViewVRuler(bSet); break;// "Window/VerticalRuler",
+ case 8:
{
rParent.bIsHScrollMetricSet = sal_True;
sal_Int32 nUnit; pValues[nProp] >>= nUnit;
rParent.eHScrollMetric = ((FieldUnit)nUnit); // "Window/HorizontalRulerUnit"
}
break;
- case 8:
+ case 9:
{
rParent.bIsVScrollMetricSet = sal_True;
sal_Int32 nUnit; pValues[nProp] >>= nUnit;
rParent.eVScrollMetric = ((FieldUnit)nUnit); // "Window/VerticalRulerUnit"
}
break;
- case 9: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
- case 10:
+ case 10: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
+ case 11:
{
sal_Int32 nVal; pValues[nProp] >>= nVal;
rParent.SetZoom(nVal);
}
break;// "Zoom/Value",
- case 11:
+ case 12:
{
sal_Int32 nVal; pValues[nProp] >>= nVal;
rParent.SetZoomType((BYTE)nVal);
}
break;// "Zoom/Type",
- case 12:
+ case 13:
{
sal_Int32 nUnit; pValues[nProp] >>= nUnit;
rParent.SetMetric((FieldUnit)nUnit, TRUE);
}
break;// "Other/MeasureUnit",
- case 13:
+ case 14:
{
sal_Int32 nTab; pValues[nProp] >>= nTab;
rParent.SetDefTab(MM100_TO_TWIP(nTab), TRUE);
}
break;// "Other/TabStop",
- case 14: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
+ case 15: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
}
}
}
diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx
index 94fa3ee880a2..b1545326a24e 100644
--- a/sw/source/ui/config/viewopt.cxx
+++ b/sw/source/ui/config/viewopt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: viewopt.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: os $ $Date: 2002-08-28 12:24:07 $
+ * last change: $Author: os $ $Date: 2002-09-20 12:09:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -492,7 +492,7 @@ SwViewOption::SwViewOption() :
VIEWOPT_1_PAGEBACK |
VIEWOPT_1_SOLIDMARKHDL | VIEWOPT_1_POSTITS;
nCore2Options = VIEWOPT_CORE2_BLACKFONT | VIEWOPT_CORE2_HIDDENPARA;
- nUIOptions = VIEWOPT_2_MODIFIED | VIEWOPT_2_EXECHYPERLINKS | VIEWOPT_2_GRFKEEPZOOM;
+ nUIOptions = VIEWOPT_2_MODIFIED | VIEWOPT_2_EXECHYPERLINKS | VIEWOPT_2_GRFKEEPZOOM |VIEWOPT_2_ANY_RULER;
if(MEASURE_METRIC != GetAppLocaleData().getMeasurementSystemEnum())
aSnapSize.Width() = aSnapSize.Height() = 720; // 1/2"