txtattr.cxx (69a74367) | txtattr.cxx (782a276c) |
---|---|
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 --- 183 unchanged lines hidden (view full) --- 192 return; 193 } 194} 195 196 197void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) 198{ 199 sal_uInt16 nSlot = rReq.GetSlot(); | 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 --- 183 unchanged lines hidden (view full) --- 192 return; 193 } 194} 195 196 197void SwTextShell::ExecCharAttrArgs(SfxRequest &rReq) 198{ 199 sal_uInt16 nSlot = rReq.GetSlot(); |
200 const SfxItemSet* pArgs = rReq.GetArgs(); 201 sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0; 202 int bGrow = sal_False; 203 SwWrtShell& rWrtSh = GetShell(); 204 SwTxtFmtColl* pColl = 0; | 200 const SfxItemSet* pArgs = rReq.GetArgs(); 201 sal_Bool bArgs = pArgs != 0 && pArgs->Count() > 0; 202 int bGrow = sal_False; 203 SwWrtShell& rWrtSh = GetShell(); 204 SwTxtFmtColl* pColl = 0; |
205 | 205 |
206 // nur gesetzt, wenn gesamter Absatz selektiert ist und AutoUpdateFmt gesetzt ist 207 if( rWrtSh.HasSelection() && rWrtSh.IsSelFullPara() ) 208 { 209 pColl = rWrtSh.GetCurTxtFmtColl(); 210 if(pColl && !pColl->IsAutoUpdateFmt()) 211 pColl = 0; 212 } 213 SfxItemPool& rPool = GetPool(); 214 sal_uInt16 nWhich = rPool.GetWhich(nSlot); 215 switch ( nSlot ) 216 { 217 case FN_TXTATR_INET: 218 // Sonderbehandlung der PoolId des SwFmtInetFmt 219 if(bArgs) 220 { 221 const SfxPoolItem& rItem = pArgs->Get(nWhich ); | 206 // nur gesetzt, wenn gesamter Absatz selektiert ist und AutoUpdateFmt gesetzt ist 207 if ( rWrtSh.HasSelection() && rWrtSh.IsSelFullPara() ) 208 { 209 pColl = rWrtSh.GetCurTxtFmtColl(); 210 if ( pColl && !pColl->IsAutoUpdateFmt() ) 211 pColl = 0; 212 } 213 SfxItemPool& rPool = GetPool(); 214 sal_uInt16 nWhich = rPool.GetWhich( nSlot ); 215 switch (nSlot) 216 { 217 case FN_TXTATR_INET: 218 // Sonderbehandlung der PoolId des SwFmtInetFmt 219 if ( bArgs ) 220 { 221 const SfxPoolItem& rItem = pArgs->Get( nWhich ); |
222 | 222 |
223 SwFmtINetFmt aINetFmt((const SwFmtINetFmt&)rItem); 224 if( USHRT_MAX == aINetFmt.GetVisitedFmtId() ) 225 { 226 aINetFmt.SetVisitedFmtId( 227 SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetVisitedFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT)); 228 } 229 if( USHRT_MAX == aINetFmt.GetINetFmtId() ) 230 { 231 aINetFmt.SetINetFmtId( 232 SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetINetFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT)); 233 } | 223 SwFmtINetFmt aINetFmt( (const SwFmtINetFmt&) rItem ); 224 if ( USHRT_MAX == aINetFmt.GetVisitedFmtId() ) 225 { 226 ASSERT( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected visited character format ID at hyperlink attribute" ); 227 aINetFmt.SetVisitedFmtAndId( 228 aINetFmt.GetVisitedFmt(), 229 SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetVisitedFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); 230 } 231 if ( USHRT_MAX == aINetFmt.GetINetFmtId() ) 232 { 233 ASSERT( false, "<SwTextShell::ExecCharAttrArgs(..)> - unexpected unvisited character format ID at hyperlink attribute" ); 234 aINetFmt.SetINetFmtAndId( 235 aINetFmt.GetINetFmt(), 236 SwStyleNameMapper::GetPoolIdFromUIName( aINetFmt.GetINetFmt(), nsSwGetPoolIdFromName::GET_POOLID_CHRFMT ) ); 237 } |
234 | 238 |
235 if ( pColl ) | 239 if ( pColl ) |
236 pColl->SetFmtAttr( aINetFmt ); | 240 pColl->SetFmtAttr( aINetFmt ); |
237 else rWrtSh.SetAttrItem( aINetFmt ); | 241 else 242 rWrtSh.SetAttrItem( aINetFmt ); |
238 rReq.Done(); | 243 rReq.Done(); |
239 } 240 break; | 244 } 245 break; |
241 242 case FN_GROW_FONT_SIZE: 243 bGrow = sal_True; 244 // kein break !! 245 case FN_SHRINK_FONT_SIZE: 246 { 247 SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT, rPool ); 248 rWrtSh.GetCurAttr( aSetItem.GetItemSet() ); --- 609 unchanged lines hidden --- | 246 247 case FN_GROW_FONT_SIZE: 248 bGrow = sal_True; 249 // kein break !! 250 case FN_SHRINK_FONT_SIZE: 251 { 252 SvxScriptSetItem aSetItem( SID_ATTR_CHAR_FONTHEIGHT, rPool ); 253 rWrtSh.GetCurAttr( aSetItem.GetItemSet() ); --- 609 unchanged lines hidden --- |