summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-06 14:16:48 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-07 07:07:02 +0100
commit2407c183092d6559771738891d57d6375c4212ab (patch)
tree877797d2c711450ee99e4b1fc361af48eb0d2475 /sw/source
parente092c72b44d99ea5c6c7f71cd717b20a4a86f5ac (diff)
Revert "tdf#115432 footnote separator position remain in the left side"
This reverts commit d4a8d91abd40dee7f7bd739a678a502a6e34cb59. because it changes the type of an UNO property defined in a published IDL file Change-Id: I4d3db3532b27552a30f34fcd4201856565eb0a3b Reviewed-on: https://gerrit.libreoffice.org/50825 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unomap1.cxx3
-rw-r--r--sw/source/uibase/utlui/uiitems.cxx11
2 files changed, 8 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx
index 522a9bc8610e..fbe12b66844e 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -58,7 +58,6 @@
#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>
@@ -584,7 +583,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<css::text::HorizontalAdjust>::get(), PROPERTY_NONE , MID_LINE_ADJUST },
+ { 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_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 eb1d80be738f..8b3f02a74b8a 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -18,7 +18,6 @@
*/
#include <editeng/itemtype.hxx>
-#include <o3tl/any.hxx>
#include <unosett.hxx>
#include <swtypes.hxx>
@@ -87,7 +86,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 <<= aFootnoteInfo.GetAdj();break;//text::HorizontalAdjust
+ case MID_LINE_ADJUST : rVal <<= static_cast<sal_Int16>(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 :
@@ -157,8 +156,12 @@ bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, sal_uInt8 nMemberId)
break;
case MID_LINE_ADJUST :
{
- text::HorizontalAdjust nSet = *o3tl::forceAccess<text::HorizontalAdjust>(rVal);
- aFootnoteInfo.SetAdj(nSet);
+ sal_Int16 nSet = 0;
+ rVal >>= nSet;
+ if(nSet >= 0 && nSet < 3) //text::HorizontalAdjust
+ aFootnoteInfo.SetAdj(static_cast<css::text::HorizontalAdjust>(nSet));
+ else
+ bRet = false;
}
break;
case MID_FTN_LINE_STYLE: