summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
+}
// -----------------------------------------------------------------------------