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

(-)old/editeng/source/editeng/editdoc.cxx (-6 / +27 lines)
Lines 1066-1077 Link Here
1066
{
1066
{
1067
	// Erst alle Informationen aus dem Style verwenden...
1067
	// Erst alle Informationen aus dem Style verwenden...
1068
	SfxStyleSheet* pS = aContentAttribs.GetStyleSheet();
1068
	SfxStyleSheet* pS = aContentAttribs.GetStyleSheet();
1069
	if ( pS )
1069
	//#115580# modified at 2011/11/28 start
1070
		CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() );
1070
	/* if ( pS )
1071
	
1071
	CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() );
1072
	// ... dann die harte Absatzformatierung rueberbuegeln...
1072
1073
	CreateFont( GetCharAttribs().GetDefFont(),
1073
	// ... dann die harte Absatzformatierung rueberbuegeln...
1074
		GetContentAttribs().GetItems(), pS == NULL );
1074
	CreateFont( GetCharAttribs().GetDefFont(),
1075
		GetContentAttribs().GetItems(), pS == NULL ); */
1076
1077
	SvxFont& rFont = GetCharAttribs().GetDefFont();
1078
	SvxFont& rFontCJK = GetCharAttribs().GetDefFontCJK();
1079
	SvxFont& rFontCTL = GetCharAttribs().GetDefFontCTL();
1080
1081
	if ( pS )
1082
	{
1083
		CreateFont( rFont, pS->GetItemSet(), sal_True, i18n::ScriptType::LATIN );
1084
		CreateFont( rFontCJK, pS->GetItemSet(), sal_True, i18n::ScriptType::ASIAN );
1085
		CreateFont( rFontCTL, pS->GetItemSet(), sal_True, i18n::ScriptType::COMPLEX );
1086
	}
1087
1088
	CreateFont( rFont, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::LATIN );
1089
	CreateFont( rFontCJK, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::ASIAN );
1090
	CreateFont( rFontCTL, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::COMPLEX );
1091
	// end
1075
}
1092
}
1076
1093
1077
void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle )
1094
void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle )
Lines 1560-1565 Link Here
1560
1577
1561
	// Den Default-Font kopieren
1578
	// Den Default-Font kopieren
1562
	pNode->GetCharAttribs().GetDefFont() = aPaM.GetNode()->GetCharAttribs().GetDefFont();
1579
	pNode->GetCharAttribs().GetDefFont() = aPaM.GetNode()->GetCharAttribs().GetDefFont();
1580
	//#115580# added at 2011/11/28 start
1581
	pNode->GetCharAttribs().GetDefFontCJK() = aPaM.GetNode()->GetCharAttribs().GetDefFontCJK();
1582
	pNode->GetCharAttribs().GetDefFontCTL() = aPaM.GetNode()->GetCharAttribs().GetDefFontCTL();
1583
	// end
1563
	SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet();
1584
	SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet();
1564
	if ( pStyle )
1585
	if ( pStyle )
