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# fixed by JingDongChen from China at 2011/11/16 start |
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 |
//#115580# fixed by JingDongChen from China at 2011/11/16 end |
1251 |
|
1244 |
sal_Bool bUsePortionInfo = sal_False; |
1252 |
sal_Bool bUsePortionInfo = sal_False; |
1245 |
// sal_Bool bFields = sal_False; |
1253 |
// sal_Bool bFields = sal_False; |
1246 |
XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo(); |
1254 |
XParaPortionList* pPortionInfo = rTextObject.GetPortionInfo(); |
Lines 1270-1275
Link Here
|
1270 |
for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ ) |
1278 |
for ( sal_uInt16 n = 0; n < nContents; n++, nPara++ ) |
1271 |
{ |
1279 |
{ |
1272 |
ContentInfo* pC = rTextObject.GetContents().GetObject( n ); |
1280 |
ContentInfo* pC = rTextObject.GetContents().GetObject( n ); |
|
|
1281 |
|
1282 |
//#115580# fixed by JingDongChen from China at 2011/11/16 start |
1283 |
if ( bIsPasting ) |
1284 |
{ |
1285 |
if ( !n ) |
1286 |
aPaM = aStart2PaM; |
1287 |
|
1288 |
aPaM.GetNode()->SetStyleSheet( aStart1PaM.GetNode()->GetStyleSheet(), sal_False ); |
1289 |
aPaM.GetNode()->GetContentAttribs().GetItems().ClearItem(); |
1290 |
aPaM.GetNode()->GetCharAttribs().Clear(); |
1291 |
} |
1292 |
//#115580# fixed by JingDongChen from China at 2011/11/16 end |
1293 |
|
1273 |
sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True; |
1294 |
sal_Bool bNewContent = aPaM.GetNode()->Len() ? sal_False: sal_True; |
1274 |
sal_uInt16 nStartPos = aPaM.GetIndex(); |
1295 |
sal_uInt16 nStartPos = aPaM.GetIndex(); |
1275 |
|
1296 |
|
Lines 1340-1345
Link Here
|
1340 |
// nur dann Style und ParaAttribs, wenn neuer Absatz, oder |
1361 |
// nur dann Style und ParaAttribs, wenn neuer Absatz, oder |
1341 |
// komplett inneliegender... |
1362 |
// komplett inneliegender... |
1342 |
bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False; |
1363 |
bParaAttribs = pC->GetParaAttribs().Count() ? sal_True : sal_False; |
|
|
1364 |
|
1365 |
//#115580# fixed by JingDongChen from China at 2011/11/16 start |
1366 |
if ( bIsPasting ) |
1367 |
{ |
1368 |
nPara = aEditDoc.GetPos( aPaM.GetNode() ); |
1369 |
if ( GetStyleSheetPool() && pC->GetStyle().Len() ) |
1370 |
{ |
1371 |
SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); |
1372 |
DBG_ASSERT( pStyle, "InsertBinTextObject - Style not found!" ); |
1373 |
SetStyleSheet( nPara, pStyle ); |
1374 |
} |
1375 |
} |
1376 |
else |
1377 |
//#115580# fixed by JingDongChen from China at 2011/11/16 end |
1343 |
if ( GetStyleSheetPool() && pC->GetStyle().Len() ) |
1378 |
if ( GetStyleSheetPool() && pC->GetStyle().Len() ) |
1344 |
{ |
1379 |
{ |
1345 |
SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); |
1380 |
SfxStyleSheet* pStyle = (SfxStyleSheet*)GetStyleSheetPool()->Find( pC->GetStyle(), pC->GetFamily() ); |
Lines 1412-1417
Link Here
|
1412 |
} |
1447 |
} |
1413 |
#endif // !SVX_LIGHT |
1448 |
#endif // !SVX_LIGHT |
1414 |
|
1449 |
|
|
|
1450 |
//#115580# fixed by JingDongChen from China at 2011/11/16 start |
1451 |
if ( bIsPasting ) |
1452 |
{ |
1453 |
AdjustParaAttribsByStyleSheet( aPaM.GetNode() ); |
1454 |
ParaAttribsToCharAttribs( aPaM.GetNode() ); |
1455 |
} |
1456 |
//#115580# fixed by JingDongChen from China at 2011/11/16 end |
1457 |
|
1415 |
// Zeilenumbruch, wenn weitere folgen... |
1458 |
// Zeilenumbruch, wenn weitere folgen... |
1416 |
if ( n < ( nContents-1) ) |
1459 |
if ( n < ( nContents-1) ) |
1417 |
{ |
1460 |
{ |
Lines 1422-1428
Link Here
|
1422 |
} |
1465 |
} |
1423 |
} |
1466 |
} |
1424 |
|
1467 |
|
1425 |
aSel.Max() = aPaM; |
1468 |
//#115580# fixed by JingDongChen from China at 2011/11/16 start |
|
|
1469 |
/* aSel.Max() = aPaM; */ |
1470 |
|
1471 |
if ( bIsPasting ) |
1472 |
{ |
1473 |
EditPaM aEnd2PaM( aPaM ); |
1474 |
|
1475 |
sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; |
1476 |
|
1477 |
aSel.Min() = ImpConnectParagraphs( aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); |
1478 |
bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; |
1479 |
|
1480 |
aSel.Max() = ImpConnectParagraphs( ( ( nContents == 1 ) ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ), |
1481 |
aEnd1PaM.GetNode(), bSpecialBackward ); |
1482 |
} |
1483 |
else |
1484 |
aSel.Max() = aPaM; |
1485 |
//#115580# fixed by JingDongChen from China at 2011/11/16 end |
1486 |
|
1426 |
DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); |
1487 |
DBG_ASSERT( !aSel.DbgIsBuggy( aEditDoc ), "InsertBibTextObject: Selektion kaput!(1)" ); |
1427 |
return aSel; |
1488 |
return aSel; |
1428 |
} |
1489 |
} |