From 84f30b34bf63dba8d5b478edac684bee5a841100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= Date: Thu, 17 May 2018 20:17:53 +0900 Subject: [PATCH] [API-CHANGE] change to GraphicBitmap prop. for NumberingLevel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To make it consistent, change "Graphic" property (added during image handling rework) to "GraphicBitmap" in style::NumberingLevel, which is already used in text::NumberingLevel. Both of them are accessors for the graphic of bitmap bullets. Change-Id: I70f7bccd80fa9949778c49e23de583c6fb32a796 Reviewed-on: https://gerrit.libreoffice.org/54492 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- offapi/com/sun/star/style/NumberingLevel.idl | 8 ++++---- sw/qa/extras/ooxmlexport/ooxmlexport2.cxx | 8 ++++---- sw/qa/extras/rtfexport/rtfexport.cxx | 9 +++++---- sw/source/core/unocore/unosett.cxx | 3 --- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/offapi/com/sun/star/style/NumberingLevel.idl b/offapi/com/sun/star/style/NumberingLevel.idl index c7e700cc63d1..eb3cb92add03 100644 --- a/offapi/com/sun/star/style/NumberingLevel.idl +++ b/offapi/com/sun/star/style/NumberingLevel.idl @@ -67,8 +67,8 @@ published service NumberingLevel Note the new behaviour since it this was deprecated: This property can only be set and only external URLs are supported (no more vnd.sun.star.GraphicObject scheme). When an - URL is set, then it will load the graphic and set the Graphic - property. + URL is set, then it will load the graphic and set the + GraphicBitmap property. */ [property] string GraphicURL; @@ -76,11 +76,11 @@ published service NumberingLevel */ [property] short StartWith; - /** This is the graphic file to use as a symbol. + /** This is the graphic bitmap to use as a symbol. @since LibreOffice 6.1 */ - [optional, property] com::sun::star::graphic::XGraphic Graphic; + [optional, property] com::sun::star::awt::XBitmap GraphicBitmap; }; diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx index a4b4bfec4b9a..95218dae815f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx @@ -603,7 +603,7 @@ DECLARE_OOXMLEXPORT_TEST(testI120928, "i120928.docx") uno::Sequence aProps; xLevels->getByIndex(0) >>= aProps; // 1st level - uno::Reference xGraphic; + uno::Reference xBitmap; sal_Int16 nNumberingType = -1; for (int i = 0; i < aProps.getLength(); ++i) @@ -612,11 +612,11 @@ DECLARE_OOXMLEXPORT_TEST(testI120928, "i120928.docx") if (rProp.Name == "NumberingType") nNumberingType = rProp.Value.get(); - else if (rProp.Name == "Graphic") - xGraphic = rProp.Value.get>(); + else if (rProp.Name == "GraphicBitmap") + xBitmap = rProp.Value.get>(); } CPPUNIT_ASSERT_EQUAL(style::NumberingType::BITMAP, nNumberingType); - CPPUNIT_ASSERT(xGraphic.is()); + CPPUNIT_ASSERT(xBitmap.is()); } DECLARE_OOXMLEXPORT_TEST(testFdo64826, "fdo64826.docx") diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 5f1b96b01ebb..c69529438e30 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -552,7 +553,7 @@ DECLARE_RTFEXPORT_TEST(testI120928, "i120928.rtf") uno::Sequence aProps; xLevels->getByIndex(0) >>= aProps; // 1st level - uno::Reference xGraphic; + uno::Reference xBitmap; sal_Int16 nNumberingType = -1; for (int i = 0; i < aProps.getLength(); ++i) @@ -561,11 +562,11 @@ DECLARE_RTFEXPORT_TEST(testI120928, "i120928.rtf") if (rProp.Name == "NumberingType") nNumberingType = rProp.Value.get(); - else if (rProp.Name == "Graphic") - xGraphic = rProp.Value.get>(); + else if (rProp.Name == "GraphicBitmap") + xBitmap = rProp.Value.get>(); } CPPUNIT_ASSERT_EQUAL(style::NumberingType::BITMAP, nNumberingType); - CPPUNIT_ASSERT(xGraphic.is()); + CPPUNIT_ASSERT(xBitmap.is()); } DECLARE_RTFEXPORT_TEST(testBookmark, "bookmark.rtf") diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx index c0894cef4ccc..e27cc31c0780 100644 --- a/sw/source/core/unocore/unosett.cxx +++ b/sw/source/core/unocore/unosett.cxx @@ -1431,9 +1431,6 @@ uno::Sequence SwXNumberingRules::GetPropertiesForNumFormat const Graphic* pGraphic = pBrush ? pBrush->GetGraphic() : nullptr; if (pGraphic) { - uno::Reference xGraphic(pGraphic->GetXGraphic()); - //GraphicURL - aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC, xGraphic)); //GraphicBitmap uno::Reference xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY); aPropertyValues.push_back(comphelper::makePropertyValue(UNO_NAME_GRAPHIC_BITMAP, xBitmap));