diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-23 12:44:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-23 13:56:36 +0000 |
commit | a9edd1267e42ba4e7814102bcaab6610d14bc3b8 (patch) | |
tree | 6a57c8571b9c66e7e5835180b51898a8c8fabb3c /editeng | |
parent | 23d66e25c0ede411d00404dcc7a36e880c22e67f (diff) |
callcatcher: remove newly unused code
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 1 | ||||
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 150 |
2 files changed, 0 insertions, 151 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 3e2338a74b0b..e427fcd7ec3a 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -978,7 +978,6 @@ public: void SetCharStretching( sal_uInt16 nX, sal_uInt16 nY ); inline void GetCharStretching( sal_uInt16& rX, sal_uInt16& rY ); - void DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ); void SetBigTextObjectStart( sal_uInt16 nStartAtPortionCount ) { nBigTextObjectStart = nStartAtPortionCount; } sal_uInt16 GetBigTextObjectStart() const { return nBigTextObjectStart; } diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index bdf1bbd03aeb..b48cd3f28792 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -4061,156 +4061,6 @@ void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY ) } } -void ImpEditEngine::DoStretchChars( sal_uInt16 nX, sal_uInt16 nY ) -{ - UndoActionStart( EDITUNDO_STRETCH ); - sal_uInt16 nParas = GetEditDoc().Count(); - for ( sal_uInt16 nPara = 0; nPara < nParas; nPara++ ) - { - ContentNode* pNode = GetEditDoc()[nPara]; - SfxItemSet aTmpSet( pNode->GetContentAttribs().GetItems() ); - - if ( nX != 100 ) - { - // Font width - SvxCharScaleWidthItem* pNewWidth = (SvxCharScaleWidthItem*) pNode->GetContentAttribs().GetItem( EE_CHAR_FONTWIDTH ).Clone(); - sal_uInt32 nProp = pNewWidth->GetValue(); // sal_uInt32, can get big temporary - nProp *= nX; - nProp /= 100; - pNewWidth->SetValue( (sal_uInt16)nProp ); - aTmpSet.Put( *pNewWidth ); - delete pNewWidth; - - // Kerning: - const SvxKerningItem& rKerningItem = - (const SvxKerningItem&)pNode->GetContentAttribs().GetItem( EE_CHAR_KERNING ); - SvxKerningItem* pNewKerning = (SvxKerningItem*)rKerningItem.Clone(); - long nKerning = pNewKerning->GetValue(); - if ( nKerning > 0 ) - { - nKerning *= nX; - nKerning /= 100; - } - else if ( nKerning < 0 ) - { - // For negative values: - // For stretching > 100 the values must become smaller and vice versa - nKerning *= 100; - nKerning /= nX; - } - pNewKerning->SetValue( (short)nKerning ); - aTmpSet.Put( *pNewKerning); - delete pNewKerning; - } - else - aTmpSet.ClearItem( EE_CHAR_FONTWIDTH ); - - if ( nY != 100 ) - { - // Font height - for ( int nItem = 0; nItem < 3; nItem++ ) - { - sal_uInt16 nItemId = EE_CHAR_FONTHEIGHT; - if ( nItem == 1 ) - nItemId = EE_CHAR_FONTHEIGHT_CJK; - else if ( nItem == 2 ) - nItemId = EE_CHAR_FONTHEIGHT_CTL; - - const SvxFontHeightItem& rHeightItem = - (const SvxFontHeightItem&)pNode->GetContentAttribs().GetItem( nItemId ); - SvxFontHeightItem* pNewHeight = (SvxFontHeightItem*)rHeightItem.Clone(); - sal_uInt32 nHeight = pNewHeight->GetHeight(); - nHeight *= nY; - nHeight /= 100; - pNewHeight->SetHeightValue( nHeight ); - aTmpSet.Put( *pNewHeight ); - delete pNewHeight; - } - - // Paragraph spacing - const SvxULSpaceItem& rULSpaceItem = - (const SvxULSpaceItem&)pNode->GetContentAttribs().GetItem( EE_PARA_ULSPACE ); - SvxULSpaceItem* pNewUL = (SvxULSpaceItem*)rULSpaceItem.Clone(); - sal_uInt32 nUpper = pNewUL->GetUpper(); - nUpper *= nY; - nUpper /= 100; - pNewUL->SetUpper( (sal_uInt16)nUpper ); - sal_uInt32 nLower = pNewUL->GetLower(); - nLower *= nY; - nLower /= 100; - pNewUL->SetLower( (sal_uInt16)nLower ); - aTmpSet.Put( *pNewUL ); - delete pNewUL; - } - else - aTmpSet.ClearItem( EE_CHAR_FONTHEIGHT ); - - SetParaAttribs( nPara, aTmpSet ); - - // hard attributes: - sal_uInt16 nLastEnd = 0; // so not again after removing them and new - CharAttribArray& rAttribs = pNode->GetCharAttribs().GetAttribs(); - sal_uInt16 nAttribs = rAttribs.Count(); - for ( sal_uInt16 nAttr = 0; nAttr < nAttribs; nAttr++ ) - { - EditCharAttrib* pAttr = rAttribs[nAttr]; - if ( pAttr->GetStart() >= nLastEnd ) - { - sal_uInt16 nWhich = pAttr->Which(); - SfxPoolItem* pNew = 0; - if ( nWhich == EE_CHAR_FONTHEIGHT ) - { - SvxFontHeightItem* pNewHeight = (SvxFontHeightItem*)pAttr->GetItem()->Clone(); - sal_uInt32 nHeight = pNewHeight->GetHeight(); - nHeight *= nY; - nHeight /= 100; - pNewHeight->SetHeightValue( nHeight ); - pNew = pNewHeight; - } - else if ( nWhich == EE_CHAR_FONTWIDTH ) - { - SvxCharScaleWidthItem* pNewWidth = (SvxCharScaleWidthItem*)pAttr->GetItem()->Clone(); - sal_uInt32 nProp = pNewWidth->GetValue(); - nProp *= nX; - nProp /= 100; - pNewWidth->SetValue( (sal_uInt16)nProp ); - pNew = pNewWidth; - } - else if ( nWhich == EE_CHAR_KERNING ) - { - SvxKerningItem* pNewKerning = (SvxKerningItem*)pAttr->GetItem()->Clone(); - long nKerning = pNewKerning->GetValue(); - if ( nKerning > 0 ) - { - nKerning *= nX; - nKerning /= 100; - } - else if ( nKerning < 0 ) - { - // For negative values: - // For stretching > 100 the values must become smaller and vice versa. - nKerning *= 100; - nKerning /= nX; - } - pNewKerning->SetValue( (short)nKerning ); - pNew = pNewKerning; - } - if ( pNew ) - { - SfxItemSet _aTmpSet( GetEmptyItemSet() ); - _aTmpSet.Put( *pNew ); - SetAttribs( EditSelection( EditPaM( pNode, pAttr->GetStart() ), - EditPaM( pNode, pAttr->GetEnd() ) ), _aTmpSet ); - - nLastEnd = pAttr->GetEnd(); - delete pNew; - } - } - } - } - UndoActionEnd( EDITUNDO_STRETCH ); -} - const SvxNumberFormat* ImpEditEngine::GetNumberFormat( const ContentNode *pNode ) const { const SvxNumberFormat *pRes = 0; |