diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2018-03-18 08:22:51 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2018-03-31 05:12:52 +0200 |
commit | 185a7a1868f8bc46924e03b77bc36361c3af8919 (patch) | |
tree | 217b25c919588dfb1d132a350526a74607f17d52 /vcl | |
parent | 940f90f3da170b62379e9d1d33d4e6d690997026 (diff) |
use UnoGraphic directly in GetXGraphic, move hxx to inc/graphic
Change-Id: I6f170709255f396e82591572efef399fa438dc0e
Reviewed-on: https://gerrit.libreoffice.org/52145
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/graphic/UnoGraphic.hxx (renamed from vcl/source/graphic/UnoGraphic.hxx) | 4 | ||||
-rw-r--r-- | vcl/inc/graphic/UnoGraphicDescriptor.hxx (renamed from vcl/source/graphic/UnoGraphicDescriptor.hxx) | 0 | ||||
-rw-r--r-- | vcl/inc/graphic/UnoGraphicTransformer.hxx (renamed from vcl/source/graphic/UnoGraphicTransformer.hxx) | 0 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 22 | ||||
-rw-r--r-- | vcl/source/graphic/UnoGraphic.cxx | 3 | ||||
-rw-r--r-- | vcl/source/graphic/UnoGraphicDescriptor.cxx | 2 | ||||
-rw-r--r-- | vcl/source/graphic/UnoGraphicProvider.cxx | 4 | ||||
-rw-r--r-- | vcl/source/graphic/UnoGraphicTransformer.cxx | 4 |
8 files changed, 17 insertions, 22 deletions
diff --git a/vcl/source/graphic/UnoGraphic.hxx b/vcl/inc/graphic/UnoGraphic.hxx index f987d902eace..e0ec65d83a31 100644 --- a/vcl/source/graphic/UnoGraphic.hxx +++ b/vcl/inc/graphic/UnoGraphic.hxx @@ -25,8 +25,8 @@ #include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/awt/XBitmap.hpp> -#include "UnoGraphicDescriptor.hxx" -#include "UnoGraphicTransformer.hxx" +#include <graphic/UnoGraphicDescriptor.hxx> +#include <graphic/UnoGraphicTransformer.hxx> #include <vcl/graph.hxx> diff --git a/vcl/source/graphic/UnoGraphicDescriptor.hxx b/vcl/inc/graphic/UnoGraphicDescriptor.hxx index f163a5023c2a..f163a5023c2a 100644 --- a/vcl/source/graphic/UnoGraphicDescriptor.hxx +++ b/vcl/inc/graphic/UnoGraphicDescriptor.hxx diff --git a/vcl/source/graphic/UnoGraphicTransformer.hxx b/vcl/inc/graphic/UnoGraphicTransformer.hxx index 7814c3707597..7814c3707597 100644 --- a/vcl/source/graphic/UnoGraphicTransformer.hxx +++ b/vcl/inc/graphic/UnoGraphicTransformer.hxx diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 1b753414b60e..6d9d972efc55 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/graphic/XGraphic.hpp> #include <cppuhelper/typeprovider.hxx> +#include <graphic/UnoGraphic.hxx> using namespace ::com::sun::star; @@ -360,25 +361,18 @@ const BitmapEx& Graphic::GetBitmapExRef() const return mxImpGraphic->ImplGetBitmapExRef(); } -uno::Reference< graphic::XGraphic > Graphic::GetXGraphic() const +uno::Reference<graphic::XGraphic> Graphic::GetXGraphic() const { - uno::Reference< graphic::XGraphic > xRet; + uno::Reference<graphic::XGraphic> xGraphic; - if( GetType() != GraphicType::NONE ) + if (GetType() != GraphicType::NONE) { - uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - uno::Reference< graphic::XGraphicProvider > xProv( graphic::GraphicProvider::create( xContext ) ); - - uno::Sequence< beans::PropertyValue > aLoadProps( 1 ); - OUString aURL = "private:memorygraphic/" + OUString::number( reinterpret_cast< sal_Int64 >( this ) ); - - aLoadProps[ 0 ].Name = "URL"; - aLoadProps[ 0 ].Value <<= aURL; - - xRet = xProv->queryGraphic( aLoadProps ); + unographic::Graphic* pUnoGraphic = new unographic::Graphic; + pUnoGraphic->init(*this); + xGraphic = pUnoGraphic; } - return xRet; + return xGraphic; } Size Graphic::GetPrefSize() const diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index 5821a254da92..bc09e40d045d 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -17,11 +17,12 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <graphic/UnoGraphic.hxx> + #include <vcl/svapp.hxx> #include <com/sun/star/graphic/GraphicType.hpp> #include <com/sun/star/graphic/XGraphicTransformer.hpp> #include <vcl/dibtools.hxx> -#include "UnoGraphic.hxx" #include <comphelper/servicehelper.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/queryinterface.hxx> diff --git a/vcl/source/graphic/UnoGraphicDescriptor.cxx b/vcl/source/graphic/UnoGraphicDescriptor.cxx index cdc54568d387..d8281f13732d 100644 --- a/vcl/source/graphic/UnoGraphicDescriptor.cxx +++ b/vcl/source/graphic/UnoGraphicDescriptor.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "UnoGraphicDescriptor.hxx" +#include <graphic/UnoGraphicDescriptor.hxx> #include <unotools/ucbstreamhelper.hxx> #include <vcl/graphicfilter.hxx> diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index abb85ac6aac0..dd51f7533728 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -41,8 +41,8 @@ #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> -#include "UnoGraphicDescriptor.hxx" -#include "UnoGraphic.hxx" +#include <graphic/UnoGraphicDescriptor.hxx> +#include <graphic/UnoGraphic.hxx> #include <rtl/ref.hxx> #include <vcl/GraphicObject.hxx> #include <vcl/dibtools.hxx> diff --git a/vcl/source/graphic/UnoGraphicTransformer.cxx b/vcl/source/graphic/UnoGraphicTransformer.cxx index c69e17258fe0..05a1f436247b 100644 --- a/vcl/source/graphic/UnoGraphicTransformer.cxx +++ b/vcl/source/graphic/UnoGraphicTransformer.cxx @@ -18,6 +18,8 @@ */ +#include <graphic/UnoGraphicTransformer.hxx> + #include <vcl/svapp.hxx> #include <vcl/image.hxx> #include <vcl/metaact.hxx> @@ -27,8 +29,6 @@ #include <vcl/bitmapaccess.hxx> #include <com/sun/star/text/GraphicCrop.hpp> -#include "UnoGraphicTransformer.hxx" - using namespace com::sun::star; namespace unographic { |