diff options
author | Christian M. Heller <christian.heller63@gmail.com> | 2014-02-22 11:41:20 -0500 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-26 04:26:04 -0600 |
commit | 45261b88c4935c0a6dd57e8a47438b799d091957 (patch) | |
tree | fa3a65853a5c9d6c1736a57822729c088eab6688 | |
parent | e8e4fc00e783d4f854de3d6b666c3c8268b12db4 (diff) |
fdo#39468 Translate German Comments - vcl/source/window/toolbox2.cxx
Conflicts:
vcl/source/window/toolbox2.cxx
Change-Id: Ifcb3a31733d8122d228596e8ec1253990f979471
Reviewed-on: https://gerrit.libreoffice.org/8174
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 277 |
1 files changed, 43 insertions, 234 deletions
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index ea5e3ef2200f..aa27d30c9a45 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -56,12 +56,9 @@ using namespace vcl; using namespace com::sun::star; -// ======================================================================= #define TB_SEP_SIZE 8 - - ImplToolBoxPrivateData::ImplToolBoxPrivateData() : m_pLayoutData( NULL ), mpImageListProvider( NULL ), @@ -125,8 +122,6 @@ ImplToolItem::ImplToolItem() init(0, 0, true); } - - ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nItemBits ) : maImage( rImage ) @@ -134,8 +129,6 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, init(nItemId, nItemBits, false); } - - ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const OUString& rText, ToolBoxItemBits nItemBits ) : maText( rText ) @@ -143,8 +136,6 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const OUString& rText, init(nItemId, nItemBits, false); } - - ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, const OUString& rText, ToolBoxItemBits nItemBits ) : maImage( rImage ), @@ -153,8 +144,6 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, init(nItemId, nItemBits, false); } - - ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) : mpWindow ( rItem.mpWindow ), mpUserData ( rItem.mpUserData ), @@ -188,14 +177,10 @@ ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) : { } - - ImplToolItem::~ImplToolItem() { } - - ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) { mpWindow = rItem.mpWindow; @@ -230,8 +215,6 @@ ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) return *this; } - - Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) { Size aSize( rDefaultSize ); // the size of 'standard' toolbox items @@ -284,8 +267,6 @@ Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, cons return aSize; } - - void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbImage, bool& rbText ) const { if ( meType != TOOLBOXITEM_BUTTON ) @@ -344,8 +325,6 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbIma } } - - Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const { Rectangle aRect; @@ -362,23 +341,16 @@ Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const return aRect; } - - bool ImplToolItem::IsClipped() const { return ( meType == TOOLBOXITEM_BUTTON && mbVisible && maRect.IsEmpty() ); } - - bool ImplToolItem::IsItemHidden() const { return ( meType == TOOLBOXITEM_BUTTON && !mbVisible ); } - - - const OUString ToolBox::ImplConvertMenuString( const OUString& rStr ) { OUString aCvtStr( rStr ); @@ -388,8 +360,6 @@ const OUString ToolBox::ImplConvertMenuString( const OUString& rStr ) return aCvtStr; } - - void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) { ImplUpdateInputEnable(); @@ -401,7 +371,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) { mbFormat = true; - // Muss ueberhaupt eine neue Ausgabe erfolgen + // do we need to redraw? if ( IsReallyVisible() && IsUpdateMode() ) { Invalidate( Rectangle( mnLeftBorder, mnTopBorder, @@ -415,7 +385,7 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) { mbFormat = true; - // Muss ueberhaupt eine neue Ausgabe erfolgen + // do we need to redraw? if ( IsReallyVisible() && IsUpdateMode() ) maTimer.Start(); } @@ -425,11 +395,9 @@ void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) ImplCallEventListeners( VCLEVENT_TOOLBOX_FORMATCHANGED ); } - - void ToolBox::ImplUpdateItem( sal_uInt16 nIndex ) { - // Muss ueberhaupt eine neue Ausgabe erfolgen + // do we need to redraw? if ( IsReallyVisible() && IsUpdateMode() ) { if ( nIndex == 0xFFFF ) @@ -451,24 +419,18 @@ void ToolBox::ImplUpdateItem( sal_uInt16 nIndex ) } } - - void ToolBox::Click() { ImplCallEventListeners( VCLEVENT_TOOLBOX_CLICK ); maClickHdl.Call( this ); } - - void ToolBox::DoubleClick() { ImplCallEventListeners( VCLEVENT_TOOLBOX_DOUBLECLICK ); maDoubleClickHdl.Call( this ); } - - void ToolBox::Activate() { mnActivateCount++; @@ -476,8 +438,6 @@ void ToolBox::Activate() maActivateHdl.Call( this ); } - - void ToolBox::Deactivate() { mnActivateCount--; @@ -485,16 +445,12 @@ void ToolBox::Deactivate() maDeactivateHdl.Call( this ); } - - void ToolBox::Highlight() { ImplCallEventListeners( VCLEVENT_TOOLBOX_HIGHLIGHT ); maHighlightHdl.Call( this ); } - - void ToolBox::Select() { ImplDelData aDelData; @@ -513,26 +469,20 @@ void ToolBox::Select() pWrapper->GetFloatingWindow()->EndPopupMode(); } - - void ToolBox::Customize( const ToolBoxCustomizeEvent& ) { } - - void ToolBox::UserDraw( const UserDrawEvent& ) { } - - void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) { - sal_uLong nObjMask; - bool bImage = false; // Wurde Image gesetzt + sal_uLong nObjMask; + bool bImage = false; // has image - // Item anlegen + // create item ImplToolItem aItem; GetRes( rResId.SetRT( RSC_TOOLBOXITEM ) ); @@ -585,12 +535,11 @@ void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) if ( nObjMask & RSC_TOOLBOXITEM_COMMAND ) aItem.maCommandStr = ReadStringRes(); - // Wenn kein Image geladen wurde, versuchen wir das Image aus der - // Image-Liste zu holen + // if no image is loaded, try to load one from the image list if ( !bImage && aItem.mnId ) aItem.maImage = maImageList.GetImage( aItem.mnId ); - // Wenn es sich um ein ButtonItem handelt, die ID ueberpruefen + // if this is a ButtonItem, check ID bool bNewCalc; if ( aItem.meType != TOOLBOXITEM_BUTTON ) { @@ -606,11 +555,11 @@ void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) "ToolBox::InsertItem(): ItemId already exists" ); } - // Item anlegen und in die Liste einfuegen + // create item and add to list mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - // ToolBox neu brechnen und neu ausgeben + // recalculate ToolBox and redraw ImplInvalidate( bNewCalc ); // Notify @@ -618,8 +567,6 @@ void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } - - void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nBits, sal_uInt16 nPos ) { @@ -627,7 +574,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, "ToolBox::InsertItem(): ItemId already exists" ); - // Item anlegen und in die Liste einfuegen + // create item and add to list mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, nBits ) ); SetItemImage(nItemId, rImage); mpData->ImplClearLayoutData(); @@ -639,8 +586,6 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >(nNewPos ) ); } - - void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, const OUString& rText, ToolBoxItemBits nBits, sal_uInt16 nPos ) @@ -649,7 +594,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, "ToolBox::InsertItem(): ItemId already exists" ); - // Item anlegen und in die Liste einfuegen + // create item and add to list mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, rImage, ImplConvertMenuString( rText ), nBits ) ); SetItemImage(nItemId, rImage); mpData->ImplClearLayoutData(); @@ -661,8 +606,6 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } - - void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, ToolBoxItemBits nBits, sal_uInt16 nPos ) { @@ -670,7 +613,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, "ToolBox::InsertItem(): ItemId already exists" ); - // Item anlegen und in die Liste einfuegen + // create item and add to list mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, ImplConvertMenuString( rText ), nBits ) ); mpData->ImplClearLayoutData(); @@ -681,7 +624,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } -/// Get label of the command (like of .uno:Save) from the description service. +// Get label of the command (like of .uno:Save) from the description service static OUString getCommandLabel(const OUString& rCommand, const uno::Reference<uno::XComponentContext>& rContext, const OUString& rModuleId) { if (rCommand.isEmpty()) @@ -717,7 +660,7 @@ static OUString getCommandLabel(const OUString& rCommand, const uno::Reference<u } -/// Get label of the command (like of .uno:Save) from the description service. +// Get label of the command (like of .uno:Save) from the description service static Image getCommandImage(const OUString& rCommand, bool bLarge, const uno::Reference<uno::XComponentContext>& rContext, const uno::Reference<frame::XFrame>& rFrame, const OUString& rModuleId) @@ -798,8 +741,6 @@ void ToolBox::InsertItem(const OUString& rCommand, const uno::Reference<frame::X pItem->maMinimalItemSize = rRequestedSize; } - - void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow, ToolBoxItemBits nBits, sal_uInt16 nPos ) { @@ -807,7 +748,7 @@ void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow, DBG_ASSERT( GetItemPos( nItemId ) == TOOLBOX_ITEM_NOTFOUND, "ToolBox::InsertWindow(): ItemId already exists" ); - // Item anlegen und in die Liste einfuegen + // create item and add to list ImplToolItem aItem; aItem.mnId = nItemId; aItem.meType = TOOLBOXITEM_BUTTON; @@ -826,11 +767,9 @@ void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow, ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } - - void ToolBox::InsertSpace( sal_uInt16 nPos ) { - // Item anlegen und in die Liste einfuegen + // create item and add to list ImplToolItem aItem; aItem.meType = TOOLBOXITEM_SPACE; aItem.mbEnabled = false; @@ -844,11 +783,9 @@ void ToolBox::InsertSpace( sal_uInt16 nPos ) ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } - - void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize ) { - // Item anlegen und in die Liste einfuegen + // create item and add to list ImplToolItem aItem; aItem.meType = TOOLBOXITEM_SEPARATOR; aItem.mbEnabled = false; @@ -864,11 +801,9 @@ void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize ) ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } - - void ToolBox::InsertBreak( sal_uInt16 nPos ) { - // Item anlegen und in die Liste einfuegen + // create item and add to list ImplToolItem aItem; aItem.meType = TOOLBOXITEM_BREAK; aItem.mbEnabled = false; @@ -882,8 +817,6 @@ void ToolBox::InsertBreak( sal_uInt16 nPos ) ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMADDED, reinterpret_cast< void* >( nNewPos ) ); } - - void ToolBox::RemoveItem( sal_uInt16 nPos ) { if( nPos < mpData->m_aItems.size() ) @@ -897,10 +830,10 @@ void ToolBox::RemoveItem( sal_uInt16 nPos ) if ( mpData->m_aItems[nPos].mpWindow ) mpData->m_aItems[nPos].mpWindow->Hide(); - // PaintRect um das removete Item erweitern + // add the removed item to PaintRect maPaintRect.Union( mpData->m_aItems[nPos].maRect ); - // Absichern gegen das Loeschen im Select-Handler + // ensure not to delete in the Select-Handler if ( mpData->m_aItems[nPos].mnId == mnCurItemId ) mnCurItemId = 0; if ( mpData->m_aItems[nPos].mnId == mnHighItemId ) @@ -916,8 +849,6 @@ void ToolBox::RemoveItem( sal_uInt16 nPos ) } } - - void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId, sal_uInt16 nNewPos ) { @@ -926,18 +857,18 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId, sal_uInt16 nPos = rToolBox.GetItemPos( nItemId ); - // Existiert Item + // found item if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { - // ToolBox-Item in der Liste verschieben + // push ToolBox item onto the list ImplToolItem aNewItem = rToolBox.mpData->m_aItems[nPos]; - // Bestimme Daten zuruecksetzen + // reset state aNewItem.mpWindow = NULL; aNewItem.mbShowWindow = false; mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem ); mpData->ImplClearLayoutData(); - // ToolBox neu ausgeben + // redraw ToolBox ImplInvalidate( false ); // Notify @@ -946,14 +877,12 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId, } } - - void ToolBox::Clear() { mpData->m_aItems.clear(); mpData->ImplClearLayoutData(); - // Absichern gegen das Loeschen im Select-Handler + // ensure not to delete in the Select-Handler mnCurItemId = 0; mnHighItemId = 0; @@ -963,22 +892,18 @@ void ToolBox::Clear() ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED ); } - - void ToolBox::SetButtonType( ButtonType eNewType ) { if ( meButtonType != eNewType ) { meButtonType = eNewType; - // Hier besser alles neu ausgeben, da es ansonsten zu Problemen - // mit den per CopyBits kopierten Bereichen geben kann + // better redraw everything, as otherwise there might be problems + // with regions that were copied with CopyBits ImplInvalidate( true ); } } - - void ToolBox::SetToolboxButtonSize( ToolBoxButtonSize eSize ) { if( mpData->meButtonSize != eSize ) @@ -994,8 +919,6 @@ ToolBoxButtonSize ToolBox::GetToolboxButtonSize() const return mpData->meButtonSize; } - - /*static*/ Size ToolBox::GetDefaultImageSize(bool bLarge) { @@ -1013,8 +936,6 @@ Size ToolBox::GetDefaultImageSize() const return GetDefaultImageSize( GetToolboxButtonSize() == TOOLBOX_BUTTONSIZE_LARGE ); } - - void ToolBox::SetAlign( WindowAlign eNewAlign ) { if ( meAlign != eNewAlign ) @@ -1023,7 +944,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) if ( !ImplIsFloatingMode() ) { - // Setzen, ob Items horizontal oder vertikal angeordnet werden sollen + // set horizontal/vertical alignment if ( (eNewAlign == WINDOWALIGN_LEFT) || (eNewAlign == WINDOWALIGN_RIGHT) ) mbHorz = false; else @@ -1032,7 +953,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) // Update the background according to Persona if necessary ImplInitSettings( false, false, true ); - // Hier alles neu ausgeben, da sich Border auch aendert + // redraw everything, as the border has changed mbCalc = true; mbFormat = true; if ( IsReallyVisible() && IsUpdateMode() ) @@ -1041,8 +962,6 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) } } - - void ToolBox::SetLineCount( sal_uInt16 nNewLines ) { if ( !nNewLines ) @@ -1052,35 +971,27 @@ void ToolBox::SetLineCount( sal_uInt16 nNewLines ) { mnLines = nNewLines; - // Hier besser alles neu ausgeben, da es ansonsten zu Problemen - // mit den per CopyBits kopierten Bereichen geben kann + // better redraw everything, as otherwise there might be problems + // with regions that were copied with CopyBits ImplInvalidate( false ); } } - - void ToolBox::SetPageScroll( bool b ) { mpData->mbPageScroll = b; } - - sal_uInt16 ToolBox::GetItemCount() const { return (sal_uInt16)mpData->m_aItems.size(); } - - ToolBoxItemType ToolBox::GetItemType( sal_uInt16 nPos ) const { return (nPos < mpData->m_aItems.size()) ? mpData->m_aItems[nPos].meType : TOOLBOXITEM_DONTKNOW; } - - sal_uInt16 ToolBox::GetItemPos( sal_uInt16 nItemId ) const { int nCount = mpData->m_aItems.size(); @@ -1091,8 +1002,6 @@ sal_uInt16 ToolBox::GetItemPos( sal_uInt16 nItemId ) const return TOOLBOX_ITEM_NOTFOUND; } - - sal_uInt16 ToolBox::GetItemPos( const Point& rPos ) const { // search the item position on the given point @@ -1115,22 +1024,18 @@ sal_uInt16 ToolBox::GetItemPos( const Point& rPos ) const return nRet; } - - sal_uInt16 ToolBox::GetItemId( sal_uInt16 nPos ) const { return (nPos < mpData->m_aItems.size()) ? mpData->m_aItems[nPos].mnId : 0; } - - sal_uInt16 ToolBox::GetItemId( const Point& rPos ) const { - // Item suchen, das geklickt wurde + // find item that was clicked std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { - // Ist es dieses Item + // is it this item? if ( it->maRect.IsInside( rPos ) ) { if ( it->meType == TOOLBOXITEM_BUTTON ) @@ -1156,8 +1061,6 @@ sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const return 0; } - - Point ToolBox::ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const { Point aPos; @@ -1218,8 +1121,6 @@ Point ToolBox::GetItemPopupPosition( sal_uInt16 nItemId, const Size& rSize ) con return ImplGetPopupPosition( GetItemRect( nItemId ), rSize ); } - - Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId ) const { if ( mbCalc || mbFormat ) @@ -1229,8 +1130,6 @@ Rectangle ToolBox::GetItemRect( sal_uInt16 nItemId ) const return GetItemPosRect( nPos ); } - - Rectangle ToolBox::GetItemPosRect( sal_uInt16 nPos ) const { if ( mbCalc || mbFormat ) @@ -1254,8 +1153,6 @@ Size ToolBox::GetItemContentSize( sal_uInt16 nItemId ) const return Size(); } - - bool ToolBox::ImplHasExternalMenubutton() { // check if the borderwindow (i.e. the decoration) provides the menu button @@ -1288,8 +1185,6 @@ void ToolBox::SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits ) } } - - ToolBoxItemBits ToolBox::GetItemBits( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1313,8 +1208,6 @@ void ToolBox::SetItemExpand( sal_uInt16 nItemId, bool bExpand ) } } - - bool ToolBox::GetItemExpand( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1323,8 +1216,6 @@ bool ToolBox::GetItemExpand( sal_uInt16 nItemId ) const return pItem->mbExpand; } - - void ToolBox::SetItemData( sal_uInt16 nItemId, void* pNewData ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1336,8 +1227,6 @@ void ToolBox::SetItemData( sal_uInt16 nItemId, void* pNewData ) } } - - void* ToolBox::GetItemData( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1348,8 +1237,6 @@ void* ToolBox::GetItemData( sal_uInt16 nItemId ) const return NULL; } - - void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1373,7 +1260,7 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) } #endif ImplToolItem* pItem = &mpData->m_aItems[nPos]; - // Nur wenn alles berechnet ist, mehr Aufwand treiben + // only once all is calculated, do extra work if ( !mbCalc ) { Size aOldSize = pItem->maImage.GetSizePixel(); @@ -1388,8 +1275,6 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) } } - - void ToolBox::SetImageList( const ImageList& rImageList ) { maImageList = rImageList; @@ -1405,8 +1290,6 @@ void ToolBox::SetImageList( const ImageList& rImageList ) } } - - static Image ImplRotImage( const Image& rImage, long nAngle10 ) { Image aRet; @@ -1448,8 +1331,6 @@ void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ) } } - - static Image ImplMirrorImage( const Image& rImage ) { Image aRet; @@ -1486,8 +1367,6 @@ void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ) } } - - Image ToolBox::GetItemImage( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1498,8 +1377,6 @@ Image ToolBox::GetItemImage( sal_uInt16 nItemId ) const return Image(); } - - void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1507,7 +1384,7 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText ) if ( nPos != TOOLBOX_ITEM_NOTFOUND ) { ImplToolItem* pItem = &mpData->m_aItems[nPos]; - // Nur wenn alles berechnet ist, mehr Aufwand treiben + // only once all is calculated, do extra work if ( !mbCalc && ((meButtonType != BUTTON_SYMBOL) || !pItem->maImage) ) { @@ -1530,8 +1407,6 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText ) } } - - const OUString& ToolBox::GetItemText( sal_uInt16 nItemId ) const { @@ -1542,8 +1417,6 @@ const OUString& ToolBox::GetItemText( sal_uInt16 nItemId ) const return pItem->maText; } - - void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1559,8 +1432,6 @@ void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ) } } - - Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1571,8 +1442,6 @@ Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const return NULL; } - - void ToolBox::StartSelection() { if ( mbDrag ) @@ -1587,15 +1456,13 @@ void ToolBox::StartSelection() } } - - void ToolBox::EndSelection() { mbCommandDrag = false; if ( mbDrag || mbSelection ) { - // Daten zuruecksetzen + // reset mbDrag = false; mbSelection = false; if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND ) @@ -1612,8 +1479,6 @@ void ToolBox::EndSelection() mnMouseModifier = 0; } - - void ToolBox::SetItemDown( sal_uInt16 nItemId, bool bDown, bool bRelease ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1658,8 +1523,6 @@ void ToolBox::SetItemDown( sal_uInt16 nItemId, bool bDown, bool bRelease ) } } - - void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1668,10 +1531,10 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState ) { ImplToolItem* pItem = &mpData->m_aItems[nPos]; - // Hat sich der Status geaendert + // the state has changed if ( pItem->meState != eState ) { - // Wenn RadioCheck, dann vorherigen unchecken + // if RadioCheck, un-check the previous if ( (eState == TRISTATE_TRUE) && (pItem->mnBits & TIB_AUTOCHECK) && (pItem->mnBits & TIB_RADIOCHECK) ) { @@ -1721,8 +1584,6 @@ void ToolBox::SetItemState( sal_uInt16 nItemId, TriState eState ) } } - - TriState ToolBox::GetItemState( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1733,8 +1594,6 @@ TriState ToolBox::GetItemState( sal_uInt16 nItemId ) const return TRISTATE_FALSE; } - - void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1748,11 +1607,11 @@ void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable ) { pItem->mbEnabled = bEnable; - // Gegebenenfalls das Fenster mit updaten + // if existing, also redraw the window if ( pItem->mpWindow ) pItem->mpWindow->Enable( pItem->mbEnabled ); - // Item updaten + // update item ImplUpdateItem( nPos ); ImplUpdateInputEnable(); @@ -1765,8 +1624,6 @@ void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable ) } } - - bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1777,8 +1634,6 @@ bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const return false; } - - void ToolBox::ShowItem( sal_uInt16 nItemId, bool bVisible ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1795,8 +1650,6 @@ void ToolBox::ShowItem( sal_uInt16 nItemId, bool bVisible ) } } - - bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1807,8 +1660,6 @@ bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const return false; } - - bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const { // is the item on the visible area of the toolbox? @@ -1825,8 +1676,6 @@ bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const return bRet; } - - void ToolBox::SetItemCommand(sal_uInt16 nItemId, const OUString& rCommand) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1835,8 +1684,6 @@ void ToolBox::SetItemCommand(sal_uInt16 nItemId, const OUString& rCommand) pItem->maCommandStr = rCommand; } - - const OUString ToolBox::GetItemCommand( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1847,8 +1694,6 @@ const OUString ToolBox::GetItemCommand( sal_uInt16 nItemId ) const return OUString(); } - - void ToolBox::SetQuickHelpText( sal_uInt16 nItemId, const OUString& rText ) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1857,8 +1702,6 @@ void ToolBox::SetQuickHelpText( sal_uInt16 nItemId, const OUString& rText ) pItem->maQuickHelpText = rText; } - - const OUString& ToolBox::GetQuickHelpText( sal_uInt16 nItemId ) const { static const OUString sEmpty; @@ -1871,8 +1714,6 @@ const OUString& ToolBox::GetQuickHelpText( sal_uInt16 nItemId ) const return sEmpty; } - - void ToolBox::SetHelpText( sal_uInt16 nItemId, const OUString& rText ) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1881,15 +1722,11 @@ void ToolBox::SetHelpText( sal_uInt16 nItemId, const OUString& rText ) pItem->maHelpText = rText; } - - const OUString& ToolBox::GetHelpText( sal_uInt16 nItemId ) const { return ImplGetHelpText( nItemId ); } - - void ToolBox::SetHelpId( sal_uInt16 nItemId, const OString& rHelpId ) { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -1898,8 +1735,6 @@ void ToolBox::SetHelpId( sal_uInt16 nItemId, const OString& rHelpId ) pItem->maHelpId = rHelpId; } - - OString ToolBox::GetHelpId( sal_uInt16 nItemId ) const { OString aRet; @@ -1917,8 +1752,6 @@ OString ToolBox::GetHelpId( sal_uInt16 nItemId ) const return aRet; } - - void ToolBox::SetOutStyle( sal_uInt16 nNewStyle ) { // always force flat looking toolbars since NWF @@ -1929,7 +1762,7 @@ void ToolBox::SetOutStyle( sal_uInt16 nNewStyle ) mnOutStyle = nNewStyle; ImplDisableFlatButtons(); - // Damit das ButtonDevice neu angelegt wird + // so as to redo the ButtonDevice if ( !(mnOutStyle & TOOLBOX_STYLE_FLAT) ) { mnMaxItemWidth = 1; @@ -1940,10 +1773,7 @@ void ToolBox::SetOutStyle( sal_uInt16 nNewStyle ) } } - - // disable key input if all items are disabled - void ToolBox::ImplUpdateInputEnable() { for( std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -1959,8 +1789,6 @@ void ToolBox::ImplUpdateInputEnable() mpData->mbKeyInputDisabled = true; } - - void ToolBox::ImplFillLayoutData() const { mpData->m_pLayoutData = new ToolBoxLayoutData(); @@ -1970,14 +1798,12 @@ void ToolBox::ImplFillLayoutData() const { ImplToolItem* pItem = &mpData->m_aItems[i]; - // Nur malen, wenn Rechteck im PaintRectangle liegt + // only draw, if the rectangle is within PaintRectangle if ( !pItem->maRect.IsEmpty() ) const_cast<ToolBox*>(this)->ImplDrawItem( i, sal_False, false, true ); } } - - OUString ToolBox::GetDisplayText() const { if( ! mpData->m_pLayoutData ) @@ -1985,8 +1811,6 @@ OUString ToolBox::GetDisplayText() const return mpData->m_pLayoutData ? OUString(mpData->m_pLayoutData->m_aDisplayText) : OUString(); } - - Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const { long nItemIndex = -1; @@ -2006,8 +1830,6 @@ Rectangle ToolBox::GetCharacterBounds( sal_uInt16 nItemID, long nIndex ) const return (mpData->m_pLayoutData && nItemIndex != -1) ? mpData->m_pLayoutData->GetCharacterBounds( nItemIndex+nIndex ) : Rectangle(); } - - long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const { long nIndex = -1; @@ -2030,8 +1852,6 @@ long ToolBox::GetIndexForPoint( const Point& rPoint, sal_uInt16& rItemID ) const return nIndex; } - - void ToolBox::SetDropdownClickHdl( const Link& rLink ) { mpData->maDropdownClickHdl = rLink; @@ -2042,8 +1862,6 @@ const Link& ToolBox::GetDropdownClickHdl() const return mpData->maDropdownClickHdl; } - - void ToolBox::SetMenuType( sal_uInt16 aType ) { if( aType != mpData->maMenuType ) @@ -2089,8 +1907,6 @@ void ToolBox::SetMenuButtonHdl( const Link& rLink ) mpData->maMenuButtonHdl = rLink; } - - bool ToolBox::ImplHasClippedItems() { // are any items currently clipped ? @@ -2250,8 +2066,6 @@ void ToolBox::ExecuteCustomMenu() } } - - // checks override first, useful during calculation of sizes bool ToolBox::ImplIsFloatingMode() const { @@ -2278,8 +2092,6 @@ bool ToolBox::ImplIsInPopupMode() const } } - - void ToolBox::Lock( bool bLock ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); @@ -2298,8 +2110,6 @@ void ToolBox::Lock( bool bLock ) } } - - bool ToolBox::AlwaysLocked() { // read config item to determine toolbox behaviour, used for subtoolbars @@ -2373,5 +2183,4 @@ void ToolBox::SetImageListProvider(vcl::IImageListProvider* _pProvider) ImplUpdateImageList(); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |