sw/source/core/unocore/unomap1.cxx | 3 ++- sw/source/uibase/utlui/uiitems.cxx | 11 ++++------- xmloff/source/style/XMLFootnoteSeparatorExport.cxx | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-)
New commits: commit d4a8d91abd40dee7f7bd739a678a502a6e34cb59 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Tue Feb 27 13:06:31 2018 +0200 tdf#115432 footnote separator position remain in the left side regression from commit 7e9857c2935bb2533806db4e71c6cd1e171c3478 "templatize SvXMLEnumMapEntry" Change-Id: Id29e7c07be637adcdc7fe624a1673beca9829d4d Reviewed-on: https://gerrit.libreoffice.org/50420 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx index fbe12b66844e..522a9bc8610e 100644 --- a/sw/source/core/unocore/unomap1.cxx +++ b/sw/source/core/unocore/unomap1.cxx @@ -58,6 +58,7 @@ #include <com/sun/star/table/TableBorder2.hpp> #include <com/sun/star/table/TableBorderDistances.hpp> #include <com/sun/star/table/XCell.hpp> +#include <com/sun/star/text/HorizontalAdjust.hpp> #include <com/sun/star/text/GraphicCrop.hpp> #include <com/sun/star/text/PageNumberType.hpp> #include <com/sun/star/text/SectionFileLink.hpp> @@ -583,7 +584,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPageStylePropertyMa { OUString(UNO_NAME_FOOTNOTE_LINE_COLOR), FN_PARAM_FTN_INFO, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE , MID_LINE_COLOR}, { OUString(UNO_NAME_FOOTNOTE_LINE_STYLE), FN_PARAM_FTN_INFO, cppu::UnoType<sal_Int8>::get(), PROPERTY_NONE , MID_FTN_LINE_STYLE}, { OUString(UNO_NAME_FOOTNOTE_LINE_RELATIVE_WIDTH), FN_PARAM_FTN_INFO, cppu::UnoType<sal_Int8>::get(), PROPERTY_NONE , MID_LINE_RELWIDTH }, - { OUString(UNO_NAME_FOOTNOTE_LINE_ADJUST), FN_PARAM_FTN_INFO, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE , MID_LINE_ADJUST }, + { OUString(UNO_NAME_FOOTNOTE_LINE_ADJUST), FN_PARAM_FTN_INFO, cppu::UnoType<css::text::HorizontalAdjust>::get(), PROPERTY_NONE , MID_LINE_ADJUST }, { OUString(UNO_NAME_FOOTNOTE_LINE_TEXT_DISTANCE), FN_PARAM_FTN_INFO, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE , MID_LINE_TEXT_DIST |CONVERT_TWIPS }, { OUString(UNO_NAME_FOOTNOTE_LINE_DISTANCE), FN_PARAM_FTN_INFO, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE , MID_LINE_FOOTNOTE_DIST|CONVERT_TWIPS}, { OUString(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, diff --git a/sw/source/uibase/utlui/uiitems.cxx b/sw/source/uibase/utlui/uiitems.cxx index 8b3f02a74b8a..eb1d80be738f 100644 --- a/sw/source/uibase/utlui/uiitems.cxx +++ b/sw/source/uibase/utlui/uiitems.cxx @@ -18,6 +18,7 @@ */ #include <editeng/itemtype.hxx> +#include <o3tl/any.hxx> #include <unosett.hxx> #include <swtypes.hxx> @@ -86,7 +87,7 @@ bool SwPageFootnoteInfoItem::QueryValue( Any& rVal, sal_uInt8 nMemberId ) const rVal <<= static_cast<sal_Int8>(static_cast<long>(aTmp)); } break; - case MID_LINE_ADJUST : rVal <<= static_cast<sal_Int16>(aFootnoteInfo.GetAdj());break;//text::HorizontalAdjust + case MID_LINE_ADJUST : rVal <<= aFootnoteInfo.GetAdj();break;//text::HorizontalAdjust case MID_LINE_TEXT_DIST : rVal <<= static_cast<sal_Int32>(convertTwipToMm100(aFootnoteInfo.GetTopDist()));break; case MID_LINE_FOOTNOTE_DIST: rVal <<= static_cast<sal_Int32>(convertTwipToMm100(aFootnoteInfo.GetBottomDist()));break; case MID_FTN_LINE_STYLE : @@ -156,12 +157,8 @@ bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId) break; case MID_LINE_ADJUST : { - sal_Int16 nSet = 0; - rVal >>= nSet; - if(nSet >= 0 && nSet < 3) //text::HorizontalAdjust - aFootnoteInfo.SetAdj(static_cast<css::text::HorizontalAdjust>(nSet)); - else - bRet = false; + text::HorizontalAdjust nSet = *o3tl::forceAccess<text::HorizontalAdjust>(rVal); + aFootnoteInfo.SetAdj(nSet); } break; case MID_FTN_LINE_STYLE: diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx index 5446398e5e72..edf57dd3a6bd 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx @@ -31,6 +31,7 @@ #include <xmloff/PageMasterStyleMap.hxx> #include <com/sun/star/text/HorizontalAdjust.hpp> #include <rtl/ustrbuf.hxx> +#include <o3tl/any.hxx> using namespace ::com::sun::star; @@ -75,7 +76,7 @@ void XMLFootnoteSeparatorExport::exportXML( switch (rMapper->GetEntryContextId(rState.mnIndex)) { case CTF_PM_FTN_LINE_ADJUST: - rState.maValue >>= eLineAdjust; + eLineAdjust = *o3tl::forceAccess<text::HorizontalAdjust>(rState.maValue); break; case CTF_PM_FTN_LINE_COLOR: rState.maValue >>= nLineColor; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits