formatclipboard.cxx (efeef26f) formatclipboard.cxx (69a74367)
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

--- 495 unchanged lines hidden (view full) ---

504 {
505 SwDocStyleSheet* pStyle = (SwDocStyleSheet*)pPool->Find(m_aCharStyle, SFX_STYLE_FAMILY_CHAR);
506 if( pStyle )
507 {
508 SwFmtCharFmt aFmt(pStyle->GetCharFmt());
509 // #144857# collect items from character style
510 lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
511 sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
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

--- 495 unchanged lines hidden (view full) ---

504 {
505 SwDocStyleSheet* pStyle = (SwDocStyleSheet*)pPool->Find(m_aCharStyle, SFX_STYLE_FAMILY_CHAR);
506 if( pStyle )
507 {
508 SwFmtCharFmt aFmt(pStyle->GetCharFmt());
509 // #144857# collect items from character style
510 lcl_AppendSetItems( aItemVector, aFmt.GetCharFmt()->GetAttrSet());
511 sal_uInt16 nFlags=0; //(nMode & KEY_SHIFT) ? SETATTR_DONTREPLACE : SETATTR_DEFAULT;
512 rWrtShell.SetAttr( aFmt, nFlags );
512 rWrtShell.SetAttrItem( aFmt, nFlags );
513 }
514 }
515 if(m_aParaStyle.Len() && !bNoParagraphFormats )
516 {
517 SwDocStyleSheet* pStyle = (SwDocStyleSheet*)pPool->Find(m_aParaStyle, SFX_STYLE_FAMILY_PARA);
518 if( pStyle )
519 {
520 // #144857# collect items from paragraph style

--- 24 unchanged lines hidden (view full) ---

545 pTemplateItemSet->Put( *m_pItemSet );
546 // #144857# only _set_ attributes that differ from style attributes should be applied - the style is applied anyway
547 lcl_RemoveEqualItems( *pTemplateItemSet, aItemVector );
548
549 if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) )
550 rWrtShell.SetFlyFrmAttr(*pTemplateItemSet);
551 else
552 {
513 }
514 }
515 if(m_aParaStyle.Len() && !bNoParagraphFormats )
516 {
517 SwDocStyleSheet* pStyle = (SwDocStyleSheet*)pPool->Find(m_aParaStyle, SFX_STYLE_FAMILY_PARA);
518 if( pStyle )
519 {
520 // #144857# collect items from paragraph style

--- 24 unchanged lines hidden (view full) ---

545 pTemplateItemSet->Put( *m_pItemSet );
546 // #144857# only _set_ attributes that differ from style attributes should be applied - the style is applied anyway
547 lcl_RemoveEqualItems( *pTemplateItemSet, aItemVector );
548
549 if( nSelectionType & (nsSelectionType::SEL_FRM | nsSelectionType::SEL_OLE | nsSelectionType::SEL_GRF) )
550 rWrtShell.SetFlyFrmAttr(*pTemplateItemSet);
551 else
552 {
553 rWrtShell.SetAttr(*pTemplateItemSet);
553 rWrtShell.SetAttrSet(*pTemplateItemSet);
554
555 // additional numbering properties for paragraph styles
556 if( nSelectionType & nsSelectionType::SEL_TXT && rWrtShell.GetCurNumRule() )
557 {
558 if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART) )
559 {
560 sal_Bool bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
561 sal_uInt16 nNumStart = USHRT_MAX;

--- 52 unchanged lines hidden ---
554
555 // additional numbering properties for paragraph styles
556 if( nSelectionType & nsSelectionType::SEL_TXT && rWrtShell.GetCurNumRule() )
557 {
558 if( SFX_ITEM_SET == pTemplateItemSet->GetItemState(FN_NUMBER_NEWSTART) )
559 {
560 sal_Bool bStart = ((SfxBoolItem&)pTemplateItemSet->Get(FN_NUMBER_NEWSTART)).GetValue();
561 sal_uInt16 nNumStart = USHRT_MAX;

--- 52 unchanged lines hidden ---