diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-03-01 06:33:30 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-03-07 02:37:10 +0100 |
commit | 6b39ed0eaffabb6ffe11496d833053c094c72f7b (patch) | |
tree | 4c9b283409c66b6490ab2d8c577701c85710a6a5 /sw/source | |
parent | f480bda7a8ddc40da300d0faebda159cd94ac052 (diff) |
MID_GRAPHIC as alternative to set graphic to the SvxBrushItem
Change-Id: I6e17d1a34f0bd17a0eafd7c741162f23279e9d1a
Reviewed-on: https://gerrit.libreoffice.org/50539
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/unocore/swunohelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index 354ff65703a5..9d2040e87d55 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -313,6 +313,8 @@ bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, { case MID_GRAPHIC_URL: return SfxItemState::SET == rSet.GetItemState(XATTR_FILLBITMAP); + case MID_GRAPHIC: + return SfxItemState::SET == rSet.GetItemState(XATTR_FILLBITMAP); case MID_GRAPHIC_POSITION: return SfxItemState::SET == rSet.GetItemState(XATTR_FILLBMP_STRETCH) || SfxItemState::SET == rSet.GetItemState(XATTR_FILLBMP_TILE) diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index f93ed469dd21..bb2f794d7a3e 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -212,12 +212,14 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI const ::uno::Any* pTrans = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENT, pTrans ); const ::uno::Any* pGrLoc = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_POSITION, pGrLoc ); const ::uno::Any* pGrURL = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_URL, pGrURL ); + const ::uno::Any* pGraphic = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC, pGraphic ); const ::uno::Any* pGrFilter = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_FILTER, pGrFilter ); const ::uno::Any* pGrTranparency = nullptr; GetProperty(RES_BACKGROUND, MID_GRAPHIC_TRANSPARENCY, pGrTranparency ); const bool bSvxBrushItemPropertiesUsed( pCol || pTrans || pGrURL || + pGraphic || pGrFilter || pGrLoc || pGrTranparency || @@ -264,7 +266,7 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI // but there is a GraphicURL const bool bFillStyleUsed(pXFillStyleItem && pXFillStyleItem->hasValue() && (pXFillStyleItem->get<drawing::FillStyle>() != drawing::FillStyle_SOLID - || !pGrURL)); + || !pGrURL || !pGraphic)); SAL_INFO_IF(pXFillStyleItem && pXFillStyleItem->hasValue() && !bFillStyleUsed, "sw.uno", "FillBaseProperties: ignoring invalid FillStyle"); const bool bXFillStyleItemUsed( @@ -329,6 +331,11 @@ bool BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI bRet &= static_cast<SfxPoolItem&>(aBrush).PutValue(*pGrURL, MID_GRAPHIC_URL); } + if (pGraphic) + { + bRet &= static_cast<SfxPoolItem&>(aBrush).PutValue(*pGraphic, MID_GRAPHIC); + } + if(pGrFilter) { bRet &= static_cast<SfxPoolItem&>(aBrush).PutValue(*pGrFilter, MID_GRAPHIC_FILTER); diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 73217063f9e4..ea14bc88228c 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1839,6 +1839,7 @@ void SwTableProperties_Impl::ApplyTableAttr(const SwTable& rTable, SwDoc& rDoc) MID_GRAPHIC_TRANSPARENT, MID_GRAPHIC_POSITION, MID_GRAPHIC_URL, + MID_GRAPHIC, MID_GRAPHIC_FILTER }); bool bPutBreak = true; |