graphic.cxx (5900e8ec) | graphic.cxx (45fd3b9a) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 5 unchanged lines hidden (view full) --- 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 5 unchanged lines hidden (view full) --- 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 |
22 23 | |
24// MARKER(update_precomp.py): autogen include statement, do not remove 25#include "precompiled_svtools.hxx" 26 27#include <rtl/uuid.h> 28#include <vos/mutex.hxx> 29#include <vcl/svapp.hxx> 30#include <com/sun/star/graphic/GraphicType.hpp> 31#include <com/sun/star/graphic/XGraphicTransformer.hpp> 32#include <vcl/graph.hxx> 33#include "graphic.hxx" | 22// MARKER(update_precomp.py): autogen include statement, do not remove 23#include "precompiled_svtools.hxx" 24 25#include <rtl/uuid.h> 26#include <vos/mutex.hxx> 27#include <vcl/svapp.hxx> 28#include <com/sun/star/graphic/GraphicType.hpp> 29#include <com/sun/star/graphic/XGraphicTransformer.hpp> 30#include <vcl/graph.hxx> 31#include "graphic.hxx" |
32#include <vcl/dibtools.hxx> |
|
34 35using namespace com::sun::star; 36 37namespace unographic { 38 39// ------------------- 40// - GraphicProvider - 41// ------------------- --- 202 unchanged lines hidden (view full) --- 244 245uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getDIB( ) throw (uno::RuntimeException) 246{ 247 ::vos::OGuard aGuard( Application::GetSolarMutex() ); 248 249 if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) 250 { 251 SvMemoryStream aMem; | 33 34using namespace com::sun::star; 35 36namespace unographic { 37 38// ------------------- 39// - GraphicProvider - 40// ------------------- --- 202 unchanged lines hidden (view full) --- 243 244uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getDIB( ) throw (uno::RuntimeException) 245{ 246 ::vos::OGuard aGuard( Application::GetSolarMutex() ); 247 248 if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) 249 { 250 SvMemoryStream aMem; |
252 aMem << mpGraphic->GetBitmapEx().GetBitmap(); | 251 252 WriteDIB(mpGraphic->GetBitmapEx().GetBitmap(), aMem, false, true); |
253 return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() ); 254 } 255 else 256 { 257 return uno::Sequence<sal_Int8>(); 258 } 259} 260 261//---------------------------------------------------------------------- 262 263uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getMaskDIB( ) throw (uno::RuntimeException) 264{ 265 ::vos::OGuard aGuard( Application::GetSolarMutex() ); 266 267 if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) 268 { 269 SvMemoryStream aMem; | 253 return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() ); 254 } 255 else 256 { 257 return uno::Sequence<sal_Int8>(); 258 } 259} 260 261//---------------------------------------------------------------------- 262 263uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getMaskDIB( ) throw (uno::RuntimeException) 264{ 265 ::vos::OGuard aGuard( Application::GetSolarMutex() ); 266 267 if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) 268 { 269 SvMemoryStream aMem; |
270 aMem << mpGraphic->GetBitmapEx().GetMask(); | 270 271 WriteDIB(mpGraphic->GetBitmapEx().GetMask(), aMem, false, true); |
271 return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() ); 272 } 273 else 274 { 275 return uno::Sequence<sal_Int8>(); 276 } 277} 278 --- 18 unchanged lines hidden --- | 272 return ::com::sun::star::uno::Sequence<sal_Int8>( (sal_Int8*) aMem.GetData(), aMem.Tell() ); 273 } 274 else 275 { 276 return uno::Sequence<sal_Int8>(); 277 } 278} 279 --- 18 unchanged lines hidden --- |