summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-06 14:37:23 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2018-11-08 12:15:51 +0100
commit9e0770ea7e0cf094add54ad64bc9ff825d24bbe1 (patch)
treee897291e44ecb11ca44ba5e5ebefe03ac536862f /sd
parent841ee6fb052fb35467d74b70f575a86c8c0fe3b7 (diff)
Convert FieldUnit to scoped enum
Change-Id: Id2df31daa596a18c79af5fc6ea162deb6e24d5af Reviewed-on: https://gerrit.libreoffice.org/62958 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx90
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx10
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx6
-rw-r--r--sd/source/ui/app/optsitem.cxx2
-rw-r--r--sd/source/ui/app/sdmod1.cxx10
-rw-r--r--sd/source/ui/dlg/copydlg.cxx48
-rw-r--r--sd/source/ui/dlg/diactrl.cxx2
-rw-r--r--sd/source/ui/dlg/dlgsnap.cxx28
-rw-r--r--sd/source/ui/dlg/tpoption.cxx26
-rw-r--r--sd/source/ui/dlg/vectdlg.cxx18
10 files changed, 120 insertions, 120 deletions
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 86fca90c822d..d8b2baa6e533 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -639,7 +639,7 @@ CharHeightPropertyBox::CharHeightPropertyBox(sal_Int32 nControlType, vcl::Window
, maModifyHdl(rModifyHdl)
{
mpMetric.set( VclPtr<MetricField>::Create( pParent, WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FUNIT_PERCENT );
+ mpMetric->SetUnit( FieldUnit::PERCENT );
mpMetric->SetMin( 0 );
mpMetric->SetMax( 1000 );
@@ -711,7 +711,7 @@ private:
SdCharHeightPropertyBox::SdCharHeightPropertyBox(weld::Label* pLabel, weld::Container* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl)
: SdPropertySubControl(pParent)
, maModifyHdl(rModifyHdl)
- , mxMetric(mxBuilder->weld_metric_spin_button("fontsize", FUNIT_PERCENT))
+ , mxMetric(mxBuilder->weld_metric_spin_button("fontsize", FieldUnit::PERCENT))
, mxControl(mxBuilder->weld_menu_button("fontsizemenu"))
{
mxMetric->connect_value_changed(LINK(this, SdCharHeightPropertyBox, EditModifyHdl));
@@ -734,7 +734,7 @@ IMPL_LINK_NOARG(SdCharHeightPropertyBox, EditModifyHdl, weld::MetricSpinButton&,
IMPL_LINK(SdCharHeightPropertyBox, implMenuSelectHdl, const OString&, rIdent, void)
{
sal_Int32 nValue = rIdent.toInt32();
- mxMetric->set_value(nValue, FUNIT_PERCENT);
+ mxMetric->set_value(nValue, FieldUnit::PERCENT);
EditModifyHdl(*mxMetric);
}
@@ -744,13 +744,13 @@ void SdCharHeightPropertyBox::setValue( const Any& rValue, const OUString& )
{
double fValue = 0.0;
rValue >>= fValue;
- mxMetric->set_value(static_cast<long>(fValue * 100.0), FUNIT_PERCENT);
+ mxMetric->set_value(static_cast<long>(fValue * 100.0), FieldUnit::PERCENT);
}
}
Any SdCharHeightPropertyBox::getValue()
{
- return makeAny(static_cast<double>(mxMetric->get_value(FUNIT_PERCENT)) / 100.0);
+ return makeAny(static_cast<double>(mxMetric->get_value(FieldUnit::PERCENT)) / 100.0);
}
class TransparencyPropertyBox : public PropertySubControl
@@ -781,7 +781,7 @@ TransparencyPropertyBox::TransparencyPropertyBox( sal_Int32 nControlType, vcl::W
, maModifyHdl( rModifyHdl )
{
mpMetric.set( VclPtr<MetricField>::Create( pParent ,WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FUNIT_PERCENT );
+ mpMetric->SetUnit( FieldUnit::PERCENT );
mpMetric->SetMin( 0 );
mpMetric->SetMax( 100 );
@@ -875,7 +875,7 @@ private:
SdTransparencyPropertyBox::SdTransparencyPropertyBox(weld::Label* pLabel, weld::Container* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl)
: SdPropertySubControl(pParent)
, maModifyHdl(rModifyHdl)
- , mxMetric(mxBuilder->weld_metric_spin_button("transparent", FUNIT_PERCENT))
+ , mxMetric(mxBuilder->weld_metric_spin_button("transparent", FieldUnit::PERCENT))
, mxControl(mxBuilder->weld_menu_button("transparentmenu"))
{
for (sal_Int32 i = 25; i < 101; i += 25)
@@ -899,7 +899,7 @@ SdTransparencyPropertyBox::SdTransparencyPropertyBox(weld::Label* pLabel, weld::
void SdTransparencyPropertyBox::updateMenu()
{
- sal_Int64 nValue = mxMetric->get_value(FUNIT_PERCENT);
+ sal_Int64 nValue = mxMetric->get_value(FieldUnit::PERCENT);
for (sal_uInt16 i = 25; i < 101; i += 25)
mxControl->set_item_active(OString::number(i), nValue == i);
}
@@ -913,9 +913,9 @@ IMPL_LINK_NOARG(SdTransparencyPropertyBox, implModifyHdl, weld::MetricSpinButton
IMPL_LINK(SdTransparencyPropertyBox, implMenuSelectHdl, const OString&, rIdent, void)
{
auto nValue = rIdent.toInt32();
- if (nValue != mxMetric->get_value(FUNIT_PERCENT))
+ if (nValue != mxMetric->get_value(FieldUnit::PERCENT))
{
- mxMetric->set_value(nValue, FUNIT_PERCENT);
+ mxMetric->set_value(nValue, FieldUnit::PERCENT);
implModifyHdl(*mxMetric);
}
}
@@ -927,14 +927,14 @@ void SdTransparencyPropertyBox::setValue(const Any& rValue, const OUString&)
double fValue = 0.0;
rValue >>= fValue;
long nValue = static_cast<long>(fValue * 100);
- mxMetric->set_value(nValue, FUNIT_PERCENT);
+ mxMetric->set_value(nValue, FieldUnit::PERCENT);
updateMenu();
}
}
Any SdTransparencyPropertyBox::getValue()
{
- return makeAny(static_cast<double>(mxMetric->get_value(FUNIT_PERCENT)) / 100.0);
+ return makeAny(static_cast<double>(mxMetric->get_value(FieldUnit::PERCENT)) / 100.0);
}
class RotationPropertyBox : public PropertySubControl
@@ -967,7 +967,7 @@ RotationPropertyBox::RotationPropertyBox( sal_Int32 nControlType, vcl::Window* p
, maModifyHdl(rModifyHdl)
{
mpMetric.set( VclPtr<MetricField>::Create( pParent ,WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FUNIT_CUSTOM );
+ mpMetric->SetUnit( FieldUnit::CUSTOM );
mpMetric->SetCustomUnitText( OUString( u'\x00b0') ); // degree sign
mpMetric->SetMin( -10000 );
mpMetric->SetMax( 10000 );
@@ -1079,7 +1079,7 @@ private:
SdRotationPropertyBox::SdRotationPropertyBox(weld::Label* pLabel, weld::Container* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl)
: SdPropertySubControl(pParent)
, maModifyHdl(rModifyHdl)
- , mxMetric(mxBuilder->weld_metric_spin_button("rotate", FUNIT_DEGREE))
+ , mxMetric(mxBuilder->weld_metric_spin_button("rotate", FieldUnit::DEGREE))
, mxControl(mxBuilder->weld_menu_button("rotatemenu"))
{
mxMetric->connect_value_changed(LINK( this, SdRotationPropertyBox, implModifyHdl));
@@ -1096,7 +1096,7 @@ SdRotationPropertyBox::SdRotationPropertyBox(weld::Label* pLabel, weld::Containe
void SdRotationPropertyBox::updateMenu()
{
- sal_Int64 nValue = mxMetric->get_value(FUNIT_DEGREE);
+ sal_Int64 nValue = mxMetric->get_value(FieldUnit::DEGREE);
bool bDirection = nValue >= 0;
nValue = (nValue < 0 ? -nValue : nValue);
@@ -1117,7 +1117,7 @@ IMPL_LINK_NOARG(SdRotationPropertyBox, implModifyHdl, weld::MetricSpinButton&, v
IMPL_LINK(SdRotationPropertyBox, implMenuSelectHdl, const OString&, rIdent, void)
{
- auto nValue = mxMetric->get_value(FUNIT_DEGREE);
+ auto nValue = mxMetric->get_value(FieldUnit::DEGREE);
bool bDirection = nValue >= 0;
nValue = (nValue < 0 ? -nValue : nValue);
@@ -1131,9 +1131,9 @@ IMPL_LINK(SdRotationPropertyBox, implMenuSelectHdl, const OString&, rIdent, void
if( !bDirection )
nValue = -nValue;
- if (nValue != mxMetric->get_value(FUNIT_DEGREE))
+ if (nValue != mxMetric->get_value(FieldUnit::DEGREE))
{
- mxMetric->set_value(nValue, FUNIT_DEGREE);
+ mxMetric->set_value(nValue, FieldUnit::DEGREE);
implModifyHdl(*mxMetric);
}
}
@@ -1145,14 +1145,14 @@ void SdRotationPropertyBox::setValue( const Any& rValue, const OUString& )
double fValue = 0.0;
rValue >>= fValue;
long nValue = static_cast<long>(fValue);
- mxMetric->set_value(nValue, FUNIT_DEGREE);
+ mxMetric->set_value(nValue, FieldUnit::DEGREE);
updateMenu();
}
}
Any SdRotationPropertyBox::getValue()
{
- return makeAny(static_cast<double>(mxMetric->get_value(FUNIT_DEGREE)));
+ return makeAny(static_cast<double>(mxMetric->get_value(FieldUnit::DEGREE)));
}
class ScalePropertyBox : public PropertySubControl
@@ -1186,7 +1186,7 @@ ScalePropertyBox::ScalePropertyBox(sal_Int32 nControlType, vcl::Window* pParent,
, maModifyHdl( rModifyHdl )
{
mpMetric.set( VclPtr<MetricField>::Create( pParent ,WB_TABSTOP|WB_IGNORETAB| WB_NOBORDER) );
- mpMetric->SetUnit( FUNIT_PERCENT );
+ mpMetric->SetUnit( FieldUnit::PERCENT );
mpMetric->SetMin( 0 );
mpMetric->SetMax( 10000 );
@@ -1357,7 +1357,7 @@ private:
SdScalePropertyBox::SdScalePropertyBox(weld::Label* pLabel, weld::Container* pParent, const Any& rValue, const Link<LinkParamNone*,void>& rModifyHdl)
: SdPropertySubControl(pParent)
, maModifyHdl( rModifyHdl )
- , mxMetric(mxBuilder->weld_metric_spin_button("scale", FUNIT_PERCENT))
+ , mxMetric(mxBuilder->weld_metric_spin_button("scale", FieldUnit::PERCENT))
, mxControl(mxBuilder->weld_menu_button("scalemenu"))
{
mxControl->connect_selected(LINK(this, SdScalePropertyBox, implMenuSelectHdl));
@@ -1374,7 +1374,7 @@ SdScalePropertyBox::SdScalePropertyBox(weld::Label* pLabel, weld::Container* pPa
void SdScalePropertyBox::updateMenu()
{
- auto nValue = mxMetric->get_value(FUNIT_PERCENT);
+ auto nValue = mxMetric->get_value(FieldUnit::PERCENT);
mxControl->set_item_active("25scale", nValue == 25);
mxControl->set_item_active("50scale", nValue == 50);
@@ -1394,7 +1394,7 @@ IMPL_LINK_NOARG(SdScalePropertyBox, implModifyHdl, weld::MetricSpinButton&, void
IMPL_LINK(SdScalePropertyBox, implMenuSelectHdl, const OString&, rIdent, void)
{
- auto nValue = mxMetric->get_value(FUNIT_PERCENT);
+ auto nValue = mxMetric->get_value(FieldUnit::PERCENT);
int nDirection = mnDirection;
@@ -1415,9 +1415,9 @@ IMPL_LINK(SdScalePropertyBox, implMenuSelectHdl, const OString&, rIdent, void)
bModified = true;
}
- if (nValue != mxMetric->get_value(FUNIT_PERCENT))
+ if (nValue != mxMetric->get_value(FieldUnit::PERCENT))
{
- mxMetric->set_value(nValue, FUNIT_PERCENT);
+ mxMetric->set_value(nValue, FieldUnit::PERCENT);
bModified = true;
}
@@ -1462,14 +1462,14 @@ void SdScalePropertyBox::setValue(const Any& rValue, const OUString&)
nValue = static_cast<long>(fValue1 * 100.0);
else
nValue = static_cast<long>(fValue2 * 100.0);
- mxMetric->set_value(nValue, FUNIT_PERCENT);
+ mxMetric->set_value(nValue, FieldUnit::PERCENT);
updateMenu();
}
}
Any SdScalePropertyBox::getValue()
{
- double fValue1 = static_cast<double>(mxMetric->get_value(FUNIT_PERCENT)) / 100.0;
+ double fValue1 = static_cast<double>(mxMetric->get_value(FieldUnit::PERCENT)) / 100.0;
// Shrink animation is represented by value < 1 (< 100%)
// Shrink factor is calculated as (1 + $fValue)
@@ -1783,7 +1783,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage(weld::Container* pPar
, mxCLBDimColor(new ColorListBox(mxBuilder->weld_menu_button("dim_color_list"), pDialog))
, mxFTTextAnim(mxBuilder->weld_label("text_animation_label"))
, mxLBTextAnim(mxBuilder->weld_combo_box("text_animation_list"))
- , mxMFTextDelay(mxBuilder->weld_metric_spin_button("text_delay", FUNIT_PERCENT))
+ , mxMFTextDelay(mxBuilder->weld_metric_spin_button("text_delay", FieldUnit::PERCENT))
, mxFTTextDelay(mxBuilder->weld_label("text_delay_label"))
{
mxCLBDimColor->SelectEntry(COL_BLACK);
@@ -1908,7 +1908,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage(weld::Container* pPar
{
double fIterateInterval = 0.0;
pSet->getPropertyValue( nHandleIterateInterval ) >>= fIterateInterval;
- mxMFTextDelay->set_value(static_cast<long>(fIterateInterval*10), FUNIT_NONE);
+ mxMFTextDelay->set_value(static_cast<long>(fIterateInterval*10), FieldUnit::NONE);
}
}
else
@@ -1997,8 +1997,8 @@ void CustomAnimationEffectTabPage::implHdl(const weld::Widget* pControl)
{
if (pControl == mxLBTextAnim.get())
{
- if (mxMFTextDelay->get_value(FUNIT_NONE) == 0)
- mxMFTextDelay->set_value(100, FUNIT_NONE);
+ if (mxMFTextDelay->get_value(FieldUnit::NONE) == 0)
+ mxMFTextDelay->set_value(100, FieldUnit::NONE);
}
else if (pControl == mxLBSound.get())
{
@@ -2115,7 +2115,7 @@ void CustomAnimationEffectTabPage::update( STLPropertySet* pSet )
}
{
- double fIterateInterval = static_cast<double>(mxMFTextDelay->get_value(FUNIT_NONE)) / 10;
+ double fIterateInterval = static_cast<double>(mxMFTextDelay->get_value(FieldUnit::NONE)) / 10;
double fOldIterateInterval = -1.0;
if( mpSet->getPropertyState( nHandleIterateInterval ) != STLPropertyState::Ambiguous )
@@ -2295,9 +2295,9 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(weld::Container*
, mxFTStart(mxBuilder->weld_label("start_label"))
, mxLBStart(mxBuilder->weld_combo_box("start_list"))
, mxFTStartDelay(mxBuilder->weld_label("delay_label"))
- , mxMFStartDelay(mxBuilder->weld_metric_spin_button("delay_value", FUNIT_SECOND))
+ , mxMFStartDelay(mxBuilder->weld_metric_spin_button("delay_value", FieldUnit::SECOND))
, mxFTDuration(mxBuilder->weld_label("duration_label"))
- , mxCBXDuration(mxBuilder->weld_metric_spin_button("anim_duration", FUNIT_SECOND))
+ , mxCBXDuration(mxBuilder->weld_metric_spin_button("anim_duration", FieldUnit::SECOND))
, mxFTRepeat(mxBuilder->weld_label("repeat_label"))
, mxCBRepeat(mxBuilder->weld_combo_box("repeat_list"))
, mxCBXRewind(mxBuilder->weld_check_button("rewind"))
@@ -2330,7 +2330,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(weld::Container*
{
double fBegin = 0.0;
pSet->getPropertyValue( nHandleBegin ) >>= fBegin;
- mxMFStartDelay->set_value(static_cast<long>(fBegin*10), FUNIT_NONE);
+ mxMFStartDelay->set_value(static_cast<long>(fBegin*10), FieldUnit::NONE);
}
if( pSet->getPropertyState( nHandleDuration ) != STLPropertyState::Ambiguous )
@@ -2348,7 +2348,7 @@ CustomAnimationDurationTabPage::CustomAnimationDurationTabPage(weld::Container*
}
else
{
- mxCBXDuration->set_value(fDuration * 100.0, FUNIT_NONE);
+ mxCBXDuration->set_value(fDuration * 100.0, FieldUnit::NONE);
}
}
@@ -2460,11 +2460,11 @@ IMPL_LINK_NOARG(CustomAnimationDurationTabPage, DurationModifiedHdl, weld::Metri
{
if (!mxCBXDuration->get_text().isEmpty())
{
- double duration_value = static_cast<double>(mxCBXDuration->get_value(FUNIT_NONE));
+ double duration_value = static_cast<double>(mxCBXDuration->get_value(FieldUnit::NONE));
if(duration_value <= 0.0)
- mxCBXDuration->set_value(1, FUNIT_NONE);
+ mxCBXDuration->set_value(1, FieldUnit::NONE);
else
- mxCBXDuration->set_value(duration_value, FUNIT_NONE);
+ mxCBXDuration->set_value(duration_value, FieldUnit::NONE);
}
}
@@ -2501,7 +2501,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
}
{
- double fBegin = static_cast<double>(mxMFStartDelay->get_value(FUNIT_NONE)) / 10.0;
+ double fBegin = static_cast<double>(mxMFStartDelay->get_value(FieldUnit::NONE)) / 10.0;
double fOldBegin = -1.0;
if( mpSet->getPropertyState( nHandleBegin ) != STLPropertyState::Ambiguous )
@@ -2560,7 +2560,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
if (!mxCBXDuration->get_text().isEmpty())
{
- double duration_value = static_cast<double>(mxCBXDuration->get_value(FUNIT_NONE));
+ double duration_value = static_cast<double>(mxCBXDuration->get_value(FieldUnit::NONE));
if(duration_value > 0)
fDuration = duration_value/100.0;
@@ -2656,7 +2656,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(weld::Container*
, mxFTGroupText(mxBuilder->weld_label("group_text_label"))
, mxLBGroupText(mxBuilder->weld_combo_box("group_text_list"))
, mxCBXGroupAuto(mxBuilder->weld_check_button("auto_after"))
- , mxMFGroupAuto(mxBuilder->weld_metric_spin_button("auto_after_value",FUNIT_SECOND))
+ , mxMFGroupAuto(mxBuilder->weld_metric_spin_button("auto_after_value",FieldUnit::SECOND))
, mxCBXAnimateForm(mxBuilder->weld_check_button("animate_shape"))
, mxCBXReverse(mxBuilder->weld_check_button("reverse_order"))
{
@@ -2679,7 +2679,7 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(weld::Container*
{
mxCBXGroupAuto->set_active(fTextGroupingAuto >= 0.0);
if( fTextGroupingAuto >= 0.0 )
- mxMFGroupAuto->set_value(static_cast<long>(fTextGroupingAuto*10), FUNIT_NONE);
+ mxMFGroupAuto->set_value(static_cast<long>(fTextGroupingAuto*10), FieldUnit::NONE);
}
}
else
@@ -2756,7 +2756,7 @@ void CustomAnimationTextAnimTabPage::update( STLPropertySet* pSet )
if( nPos > 1 )
{
- double fTextGroupingAuto = mxCBXGroupAuto->get_active() ? mxMFGroupAuto->get_value(FUNIT_NONE) / 10.0 : -1.0;
+ double fTextGroupingAuto = mxCBXGroupAuto->get_active() ? mxMFGroupAuto->get_value(FieldUnit::NONE) / 10.0 : -1.0;
double fOldTextGroupingAuto = -2.0;
if(mpSet->getPropertyState( nHandleTextGroupingAuto ) != STLPropertyState::Ambiguous)
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index 0047558b2dfc..1e04f66d8b6a 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -197,11 +197,11 @@ void CustomAnimationPane::initialize()
maStrProperty = mpFTProperty->GetText();
//fillDurationMetricComboBox
- mpCBXDuration->InsertValue(50, FUNIT_CUSTOM);
- mpCBXDuration->InsertValue(100, FUNIT_CUSTOM);
- mpCBXDuration->InsertValue(200, FUNIT_CUSTOM);
- mpCBXDuration->InsertValue(300, FUNIT_CUSTOM);
- mpCBXDuration->InsertValue(500, FUNIT_CUSTOM);
+ mpCBXDuration->InsertValue(50, FieldUnit::CUSTOM);
+ mpCBXDuration->InsertValue(100, FieldUnit::CUSTOM);
+ mpCBXDuration->InsertValue(200, FieldUnit::CUSTOM);
+ mpCBXDuration->InsertValue(300, FieldUnit::CUSTOM);
+ mpCBXDuration->InsertValue(500, FieldUnit::CUSTOM);
mpCBXDuration->AdaptDropDownLineCountToMaximum();
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 58e6781dd5b1..b7025bacfb30 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -477,9 +477,9 @@ void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
VALUESET_APPEND, /* show legend */ true );
mpVS_TRANSITION_ICONS->RecalculateItemSizes();
- mpCBX_duration->InsertValue(100, FUNIT_CUSTOM);
- mpCBX_duration->InsertValue(200, FUNIT_CUSTOM);
- mpCBX_duration->InsertValue(300, FUNIT_CUSTOM);
+ mpCBX_duration->InsertValue(100, FieldUnit::CUSTOM);
+ mpCBX_duration->InsertValue(200, FieldUnit::CUSTOM);
+ mpCBX_duration->InsertValue(300, FieldUnit::CUSTOM);
mpCBX_duration->AdaptDropDownLineCountToMaximum();
// set defaults
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index 1bded3fdac06..a087ae3a8975 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -192,7 +192,7 @@ SdOptionsLayout::SdOptionsLayout(bool bImpress, bool bUseConfig) :
bDragStripes( false ),
bHandlesBezier( false ),
bHelplines( true ),
- nMetric(static_cast<sal_uInt16>(isMetricSystem() ? FUNIT_CM : FUNIT_INCH)),
+ nMetric(static_cast<sal_uInt16>(isMetricSystem() ? FieldUnit::CM : FieldUnit::INCH)),
nDefTab( 1250 )
{
EnableModify( true );
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 923926e4d320..8782722e52f8 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -128,11 +128,11 @@ void SdModule::Execute(SfxRequest& rReq)
FieldUnit eUnit = static_cast<FieldUnit>(static_cast<const SfxUInt16Item*>(pItem)->GetValue());
switch( eUnit )
{
- case FUNIT_MM: // only the units which are also in the dialog
- case FUNIT_CM:
- case FUNIT_INCH:
- case FUNIT_PICA:
- case FUNIT_POINT:
+ case FieldUnit::MM: // only the units which are also in the dialog
+ case FieldUnit::CM:
+ case FieldUnit::INCH:
+ case FieldUnit::PICA:
+ case FieldUnit::POINT:
{
::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
if(pDocSh)
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index d4bad13ad7e1..afaf7d89c873 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -47,11 +47,11 @@ CopyDlg::CopyDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs, ::sd::View*
, mpView(pInView)
, m_xNumFldCopies(m_xBuilder->weld_spin_button("copies"))
, m_xBtnSetViewData(m_xBuilder->weld_button("viewdata"))
- , m_xMtrFldMoveX(m_xBuilder->weld_metric_spin_button("x", FUNIT_CM))
- , m_xMtrFldMoveY(m_xBuilder->weld_metric_spin_button("y", FUNIT_CM))
- , m_xMtrFldAngle(m_xBuilder->weld_metric_spin_button("angle", FUNIT_DEGREE))
- , m_xMtrFldWidth(m_xBuilder->weld_metric_spin_button("width", FUNIT_CM))
- , m_xMtrFldHeight(m_xBuilder->weld_metric_spin_button("height", FUNIT_CM))
+ , m_xMtrFldMoveX(m_xBuilder->weld_metric_spin_button("x", FieldUnit::CM))
+ , m_xMtrFldMoveY(m_xBuilder->weld_metric_spin_button("y", FieldUnit::CM))
+ , m_xMtrFldAngle(m_xBuilder->weld_metric_spin_button("angle", FieldUnit::DEGREE))
+ , m_xMtrFldWidth(m_xBuilder->weld_metric_spin_button("width", FieldUnit::CM))
+ , m_xMtrFldHeight(m_xBuilder->weld_metric_spin_button("height", FieldUnit::CM))
, m_xFtEndColor(m_xBuilder->weld_label("endlabel"))
, m_xBtnSetDefault(m_xBuilder->weld_button("default"))
, m_xLbStartColor(new ColorListBox(m_xBuilder->weld_menu_button("start"), pWindow))
@@ -76,11 +76,11 @@ CopyDlg::~CopyDlg()
SvtViewOptions aDlgOpt(EViewType::Dialog, OStringToOUString(m_xDialog->get_help_id(), RTL_TEXTENCODING_UTF8));
OUString sStr =
OUString::number(m_xNumFldCopies->get_value()) + OUString(TOKEN) +
- OUString::number(m_xMtrFldMoveX->get_value(FUNIT_NONE)) + OUString(TOKEN) +
- OUString::number(m_xMtrFldMoveY->get_value(FUNIT_NONE)) + OUString(TOKEN) +
- OUString::number(m_xMtrFldAngle->get_value(FUNIT_NONE)) + OUString(TOKEN) +
- OUString::number(m_xMtrFldWidth->get_value(FUNIT_NONE)) + OUString(TOKEN) +
- OUString::number(m_xMtrFldHeight->get_value(FUNIT_NONE)) + OUString(TOKEN) +
+ OUString::number(m_xMtrFldMoveX->get_value(FieldUnit::NONE)) + OUString(TOKEN) +
+ OUString::number(m_xMtrFldMoveY->get_value(FieldUnit::NONE)) + OUString(TOKEN) +
+ OUString::number(m_xMtrFldAngle->get_value(FieldUnit::NONE)) + OUString(TOKEN) +
+ OUString::number(m_xMtrFldWidth->get_value(FieldUnit::NONE)) + OUString(TOKEN) +
+ OUString::number(m_xMtrFldHeight->get_value(FieldUnit::NONE)) + OUString(TOKEN) +
OUString::number(static_cast<sal_uInt32>(m_xLbStartColor->GetSelectEntryColor())) + OUString(TOKEN) +
OUString::number(static_cast<sal_uInt32>(m_xLbEndColor->GetSelectEntryColor()));
aDlgOpt.SetUserItem("UserItem", css::uno::makeAny(sStr));
@@ -95,16 +95,16 @@ void CopyDlg::Reset()
::tools::Rectangle aRect = mpView->GetAllMarkedRect();
Size aPageSize = mpView->GetSdrPageView()->GetPage()->GetSize();
SetMetricValue( *m_xMtrFldMoveX, long(1000000 / maUIScale), MapUnit::Map100thMM);
- double fScaleFactor = m_xMtrFldMoveX->get_value(FUNIT_NONE)/1000000.0;
+ double fScaleFactor = m_xMtrFldMoveX->get_value(FieldUnit::NONE)/1000000.0;
long nPageWidth = aPageSize.Width() * fScaleFactor;
long nPageHeight = aPageSize.Height() * fScaleFactor;
long nRectWidth = aRect.GetWidth() * fScaleFactor;
long nRectHeight = aRect.GetHeight() * fScaleFactor;
- m_xMtrFldMoveX->set_range(-nPageWidth, nPageWidth, FUNIT_NONE);
- m_xMtrFldMoveY->set_range(-nPageHeight, nPageHeight, FUNIT_NONE);
- m_xMtrFldWidth->set_range(-nRectWidth, nPageWidth, FUNIT_NONE);
- m_xMtrFldHeight->set_range(-nRectHeight, nPageHeight, FUNIT_NONE);
+ m_xMtrFldMoveX->set_range(-nPageWidth, nPageWidth, FieldUnit::NONE);
+ m_xMtrFldMoveY->set_range(-nPageHeight, nPageHeight, FieldUnit::NONE);
+ m_xMtrFldWidth->set_range(-nRectWidth, nPageWidth, FieldUnit::NONE);
+ m_xMtrFldHeight->set_range(-nRectHeight, nPageHeight, FieldUnit::NONE);
const SfxPoolItem* pPoolItem = nullptr;
OUString aStr;
@@ -133,9 +133,9 @@ void CopyDlg::Reset()
SetMetricValue( *m_xMtrFldMoveY, long(nMoveY / maUIScale), MapUnit::Map100thMM);
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_ANGLE, true, &pPoolItem ) )
- m_xMtrFldAngle->set_value(static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(), FUNIT_NONE);
+ m_xMtrFldAngle->set_value(static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(), FieldUnit::NONE);
else
- m_xMtrFldAngle->set_value(0, FUNIT_NONE);
+ m_xMtrFldAngle->set_value(0, FieldUnit::NONE);
long nWidth = 0;
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) )
@@ -165,11 +165,11 @@ void CopyDlg::Reset()
{
sal_Int32 nIdx {0};
m_xNumFldCopies->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64());
- m_xMtrFldMoveX->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FUNIT_NONE);
- m_xMtrFldMoveY->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FUNIT_NONE);
- m_xMtrFldAngle->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FUNIT_NONE);
- m_xMtrFldWidth->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FUNIT_NONE);
- m_xMtrFldHeight->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FUNIT_NONE);
+ m_xMtrFldMoveX->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
+ m_xMtrFldMoveY->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
+ m_xMtrFldAngle->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
+ m_xMtrFldWidth->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
+ m_xMtrFldHeight->set_value(aStr.getToken(0, TOKEN, nIdx).toInt64(), FieldUnit::NONE);
m_xLbStartColor->SelectEntry( Color( aStr.getToken(0, TOKEN, nIdx).toUInt32() ) );
m_xLbEndColor->SelectEntry( Color( aStr.getToken(0, TOKEN, nIdx).toUInt32() ) );
}
@@ -189,7 +189,7 @@ void CopyDlg::GetAttr( SfxItemSet& rOutAttrs )
rOutAttrs.Put( SfxUInt16Item( ATTR_COPY_NUMBER, static_cast<sal_uInt16>(m_xNumFldCopies->get_value()) ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_X, nMoveX ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_MOVE_Y, nMoveY ) );
- rOutAttrs.Put( SfxInt32Item( ATTR_COPY_ANGLE, static_cast<sal_Int32>(m_xMtrFldAngle->get_value(FUNIT_DEGREE)) ) );
+ rOutAttrs.Put( SfxInt32Item( ATTR_COPY_ANGLE, static_cast<sal_Int32>(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)) ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_WIDTH, nWidth ) );
rOutAttrs.Put( SfxInt32Item( ATTR_COPY_HEIGHT, nHeight ) );
@@ -247,7 +247,7 @@ IMPL_LINK_NOARG(CopyDlg, SetDefault, weld::Button&, void)
SetMetricValue( *m_xMtrFldMoveY, long(nValue / maUIScale), MapUnit::Map100thMM);
nValue = 0;
- m_xMtrFldAngle->set_value(nValue, FUNIT_DEGREE);
+ m_xMtrFldAngle->set_value(nValue, FieldUnit::DEGREE);
SetMetricValue( *m_xMtrFldWidth, long(nValue / maUIScale), MapUnit::Map100thMM);
SetMetricValue( *m_xMtrFldHeight, long(nValue / maUIScale), MapUnit::Map100thMM);
diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx
index 1958b6271433..1c8e5f9902c7 100644
--- a/sd/source/ui/dlg/diactrl.cxx
+++ b/sd/source/ui/dlg/diactrl.cxx
@@ -52,7 +52,7 @@ SdPagesField::SdPagesField( vcl::Window* pParent,
SetSizePixel( aSize );
// set parameter of MetricFields
- SetUnit( FUNIT_CUSTOM );
+ SetUnit( FieldUnit::CUSTOM );
SetMin( 1 );
SetFirst( 1 );
SetMax( 15 );
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 61bae299892d..0401ed7a8596 100644
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -35,9 +35,9 @@ SdSnapLineDlg::SdSnapLineDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
: GenericDialogController(pWindow, "modules/sdraw/ui/dlgsnap.ui", "SnapObjectDialog")
, aUIScale(pView->GetDoc().GetUIScale())
, m_xFtX(m_xBuilder->weld_label("xlabel"))
- , m_xMtrFldX(m_xBuilder->weld_metric_spin_button("x", FUNIT_CM))
+ , m_xMtrFldX(m_xBuilder->weld_metric_spin_button("x", FieldUnit::CM))
, m_xFtY(m_xBuilder->weld_label("ylabel"))
- , m_xMtrFldY(m_xBuilder->weld_metric_spin_button("y", FUNIT_CM))
+ , m_xMtrFldY(m_xBuilder->weld_metric_spin_button("y", FieldUnit::CM))
, m_xRadioGroup(m_xBuilder->weld_widget("radiogroup"))
, m_xRbPoint(m_xBuilder->weld_radio_button("point"))
, m_xRbVert(m_xBuilder->weld_radio_button("vert"))
@@ -73,24 +73,24 @@ SdSnapLineDlg::SdSnapLineDlg(weld::Window* pWindow, const SfxItemSet& rInAttrs,
// WorkArea, PoolUnit and FieldUnit:
SetMetricValue(*m_xMtrFldX, aLeftTop.X(), ePoolUnit );
- int nValue = m_xMtrFldX->get_value(FUNIT_NONE);
+ int nValue = m_xMtrFldX->get_value(FieldUnit::NONE);
nValue = sal_Int32(nValue / aUIScale);
- m_xMtrFldX->set_min(nValue, FUNIT_NONE);
+ m_xMtrFldX->set_min(nValue, FieldUnit::NONE);
SetMetricValue(*m_xMtrFldX, aRightBottom.X(), ePoolUnit);
- nValue = m_xMtrFldX->get_value(FUNIT_NONE);
+ nValue = m_xMtrFldX->get_value(FieldUnit::NONE);
nValue = sal_Int32(nValue / aUIScale);
- m_xMtrFldX->set_max(nValue, FUNIT_NONE);
+ m_xMtrFldX->set_max(nValue, FieldUnit::NONE);
SetMetricValue(*m_xMtrFldY, aLeftTop.Y(), ePoolUnit);
- nValue = m_xMtrFldY->get_value(FUNIT_NONE);
+ nValue = m_xMtrFldY->get_value(FieldUnit::NONE);
nValue = sal_Int32(nValue / aUIScale);
- m_xMtrFldY->set_min(nValue, FUNIT_NONE);
+ m_xMtrFldY->set_min(nValue, FieldUnit::NONE);
SetMetricValue(*m_xMtrFldY, aRightBottom.Y(), ePoolUnit);
- nValue = m_xMtrFldY->get_value(FUNIT_NONE);
+ nValue = m_xMtrFldY->get_value(FieldUnit::NONE);
nValue = sal_Int32(nValue / aUIScale);
- m_xMtrFldY->set_max(nValue, FUNIT_NONE);
+ m_xMtrFldY->set_max(nValue, FieldUnit::NONE);
// set values
nXValue = static_cast<const SfxInt32Item&>( rInAttrs.Get(ATTR_SNAPLINE_X)).GetValue();
@@ -150,13 +150,13 @@ void SdSnapLineDlg::SetInputFields(bool bEnableX, bool bEnableY)
if ( bEnableX )
{
if (!m_xMtrFldX->get_sensitive())
- m_xMtrFldX->set_value(nXValue, FUNIT_NONE);
+ m_xMtrFldX->set_value(nXValue, FieldUnit::NONE);
m_xMtrFldX->set_sensitive(true);
m_xFtX->set_sensitive(true);
}
else if (m_xMtrFldX->get_sensitive())
{
- nXValue = m_xMtrFldX->get_value(FUNIT_NONE);
+ nXValue = m_xMtrFldX->get_value(FieldUnit::NONE);
m_xMtrFldX->set_text(OUString());
m_xMtrFldX->set_sensitive(false);
m_xFtX->set_sensitive(false);
@@ -164,13 +164,13 @@ void SdSnapLineDlg::SetInputFields(bool bEnableX, bool bEnableY)
if ( bEnableY )
{
if (!m_xMtrFldY->get_sensitive())
- m_xMtrFldY->set_value(nYValue, FUNIT_NONE);
+ m_xMtrFldY->set_value(nYValue, FieldUnit::NONE);
m_xMtrFldY->set_sensitive(true);
m_xFtY->set_sensitive(true);
}
else if (m_xMtrFldY->get_sensitive())
{
- nYValue = m_xMtrFldY->get_value(FUNIT_NONE);
+ nYValue = m_xMtrFldY->get_value(FieldUnit::NONE);
m_xMtrFldY->set_text(OUString());
m_xMtrFldY->set_sensitive(false);
m_xFtY->set_sensitive(false);
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index b08feff7bdbb..86215b9c9758 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -68,9 +68,9 @@ bool SdTpOptionsSnap::FillItemSet( SfxItemSet* rAttrs )
aOptsItem.GetOptionsSnap().SetOrtho( m_xCbxOrtho->get_active() );
aOptsItem.GetOptionsSnap().SetBigOrtho( m_xCbxBigOrtho->get_active() );
aOptsItem.GetOptionsSnap().SetRotate( m_xCbxRotate->get_active() );
- aOptsItem.GetOptionsSnap().SetSnapArea(static_cast<sal_Int16>(m_xMtrFldSnapArea->get_value(FUNIT_PIXEL)));
- aOptsItem.GetOptionsSnap().SetAngle(static_cast<sal_Int16>(m_xMtrFldAngle->get_value(FUNIT_DEGREE)));
- aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle(static_cast<sal_Int16>(m_xMtrFldBezAngle->get_value(FUNIT_DEGREE)));
+ aOptsItem.GetOptionsSnap().SetSnapArea(static_cast<sal_Int16>(m_xMtrFldSnapArea->get_value(FieldUnit::PIXEL)));
+ aOptsItem.GetOptionsSnap().SetAngle(static_cast<sal_Int16>(m_xMtrFldAngle->get_value(FieldUnit::DEGREE)));
+ aOptsItem.GetOptionsSnap().SetEliminatePolyPointLimitAngle(static_cast<sal_Int16>(m_xMtrFldBezAngle->get_value(FieldUnit::DEGREE)));
rAttrs->Put( aOptsItem );
@@ -93,9 +93,9 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
m_xCbxOrtho->set_active( aOptsItem.GetOptionsSnap().IsOrtho() );
m_xCbxBigOrtho->set_active( aOptsItem.GetOptionsSnap().IsBigOrtho() );
m_xCbxRotate->set_active( aOptsItem.GetOptionsSnap().IsRotate() );
- m_xMtrFldSnapArea->set_value(aOptsItem.GetOptionsSnap().GetSnapArea(), FUNIT_PIXEL);
- m_xMtrFldAngle->set_value(aOptsItem.GetOptionsSnap().GetAngle(), FUNIT_DEGREE);
- m_xMtrFldBezAngle->set_value(aOptsItem.GetOptionsSnap().GetEliminatePolyPointLimitAngle(), FUNIT_DEGREE);
+ m_xMtrFldSnapArea->set_value(aOptsItem.GetOptionsSnap().GetSnapArea(), FieldUnit::PIXEL);
+ m_xMtrFldAngle->set_value(aOptsItem.GetOptionsSnap().GetAngle(), FieldUnit::DEGREE);
+ m_xMtrFldBezAngle->set_value(aOptsItem.GetOptionsSnap().GetEliminatePolyPointLimitAngle(), FieldUnit::DEGREE);
ClickRotateHdl_Impl(*m_xCbxRotate);
}
@@ -243,7 +243,7 @@ SdTpOptionsMisc::SdTpOptionsMisc(vcl::Window* pParent, const SfxItemSet& rInAttr
for (sal_uInt32 i = 0; i < SvxFieldUnitTable::Count(); ++i)
{
OUString sMetric = SvxFieldUnitTable::GetString(i);
- sal_IntPtr nFieldUnit = SvxFieldUnitTable::GetValue(i);
+ sal_IntPtr nFieldUnit = sal_uInt16(SvxFieldUnitTable::GetValue(i));
sal_Int32 nPos = m_pLbMetric->InsertEntry( sMetric );
m_pLbMetric->SetEntryData( nPos, reinterpret_cast<void*>(nFieldUnit) );
}
@@ -333,13 +333,13 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
if( eFUnit != m_pMtrFldOriginalWidth->GetUnit() )
{
// set metrics
- sal_Int64 nVal = m_pMtrFldOriginalWidth->Denormalize( m_pMtrFldOriginalWidth->GetValue( FUNIT_TWIP ) );
+ sal_Int64 nVal = m_pMtrFldOriginalWidth->Denormalize( m_pMtrFldOriginalWidth->GetValue( FieldUnit::TWIP ) );
SetFieldUnit( *m_pMtrFldOriginalWidth, eFUnit, true );
- m_pMtrFldOriginalWidth->SetValue( m_pMtrFldOriginalWidth->Normalize( nVal ), FUNIT_TWIP );
+ m_pMtrFldOriginalWidth->SetValue( m_pMtrFldOriginalWidth->Normalize( nVal ), FieldUnit::TWIP );
- nVal = m_pMtrFldOriginalHeight->Denormalize( m_pMtrFldOriginalHeight->GetValue( FUNIT_TWIP ) );
+ nVal = m_pMtrFldOriginalHeight->Denormalize( m_pMtrFldOriginalHeight->GetValue( FieldUnit::TWIP ) );
SetFieldUnit( *m_pMtrFldOriginalHeight, eFUnit, true );
- m_pMtrFldOriginalHeight->SetValue( m_pMtrFldOriginalHeight->Normalize( nVal ), FUNIT_TWIP );
+ m_pMtrFldOriginalHeight->SetValue( m_pMtrFldOriginalHeight->Normalize( nVal ), FieldUnit::TWIP );
if( nWidth != 0 && nHeight != 0 )
{
@@ -540,9 +540,9 @@ IMPL_LINK_NOARG(SdTpOptionsMisc, SelectMetricHdl_Impl, ListBox&, void)
{
FieldUnit eUnit = static_cast<FieldUnit>(reinterpret_cast<sal_IntPtr>(m_pLbMetric->GetEntryData( nPos )));
sal_Int64 nVal =
- m_pMtrFldTabstop->Denormalize( m_pMtrFldTabstop->GetValue( FUNIT_TWIP ) );
+ m_pMtrFldTabstop->Denormalize( m_pMtrFldTabstop->GetValue( FieldUnit::TWIP ) );
SetFieldUnit( *m_pMtrFldTabstop, eUnit );
- m_pMtrFldTabstop->SetValue( m_pMtrFldTabstop->Normalize( nVal ), FUNIT_TWIP );
+ m_pMtrFldTabstop->SetValue( m_pMtrFldTabstop->Normalize( nVal ), FieldUnit::TWIP );
}
}
diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx
index 2bbc2810b203..27fd59ef2ebd 100644
--- a/sd/source/ui/dlg/vectdlg.cxx
+++ b/sd/source/ui/dlg/vectdlg.cxx
@@ -35,9 +35,9 @@ SdVectorizeDlg::SdVectorizeDlg(weld::Window* pParent, const Bitmap& rBmp, ::sd::
, m_pDocSh(pDocShell)
, aBmp(rBmp)
, m_xNmLayers(m_xBuilder->weld_spin_button("colors"))
- , m_xMtReduce(m_xBuilder->weld_metric_spin_button("points", FUNIT_PIXEL))
+ , m_xMtReduce(m_xBuilder->weld_metric_spin_button("points", FieldUnit::PIXEL))
, m_xFtFillHoles(m_xBuilder->weld_label("tilesft"))
- , m_xMtFillHoles(m_xBuilder->weld_metric_spin_button("tiles", FUNIT_PIXEL))
+ , m_xMtFillHoles(m_xBuilder->weld_metric_spin_button("tiles", FieldUnit::PIXEL))
, m_xCbFillHoles(m_xBuilder->weld_check_button("fillholes"))
, m_xBmpWin(new weld::CustomWeld(*m_xBuilder, "source", m_aBmpWin))
, m_xMtfWin(new weld::CustomWeld(*m_xBuilder, "vectorized", m_aMtfWin))
@@ -136,7 +136,7 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf )
if( !!aTmp )
{
const Link<long,void> aPrgsHdl( LINK( this, SdVectorizeDlg, ProgressHdl ) );
- aTmp.Vectorize( rMtf, static_cast<sal_uInt8>(m_xMtReduce->get_value(FUNIT_NONE)), &aPrgsHdl );
+ aTmp.Vectorize( rMtf, static_cast<sal_uInt8>(m_xMtReduce->get_value(FieldUnit::NONE)), &aPrgsHdl );
if (m_xCbFillHoles->get_active())
{
@@ -147,8 +147,8 @@ void SdVectorizeDlg::Calculate( Bitmap const & rBmp, GDIMetaFile& rMtf )
{
const long nWidth = pRAcc->Width();
const long nHeight = pRAcc->Height();
- const long nTileX = m_xMtFillHoles->get_value(FUNIT_NONE);
- const long nTileY = m_xMtFillHoles->get_value(FUNIT_NONE);
+ const long nTileX = m_xMtFillHoles->get_value(FieldUnit::NONE);
+ const long nTileY = m_xMtFillHoles->get_value(FieldUnit::NONE);
assert(nTileX && "div-by-zero");
const long nCountX = nWidth / nTileX;
assert(nTileY && "div-by-zero");
@@ -310,8 +310,8 @@ void SdVectorizeDlg::LoadSettings()
}
m_xNmLayers->set_value(nLayers);
- m_xMtReduce->set_value(nReduce, FUNIT_NONE);
- m_xMtFillHoles->set_value(nFillHoles, FUNIT_NONE);
+ m_xMtReduce->set_value(nReduce, FieldUnit::NONE);
+ m_xMtFillHoles->set_value(nFillHoles, FieldUnit::NONE);
m_xCbFillHoles->set_active(bFillHoles);
ToggleHdl(*m_xCbFillHoles);
@@ -326,8 +326,8 @@ void SdVectorizeDlg::SaveSettings() const
if( xOStm.is() )
{
SdIOCompat aCompat( *xOStm, StreamMode::WRITE, 1 );
- xOStm->WriteUInt16( m_xNmLayers->get_value() ).WriteUInt16(m_xMtReduce->get_value(FUNIT_NONE));
- xOStm->WriteUInt16( m_xMtFillHoles->get_value(FUNIT_NONE) ).WriteBool(m_xCbFillHoles->get_active());
+ xOStm->WriteUInt16( m_xNmLayers->get_value() ).WriteUInt16(m_xMtReduce->get_value(FieldUnit::NONE));
+ xOStm->WriteUInt16( m_xMtFillHoles->get_value(FieldUnit::NONE) ).WriteBool(m_xCbFillHoles->get_active());
}
}