diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-08 12:39:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-09 07:25:29 +0000 |
commit | 9b95093950436caebd45a06008929427869844fa (patch) | |
tree | b5d08ffb144c208b5b6135258e0ca0a48b28acf7 /dbaccess/source/ui/misc | |
parent | 967d0089a16ad236a0fb9f5bba7fafd2327745a9 (diff) |
convert SvxCellHorJustify to scoped enum
Change-Id: I0dd88b5bf9e1aededfa2d94b6b2d3d26694fff33
Reviewed-on: https://gerrit.libreoffice.org/34968
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/misc')
-rw-r--r-- | dbaccess/source/ui/misc/HtmlReader.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 20 |
2 files changed, 15 insertions, 15 deletions
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index 6ab40504d6ee..11c36b66d404 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -316,13 +316,13 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal) { const OUString& rOptVal = rOption.GetString(); if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_right )) - eVal = SVX_HOR_JUSTIFY_RIGHT; + eVal = SvxCellHorJustify::Right; else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_center )) - eVal = SVX_HOR_JUSTIFY_CENTER; + eVal = SvxCellHorJustify::Center; else if (rOptVal.equalsIgnoreAsciiCase( OOO_STRING_SVTOOLS_HTML_AL_left )) - eVal = SVX_HOR_JUSTIFY_LEFT; + eVal = SvxCellHorJustify::Left; else - eVal = SVX_HOR_JUSTIFY_STANDARD; + eVal = SvxCellHorJustify::Standard; } break; case HTML_O_WIDTH: @@ -449,7 +449,7 @@ bool OHTMLReader::CreateTable(int nToken) aColumnName.clear(); m_sCurrent.clear(); - eVal = SVX_HOR_JUSTIFY_STANDARD; + eVal = SvxCellHorJustify::Standard; bTableHeader = false; } break; diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index e0df88e01f13..51e8f1a756b6 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -723,10 +723,10 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment) sal_Int32 nAlignment = css::awt::TextAlign::LEFT; switch (_eAlignment) { - case SVX_HOR_JUSTIFY_STANDARD: - case SVX_HOR_JUSTIFY_LEFT: nAlignment = css::awt::TextAlign::LEFT; break; - case SVX_HOR_JUSTIFY_CENTER: nAlignment = css::awt::TextAlign::CENTER; break; - case SVX_HOR_JUSTIFY_RIGHT: nAlignment = css::awt::TextAlign::RIGHT; break; + case SvxCellHorJustify::Standard: + case SvxCellHorJustify::Left: nAlignment = css::awt::TextAlign::LEFT; break; + case SvxCellHorJustify::Center: nAlignment = css::awt::TextAlign::CENTER; break; + case SvxCellHorJustify::Right: nAlignment = css::awt::TextAlign::RIGHT; break; default: SAL_WARN("dbaccess.ui", "Invalid TextAlign!"); } @@ -735,12 +735,12 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment) SvxCellHorJustify mapTextJustify(sal_Int32 _nAlignment) { - SvxCellHorJustify eJustify = SVX_HOR_JUSTIFY_LEFT; + SvxCellHorJustify eJustify = SvxCellHorJustify::Left; switch (_nAlignment) { - case css::awt::TextAlign::LEFT : eJustify = SVX_HOR_JUSTIFY_LEFT; break; - case css::awt::TextAlign::CENTER : eJustify = SVX_HOR_JUSTIFY_CENTER; break; - case css::awt::TextAlign::RIGHT : eJustify = SVX_HOR_JUSTIFY_RIGHT; break; + case css::awt::TextAlign::LEFT : eJustify = SvxCellHorJustify::Left; break; + case css::awt::TextAlign::CENTER : eJustify = SvxCellHorJustify::Center; break; + case css::awt::TextAlign::RIGHT : eJustify = SvxCellHorJustify::Right; break; default: SAL_WARN("dbaccess.ui", "Invalid TextAlign!"); } @@ -760,7 +760,7 @@ void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol, bool bHasFormat = xInfo->hasPropertyByName(PROPERTY_FORMATKEY); sal_Int32 nDataType = ::comphelper::getINT32(xField->getPropertyValue(PROPERTY_TYPE)); - SvxCellHorJustify eJustify(SVX_HOR_JUSTIFY_STANDARD); + SvxCellHorJustify eJustify(SvxCellHorJustify::Standard); Any aAlignment = xAffectedCol->getPropertyValue(PROPERTY_ALIGN); if (aAlignment.hasValue()) eJustify = dbaui::mapTextJustify(::comphelper::getINT16(aAlignment)); @@ -813,7 +813,7 @@ bool callColumnFormatDialog(vcl::Window* _pParent, { new SfxRangeItem(SBA_DEF_RANGEFORMAT, SBA_DEF_FMTVALUE, SBA_ATTR_ALIGN_HOR_JUSTIFY), new SfxUInt32Item(SBA_DEF_FMTVALUE), - new SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, SBA_ATTR_ALIGN_HOR_JUSTIFY), + new SvxHorJustifyItem(SvxCellHorJustify::Standard, SBA_ATTR_ALIGN_HOR_JUSTIFY), new SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, false), new SvxNumberInfoItem(SID_ATTR_NUMBERFORMAT_INFO) }; |