Kaydet (Commit) 5c346ec8 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Resolves: #i122231# Buffered content for gallery themes

better graphical preparation (currently BMP_SCALE_BESTQUALITY, but can
be changed in a single place now if wanted)

(cherry picked from commit d32f1d35)

Conflicts:
	svx/inc/svx/galtheme.hxx
	svx/source/gallery2/galctrl.cxx
	svx/source/gallery2/galtheme.cxx

Change-Id: I80879ca472c784f764126676046c1388e1167652
üst 0b9bf62d
......@@ -45,7 +45,13 @@ struct GalleryObject
INetURLObject aURL;
sal_uInt32 nOffset;
SgaObjKind eObjKind;
sal_Bool bDummy;
bool mbDelete;
//UI visualization buffering
BitmapEx maPreviewBitmapEx;
Size maPreparedSize;
String maTitle;
String maPath;
};
typedef ::std::vector< GalleryObject* > GalleryObjectList;
......@@ -219,6 +225,10 @@ public:
SvStream& WriteData( SvStream& rOut ) const;
SvStream& ReadData( SvStream& rIn );
static SVX_DLLPUBLIC void InsertAllThemes( ListBox& rListBox );
// for buffering PreviewBitmaps and strings for object and path
void GetPreviewBitmapExAndStrings(sal_uIntPtr nPos, BitmapEx& rBitmapEx, Size& rSize, String& rTitle, String& rPath) const;
void SetPreviewBitmapExAndStrings(sal_uIntPtr nPos, const BitmapEx& rBitmapEx, const Size& rSize, const String& rTitle, const String& rPath);
};
SvStream& operator<<( SvStream& rOut, const GalleryTheme& rTheme );
......
......@@ -71,7 +71,6 @@ protected:
sal_Bool CreateThumb( const Graphic& rGraphic );
public:
SgaObject();
virtual ~SgaObject() {};
......@@ -89,6 +88,8 @@ public:
friend SvStream& operator<<( SvStream& rOut, const SgaObject& rObj );
friend SvStream& operator>>( SvStream& rIn, SgaObject& rObj );
BitmapEx createPreviewBitmapEx(const Size& rSizePixel) const;
};
class SgaObjectSound : public SgaObject
......
......@@ -324,83 +324,159 @@ void GalleryIconView::UserDraw( const UserDrawEvent& rUDEvt )
const sal_uInt16 nId = rUDEvt.GetItemId();
if( nId && mpTheme )
{
SgaObject* pObj = mpTheme->AcquireObject( nId - 1 );
if( pObj )
{
const Rectangle& rRect = rUDEvt.GetRect();
OutputDevice* pDev = rUDEvt.GetDevice();
Graphic aGraphic;
bool bTransparent(false);
if( pObj->IsThumbBitmap() )
{
const Size aSize(rRect.GetWidth(), rRect.GetHeight());
BitmapEx aBitmapEx;
Size aPreparedSize;
String aItemTextTitle;
String aItemTextPath;
if( pObj->GetObjKind() == SGA_OBJ_SOUND )
{
Bitmap aTemp = pObj->GetThumbBmp().GetBitmap();
mpTheme->GetPreviewBitmapExAndStrings(nId - 1, aBitmapEx, aPreparedSize, aItemTextTitle, aItemTextPath);
aTemp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
aBitmapEx = BitmapEx(aTemp);
}
else
{
aBitmapEx = pObj->GetThumbBmp();
bTransparent = aBitmapEx.IsTransparent();
}
bool bNeedToCreate(aBitmapEx.IsEmpty());
if( ( pDev->GetBitCount() <= 8 ) && ( aBitmapEx.GetBitCount() >= 8 ) )
if(!bNeedToCreate && !aItemTextTitle.Len())
{
aBitmapEx.Dither( BMP_DITHER_FLOYD );
bNeedToCreate = true;
}
aGraphic = aBitmapEx;
}
else
if(!bNeedToCreate && aPreparedSize != aSize)
{
aGraphic = pObj->GetThumbMtf();
bTransparent = true;
bNeedToCreate = true;
}
Size aSize( aGraphic.GetSizePixel( pDev ) );
if ( aSize.Width() && aSize.Height() )
{
if( ( aSize.Width() > rRect.GetWidth() ) || ( aSize.Height() > rRect.GetHeight() ) )
if(bNeedToCreate)
{
const double fBmpWH = (double) aSize.Width() / aSize.Height();
const double fThmpWH = (double) rRect.GetWidth() / rRect.GetHeight();
SgaObject* pObj = mpTheme->AcquireObject(nId - 1);
// Bitmap an Thumbgroesse anpassen
if ( fBmpWH < fThmpWH )
{
aSize.Width() = (long) ( rRect.GetHeight() * fBmpWH );
aSize.Height()= rRect.GetHeight();
}
else
if(pObj)
{
aSize.Width() = rRect.GetWidth();
aSize.Height()= (long) ( rRect.GetWidth() / fBmpWH );
aBitmapEx = pObj->createPreviewBitmapEx(aSize);
aItemTextTitle = GalleryBrowser2::GetItemText(*mpTheme, *pObj, GALLERY_ITEM_TITLE);
mpTheme->SetPreviewBitmapExAndStrings(nId - 1, aBitmapEx, aSize, aItemTextTitle, aItemTextPath);
mpTheme->ReleaseObject(pObj);
}
}
const Point aPos( ( ( rRect.GetWidth() - aSize.Width() ) >> 1 ) + rRect.Left(),
( ( rRect.GetHeight() - aSize.Height() ) >> 1 ) + rRect.Top() );
if(!aBitmapEx.IsEmpty())
{
const Size aBitmapExSizePixel(aBitmapEx.GetSizePixel());
const Point aPos(
((aSize.Width() - aBitmapExSizePixel.Width()) >> 1) + rRect.Left(),
((aSize.Height() - aBitmapExSizePixel.Height()) >> 1) + rRect.Top());
OutputDevice* pDev = rUDEvt.GetDevice();
if(bTransparent)
if(aBitmapEx.IsTransparent())
{
// draw checkered background for full rectangle.
drawTransparenceBackground(*pDev, rRect.TopLeft(), rRect.GetSize());
}
aGraphic.Draw( pDev, aPos, aSize );
}
SetItemText( nId, GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE) );
mpTheme->ReleaseObject( pObj );
}
pDev->DrawBitmapEx(aPos, aBitmapEx);
}
SetItemText(nId, aItemTextTitle);
//SgaObject* pObj = mpTheme->AcquireObject( nId - 1 );
//
//if( pObj )
//{
// const Rectangle& rRect = rUDEvt.GetRect();
// const Size aSize(rRect.GetWidth(), rRect.GetHeight());
// const BitmapEx aBitmapEx(pObj->createPreviewBitmapEx(aSize));
// const Size aBitmapExSizePixel(aBitmapEx.GetSizePixel());
//
// if(!aBitmapEx.IsEmpty())
// {
// const Point aPos(
// ((aSize.Width() - aBitmapExSizePixel.Width()) >> 1) + rRect.Left(),
// ((aSize.Height() - aBitmapExSizePixel.Height()) >> 1) + rRect.Top());
// OutputDevice* pDev = rUDEvt.GetDevice();
//
// if(aBitmapEx.IsTransparent())
// {
// // draw checkered background
// drawTransparenceBackground(*pDev, aPos, aBitmapExSizePixel);
// }
//
// pDev->DrawBitmapEx(aPos, aBitmapEx);
// }
//
// //const Rectangle& rRect = rUDEvt.GetRect();
// //OutputDevice* pDev = rUDEvt.GetDevice();
// //Graphic aGraphic;
// //bool bTransparent(false);
// //
// //if( pObj->IsThumbBitmap() )
// //{
// // BitmapEx aBitmapEx;
// //
// // if( pObj->GetObjKind() == SGA_OBJ_SOUND )
// // {
// // Bitmap aTemp = pObj->GetThumbBmp().GetBitmap();
// //
// // aTemp.Replace( COL_LIGHTMAGENTA, COL_WHITE );
// // aBitmapEx = BitmapEx(aTemp);
// // }
// // else
// // {
// // aBitmapEx = pObj->GetThumbBmp();
// // bTransparent = aBitmapEx.IsTransparent();
// // }
// //
// // if( ( pDev->GetBitCount() <= 8 ) && ( aBitmapEx.GetBitCount() >= 8 ) )
// // {
// // aBitmapEx.Dither( BMP_DITHER_FLOYD );
// // }
// //
// // aGraphic = aBitmapEx;
// //}
// //else
// //{
// // aGraphic = pObj->GetThumbMtf();
// // bTransparent = true;
// //}
// //
// //Size aSize( aGraphic.GetSizePixel( pDev ) );
// //
// //if ( aSize.Width() && aSize.Height() )
// //{
// // if( ( aSize.Width() > rRect.GetWidth() ) || ( aSize.Height() > rRect.GetHeight() ) )
// // {
// // Point aNewPos;
// // const double fBmpWH = (double) aSize.Width() / aSize.Height();
// // const double fThmpWH = (double) rRect.GetWidth() / rRect.GetHeight();
// //
// // // Bitmap an Thumbgroesse anpassen
// // if ( fBmpWH < fThmpWH )
// // {
// // aSize.Width() = (long) ( rRect.GetHeight() * fBmpWH );
// // aSize.Height()= rRect.GetHeight();
// // }
// // else
// // {
// // aSize.Width() = rRect.GetWidth();
// // aSize.Height()= (long) ( rRect.GetWidth() / fBmpWH );
// // }
// // }
// //
// // const Point aPos( ( ( rRect.GetWidth() - aSize.Width() ) >> 1 ) + rRect.Left(),
// // ( ( rRect.GetHeight() - aSize.Height() ) >> 1 ) + rRect.Top() );
// //
// // if(bTransparent)
// // {
// // // draw checkered background
// // drawTransparenceBackground(*pDev, aPos, aSize);
// // }
// //
// // aGraphic.Draw( pDev, aPos, aSize );
// //}
//
// SetItemText( nId, GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE) );
// mpTheme->ReleaseObject( pObj );
//}
}
}
......@@ -550,79 +626,171 @@ void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sa
if( mpTheme && ( mnCurRow < mpTheme->GetObjectCount() ) )
{
SgaObject* pObj = mpTheme->AcquireObject( mnCurRow );
const Size aSize(rRect.GetHeight(), rRect.GetHeight());
BitmapEx aBitmapEx;
Size aPreparedSize;
String aItemTextTitle;
String aItemTextPath;
if( pObj )
{
const long nTextPosY = rRect.Top() + ( ( rRect.GetHeight() - rDev.GetTextHeight() ) >> 1 );
mpTheme->GetPreviewBitmapExAndStrings(mnCurRow, aBitmapEx, aPreparedSize, aItemTextTitle, aItemTextPath);
if( GALLERY_BRWBOX_TITLE == nColumnId )
{
Rectangle aOutputRect( rRect.TopLeft(), Size( rRect.GetHeight(), rRect.GetHeight() ) );
GraphicObject aGrfObj;
bool bTransparent(false);
bool bNeedToCreate(aBitmapEx.IsEmpty());
if( pObj->GetObjKind() == SGA_OBJ_SOUND )
if(!bNeedToCreate && GALLERY_BRWBOX_TITLE == nColumnId && !aItemTextTitle.Len())
{
aGrfObj = Graphic( BitmapEx( GAL_RES( RID_SVXBMP_GALLERY_MEDIA ) ) );
bNeedToCreate = true;
}
else if( pObj->IsThumbBitmap() )
{
const BitmapEx aBitmapEx(pObj->GetThumbBmp());
bTransparent = aBitmapEx.IsTransparent();
aGrfObj = Graphic(aBitmapEx);
}
else
if(!bNeedToCreate && GALLERY_BRWBOX_PATH == nColumnId && !aItemTextPath.Len())
{
aGrfObj = Graphic( pObj->GetThumbMtf() );
bTransparent = true;
bNeedToCreate = true;
}
Size aSize( rDev.LogicToPixel( aGrfObj.GetPrefSize(), aGrfObj.GetPrefMapMode() ) );
if( aSize.Width() && aSize.Height() )
{
if( ( aSize.Width() > aOutputRect.GetWidth() ) || ( aSize.Height() > aOutputRect.GetHeight() ) )
if(!bNeedToCreate && aPreparedSize != aSize)
{
const double fBmpWH = (double) aSize.Width() / aSize.Height();
const double fThmpWH = (double) aOutputRect.GetWidth() / aOutputRect.GetHeight();
bNeedToCreate = true;
}
// Bitmap an Thumbgroesse anpassen
if ( fBmpWH < fThmpWH )
if(bNeedToCreate)
{
aSize.Width() = (long) ( aOutputRect.GetHeight() * fBmpWH );
aSize.Height()= aOutputRect.GetHeight();
}
else
SgaObject* pObj = mpTheme->AcquireObject(mnCurRow);
if(pObj)
{
aSize.Width() = aOutputRect.GetWidth();
aSize.Height()= (long) ( aOutputRect.GetWidth() / fBmpWH );
aBitmapEx = pObj->createPreviewBitmapEx(aSize);
aItemTextTitle = GalleryBrowser2::GetItemText(*mpTheme, *pObj, GALLERY_ITEM_TITLE);
aItemTextPath = GalleryBrowser2::GetItemText(*mpTheme, *pObj, GALLERY_ITEM_PATH);
mpTheme->SetPreviewBitmapExAndStrings(mnCurRow, aBitmapEx, aSize, aItemTextTitle, aItemTextPath);
mpTheme->ReleaseObject(pObj);
}
}
aSize.Width() = std::max( aSize.Width(), 4L );
aSize.Height() = std::max( aSize.Height(), 4L );
const long nTextPosY(rRect.Top() + ((rRect.GetHeight() - rDev.GetTextHeight()) >> 1));
const Point aPos( ( ( aOutputRect.GetWidth() - aSize.Width() ) >> 1 ) + aOutputRect.Left(),
( ( aOutputRect.GetHeight() - aSize.Height() ) >> 1 ) + aOutputRect.Top() );
if(GALLERY_BRWBOX_TITLE == nColumnId)
{
if(!aBitmapEx.IsEmpty())
{
const Size aBitmapExSizePixel(aBitmapEx.GetSizePixel());
const Point aPos(
((aSize.Width() - aBitmapExSizePixel.Width()) >> 1) + rRect.Left(),
((aSize.Height() - aBitmapExSizePixel.Height()) >> 1) + rRect.Top());
if(bTransparent)
if(aBitmapEx.IsTransparent())
{
// draw checkered background
drawTransparenceBackground(rDev, aPos, aSize);
}
aGrfObj.Draw( &rDev, aPos, aSize );
}
rDev.DrawText( Point( aOutputRect.Right() + 6, nTextPosY ), GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE ) );
}
else if( GALLERY_BRWBOX_PATH == nColumnId )
rDev.DrawText( Point( rRect.Left(), nTextPosY ), GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_PATH ) );
mpTheme->ReleaseObject( pObj );
}
drawTransparenceBackground(rDev, aPos, aBitmapExSizePixel);
}
rDev.DrawBitmapEx(aPos, aBitmapEx);
}
rDev.DrawText(Point(rRect.Left() + rRect.GetHeight() + 6, nTextPosY), aItemTextTitle);
}
else if(GALLERY_BRWBOX_PATH == nColumnId)
{
rDev.DrawText(Point(rRect.Left(), nTextPosY), aItemTextPath);
}
//SgaObject* pObj = mpTheme->AcquireObject( mnCurRow );
//
//if( pObj )
//{
// const long nTextPosY = rRect.Top() + ( ( rRect.GetHeight() - rDev.GetTextHeight() ) >> 1 );
//
// if( GALLERY_BRWBOX_TITLE == nColumnId )
// {
// const Size aSize(rRect.GetHeight(), rRect.GetHeight());
// const BitmapEx aBitmapEx(pObj->createPreviewBitmapEx(aSize));
// const Size aBitmapExSizePixel(aBitmapEx.GetSizePixel());
//
// if(!aBitmapEx.IsEmpty())
// {
// const Point aPos(
// ((aSize.Width() - aBitmapExSizePixel.Width()) >> 1) + rRect.Left(),
// ((aSize.Height() - aBitmapExSizePixel.Height()) >> 1) + rRect.Top());
//
// if(aBitmapEx.IsTransparent())
// {
// // draw checkered background
// drawTransparenceBackground(rDev, aPos, aBitmapExSizePixel);
// }
//
// rDev.DrawBitmapEx(aPos, aBitmapEx);
// }
//
//
// //Rectangle aOutputRect( rRect.TopLeft(), Size( rRect.GetHeight(), rRect.GetHeight() ) );
// //GraphicObject aGrfObj;
// //bool bTransparent(false);
// //
// //if( pObj->GetObjKind() == SGA_OBJ_SOUND )
// //{
// // aGrfObj = Graphic( BitmapEx( GAL_RESID( RID_SVXBMP_GALLERY_MEDIA ) ) );
// //}
// //else if( pObj->IsThumbBitmap() )
// //{
// // const BitmapEx aBitmapEx(pObj->GetThumbBmp());
// //
// // bTransparent = aBitmapEx.IsTransparent();
// // aGrfObj = Graphic(aBitmapEx);
// //}
// //else
// //{
// // aGrfObj = Graphic( pObj->GetThumbMtf() );
// // bTransparent = true;
// //}
// //
// //Size aSize( rDev.LogicToPixel( aGrfObj.GetPrefSize(), aGrfObj.GetPrefMapMode() ) );
// //
// //if( aSize.Width() && aSize.Height() )
// //{
// // if( ( aSize.Width() > aOutputRect.GetWidth() ) || ( aSize.Height() > aOutputRect.GetHeight() ) )
// // {
// // Point aNewPos;
// // const double fBmpWH = (double) aSize.Width() / aSize.Height();
// // const double fThmpWH = (double) aOutputRect.GetWidth() / aOutputRect.GetHeight();
// //
// // // Bitmap an Thumbgroesse anpassen
// // if ( fBmpWH < fThmpWH )
// // {
// // aSize.Width() = (long) ( aOutputRect.GetHeight() * fBmpWH );
// // aSize.Height()= aOutputRect.GetHeight();
// // }
// // else
// // {
// // aSize.Width() = aOutputRect.GetWidth();
// // aSize.Height()= (long) ( aOutputRect.GetWidth() / fBmpWH );
// // }
// // }
// //
// // aSize.Width() = Max( aSize.Width(), 4L );
// // aSize.Height() = Max( aSize.Height(), 4L );
// //
// // const Point aPos( ( ( aOutputRect.GetWidth() - aSize.Width() ) >> 1 ) + aOutputRect.Left(),
// // ( ( aOutputRect.GetHeight() - aSize.Height() ) >> 1 ) + aOutputRect.Top() );
// //
// // if(bTransparent)
// // {
// // // draw checkered background
// // drawTransparenceBackground(rDev, aPos, aSize);
// // }
// //
// // aGrfObj.Draw( &rDev, aPos, aSize );
// //}
//
// // aOutputRect.Right() is here rRect.Left() + rRect.GetHeight()
// rDev.DrawText( Point( rRect.Left() + rRect.GetHeight() + 6, nTextPosY ), GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_TITLE ) );
// }
// else if( GALLERY_BRWBOX_PATH == nColumnId )
// {
// rDev.DrawText( Point( rRect.Left(), nTextPosY ), GalleryBrowser2::GetItemText( *mpTheme, *pObj, GALLERY_ITEM_PATH ) );
// }
//
// mpTheme->ReleaseObject( pObj );
//}
}
rDev.Pop();
......
......@@ -45,12 +45,54 @@ using namespace ::com::sun::star;
// - SgaObject -
// -------------
SgaObject::SgaObject() :
bIsValid ( sal_False ),
SgaObject::SgaObject()
: bIsValid ( sal_False ),
bIsThumbBmp ( sal_True )
{
}
BitmapEx SgaObject::createPreviewBitmapEx(const Size& rSizePixel) const
{
BitmapEx aRetval;
if(rSizePixel.Width() && rSizePixel.Height())
{
if(SGA_OBJ_SOUND == GetObjKind())
{
aRetval = GAL_RES(RID_SVXBMP_GALLERY_MEDIA);
}
else if(IsThumbBitmap())
{
aRetval = GetThumbBmp();
}
else
{
const Graphic aGraphic(GetThumbMtf());
aRetval = aGraphic.GetBitmapEx();
}
if(!aRetval.IsEmpty())
{
const Size aCurrentSizePixel(aRetval.GetSizePixel());
const double fScaleX((double)rSizePixel.Width() / (double)aCurrentSizePixel.Width());
const double fScaleY((double)rSizePixel.Height() / (double)aCurrentSizePixel.Height());
const double fScale(std::min(fScaleX, fScaleY));
// only scale when need to decrease, no need to make bigger as original. Also
// prevent scaling close to 1.0 which is not needed for pixel graphics
if(fScale < 1.0 && fabs(1.0 - fScale) > 0.005)
{
static sal_uInt32 nScaleFlag = BMP_SCALE_BESTQUALITY;
aRetval.Scale(fScale, fScale, nScaleFlag);
}
}
}
return aRetval;
}
// ------------------------------------------------------------------------
sal_Bool SgaObject::CreateThumb( const Graphic& rGraphic )
......
......@@ -444,6 +444,44 @@ SgaObject* GalleryTheme::AcquireObject( size_t nPos )
// ------------------------------------------------------------------------
void GalleryTheme::GetPreviewBitmapExAndStrings(sal_uIntPtr nPos, BitmapEx& rBitmapEx, Size& rSize, String& rTitle, String& rPath) const
{
const GalleryObject* pGalleryObject = nPos < aObjectList.size() ? aObjectList[ nPos ] : NULL;
if(pGalleryObject)
{
rBitmapEx = pGalleryObject->maPreviewBitmapEx;
rSize = pGalleryObject->maPreparedSize;
rTitle = pGalleryObject->maTitle;
rPath = pGalleryObject->maPath;
}
else
{
OSL_ENSURE(false, "OOps, no GalleryObject at this index (!)");
}
}
// ------------------------------------------------------------------------
void GalleryTheme::SetPreviewBitmapExAndStrings(sal_uIntPtr nPos, const BitmapEx& rBitmapEx, const Size& rSize, const String& rTitle, const String& rPath)
{
GalleryObject* pGalleryObject = nPos < aObjectList.size() ? aObjectList[ nPos ] : NULL;
if(pGalleryObject)
{
pGalleryObject->maPreviewBitmapEx = rBitmapEx;
pGalleryObject->maPreparedSize = rSize;
pGalleryObject->maTitle = rTitle;
pGalleryObject->maPath = rPath;
}
else
{
OSL_ENSURE(false, "OOps, no GalleryObject at this index (!)");
}
}
// ------------------------------------------------------------------------
void GalleryTheme::ReleaseObject( SgaObject* pObject )
{
delete pObject;
......@@ -526,7 +564,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg
// LoeschFlag zuruecksetzen
for (size_t i = 0; i < nCount; i++)
aObjectList[ i ]->bDummy = sal_False;
aObjectList[ i ]->mbDelete = false;
for(size_t i = 0; ( i < nCount ) && !bAbortActualize; i++)
{
......@@ -549,7 +587,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg
{
SgaObjectSound aObjSound( aURL );
if( !InsertObject( aObjSound ) )
pEntry->bDummy = sal_True;
pEntry->mbDelete = true;
}
else
{
......@@ -567,12 +605,12 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg
pNewObj = (SgaObject*) new SgaObjectBmp( aGraphic, aURL, aFormat );
if( !InsertObject( *pNewObj ) )
pEntry->bDummy = sal_True;
pEntry->mbDelete = true;
delete pNewObj;
}
else
pEntry->bDummy = sal_True; // Loesch-Flag setzen
pEntry->mbDelete = true; // Loesch-Flag setzen
}
}
else
......@@ -589,7 +627,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg
SgaObjectSvDraw aNewObj( *pIStm, pEntry->aURL );
if( !InsertObject( aNewObj ) )
pEntry->bDummy = sal_True;
pEntry->mbDelete = true;
pIStm->SetBufferSize( 0L );
}
......@@ -601,7 +639,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg
for ( size_t i = 0; i < aObjectList.size(); )
{
pEntry = aObjectList[ i ];
if( pEntry->bDummy )
if( pEntry->mbDelete )
{
Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) );
Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uLong >( pEntry ) ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment