diff options
author | Armin Le Grand <alg@apache.org> | 2012-05-10 09:29:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-03-15 15:24:52 +0000 |
commit | c97aec0d2276901c20634abe53867f739f420f50 (patch) | |
tree | db775ba307edfffaa990a5d01361ae5c53c43f28 /svx/source/sdr/primitive2d | |
parent | d2cccde341af33b72378f3e7b0e8dd9ff1cd5e65 (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/sdr/primitive2d')
-rw-r--r-- | svx/source/sdr/primitive2d/sdrattributecreator.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 3fd7b44fc8ca..273db74e60c7 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -586,42 +586,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)); } } @@ -637,7 +637,7 @@ namespace drawinglayer (double)((const SfxUInt16Item&) (rSet.Get(XATTR_FILLBMP_POSOFFSETY))).GetValue()); return attribute::SdrFillBitmapAttribute( - aBitmap, + aBitmapEx, aSize, aOffset, aOffsetPosition, |