incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1336585 [1/2] - in /incubator/ooo/trunk/main: cui/source/tabpages/ drawinglayer/inc/drawinglayer/attribute/ drawinglayer/source/attribute/ filter/source/msfilter/ sc/source/filter/excel/ sc/source/ui/view/ sd/source/core/ sd/source/ui/func...
Date Thu, 10 May 2012 10:29:57 GMT
Author: alg
Date: Thu May 10 10:29:55 2012
New Revision: 1336585

URL: http://svn.apache.org/viewvc?rev=1336585&view=rev
Log:
#119125# Completely changed XFillBitmapItem to work wit GraphicObject, removed XOBitmap class, adapted all usages (also the pretty old 8x8 pixel editor). All Bitmap fill styles will now accept transparent bitmaps as fillings in all variations (tiled, etc.). LoadSave is no problem, ODF defines graphic as content for fill. Backward means that OOs before this change will use a white background ofr fill with transparent, same as the fallback all the time when using a transparent fill. This is also a preparation to e.g. offer SVG or Metafiles as fill style.

Removed:
    incubator/ooo/trunk/main/svx/inc/svx/xbitmap.hxx
Modified:
    incubator/ooo/trunk/main/cui/source/tabpages/backgrnd.cxx
    incubator/ooo/trunk/main/cui/source/tabpages/tparea.cxx
    incubator/ooo/trunk/main/cui/source/tabpages/tpbitmap.cxx
    incubator/ooo/trunk/main/cui/source/tabpages/tpline.cxx
    incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx
    incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx
    incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx
    incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
    incubator/ooo/trunk/main/sc/source/filter/excel/xiescher.cxx
    incubator/ooo/trunk/main/sc/source/ui/view/viewfun7.cxx
    incubator/ooo/trunk/main/sd/source/core/drawdoc4.cxx
    incubator/ooo/trunk/main/sd/source/ui/func/fupage.cxx
    incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx
    incubator/ooo/trunk/main/svx/Package_inc.mk
    incubator/ooo/trunk/main/svx/inc/svx/dlgctrl.hxx
    incubator/ooo/trunk/main/svx/inc/svx/xbtmpit.hxx
    incubator/ooo/trunk/main/svx/inc/svx/xenum.hxx
    incubator/ooo/trunk/main/svx/inc/svx/xfillit.hxx
    incubator/ooo/trunk/main/svx/inc/svx/xtable.hxx
    incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape2d.cxx
    incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape3d.cxx
    incubator/ooo/trunk/main/svx/source/dialog/dlgctrl.cxx
    incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdetc.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdoashp.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdograf.cxx
    incubator/ooo/trunk/main/svx/source/svdraw/svdoole2.cxx
    incubator/ooo/trunk/main/svx/source/tbxctrls/fillctrl.cxx
    incubator/ooo/trunk/main/svx/source/unodraw/XPropertyTable.cxx
    incubator/ooo/trunk/main/svx/source/unodraw/unobtabl.cxx
    incubator/ooo/trunk/main/svx/source/unodraw/unoshape.cxx
    incubator/ooo/trunk/main/svx/source/xoutdev/xattr.cxx
    incubator/ooo/trunk/main/svx/source/xoutdev/xattrbmp.cxx
    incubator/ooo/trunk/main/svx/source/xoutdev/xpool.cxx
    incubator/ooo/trunk/main/svx/source/xoutdev/xtabbtmp.cxx
    incubator/ooo/trunk/main/sw/source/core/frmedt/fecopy.cxx
    incubator/ooo/trunk/main/sw/source/filter/ww8/ww8graf.cxx

Modified: incubator/ooo/trunk/main/cui/source/tabpages/backgrnd.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/source/tabpages/backgrnd.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/source/tabpages/backgrnd.cxx (original)
+++ incubator/ooo/trunk/main/cui/source/tabpages/backgrnd.cxx Thu May 10 10:29:55 2012
@@ -63,6 +63,8 @@
 #include <svx/flagsdef.hxx>	//CHINA001
 #include <svl/intitem.hxx> //CHINA001
 #include <sfx2/request.hxx> //CHINA001
+#include <svtools/grfmgr.hxx>
+
 using namespace ::com::sun::star;
 // static ----------------------------------------------------------------
 

Modified: incubator/ooo/trunk/main/cui/source/tabpages/tparea.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/source/tabpages/tparea.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/source/tabpages/tparea.cxx (original)
+++ incubator/ooo/trunk/main/cui/source/tabpages/tparea.cxx Thu May 10 10:29:55 2012
@@ -1132,9 +1132,9 @@ sal_Bool SvxAreaTabPage::FillItemSet( Sf
                 if( nPos != LISTBOX_ENTRY_NOTFOUND &&
                     nPos != aLbBitmap.GetSavedValue() )
                 {
-                    XOBitmap aXOBitmap = pBitmapList->GetBitmap( nPos )->GetXBitmap();
-                    String aString = aLbBitmap.GetSelectEntry();
-                    XFillBitmapItem aFillBitmapItem( aString, aXOBitmap );
+                    const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
+                    const String aString(aLbBitmap.GetSelectEntry());
+                    const XFillBitmapItem aFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject());
                     pOld = GetOldItem( rAttrs, XATTR_FILLBITMAP );
                     if ( !pOld || !( *(const XFillBitmapItem*)pOld == aFillBitmapItem ) )
                     {
@@ -2250,16 +2250,16 @@ IMPL_LINK( SvxAreaTabPage, ModifyBitmapH
     if( _nPos != LISTBOX_ENTRY_NOTFOUND )
 	{
 		// ItemSet fuellen und an aCtlXRectPreview weiterleiten
-        XBitmapEntry* pEntry = pBitmapList->GetBitmap( _nPos );
+        const XBitmapEntry* pEntry = pBitmapList->GetBitmap(_nPos);
 
-		rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) );
-		rXFSet.Put( XFillBitmapItem( String(), pEntry->GetXBitmap() ) );
+		rXFSet.Put(XFillStyleItem(XFILL_BITMAP));
+		rXFSet.Put(XFillBitmapItem(String(), pEntry->GetGraphicObject()));
 	}
 	// NEU
 	else if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) )
 	{
-		rXFSet.Put( XFillStyleItem( XFILL_BITMAP ) );
-        rXFSet.Put( XFillBitmapItem( String(), ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() ) );
+		rXFSet.Put(XFillStyleItem(XFILL_BITMAP));
+        rXFSet.Put(XFillBitmapItem(String(), ((const XFillBitmapItem*)pPoolItem)->GetGraphicObject()));
 	}
 	else
 		rXFSet.Put( XFillStyleItem( XFILL_NONE ) );

Modified: incubator/ooo/trunk/main/cui/source/tabpages/tpbitmap.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/source/tabpages/tpbitmap.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/source/tabpages/tpbitmap.cxx (original)
+++ incubator/ooo/trunk/main/cui/source/tabpages/tpbitmap.cxx Thu May 10 10:29:55 2012
@@ -112,7 +112,7 @@ SvxBitmapTabPage::SvxBitmapTabPage
 
     pXPool              ( (XOutdevItemPool*) rInAttrs.GetPool() ),
     aXFStyleItem        ( XFILL_BITMAP ),
