Lines 1240-1246
Link Here
|
1240 |
// Kein GetPos undFindParaportion, sondern Index berechnen! |
1240 |
// Kein GetPos undFindParaportion, sondern Index berechnen! |
1241 |
EditSelection aSel( aPaM, aPaM ); |
1241 |
EditSelection aSel( aPaM, aPaM ); |
1242 |
DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); |
1242 |
DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); |
1243 |
|
1243 |
|
|
|
1244 |
//#115580# Paste from sc to sd. |
1245 |
EditPaM aStart1PaM( aSel.Min().GetNode(), aSel.Min().GetIndex() ); |
1246 |
aSel = ImpInsertParaBreak( aSel ); |
1247 |
EditPaM aStart2PaM = aSel.Min(); |
1248 |
EditPaM aEnd1PaM( ImpInsertParaBreak( aSel.Max() ) ); |
1249 |
aEnd1PaM.GetNode()->SetStyleSheet( aStart1PaM.GetNode()->GetStyleSheet(), sal_False ); |
1250 |
|
1244 |
sal_Bool bUsePortionInfo = sal_False; |
1251 |
sal_Bool bUsePortionInfo = sal_False; |
1245 |
// sal_Bool bFields = sal_False; |
1252 |
// sal_Bool bFields = sal_False; |
1246 |
XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo(); |
1253 |
XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo(); |
Lines 1270-1275
Link Here
|
1270 |
for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ ) |
1277 |
for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ ) |
1271 |
{ |
1278 |
{ |
1272 |
ContentInfo* pC = rTextObject.GetContents().GetObject( n ); |
1279 |
ContentInfo* pC = rTextObject.GetContents().GetObject( n ); |
|
|
1280 |
|
1281 |
if ( bIsPasting ) //#115580# |
1282 |
{ |
1283 |
if ( !n ) |
1284 |
aPaM = aStart2PaM; |
1285 |
|
1286 |
aPaM.GetNode()->SetStyleSheet( aStart1PaM.GetNode()->GetStyleSheet(), sal_False ); |
1287 |
aPaM.GetNode()->GetContentAttribs().GetItems().ClearItem(); |
1288 |
aPaM.GetNode()->GetCharAttribs().Clear(); |
1289 |
} |
1290 |
|
1273 |
sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True; |
1291 |
sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True; |
1274 |
sal_uInt16 nStartPos = aPaM.GetIndex(); |
1292 |
sal_uInt16 nStartPos = aPaM.GetIndex(); |
1275 |
|
1293 |
|
Lines 1340-1345
Link Here
|
1340 |
// nur dann Style und ParaAttribs, wenn neuer Absatz, oder |
1358 |
// nur dann Style und ParaAttribs, wenn neuer Absatz, oder |
1341 |
// komplett inneliegender... |
1359 |
// komplett inneliegender... |
1342 |
bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False; |
1360 |
bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False; |
|
|
1361 |
|
1362 |
if ( bIsPasting ) //#115580# |
1363 |
{ |
1364 |
nPara = aEditDoc.GetPos( aPaM.GetNode() ); |
1365 |
if ( GetStyleSheetPool() && pC->GetStyle().Len() ) |
1366 |
{ |
1367 |
SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); |
1368 |
DBG_ASSERT( pStyle, "InsertBinTextObject - Style not found!" ); |
1369 |
SetStyleSheet( nPara, pStyle ); |
1370 |
} |
1371 |
} |
1372 |
else |
1343 |
if ( GetStyleSheetPool() && pC->GetStyle().Len() ) |
1373 |
if ( GetStyleSheetPool() && pC->GetStyle().Len() ) |
1344 |
{ |
1374 |
{ |
1345 |
SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); |
1375 |
SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); |
Lines 1412-1417
Link Here
|
1412 |
} |
1442 |
} |
1413 |
#endif // !SVX_LIGHT |
1443 |
#endif // !SVX_LIGHT |
1414 |
|
1444 |
|
|
|
1445 |
if ( bIsPasting ) //#115580# start |
1446 |
{ |
1447 |
AdjustParaAttribsByStyleSheet( aPaM.GetNode() ); |
1448 |
ParaAttribsToCharAttribs( aPaM.GetNode() ); |
1449 |
} |
1450 |
|
1415 |
// Zeilenumbruch, wenn weitere folgen... |
1451 |
// Zeilenumbruch, wenn weitere folgen... |
1416 |
if ( n < ( nContents-1) ) |
1452 |
if ( n < ( nContents-1) ) |
1417 |
{ |
1453 |
{ |
Lines 1422-1428
Link Here
|
1422 |
} |
1458 |
} |
1423 |
} |
1459 |
} |
1424 |
|
1460 |
|
1425 |
aSel.Max() = aPaM; |
1461 |
/* aSel.Max() = aPaM; */ //#115580# |
|
|
1462 |
|
1463 |
if ( bIsPasting ) |
1464 |
{ |
1465 |
EditPaM aEnd2PaM( aPaM ); |
1466 |
|
1467 |
sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; |
1468 |
|
1469 |
aSel.Min() = ImpConnectParagraphs( aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); |
1470 |
bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; |
1471 |
|
1472 |
aSel.Max() = ImpConnectParagraphs( ( ( nContents == 1 ) ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ), |
1473 |
aEnd1PaM.GetNode(), bSpecialBackward ); |
1474 |
} |
1475 |
else |
1476 |
aSel.Max() = aPaM; |
1477 |
|
1426 |
DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); |
1478 |
DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); |
1427 |
return aSel; |
1479 |
return aSel; |
1428 |
} |
1480 |
} |