unoshape.cxx (70d3707a) unoshape.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

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

3024 {
3025 bIsWMF = sal_True;
3026 uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize());
3027 rValue <<= aSeq;
3028 }
3029 }
3030 if ( !bIsWMF )
3031 {
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

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

3024 {
3025 bIsWMF = sal_True;
3026 uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize());
3027 rValue <<= aSeq;
3028 }
3029 }
3030 if ( !bIsWMF )
3031 {
3032 GDIMetaFile aMtf;
3033 if ( pGraphic->GetType() != GRAPHIC_BITMAP )
3034 aMtf = pObj->GetGraphic()->GetGDIMetaFile();
3035 else
3036 {
3037 VirtualDevice aVirDev;
3038 aMtf.Record( &aVirDev );
3039 pGraphic->Draw( &aVirDev, Point(), pGraphic->GetPrefSize() );
3040 aMtf.Stop();
3041 aMtf.SetPrefSize( pGraphic->GetPrefSize() );
3042 aMtf.SetPrefMapMode( pGraphic->GetPrefMapMode() );
3043 }
3032 // #119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
3033 GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile());
3044 SvMemoryStream aDestStrm( 65535, 65535 );
3045 ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
3046 const uno::Sequence<sal_Int8> aSeq(
3047 static_cast< const sal_Int8* >(aDestStrm.GetData()),
3048 aDestStrm.GetEndOfData());
3049 rValue <<= aSeq;
3050 }
3051 }

--- 1432 unchanged lines hidden ---
3034 SvMemoryStream aDestStrm( 65535, 65535 );
3035 ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False );
3036 const uno::Sequence<sal_Int8> aSeq(
3037 static_cast< const sal_Int8* >(aDestStrm.GetData()),
3038 aDestStrm.GetEndOfData());
3039 rValue <<= aSeq;
3040 }
3041 }

--- 1432 unchanged lines hidden ---