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

(-)editeng/source/editeng/impedit4.cxx (-2 / +54 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# 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
}
(-)editeng/source/editeng/impedit5.cxx (+20 lines)
Lines 813-818 Link Here
813
	}
813
	}
814
}
814
}
815
815
816
void ImpEditEngine::AdjustParaAttribsByStyleSheet( ContentNode* pNode ) //#115580#
817
{
818
	if ( !pNode )
819
		return;
820
821
	SfxStyleSheet* pStyle = pNode->GetStyleSheet();
822
	for ( sal_uInt16 nWhich = EE_PARA_START; nWhich < EE_CHAR_START && pStyle; nWhich++ )
823
	{
824
		if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich, sal_False) == SFX_ITEM_ON  )
825
		{
826
			const SfxItemSet& rStyleAttribs = pStyle->GetItemSet();
827
			if ( rStyleAttribs.GetItemState( nWhich ) == SFX_ITEM_ON )
828
				pNode->GetContentAttribs().GetItems().ClearItem( nWhich );	
829
		}
830
	}
831
}
832
816
void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode )
833
void ImpEditEngine::ParaAttribsToCharAttribs( ContentNode* pNode )
817
{
834
{
818
	pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() );
835
	pNode->GetCharAttribs().DeleteEmptyAttribs( GetEditDoc().GetItemPool() );
Lines 841-846 Link Here
841
	}
858
	}
842
	bFormatted = sal_False;
859
	bFormatted = sal_False;
843
	// Portion braucht hier nicht invalidiert werden, geschieht woanders.
860
	// Portion braucht hier nicht invalidiert werden, geschieht woanders.
861
	
862
	if ( bIsPasting ) 	//#115580#
863
		pNode->GetContentAttribs().GetItems().ClearItem();
844
}
864
}
845
865
846
IdleFormattter::IdleFormattter()
866
IdleFormattter::IdleFormattter()
(-)editeng/source/editeng/impedit.hxx (+2 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
	sal_Bool			bIsPasting;	//#115580#
482
	sal_Bool			bUpdate;
483
	sal_Bool			bUpdate;
483
	sal_Bool			bUndoEnabled;
484
	sal_Bool			bUndoEnabled;
484
	sal_Bool			bOwnerOfRefDev;
485
	sal_Bool			bOwnerOfRefDev;
Lines 543-548 Link Here
543
	void				SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue );
544
	void				SetParaAttrib( sal_uInt8 nFunc, EditSelection aSel, sal_uInt16 nValue );
544
	sal_uInt16			GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel );
545
	sal_uInt16			GetParaAttrib( sal_uInt8 nFunc, EditSelection aSel );
545
	void				SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem );
546
	void				SetCharAttrib( EditSelection aSel, const SfxPoolItem& rItem );
547
	void 				AdjustParaAttribsByStyleSheet( ContentNode* pNode );	//#115580#
546
	void				ParaAttribsToCharAttribs( ContentNode* pNode );
548
	void				ParaAttribsToCharAttribs( ContentNode* pNode );
547
	void				GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
549
	void				GetCharAttribs( sal_uInt16 nPara, EECharAttribArray& rLst ) const;
548
550
(-)editeng/source/editeng/impedit2.cxx (+3 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
	bIsPasting 			= sal_False;	//#115580# start
136
	bIsFormatting 		= sal_False;
137
	bIsFormatting 		= sal_False;
137
	bFormatted			= sal_False;
138
	bFormatted			= sal_False;
138
	bUpdate 			= sal_True;
139
	bUpdate 			= sal_True;
Lines 3701-3706 Link Here
3701
3702
3702
	if ( rxDataObj.is() )
3703
	if ( rxDataObj.is() )
3703
	{
3704
	{
3705
		bIsPasting = sal_True;		//#115580#
3704
		datatransfer::DataFlavor aFlavor;
3706
		datatransfer::DataFlavor aFlavor;
3705
		sal_Bool bDone = sal_False;
3707
		sal_Bool bDone = sal_False;
3706
3708
Lines 3791-3796 Link Here
3791
				}
3793
				}
3792
			}
3794
			}
3793
		}
3795
		}
3796
		bIsPasting = sal_False;			//#115580#
3794
	}
3797
	}
3795
3798
3796
	return aNewSelection;
3799
	return aNewSelection;

Return to issue 115580