1565
	{
1586
	{
(-)old/editeng/source/editeng/editdoc.hxx (-1 / +9 lines)
Lines 203-208 Link Here
203
private:
203
private:
204
	CharAttribArray	aAttribs;
204
	CharAttribArray	aAttribs;
205
	SvxFont			aDefFont;				// schneller, als jedesmal vom Pool!
205
	SvxFont			aDefFont;				// schneller, als jedesmal vom Pool!
206
	//#115580# added at 2011/11/28 start
207
	SvxFont			aDefFontCJK;
208
	SvxFont			aDefFontCTL;
209
	// end
206
	sal_Bool			bHasEmptyAttribs;
210
	sal_Bool			bHasEmptyAttribs;
207
211
208
					CharAttribList( const CharAttribList& ) {;}
212
					CharAttribList( const CharAttribList& ) {;}
Lines 228-233 Link Here
228
	void			InsertAttrib( EditCharAttrib* pAttrib );
232
	void			InsertAttrib( EditCharAttrib* pAttrib );
229
233
230
	SvxFont&		GetDefFont() 			{ return aDefFont; }
234
	SvxFont&		GetDefFont() 			{ return aDefFont; }
235
	//#115580# added at 2011/11/28 start
236
	SvxFont&		GetDefFontCJK() 		{ return aDefFontCJK; }
237
	SvxFont&		GetDefFontCTL() 		{ return aDefFontCTL; }
238
	// end
231
239
232
	sal_Bool			HasEmptyAttribs() const	{ return bHasEmptyAttribs; }
240
	sal_Bool			HasEmptyAttribs() const	{ return bHasEmptyAttribs; }
233
	sal_Bool&			HasEmptyAttribs() 		{ return bHasEmptyAttribs; }
241
	sal_Bool&			HasEmptyAttribs() 		{ return bHasEmptyAttribs; }
Lines 451-457 Link Here
451
	sal_uInt16 			nEndPortion;
459
	sal_uInt16 			nEndPortion;
452
	sal_uInt16			nHeight;	// Gesamthoehe der Zeile
460
	sal_uInt16			nHeight;	// Gesamthoehe der Zeile
453
	sal_uInt16			nTxtHeight;	// Reine Texthoehe
461
	sal_uInt16			nTxtHeight;	// Reine Texthoehe
454
	sal_uInt16			nCrsrHeight;	// Bei Konturfluss hohe Zeilen => Cursor zu gro�.
462
	sal_uInt16			nCrsrHeight;	// Bei Konturfluss hohe Zeilen => Cursor zu groï¿?
455
	sal_uInt16			nMaxAscent;
463
	sal_uInt16			nMaxAscent;
456
	sal_Bool			bHangingPunctuation;
464
	sal_Bool			bHangingPunctuation;
457
	sal_Bool			bInvalid;	// fuer geschickte Formatierung
465
	sal_Bool			bInvalid;	// fuer geschickte Formatierung
(-)old/editeng/source/editeng/eertfpar.cxx (-5 / +51 lines)
Lines 108-114 Link Here
108
	EditPaM aStart2PaM = aCurSel.Min();
108
	EditPaM aStart2PaM = aCurSel.Min();
109
	// Sinnvoll oder nicht?:
109
	// Sinnvoll oder nicht?:
110
	aStart2PaM.GetNode()->GetContentAttribs().GetItems().ClearItem();
110
	aStart2PaM.GetNode()->GetContentAttribs().GetItems().ClearItem();
111
    AddRTFDefaultValues( aStart2PaM, aStart2PaM );
111
    //AddRTFDefaultValues( aStart2PaM, aStart2PaM ); //#115580# deleted at 2011/11/28
112
	EditPaM aEnd1PaM( pImpEditEngine->ImpInsertParaBreak( aCurSel.Max() ) );
112
	EditPaM aEnd1PaM( pImpEditEngine->ImpInsertParaBreak( aCurSel.Max() ) );
113
	// aCurCel zeigt jetzt auf den Zwischenraum
113
	// aCurCel zeigt jetzt auf den Zwischenraum
114
114
Lines 136-141 Link Here
136
		aSel.Min() = EditPaM( pPrevNode, pPrevNode->Len() );
136
		aSel.Min() = EditPaM( pPrevNode, pPrevNode->Len() );
137
		aSel.Max() = EditPaM( pCurNode, 0 );
137
		aSel.Max() = EditPaM( pCurNode, 0 );
138
		aCurSel.Max() = pImpEditEngine->ImpDeleteSelection( aSel );
138
		aCurSel.Max() = pImpEditEngine->ImpDeleteSelection( aSel );
139
		//#115580# added at 2011/11/28 start
140
		sal_uInt16 nStart2 = pImpEditEngine->GetEditDoc().GetPos( aStart2PaM.GetNode() );
141
		sal_uInt16 nEnd2 = pImpEditEngine->GetEditDoc().GetPos( aCurSel.Max().GetNode() );
142
		for ( sal_uInt16 n = nStart2; n <= nEnd2; n++ )
143
		{
144
			ContentNode* pTmpNode = pImpEditEngine->GetEditDoc().SaveGetObject( n );
145
			if ( pTmpNode )
146
			{
147
				{//if ContentAttribs of node has no font info, add default font attribs into it.
148
					Size aSz( 12, 0 );
149
					MapMode aPntMode( MAP_POINT );
150
					MapMode _aEditMapMode( pImpEditEngine->GetRefDevice()->GetMapMode().GetMapUnit() );
151
					aSz = pImpEditEngine->GetRefDevice()->LogicToLogic( aSz, &aPntMode, &_aEditMapMode );
152
153
					SfxItemSet& rSet = pTmpNode->GetContentAttribs().GetItems();
154
					SvxFont& rFont = pTmpNode->GetCharAttribs().GetDefFont();
155
					SvxFont& rFontCJK = pTmpNode->GetCharAttribs().GetDefFontCJK();
156
					SvxFont& rFontCTL = pTmpNode->GetCharAttribs().GetDefFontCTL();
157
158
					if ( rSet.GetItemState( EE_CHAR_FONTINFO ) != SFX_ITEM_ON )
159
						rSet.Put( SvxFontItem( rFont.GetFamily(), rFont.GetName(), XubString(), 
160
									rFont.GetPitch(), rFont.GetCharSet(), EE_CHAR_FONTINFO ) );
161
					if ( rSet.GetItemState( EE_CHAR_FONTINFO_CJK ) != SFX_ITEM_ON )
162
						rSet.Put( SvxFontItem( rFontCJK.GetFamily(), rFontCJK.GetName(), XubString(), 
163
									rFontCJK.GetPitch(), rFontCJK.GetCharSet(), EE_CHAR_FONTINFO_CJK ) );
164
					if ( rSet.GetItemState( EE_CHAR_FONTINFO_CTL ) != SFX_ITEM_ON )
165
						rSet.Put( SvxFontItem( rFontCTL.GetFamily(), rFontCTL.GetName(), XubString(), 
166
									rFontCTL.GetPitch(), rFontCTL.GetCharSet(), EE_CHAR_FONTINFO_CTL ) );
167
168
					if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT ) != SFX_ITEM_ON )
169
						rSet.Put( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT )  );
170
					if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT_CJK ) != SFX_ITEM_ON )
171
						rSet.Put( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT_CJK )  );
172
					if ( rSet.GetItemState( EE_CHAR_FONTHEIGHT_CTL ) != SFX_ITEM_ON )
173
						rSet.Put( SvxFontHeightItem( aSz.Width(), 100, EE_CHAR_FONTHEIGHT_CTL )  );
174
				}
175
176
				pImpEditEngine->AdjustParaAttribsByStyleSheet( pTmpNode );
177
				pImpEditEngine->ParaAttribsToCharAttribs( pTmpNode );
178
			}
179
		}
180
		// end
139
	}
181
	}
140
	EditPaM aEnd2PaM( aCurSel.Max() );
182
	EditPaM aEnd2PaM( aCurSel.Max() );
141
    //AddRTFDefaultValues( aStart2PaM, aEnd2PaM );
183
    //AddRTFDefaultValues( aStart2PaM, aEnd2PaM );
Lines 145-158 Link Here
145
	// => Zeichenattribute machen.
187
	// => Zeichenattribute machen.
146
188
147
	sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True;
189
	sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True;
148
	if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() )
190
	//#115580# deleted at 2011/11/28 start
149
		pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() );
191
	/* if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() )
192
		pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); */
193
	// end
150
	aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs(
194
	aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs(
151
		aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward );
195
		aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward );
152
	bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False;
196
	bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False;
153
	// wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden.
197
	// wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden.
154
	if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() )
198
	//#115580# deleted at 2011/11/28 start
155
		pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() );
199
	/* if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() )
200
		pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); */
201
	// end
