fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / svx / source / gallery2 / galctrl.cxx
blob12980888bbfdf38ea548850c059a577b3d490233
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #include <vcl/svapp.hxx>
22 #include <sfx2/viewfrm.hxx>
23 #include <sfx2/dispatch.hxx>
24 #include <avmedia/mediaplayer.hxx>
25 #include "helpid.hrc"
26 #include "galbrws2.hxx"
27 #include "svx/galtheme.hxx"
28 #include "svx/galmisc.hxx"
29 #include "svx/galctrl.hxx"
30 #include "editeng/AccessibleStringWrap.hxx"
31 #include <editeng/svxfont.hxx>
32 #include "galobj.hxx"
33 #include <avmedia/mediawindow.hxx>
34 #include "gallery.hrc"
35 #include <vcl/graphicfilter.hxx>
37 #define GALLERY_BRWBOX_TITLE 1
38 #define GALLERY_BRWBOX_PATH 2
40 DBG_NAME(GalleryPreview)
42 GalleryPreview::GalleryPreview( GalleryBrowser2* pParent, GalleryTheme* pTheme ) :
43 Window( pParent, WB_TABSTOP | WB_BORDER ),
44 DropTargetHelper( this ),
45 DragSourceHelper( this ),
46 mpTheme( pTheme )
48 DBG_CTOR(GalleryPreview,NULL);
50 SetHelpId( HID_GALLERY_WINDOW );
51 InitSettings();
54 GalleryPreview::GalleryPreview( Window* pParent, const ResId & rResId ) :
55 Window( pParent, rResId ),
56 DropTargetHelper( this ),
57 DragSourceHelper( this ),
58 mpTheme( NULL )
60 DBG_CTOR(GalleryPreview,NULL);
62 SetHelpId( HID_GALLERY_PREVIEW );
63 InitSettings();
66 GalleryPreview::~GalleryPreview()
68 DBG_DTOR(GalleryPreview,NULL);
72 bool GalleryPreview::SetGraphic( const INetURLObject& _aURL )
74 bool bRet = true;
75 Graphic aGraphic;
76 if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) )
78 aGraphic = BitmapEx( GAL_RES( RID_SVXBMP_GALLERY_MEDIA ) );
80 else
82 GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
83 GalleryProgress aProgress( &rFilter );
84 if( rFilter.ImportGraphic( aGraphic, _aURL, GRFILTER_FORMAT_DONTKNOW ) )
85 bRet = false;
88 SetGraphic( aGraphic );
89 Invalidate();
90 return bRet;
93 void GalleryPreview::InitSettings()
95 SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
96 SetControlBackground( GALLERY_BG_COLOR );
97 SetControlForeground( GALLERY_FG_COLOR );
100 void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt )
102 if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
103 InitSettings();
104 else
105 Window::DataChanged( rDCEvt );
108 sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const
110 const Size aWinSize( GetOutputSizePixel() );
111 Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) );
112 sal_Bool bRet = sal_False;
114 if( aNewSize.Width() && aNewSize.Height() )
116 // scale to fit window
117 const double fGrfWH = (double) aNewSize.Width() / aNewSize.Height();
118 const double fWinWH = (double) aWinSize.Width() / aWinSize.Height();
120 if ( fGrfWH < fWinWH )
122 aNewSize.Width() = (long) ( aWinSize.Height() * fGrfWH );
123 aNewSize.Height()= aWinSize.Height();
125 else
127 aNewSize.Width() = aWinSize.Width();
128 aNewSize.Height()= (long) ( aWinSize.Width() / fGrfWH);
131 const Point aNewPos( ( aWinSize.Width() - aNewSize.Width() ) >> 1,
132 ( aWinSize.Height() - aNewSize.Height() ) >> 1 );
134 rResultRect = Rectangle( aNewPos, aNewSize );
135 bRet = sal_True;
138 return bRet;
141 void GalleryPreview::Paint( const Rectangle& rRect )
143 Window::Paint( rRect );
145 if( ImplGetGraphicCenterRect( aGraphicObj.GetGraphic(), aPreviewRect ) )
147 const Point aPos( aPreviewRect.TopLeft() );
148 const Size aSize( aPreviewRect.GetSize() );
150 if( aGraphicObj.IsAnimated() )
151 aGraphicObj.StartAnimation( this, aPos, aSize );
152 else
153 aGraphicObj.Draw( this, aPos, aSize );
157 void GalleryPreview::MouseButtonDown( const MouseEvent& rMEvt )
159 if( mpTheme && ( rMEvt.GetClicks() == 2 ) )
160 ( (GalleryBrowser2*) GetParent() )->TogglePreview( this );
163 void GalleryPreview::Command(const CommandEvent& rCEvt )
165 Window::Command( rCEvt );
167 if( mpTheme && ( rCEvt.GetCommand() == COMMAND_CONTEXTMENU ) )
168 ( (GalleryBrowser2*) GetParent() )->ShowContextMenu( this,
169 ( rCEvt.IsMouseEvent() ? &rCEvt.GetMousePosPixel() : NULL ) );
172 void GalleryPreview::KeyInput( const KeyEvent& rKEvt )
174 if( mpTheme )
176 GalleryBrowser2* pBrowser = static_cast< GalleryBrowser2* >( GetParent() );
178 switch( rKEvt.GetKeyCode().GetCode() )
180 case( KEY_BACKSPACE ):
181 pBrowser->TogglePreview( this );
182 break;
184 case( KEY_HOME ):
185 pBrowser->Travel( GALLERYBROWSERTRAVEL_FIRST );
186 break;
188 case( KEY_END ):
189 pBrowser->Travel( GALLERYBROWSERTRAVEL_LAST );
190 break;
192 case( KEY_LEFT ):
193 case( KEY_UP ):
194 pBrowser->Travel( GALLERYBROWSERTRAVEL_PREVIOUS );
195 break;
197 case( KEY_RIGHT ):
198 case( KEY_DOWN ):
199 pBrowser->Travel( GALLERYBROWSERTRAVEL_NEXT );
200 break;
202 default:
204 if( !pBrowser->KeyInput( rKEvt, this ) )
205 Window::KeyInput( rKEvt );
207 break;
210 else
211 Window::KeyInput( rKEvt );
214 sal_Int8 GalleryPreview::AcceptDrop( const AcceptDropEvent& rEvt )
216 sal_Int8 nRet;
218 if( mpTheme )
219 nRet = ( (GalleryBrowser2*) GetParent() )->AcceptDrop( *this, rEvt );
220 else
221 nRet = DND_ACTION_NONE;
223 return nRet;
226 sal_Int8 GalleryPreview::ExecuteDrop( const ExecuteDropEvent& rEvt )
228 sal_Int8 nRet;
230 if( mpTheme )
231 nRet = ( (GalleryBrowser2*) GetParent() )->ExecuteDrop( *this, rEvt );
232 else
233 nRet = DND_ACTION_NONE;
235 return nRet;
238 void GalleryPreview::StartDrag( sal_Int8, const Point& )
240 if( mpTheme )
241 ( (GalleryBrowser2*) GetParent() )->StartDrag( this );
244 void GalleryPreview::PreviewMedia( const INetURLObject& rURL )
246 if( rURL.GetProtocol() != INET_PROT_NOT_VALID )
248 ::avmedia::MediaFloater* pFloater = AVMEDIA_MEDIAWINDOW();
250 if( !pFloater )
252 SfxViewFrame::Current()->GetBindings().GetDispatcher()->Execute( SID_AVMEDIA_PLAYER, SFX_CALLMODE_SYNCHRON );
253 pFloater = AVMEDIA_MEDIAWINDOW();
256 if( pFloater )
257 pFloater->setURL( rURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ), true );
261 void drawCheckered(OutputDevice& rOut, const Point& rPos, const Size& rSize)
263 // draw checkered background
264 static const sal_uInt32 nLen(8);
265 static const Color aW(COL_WHITE);
266 static const Color aG(0xef, 0xef, 0xef);
268 rOut.DrawCheckered(rPos, rSize, nLen, aW, aG);
271 DBG_NAME(GalleryIconView)
273 GalleryIconView::GalleryIconView( GalleryBrowser2* pParent, GalleryTheme* pTheme ) :
274 ValueSet( pParent, WB_TABSTOP | WB_3DLOOK | WB_BORDER | WB_ITEMBORDER | WB_DOUBLEBORDER | WB_VSCROLL | WB_FLATVALUESET ),
275 DropTargetHelper( this ),
276 DragSourceHelper( this ),
277 mpTheme ( pTheme )
279 DBG_CTOR(GalleryIconView,NULL);
281 EnableFullItemMode( sal_False );
283 SetHelpId( HID_GALLERY_WINDOW );
284 InitSettings();
285 SetExtraSpacing( 2 );
286 SetItemWidth( S_THUMB + 6 );
287 SetItemHeight( S_THUMB + 6 );
290 GalleryIconView::~GalleryIconView()
292 DBG_DTOR(GalleryIconView,NULL);
295 void GalleryIconView::InitSettings()
297 SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
298 SetControlBackground( GALLERY_BG_COLOR );
299 SetControlForeground( GALLERY_FG_COLOR );
300 SetColor( GALLERY_BG_COLOR );
303 void GalleryIconView::DataChanged( const DataChangedEvent& rDCEvt )
305 if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
306 InitSettings();
307 else
308 ValueSet::DataChanged( rDCEvt );
311 void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt )
313 const sal_uInt16 nId = rUDEvt.GetItemId();
315 if( nId && mpTheme )
317 SgaObject* pObj = mpTheme->AcquireObject( nId - 1 );
319 if( pObj )
321 const Rectangle& rRect = rUDEvt.GetRect();
322 OutputDevice* pDev = rUDEvt.GetDevice();
323 Graphic aGraphic;
324 bool bTransparent(false);
326 if( pObj->IsThumbBitmap() )
328 BitmapEx aBitmapEx;
330 if( pObj->GetObjKind() == SGA_OBJ_SOUND )
332 Bitmap aTemp = pObj->GetThumbBmp().GetBitmap();
334 aTemp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
335 aBitmapEx = BitmapEx(aTemp);
337 else
339 aBitmapEx = pObj->GetThumbBmp();
340 bTransparent = aBitmapEx.IsTransparent();
343 if( ( pDev->GetBitCount() <= 8 ) && ( aBitmapEx.GetBitCount() >= 8 ) )
345 aBitmapEx.Dither( BMP_DITHER_FLOYD );
348 aGraphic = aBitmapEx;
350 else
352 aGraphic = pObj->GetThumbMtf();
353 bTransparent = true;
356 Size aSize( aGraphic.GetSizePixel( pDev ) );
358 if ( aSize.Width() && aSize.Height() )
360 if( ( aSize.Width() > rRect.GetWidth() ) || ( aSize.Height() > rRect.GetHeight() ) )
362 const double fBmpWH = (double) aSize.Width() / aSize.Height();
363 const double fThmpWH = (double) rRect.GetWidth() / rRect.GetHeight();
365 // Bitmap an Thumbgroesse anpassen
366 if ( fBmpWH < fThmpWH )
368 aSize.Width() = (long) ( rRect.GetHeight() * fBmpWH );
369 aSize.Height()= rRect.GetHeight();
371 else
373 aSize.Width() = rRect.GetWidth();
374 aSize.Height()= (long) ( rRect.GetWidth() / fBmpWH );
378 const Point aPos( ( ( rRect.GetWidth() - aSize.Width() ) >> 1 ) + rRect.Left(),
379 ( ( rRect.GetHeight() - aSize.Height() ) >> 1 ) + rRect.Top() );
381 if(bTransparent)
383 // draw checkered background for full rectangle.
384 drawCheckered(*pDev, rRect.TopLeft(), rRect.GetSize());
387 aGraphic.Draw( pDev, aPos, aSize );
390 SetItemText( nId, GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE) );
391 mpTheme->ReleaseObject( pObj );
396 void GalleryIconView::MouseButtonDown( const MouseEvent& rMEvt )
398 ValueSet::MouseButtonDown( rMEvt );
400 if( rMEvt.GetClicks() == 2 )
401 ( (GalleryBrowser2*) GetParent() )->TogglePreview( this, &rMEvt.GetPosPixel() );
404 void GalleryIconView::Command( const CommandEvent& rCEvt )
406 ValueSet::Command( rCEvt );
408 if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
410 ( (GalleryBrowser2*) GetParent() )->ShowContextMenu( this,
411 ( rCEvt.IsMouseEvent() ? &rCEvt.GetMousePosPixel() : NULL ) );
415 void GalleryIconView::KeyInput( const KeyEvent& rKEvt )
417 if( !mpTheme || !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) )
418 ValueSet::KeyInput( rKEvt );
421 sal_Int8 GalleryIconView::AcceptDrop( const AcceptDropEvent& rEvt )
423 return( static_cast< GalleryBrowser2* >( GetParent() )->AcceptDrop( *this, rEvt ) );
426 sal_Int8 GalleryIconView::ExecuteDrop( const ExecuteDropEvent& rEvt )
428 return( static_cast< GalleryBrowser2* >( GetParent() )->ExecuteDrop( *this, rEvt ) );
431 void GalleryIconView::StartDrag( sal_Int8, const Point& )
433 const CommandEvent aEvt( GetPointerPosPixel(), COMMAND_STARTDRAG, sal_True );
434 Region aRegion;
436 // call this to initiate dragging for ValueSet
437 ValueSet::StartDrag( aEvt, aRegion );
438 static_cast< GalleryBrowser2* >( GetParent() )->StartDrag( this );
441 DBG_NAME(GalleryListView)
443 GalleryListView::GalleryListView( GalleryBrowser2* pParent, GalleryTheme* pTheme ) :
444 BrowseBox( pParent, WB_TABSTOP | WB_3DLOOK | WB_BORDER ),
445 mpTheme( pTheme ),
446 mnCurRow( 0 )
448 DBG_CTOR(GalleryListView,NULL);
450 SetHelpId( HID_GALLERY_WINDOW );
452 InitSettings();
454 SetMode( BROWSER_AUTO_VSCROLL | BROWSER_AUTOSIZE_LASTCOL );
455 SetDataRowHeight( 28 );
456 InsertDataColumn( GALLERY_BRWBOX_TITLE, GAL_RESSTR(RID_SVXSTR_GALLERY_TITLE), 256 );
457 InsertDataColumn( GALLERY_BRWBOX_PATH, GAL_RESSTR(RID_SVXSTR_GALLERY_PATH), 256 );
460 GalleryListView::~GalleryListView()
462 DBG_DTOR(GalleryListView,NULL);
465 void GalleryListView::InitSettings()
467 SetBackground( Wallpaper( GALLERY_BG_COLOR ) );
468 SetControlBackground( GALLERY_BG_COLOR );
469 SetControlForeground( GALLERY_FG_COLOR );
472 void GalleryListView::DataChanged( const DataChangedEvent& rDCEvt )
474 if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
475 InitSettings();
476 else
477 BrowseBox::DataChanged( rDCEvt );
480 sal_Bool GalleryListView::SeekRow( long nRow )
482 mnCurRow = nRow;
483 return sal_True;
486 String GalleryListView::GetCellText(long _nRow, sal_uInt16 nColumnId) const
488 String sRet;
489 if( mpTheme && ( _nRow < static_cast< long >( mpTheme->GetObjectCount() ) ) )
491 SgaObject* pObj = mpTheme->AcquireObject( _nRow );
493 if( pObj )
495 sRet = GalleryBrowser2::GetItemText( *mpTheme, *pObj,
496 ( GALLERY_BRWBOX_TITLE == nColumnId ) ? GALLERY_ITEM_TITLE : GALLERY_ITEM_PATH );
498 mpTheme->ReleaseObject( pObj );
502 return sRet;
505 Rectangle GalleryListView::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)
507 DBG_ASSERT(_nColumnPos >= 0 && _nColumnPos <= USHRT_MAX, "GalleryListView::GetFieldCharacterBounds: _nColumnId overflow");
508 Rectangle aRect;
509 if ( SeekRow(_nRow) )
511 SvxFont aFont( GetFont() );
512 AccessibleStringWrap aStringWrap( *this, aFont, GetCellText(_nRow, sal::static_int_cast<sal_uInt16>( GetColumnId( sal::static_int_cast<sal_uInt16>(_nColumnPos) ) ) ) );
514 // get the bounds inside the string
515 aStringWrap.GetCharacterBounds(nIndex, aRect);
517 // offset to
519 return aRect;
522 sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)
524 DBG_ASSERT(_nColumnPos >= 0 && _nColumnPos <= USHRT_MAX, "GalleryListView::GetFieldIndexAtPoint: _nColumnId overflow");
525 sal_Int32 nRet = -1;
526 if ( SeekRow(_nRow) )
528 SvxFont aFont( GetFont() );
529 AccessibleStringWrap aStringWrap( *this, aFont, GetCellText(_nRow, sal::static_int_cast<sal_uInt16>(GetColumnId(sal::static_int_cast<sal_uInt16>(_nColumnPos)))) );
530 nRet = aStringWrap.GetIndexAtPoint(_rPoint);
532 return nRet;
535 void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
537 rDev.Push( PUSH_CLIPREGION );
538 rDev.IntersectClipRegion( rRect );
540 if( mpTheme && ( mnCurRow < mpTheme->GetObjectCount() ) )
542 SgaObject* pObj = mpTheme->AcquireObject( mnCurRow );
544 if( pObj )
546 const long nTextPosY = rRect.Top() + ( ( rRect.GetHeight() - rDev.GetTextHeight() ) >> 1 );
548 if( GALLERY_BRWBOX_TITLE == nColumnId )
550 Rectangle aOutputRect( rRect.TopLeft(), Size( rRect.GetHeight(), rRect.GetHeight() ) );
551 GraphicObject aGrfObj;
552 bool bTransparent(false);
554 if( pObj->GetObjKind() == SGA_OBJ_SOUND )
556 aGrfObj = Graphic( BitmapEx( GAL_RES( RID_SVXBMP_GALLERY_MEDIA ) ) );
558 else if( pObj->IsThumbBitmap() )
560 const BitmapEx aBitmapEx(pObj->GetThumbBmp());
562 bTransparent = aBitmapEx.IsTransparent();
563 aGrfObj = Graphic(aBitmapEx);
565 else
567 aGrfObj = Graphic( pObj->GetThumbMtf() );
568 bTransparent = true;
571 Size aSize( rDev.LogicToPixel( aGrfObj.GetPrefSize(), aGrfObj.GetPrefMapMode() ) );
573 if( aSize.Width() && aSize.Height() )
575 if( ( aSize.Width() > aOutputRect.GetWidth() ) || ( aSize.Height() > aOutputRect.GetHeight() ) )
577 const double fBmpWH = (double) aSize.Width() / aSize.Height();
578 const double fThmpWH = (double) aOutputRect.GetWidth() / aOutputRect.GetHeight();
580 // Bitmap an Thumbgroesse anpassen
581 if ( fBmpWH < fThmpWH )
583 aSize.Width() = (long) ( aOutputRect.GetHeight() * fBmpWH );
584 aSize.Height()= aOutputRect.GetHeight();
586 else
588 aSize.Width() = aOutputRect.GetWidth();
589 aSize.Height()= (long) ( aOutputRect.GetWidth() / fBmpWH );
593 aSize.Width() = std::max( aSize.Width(), 4L );
594 aSize.Height() = std::max( aSize.Height(), 4L );
596 const Point aPos( ( ( aOutputRect.GetWidth() - aSize.Width() ) >> 1 ) + aOutputRect.Left(),
597 ( ( aOutputRect.GetHeight() - aSize.Height() ) >> 1 ) + aOutputRect.Top() );
599 if(bTransparent)
601 // draw checkered background
602 drawCheckered(rDev, aPos, aSize);
605 aGrfObj.Draw( &rDev, aPos, aSize );
608 rDev.DrawText( Point( aOutputRect.Right() + 6, nTextPosY ), GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE ) );
610 else if( GALLERY_BRWBOX_PATH == nColumnId )
611 rDev.DrawText( Point( rRect.Left(), nTextPosY ), GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_PATH ) );
613 mpTheme->ReleaseObject( pObj );
617 rDev.Pop();
620 void GalleryListView::Command( const CommandEvent& rCEvt )
622 BrowseBox::Command( rCEvt );
624 if( rCEvt.GetCommand() == COMMAND_CONTEXTMENU )
626 const Point* pPos = NULL;
628 if( rCEvt.IsMouseEvent() && ( GetRowAtYPosPixel( rCEvt.GetMousePosPixel().Y() ) != BROWSER_ENDOFSELECTION ) )
629 pPos = &rCEvt.GetMousePosPixel();
631 ( (GalleryBrowser2*) GetParent() )->ShowContextMenu( this, pPos );
635 void GalleryListView::KeyInput( const KeyEvent& rKEvt )
637 if( !mpTheme || !static_cast< GalleryBrowser2* >( GetParent() )->KeyInput( rKEvt, this ) )
638 BrowseBox::KeyInput( rKEvt );
641 void GalleryListView::DoubleClick( const BrowserMouseEvent& rEvt )
643 BrowseBox::DoubleClick( rEvt );
645 if( rEvt.GetRow() != BROWSER_ENDOFSELECTION )
646 ( (GalleryBrowser2*) GetParent() )->TogglePreview( this, &rEvt.GetPosPixel() );
649 void GalleryListView::Select()
651 if( maSelectHdl.IsSet() )
652 maSelectHdl.Call( this );
655 sal_Int8 GalleryListView::AcceptDrop( const BrowserAcceptDropEvent& )
657 sal_Int8 nRet = DND_ACTION_NONE;
659 if( mpTheme && !mpTheme->IsReadOnly() )
660 nRet = DND_ACTION_COPY;
662 return nRet;
665 sal_Int8 GalleryListView::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
667 ExecuteDropEvent aEvt( rEvt );
669 aEvt.maPosPixel.Y() += GetTitleHeight();
671 return( ( (GalleryBrowser2*) GetParent() )->ExecuteDrop( *this, aEvt ) );
674 void GalleryListView::StartDrag( sal_Int8, const Point& rPosPixel )
676 ( (GalleryBrowser2*) GetParent() )->StartDrag( this, &rPosPixel );
679 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */