summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-05-10 09:29:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-03-15 15:24:52 +0000
commitc97aec0d2276901c20634abe53867f739f420f50 (patch)
treedb775ba307edfffaa990a5d01361ae5c53c43f28 /svx/source/unodraw
parentd2cccde341af33b72378f3e7b0e8dd9ff1cd5e65 (diff)
Related: #i119125# change XFillBitmapItem to work with GraphicObject
Completely changed XFillBitmapItem to work with 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 of 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. Conflicts: cui/source/tabpages/backgrnd.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx filter/source/msfilter/msdffimp.cxx filter/source/msfilter/svdfppt.cxx sc/source/filter/excel/xiescher.cxx sd/source/ui/func/fupage.cxx svx/inc/svx/dlgctrl.hxx svx/inc/svx/xbitmap.hxx svx/inc/svx/xbtmpit.hxx svx/inc/svx/xtable.hxx svx/source/customshapes/EnhancedCustomShape2d.cxx svx/source/dialog/dlgctrl.cxx svx/source/svdraw/svdograf.cxx svx/source/tbxctrls/fillctrl.cxx svx/source/unodraw/XPropertyTable.cxx svx/source/xoutdev/xattrbmp.cxx svx/source/xoutdev/xtabbtmp.cxx Change-Id: Id838bfbacc863695d078fb3cf379d1c0cd951680
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx12
-rw-r--r--svx/source/unodraw/unobtabl.cxx3
-rw-r--r--svx/source/unodraw/unoshape.cxx2
3 files changed, 8 insertions, 9 deletions
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index d64271462faf..c6b9063930b4 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -669,9 +669,8 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoXBitmapTable_createInstance( XP
uno::Any SvxUnoXBitmapTable::getAny( const XPropertyEntry* pEntry ) const throw()
{
OUString aURL( RTL_CONSTASCII_USTRINGPARAM(UNO_NAME_GRAPHOBJ_URLPREFIX));
- aURL += OStringToOUString(
- ((XBitmapEntry*)pEntry)->GetXBitmap().GetGraphicObject().GetUniqueID(),
- RTL_TEXTENCODING_ASCII_US);
+ const GraphicObject& rGraphicObject(((XBitmapEntry*)pEntry)->GetGraphicObject());
+ aURL += OStringToOUString(rGraphicObject.GetUniqueID(), RTL_TEXTENCODING_ASCII_US);
uno::Any aAny;
aAny <<= aURL;
@@ -684,11 +683,10 @@ XPropertyEntry* SvxUnoXBitmapTable::getEntry( const OUString& rName, const uno::
if(!(rAny >>= aURL))
return NULL;
- GraphicObject aGrafObj( GraphicObject::CreateGraphicObjectFromURL( aURL ) );
- XOBitmap aBMP( aGrafObj );
+ const GraphicObject aGrafObj(GraphicObject::CreateGraphicObjectFromURL(aURL));
+ const String aName(rName);
- const String aName( rName );
- return new XBitmapEntry( aBMP, aName );
+ return new XBitmapEntry(aGrafObj, aName);
}
// XElementAccess
diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx
index 7051d1bc5331..bc8e7dff52ff 100644
--- a/svx/source/unodraw/unobtabl.cxx
+++ b/svx/source/unodraw/unobtabl.cxx
@@ -69,7 +69,8 @@ bool SvxUnoBitmapTable::isValid( const NameOrIndex* pItem ) const
const XFillBitmapItem* pBitmapItem = dynamic_cast< const XFillBitmapItem* >( pItem );
if( pBitmapItem )
{
- const GraphicObject& rGraphic = pBitmapItem->GetBitmapValue().GetGraphicObject();
+ const Graphic& rGraphic = pBitmapItem->GetGraphicObject().GetGraphic();
+
return rGraphic.GetSizeBytes() > 0;
}
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 23b9046c4fc3..1193242b98bf 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1506,7 +1506,7 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const ::rtl::OUStr
XFillBitmapItem aBmpItem;
aBmpItem.SetWhich( XATTR_FILLBITMAP );
aBmpItem.SetName( rName );
- aBmpItem.SetBitmapValue( pEntry->GetXBitmap() );
+ aBmpItem.SetGraphicObject(pEntry->GetGraphicObject());
rSet.Put( aBmpItem );
break;
}