summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-13 14:23:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-19 08:25:59 +0200
commit6390d77a1498ff2474522031af4a68af5e865d8d (patch)
treea9ed0f2242e09b4de943e02c533a04861c011324 /sw
parente175f9f4393eb3badd763fa5b1cdc5b3aabab0e4 (diff)
convert MeasurementSystem to scoped enum
Change-Id: I5d26c50aa0e2c68edab6ee217ae6bdb0ee45dc09 Reviewed-on: https://gerrit.libreoffice.org/36525 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docdesc.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx2
-rw-r--r--sw/source/uibase/config/usrpref.cxx2
-rw-r--r--sw/source/uibase/config/viewopt.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 108496c9677f..0f84d04324c3 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -93,7 +93,7 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId,
nMinRight = nMinTop = nMinBottom = GetMetricVal( CM_1 );
nMinLeft = nMinRight * 2;
}
- else if (!utl::ConfigManager::IsAvoidConfig() && MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() )
+ else if (!utl::ConfigManager::IsAvoidConfig() && MeasurementSystem::Metric == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() )
{
nMinTop = nMinBottom = nMinLeft = nMinRight = 1134; // 2 centimeters
}
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 82aeb6d88379..b89ad0779d89 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -122,7 +122,7 @@ SwFootNotePage::SwFootNotePage(vcl::Window *pParent, const SfxItemSet &rSet)
SetMetric(*m_pDistEdit, aMetric);
SetMetric(*m_pLineDistEdit, aMetric);
MeasurementSystem eSys = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
- long nHeightValue = MEASURE_METRIC != eSys ? 1440 : 1134;
+ long nHeightValue = MeasurementSystem::Metric != eSys ? 1440 : 1134;
m_pMaxHeightEdit->SetValue(m_pMaxHeightEdit->Normalize(nHeightValue),FUNIT_TWIP);
}
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index 7fb9e59d7e33..a1390547da21 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -66,7 +66,7 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
return;
}
MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
- m_eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
+ m_eUserMetric = MeasurementSystem::Metric == eSystem ? FUNIT_CM : FUNIT_INCH;
m_eHScrollMetric = m_eVScrollMetric = m_eUserMetric;
m_aContentConfig.Load();
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index bbfe62092f80..9bc84e223d4d 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -194,7 +194,7 @@ SwViewOption::SwViewOption() :
ViewOptFlags2::GrfKeepZoom |
ViewOptFlags2::AnyRuler;
- if (!utl::ConfigManager::IsAvoidConfig() && MEASURE_METRIC != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum())
+ if (!utl::ConfigManager::IsAvoidConfig() && MeasurementSystem::Metric != SvtSysLocale().GetLocaleData().getMeasurementSystemEnum())
m_aSnapSize.Width() = m_aSnapSize.Height() = 720; // 1/2"
else
m_aSnapSize.Width() = m_aSnapSize.Height() = 567; // 1 cm