sdview3.cxx (1cd65da9) | sdview3.cxx (a1ee43c7) |
---|---|
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 --- 1190 unchanged lines hidden (view full) --- 1199 } 1200 } 1201 } 1202 1203 if( !bReturn && aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) ) 1204 { 1205 // if no object was inserted, insert a picture 1206 InsertMetaFile( aDataHelper, rPos, pImageMap, true ); | 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 --- 1190 unchanged lines hidden (view full) --- 1199 } 1200 } 1201 } 1202 1203 if( !bReturn && aDataHelper.HasFormat( FORMAT_GDIMETAFILE ) ) 1204 { 1205 // if no object was inserted, insert a picture 1206 InsertMetaFile( aDataHelper, rPos, pImageMap, true ); |
1207 bReturn = true; |
|
1207 } 1208 } 1209 1210 if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_SVXB)) 1211 { 1212 SotStorageStreamRef xStm; 1213 1214 if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVXB, xStm ) ) --- 51 unchanged lines hidden (view full) --- 1266 aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ); 1267 } 1268 1269 bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 ? true : false ) ? sal_True : sal_False; 1270 } 1271 1272 if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(FORMAT_BITMAP)) 1273 { | 1208 } 1209 } 1210 1211 if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(SOT_FORMATSTR_ID_SVXB)) 1212 { 1213 SotStorageStreamRef xStm; 1214 1215 if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_SVXB, xStm ) ) --- 51 unchanged lines hidden (view full) --- 1267 aInsertPos.Y() = pOwnData->GetStartPos().Y() + ( aSize.Height() >> 1 ); 1268 } 1269 1270 bReturn = InsertMetaFile( aDataHelper, aInsertPos, pImageMap, nFormat == 0 ? true : false ) ? sal_True : sal_False; 1271 } 1272 1273 if(!bReturn && (!bLink || pPickObj) && CHECK_FORMAT_TRANS(FORMAT_BITMAP)) 1274 { |
1274 BitmapEx aBmpEx; | 1275 BitmapEx aBmpEx; |
1275 | 1276 |
1276 if( aDataHelper.GetBitmapEx( FORMAT_BITMAP, aBmpEx ) ) | 1277 // get basic Bitmap data 1278 aDataHelper.GetBitmapEx(FORMAT_BITMAP, aBmpEx); 1279 1280 if(aBmpEx.IsEmpty()) 1281 { 1282 // if this did not work, try to get graphic formats and convert these to bitmap 1283 Graphic aGraphic; 1284 1285 if(aDataHelper.GetGraphic(FORMAT_GDIMETAFILE, aGraphic)) 1286 { 1287 aBmpEx = aGraphic.GetBitmapEx(); 1288 } 1289 else if(aDataHelper.GetGraphic(SOT_FORMATSTR_ID_SVXB, aGraphic)) 1290 { 1291 aBmpEx = aGraphic.GetBitmapEx(); 1292 } 1293 else if(aDataHelper.GetGraphic(FORMAT_BITMAP, aGraphic)) 1294 { 1295 aBmpEx = aGraphic.GetBitmapEx(); 1296 } 1297 } 1298 1299 if(!aBmpEx.IsEmpty()) |
1277 { 1278 Point aInsertPos( rPos ); 1279 1280 if( pOwnData && pOwnData->GetWorkDocument() ) 1281 { 1282 const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument(); 1283 SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ? 1284 pWorkModel->GetSdPage( 0, PK_STANDARD ) : --- 10 unchanged lines hidden (view full) --- 1295 1296 // #90129# restrict movement to WorkArea 1297 Size aImageMapSize(aBmpEx.GetPrefSize()); 1298 ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea()); 1299 1300 InsertGraphic( aBmpEx, mnAction, aInsertPos, NULL, pImageMap ); 1301 bReturn = true; 1302 } | 1300 { 1301 Point aInsertPos( rPos ); 1302 1303 if( pOwnData && pOwnData->GetWorkDocument() ) 1304 { 1305 const SdDrawDocument* pWorkModel = pOwnData->GetWorkDocument(); 1306 SdrPage* pWorkPage = (SdrPage*) ( ( pWorkModel->GetPageCount() > 1 ) ? 1307 pWorkModel->GetSdPage( 0, PK_STANDARD ) : --- 10 unchanged lines hidden (view full) --- 1318 1319 // #90129# restrict movement to WorkArea 1320 Size aImageMapSize(aBmpEx.GetPrefSize()); 1321 ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea()); 1322 1323 InsertGraphic( aBmpEx, mnAction, aInsertPos, NULL, pImageMap ); 1324 bReturn = true; 1325 } |
1303 } | 1326 } |
1304 1305 if(!bReturn && pPickObj && CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_XFA ) ) 1306 { 1307 SotStorageStreamRef xStm; 1308 1309 if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_XFA, xStm ) ) 1310 { 1311 XFillExchangeData aFillData( XFillAttrSetItem( &mpDoc->GetPool() ) ); --- 222 unchanged lines hidden --- | 1327 1328 if(!bReturn && pPickObj && CHECK_FORMAT_TRANS( SOT_FORMATSTR_ID_XFA ) ) 1329 { 1330 SotStorageStreamRef xStm; 1331 1332 if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_XFA, xStm ) ) 1333 { 1334 XFillExchangeData aFillData( XFillAttrSetItem( &mpDoc->GetPool() ) ); --- 222 unchanged lines hidden --- |