156
	aCurSel.Max() = pImpEditEngine->ImpConnectParagraphs(
202
	aCurSel.Max() = pImpEditEngine->ImpConnectParagraphs(
157
		( bOnlyOnePara ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ),
203
		( bOnlyOnePara ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ),
158
			aEnd1PaM.GetNode(), bSpecialBackward );
204
			aEnd1PaM.GetNode(), bSpecialBackward );
(-)old/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# added at 2011/11/28	
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# added at 2011/11/28
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
(-)old/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# added at 2011/11/28	
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# added at 2011/11/28		
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# added at 2011/11/28		
3794
	}
3797
	}
3795
3798
3796
	return aNewSelection;
3799
	return aNewSelection;
(-)old/editeng/source/editeng/impedit4.cxx (-3 / +64 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# added at 2011/11/28 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
	// 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# added at 2011/11/28 start
1283
		if ( bIsPasting )
1284
		{
1285
			if ( !n )
1286
				aPaM = aStart2PaM;
1287
			//init node
1288
			aPaM.GetNode()->SetStyleSheet( aStart1PaM.GetNode()->GetStyleSheet(), sal_False );
1289
			aPaM.GetNode()->GetContentAttribs().GetItems().ClearItem();
1290
			aPaM.GetNode()->GetCharAttribs().Clear();
1291
		}
1292
		// 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# added at 2011/11/28 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
					// 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# added at 2011/11/28 start
1451
		if ( bIsPasting )	
1452
		{
1453
			AdjustParaAttribsByStyleSheet( aPaM.GetNode() );
1454
			ParaAttribsToCharAttribs( aPaM.GetNode() );
1455
		}
1456
		// 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# modified at 2011/11/28 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
	// 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
}
Lines 2869-2875 Link Here
2869
        const sal_Int16 nWordType = i18n::WordType::ANYWORD_IGNOREWHITESPACES;
2930
        const sal_Int16 nWordType = i18n::WordType::ANYWORD_IGNOREWHITESPACES;
2870
2931
2871
        //! In order to have less trouble with changing text size, e.g. because
2932
        //! In order to have less trouble with changing text size, e.g. because
2872
        //! of ligatures or � (German small sz) being resolved, we need to process 
2933
        //! of ligatures or ï¿?(German small sz) being resolved, we need to process 
2873
        //! the text replacements from end to start. 
2934
        //! the text replacements from end to start. 
2874
        //! This way the offsets for the yet to be changed words will be 
2935
        //! This way the offsets for the yet to be changed words will be 
2875
        //! left unchanged by the already replaced text. 
2936
        //! left unchanged by the already replaced text. 
(-)old/editeng/source/editeng/impedit5.cxx (+24 lines)
Lines 813-818 Link Here
813
	}
813
	}
814
}
814
}
815
815
816
//#115580# added at 2011/11/28 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().GetItems().GetItemState( nWhich ) == SFX_ITEM_ON   )
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
// 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# added at 2011/11/28 start
865
	if ( bIsPasting )
866
		pNode->GetContentAttribs().GetItems().ClearItem();
867
	// end	
844
}
868
}
845
869
846
IdleFormattter::IdleFormattter()
870
IdleFormattter::IdleFormattter()
(-)old/sw/inc/docsh.hxx (+2 lines)
Lines 146-151 Link Here
146
    static SfxInterface *_GetInterface() { return GetStaticInterface(); }
146
    static SfxInterface *_GetInterface() { return GetStaticInterface(); }
147
147
148
	static rtl::OUString GetEventName( sal_Int32 nId );
148
	static rtl::OUString GetEventName( sal_Int32 nId );
149
150
	static void	InitDefaultFontAttr( SwDoc* pDoc ); //#115580# added at 2011/11/28
149
151
150
	//Das Doc wird fuer SO-Datenaustausch benoetigt!
152
	//Das Doc wird fuer SO-Datenaustausch benoetigt!
151
	SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED );
153
	SwDocShell( SfxObjectCreateMode eMode = SFX_CREATE_MODE_EMBEDDED );
(-)old/sw/source/ui/app/docshini.cxx (+141 lines)
Lines 358-363 Link Here
358
	return bRet;
358
	return bRet;
359
}
359
}
360
360
361
//#115580# added at 2011/11/28 start
362
//when creating a new doc, if needs, set default font attributes, as 
363
//well as default language attributes
364
void SwDocShell::InitDefaultFontAttr( SwDoc* pDoc )
365
{
366
	sal_uInt16 aFontWhich[] =
367
	{   
368
		RES_CHRATR_FONT,
369
		RES_CHRATR_CJK_FONT,
370
		RES_CHRATR_CTL_FONT
371
	};
372
	sal_uInt16 aFontHeightWhich[] =
373
	{
374
		RES_CHRATR_FONTSIZE,
375
		RES_CHRATR_CJK_FONTSIZE,
376
		RES_CHRATR_CTL_FONTSIZE
377
	};
378
	sal_uInt16 aFontIds[] =
379
	{
380
		FONT_STANDARD,
381
		FONT_STANDARD_CJK,
382
		FONT_STANDARD_CTL
383
	};
384
	sal_uInt16 nFontTypes[] =
385
	{
386
		DEFAULTFONT_LATIN_TEXT,
387
		DEFAULTFONT_CJK_TEXT,
388
		DEFAULTFONT_CTL_TEXT
389
	};
390
391
	sal_uInt16 aLangWhich[] =
392
	{
393
		RES_CHRATR_LANGUAGE,
394
		RES_CHRATR_CJK_LANGUAGE,
395
		RES_CHRATR_CTL_LANGUAGE
396
	};
397
	sal_uInt16 aLangTypes[] =
398
	{
399
		LANGUAGE_ENGLISH_US,
400
		LANGUAGE_ENGLISH_US,
401
		LANGUAGE_ARABIC_SAUDI_ARABIA
402
	};
403
404
	SwStdFontConfig* pStdFont = SW_MOD()->GetStdFontConfig();
405
	SfxPrinter* pPrt = pDoc->getPrinter( false );
406
	String sEntry;
407
408
	for(sal_uInt8 i = 0; i < 3; i++)
409
	{
410
		sal_uInt16 nFontWhich = aFontWhich[i];
411
		sal_uInt16 nFontId = aFontIds[i];
412
		SvxFontItem* pFontItem = 0;
413
		const SvxLanguageItem& rLang = (const SvxLanguageItem&)pDoc->GetDefault( aLangWhich[i] );
414
		LanguageType eLanguage = rLang.GetLanguage();
415
		if ( (eLanguage == LANGUAGE_DONTKNOW) || (eLanguage == LANGUAGE_NONE) )
416
			eLanguage = aLangTypes[i];
417
		{
418
			if ( i == 0 )
419
			{//At present, just supports for the following languages: english, french and german.
420
				LanguageType eUiLanguage = Application::GetSettings().GetUILanguage();
421
				switch( eUiLanguage )
422
				{
423
				case LANGUAGE_ENGLISH_US:
424
				case LANGUAGE_FRENCH:
425
				case LANGUAGE_FRENCH_BELGIAN:
426
				case LANGUAGE_FRENCH_CAMEROON:
427
				case LANGUAGE_FRENCH_CANADIAN:
428
				case LANGUAGE_FRENCH_COTE_D_IVOIRE:
429
				case LANGUAGE_FRENCH_HAITI:
430
				case LANGUAGE_FRENCH_LUXEMBOURG:
431
				case LANGUAGE_FRENCH_MALI:
432
				case LANGUAGE_FRENCH_MONACO:
433
				case LANGUAGE_FRENCH_MOROCCO:
434
				case LANGUAGE_FRENCH_NORTH_AFRICA:
435
				case LANGUAGE_FRENCH_REUNION:
436
				case LANGUAGE_FRENCH_SENEGAL:
437
				case LANGUAGE_FRENCH_SWISS:
438
				case LANGUAGE_FRENCH_WEST_INDIES:
439
				case LANGUAGE_FRENCH_ZAIRE:
440
				case LANGUAGE_GERMAN:
441
				case LANGUAGE_GERMAN_AUSTRIAN:
442
				case LANGUAGE_GERMAN_LIECHTENSTEIN:
443
				case LANGUAGE_GERMAN_LUXEMBOURG:
444
				case LANGUAGE_GERMAN_SWISS:
445
					eLanguage = eUiLanguage;
446
					break;
447
448
				}
449
			}
450
451
			if ( i == 2 ) //CTL,just supports for HINDI and ARABIC_SAUDI_ARABIA
452
			{
453
				LanguageType eUiLanguage = Application::GetSettings().GetUILanguage();
454
				switch( eUiLanguage )
455
				{
456
				case LANGUAGE_HINDI:
457
					eLanguage = eUiLanguage;
458
					break;
459
460
				}
461
			}
462
463
			if ( i == 1 ) //CJK
464
			{
465
				LanguageType eUiLanguage = Application::GetSettings().GetUILanguage();
466
				switch( eUiLanguage )
467
				{
468
				case LANGUAGE_KOREAN:
469
				case LANGUAGE_KOREAN_JOHAB:
470
				case LANGUAGE_CHINESE:
471
				case LANGUAGE_CHINESE_HONGKONG:
472
				case LANGUAGE_CHINESE_MACAU:
473
				case LANGUAGE_CHINESE_SIMPLIFIED:
474
				case LANGUAGE_CHINESE_SINGAPORE:
475
				case LANGUAGE_CHINESE_TRADITIONAL:
476
				case LANGUAGE_JAPANESE:
477
					eLanguage = eUiLanguage;
478
					break;
479
				}
480
			}
481
482
			Font aLangDefFont = OutputDevice::GetDefaultFont(
483
				nFontTypes[i],
484
				eLanguage,
485
				DEFAULTFONT_FLAGS_ONLYONE );
486
			pFontItem = new SvxFontItem(aLangDefFont.GetFamily(), aLangDefFont.GetName(),
487
				aEmptyStr, aLangDefFont.GetPitch(), aLangDefFont.GetCharSet(), nFontWhich);
488
		}
489
490
		pDoc->SetDefault(*pFontItem);
491
		delete pFontItem; 
492
493
		sal_Int32 nFontHeight = pStdFont->GetFontHeight( FONT_STANDARD, i, eLanguage );
494
		if(nFontHeight <= 0)
495
			nFontHeight = pStdFont->GetDefaultHeightFor( nFontId, eLanguage );
496
		pDoc->SetDefault(SvxFontHeightItem( nFontHeight, 100, aFontHeightWhich[i] ));
497
		pDoc->SetDefault( SvxLanguageItem( eLanguage, aLangWhich[i] ) );
498
	}
499
}
500
// end
501
361
/*--------------------------------------------------------------------
502
/*--------------------------------------------------------------------
362
	Beschreibung:	Ctor mit SfxCreateMode ?????
503
	Beschreibung:	Ctor mit SfxCreateMode ?????
363
 --------------------------------------------------------------------*/
504
 --------------------------------------------------------------------*/
(-)old/sw/source/ui/dochdl/swdtflvr.cxx (-1 / +3 lines)
Lines 836-842 Link Here
836
		if( pWrtShell->IsAddMode() && pWrtShell->SwCrsrShell::HasSelection() )
836
		if( pWrtShell->IsAddMode() && pWrtShell->SwCrsrShell::HasSelection() )
837
			pWrtShell->CreateCrsr();
837
			pWrtShell->CreateCrsr();
838
838
839
        SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
839
        SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
840
841
		SwDocShell::InitDefaultFontAttr( pTmpDoc ); //#115580# added at 2011/11/28
840
842
841
		pTmpDoc->LockExpFlds(); 	// nie die Felder updaten - Text so belassen
843
		pTmpDoc->LockExpFlds(); 	// nie die Felder updaten - Text so belassen
842
		pWrtShell->Copy( pTmpDoc );
844
		pWrtShell->Copy( pTmpDoc );

Return to issue 115580