-    aXBitmapItem        ( String(), XOBitmap() ),
+    aXBitmapItem        ( String(), Graphic() ),
     aXFillAttr          ( pXPool ),
     rXFSet              ( aXFillAttr.GetItemSet() )
 {
@@ -265,33 +265,29 @@ sal_Bool SvxBitmapTabPage::FillItemSet( 
 {
 	if( *pDlgType == 0 && *pbAreaTP == sal_False ) // Flaechen-Dialog
 	{
-		if( *pPageType == PT_BITMAP )
+		if(PT_BITMAP == *pPageType)
 		{
-			// CheckChanges_Impl(); <-- doppelte Abfrage ?
-
-			XOBitmap aXOBitmap;
-			String aString;
-			sal_uInt16 nPos = aLbBitmaps.GetSelectEntryPos();
-			if( nPos != LISTBOX_ENTRY_NOTFOUND )
-			{
-                aXOBitmap = pBitmapList->GetBitmap( nPos )->GetXBitmap();
-				aString = aLbBitmaps.GetSelectEntry();
-
+			const sal_uInt16 nPos(aLbBitmaps.GetSelectEntryPos());
+            
+            _rOutAttrs.Put(XFillStyleItem(XFILL_BITMAP));
+            
+            if(LISTBOX_ENTRY_NOTFOUND != nPos)
+			{
+                const XBitmapEntry* pXBitmapEntry = pBitmapList->GetBitmap(nPos);
+				const String aString(aLbBitmaps.GetSelectEntry());
+                
+                _rOutAttrs.Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
 			}
 			else
 			{
-				aXOBitmap = aBitmapCtl.GetXBitmap();
-
-				// #85339# if it's an array, force conversion to bitmap before using it.
-				if(aXOBitmap.GetBitmapType() == XBITMAP_8X8)
-					aXOBitmap.GetBitmap();
+				const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
 
+                _rOutAttrs.Put(XFillBitmapItem(String(), Graphic(aBitmapEx)));
 			}
-            _rOutAttrs.Put( XFillStyleItem( XFILL_BITMAP ) );
-            _rOutAttrs.Put( XFillBitmapItem( aString, aXOBitmap ) );
 		}
 	}
-	return sal_True;
+
+    return sal_True;
 }
 
 // -----------------------------------------------------------------------
@@ -306,7 +302,7 @@ void SvxBitmapTabPage::Reset( const SfxI
 	aBitmapCtl.SetBmpArray( aCtlPixel.GetBitmapPixelPtr() );
 
 	// Bitmap holen und darstellen
-	XFillBitmapItem aBmpItem( (const String &) String(), aBitmapCtl.GetXBitmap() );
+	const XFillBitmapItem aBmpItem(String(), Graphic(aBitmapCtl.GetBitmapEx()));
 	rXFSet.Put( aBmpItem );
 	aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
 	aCtlPreview.Invalidate();
@@ -341,153 +337,49 @@ SfxTabPage* SvxBitmapTabPage::Create( Wi
 
 IMPL_LINK( SvxBitmapTabPage, ChangeBitmapHdl_Impl, void *, EMPTYARG )
 {
-	XOBitmap* pXOBitmap = NULL;
-	int nPos = aLbBitmaps.GetSelectEntryPos();
+    GraphicObject* pGraphicObject = 0;
+	int nPos(aLbBitmaps.GetSelectEntryPos());
 
-	if( nPos != LISTBOX_ENTRY_NOTFOUND )
-        pXOBitmap = new XOBitmap( ( (XBitmapEntry*) pBitmapList->GetBitmap( nPos ) )->GetXBitmap() );
+	if(LISTBOX_ENTRY_NOTFOUND != nPos)
+    {
+        pGraphicObject = new GraphicObject(pBitmapList->GetBitmap(nPos)->GetGraphicObject());
+    }
 	else
 	{
-		const SfxPoolItem* pPoolItem = NULL;
-		if( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLSTYLE ), sal_True, &pPoolItem ) )
+		const SfxPoolItem* pPoolItem = 0;
+
+        if(SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLSTYLE), true, &pPoolItem))
 		{
-			XFillStyle eXFS = (XFillStyle) ( ( const XFillStyleItem* ) pPoolItem )->GetValue();
-			if( ( XFILL_BITMAP == eXFS ) &&
-				( SFX_ITEM_SET == rOutAttrs.GetItemState( GetWhich( XATTR_FILLBITMAP ), sal_True, &pPoolItem ) ) )
+			const XFillStyle eXFS((XFillStyle)((const XFillStyleItem*)pPoolItem)->GetValue());
+
+            if((XFILL_BITMAP == eXFS) && (SFX_ITEM_SET == rOutAttrs.GetItemState(GetWhich(XATTR_FILLBITMAP), true, &pPoolItem)))
 			{
-                pXOBitmap = new XOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() );
+                pGraphicObject = new GraphicObject(((const XFillBitmapItem*)pPoolItem)->GetGraphicObject());
 			}
 		}
-		if( !pXOBitmap )
+
+        if(!pGraphicObject)
 		{
-			aLbBitmaps.SelectEntryPos( 0 );
+			aLbBitmaps.SelectEntryPos(0);
 			nPos = aLbBitmaps.GetSelectEntryPos();
-			if( nPos != LISTBOX_ENTRY_NOTFOUND )
-                pXOBitmap = new XOBitmap( ( (XBitmapEntry*) pBitmapList->GetBitmap( nPos ) )->GetXBitmap() );
+			
+            if(LISTBOX_ENTRY_NOTFOUND != nPos)
+            {
+                pGraphicObject = new GraphicObject(pBitmapList->GetBitmap(nPos)->GetGraphicObject());
+            }
 		}
 	}
-	if( pXOBitmap )
-	{
-		//WorkWindow		aTmpWW( DLGWIN );
-		//VirtualDevice	aVD( aTmpWW );
-		//sal_uInt16	nLines = aCtlPixel.GetLineCount();
-		//Color	aPixelColor, aBackColor;
-		//sal_Bool	bPixelColor = sal_False;
-		//sal_uInt16	nWidth  = pBitmap->GetSizePixel().Width();
-		//sal_uInt16	nHeight = pBitmap->GetSizePixel().Height();
-
-		// #85339# try to convert bitmapped item to array item.
-		if(pXOBitmap->GetBitmapType() == XBITMAP_IMPORT)
-		{
-			Bitmap aBitmap(pXOBitmap->GetBitmap());
-			Size aSizePixel(aBitmap.GetSizePixel());
-
-			if(8 == aSizePixel.Width() && 8 == aSizePixel.Height())
-			{
-				sal_uInt16* pPixelArray = new sal_uInt16[64];
-				sal_uInt32 nCol1(0xffffffff); // background
-				sal_uInt32 nCol2(0xffffffff); // pixel
-				BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess();
-				sal_Bool bValid(sal_True);
-
-				if(pAccess)
-				{
-					for(sal_uInt32 a(0); bValid && a < 64; a++)
-					{
-						const BitmapColor aBmCol = pAccess->GetColor(a>>3, a%8);
-						Color aRgbCol(aBmCol.GetRed(), aBmCol.GetGreen(), aBmCol.GetBlue());
-						sal_uInt32 nColVal = aRgbCol.GetRGBColor();
-
-						// test with nCol1
-						if(nCol1 != nColVal)
-						{
-							if(0xffffffff == nCol1)
-							{
-								// nCol1 is used first time
-								nCol1 = nColVal;
-								pPixelArray[a] = 0;
-							}
-							else
-							{
-								// test with nCol2
-								if(nCol2 != nColVal)
-								{
-									if(0xffffffff == nCol2)
-									{
-										// nCol2 used first time
-										nCol2 = nColVal;
-										pPixelArray[a] = 1;
-									}
-									else
-									{
-										// Third color detected
-										bValid = sal_False;
-									}
-								}
-								else
-								{
-									// color is pixel color
-									pPixelArray[a] = 1;
-								}
-							}
-						}
-						else
-						{
-							// color is background color
-							pPixelArray[a] = 0;
-						}
-					}
-
-					// release ReadAccess
-					aBitmap.ReleaseAccess(pAccess);
-				}
-				else
-				{
-					// no access -> no success
-					bValid = sal_False;
-				}
 
-				if(bValid)
-				{
-					Color aCol1(nCol1);
-					Color aCol2(nCol2);
-
-					// no pixel color found? Use opposite od background color.
-					if(0xffffffff == nCol2)
-					{
-						aCol2 = Color(
-							0xff - aCol1.GetRed(),
-							0xff - aCol1.GetGreen(),
-							0xff - aCol1.GetBlue());
-					}
-
-					// transformation did work, create a new Item
-					delete pXOBitmap;
-					pXOBitmap = new XOBitmap(pPixelArray, aCol2, aCol1);
-				}
-
-				// cleanup
-				delete[] pPixelArray;
-			}
-		}
+    if(pGraphicObject)
+	{
+        BitmapColor aBack;
+        BitmapColor aFront;
+        bool bIs8x8(isHistorical8x8(pGraphicObject->GetGraphic().GetBitmap(), aBack, aFront));
 
-		aLbColor.SetNoSelection();
+        aLbColor.SetNoSelection();
 		aLbBackgroundColor.SetNoSelection();
 
-		if( pXOBitmap->GetBitmapType() == XBITMAP_IMPORT )
-		{
-			aCtlPixel.Reset();
-			aCtlPixel.SetPaintable( sal_False );
-			aCtlPixel.Disable();
-            aFtPixelEdit.Disable();
-			aFtColor.Disable();
-			aLbColor.Disable();
-			aFtBackgroundColor.Disable();
-			aLbBackgroundColor.Disable();
-			aBtnModify.Disable();
-			aBtnAdd.Disable();
-		}
-		else if( pXOBitmap->GetBitmapType() == XBITMAP_8X8 )
+		if(bIs8x8)
 		{
 			aCtlPixel.SetPaintable( sal_True );
 			aCtlPixel.Enable();
@@ -500,10 +392,10 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitma
 			aBtnAdd.Enable();
 
 			// Setzen des PixelControls
-			aCtlPixel.SetXBitmap( *pXOBitmap );
+			aCtlPixel.SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
 
-			Color aPixelColor = pXOBitmap->GetPixelColor();
-			Color aBackColor  = pXOBitmap->GetBackgroundColor();
+			Color aPixelColor = aFront;
+			Color aBackColor = aBack;
 
 			aBitmapCtl.SetPixelColor( aPixelColor );
 			aBitmapCtl.SetBackgroundColor( aBackColor );
@@ -529,19 +421,34 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBitma
 				aLbBackgroundColor.SelectEntry( aBackColor );
 			}
 		}
-		aCtlPixel.Invalidate();
+        else
+		{
+			aCtlPixel.Reset();
+			aCtlPixel.SetPaintable( sal_False );
+			aCtlPixel.Disable();
+            aFtPixelEdit.Disable();
+			aFtColor.Disable();
+			aLbColor.Disable();
+			aFtBackgroundColor.Disable();
+			aLbBackgroundColor.Disable();
+			aBtnModify.Disable();
+			aBtnAdd.Disable();
+		}
+
+        aCtlPixel.Invalidate();
 
 		// Bitmap darstellen
-		XFillBitmapItem aXBmpItem( (const String &) String(), *pXOBitmap );
+		const XFillBitmapItem aXBmpItem(String(), *pGraphicObject);
 		rXFSet.Put( aXBmpItem );
 
 		aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
 		aCtlPreview.Invalidate();
 
 		bBmpChanged = sal_False;
-		delete pXOBitmap;
+		delete pGraphicObject;
 	}
-	return 0L;
+	
+    return 0;
 }
 
 // -----------------------------------------------------------------------
