editdoc.cxx (8b085085) | editdoc.cxx (5b4f8e55) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1052 unchanged lines hidden (view full) --- 1061 DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute NACH AppendAttribs kaputt" ); 1062#endif 1063} 1064 1065void ContentNode::CreateDefFont() 1066{ 1067 // Erst alle Informationen aus dem Style verwenden... 1068 SfxStyleSheet* pS = aContentAttribs.GetStyleSheet(); | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1052 unchanged lines hidden (view full) --- 1061 DBG_ASSERT( aCharAttribList.DbgCheckAttribs(), "Attribute NACH AppendAttribs kaputt" ); 1062#endif 1063} 1064 1065void ContentNode::CreateDefFont() 1066{ 1067 // Erst alle Informationen aus dem Style verwenden... 1068 SfxStyleSheet* pS = aContentAttribs.GetStyleSheet(); |
1069 /* if ( pS ) //#115580# 1070 CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() ); 1071 | 1069 if ( pS ) 1070 CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() ); 1071 |
1072 // ... dann die harte Absatzformatierung rueberbuegeln... 1073 CreateFont( GetCharAttribs().GetDefFont(), | 1072 // ... dann die harte Absatzformatierung rueberbuegeln... 1073 CreateFont( GetCharAttribs().GetDefFont(), |
1074 GetContentAttribs().GetItems(), pS == NULL ); */ 1075 1076 SvxFont& rFont = GetCharAttribs().GetDefFont(); 1077 SvxFont& rFontCJK = GetCharAttribs().GetDefFontCJK(); 1078 SvxFont& rFontCTL = GetCharAttribs().GetDefFontCTL(); 1079 1080 if ( pS ) 1081 { 1082 CreateFont( rFont, pS->GetItemSet(), sal_True, i18n::ScriptType::LATIN ); 1083 CreateFont( rFontCJK, pS->GetItemSet(), sal_True, i18n::ScriptType::ASIAN ); 1084 CreateFont( rFontCTL, pS->GetItemSet(), sal_True, i18n::ScriptType::COMPLEX ); 1085 } 1086 1087 CreateFont( rFont, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::LATIN ); 1088 CreateFont( rFontCJK, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::ASIAN ); 1089 CreateFont( rFontCTL, GetContentAttribs().GetItems(), pS == NULL, i18n::ScriptType::COMPLEX ); | 1074 GetContentAttribs().GetItems(), pS == NULL ); |
1090} 1091 1092void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle ) 1093{ 1094 aContentAttribs.SetStyleSheet( pS ); 1095 1096 // Erst alle Informationen aus dem Style verwenden... 1097 GetCharAttribs().GetDefFont() = rFontFromStyle; --- 360 unchanged lines hidden (view full) --- 1458 1459sal_uLong EditDoc::GetTextLen() const 1460{ 1461 sal_uLong nLen = 0; 1462 for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ ) 1463 { 1464 ContentNode* pNode = GetObject( nNode ); 1465 nLen += pNode->Len(); | 1075} 1076 1077void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle ) 1078{ 1079 aContentAttribs.SetStyleSheet( pS ); 1080 1081 // Erst alle Informationen aus dem Style verwenden... 1082 GetCharAttribs().GetDefFont() = rFontFromStyle; --- 360 unchanged lines hidden (view full) --- 1443 1444sal_uLong EditDoc::GetTextLen() const 1445{ 1446 sal_uLong nLen = 0; 1447 for ( sal_uInt16 nNode = 0; nNode < Count(); nNode++ ) 1448 { 1449 ContentNode* pNode = GetObject( nNode ); 1450 nLen += pNode->Len(); |
1466 // Felder k???nnen laenger sein als der Platzhalter im Node. | 1451 // Felder k�nnen laenger sein als der Platzhalter im Node. |
1467 const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); 1468 for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; ) 1469 { 1470 EditCharAttrib* pAttr = rAttrs[--nAttr]; 1471 if ( pAttr->Which() == EE_FEATURE_FIELD ) 1472 { 1473 sal_uInt16 nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len(); 1474 if ( !nFieldLen ) --- 95 unchanged lines hidden (view full) --- 1570 // for a new paragraph we like to have the bullet/numbering visible by default 1571 aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_True), EE_PARA_BULLETSTATE ); 1572 1573 // ContenNode-CTOR kopiert auch die Absatzattribute 1574 ContentNode* pNode = new ContentNode( aStr, aContentAttribs ); 1575 1576 // Den Default-Font kopieren 1577 pNode->GetCharAttribs().GetDefFont() = aPaM.GetNode()->GetCharAttribs().GetDefFont(); | 1452 const CharAttribArray& rAttrs = pNode->GetCharAttribs().GetAttribs(); 1453 for ( sal_uInt16 nAttr = rAttrs.Count(); nAttr; ) 1454 { 1455 EditCharAttrib* pAttr = rAttrs[--nAttr]; 1456 if ( pAttr->Which() == EE_FEATURE_FIELD ) 1457 { 1458 sal_uInt16 nFieldLen = ((EditCharAttribField*)pAttr)->GetFieldValue().Len(); 1459 if ( !nFieldLen ) --- 95 unchanged lines hidden (view full) --- 1555 // for a new paragraph we like to have the bullet/numbering visible by default 1556 aContentAttribs.GetItems().Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_True), EE_PARA_BULLETSTATE ); 1557 1558 // ContenNode-CTOR kopiert auch die Absatzattribute 1559 ContentNode* pNode = new ContentNode( aStr, aContentAttribs ); 1560 1561 // Den Default-Font kopieren 1562 pNode->GetCharAttribs().GetDefFont() = aPaM.GetNode()->GetCharAttribs().GetDefFont(); |
1578 //#115580# start 1579 pNode->GetCharAttribs().GetDefFontCJK() = aPaM.GetNode()->GetCharAttribs().GetDefFontCJK(); 1580 pNode->GetCharAttribs().GetDefFontCTL() = aPaM.GetNode()->GetCharAttribs().GetDefFontCTL(); | |
1581 SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet(); 1582 if ( pStyle ) 1583 { 1584 XubString aFollow( pStyle->GetFollow() ); 1585 if ( aFollow.Len() && ( aFollow != pStyle->GetName() ) ) 1586 { 1587 SfxStyleSheetBase* pNext = pStyle->GetPool().Find( aFollow, pStyle->GetFamily() ); 1588 pNode->SetStyleSheet( (SfxStyleSheet*)pNext ); --- 736 unchanged lines hidden --- | 1563 SfxStyleSheet* pStyle = aPaM.GetNode()->GetStyleSheet(); 1564 if ( pStyle ) 1565 { 1566 XubString aFollow( pStyle->GetFollow() ); 1567 if ( aFollow.Len() && ( aFollow != pStyle->GetName() ) ) 1568 { 1569 SfxStyleSheetBase* pNext = pStyle->GetPool().Find( aFollow, pStyle->GetFamily() ); 1570 pNode->SetStyleSheet( (SfxStyleSheet*)pNext ); --- 736 unchanged lines hidden --- |