diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2003-08-19 11:08:25 +0000 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2003-08-19 11:08:25 +0000 |
commit | 14075322b19eb2d015fb3886fd0fec829061cb47 (patch) | |
tree | 7c143f037b6bf85826e2a37c280d588662580dfe /svx/source/dialog/svxruler.cxx | |
parent | INTEGRATION: CWS os13 (1.46.10); FILE MERGED (diff) | |
download | core-14075322b19eb2d015fb3886fd0fec829061cb47.tar.gz core-14075322b19eb2d015fb3886fd0fec829061cb47.zip |
INTEGRATION: CWS os13 (1.21.70); FILE MERGED
2003/07/29 08:29:18 os 1.21.70.1: #i11235# reduce number of proposed metric types
Diffstat (limited to 'svx/source/dialog/svxruler.cxx')
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 4ca53b0bc379..609c4331933e 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svxruler.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: vg $ $Date: 2003-06-04 12:26:00 $ + * last change: $Author: hjs $ $Date: 2003-08-19 12:08:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -3409,10 +3409,17 @@ void SvxRuler::Command( const CommandEvent& rCEvt ) FieldUnit eUnit = GetUnit(); const USHORT nCount = aMenu.GetItemCount(); - for ( USHORT i = 0; i < nCount; ++i ) + BOOL bReduceMetric = 0 != (nFlags &SVXRULER_SUPPORT_REDUCED_METRIC); + for ( USHORT i = nCount; i; --i ) { - const USHORT nId = aMenu.GetItemId(i); + const USHORT nId = aMenu.GetItemId(i - 1); aMenu.CheckItem(nId, nId == (USHORT)eUnit); + if(bReduceMetric && + (nId == FUNIT_M || + nId == FUNIT_KM || + nId == FUNIT_FOOT || + nId == FUNIT_MILE )) + aMenu.RemoveItem(i - 1); } aMenu.Execute( this, rCEvt.GetMousePosPixel() ); } |