@@ -667,21 +574,17 @@ IMPL_LINK( SvxBitmapTabPage, ClickAddHdl
 		XBitmapEntry* pEntry = 0;
 		if( aCtlPixel.IsEnabled() )
 		{
-			XOBitmap aXOBitmap = aBitmapCtl.GetXBitmap();
+			const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
 
-			// #85339# if it's an array, force conversion to bitmap before using it.
-			if(aXOBitmap.GetBitmapType() == XBITMAP_8X8)
-				aXOBitmap.GetBitmap();
-
-			pEntry = new XBitmapEntry( aXOBitmap, aName );
+			pEntry = new XBitmapEntry(Graphic(aBitmapEx), aName);
 		}
 		else // Es muss sich um eine nicht vorhandene importierte Bitmap handeln
 		{
-			const SfxPoolItem* pPoolItem = NULL;
-			if( SFX_ITEM_SET == rOutAttrs.GetItemState( XATTR_FILLBITMAP, sal_True, &pPoolItem ) )
+			const SfxPoolItem* pPoolItem = 0;
+
+            if(SFX_ITEM_SET == rOutAttrs.GetItemState(XATTR_FILLBITMAP, true, &pPoolItem))
 			{
-                XOBitmap aXOBitmap( ( ( const XFillBitmapItem* ) pPoolItem )->GetBitmapValue() );
-				pEntry = new XBitmapEntry( aXOBitmap, aName );
+                pEntry = new XBitmapEntry(dynamic_cast< const XFillBitmapItem* >(pPoolItem)->GetGraphicObject(), aName);
 			}
 		}
 
@@ -795,9 +698,7 @@ IMPL_LINK( SvxBitmapTabPage, ClickImport
 
 			if( !nError )
 			{
-				Bitmap aBmp( aGraphic.GetBitmap() );
-				XBitmapEntry* pEntry =
-					new XBitmapEntry( XOBitmap( aBmp ), aName );
+				XBitmapEntry* pEntry = new XBitmapEntry( aGraphic, aName );
 				pBitmapList->Insert( pEntry );
 
 				aLbBitmaps.Append( pEntry );
@@ -875,13 +776,9 @@ IMPL_LINK( SvxBitmapTabPage, ClickModify
 
 				pEntry->SetName( aName );
 
-				XOBitmap aXOBitmap = aBitmapCtl.GetXBitmap();
-
-				// #85339# if it's an array, force conversion to bitmap before using it.
-				if(aXOBitmap.GetBitmapType() == XBITMAP_8X8)
-					aXOBitmap.GetBitmap();
+				const BitmapEx aBitmapEx(aBitmapCtl.GetBitmapEx());
 
-				pEntry->SetXBitmap( aXOBitmap );
+				pEntry->SetGraphicObject(Graphic(aBitmapEx));
 
 				aLbBitmaps.Modify( pEntry, nPos );
 				aLbBitmaps.SelectEntryPos( nPos );
@@ -1111,7 +1008,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangePixel
 	aBitmapCtl.SetPixelColor( aLbColor.GetSelectEntryColor() );
 
 	// Bitmap holen und darstellen
-	rXFSet.Put( XFillBitmapItem( String(), aBitmapCtl.GetXBitmap() ) );
+	rXFSet.Put(XFillBitmapItem(String(), Graphic(aBitmapCtl.GetBitmapEx())));
 	aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
 	aCtlPreview.Invalidate();
 
@@ -1130,7 +1027,7 @@ IMPL_LINK( SvxBitmapTabPage, ChangeBackg
 	aBitmapCtl.SetBackgroundColor( aLbBackgroundColor.GetSelectEntryColor() );
 
 	// Bitmap holen und darstellen
-	rXFSet.Put( XFillBitmapItem( String(), aBitmapCtl.GetXBitmap() ) );
+	rXFSet.Put(XFillBitmapItem(String(), Graphic(aBitmapCtl.GetBitmapEx())));
 	aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
 	aCtlPreview.Invalidate();
 
@@ -1148,7 +1045,7 @@ void SvxBitmapTabPage::PointChanged( Win
         aBitmapCtl.SetBmpArray( aCtlPixel.GetBitmapPixelPtr() );
 
 		// Bitmap holen und darstellen
-		rXFSet.Put( XFillBitmapItem( String(), aBitmapCtl.GetXBitmap() ) );
+		rXFSet.Put(XFillBitmapItem(String(), Graphic(aBitmapCtl.GetBitmapEx())));
 		aCtlPreview.SetAttributes( aXFillAttr.GetItemSet() );
 		aCtlPreview.Invalidate();
 

Modified: incubator/ooo/trunk/main/cui/source/tabpages/tpline.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/cui/source/tabpages/tpline.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/cui/source/tabpages/tpline.cxx (original)
+++ incubator/ooo/trunk/main/cui/source/tabpages/tpline.cxx Thu May 10 10:29:55 2012
@@ -62,7 +62,6 @@
 #include <sfx2/objsh.hxx>
 #include <editeng/brshitem.hxx>
 #include <svx/gallery.hxx>
-#include <svx/xbitmap.hxx>
 #include <unotools/localfilehelper.hxx>
 #include "paragrph.hrc"
 #include "sfx2/opengrf.hxx"

Modified: incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx Thu May 10 10:29:55 2012
@@ -25,10 +25,11 @@
 #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLBITMAPATTRIBUTE_HXX
 
 #include <drawinglayer/drawinglayerdllapi.h>
+
 //////////////////////////////////////////////////////////////////////////////
 // predefines
 
-class Bitmap;
+class BitmapEx;
 
 namespace basegfx {
 	class B2DRange;
@@ -54,7 +55,7 @@ namespace drawinglayer
 		public:
             /// constructors/assignmentoperator/destructor
 			SdrFillBitmapAttribute(
-				const Bitmap& rBitmap, 
+				const BitmapEx& rBitmapEx, 
                 const basegfx::B2DVector& rSize, 
                 const basegfx::B2DVector& rOffset,
 				const basegfx::B2DVector& rOffsetPosition, 
@@ -74,7 +75,7 @@ namespace drawinglayer
 			bool operator==(const SdrFillBitmapAttribute& rCandidate) const;
 
 			// data read access
-            const Bitmap& getBitmap() const;
+            const BitmapEx& getBitmapEx() const;
             const basegfx::B2DVector& getSize() const;
             const basegfx::B2DVector& getOffset() const;
             const basegfx::B2DVector& getOffsetPosition() const;

Modified: incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx (original)
+++ incubator/ooo/trunk/main/drawinglayer/source/attribute/sdrfillbitmapattribute.cxx Thu May 10 10:29:55 2012
@@ -41,7 +41,7 @@ namespace drawinglayer
 		    sal_uInt32								mnRefCount;
 
             // data definitions
-			Bitmap									maBitmap;
+			BitmapEx								maBitmapEx;
 			basegfx::B2DVector						maSize;
 			basegfx::B2DVector						maOffset;
 			basegfx::B2DVector						maOffsetPosition;
@@ -53,7 +53,7 @@ namespace drawinglayer
 			unsigned								mbLogSize : 1;
 
 			ImpSdrFillBitmapAttribute(
-				const Bitmap& rBitmap, 
+				const BitmapEx& rBitmapEx, 
                 const basegfx::B2DVector& rSize, 
                 const basegfx::B2DVector& rOffset,
 				const basegfx::B2DVector& rOffsetPosition, 
@@ -62,7 +62,7 @@ namespace drawinglayer
                 bool bStretch, 
                 bool bLogSize)
 		    :	mnRefCount(0),
-		    	maBitmap(rBitmap),
+		    	maBitmapEx(rBitmapEx),
 			    maSize(rSize),
 			    maOffset(rOffset),
 			    maOffsetPosition(rOffsetPosition),
@@ -74,7 +74,7 @@ namespace drawinglayer
 		    }
 
 			// data read access
-            const Bitmap& getBitmap() const { return maBitmap; }
+            const BitmapEx& getBitmapEx() const { return maBitmapEx; }
             const basegfx::B2DVector& getSize() const { return maSize; }
             const basegfx::B2DVector& getOffset() const { return maOffset; }
             const basegfx::B2DVector& getOffsetPosition() const { return maOffsetPosition; }
@@ -85,7 +85,7 @@ namespace drawinglayer
 
             bool operator==(const ImpSdrFillBitmapAttribute& rCandidate) const
             {
-			    return (getBitmap() == rCandidate.getBitmap()
+			    return (getBitmapEx() == rCandidate.getBitmapEx()
 				    && getSize() == rCandidate.getSize()
 				    && getOffset() == rCandidate.getOffset()
 				    && getOffsetPosition() == rCandidate.getOffsetPosition()
@@ -102,7 +102,7 @@ namespace drawinglayer
                 if(!pDefault)
                 {
                     pDefault = new ImpSdrFillBitmapAttribute(
-			            Bitmap(),
+			            BitmapEx(),
                         basegfx::B2DVector(),
                         basegfx::B2DVector(),
 			            basegfx::B2DVector(),
@@ -120,7 +120,7 @@ namespace drawinglayer
 		};
 
         SdrFillBitmapAttribute::SdrFillBitmapAttribute(
-			const Bitmap& rBitmap, 
+			const BitmapEx& rBitmapEx, 
             const basegfx::B2DVector& rSize, 
             const basegfx::B2DVector& rOffset,
 			const basegfx::B2DVector& rOffsetPosition, 
@@ -128,8 +128,16 @@ namespace drawinglayer
 			bool bTiling, 
             bool bStretch, 
             bool bLogSize)
-		:	mpSdrFillBitmapAttribute(new ImpSdrFillBitmapAttribute(
-                rBitmap, rSize, rOffset, rOffsetPosition, rRectPoint, bTiling,  bStretch, bLogSize))
+		:	mpSdrFillBitmapAttribute(
+                new ImpSdrFillBitmapAttribute(
+                    rBitmapEx, 
+                    rSize, 
+                    rOffset, 
+                    rOffsetPosition, 
+                    rRectPoint, 
+                    bTiling,  
+                    bStretch, 
+                    bLogSize))
 		{
 		}
 
@@ -197,9 +205,9 @@ namespace drawinglayer
 			return (*rCandidate.mpSdrFillBitmapAttribute == *mpSdrFillBitmapAttribute);
 		}
 
-        const Bitmap& SdrFillBitmapAttribute::getBitmap() const 
+        const BitmapEx& SdrFillBitmapAttribute::getBitmapEx() const 
         { 
-            return mpSdrFillBitmapAttribute->getBitmap(); 
+            return mpSdrFillBitmapAttribute->getBitmapEx(); 
         }
 
         const basegfx::B2DVector& SdrFillBitmapAttribute::getSize() const 
@@ -240,8 +248,8 @@ namespace drawinglayer
         FillBitmapAttribute SdrFillBitmapAttribute::getFillBitmapAttribute(const basegfx::B2DRange& rRange) const
 		{
 			// get logical size of bitmap (before expanding eventually)
-			Bitmap aBitmap(getBitmap());
-			const basegfx::B2DVector aLogicalSize(aBitmap.GetPrefSize().getWidth(), aBitmap.GetPrefSize().getHeight());
+			BitmapEx aBitmapEx(getBitmapEx());
+			const basegfx::B2DVector aLogicalSize(aBitmapEx.GetPrefSize().getWidth(), aBitmapEx.GetPrefSize().getHeight());
 
 			// get hor/ver shiftings and apply them eventually to the bitmap, but only
 			// when tiling is on
@@ -252,45 +260,45 @@ namespace drawinglayer
 			{
 				if(0.0 != getOffset().getX() || 0.0 != getOffset().getY())
 				{
-					const sal_uInt32 nWidth(aBitmap.GetSizePixel().getWidth());
-					const sal_uInt32 nHeight(aBitmap.GetSizePixel().getHeight());
+					const sal_uInt32 nWidth(aBitmapEx.GetSizePixel().getWidth());
+					const sal_uInt32 nHeight(aBitmapEx.GetSizePixel().getHeight());
 
 					if(0.0 != getOffset().getX())
 					{
 						bExpandHeight = true;
 						const sal_uInt32 nOffset(basegfx::fround(((double)nWidth * getOffset().getX()) / 100.0));
-						aBitmap.Expand(0L, nHeight);
+						aBitmapEx.Expand(0L, nHeight);
 
 						const Size aSizeA(nOffset, nHeight);
 						const Rectangle aDstA(Point(0L, nHeight), aSizeA);
 						const Rectangle aSrcA(Point(nWidth - nOffset, 0L), aSizeA);
-						aBitmap.CopyPixel(aDstA, aSrcA);
+						aBitmapEx.CopyPixel(aDstA, aSrcA);
 
 						const Size aSizeB(nWidth - nOffset, nHeight);
 						const Rectangle aDstB(Point(nOffset, nHeight), aSizeB);
 						const Rectangle aSrcB(Point(0L, 0L), aSizeB);
-						aBitmap.CopyPixel(aDstB, aSrcB);
+						aBitmapEx.CopyPixel(aDstB, aSrcB);
 					}
 					else
 					{
 						bExpandWidth = true;
 						const sal_uInt32 nOffset(basegfx::fround(((double)nHeight * getOffset().getY()) / 100.0));
-						aBitmap.Expand(nWidth, 0L);
+						aBitmapEx.Expand(nWidth, 0L);
 
 						const Size aSize(nWidth, nHeight);
 						const Rectangle aDst(Point(nWidth, 0L), aSize);
 						const Rectangle aSrc(Point(0L, 0L), aSize);
-						aBitmap.CopyPixel(aDst, aSrc);
+						aBitmapEx.CopyPixel(aDst, aSrc);
 
 						const Size aSizeA(nWidth, nOffset);
 						const Rectangle aDstA(Point(0L, 0L), aSizeA);
 						const Rectangle aSrcA(Point(nWidth, nHeight - nOffset), aSizeA);
-						aBitmap.CopyPixel(aDstA, aSrcA);
+						aBitmapEx.CopyPixel(aDstA, aSrcA);
 
 						const Size aSizeB(nWidth, nHeight - nOffset);
 						const Rectangle aDstB(Point(0L, nOffset), aSizeB);
 						const Rectangle aSrcB(Point(nWidth, 0L), aSizeB);
-						aBitmap.CopyPixel(aDstB, aSrcB);
+						aBitmapEx.CopyPixel(aDstB, aSrcB);
 					}
 				}
 			}
@@ -391,7 +399,7 @@ namespace drawinglayer
 				aBitmapSize.setY(aBitmapSize.getY() / fRangeHeight);
 			}
 
-			return FillBitmapAttribute(BitmapEx(aBitmap), aBitmapTopLeft, aBitmapSize, getTiling());
+			return FillBitmapAttribute(aBitmapEx, aBitmapTopLeft, aBitmapSize, getTiling());
 		}
 	} // end of namespace attribute
 } // end of namespace drawinglayer

Modified: incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/msdffimp.cxx Thu May 10 10:29:55 2012
@@ -1316,9 +1316,8 @@ void ApplyRectangularGradientAsBitmap( c
 				}
 			}
 
-			XOBitmap aXBmp( aBitmap, XBITMAP_STRETCH );
-			rSet.Put( XFillBmpTileItem( sal_False ) );
-			rSet.Put( XFillBitmapItem( String(), aXBmp ) );
+			rSet.Put(XFillBmpTileItem(false));
+			rSet.Put(XFillBitmapItem(String(), Graphic(aBitmap)));
 		}
 	}
 }
@@ -1452,45 +1451,30 @@ void DffPropertyReader::ApplyFillAttribu
                     bOK = SeekToContent( DFF_Prop_fillBlip, rIn ) && rManager.GetBLIPDirect( rIn, aGraf, NULL );
                 if ( bOK )
 				{
-					Bitmap aBmp( aGraf.GetBitmap() );
-
 					if ( eMSO_FillType == mso_fillPattern )
 					{
 						Color aCol1( COL_WHITE ), aCol2( COL_WHITE );
-						if ( IsProperty( DFF_Prop_fillColor ) )
+						
+                        if ( IsProperty( DFF_Prop_fillColor ) )
 							aCol1 = rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillColor ), DFF_Prop_fillColor );
-						if ( IsProperty( DFF_Prop_fillBackColor ) )
+						
+                        if ( IsProperty( DFF_Prop_fillBackColor ) )
 							aCol2 = rManager.MSO_CLR_ToColor( GetPropertyValue( DFF_Prop_fillBackColor ), DFF_Prop_fillBackColor );
 
-						XOBitmap aXOBitmap;
-						aXOBitmap.SetBitmap( aBmp );
-						aXOBitmap.SetBitmapType( XBITMAP_IMPORT );
-
-						if( aBmp.GetSizePixel().Width() == 8 && aBmp.GetSizePixel().Height() == 8 && aBmp.GetColorCount() == 2)
-						{
-							aXOBitmap.Bitmap2Array();
-							aXOBitmap.SetBitmapType( XBITMAP_8X8 );
-							aXOBitmap.SetPixelSize( aBmp.GetSizePixel() );
-							aXOBitmap.SetPixelColor( aCol1 );
-							aXOBitmap.SetBackgroundColor( aCol2 );
-							aXOBitmap.Array2Bitmap();
-						}
-						rSet.Put( XFillBitmapItem( String(), aXOBitmap ) );
+                        rSet.Put(XFillBitmapItem(String(), aGraf));
 					}
 					else if ( eMSO_FillType == mso_fillTexture )
 					{
-						XOBitmap aXBmp( aBmp, XBITMAP_STRETCH );
-						rSet.Put( XFillBmpTileItem( sal_True ) );
-						rSet.Put( XFillBitmapItem( String(), aXBmp ) );
-						rSet.Put( XFillBmpSizeXItem( GetPropertyValue( DFF_Prop_fillWidth, 0 ) / 360 ) );
-						rSet.Put( XFillBmpSizeYItem( GetPropertyValue( DFF_Prop_fillHeight, 0 ) / 360 ) );
-						rSet.Put( XFillBmpSizeLogItem( sal_True ) );
+						rSet.Put(XFillBmpTileItem(true));
+						rSet.Put(XFillBitmapItem(String(), aGraf));
+						rSet.Put(XFillBmpSizeXItem(GetPropertyValue(DFF_Prop_fillWidth, 0) / 360));
+						rSet.Put(XFillBmpSizeYItem(GetPropertyValue(DFF_Prop_fillHeight, 0) / 360));
+						rSet.Put(XFillBmpSizeLogItem(true));
 					}
 					else
 					{
-						XOBitmap aXBmp( aBmp, XBITMAP_STRETCH );
-						rSet.Put( XFillBitmapItem( String(), aXBmp ) );
-						rSet.Put( XFillBmpTileItem( sal_False ) );
+						rSet.Put(XFillBitmapItem(String(), aGraf));
+						rSet.Put(XFillBmpTileItem(false));
 					}
 				}
 			}

