diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-10-30 20:38:56 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-10-30 20:53:36 +0000 |
commit | f891267b03197bc9facbbb1d86774853f33c2c45 (patch) | |
tree | 820d80cff7033c964c9235109609e72990eafecf /vcl/source/window/toolbox2.cxx | |
parent | 641b9cb1d0934b3f8b4a80279cb3f3f81ecc4707 (diff) |
toolbox: don't need "ItemImageOriginal" anymore
Change-Id: I7037b7a8c70150f9946cca0c48607bd887779c82
Reviewed-on: https://gerrit.libreoffice.org/30405
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 983fa1fbddf9..f5c801625417 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -105,8 +105,7 @@ ImplToolItem::ImplToolItem() ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nItemBits ) : - maImage( rImage ), - maImageOriginal( rImage ) + maImage( rImage ) { init(nItemId, nItemBits, false); } @@ -121,7 +120,6 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const OUString& rText, ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, const OUString& rText, ToolBoxItemBits nItemBits ) : maImage( rImage ), - maImageOriginal( rImage ), maText( rText ) { init(nItemId, nItemBits, false); @@ -953,13 +951,10 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { - Image aImage(rImage); - ImplToolItem* pItem = &mpData->m_aItems[nPos]; Size aOldSize = pItem->maImage.GetSizePixel(); - pItem->maImageOriginal = aImage; - pItem->maImage = aImage; + pItem->maImage = rImage; // only once all is calculated, do extra work if (!mbCalc) @@ -1014,7 +1009,6 @@ void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ) if( nDeltaAngle && !!pItem->maImage ) { pItem->maImage = ImplRotImage( pItem->maImage, nDeltaAngle ); - pItem->maImageOriginal = ImplRotImage( pItem->maImageOriginal, nDeltaAngle ); } if (!mbCalc) @@ -1052,7 +1046,6 @@ void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ) if (!!pItem->maImage) { pItem->maImage = ImplMirrorImage(pItem->maImage); - pItem->maImageOriginal = ImplMirrorImage(pItem->maImageOriginal); } if (!mbCalc) @@ -1067,12 +1060,6 @@ Image ToolBox::GetItemImage(sal_uInt16 nItemId) const return pItem ? pItem->maImage : Image(); } -Image ToolBox::GetItemImageOriginal(sal_uInt16 nItemId) const -{ - ImplToolItem* pItem = ImplGetItem(nItemId); - return pItem ? pItem->maImageOriginal : Image(); -} - void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1660,7 +1647,7 @@ void ToolBox::UpdateCustomMenu() { sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START; MenuItemBits nMenuItemBits = ConvertBitsFromToolBoxToMenu(it->mnBits); - pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits); + pMenu->InsertItem( id, it->maText, it->maImage, nMenuItemBits); pMenu->SetItemCommand( id, it->maCommandStr ); pMenu->EnableItem( id, it->mbEnabled ); pMenu->CheckItem ( id, it->meState == TRISTATE_TRUE ); @@ -1678,7 +1665,7 @@ void ToolBox::UpdateCustomMenu() { sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START; MenuItemBits nMenuItemBits = ConvertBitsFromToolBoxToMenu(it->mnBits); - pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits ); + pMenu->InsertItem( id, it->maText, it->maImage, nMenuItemBits ); pMenu->SetItemCommand( id, it->maCommandStr ); pMenu->EnableItem( id, it->mbEnabled ); pMenu->CheckItem( id, it->meState == TRISTATE_TRUE ); |