summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-04-13 07:39:27 +0000
committerRelease Engineers <releng@openoffice.org>2009-04-13 07:39:27 +0000
commit32715d925a37abe02e4b6abb891cd91f2ade9de8 (patch)
tree31963188dd884877cf1e32d2c4797b8cc510c03d /svx
parentd2752c008ba632f0b84ae4e406f7a9f887a23ec2 (diff)
CWS-TOOLING: integrate CWS aw069
2009-04-01 12:34:39 +0200 aw r270316 : #i100710# added support for OLEs without visualisation graphics for FullDrag
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdoole2.cxx68
1 files changed, 48 insertions, 20 deletions
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index f7b1d2a979..939f2385d8 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -90,6 +90,12 @@
#include <svx/sdr/contact/viewcontactofsdrole2obj.hxx>
#include <svx/svdograf.hxx>
+// #i100710#
+#include <svx/xlnclit.hxx>
+#include <svx/xbtmpit.hxx>
+#include <svx/xflbmtit.hxx>
+#include <svx/xflbstit.hxx>
+
using namespace ::rtl;
using namespace ::com::sun::star;
@@ -1467,26 +1473,48 @@ void SdrOle2Obj::SetClosedObj( bool bIsClosed )
// -----------------------------------------------------------------------------
-SdrObject* SdrOle2Obj::getFullDragClone() const
-{
- // special handling for OLE. The default handling works, but is too
- // slow when the whole OLE needs to be cloned. Get the Metafile and
- // create a graphic object with it
- Graphic* pOLEGraphic = GetGraphic();
-
- if(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
- {
- pOLEGraphic = getEmbeddedObjectRef().GetHCGraphic();
- }
-
- SdrObject* pClone = new SdrGrafObj(*pOLEGraphic, GetSnapRect());
-
- // this would be the place where to copy all attributes
- // when OLE will support fill and line style
- // pClone->SetMergedItem(pOleObject->GetMergedItemSet());
-
- return pClone;
-}
+SdrObject* SdrOle2Obj::getFullDragClone() const
+{
+ // special handling for OLE. The default handling works, but is too
+ // slow when the whole OLE needs to be cloned. Get the Metafile and
+ // create a graphic object with it
+ Graphic* pOLEGraphic = GetGraphic();
+ SdrObject* pClone = 0;
+
+ if(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
+ {
+ pOLEGraphic = getEmbeddedObjectRef().GetHCGraphic();
+ }
+
+ if(pOLEGraphic)
+ {
+ pClone = new SdrGrafObj(*pOLEGraphic, GetSnapRect());
+
+ // this would be the place where to copy all attributes
+ // when OLE will support fill and line style
+ // pClone->SetMergedItem(pOleObject->GetMergedItemSet());
+ }
+ else
+ {
+ // #i100710# pOLEGraphic may be zero (no visualisation available),
+ // so we need to use the OLE replacement graphic
+ pClone = new SdrRectObj(GetSnapRect());
+
+ // gray outline
+ pClone->SetMergedItem(XLineStyleItem(XLINE_SOLID));
+ const svtools::ColorConfig aColorConfig;
+ const svtools::ColorConfigValue aColor(aColorConfig.GetColorValue(svtools::OBJECTBOUNDARIES));
+ pClone->SetMergedItem(XLineColorItem(String(), aColor.nColor));
+
+ // bitmap fill
+ pClone->SetMergedItem(XFillStyleItem(XFILL_BITMAP));
+ pClone->SetMergedItem(XFillBitmapItem(String(), GetEmtyOLEReplacementBitmap()));
+ pClone->SetMergedItem(XFillBmpTileItem(false));
+ pClone->SetMergedItem(XFillBmpStretchItem(false));
+ }
+
+ return pClone;
+}
// -----------------------------------------------------------------------------