Modified: incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Thu May 10 10:29:55 2012
@@ -7571,10 +7571,9 @@ void ApplyCellAttributes( const SdrObjec
 				{
 					eFS = com::sun::star::drawing::FillStyle_BITMAP;
 
-					XFillBitmapItem aXFillBitmapItem((const XFillBitmapItem&)pObj->GetMergedItem( XATTR_FILLBITMAP ));
-					XOBitmap aLocalXOBitmap( aXFillBitmapItem.GetBitmapValue() );
+					const XFillBitmapItem aXFillBitmapItem((const XFillBitmapItem&)pObj->GetMergedItem( XATTR_FILLBITMAP ));
 					rtl::OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
-					aURL += rtl::OUString::createFromAscii( aLocalXOBitmap.GetGraphicObject().GetUniqueID().GetBuffer() );
+					aURL += rtl::OUString::createFromAscii(aXFillBitmapItem.GetGraphicObject().GetUniqueID().GetBuffer());
 
 					static const rtl::OUString sFillBitmapURL( String( RTL_CONSTASCII_USTRINGPARAM( "FillBitmapURL" ) ) );
 					xPropSet->setPropertyValue( sFillBitmapURL, Any( aURL ) );

Modified: incubator/ooo/trunk/main/sc/source/filter/excel/xiescher.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/filter/excel/xiescher.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/filter/excel/xiescher.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/filter/excel/xiescher.cxx Thu May 10 10:29:55 2012
@@ -660,15 +660,8 @@ void XclImpDrawObjBase::ConvertFillStyle
             aMemStrm.Seek( STREAM_SEEK_TO_BEGIN );
             Bitmap aBitmap;
             aBitmap.Read( aMemStrm, sal_False );
-            XOBitmap aXOBitmap( aBitmap );
-            aXOBitmap.Bitmap2Array();
-            aXOBitmap.SetBitmapType( XBITMAP_8X8 );
-            if( aXOBitmap.GetBackgroundColor().GetColor() == COL_BLACK )
-                ::std::swap( aPattColor, aBackColor );
-            aXOBitmap.SetPixelColor( aPattColor );
-            aXOBitmap.SetBackgroundColor( aBackColor );
-            rSdrObj.SetMergedItem( XFillStyleItem( XFILL_BITMAP ) );
-            rSdrObj.SetMergedItem( XFillBitmapItem( EMPTY_STRING, aXOBitmap ) );
+            rSdrObj.SetMergedItem(XFillStyleItem(XFILL_BITMAP));
+            rSdrObj.SetMergedItem(XFillBitmapItem(EMPTY_STRING, Graphic(aBitmap)));
         }
     }
 }

Modified: incubator/ooo/trunk/main/sc/source/ui/view/viewfun7.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/view/viewfun7.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/view/viewfun7.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/view/viewfun7.cxx Thu May 10 10:29:55 2012
@@ -36,7 +36,6 @@
 #include <svx/svdpage.hxx>
 #include <svx/svdpagv.hxx>
 #include <svx/svdundo.hxx>
-#include <svx/xbitmap.hxx>
 #include <svx/xbtmpit.hxx>
 #include <svx/xoutbmp.hxx>
 #include <sfx2/objsh.hxx>
@@ -467,15 +466,12 @@ sal_Bool ScViewFunc::ApplyGraphicToObjec
 			/******************************************************************
 			* Das Objekt wird mit der Graphik gefuellt
 			******************************************************************/
-			//pScDrawView->BegUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
 			pScDrawView->AddUndo(new SdrUndoAttrObj(*pPickObj));
-			//pScDrawView->EndUndo();
 
-			XOBitmap aXOBitmap( rGraphic.GetBitmap() );
 			SfxItemSet aSet( pScDrawView->GetModel()->GetItemPool(),
 								XATTR_FILLSTYLE, XATTR_FILLBITMAP );
 			aSet.Put(XFillStyleItem(XFILL_BITMAP));
-			aSet.Put(XFillBitmapItem(String(), aXOBitmap));
+			aSet.Put(XFillBitmapItem(String(), rGraphic));
 
 			pPickObj->SetMergedItemSetAndBroadcast(aSet);
 

Modified: incubator/ooo/trunk/main/sd/source/core/drawdoc4.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/core/drawdoc4.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/core/drawdoc4.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/core/drawdoc4.cxx Thu May 10 10:29:55 2012
@@ -190,7 +190,7 @@ void SdDrawDocument::CreateLayoutTemplat
     Color   aNullColor( COL_WHITE );
 	Bitmap  aNullBmp( aNullSize, 8 );
     aNullBmp.Erase( aNullColor );
-	rISet.Put(XFillBitmapItem(pPool,aNullBmp));
+	rISet.Put(XFillBitmapItem(pPool, Graphic(aNullBmp)));
 
 					// Schattenattribute (Drawing Engine)
 	rISet.Put(SdrShadowItem(sal_False));

Modified: incubator/ooo/trunk/main/sd/source/ui/func/fupage.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/func/fupage.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/func/fupage.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/func/fupage.cxx Thu May 10 10:29:55 2012
@@ -312,7 +312,7 @@ const SfxItemSet* FuPage::ExecuteDialog(
 				
 				// MigrateItemSet makes sure the XFillBitmapItem will have a unique name
 				SfxItemSet aMigrateSet( mpDoc->GetPool(), XATTR_FILLBITMAP, XATTR_FILLBITMAP );
-				aMigrateSet.Put( XFillBitmapItem( String(RTL_CONSTASCII_USTRINGPARAM("background")), XOBitmap(aGraphic) ) );
+				aMigrateSet.Put(XFillBitmapItem(String(RTL_CONSTASCII_USTRINGPARAM("background")), aGraphic));
 				mpDoc->MigrateItemSet( &aMigrateSet, pTempSet.get(), NULL );
 
 				pTempSet->Put( XFillBmpStretchItem( sal_True ));

Modified: incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/ui/view/sdview4.cxx Thu May 10 10:29:55 2012
@@ -166,10 +166,9 @@ SdrGrafObj* View::InsertGraphic( const G
 				EndUndo();
 			}
 
-			XOBitmap aXOBitmap( rGraphic.GetBitmap() );
 			SfxItemSet aSet(mpDocSh->GetPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
 			aSet.Put(XFillStyleItem(XFILL_BITMAP));
-			aSet.Put(XFillBitmapItem(&mpDocSh->GetPool(), aXOBitmap));
+			aSet.Put(XFillBitmapItem(&mpDocSh->GetPool(), rGraphic));
 			pPickObj->SetMergedItemSetAndBroadcast(aSet);
 		}
 	}

Modified: incubator/ooo/trunk/main/svx/Package_inc.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/Package_inc.mk?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/Package_inc.mk (original)
+++ incubator/ooo/trunk/main/svx/Package_inc.mk Thu May 10 10:29:55 2012
@@ -480,7 +480,6 @@ $(eval $(call gb_Package_add_file,svx_in
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sdtaditm.hxx,svx/sdtaditm.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdotext.hxx,svx/svdotext.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/chrtitem.hxx,svx/chrtitem.hxx))
-$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xbitmap.hxx,svx/xbitmap.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/sxallitm.hxx,svx/sxallitm.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/dlgutil.hxx,svx/dlgutil.hxx))
 $(eval $(call gb_Package_add_file,svx_inc,inc/svx/unopage.hxx,svx/unopage.hxx))

Modified: incubator/ooo/trunk/main/svx/inc/svx/dlgctrl.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/dlgctrl.hxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/dlgctrl.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/dlgctrl.hxx Thu May 10 10:29:55 2012
@@ -193,7 +193,7 @@ public:
 			SvxBitmapCtl( Window* pParent, const Size& rSize );
 			~SvxBitmapCtl();
 
-	XOBitmap	GetXBitmap();
+	BitmapEx GetBitmapEx();
 
 	void	SetBmpArray( const sal_uInt16* pPixel ) { pBmpArray = pPixel; }
 	void	SetLines( sal_uInt16 nLns ) { nLines = nLns; }
@@ -230,7 +230,7 @@ public:
 	virtual void Paint( const Rectangle& rRect );
 	virtual void MouseButtonDown( const MouseEvent& rMEvt );
 
-	void	SetXBitmap( const XOBitmap& rXOBitmap );
+	void	SetXBitmap( const BitmapEx& rBitmapEx );
 
 	void	SetPixelColor( const Color& rCol ) { aPixelColor = rCol; }
 	void	SetBackgroundColor( const Color& rCol ) { aBackgroundColor = rCol; }
@@ -322,22 +322,21 @@ private:
 class SVX_DLLPUBLIC BitmapLB : public ListBox
 {
 public:
-		 BitmapLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True );
+    BitmapLB(Window* pParent, ResId Id, bool bUserDraw = true);
 
-	virtual void Fill( const XBitmapList* pList );
-	virtual void UserDraw( const UserDrawEvent& rUDEvt );
+	virtual void Fill(const XBitmapList* pList);
+	virtual void UserDraw(const UserDrawEvent& rUDEvt);
 
-	void	Append( XBitmapEntry* pEntry, Bitmap* pBmp = NULL );
-	void	Modify( XBitmapEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp = NULL );
-	void	SelectEntryByList( const XBitmapList* pList, const String& rStr,
-						const Bitmap& rBmp);
+	void Append(XBitmapEntry* pEntry, BitmapEx* pBmpEx = 0);
+	void Modify(XBitmapEntry* pEntry, sal_uInt16 nPos, BitmapEx* pBmpEx = 0);
+	void SelectEntryByList(const XBitmapList* pList, const String& rStr);
 
 private:
-	VirtualDevice	aVD;
-	Bitmap			aBitmap;
+	VirtualDevice	maVD;
+	BitmapEx        maBitmapEx;
 
 	XBitmapList*	mpList;
-	sal_Bool			mbUserDraw;
+	bool            mbUserDraw;
 
 	SVX_DLLPRIVATE void SetVirtualDevice();
 };
