diff options
Diffstat (limited to 'vcl/source/window/toolbox2.cxx')
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 69ee1252db7f..412fe331897a 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -170,6 +170,7 @@ ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) : maItemSize ( rItem.maItemSize ), mnSepSize ( rItem.mnSepSize ), mnDropDownArrowWidth ( rItem.mnDropDownArrowWidth ), + maContentSize ( rItem.maContentSize ), meType ( rItem.meType ), mnBits ( rItem.mnBits ), meState ( rItem.meState ), @@ -208,6 +209,7 @@ ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) maCalcRect = rItem.maCalcRect; mnSepSize = rItem.mnSepSize; mnDropDownArrowWidth = rItem.mnDropDownArrowWidth; + maContentSize = rItem.maContentSize; maMinimalItemSize = rItem.maMinimalItemSize; maItemSize = rItem.maItemSize; mbVisibleText = rItem.mbVisibleText; @@ -1239,6 +1241,18 @@ Rectangle ToolBox::GetItemPosRect( sal_uInt16 nPos ) const return Rectangle(); } +Size ToolBox::GetItemContentSize( sal_uInt16 nItemId ) const +{ + if ( mbCalc || mbFormat ) + ((ToolBox*)this)->ImplFormat(); + + sal_uInt16 nPos = GetItemPos( nItemId ); + if ( nPos < mpData->m_aItems.size() ) + return mpData->m_aItems[nPos].maContentSize; + else + return Size(); +} + // ----------------------------------------------------------------------- sal_Bool ToolBox::ImplHasExternalMenubutton() |