unoshap4.cxx (02563ba0) unoshap4.cxx (cb0a2370)
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

--- 280 unchanged lines hidden (view full) ---

289 {
290 bIsWMF = sal_True;
291 uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize());
292 rValue <<= aSeq;
293 }
294 }
295 if ( !bIsWMF )
296 {
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

--- 280 unchanged lines hidden (view full) ---

289 {
290 bIsWMF = sal_True;
291 uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize());
292 rValue <<= aSeq;
293 }
294 }
295 if ( !bIsWMF )
296 {
297 GDIMetaFile aMtf;
298 if ( pGraphic->GetType() != GRAPHIC_BITMAP )
299 aMtf = pObj->GetGraphic()->GetGDIMetaFile();
300 else
301 {
302 VirtualDevice aVirDev;
303 aMtf.Record( &aVirDev );
304 pGraphic->Draw( &aVirDev, Point(), pGraphic->GetPrefSize() );
305 aMtf.Stop();
306 aMtf.SetPrefSize( pGraphic->GetPrefSize() );
307 aMtf.SetPrefMapMode( pGraphic->GetPrefMapMode() );
308 }
297 // #119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
298 GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile());
309 SvMemoryStream aDestStrm( 65535, 65535 );
310 ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
311 const uno::Sequence<sal_Int8> aSeq(
312 static_cast< const sal_Int8* >(aDestStrm.GetData()),
313 aDestStrm.GetEndOfData());
314 rValue <<= aSeq;
315 }
316 }

--- 676 unchanged lines hidden ---
299 SvMemoryStream aDestStrm( 65535, 65535 );
300 ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
301 const uno::Sequence<sal_Int8> aSeq(
302 static_cast< const sal_Int8* >(aDestStrm.GetData()),
303 aDestStrm.GetEndOfData());
304 rValue <<= aSeq;
305 }
306 }

--- 676 unchanged lines hidden ---