Kaydet (Commit) 185a7a18 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

use UnoGraphic directly in GetXGraphic, move hxx to inc/graphic

Change-Id: I6f170709255f396e82591572efef399fa438dc0e
Reviewed-on: https://gerrit.libreoffice.org/52145Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst 940f90f3
......@@ -17575,6 +17575,9 @@ vcl/inc/fontattributes.hxx
vcl/inc/fontinstance.hxx
vcl/inc/fontselect.hxx
vcl/inc/fontsubset.hxx
vcl/inc/graphic/UnoGraphic.hxx
vcl/inc/graphic/UnoGraphicDescriptor.hxx
vcl/inc/graphic/UnoGraphicTransformer.hxx
vcl/inc/headless/svpbmp.hxx
vcl/inc/headless/svpcairotextrender.hxx
vcl/inc/headless/svpdummies.hxx
......@@ -18207,13 +18210,10 @@ vcl/source/gdi/wall.cxx
vcl/source/graphic/GraphicObject.cxx
vcl/source/graphic/GraphicObject2.cxx
vcl/source/graphic/UnoGraphic.cxx
vcl/source/graphic/UnoGraphic.hxx
vcl/source/graphic/UnoGraphicDescriptor.cxx
vcl/source/graphic/UnoGraphicDescriptor.hxx
vcl/source/graphic/UnoGraphicObject.cxx
vcl/source/graphic/UnoGraphicProvider.cxx
vcl/source/graphic/UnoGraphicTransformer.cxx
vcl/source/graphic/UnoGraphicTransformer.hxx
vcl/source/graphic/grfattr.cxx
vcl/source/graphic/grfcache.cxx
vcl/source/graphic/grfcache.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>
......
......@@ -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
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment