diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-02-21 20:15:21 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-02-25 08:09:56 +0100 |
commit | 4256ffa959f994f0964f7391fad70df8a9c884f0 (patch) | |
tree | bf4bf55fa48f0e6af3093edf43d82c13a7f56615 /editeng | |
parent | 99223fc736c55cc1eb319ae1576b3998771e6b6f (diff) |
fix import of graphic bullets
When changing to use "GraphicBitmap" property instead of
"ImageURL", the import wasn't adapted and there was no test which
would warn of such an situation. This also changes the difference
between writer and impress where impress used "Graphic" and not
"GraphicBitmap" property.
Also adds missing tests for both writer and impress
Change-Id: Ieed629d2d37f7806d63e729b6ef23cd848593071
Reviewed-on: https://gerrit.libreoffice.org/50140
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/uno/unonrule.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index 50fcd053ebcd..a682132c5b01 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -22,6 +22,7 @@ #include <com/sun/star/lang/IndexOutOfBoundsException.hpp> #include <com/sun/star/text/HoriOrientation.hpp> #include <com/sun/star/awt/XBitmap.hpp> +#include <com/sun/star/graphic/XGraphic.hpp> #include <cppuhelper/supportsservice.hxx> #include <vcl/svapp.hxx> #include <vcl/graph.hxx> @@ -225,7 +226,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal pGraphic = pBrush->GetGraphic(); if (pGraphic) { - uno::Reference<awt::XBitmap> xBitmap = VCLUnoHelper::CreateBitmap(pGraphic->GetBitmapEx()); + uno::Reference<awt::XBitmap> xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY); aVal <<= xBitmap; const beans::PropertyValue aGraphicProp("GraphicBitmap", -1, aVal, beans::PropertyState_DIRECT_VALUE); @@ -352,13 +353,14 @@ void SvxUnoNumberingRules::setNumberingRuleByIndex(const Sequence<beans::Propert continue; } } - else if ( rPropName == "Graphic" ) + else if ( rPropName == "GraphicBitmap" ) { - Reference< awt::XBitmap > xBmp; - if( aVal >>= xBmp ) + uno::Reference<awt::XBitmap> xBitmap; + if(aVal >>= xBitmap) { - Graphic aGraf( VCLUnoHelper::GetBitmap( xBmp ) ); - SvxBrushItem aBrushItem(aGraf, GPOS_AREA, SID_ATTR_BRUSH); + uno::Reference<graphic::XGraphic> xGraphic(xBitmap, uno::UNO_QUERY); + Graphic aGraphic(xGraphic); + SvxBrushItem aBrushItem(aGraphic, GPOS_AREA, SID_ATTR_BRUSH); aFmt.SetGraphicBrush( &aBrushItem ); continue; } |