summaryrefslogtreecommitdiffstats
path: root/sw
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 /sw
parentfollow patch for fdo#38385 attempt to detect rtl (diff)
downloadcore-c97aec0d2276901c20634abe53867f739f420f50.tar.gz
core-c97aec0d2276901c20634abe53867f739f420f50.zip
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 'sw')
-rw-r--r--sw/source/core/frmedt/fecopy.cxx10
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx23
2 files changed, 12 insertions, 21 deletions
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 48bb0f8f6bdd..0bedb7389015 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1524,11 +1524,11 @@ sal_Bool SwFEShell::Paste( const Graphic &rGrf )
if( bRet )
{
- XOBitmap aXOBitmap( rGrf.GetBitmap() );
- SfxItemSet aSet( GetAttrPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP );
- aSet.Put( XFillStyleItem( XFILL_BITMAP ));
- aSet.Put( XFillBitmapItem( aEmptyStr, aXOBitmap ));
- pView->SetAttributes( aSet, sal_False );
+ SfxItemSet aSet(GetAttrPool(), XATTR_FILLSTYLE, XATTR_FILLBITMAP);
+
+ aSet.Put(XFillStyleItem(XFILL_BITMAP));
+ aSet.Put(XFillBitmapItem(aEmptyStr, rGrf));
+ pView->SetAttributes(aSet, false);
}
return bRet;
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 599b1acf3dd7..21b705875c8d 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1803,28 +1803,19 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
break;
case XFILL_BITMAP:
{
- const Graphic aGraphic(
- static_cast< XFillBitmapItem const & >(
- rOldSet.Get(XATTR_FILLBITMAP)).
- GetBitmapValue().GetBitmap());
- bool bTile = WW8ITEMVALUE(rOldSet, XATTR_FILLBMP_TILE,
- SfxBoolItem) ? true: false;
- GraphicObject aGrfObj(aGraphic);
+ GraphicObject aGrfObj(static_cast< XFillBitmapItem const & >(rOldSet.Get(XATTR_FILLBITMAP)).GetGraphicObject());
+ const bool bTile(WW8ITEMVALUE(rOldSet, XATTR_FILLBMP_TILE, SfxBoolItem) ? true: false);
- aBrushItem.SetGraphicObject(aGrfObj);
-
- if (bBrushItemOk) //has trans
+ if(bBrushItemOk) //has trans
{
- GraphicObject *pGraphicObject =
- const_cast<GraphicObject *>
- (aBrushItem.GetGraphicObject());
- GraphicAttr aAttr(pGraphicObject->GetAttr());
+ GraphicAttr aAttr(aGrfObj.GetAttr());
+
aAttr.SetTransparency(nTrans);
- pGraphicObject->SetAttr(aAttr);
+ aGrfObj.SetAttr(aAttr);
}
+ aBrushItem.SetGraphicObject(aGrfObj);
aBrushItem.SetGraphicPos(bTile ? GPOS_TILED : GPOS_AREA);
-
bBrushItemOk = true;
}
break;