View | Details | Raw Unified | Return to issue 115580
Collapse All | Expand All

(-)old/editeng/source/editeng/impedit.hxx (+6 lines)
Lines 479-484 Link Here
479
	sal_Bool			bFormatted;
479
	sal_Bool			bFormatted;
480
	sal_Bool			bInSelection;
480
	sal_Bool			bInSelection;
481
	sal_Bool			bIsInUndo;
481
	sal_Bool			bIsInUndo;
482
	//#115580# fixed by JingDongChen from China at 2011/11/16 start
483
	sal_Bool			bIsPasting;
484
	//#115580# fixed by JingDongChen from China at 2011/11/16 end	
482
	sal_Bool			bUpdate;
485
	sal_Bool			bUpdate;
483
	sal_Bool			bUndoEnabled;
486
	sal_Bool			bUndoEnabled;
484
	sal_Bool			bOwnerOfRefDev;
487
	sal_Bool			bOwnerOfRefDev;
Lines 543-548 Link Here
543
	void				SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue );
546
	void				SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue );
544
	sal_uInt16			GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel );
547
	sal_uInt16			GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel );
545
	void				SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem );
548
	void				SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem );
549
	//#115580# fixed by JingDongChen from China at 2011/11/16 start
550
	void 				AdjustParaAttribsByStyleSheet( ContentNode* pNode );
551
	//#115580# fixed by JingDongChen from China at 2011/11/16 end	
546
	void				ParaAttribsToCharAttribs( ContentNode* pNode );
552
	void				ParaAttribsToCharAttribs( ContentNode* pNode );
547
	void				GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
553
	void				GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
548
554
(-)old/editeng/source/editeng/impedit2.cxx (+9 lines)
Lines 133-138 Link Here
133
	bOwnerOfRefDev 		= sal_False;
133
	bOwnerOfRefDev 		= sal_False;
134
	bDowning 			= sal_False;
134
	bDowning 			= sal_False;
135
	bIsInUndo 			= sal_False;
135
	bIsInUndo 			= sal_False;
136
	//#115580# fixed by JingDongChen from China at 2011/11/16 start
137
	bIsPasting 			= sal_False;
138
	//#115580# fixed by JingDongChen from China at 2011/11/16 end	
136
	bIsFormatting 		= sal_False;
139
	bIsFormatting 		= sal_False;
137
	bFormatted			= sal_False;
140
	bFormatted			= sal_False;
138
	bUpdate 			= sal_True;
141
	bUpdate 			= sal_True;
Lines 3701-3706 Link Here
3701
3704
3702
	if ( rxDataObj.is() )
3705
	if ( rxDataObj.is() )
3703
	{
3706
	{
3707
		//#115580# fixed by JingDongChen from China at 2011/11/16 start
3708
		bIsPasting = sal_True;
3709
		//#115580# fixed by JingDongChen from China at 2011/11/16 end		
3704
		datatransfer::DataFlavor aFlavor;
3710
		datatransfer::DataFlavor aFlavor;
3705
		sal_Bool bDone = sal_False;
3711
		sal_Bool bDone = sal_False;
3706
3712
Lines 3791-3796 Link Here
3791
				}
3797
				}
3792
			}
3798
			}
3793
		}
3799
		}
3800
		//#115580# fixed by JingDongChen from China at 2011/11/16 start
3801
		bIsPasting = sal_False;
3802
		//#115580# fixed by JingDongChen from China at 2011/11/16 end		
3794
	}
3803
	}
3795
3804
3796
	return aNewSelection;
3805
	return aNewSelection;
(-)old/editeng/source/editeng/impedit4.cxx (-2 / +63 lines)
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
}
(-)old/editeng/source/editeng/impedit5.cxx (+24 lines)
Lines 813-818 Link Here
813
	}
813
	}
814
}
814
}
815
815
816
//#115580# fixed by JingDongChen from China at 2011/11/16 start
817
void ImpEditEngine::AdjustParaAttribsByStyleSheet( ContentNode* pNode )
818
{
819
	if ( !pNode )
820
		return;
821
822
	SfxStyleSheet* pStyle = pNode->GetStyleSheet();
823
	for ( sal_uInt16 nWhich = EE_PARA_START; nWhich < EE_CHAR_START && pStyle; nWhich++ )
824
	{
825
		if ( pNode->GetContentAttribs().HasItem( nWhich ) )
826
		{
827
			const SfxItemSet& rStyleAttribs = pStyle->GetItemSet();
828
			if ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON )
829
				pNode->GetContentAttribs().GetItems().ClearItem( nWhich );	
830
		}
831
	}
832
}
833
//#115580# fixed by JingDongChen from China at 2011/11/16 end
834
816
void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode )
835
void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode )
817
{
836
{
818
	pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() );
837
	pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() );
Lines 841-846 Link Here
841
	}
860
	}
842
	bFormatted = sal_False;
861
	bFormatted = sal_False;
843
	// Portion braucht hier nicht invalidiert werden, geschieht woanders.
862
	// Portion braucht hier nicht invalidiert werden, geschieht woanders.
863
	
864
	//#115580# fixed by JingDongChen from China at 2011/11/16 start
865
	if ( bIsPasting )
866
		pNode->GetContentAttribs().GetItems().ClearItem();
867
	//#115580# fixed by JingDongChen from China at 2011/11/16 end	
844
}
868
}
845
869
846
IdleFormattter::IdleFormattter()
870
IdleFormattter::IdleFormattter()

Return to issue 115580