@@ -350,22 +349,21 @@ private:
 class FillAttrLB : public ColorListBox
 {
 private:
-	VirtualDevice	aVD;
-	Bitmap			aBitmap;
+	VirtualDevice	maVD;
+	BitmapEx		maBitmapEx;
 
 	void SetVirtualDevice();
 
 public:
-		 FillAttrLB( Window* pParent, ResId Id );
-		 FillAttrLB( Window* pParent, WinBits aWB );
+    FillAttrLB( Window* pParent, ResId Id );
+    FillAttrLB( Window* pParent, WinBits aWB );
 
 	virtual void Fill( const XColorTable* pTab );
 	virtual void Fill( const XHatchList* pList );
 	virtual void Fill( const XGradientList* pList );
 	virtual void Fill( const XBitmapList* pList );
 
-	void	SelectEntryByList( const XBitmapList* pList, const String& rStr,
-						const Bitmap& rBmp);
+	void SelectEntryByList(const XBitmapList* pList, const String& rStr);
 };
 
 /*************************************************************************

Modified: incubator/ooo/trunk/main/svx/inc/svx/xbtmpit.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/xbtmpit.hxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/xbtmpit.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/xbtmpit.hxx Thu May 10 10:29:55 2012
@@ -19,31 +19,36 @@
  * 
  *************************************************************/
 
-
-
 #ifndef _SVX_XBTMPIT_HXX
 #define _SVX_XBTMPIT_HXX
 
-#include "svx/svxdllapi.h"
-
-#include <svx/xbitmap.hxx>
+#include <svx/svxdllapi.h>
 #include <svx/xit.hxx>
+#include <svtools/grfmgr.hxx>
 
 class SdrModel;
+class BitmapColor;
 
-//----------------------
+//////////////////////////////////////////////////////////////////////////////
+// helper to construct historical 8x8 bitmaps with two colors
+
+Bitmap SVX_DLLPUBLIC createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, Color aColorBack);
+bool SVX_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront);
+
+//////////////////////////////////////////////////////////////////////////////
 // class XFillBitmapItem
-//----------------------
+
 class SVX_DLLPUBLIC XFillBitmapItem : public NameOrIndex
 {
-	XOBitmap aXOBitmap;
+private:
+	GraphicObject   maGraphicObject;
 
 public:
 			TYPEINFO();
 			XFillBitmapItem() : NameOrIndex(XATTR_FILLBITMAP, -1 ) {}
-			XFillBitmapItem( long nIndex, const XOBitmap& rTheBitmap );
-			XFillBitmapItem( const String& rName, const XOBitmap& rTheBitmap );
-			XFillBitmapItem( SfxItemPool* pPool, const XOBitmap& rTheBitmap );
+			XFillBitmapItem(long nIndex, const GraphicObject& rGraphicObject);
+			XFillBitmapItem(const String& rName, const GraphicObject& rGraphicObject);
+			XFillBitmapItem(SfxItemPool* pPool, const GraphicObject& rGraphicObject);
 			XFillBitmapItem( SfxItemPool* pPool );
 			XFillBitmapItem( const XFillBitmapItem& rItem );
 			XFillBitmapItem( SvStream& rIn, sal_uInt16 nVer = 0 );
@@ -62,8 +67,8 @@ public:
 									SfxMapUnit ePresMetric,
                                     String &rText, const IntlWrapper * = 0 ) const;
 
-	const XOBitmap& GetBitmapValue( const XBitmapTable* pTable = 0 ) const; // GetValue -> GetBitmapValue
-	void  SetBitmapValue( const XOBitmap& rNew )  { aXOBitmap = rNew; Detach(); } // SetValue -> SetBitmapValue
+    const GraphicObject& GetGraphicObject() const;
+    void SetGraphicObject(const GraphicObject& rGraphicObject);
 
 	static sal_Bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
 	XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const;

Modified: incubator/ooo/trunk/main/svx/inc/svx/xenum.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/xenum.hxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/xenum.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/xenum.hxx Thu May 10 10:29:55 2012
@@ -49,9 +49,6 @@ enum XFormTextStdForm	{ XFTFORM_NONE = 0
 						  XFTFORM_BOTARC, XFTFORM_LFTARC, XFTFORM_RGTARC,
 						  XFTFORM_BUTTON1, XFTFORM_BUTTON2,
 						  XFTFORM_BUTTON3, XFTFORM_BUTTON4};
-enum XBitmapStyle		{ XBITMAP_TILE, XBITMAP_STRETCH };
-enum XBitmapType 		{ XBITMAP_IMPORT, XBITMAP_8X8, XBITMAP_NONE,
-						  XBITMAP_16X16 };
 
 
 #endif		// _XENUM_HXX

Modified: incubator/ooo/trunk/main/svx/inc/svx/xfillit.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/xfillit.hxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/xfillit.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/xfillit.hxx Thu May 10 10:29:55 2012
@@ -37,7 +37,6 @@
 #include <svx/xsflclit.hxx>
 #include <svx/xflgrit.hxx>
 #include <svx/xflhtit.hxx>
-#include <svx/xbitmap.hxx>
 #include <svx/xbtmpit.hxx>
 #include <svx/xflftrit.hxx>
 

Modified: incubator/ooo/trunk/main/svx/inc/svx/xtable.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/inc/svx/xtable.hxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/inc/svx/xtable.hxx (original)
+++ incubator/ooo/trunk/main/svx/inc/svx/xtable.hxx Thu May 10 10:29:55 2012
@@ -19,7 +19,6 @@
  * 
  *************************************************************/
 
-
 #ifndef _XTABLE_HXX
 #define _XTABLE_HXX
 
@@ -29,20 +28,14 @@
 #include <svx/xdash.hxx>
 #include <svx/xhatch.hxx>
 #include <svx/xgrad.hxx>
-#include <svx/xbitmap.hxx>
 #include <svx/xflasit.hxx>
 #include <svx/xlnasit.hxx>
-
-#ifndef _SV_COLOR_HXX
 #include <tools/color.hxx>
-#endif
 #include <tools/string.hxx>
-
-#ifndef _TABLE_HXX //autogen
 #include <tools/table.hxx>
-#endif
 #include "svx/svxdllapi.h"
 #include <basegfx/polygon/b2dpolypolygon.hxx>
+#include <svtools/grfmgr.hxx>
 
 class Color;
 class Bitmap;
@@ -186,16 +179,31 @@ public:
 
 class XBitmapEntry : public XPropertyEntry
 {
-	XOBitmap aXOBitmap;
+private:
+	GraphicObject   maGraphicObject;
 
 public:
-			XBitmapEntry( const XOBitmap& rXOBitmap, const String& rName ):
-				XPropertyEntry( rName ), aXOBitmap( rXOBitmap ) {}
-			XBitmapEntry( const XBitmapEntry& rOther ) :
-				XPropertyEntry( rOther ), aXOBitmap( rOther.aXOBitmap ) {}
-
-	void     SetXBitmap(const XOBitmap& rXOBitmap) { aXOBitmap = rXOBitmap; }
-	XOBitmap& GetXBitmap()                    { return aXOBitmap; }
+	XBitmapEntry(const GraphicObject& rGraphicObject, const String& rName)
+    :   XPropertyEntry(rName), 
+        maGraphicObject(rGraphicObject) 
+    {
+    }
+
+    XBitmapEntry(const XBitmapEntry& rOther) 
+    :   XPropertyEntry(rOther), 
+        maGraphicObject(rOther.maGraphicObject) 
+    {
+    }
+
+    const GraphicObject& GetGraphicObject() const
+    {
+        return maGraphicObject;
+    }
+
+    void SetGraphicObject(const GraphicObject& rGraphicObject)
+    {
+        maGraphicObject = rGraphicObject;
+    }
 };
 
 // ---------------------

Modified: incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape2d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape2d.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape2d.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape2d.cxx Thu May 10 10:29:55 2012
@@ -51,7 +51,6 @@
 #include <svx/xflhtit.hxx>
 #include <svx/xbtmpit.hxx>
 #include <svx/xgrad.hxx>
-#include <svx/xbitmap.hxx>
 #include <svx/xhatch.hxx>
 #include <com/sun/star/awt/Size.hpp>
 #include <com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp>
@@ -1960,15 +1959,17 @@ void EnhancedCustomShape2d::AdaptObjColo
             }
             case XFILL_BITMAP:
             {
-                Bitmap aBitmap(((const XFillBitmapItem&)rObj.GetMergedItem(XATTR_FILLBITMAP)).GetBitmapValue().GetBitmap());
                 if ( nColorCount )
                 {
+                    Bitmap aBitmap(((const XFillBitmapItem&)rObj.GetMergedItem(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap());
+                    
                     aBitmap.Adjust(
                         static_cast< short > ( GetLuminanceChange(
                             std::min(nColorIndex, nColorCount-1))));
+
+                    rObj.SetMergedItem(XFillBitmapItem(String(), Graphic(aBitmap)));
                 }
 
-                rObj.SetMergedItem( XFillBitmapItem( String(), aBitmap ) );
                 break;
             }
         }

Modified: incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape3d.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape3d.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape3d.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/customshapes/EnhancedCustomShape3d.cxx Thu May 10 10:29:55 2012
@@ -426,13 +426,12 @@ SdrObject* EnhancedCustomShape3d::Create
 					aPlaceholderObjectList.push_back( p3DObj );
 				else if ( bUseTwoFillStyles )
 				{			
-					Bitmap aFillBmp;
+					BitmapEx aFillBmp;
 					sal_Bool bFillBmpTile = ((XFillBmpTileItem&)p3DObj->GetMergedItem( XATTR_FILLBMP_TILE )).GetValue();
 					if ( bFillBmpTile )
 					{
-						const XFillBitmapItem& rBmpItm = (XFillBitmapItem&)p3DObj->GetMergedItem( XATTR_FILLBITMAP );
-						const XOBitmap& rXOBmp = rBmpItm.GetBitmapValue();
-						aFillBmp = rXOBmp.GetBitmap();
+						const XFillBitmapItem& rBmpItm = (XFillBitmapItem&)p3DObj->GetMergedItem(XATTR_FILLBITMAP);
+						aFillBmp = rBmpItm.GetGraphicObject().GetGraphic().GetBitmapEx();
 						Size aLogicalSize = aFillBmp.GetPrefSize();
 						if ( aFillBmp.GetPrefMapMode() == MAP_PIXEL )
 							aLogicalSize = Application::GetDefaultDevice()->PixelToLogic( aLogicalSize, MAP_100TH_MM ); 
@@ -442,15 +441,14 @@ SdrObject* EnhancedCustomShape3d::Create
 						aLogicalSize.Height() *= 5;
 						aFillBmp.SetPrefSize( aLogicalSize );
 						aFillBmp.SetPrefMapMode( MAP_100TH_MM );
-						p3DObj->SetMergedItem( XFillBitmapItem( String(), aFillBmp ) );
+						p3DObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aFillBmp)));
 					}
 					else
 					{
 						if ( aSnapRect != aBoundRect )
 						{
-							const XFillBitmapItem& rBmpItm = (XFillBitmapItem&)p3DObj->GetMergedItem( XATTR_FILLBITMAP );
-							const XOBitmap& rXOBmp = rBmpItm.GetBitmapValue();
-							aFillBmp = rXOBmp.GetBitmap();
+							const XFillBitmapItem& rBmpItm = (XFillBitmapItem&)p3DObj->GetMergedItem(XATTR_FILLBITMAP);
+							aFillBmp = rBmpItm.GetGraphicObject().GetGraphic().GetBitmapEx();
 							Size aBmpSize( aFillBmp.GetSizePixel() );
 							double fXScale = (double)aBoundRect.GetWidth() / (double)aSnapRect.GetWidth();
 							double fYScale = (double)aBoundRect.GetHeight() / (double)aSnapRect.GetHeight();
@@ -461,7 +459,7 @@ SdrObject* EnhancedCustomShape3d::Create
 													(sal_Int32)( aBmpSize.Height() * fYScale ) );
 							Rectangle aCropRect( aPt, aSize );
  							aFillBmp.Crop( aCropRect );
-							p3DObj->SetMergedItem( XFillBitmapItem( String(), aFillBmp ) );
+							p3DObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aFillBmp)));
 						}
 					}
 					pScene->Insert3DObj( p3DObj );
@@ -483,7 +481,9 @@ SdrObject* EnhancedCustomShape3d::Create
 					p3DObj->NbcSetTransform( aFrontTransform );
 
 					if ( ( eFillStyle == XFILL_BITMAP ) && !aFillBmp.IsEmpty() )
