include/editeng/unoprnms.hxx | 1 include/svx/unoshprp.hxx | 1 svx/source/xoutdev/xattrbmp.cxx | 34 ++++------------------------ sw/inc/unoprnms.hxx | 1 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 3 +- sw/source/core/unocore/unomapproperties.hxx | 1 6 files changed, 7 insertions(+), 34 deletions(-)
New commits: commit c8b1432e8fd2c6a7d3d0039816884f33dafb97cb Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> Date: Thu Feb 22 07:10:02 2018 +0900 remove "FillBitmapURL" property Change-Id: Icac13a412ae16e4b367362ca85a37fa29802c68b Reviewed-on: https://gerrit.libreoffice.org/50169 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx index 6c98921dddaf..42292c38b2dd 100644 --- a/include/editeng/unoprnms.hxx +++ b/include/editeng/unoprnms.hxx @@ -36,7 +36,6 @@ #define UNO_NAME_FILLHATCHNAME "FillHatchName" #define UNO_NAME_FILLBITMAP "FillBitmap" #define UNO_NAME_FILLBITMAPNAME "FillBitmapName" -#define UNO_NAME_FILLBITMAPURL "FillBitmapURL" #define UNO_NAME_FILLGRADIENTSTEPCOUNT "FillGradientStepCount" #define UNO_NAME_FILLBACKGROUND "FillBackground" #define UNO_NAME_FILLCOLOR_2 "FillColor2" diff --git a/include/svx/unoshprp.hxx b/include/svx/unoshprp.hxx index 9fea5f41ab73..73217bffb40c 100644 --- a/include/svx/unoshprp.hxx +++ b/include/svx/unoshprp.hxx @@ -259,7 +259,6 @@ { OUString(UNO_NAME_FILLBACKGROUND), XATTR_FILLBACKGROUND , cppu::UnoType<bool>::get(), 0, 0}, \ { OUString(UNO_NAME_FILLBITMAP), XATTR_FILLBITMAP , cppu::UnoType<css::awt::XBitmap>::get() , 0, MID_BITMAP}, \ { OUString(UNO_NAME_FILLBITMAPNAME), XATTR_FILLBITMAP , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \ - { OUString(UNO_NAME_FILLBITMAPURL), XATTR_FILLBITMAP , ::cppu::UnoType<OUString>::get(), 0, MID_GRAFURL }, \ { OUString(UNO_NAME_FILLGRADIENTSTEPCOUNT), XATTR_GRADIENTSTEPCOUNT , ::cppu::UnoType<sal_Int16>::get(), 0, 0}, \ { OUString(UNO_NAME_FILLGRADIENT), XATTR_FILLGRADIENT , ::cppu::UnoType<css::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \ { OUString(UNO_NAME_FILLGRADIENTNAME), XATTR_FILLGRADIENT , ::cppu::UnoType<OUString>::get(), 0, MID_NAME }, \ diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 8e28d1ab2646..fa318829e613 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -252,7 +252,6 @@ bool XFillBitmapItem::QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId) const // needed for complete item (MID 0) OUString aInternalName; - OUString aURL; css::uno::Reference< css::awt::XBitmap > xBmp; if( nMemberId == MID_NAME ) @@ -264,23 +263,14 @@ bool XFillBitmapItem::QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId) const aInternalName = GetName(); } - if (nMemberId == MID_GRAFURL) - { - aURL = UNO_NAME_GRAPHOBJ_URLPREFIX; - aURL += OStringToOUString( - GetGraphicObject().GetUniqueID(), - RTL_TEXTENCODING_ASCII_US); - } if( nMemberId == MID_BITMAP || nMemberId == 0 ) { - xBmp.set(VCLUnoHelper::CreateBitmap(GetGraphicObject().GetGraphic().GetBitmapEx())); + xBmp.set(GetGraphicObject().GetGraphic().GetXGraphic(), uno::UNO_QUERY); } if( nMemberId == MID_NAME ) rVal <<= aApiName; - else if( nMemberId == MID_GRAFURL ) - rVal <<= aURL; else if( nMemberId == MID_BITMAP ) rVal <<= xBmp; else @@ -305,12 +295,10 @@ bool XFillBitmapItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) nMemberId &= ~CONVERT_TWIPS; OUString aName; - OUString aURL; css::uno::Reference< css::awt::XBitmap > xBmp; css::uno::Reference< css::graphic::XGraphic > xGraphic; bool bSetName = false; - bool bSetURL = false; bool bSetBitmap = false; if( nMemberId == MID_NAME ) @@ -341,31 +329,19 @@ bool XFillBitmapItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) { SetName( aName ); } - if( bSetURL ) - { - GraphicObject aGraphicObject = GraphicObject::CreateGraphicObjectFromURL(aURL); - if( aGraphicObject.GetType() != GraphicType::NONE ) - maGraphicObject = aGraphicObject; - - // #121194# Prefer GraphicObject over bitmap object if both are provided - if(bSetBitmap && GraphicType::NONE != maGraphicObject.GetType()) - { - bSetBitmap = false; - } - } if( bSetBitmap ) { - if(xBmp.is()) + if (xBmp.is()) { - maGraphicObject.SetGraphic(VCLUnoHelper::GetBitmap(xBmp)); + xGraphic.set(xBmp, uno::UNO_QUERY); } - else if(xGraphic.is()) + if (xGraphic.is()) { maGraphicObject.SetGraphic(xGraphic); } } - return (bSetName || bSetURL || bSetBitmap); + return (bSetName || bSetBitmap); } bool XFillBitmapItem::CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 ) diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index b603a7a6be8c..f2bc9422a94a 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -608,7 +608,6 @@ #define UNO_NAME_SW_FILLBACKGROUND UNO_NAME_FILLBACKGROUND #define UNO_NAME_SW_FILLBITMAP UNO_NAME_FILLBITMAP #define UNO_NAME_SW_FILLBITMAPNAME UNO_NAME_FILLBITMAPNAME -#define UNO_NAME_SW_FILLBITMAPURL UNO_NAME_FILLBITMAPURL #define UNO_NAME_SW_FILLGRADIENTSTEPCOUNT UNO_NAME_FILLGRADIENTSTEPCOUNT #define UNO_NAME_SW_FILLGRADIENT UNO_NAME_FILLGRADIENT #define UNO_NAME_SW_FILLGRADIENTNAME UNO_NAME_FILLGRADIENTNAME diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 8e3dc06c708e..3838641f25ac 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -177,7 +177,8 @@ DECLARE_OOXMLEXPORT_TEST(testTextBoxPictureFill, "textbox_picturefill.docx") { uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY); CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xFrame, "FillStyle")); - CPPUNIT_ASSERT(!(getProperty<OUString>(xFrame,"FillBitmapURL")).isEmpty()); + auto xBitmap = getProperty<uno::Reference<awt::XBitmap>>(xFrame,"FillBitmap"); + CPPUNIT_ASSERT(xBitmap.is()); } DECLARE_OOXMLEXPORT_TEST(testFDO73034, "FDO73034.docx") diff --git a/sw/source/core/unocore/unomapproperties.hxx b/sw/source/core/unocore/unomapproperties.hxx index 0cb31ccf5faf..00f58f37577e 100644 --- a/sw/source/core/unocore/unomapproperties.hxx +++ b/sw/source/core/unocore/unomapproperties.hxx @@ -501,7 +501,6 @@ { OUString(UNO_NAME_SW_FILLBACKGROUND), XATTR_FILLBACKGROUND, cppu::UnoType<bool>::get(), 0, 0}, \ { OUString(UNO_NAME_SW_FILLBITMAP), XATTR_FILLBITMAP, cppu::UnoType<css::awt::XBitmap>::get(), 0, MID_BITMAP}, \ { OUString(UNO_NAME_SW_FILLBITMAPNAME), XATTR_FILLBITMAP, cppu::UnoType<OUString>::get(), 0, MID_NAME }, \ - { OUString(UNO_NAME_SW_FILLBITMAPURL), XATTR_FILLBITMAP, cppu::UnoType<OUString>::get(), 0, MID_GRAFURL }, \ { OUString(UNO_NAME_SW_FILLGRADIENTSTEPCOUNT), XATTR_GRADIENTSTEPCOUNT, cppu::UnoType<sal_Int16>::get(), 0, 0}, \ { OUString(UNO_NAME_SW_FILLGRADIENT), XATTR_FILLGRADIENT, cppu::UnoType<css::awt::Gradient>::get(), 0, MID_FILLGRADIENT}, \ { OUString(UNO_NAME_SW_FILLGRADIENTNAME), XATTR_FILLGRADIENT, cppu::UnoType<OUString>::get(), 0, MID_NAME }, \ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits