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# |
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 |
} |
139 |
} |
180 |
} |
140 |
EditPaM aEnd2PaM( aCurSel.Max() ); |
181 |
EditPaM aEnd2PaM( aCurSel.Max() ); |
141 |
//AddRTFDefaultValues( aStart2PaM, aEnd2PaM ); |
182 |
//AddRTFDefaultValues( aStart2PaM, aEnd2PaM ); |
Lines 145-158
Link Here
|
145 |
// => Zeichenattribute machen. |
186 |
// => Zeichenattribute machen. |
146 |
|
187 |
|
147 |
sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; |
188 |
sal_Bool bSpecialBackward = aStart1PaM.GetNode()->Len() ? sal_False : sal_True; |
148 |
if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() ) |
189 |
/* if ( bOnlyOnePara || aStart1PaM.GetNode()->Len() ) //#115580# |
149 |
pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); |
190 |
pImpEditEngine->ParaAttribsToCharAttribs( aStart2PaM.GetNode() ); */ |
|
|
191 |
// end |
150 |
aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs( |
192 |
aCurSel.Min() = pImpEditEngine->ImpConnectParagraphs( |
151 |
aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); |
193 |
aStart1PaM.GetNode(), aStart2PaM.GetNode(), bSpecialBackward ); |
152 |
bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; |
194 |
bSpecialBackward = aEnd1PaM.GetNode()->Len() ? sal_True : sal_False; |
153 |
// wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden. |
195 |
// wenn bOnlyOnePara, dann ist der Node beim Connect verschwunden. |
154 |
if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() ) |
196 |
/* if ( !bOnlyOnePara && aEnd1PaM.GetNode()->Len() ) //#115580# |
155 |
pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); |
197 |
pImpEditEngine->ParaAttribsToCharAttribs( aEnd2PaM.GetNode() ); */ |
|
|
198 |
// end |
156 |
aCurSel.Max() = pImpEditEngine->ImpConnectParagraphs( |
199 |
aCurSel.Max() = pImpEditEngine->ImpConnectParagraphs( |
157 |
( bOnlyOnePara ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ), |
200 |
( bOnlyOnePara ? aStart1PaM.GetNode() : aEnd2PaM.GetNode() ), |
158 |
aEnd1PaM.GetNode(), bSpecialBackward ); |
201 |
aEnd1PaM.GetNode(), bSpecialBackward ); |