-						p3DObj->SetMergedItem( XFillBitmapItem( String(), aFillBmp ) );
+                    {
+						p3DObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aFillBmp)));
+                    }
 				}
 				else if ( eFillStyle == XFILL_NONE )
 				{

Modified: incubator/ooo/trunk/main/svx/source/dialog/dlgctrl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/dialog/dlgctrl.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/dialog/dlgctrl.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/dialog/dlgctrl.cxx Thu May 10 10:29:55 2012
@@ -26,15 +26,11 @@
 
 // include ---------------------------------------------------------------
 #include <tools/shl.hxx>
-#ifndef _APP_HXX //autogen
 #include <vcl/svapp.hxx>
-#endif
-
 #include <svx/xtable.hxx>
 #include <svx/xpool.hxx>
-
 #include <svx/dialogs.hrc>
-#include "accessibility.hrc"
+#include <accessibility.hrc>
 #include <svx/dlgctrl.hxx>
 #include <svx/dialmgr.hxx>
 #include <tools/poly.hxx>
@@ -42,18 +38,18 @@
 #include <vcl/gradient.hxx>
 #include <vcl/hatch.hxx>
 #include <svtools/colorcfg.hxx>
-
-#include "svxrectctaccessiblecontext.hxx"
+#include <svxrectctaccessiblecontext.hxx>
 #include <com/sun/star/lang/XUnoTunnel.hpp>
 #include <basegfx/point/b2dpoint.hxx>
 #include <basegfx/polygon/b2dpolygon.hxx>
 #include <svx/svdorect.hxx>
-
 #include <svx/svdmodel.hxx>
 #include <svx/svdopath.hxx>
 #include <svx/sdr/contact/objectcontactofobjlistpainter.hxx>
 #include <svx/sdr/contact/displayinfo.hxx>
-#include "linectrl.hrc"
+#include <linectrl.hrc>
+#include <vcl/bmpacc.hxx>
+#include <svx/xbtmpit.hxx>
 
 #define OUTPUT_DRAWMODE_COLOR		(DRAWMODE_DEFAULT)
 #define OUTPUT_DRAWMODE_CONTRAST	(DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT)
@@ -1003,18 +999,35 @@ void SvxPixelCtl::Paint( const Rectangle
 |*
 \************************************************************************/
 
-void SvxPixelCtl::SetXBitmap( const XOBitmap& rXBmp )
+void SvxPixelCtl::SetXBitmap( const BitmapEx& rBitmapEx )
 {
-	if( rXBmp.GetBitmapType() == XBITMAP_8X8 )
-	{
-		aPixelColor = rXBmp.GetPixelColor();
-		aBackgroundColor = rXBmp.GetBackgroundColor();
+    BitmapColor aBack;
+    BitmapColor aFront;
 
-		sal_uInt16* pArray = rXBmp.GetPixelArray();
+    if(isHistorical8x8(rBitmapEx, aBack, aFront))
+    {
+        Bitmap aBitmap(rBitmapEx.GetBitmap());
+        BitmapReadAccess* pRead = aBitmap.AcquireReadAccess();
 
-		for( sal_uInt16 i = 0; i < nSquares; i++ )
-			*( pPixel + i ) = *( pArray + i );
-	}
+        aBackgroundColor = aBack;
+        aPixelColor = aFront;
+
+        for(sal_uInt16 i(0); i < nSquares; i++)
+        {
+            const BitmapColor aColor(pRead->GetColor(i/8, i%8));
+
+            if(aColor == aBack)
+            {
+                *( pPixel + i ) = 0;
+            }
+            else
+            {
+                *( pPixel + i ) = 1;
+            }
+        }
+
+        aBitmap.ReleaseAccess(pRead);
+    }
 }
 
 /*************************************************************************
@@ -1069,11 +1082,11 @@ SvxBitmapCtl::~SvxBitmapCtl()
 |*
 \************************************************************************/
 
-XOBitmap SvxBitmapCtl::GetXBitmap()
+BitmapEx SvxBitmapCtl::GetBitmapEx()
 {
-	XOBitmap aXOBitmap( pBmpArray, aPixelColor, aBackgroundColor );
+    const Bitmap aRetval(createHistorical8x8FromArray(pBmpArray, aPixelColor, aBackgroundColor));
 
-	return( aXOBitmap );
+	return BitmapEx(aRetval);
 }
 
 /*************************************************************************
@@ -1468,169 +1481,169 @@ void FillAttrLB::Fill( const XGradientLi
 |*
 \************************************************************************/
 
-BitmapLB::BitmapLB( Window* pParent, ResId Id, sal_Bool bUserDraw /*= sal_True*/ )
-: ListBox( pParent, Id ),
-  mpList( NULL ),
-  mbUserDraw( bUserDraw )
+BitmapLB::BitmapLB(Window* pParent, ResId Id, bool bUserDraw /*= false*/ )
+:   ListBox(pParent, Id),
+    maVD(),
+    maBitmapEx(),
+    mpList(NULL),
+    mbUserDraw(bUserDraw)
 {
-	aVD.SetOutputSizePixel( Size( 32, 16 ) );
-	EnableUserDraw( mbUserDraw );
+	maVD.SetOutputSizePixel(Size(32, 16));
+	EnableUserDraw(mbUserDraw);
 }
 
 /************************************************************************/
 
 void BitmapLB::SetVirtualDevice()
 {
-	if( aBitmap.GetSizePixel().Width() > 8 ||
-		aBitmap.GetSizePixel().Height() > 8 )
+	if(maBitmapEx.GetSizePixel().Width() > 8 || maBitmapEx.GetSizePixel().Height() > 8)
 	{
-		aVD.DrawBitmap( Point( 0, 0 ), Size( 32, 16 ), aBitmap );
+		maVD.DrawBitmapEx(Point(0, 0), Size(32, 16), maBitmapEx);
 	}
 	else
 	{
-		aVD.DrawBitmap( Point( 0, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 8, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 16, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 24, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 0, 8 ), aBitmap );
-		aVD.DrawBitmap( Point( 8, 8 ), aBitmap );
-		aVD.DrawBitmap( Point( 16, 8 ), aBitmap );
-		aVD.DrawBitmap( Point( 24, 8 ), aBitmap );
+		maVD.DrawBitmapEx(Point(0,  0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(8,  0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(16, 0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(24, 0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(0,  8), maBitmapEx);
+		maVD.DrawBitmapEx(Point(8,  8), maBitmapEx);
+		maVD.DrawBitmapEx(Point(16, 8), maBitmapEx);
+		maVD.DrawBitmapEx(Point(24, 8), maBitmapEx);
 	}
 }
 
 /************************************************************************/
 
-void BitmapLB::Fill( const XBitmapList* pList )
+void BitmapLB::Fill(const XBitmapList* pList)
 {
 	mpList = (XBitmapList*)pList;
 	XBitmapEntry* pEntry;
-	long nCount = pList->Count();
+	const long nCount(pList->Count());
 
-	SetUpdateMode( sal_False );
+	SetUpdateMode(false);
 
-	if( mbUserDraw )
+	if(mbUserDraw)
 	{
-		for( long i = 0; i < nCount; i++ )
-            InsertEntry( pList->GetBitmap( i )->GetName() );
+		for(long i(0); i < nCount; i++)
+        {
+            InsertEntry(pList->GetBitmap(i)->GetName());
+        }
 	}
 	else
 	{
-		for( long i = 0; i < nCount; i++ )
+		for(long i(0); i < nCount; i++)
 		{
-            pEntry = pList->GetBitmap( i );
-			aBitmap = pEntry->GetXBitmap().GetBitmap();
-
+            pEntry = pList->GetBitmap(i);
+			maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
 			SetVirtualDevice();
-
-			InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
+			InsertEntry(pEntry->GetName(), maVD.GetBitmap(Point(0, 2), Size(32, 12)));
 		}
 	}
 
-	SetUpdateMode( sal_True );
+	SetUpdateMode(true);
 }
 
-void BitmapLB::UserDraw( const UserDrawEvent& rUDEvt )
+void BitmapLB::UserDraw(const UserDrawEvent& rUDEvt)
 {
-	if( mpList != NULL )
+	if(mpList)
 	{
 		// Draw bitmap
 		const Rectangle& rDrawRect = rUDEvt.GetRect();
-		Rectangle aRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nLeft+33, rDrawRect.nBottom-1 );
-
-        sal_Int32 nId = rUDEvt.GetItemId();
-		if( nId >= 0 && nId <= mpList->Count() )
+		const Rectangle aRect(rDrawRect.nLeft + 1, rDrawRect.nTop + 1, rDrawRect.nLeft + 33, rDrawRect.nBottom - 1);
+        const sal_Int32 nId(rUDEvt.GetItemId());
+		
+        if(nId >= 0 && nId <= mpList->Count())
 		{
-			Rectangle aClipRect( rDrawRect.nLeft+1, rDrawRect.nTop+1, rDrawRect.nRight-1, rDrawRect.nBottom-1 );
-
+			const Rectangle aClipRect(rDrawRect.nLeft + 1, rDrawRect.nTop + 1, rDrawRect.nRight - 1, rDrawRect.nBottom - 1);
 			OutputDevice* pDevice = rUDEvt.GetDevice();
-			pDevice->SetClipRegion( Region( aClipRect ) );
-
-            aBitmap = mpList->GetBitmap( nId )->GetXBitmap().GetBitmap();
-
+			pDevice->SetClipRegion(Region(aClipRect));
+            maBitmapEx = mpList->GetBitmap(nId)->GetGraphicObject().GetGraphic().GetBitmapEx();
 			long nPosBaseX = aRect.nLeft;
 			long nPosBaseY = aRect.nTop;
 
-			if( aBitmap.GetSizePixel().Width() > 8 ||
-				aBitmap.GetSizePixel().Height() > 8 )
+			if(maBitmapEx.GetSizePixel().Width() > 8 || maBitmapEx.GetSizePixel().Height() > 8)
 			{
-				pDevice->DrawBitmap( Point( nPosBaseX, nPosBaseY ), Size( 32, 16 ), aBitmap );
+				pDevice->DrawBitmapEx(Point(nPosBaseX, nPosBaseY), Size(32, 16), maBitmapEx);
 			}
 			else
 			{
-				pDevice->DrawBitmap( Point( nPosBaseX+ 0, nPosBaseY+0 ), aBitmap );
-				pDevice->DrawBitmap( Point( nPosBaseX+ 8, nPosBaseY+0 ), aBitmap );
-				pDevice->DrawBitmap( Point( nPosBaseX+16, nPosBaseY+0 ), aBitmap );
-				pDevice->DrawBitmap( Point( nPosBaseX+24, nPosBaseY+0 ), aBitmap );
-				pDevice->DrawBitmap( Point( nPosBaseX+ 0, nPosBaseY+8 ), aBitmap );
-				pDevice->DrawBitmap( Point( nPosBaseX+ 8, nPosBaseY+8 ), aBitmap );
-				pDevice->DrawBitmap( Point( nPosBaseX+16, nPosBaseY+8 ), aBitmap );
-				pDevice->DrawBitmap( Point( nPosBaseX+24, nPosBaseY+8 ), aBitmap );
+				pDevice->DrawBitmapEx(Point(nPosBaseX+ 0, nPosBaseY+0 ), maBitmapEx);
+				pDevice->DrawBitmapEx(Point(nPosBaseX+ 8, nPosBaseY+0 ), maBitmapEx);
+				pDevice->DrawBitmapEx(Point(nPosBaseX+16, nPosBaseY+0 ), maBitmapEx);
+				pDevice->DrawBitmapEx(Point(nPosBaseX+24, nPosBaseY+0 ), maBitmapEx);
+				pDevice->DrawBitmapEx(Point(nPosBaseX+ 0, nPosBaseY+8 ), maBitmapEx);
+				pDevice->DrawBitmapEx(Point(nPosBaseX+ 8, nPosBaseY+8 ), maBitmapEx);
+				pDevice->DrawBitmapEx(Point(nPosBaseX+16, nPosBaseY+8 ), maBitmapEx);
+				pDevice->DrawBitmapEx(Point(nPosBaseX+24, nPosBaseY+8 ), maBitmapEx);
 			}
 
 			pDevice->SetClipRegion();
 
 			// Draw name
-            pDevice->DrawText( Point( aRect.nRight+7, aRect.nTop-1 ), mpList->GetBitmap( nId )->GetName() );
+            pDevice->DrawText(Point(aRect.nRight + 7, aRect.nTop - 1), mpList->GetBitmap(nId)->GetName());
 		}
 	}
 }
 
 /************************************************************************/
 
-void BitmapLB::Append( XBitmapEntry* pEntry, Bitmap* pBmp )
+void BitmapLB::Append(XBitmapEntry* pEntry, BitmapEx* pBmpEx)
 {
-	if( pBmp )
+	if(pBmpEx)
 	{
-		aBitmap = pEntry->GetXBitmap().GetBitmap();
+		maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
 		SetVirtualDevice();
-		InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
+		InsertEntry(pEntry->GetName(), maVD.GetBitmap(Point(0, 2), Size(32, 12)));
 	}
 	else
-		InsertEntry( pEntry->GetName() );
+    {
+		InsertEntry(pEntry->GetName());
+    }
 }
 
 /************************************************************************/
 
-void BitmapLB::Modify( XBitmapEntry* pEntry, sal_uInt16 nPos, Bitmap* pBmp )
+void BitmapLB::Modify(XBitmapEntry* pEntry, sal_uInt16 nPos, BitmapEx* pBmpEx)
 {
-	RemoveEntry( nPos );
+	RemoveEntry(nPos);
 
-	if( pBmp )
+	if(pBmpEx)
 	{
-		aBitmap = pEntry->GetXBitmap().GetBitmap();
+		maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
 		SetVirtualDevice();
-
-		InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ), nPos );
+		InsertEntry(pEntry->GetName(), maVD.GetBitmap(Point(0, 2), Size(32, 12)), nPos);
 	}
 	else
-		InsertEntry( pEntry->GetName() );
+    {
+		InsertEntry(pEntry->GetName());
+    }
 }
 
 /************************************************************************/
 
-void BitmapLB::SelectEntryByList( const XBitmapList* pList, const String& rStr,
-                            const Bitmap& )
+void BitmapLB::SelectEntryByList(const XBitmapList* pList, const String& rStr)
 {
-	long nCount = pList->Count();
+	const long nCount(pList->Count());
 	XBitmapEntry* pEntry;
-	sal_Bool bFound = sal_False;
+	bool bFound(false);
+    long i(0);
 
-	long i;
-	for( i = 0; i < nCount && !bFound; i++ )
+	for(i = 0; i < nCount && !bFound; i++)
 	{
-        pEntry = pList->GetBitmap( i );
-
-		String aStr = pEntry->GetName();
-		// Bitmap aBmp = pEntry->GetBitmap();
+        pEntry = pList->GetBitmap(i);
+		const String aStr(pEntry->GetName());
 
-		if( rStr == aStr )
+		if(rStr == aStr)
 		{
-			bFound = sal_True;
+			bFound = true;
 		}
 	}
-	if( bFound )
-		SelectEntryPos( (sal_uInt16) ( i - 1 ) );
+
+    if(bFound)
+    {
+		SelectEntryPos((sal_uInt16)(i - 1));
+    }
 }
 
 /*************************************************************************
@@ -1639,89 +1652,89 @@ void BitmapLB::SelectEntryByList( const 
 |*
 \************************************************************************/
 
-FillAttrLB::FillAttrLB( Window* pParent, ResId Id ) :
-					ColorListBox( pParent, Id )
+FillAttrLB::FillAttrLB( Window* pParent, ResId Id ) 
+:   ColorListBox(pParent, Id),
+    maVD(),
+    maBitmapEx()
 {
-	aVD.SetOutputSizePixel( Size( 32, 16 ) );
+	maVD.SetOutputSizePixel(Size(32, 16));
 }
 
 /************************************************************************/
 
-FillAttrLB::FillAttrLB( Window* pParent, WinBits aWB ) :
-					ColorListBox( pParent, aWB )
+FillAttrLB::FillAttrLB(Window* pParent, WinBits aWB) 
+:   ColorListBox(pParent, aWB)
 {
-	aVD.SetOutputSizePixel( Size( 32, 16 ) );
+	maVD.SetOutputSizePixel(Size(32, 16));
 }
 
 /************************************************************************/
 
 void FillAttrLB::SetVirtualDevice()
 {
-	if( aBitmap.GetSizePixel().Width() > 8 ||
-		aBitmap.GetSizePixel().Height() > 8 )
+    maVD.Erase();
+
+    if(maBitmapEx.GetSizePixel().Width() > 8 || maBitmapEx.GetSizePixel().Height() > 8)
 	{
-		aVD.DrawBitmap( Point( 0, 0 ), Size( 32, 16 ), aBitmap );
+		maVD.DrawBitmapEx(Point(0, 0), Size(32, 16), maBitmapEx);
 	}
 	else
 	{
-		aVD.DrawBitmap( Point( 0, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 8, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 16, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 24, 0 ), aBitmap );
-		aVD.DrawBitmap( Point( 0, 8 ), aBitmap );
-		aVD.DrawBitmap( Point( 8, 8 ), aBitmap );
-		aVD.DrawBitmap( Point( 16, 8 ), aBitmap );
-		aVD.DrawBitmap( Point( 24, 8 ), aBitmap );
+		maVD.DrawBitmapEx(Point(0,  0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(8,  0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(16, 0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(24, 0), maBitmapEx);
+		maVD.DrawBitmapEx(Point(0,  8), maBitmapEx);
+		maVD.DrawBitmapEx(Point(8,  8), maBitmapEx);
+		maVD.DrawBitmapEx(Point(16, 8), maBitmapEx);
+		maVD.DrawBitmapEx(Point(24, 8), maBitmapEx);
 	}
 }
 
 /************************************************************************/
 
-void FillAttrLB::Fill( const XBitmapList* pList )
+void FillAttrLB::Fill(const XBitmapList* pList)
 {
-	long nCount = pList->Count();
+	const long nCount(pList->Count());
 	XBitmapEntry* pEntry;
-	ListBox::SetUpdateMode( sal_False );
+	
+    ListBox::SetUpdateMode(false);
 
-	for( long i = 0; i < nCount; i++ )
+	for(long i(0); i < nCount; i++)
 	{
         pEntry = pList->GetBitmap( i );
-		aBitmap = pEntry->GetXBitmap().GetBitmap();
-
+		maBitmapEx = pEntry->GetGraphicObject().GetGraphic().GetBitmapEx();
 		SetVirtualDevice();
-
-		ListBox::InsertEntry( pEntry->GetName(), aVD.GetBitmap( Point( 0, 2 ), Size( 32, 12 ) ) );
+		ListBox::InsertEntry(pEntry->GetName(), maVD.GetBitmap(Point(0, 2), Size(32, 12)));
 	}
-	ListBox::SetUpdateMode( sal_True );
+
+    ListBox::SetUpdateMode(true);
 }
 
 /************************************************************************/
 
-void FillAttrLB::SelectEntryByList( const XBitmapList* pList, const String& rStr,
-                            const Bitmap& /*rBmp*/)
+void FillAttrLB::SelectEntryByList( const XBitmapList* pList, const String& rStr)
 {
-	long nCount = pList->Count();
+	const long nCount(pList->Count());
 	XBitmapEntry* pEntry;
-	sal_Bool bFound = sal_False;
+	bool bFound(false);
+	long i(0);
 
-	long i;
-	for( i = 0; i < nCount && !bFound; i++ )
+    for(i = 0; i < nCount && !bFound; i++)
 	{
-        pEntry = pList->GetBitmap( i );
-
-		String aStr = pEntry->GetName();
-		// Bitmap aBmp = pEntry->GetBitmap();
+        pEntry = pList->GetBitmap(i);
+		const String aStr(pEntry->GetName());
 
-		if( rStr == aStr )
+		if(rStr == aStr)
 		{
-			bFound = sal_True;
+			bFound = true;
 		}
-		/*
-		if( rStr == aStr && rBmp == aBmp )
-			bFound = sal_True; */
 	}
-	if( bFound )
-		SelectEntryPos( (sal_uInt16) ( i - 1 ) );
+
+    if(bFound)
+    {
+		SelectEntryPos((sal_uInt16)(i - 1));
+    }
 }
 
 /*************************************************************************

Modified: incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/sdr/primitive2d/sdrattributecreator.cxx Thu May 10 10:29:55 2012
@@ -591,42 +591,42 @@ namespace drawinglayer
 
 		attribute::SdrFillBitmapAttribute createNewSdrFillBitmapAttribute(const SfxItemSet& rSet)
 		{
-			Bitmap aBitmap((((const XFillBitmapItem&)(rSet.Get(XATTR_FILLBITMAP))).GetBitmapValue()).GetBitmap());
+			BitmapEx aBitmapEx(((const XFillBitmapItem&)(rSet.Get(XATTR_FILLBITMAP))).GetGraphicObject().GetGraphic().GetBitmapEx());
 			
 			// make sure it's not empty, use default instead
-			if(aBitmap.IsEmpty())
+			if(aBitmapEx.IsEmpty())
 			{
                 // #i118485# Add PrefMapMode and PrefSize to avoid mini-tiling and
                 // expensive primitive processing in this case. Use 10x10 cm
-				aBitmap = Bitmap(Size(4,4), 8);
-                aBitmap.SetPrefMapMode(MapMode(MAP_100TH_MM));
-                aBitmap.SetPrefSize(Size(10000.0, 10000.0));
+				aBitmapEx = Bitmap(Size(4,4), 8);
+                aBitmapEx.SetPrefMapMode(MapMode(MAP_100TH_MM));
+                aBitmapEx.SetPrefSize(Size(10000.0, 10000.0));
 			}
 
 			// if there is no logical size, create a size from pixel size and set MapMode accordingly
-			if(0L == aBitmap.GetPrefSize().Width() || 0L == aBitmap.GetPrefSize().Height())
+			if(0L == aBitmapEx.GetPrefSize().Width() || 0L == aBitmapEx.GetPrefSize().Height())
 			{
-				aBitmap.SetPrefSize(aBitmap.GetSizePixel());
-				aBitmap.SetPrefMapMode(MAP_PIXEL);
+				aBitmapEx.SetPrefSize(aBitmapEx.GetSizePixel());
+				aBitmapEx.SetPrefMapMode(MAP_PIXEL);
 			}
 			
 			// convert size and MapMode to destination logical size and MapMode. The created
 			// bitmap must have a valid logical size (PrefSize)
 			const MapUnit aDestinationMapUnit((MapUnit)rSet.GetPool()->GetMetric(0));
 
-			if(aBitmap.GetPrefMapMode() != aDestinationMapUnit)
+			if(aBitmapEx.GetPrefMapMode() != aDestinationMapUnit)
 			{
 				// #i100360# for MAP_PIXEL, LogicToLogic will not work properly,
                 // so fallback to Application::GetDefaultDevice()
-    			if(MAP_PIXEL == aBitmap.GetPrefMapMode().GetMapUnit())
+    			if(MAP_PIXEL == aBitmapEx.GetPrefMapMode().GetMapUnit())
                 {
-    				aBitmap.SetPrefSize(Application::GetDefaultDevice()->PixelToLogic(
-	    				aBitmap.GetPrefSize(), aDestinationMapUnit));
+    				aBitmapEx.SetPrefSize(Application::GetDefaultDevice()->PixelToLogic(
+	    				aBitmapEx.GetPrefSize(), aDestinationMapUnit));
                 }
                 else
                 {
-                    aBitmap.SetPrefSize(OutputDevice::LogicToLogic(
-	    				aBitmap.GetPrefSize(), aBitmap.GetPrefMapMode(), aDestinationMapUnit));
+                    aBitmapEx.SetPrefSize(OutputDevice::LogicToLogic(
+	    				aBitmapEx.GetPrefSize(), aBitmapEx.GetPrefMapMode(), aDestinationMapUnit));
                 }
 			}
 
@@ -642,7 +642,7 @@ namespace drawinglayer
 				(double)((const SfxUInt16Item&) (rSet.Get(XATTR_FILLBMP_POSOFFSETY))).GetValue());
 
 			return attribute::SdrFillBitmapAttribute(
-				aBitmap,
+				aBitmapEx,
 				aSize,
 				aOffset,
 				aOffsetPosition,

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdetc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdetc.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdetc.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdetc.cxx Thu May 10 10:29:55 2012
@@ -538,11 +538,10 @@ FASTBOOL GetDraftFillColor(const SfxItem
 		}
 		case XFILL_BITMAP:
 		{
-			const Bitmap& rBitmap = ((XFillBitmapItem&)rSet.Get(XATTR_FILLBITMAP)).GetBitmapValue().GetBitmap();
-			const Size aSize(rBitmap.GetSizePixel());
+			Bitmap aBitmap(((XFillBitmapItem&)rSet.Get(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic().GetBitmapEx().GetBitmap());
+			const Size aSize(aBitmap.GetSizePixel());
 			const sal_uInt32 nWidth = aSize.Width();
 			const sal_uInt32 nHeight = aSize.Height();
-			Bitmap aBitmap(rBitmap);
 			BitmapReadAccess* pAccess = aBitmap.AcquireReadAccess();
 
 			if(pAccess && nWidth > 0 && nHeight > 0)

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdfmtf.cxx Thu May 10 10:29:55 2012
@@ -449,7 +449,7 @@ void ImpSdrGDIMetaFileImport::InsertObj(
                         Size(ceil(aPixel.getWidth()), ceil(aPixel.getHeight())));
 
                     pObj->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
-                    pObj->SetMergedItem(XFillBitmapItem(String(), aClippedBitmap.GetBitmap()));
+                    pObj->SetMergedItem(XFillBitmapItem(String(), Graphic(aClippedBitmap)));
                 }
             }
         }

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdoashp.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdoashp.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdoashp.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdoashp.cxx Thu May 10 10:29:55 2012
@@ -292,15 +292,17 @@ SdrObject* ImpCreateShadowObjectClone(co
 		// bitmap and transparence like shadow
 		if(bBitmapFillUsed)
 		{
-			XOBitmap aFillBitmap(((XFillBitmapItem&)(rOriginalSet.Get(XATTR_FILLBITMAP))).GetBitmapValue());
-			Bitmap aSourceBitmap(aFillBitmap.GetBitmap());
-			BitmapReadAccess* pReadAccess = aSourceBitmap.AcquireReadAccess();
+            GraphicObject aGraphicObject(((XFillBitmapItem&)(rOriginalSet.Get(XATTR_FILLBITMAP))).GetGraphicObject());
+            const BitmapEx aBitmapEx(aGraphicObject.GetGraphic().GetBitmapEx());
+			Bitmap aBitmap(aBitmapEx.GetBitmap());
 
-			if(!aSourceBitmap.IsEmpty())
+			if(!aBitmap.IsEmpty())
 			{
-				if(pReadAccess)
+    			BitmapReadAccess* pReadAccess = aBitmap.AcquireReadAccess();
+
+                if(pReadAccess)
 				{
-					Bitmap aDestBitmap(aSourceBitmap.GetSizePixel(), 24L);
+					Bitmap aDestBitmap(aBitmap.GetSizePixel(), 24L);
 					BitmapWriteAccess* pWriteAccess = aDestBitmap.AcquireWriteAccess();
 
 					if(pWriteAccess)
@@ -319,14 +321,29 @@ SdrObject* ImpCreateShadowObjectClone(co
 						}
 
 						aDestBitmap.ReleaseAccess(pWriteAccess);
-						aFillBitmap.SetBitmap(aDestBitmap);
 					}
 
-					aSourceBitmap.ReleaseAccess(pReadAccess);
+					aBitmap.ReleaseAccess(pReadAccess);
+
+                    if(aBitmapEx.IsTransparent())
+                    {
+                        if(aBitmapEx.IsAlpha())
+                        {
+                            aGraphicObject.SetGraphic(Graphic(BitmapEx(aDestBitmap, aBitmapEx.GetAlpha())));
+                        }
+                        else
+                        {
+                            aGraphicObject.SetGraphic(Graphic(BitmapEx(aDestBitmap, aBitmapEx.GetMask())));
+                        }
+                    }
+                    else
+                    {
+                        aGraphicObject.SetGraphic(Graphic(aDestBitmap));
+                    }
 				}
 			}
 
-			aTempSet.Put(XFillBitmapItem(aTempSet.GetPool(), aFillBitmap));
+			aTempSet.Put(XFillBitmapItem(aTempSet.GetPool(), aGraphicObject));
 			aTempSet.Put(XFillTransparenceItem(nShadowTransparence));
 		}
 

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdograf.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdograf.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdograf.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdograf.cxx Thu May 10 10:29:55 2012
@@ -55,7 +55,6 @@
 #include "svtools/filter.hxx"
 #include <svx/svdograf.hxx>
 #include <svx/svdogrp.hxx>
-#include <svx/xbitmap.hxx>
 #include <svx/xbtmpit.hxx>
 #include <svx/xflbmtit.hxx>
 #include <svx/svdundo.hxx>
@@ -1245,10 +1244,9 @@ SdrObject* SdrGrafObj::DoConvertToPolyOb
 				SfxItemSet aSet(GetObjectItemSet());
 
 				aSet.Put(XFillStyleItem(XFILL_BITMAP));
-				Bitmap aBitmap( GetTransformedGraphic().GetBitmap() );
-				XOBitmap aXBmp(aBitmap, XBITMAP_STRETCH);
-				aSet.Put(XFillBitmapItem(String(), aXBmp));
-				aSet.Put(XFillBmpTileItem(sal_False));
+				const BitmapEx aBitmapEx(GetTransformedGraphic().GetBitmapEx());
+				aSet.Put(XFillBitmapItem(String(), Graphic(aBitmapEx)));
+				aSet.Put(XFillBmpTileItem(false));
 
 				pRetval->SetMergedItemSet(aSet);
 			}

Modified: incubator/ooo/trunk/main/svx/source/svdraw/svdoole2.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/svdraw/svdoole2.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/svdraw/svdoole2.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/svdraw/svdoole2.cxx Thu May 10 10:29:55 2012
@@ -1411,7 +1411,7 @@ SdrObject* SdrOle2Obj::createSdrGrafObjR
 
         // bitmap fill
         pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
-        pClone->SetMergedItem(XFillBitmapItem(String(), GetEmtyOLEReplacementBitmap()));
+        pClone->SetMergedItem(XFillBitmapItem(String(), Graphic(GetEmtyOLEReplacementBitmap())));
         pClone->SetMergedItem(XFillBmpTileItem(false));
         pClone->SetMergedItem(XFillBmpStretchItem(false));
 

Modified: incubator/ooo/trunk/main/svx/source/tbxctrls/fillctrl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/tbxctrls/fillctrl.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/tbxctrls/fillctrl.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/tbxctrls/fillctrl.cxx Thu May 10 10:29:55 2012
@@ -422,12 +422,10 @@ void SvxFillToolBoxControl::Update( cons
 						aTmpStr += aString;
 						aTmpStr += TMP_STR_END;
 
-						XBitmapEntry* pEntry = new XBitmapEntry( pBitmapItem->GetBitmapValue(), aTmpStr );
+						XBitmapEntry* pEntry = new XBitmapEntry(pBitmapItem->GetGraphicObject(), aTmpStr);
 						XBitmapList aBitmapList( String::CreateFromAscii("TmpList") );
 						aBitmapList.Insert( pEntry );
 						aBitmapList.SetDirty( sal_False );
-						//Bitmap* pBmp = aBitmapList.GetBitmap( 0 );
-						//( (ListBox*)pFillAttrLB )->InsertEntry( pEntry->GetName(), *pBmp );
 						pFillAttrLB->Fill( &aBitmapList );
 						pFillAttrLB->SelectEntryPos( pFillAttrLB->GetEntryCount() - 1 );
 						aBitmapList.Remove( 0 );
@@ -775,14 +773,13 @@ IMPL_LINK( FillControl, SelectFillAttrHd
 
                     if ( nPos < aItem.GetBitmapList()->Count() )  // kein temp. Eintrag ?
                     {
-                        XOBitmap aXOBitmap = aItem.GetBitmapList()->GetBitmap( nPos )->GetXBitmap();
-                        XFillBitmapItem aXFillBitmapItem( pLbFillAttr->GetSelectEntry(), aXOBitmap );
+                        const XBitmapEntry* pXBitmapEntry = aItem.GetBitmapList()->GetBitmap(nPos);
+                        const XFillBitmapItem aXFillBitmapItem(pLbFillAttr->GetSelectEntry(), pXBitmapEntry->GetGraphicObject());
 
                         aArgs[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FillBitmap" ));
                         aXFillBitmapItem.QueryValue( a );
                         aArgs[0].Value = a;
-                        ((SvxFillToolBoxControl*)GetData())->Dispatch( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:FillBitmap" )),
-                                                                       aArgs );
+                        ((SvxFillToolBoxControl*)GetData())->Dispatch(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FillBitmap")), aArgs);
                     }
                 }
             }

Modified: incubator/ooo/trunk/main/svx/source/unodraw/XPropertyTable.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/unodraw/XPropertyTable.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/unodraw/XPropertyTable.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/unodraw/XPropertyTable.cxx Thu May 10 10:29:55 2012
@@ -697,8 +697,9 @@ uno::Reference< uno::XInterface > SAL_CA
 // SvxUnoXPropertyTable
 uno::Any SvxUnoXBitmapTable::getAny( const XPropertyEntry* pEntry ) const throw()
 {
-	OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));			
-	aURL += OUString::createFromAscii( ((XBitmapEntry*)pEntry)->GetXBitmap().GetGraphicObject().GetUniqueID().GetBuffer() );
+	OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
+    const GraphicObject& rGraphicObject(((XBitmapEntry*)pEntry)->GetGraphicObject());
+	aURL += OUString::createFromAscii(rGraphicObject.GetUniqueID().GetBuffer());
 	
 	uno::Any aAny;
 	aAny <<= aURL;
@@ -711,11 +712,10 @@ XPropertyEntry* SvxUnoXBitmapTable::getE
 	if(!(rAny >>= aURL))
 		return NULL;
 
-	GraphicObject aGrafObj( GraphicObject::CreateGraphicObjectFromURL( aURL ) );
-	XOBitmap aBMP( aGrafObj );
-	
-	const String aName( rName );
-	return new XBitmapEntry( aBMP, aName );
+	const GraphicObject aGrafObj(GraphicObject::CreateGraphicObjectFromURL(aURL));
+	const String aName(rName);
+
+    return new XBitmapEntry(aGrafObj, aName);
 }
 
 // XElementAccess

Modified: incubator/ooo/trunk/main/svx/source/unodraw/unobtabl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/svx/source/unodraw/unobtabl.cxx?rev=1336585&r1=1336584&r2=1336585&view=diff
==============================================================================
--- incubator/ooo/trunk/main/svx/source/unodraw/unobtabl.cxx (original)
+++ incubator/ooo/trunk/main/svx/source/unodraw/unobtabl.cxx Thu May 10 10:29:55 2012
@@ -75,8 +75,9 @@ bool SvxUnoBitmapTable::isValid( const N
 		const XFillBitmapItem* pBitmapItem = dynamic_cast< const XFillBitmapItem* >( pItem );
 		if( pBitmapItem )
 		{
-			const GraphicObject& rGraphic = pBitmapItem->GetBitmapValue().GetGraphicObject();
-			return rGraphic.GetSizeBytes() > 0;
+			const Graphic& rGraphic = pBitmapItem->GetGraphicObject().GetGraphic();
+			
+            return rGraphic.GetSizeBytes() > 0;
 		}
 	}
 



Mime
View raw message