summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-07-02 14:28:15 +0000
committerRelease Engineers <releng@openoffice.org>2009-07-02 14:28:15 +0000
commit31c8faa0b93ffc3e975014c721f71b6d4e3d7141 (patch)
treec6f6cc7eead72386694869b9cb1799036c6e9d8a
parentc12255822cdd9f57a109e2989a01d9930894e9f3 (diff)
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation 2009-06-16 15:45:28 +0200 wg r273021 : i102838 2009-06-16 12:46:07 +0200 wg r273016 : i102833 2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper 2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected 2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added 2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect 2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition 2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct) 2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync 2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync 2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync 2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49) 2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives 2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged() 2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition 2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping 2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping 2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped 2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped 2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped 2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped 2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state 2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state 2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state 2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state 2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state 2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state 2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications 2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications 2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications 2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications 2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications 2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications 2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications 2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds 2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling 2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications 2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations 2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked 2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared 2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes 2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes 2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH 2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH 2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH 2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync 2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync 2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47) 2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed 2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done 2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected 2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected 2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done 2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done 2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done 2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done 2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done 2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done 2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done 2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done 2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done 2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping 2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes 2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes 2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes 2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change 2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
-rw-r--r--sd/inc/sd_primitivetypes2d.hxx1
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx24
-rw-r--r--sd/source/ui/func/fuconstr.cxx2
-rw-r--r--sd/source/ui/func/fudraw.cxx16
-rw-r--r--sd/source/ui/func/fudspord.cxx4
-rw-r--r--sd/source/ui/func/fusel.cxx16
-rw-r--r--sd/source/ui/func/futext.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx10
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx52
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx2
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx87
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx39
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx217
-rw-r--r--sd/source/ui/slidesorter/view/SlsViewOverlay.cxx261
-rw-r--r--sd/source/ui/view/sdview.cxx2
-rw-r--r--sd/source/ui/view/sdview2.cxx29
-rw-r--r--sd/source/ui/view/sdview3.cxx15
-rw-r--r--sd/source/ui/view/sdview4.cxx4
19 files changed, 288 insertions, 501 deletions
diff --git a/sd/inc/sd_primitivetypes2d.hxx b/sd/inc/sd_primitivetypes2d.hxx
index 398359276f91..6f3130b87cf6 100644
--- a/sd/inc/sd_primitivetypes2d.hxx
+++ b/sd/inc/sd_primitivetypes2d.hxx
@@ -43,6 +43,7 @@
#define PRIMITIVE2D_ID_SDPAGEOBJECTPAGEBITMAPPRIMITIVE (PRIMITIVE2D_ID_RANGE_SD| 2)
#define PRIMITIVE2D_ID_SDPAGEOBJECTBORDERPRIMITIVE (PRIMITIVE2D_ID_RANGE_SD| 3)
#define PRIMITIVE2D_ID_SDPAGEOBJECTFADENAMENUMBERPRIMITIVE (PRIMITIVE2D_ID_RANGE_SD| 4)
+#define PRIMITIVE2D_ID_SDMOUSEOVEREFFECTPRIMITIVE (PRIMITIVE2D_ID_RANGE_SD| 5)
//////////////////////////////////////////////////////////////////////////////
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 17ab179c949b..887c6014f29c 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -41,7 +41,6 @@
#include <sfx2/dispatch.hxx>
#include <svx/sdr/overlay/overlaymanager.hxx>
-#include <svx/sdr/overlay/overlaysdrobject.hxx>
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
#include <svx/svdpagv.hxx>
#include <svx/sdrpagewindow.hxx>
@@ -68,6 +67,9 @@
#include "app.hrc"
#include "Window.hxx"
+#include <svx/sdr/contact/viewcontact.hxx>
+#include <svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx>
+
using ::rtl::OUString;
using ::sdr::PolyPolygonEditor;
using namespace ::com::sun::star::uno;
@@ -310,26 +312,18 @@ void SdPathHdl::CreateB2dIAObject()
{
for(sal_uInt32 b(0L); b < pPageView->PageWindowCount(); b++)
{
- // const SdrPageViewWinRec& rPageViewWinRec = rPageViewWinList[b];
const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(b);
if(rPageWindow.GetPaintWindow().OutputToWindow())
{
- if(rPageWindow.GetOverlayManager())
+ if(rPageWindow.GetOverlayManager() && mpPathObj)
{
- const SdrPathObj& rPath = *mpPathObj;
-
- ::sdr::overlay::OverlayObject* pNewOverlayObject = new
- ::sdr::overlay::OverlaySdrObject(basegfx::B2DPoint(), rPath);
- //::sdr::overlay::OverlayPolyPolygonStriped( maPolyPolygon );
- DBG_ASSERT(pNewOverlayObject, "Got NO new IAO!");
+ const sdr::contact::ViewContact& rVC = mpPathObj->GetViewContact();
+ const drawinglayer::primitive2d::Primitive2DSequence aSequence = rVC.getViewIndependentPrimitive2DSequence();
+ sdr::overlay::OverlayObject* pNew = new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence);
- // OVERLAYMANAGER
- if(pNewOverlayObject)
- {
- rPageWindow.GetOverlayManager()->add(*pNewOverlayObject);
- maOverlayGroup.append(*pNewOverlayObject);
- }
+ rPageWindow.GetOverlayManager()->add(*pNew);
+ maOverlayGroup.append(*pNew);
}
}
}
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 8786f8eed399..3f9d8151ef4e 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -220,7 +220,7 @@ BOOL FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
SdrPageView* pPV;
USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
- if (!mpView->PickObj(aPnt, pObj, pPV))
+ if (!mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV))
{
mpView->MarkObj(aPnt, nHitLog);
}
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index a0d7c47d9841..6c6c0c3aaa81 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -78,8 +78,8 @@
#include "fusel.hxx"
#include <svtools/aeitem.hxx>
#include <vcl/msgbox.hxx>
-
#include "slideshow.hxx"
+#include <svx/sdrhittesthelper.hxx>
using namespace ::com::sun::star;
@@ -690,7 +690,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if (eHit == SDRHIT_NONE)
{
// found nothing -> look after at the masterpage
- mpView->PickObj(aPnt, pObj, pPV, SDRSEARCH_ALSOONMASTER);
+ mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER);
}
else if (eHit == SDRHIT_UNMARKEDOBJECT)
{
@@ -719,7 +719,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
if (bDefPointer && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dPolyScene)))
{
// In die Gruppe hineinschauen
- if (mpView->PickObj(aPnt, pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
+ if (mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
bDefPointer = !SetPointer(pObj, aPnt);
}
}
@@ -767,10 +767,10 @@ BOOL FuDraw::SetPointer(SdrObject* pObj, const Point& rPos)
aHitPosB.Y() -= n2HitLog;
if ( !pObj->IsClosedObj() ||
- ( pObj->IsHit(aHitPosR, nHitLog, pVisiLayer) &&
- pObj->IsHit(aHitPosL, nHitLog, pVisiLayer) &&
- pObj->IsHit(aHitPosT, nHitLog, pVisiLayer) &&
- pObj->IsHit(aHitPosB, nHitLog, pVisiLayer) ) )
+ ( SdrObjectPrimitiveHit(*pObj, aHitPosR, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pObj, aHitPosL, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pObj, aHitPosT, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pObj, aHitPosB, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false)))
{
/**********************************************************
* hit inside the object (without margin) or open object
@@ -922,7 +922,7 @@ BOOL FuDraw::RequestHelp(const HelpEvent& rHEvt)
Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(aPosPixel)));
- if (mpView->PickObj(aPos, pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
+ if (mpView->PickObj(aPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
bReturn = SetHelpText(pObj, aPosPixel, aVEvt);
}
}
diff --git a/sd/source/ui/func/fudspord.cxx b/sd/source/ui/func/fudspord.cxx
index b8e2ae7b13af..c0103d58c475 100644
--- a/sd/source/ui/func/fudspord.cxx
+++ b/sd/source/ui/func/fudspord.cxx
@@ -116,7 +116,7 @@ BOOL FuDisplayOrder::MouseMove(const MouseEvent& rMEvt)
SdrPageView* pPV;
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
- if ( mpView->PickObj(aPnt, pPickObj, pPV) )
+ if ( mpView->PickObj(aPnt, mpView->getHitTolLog(), pPickObj, pPV) )
{
if (mpRefObj != pPickObj)
{
@@ -153,7 +153,7 @@ BOOL FuDisplayOrder::MouseButtonUp(const MouseEvent& rMEvt)
SdrPageView* pPV = NULL;
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
- if ( mpView->PickObj(aPnt, mpRefObj, pPV) )
+ if ( mpView->PickObj(aPnt, mpView->getHitTolLog(), mpRefObj, pPV) )
{
if (nSlotId == SID_BEFORE_OBJ)
{
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 9f534ede7006..3517892700ed 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -91,6 +91,8 @@
#include <svx/svdundo.hxx>
#include <avmedia/mediawindow.hxx>
+#include <svx/sdrhittesthelper.hxx>
+
using namespace ::com::sun::star;
namespace sd {
@@ -264,7 +266,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
else
{
- if (!rMEvt.IsMod2() && mpView->PickObj(aMDPos, pObj, pPV, SDRSEARCH_PICKMACRO))
+ if (!rMEvt.IsMod2() && mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO))
{
mpView->BegMacroObj(aMDPos, nHitLog, pObj, pPV, mpWindow);
bReturn = TRUE;
@@ -320,7 +322,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
&& mpViewShell->ISA(DrawViewShell)
)
{
- if(mpView->PickObj(aMDPos, pObj, pPV, SDRSEARCH_ALSOONMASTER))
+ if(mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER))
{
// Animate object when not just selecting.
if ( ! bSelectionOnly)
@@ -331,7 +333,7 @@ BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if(rMEvt.GetClicks() == 1)
{
// In die Gruppe hineinschauen
- if (mpView->PickObj(aMDPos, pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
+ if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
bReturn = AnimateObj(pObj, aMDPos);
}
else if( !bReadOnly && rMEvt.GetClicks() == 2)
@@ -1212,10 +1214,10 @@ BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
if ( !bClosed ||
!bFilled ||
- (pObj->IsHit( aHitPosR, nHitLog, pVisiLayer ) &&
- pObj->IsHit( aHitPosL, nHitLog, pVisiLayer ) &&
- pObj->IsHit( aHitPosT, nHitLog, pVisiLayer ) &&
- pObj->IsHit( aHitPosB, nHitLog, pVisiLayer ) ) )
+ (SdrObjectPrimitiveHit(*pObj, aHitPosR, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pObj, aHitPosL, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pObj, aHitPosT, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pObj, aHitPosB, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) ) )
{
if ( mpDoc->GetIMapInfo( pObj ) )
{
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index cb6b42dfc2fb..4f75012ebd3c 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -325,7 +325,7 @@ BOOL FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
BOOL bMacro = FALSE;
- if (bMacro && mpView->PickObj(aMDPos,pObj,pPV,SDRSEARCH_PICKMACRO))
+ if (bMacro && mpView->PickObj(aMDPos,mpView->getHitTolLog(),pObj,pPV,SDRSEARCH_PICKMACRO))
{
// Makro
USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
@@ -1037,7 +1037,7 @@ void FuText::Activate()
mpView->SetQuickTextEditMode(mpViewShell->GetFrameView()->IsQuickEdit());
// #i89661# it's no longer necessary to make it so big here, it's fine tuned
- // for text objects in SdrMarkView::ImpCheckObjHit
+ // for text objects in SdrMarkView::CheckSingleSdrObjectHit
mpView->SetHitTolerancePixel( 2 * HITPIX );
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index 0c1cbd47f8e5..9b31cb17e5aa 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -431,7 +431,7 @@ bool SlideSorterController::Command (
// would take place.
mrView.GetOverlay().GetInsertionIndicatorOverlay().SetPosition(
pWindow->PixelToLogic(rEvent.GetMousePosPixel()));
- mrView.GetOverlay().GetInsertionIndicatorOverlay().Show();
+ mrView.GetOverlay().GetInsertionIndicatorOverlay().setVisible(true);
}
pWindow->ReleaseMouse();
@@ -477,7 +477,7 @@ bool SlideSorterController::Command (
// finds the right place to insert a new slide.
GetSelectionManager()->SetInsertionPosition(
mrView.GetOverlay().GetInsertionIndicatorOverlay().GetInsertionPageIndex());
- mrView.GetOverlay().GetInsertionIndicatorOverlay().Hide();
+ mrView.GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
}
bEventHasBeenHandled = true;
}
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index f157968d6c2d..805628396a35 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -235,7 +235,7 @@ sal_Int32 Clipboard::GetInsertionPosition (::Window* pWindow)
view::InsertionIndicatorOverlay& rInsertionIndicatorOverlay (
mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay());
- if (rInsertionIndicatorOverlay.IsShowing())
+ if (rInsertionIndicatorOverlay.isVisible())
{
nInsertPosition = rInsertionIndicatorOverlay.GetInsertionPageIndex();
}
@@ -441,8 +441,8 @@ void Clipboard::StartDrag (
void Clipboard::DragFinished (sal_Int8 nDropAction)
{
// Hide the substitution display and insertion indicator.
- mrSlideSorter.GetView().GetOverlay().GetSubstitutionOverlay().Hide();
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().Hide();
+ mrSlideSorter.GetView().GetOverlay().GetSubstitutionOverlay().setVisible(false);
+ mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
@@ -522,7 +522,7 @@ sal_Int8 Clipboard::AcceptDrop (
Point aPosition = pTargetWindow->PixelToLogic (rEvent.maPosPixel);
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
rOverlay.GetInsertionIndicatorOverlay().SetPosition (aPosition);
- rOverlay.GetInsertionIndicatorOverlay().Show();
+ rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
rOverlay.GetSubstitutionOverlay().SetPosition (aPosition);
// Scroll the window when the mouse reaches the window border.
@@ -581,7 +581,7 @@ sal_Int8 Clipboard::ExecuteDrop (
USHORT nIndex = DetermineInsertPosition (*pDragTransferable);
OSL_TRACE ("Clipboard::AcceptDrop() called for index %d",
nIndex);
- rOverlay.GetInsertionIndicatorOverlay().Hide();
+ rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
if (bContinue)
{
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index 366ddc51b2fb..9ed68156f701 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -243,9 +243,9 @@ BOOL SelectionFunction::MouseMove (const MouseEvent& rEvent)
rOverlay.GetMouseOverIndicatorOverlay().SetSlideUnderMouse(
rEvent.IsLeaveWindow() ? model::SharedPageDescriptor() : pHitDescriptor);
if (pHitDescriptor.get() != NULL)
- rOverlay.GetMouseOverIndicatorOverlay().Show();
+ rOverlay.GetMouseOverIndicatorOverlay().setVisible(true);
else
- rOverlay.GetMouseOverIndicatorOverlay().Hide();
+ rOverlay.GetMouseOverIndicatorOverlay().setVisible(false);
// Allow one mouse move before the drag timer is disabled.
if (aDragTimer.IsActive())
@@ -258,7 +258,7 @@ BOOL SelectionFunction::MouseMove (const MouseEvent& rEvent)
Rectangle aRectangle (Point(0,0),mpWindow->GetOutputSizePixel());
if ( ! aRectangle.IsInside(aMousePosition)
- && rOverlay.GetSubstitutionOverlay().IsShowing())
+ && rOverlay.GetSubstitutionOverlay().isVisible())
{
// Mouse left the window with pressed left button. Make it a drag.
StartDrag();
@@ -598,11 +598,11 @@ void SelectionFunction::ProcessRectangleSelection (bool bToggleSelection)
return;
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSelectionRectangleOverlay().IsShowing())
+ if (rOverlay.GetSelectionRectangleOverlay().isVisible())
{
PageSelector& rSelector (mrController.GetPageSelector());
- rOverlay.GetSelectionRectangleOverlay().Hide();
+ rOverlay.GetSelectionRectangleOverlay().setVisible(false);
// Select all pages whose page object lies completly inside the drag
// rectangle.
@@ -717,7 +717,7 @@ void SelectionFunction::ClearOverlays (void)
{
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetSubstitutionOverlay().Hide();
+ rOverlay.GetSubstitutionOverlay().setVisible(false);
rOverlay.GetSubstitutionOverlay().Clear();
mpInsertionIndicatorHandler->End();
@@ -795,9 +795,9 @@ sal_uInt32 SelectionFunction::EncodeMouseEvent (
// Detect whether we are dragging pages or dragging a selection rectangle.
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSubstitutionOverlay().IsShowing())
+ if (rOverlay.GetSubstitutionOverlay().isVisible())
nEventCode |= SUBSTITUTION_VISIBLE;
- if (rOverlay.GetSelectionRectangleOverlay().IsShowing())
+ if (rOverlay.GetSelectionRectangleOverlay().isVisible())
nEventCode |= RECTANGLE_VISIBLE;
return nEventCode;
@@ -853,9 +853,9 @@ sal_uInt32 SelectionFunction::EncodeKeyEvent (
// Detect whether we are dragging pages or dragging a selection rectangle.
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if (rOverlay.GetSubstitutionOverlay().IsShowing())
+ if (rOverlay.GetSubstitutionOverlay().isVisible())
nEventCode |= SUBSTITUTION_VISIBLE;
- if (rOverlay.GetSelectionRectangleOverlay().IsShowing())
+ if (rOverlay.GetSelectionRectangleOverlay().isVisible())
nEventCode |= RECTANGLE_VISIBLE;
return nEventCode;
@@ -1070,20 +1070,20 @@ void SelectionFunction::EventPostprocessing (const EventDescriptor& rDescriptor)
// case that the context menu is visible.
DBG_ASSERT(
mrController.IsContextMenuOpen()
- || !rOverlay.GetInsertionIndicatorOverlay().IsShowing(),
+ || !rOverlay.GetInsertionIndicatorOverlay().isVisible(),
"slidesorter::SelectionFunction: insertion indicator still visible");
DBG_ASSERT(
- !rOverlay.GetSubstitutionOverlay().IsShowing(),
+ !rOverlay.GetSubstitutionOverlay().isVisible(),
"slidesorter::SelectionFunction: substitution still visible");
DBG_ASSERT(
- !rOverlay.GetSelectionRectangleOverlay().IsShowing(),
+ !rOverlay.GetSelectionRectangleOverlay().isVisible(),
"slidesorter::SelectionFunction: selection rectangle still visible");
// Now turn them off.
if ( ! mrController.IsContextMenuOpen())
- rOverlay.GetInsertionIndicatorOverlay().Hide();
- rOverlay.GetSubstitutionOverlay().Hide();
- rOverlay.GetSelectionRectangleOverlay().Hide();
+ rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
+ rOverlay.GetSubstitutionOverlay().setVisible(false);
+ rOverlay.GetSelectionRectangleOverlay().setVisible(false);
}
}
@@ -1193,7 +1193,7 @@ SelectionFunction::SubstitutionHandler::~SubstitutionHandler (void)
if (mrSlideSorter.IsValid())
{
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetSubstitutionOverlay().Hide();
+ rOverlay.GetSubstitutionOverlay().setVisible(false);
rOverlay.GetSubstitutionOverlay().Clear();
}
}
@@ -1212,14 +1212,14 @@ void SelectionFunction::SubstitutionHandler::Start (const Point& rMouseModelPosi
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- if ( ! rOverlay.GetSubstitutionOverlay().IsShowing())
+ if ( ! rOverlay.GetSubstitutionOverlay().isVisible())
{
// Show a new substitution for the selected page objects.
model::PageEnumeration aSelectedPages(
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
rOverlay.GetSubstitutionOverlay().Create(aSelectedPages, rMouseModelPosition);
- rOverlay.GetSubstitutionOverlay().Show();
+ rOverlay.GetSubstitutionOverlay().setVisible(true);
mbHasBeenMoved = false;
}
else
@@ -1240,7 +1240,7 @@ void SelectionFunction::SubstitutionHandler::UpdatePosition (const Point& rMouse
rOverlay.GetSubstitutionOverlay().SetPosition(rMouseModelPosition);
rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().Show();
+ rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
mbHasBeenMoved = true;
}
@@ -1279,9 +1279,9 @@ void SelectionFunction::SubstitutionHandler::Process (void)
void SelectionFunction::SubstitutionHandler::End (void)
{
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
- rOverlay.GetSubstitutionOverlay().Hide();
+ rOverlay.GetSubstitutionOverlay().setVisible(false);
rOverlay.GetSubstitutionOverlay().Clear();
- rOverlay.GetInsertionIndicatorOverlay().Hide();
+ rOverlay.GetInsertionIndicatorOverlay().setVisible(false);
}
@@ -1304,9 +1304,9 @@ bool SelectionFunction::SubstitutionHandler::IsSubstitutionInsertionNonTrivial (
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
// Make sure that the substitution and the insertion indicator are visible.
- if ( ! rOverlay.GetSubstitutionOverlay().IsShowing())
+ if ( ! rOverlay.GetSubstitutionOverlay().isVisible())
break;
- if ( ! rOverlay.GetInsertionIndicatorOverlay().IsShowing())
+ if ( ! rOverlay.GetInsertionIndicatorOverlay().isVisible())
break;
// Iterate over all selected pages and check whether there are
@@ -1381,7 +1381,7 @@ void SelectionFunction::InsertionIndicatorHandler::Start (const Point& rMouseMod
view::ViewOverlay& rOverlay (mrSlideSorter.GetView().GetOverlay());
rOverlay.GetInsertionIndicatorOverlay().SetPosition(rMouseModelPosition);
- rOverlay.GetInsertionIndicatorOverlay().Show();
+ rOverlay.GetInsertionIndicatorOverlay().setVisible(true);
}
@@ -1401,7 +1401,7 @@ void SelectionFunction::InsertionIndicatorHandler::UpdatePosition (const Point&
void SelectionFunction::InsertionIndicatorHandler::End (void)
{
- mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().Hide();
+ mrSlideSorter.GetView().GetOverlay().GetInsertionIndicatorOverlay().setVisible(false);
}
} } } // end of namespace ::sd::slidesorter::controller
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 2fddf952e18e..a9a4d6b2d385 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -1076,7 +1076,7 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
// No selection. Is there an insertion indicator?
else if (mrSlideSorter.GetView().GetOverlay()
- .GetInsertionIndicatorOverlay().IsShowing())
+ .GetInsertionIndicatorOverlay().isVisible())
{
// Select the page before the insertion indicator.
nInsertionIndex = mrSlideSorter.GetView().GetOverlay()
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx
index 52fc96d449db..9351ab72dcd6 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectViewObjectContact.hxx
@@ -105,13 +105,6 @@ public:
*/
model::SharedPageDescriptor GetPageDescriptor (void) const;
- /** Return the device independent part of the page border. This border
- is returned in pixel coordinates. Note that the device dependent
- parts--for the page number and the page title--have to be added.
- This is done by CalculatePageModelBorder().
- */
- static SvBorder GetPagePixelBorder (void);
-
/** Return the border widths in the screen coordinate system of the
border arround the page object. The border contains frames for
selection, focus, the page name and number, and the indicator for
@@ -144,7 +137,7 @@ public:
When bVisible is <FALSE/> then paint the area of the mouse over
effect in the background color, i.e. erase it.
*/
- void PaintMouseOverEffect (OutputDevice& rDevice, bool bVisible) const;
+ drawinglayer::primitive2d::Primitive2DSequence createMouseOverEffectPrimitive2DSequence();
enum BoundingBoxType {
// This is the outer bounding box that includes the preview, page
@@ -189,33 +182,6 @@ public:
// access to the current page content primitive vector which may be used for visualisation
const drawinglayer::primitive2d::Primitive2DSequence& getCurrentPageContents() const { return mxCurrentPageContents; }
- /** This convenience method paints a dotted or dashed rectangle. The
- length of dots or dashes is indepent of zoom factor or map mode.
- */
- enum DashType { Dotted, Dashed };
- static void PaintDottedRectangle (
- OutputDevice& rDevice,
- const Rectangle& rRectangle,
- const DashType eDashType = Dotted);
-
-
- enum ColorSpec { CS_SELECTION, CS_BACKGROUND, CS_WINDOW, CS_TEXT };
- /** Return a color for one of the screen elements in ColorSpec. For
- Background the background color is updated when
- mbIsBackgroundColorUpdatePending is <TRUE/>.
- @param rDevice
- Base colors are taken from the device.
- @param eSpec
- The type of color to return.
- @param nOpacity
- This parameter controls the blending between the background and
- the actual color.
- */
- Color GetColor (
- const OutputDevice& rDevice,
- const ColorSpec eSpec,
- const double nOpacity = 1.0) const;
-
virtual void ActionChanged (void);
private:
@@ -239,11 +205,6 @@ private:
*/
bool mbInDestructor;
- /** Set this flag to <TRUE/> to update the background color on the next
- call to GetBackgroundColor().
- */
- mutable bool mbIsBackgroundColorUpdatePending;
-
/// The primitive sequence of the page contents, completely scaled
/// and prepared for painiting
drawinglayer::primitive2d::Primitive2DSequence mxCurrentPageContents;
@@ -252,12 +213,6 @@ private:
::boost::shared_ptr<controller::Properties> mpProperties;
- /** Do not use this member directly. Use GetColor(Background) instead.
- That method determines the background color when
- mbIsBackgroundColorUpdatePending is <TRUE/>.
- */
- mutable Color maBackgroundColor;
-
BitmapEx GetPreview (
const sdr::contact::DisplayInfo& rDisplayInfo,
const Rectangle& rNewSizePixel);
@@ -266,46 +221,6 @@ private:
is painted).
*/
Rectangle GetPageNumberArea (OutputDevice& rDevice) const;
-
- void PaintBackground (OutputDevice& rDevice) const;
-
- /** Paint the preview bitmap.
- */
- void PaintPreview (OutputDevice& rDevice);
-
- /** Paint a border arround the page preview.
- */
- void PaintBorder (OutputDevice& rDevice) const;
-
- /** Paint the focus indicator for the specified page.
- */
- void PaintFocusIndicator (
- OutputDevice& rDevice,
- bool bEraseBackground) const;
-
- /** Paint the selection indicator when the page is currently selected.
- Otherwise the call is ignored.
- */
- void PaintSelectionIndicator (OutputDevice& rDevice) const;
-
- /** Paint the fade effect indicator which indicates whether a fade
- effect is currently associated with a page.
- @param rDescriptor
- The descriptor of the page for which to paint the fade effect
- indicator.
- */
- void PaintFadeEffectIndicator (OutputDevice& rDevice) const;
-
- /** Paint the name of the page to the bottom right of the page object.
- */
- void PaintPageName (OutputDevice& rDevice) const;
-
- /** Paint the number of the page to the upper left of the page object.
- */
- void PaintPageNumber (
- ::sdr::contact::DisplayInfo& rDisplayInfo);
-
- Color GetBackgroundColor (const OutputDevice& rDevice) const;
};
} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx
index a7652d87d35c..1d99584bec4b 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsViewOverlay.hxx
@@ -74,28 +74,17 @@ class ViewOverlay;
support for the display.
*/
class OverlayBase
- : private ::boost::noncopyable,
- public sdr::overlay::OverlayObject
+ : public sdr::overlay::OverlayObject
{
public:
OverlayBase (ViewOverlay& rViewOverlay);
virtual ~OverlayBase (void);
- virtual void Paint (void);
-
- virtual void Show (void);
- virtual void Hide (void);
- void Toggle (void);
- bool IsShowing (void);
- ViewOverlay& GetViewOverlay (void);
-
protected:
::osl::Mutex maMutex;
ViewOverlay& mrViewOverlay;
- virtual void transform (const basegfx::B2DHomMatrix& rMatrix);
-
/** Make sure that the overlay object is registered at the
OverlayManager. This registration is done on demand.
*/
@@ -134,15 +123,16 @@ public:
void SetPosition (const Point& rPosition);
Point GetPosition (void) const;
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged();
+
protected:
- virtual void drawGeometry (OutputDevice& rOutputDevice);
- virtual void createBaseRange (OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
private:
Point maPosition;
- Point maTranslation;
- Rectangle maBoundingBox;
- ::std::vector<Rectangle> maShapes;
+ basegfx::B2DPolyPolygon maShapes;
};
@@ -163,9 +153,12 @@ public:
Rectangle GetSelectionRectangle (void);
+ // react on stripe definition change
+ virtual void stripeDefinitionHasChanged();
+
protected:
- virtual void drawGeometry (OutputDevice& rOutputDevice);
- virtual void createBaseRange (OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
private:
Point maAnchor;
@@ -193,8 +186,8 @@ public:
sal_Int32 GetInsertionPageIndex (void) const;
protected:
- virtual void drawGeometry (OutputDevice& rOutputDevice);
- virtual void createBaseRange (OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
private:
sal_Int32 mnInsertionIndex;
@@ -223,8 +216,8 @@ public:
void SetSlideUnderMouse (const model::SharedPageDescriptor& rpDescriptor);
protected:
- virtual void drawGeometry (OutputDevice& rOutputDevice);
- virtual void createBaseRange (OutputDevice& rOutputDevice);
+ // geometry creation for OverlayObject
+ virtual drawinglayer::primitive2d::Primitive2DSequence createOverlayObjectPrimitive2DSequence();
private:
/** The page under the mouse is stored as weak shared pointer so that
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
index fbea240c5a25..92a0abb72762 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectViewObjectContact.cxx
@@ -90,11 +90,9 @@ PageObjectViewObjectContact::PageObjectViewObjectContact (
const ::boost::shared_ptr<controller::Properties>& rpProperties)
: ViewObjectContactOfPageObj(rObjectContact, rViewContact),
mbInDestructor(false),
- mbIsBackgroundColorUpdatePending(true),
mxCurrentPageContents(),
mpCache(rpCache),
- mpProperties(rpProperties),
- maBackgroundColor()
+ mpProperties(rpProperties)
{
SharedPageDescriptor pDescriptor (GetPageDescriptor());
OSL_ASSERT(pDescriptor.get()!=NULL);
@@ -1139,71 +1137,128 @@ void PageObjectViewObjectContact::ActionChanged (void)
GetPage());
}
- mbIsBackgroundColorUpdatePending = true;
-
// call parent
ViewObjectContactOfPageObj::ActionChanged();
}
+//////////////////////////////////////////////////////////////////////////////
+// helper MouseOverEffectPrimitive
+//
+// Used to allow view-dependent primitive definition. For that purpose, the
+// initially created primitive (here: in createMouseOverEffectPrimitive2DSequence())
+// always has to be view-independent, but the decomposition is made view-dependent.
+// Very simple primitive which just remembers the discrete data and applies
+// it at decomposition time.
+class MouseOverEffectPrimitive : public drawinglayer::primitive2d::BasePrimitive2D
+{
+private:
+ basegfx::B2DRange maLogicRange;
+ sal_uInt32 mnDiscreteOffset;
+ sal_uInt32 mnDiscreteWidth;
+ basegfx::BColor maRGBColor;
+protected:
+ virtual drawinglayer::primitive2d::Primitive2DSequence createLocalDecomposition(
+ const drawinglayer::geometry::ViewInformation2D& rViewInformation) const;
-void PageObjectViewObjectContact::PaintMouseOverEffect (
- OutputDevice& rDevice,
- bool bVisible) const
+public:
+ MouseOverEffectPrimitive(
+ const basegfx::B2DRange& rLogicRange,
+ sal_uInt32 nDiscreteOffset,
+ sal_uInt32 nDiscreteWidth,
+ const basegfx::BColor& rRGBColor)
+ : drawinglayer::primitive2d::BasePrimitive2D(),
+ maLogicRange(rLogicRange),
+ mnDiscreteOffset(nDiscreteOffset),
+ mnDiscreteWidth(nDiscreteWidth),
+ maRGBColor(rRGBColor)
+ {}
+
+ // data access
+ const basegfx::B2DRange& getLogicRange() const { return maLogicRange; }
+ sal_uInt32 getDiscreteOffset() const { return mnDiscreteOffset; }
+ sal_uInt32 getDiscreteWidth() const { return mnDiscreteWidth; }
+ const basegfx::BColor& getRGBColor() const { return maRGBColor; }
+
+ virtual bool operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const;
+
+ DeclPrimitrive2DIDBlock()
+};
+
+drawinglayer::primitive2d::Primitive2DSequence MouseOverEffectPrimitive::createLocalDecomposition(
+ const drawinglayer::geometry::ViewInformation2D& rViewInformation) const
+{
+ // get logic sizes in object coordinate system
+ const double fDiscreteWidth((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
+ const double fOffset(fDiscreteWidth * getDiscreteOffset());
+ const double fWidth(fDiscreteWidth * getDiscreteWidth());
+
+ // create range (one pixel less to get a good fitting)
+ basegfx::B2DRange aRange(
+ getLogicRange().getMinimum(),
+ getLogicRange().getMaximum() - basegfx::B2DTuple(fDiscreteWidth, fDiscreteWidth));
+
+ // grow range
+ aRange.grow(fOffset - (fWidth * 0.5));
+
+ // create fat line with parameters. The formerly hand-painted edge
+ // roundings will now be done using rounded edges of this fat line
+ const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
+ const drawinglayer::attribute::LineAttribute aLineAttribute(getRGBColor(), fWidth);
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
+ aPolygon,
+ aLineAttribute));
+
+ return drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+}
+
+bool MouseOverEffectPrimitive::operator==( const drawinglayer::primitive2d::BasePrimitive2D& rPrimitive ) const
+{
+ if(drawinglayer::primitive2d::BasePrimitive2D::operator==(rPrimitive))
+ {
+ const MouseOverEffectPrimitive& rCompare = static_cast< const MouseOverEffectPrimitive& >(rPrimitive);
+
+ return (getLogicRange() == rCompare.getLogicRange()
+ && getDiscreteOffset() == rCompare.getDiscreteOffset()
+ && getDiscreteWidth() == rCompare.getDiscreteWidth()
+ && getRGBColor() == rCompare.getRGBColor());
+ }
+
+ return false;
+}
+
+ImplPrimitrive2DIDBlock(MouseOverEffectPrimitive, PRIMITIVE2D_ID_SDMOUSEOVEREFFECTPRIMITIVE)
+
+//////////////////////////////////////////////////////////////////////////////
+
+drawinglayer::primitive2d::Primitive2DSequence PageObjectViewObjectContact::createMouseOverEffectPrimitive2DSequence()
{
- // When the selection frame is painted the mouse over frame is not
- // visible and does not have to be painted.
- if (GetPageDescriptor()->IsSelected())
- if (mpProperties.get()!=NULL && mpProperties->IsShowSelection())
- return;
-
- ULONG nPreviousDrawMode = rDevice.GetDrawMode();
- rDevice.SetDrawMode (DRAWMODE_DEFAULT);
- Rectangle aInner (GetBoundingBox(rDevice,PreviewBoundingBox,PixelCoordinateSystem));
- rDevice.EnableMapMode (FALSE);
-
- Color aSelectionColor (GetColor(rDevice, CS_SELECTION));
- Color aBackgroundColor (GetColor(rDevice, CS_BACKGROUND));
- Color aFrameColor (bVisible ? aSelectionColor : aBackgroundColor);
- Color aCornerColor (aBackgroundColor);
-
- rDevice.SetFillColor ();
- rDevice.SetLineColor (aFrameColor);
-
- // Paint the frame.
- for (int nOffset=mnMouseOverEffectOffset;
- nOffset<mnMouseOverEffectOffset+mnMouseOverEffectThickness;
- nOffset++)
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+
+ if(GetPageDescriptor()->IsSelected() && mpProperties.get() && mpProperties->IsShowSelection())
{
- Rectangle aFrame (aInner);
- aFrame.Left() -= nOffset;
- aFrame.Top() -= nOffset;
- aFrame.Right() += nOffset;
- aFrame.Bottom() += nOffset;
- rDevice.DrawRect (rDevice.PixelToLogic(aFrame));
+ // When the selection frame is visualized the mouse over frame is not
+ // visible and does not have to be created.
+ }
+ else
+ {
+ const PageObjectViewContact& rPaObVOC(static_cast<PageObjectViewContact&>(GetViewContact()));
+ const Rectangle aBoundingBox(rPaObVOC.GetPageObject().GetLastBoundRect());
+ const basegfx::B2DRange aLogicRange(aBoundingBox.Left(), aBoundingBox.Top(), aBoundingBox.Right(), aBoundingBox.Bottom());
+ const basegfx::BColor aSelectionColor(mpProperties->GetSelectionColor().getBColor());
+ const drawinglayer::primitive2d::Primitive2DReference aReference(
+ new MouseOverEffectPrimitive(
+ aLogicRange,
+ mnMouseOverEffectOffset,
+ mnMouseOverEffectThickness,
+ aSelectionColor));
+
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
}
- // Paint the four corner pixels in backround color for a rounded effect.
- int nFrameWidth (mnMouseOverEffectOffset
- + mnMouseOverEffectThickness - 1);
- Rectangle aOuter (aInner);
- aOuter.Left() -= nFrameWidth;
- aOuter.Top() -= nFrameWidth;
- aOuter.Right() += nFrameWidth;
- aOuter.Bottom() += nFrameWidth;
- Point aCorner (aOuter.TopLeft());
-
- rDevice.DrawPixel (aCorner, aCornerColor);
- aCorner = aOuter.TopRight();
- rDevice.DrawPixel (aCorner, aCornerColor);
- aCorner = aOuter.BottomLeft();
- rDevice.DrawPixel (aCorner, aCornerColor);
- aCorner = aOuter.BottomRight();
- rDevice.DrawPixel (aCorner, aCornerColor);
-
- rDevice.EnableMapMode (TRUE);
- rDevice.SetDrawMode(nPreviousDrawMode);
+ return aRetval;
}
@@ -1297,52 +1352,4 @@ model::SharedPageDescriptor
-
-
-Color PageObjectViewObjectContact::GetColor (
- const OutputDevice& rDevice,
- const ColorSpec eSpec,
- const double nOpacity) const
-{
- (void)rDevice;
- if (mbIsBackgroundColorUpdatePending)
- {
- mbIsBackgroundColorUpdatePending = false;
- maBackgroundColor = mpProperties->GetBackgroundColor();
- }
-
- Color aColor;
-
- switch (eSpec)
- {
- case CS_SELECTION:
- aColor = mpProperties->GetSelectionColor();
- break;
-
- case CS_BACKGROUND:
- if (mpProperties.get()!=NULL
- && mpProperties->IsHighlightCurrentSlide()
- && GetPageDescriptor()->IsCurrentPage())
- {
- aColor = mpProperties->GetHighlightColor();
- }
- else
- aColor = maBackgroundColor;
- break;
-
- case CS_WINDOW:
- aColor = maBackgroundColor;
- break;
-
- case CS_TEXT:
- default:
- aColor = mpProperties->GetTextColor();
- break;
- }
- aColor.Merge(maBackgroundColor, BYTE(255*(nOpacity) + 0.5));
- return aColor;
-}
-
-
-
} } } // end of namespace ::sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx
index c1f5c984d3bc..5e338480e236 100644
--- a/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsViewOverlay.cxx
@@ -60,6 +60,9 @@
#include <svx/sdrpagewindow.hxx>
#include <vcl/svapp.hxx>
+#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
+#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
+
using namespace ::sdr::overlay;
namespace {
@@ -170,64 +173,6 @@ OverlayBase::~OverlayBase (void)
-void OverlayBase::Paint (void)
-{
-}
-
-
-
-
-bool OverlayBase::IsShowing (void)
-{
- return isVisible();
-}
-
-
-
-
-void OverlayBase::Toggle (void)
-{
- if (IsShowing())
- Hide();
- else
- Show();
-}
-
-
-
-
-void OverlayBase::Show (void)
-{
- setVisible(true);
-}
-
-
-
-
-void OverlayBase::Hide (void)
-{
- setVisible(false);
-}
-
-
-
-
-ViewOverlay& OverlayBase::GetViewOverlay (void)
-{
- return mrViewOverlay;
-}
-
-
-
-
-void OverlayBase::transform (const basegfx::B2DHomMatrix& rMatrix)
-{
- (void)rMatrix;
-}
-
-
-
-
void OverlayBase::EnsureRegistration (void)
{
if (getOverlayManager() == NULL)
@@ -246,7 +191,6 @@ void OverlayBase::EnsureRegistration (void)
SubstitutionOverlay::SubstitutionOverlay (ViewOverlay& rViewOverlay)
: OverlayBase(rViewOverlay),
maPosition(0,0),
- maBoundingBox(),
maShapes()
{
}
@@ -268,17 +212,20 @@ void SubstitutionOverlay::Create (
EnsureRegistration();
maPosition = rPosition;
- maTranslation = Point(0,0);
maShapes.clear();
while (rSelection.HasMoreElements())
{
const Rectangle aBox (rSelection.GetNextElement()->GetPageObject()->GetCurrentBoundRect());
- maShapes.push_back(aBox);
- maBoundingBox.Union(aBox);
+ basegfx::B2DRectangle aB2DBox(
+ aBox.Left(),
+ aBox.Top(),
+ aBox.Right(),
+ aBox.Bottom());
+ maShapes.append(basegfx::tools::createPolygonFromRect(aB2DBox), 4);
}
- setVisible(maShapes.size() > 0);
+ setVisible(maShapes.count() > 0);
// The selection indicator may have been visible already so call
// objectChange() to enforce an update.
objectChange();
@@ -290,7 +237,6 @@ void SubstitutionOverlay::Create (
void SubstitutionOverlay::Clear (void)
{
maShapes.clear();
- maBoundingBox.SetEmpty();
setVisible(false);
}
@@ -299,9 +245,10 @@ void SubstitutionOverlay::Clear (void)
void SubstitutionOverlay::Move (const Point& rOffset)
{
- maTranslation += rOffset;
- maBoundingBox.Move(rOffset.X(), rOffset.Y());
+ basegfx::B2DHomMatrix aTranslation;
+ aTranslation.translate(rOffset.X(), rOffset.Y());
+ maShapes.transform(aTranslation);
maPosition += rOffset;
objectChange();
@@ -312,70 +259,52 @@ void SubstitutionOverlay::Move (const Point& rOffset)
void SubstitutionOverlay::SetPosition (const Point& rPosition)
{
- Move(rPosition - maPosition);
+ Move(rPosition - GetPosition());
}
-void SubstitutionOverlay::drawGeometry (OutputDevice& rOutputDevice)
+Point SubstitutionOverlay::GetPosition (void) const
{
- if (getOverlayManager() != NULL)
- {
- const sal_uInt32 nSavedStripeLength (getOverlayManager()->getStripeLengthPixel());
-
- for (::std::vector<Rectangle>::const_iterator
- iBox (maShapes.begin()),
- iEnd (maShapes.end());
- iBox!=iEnd;
- ++iBox)
- {
- // Reduce width and height by one pixel to make the box the same
- // size as the frame of the page object.
- Rectangle aScreenBox (rOutputDevice.LogicToPixel(*iBox));
- aScreenBox.Right() -= 1;
- aScreenBox.Bottom() -= 1;
-
- // Add accumulated translation.
- Rectangle aBox (rOutputDevice.PixelToLogic(aScreenBox));
- aBox.Move(maTranslation.X(), maTranslation.Y());
-
- ImpDrawPolygonStriped(rOutputDevice,
- basegfx::tools::createPolygonFromRect(
- basegfx::B2DRange(
- basegfx::B2IRange(aBox.Left(), aBox.Top(), aBox.Right(),aBox.Bottom()))));
- }
-
- getOverlayManager()->setStripeLengthPixel(nSavedStripeLength);
- }
+ return maPosition;
}
-void SubstitutionOverlay::createBaseRange (OutputDevice& rOutputDevice)
+drawinglayer::primitive2d::Primitive2DSequence SubstitutionOverlay::createOverlayObjectPrimitive2DSequence()
{
- (void)rOutputDevice;
-
- maBaseRange = basegfx::B2DRange(
- basegfx::B2IRange(
- maBoundingBox.Left(),
- maBoundingBox.Top(),
- maBoundingBox.Right(),
- maBoundingBox.Bottom()));
-}
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+ const sal_uInt32 nCount(maShapes.count());
+ if(nCount && getOverlayManager())
+ {
+ aRetval.realloc(nCount);
+ const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
+ const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
+ for(sal_uInt32 a(0); a < nCount; a++)
+ {
+ aRetval[a] = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
+ maShapes.getB2DPolygon(a),
+ aRGBColorA,
+ aRGBColorB,
+ gnSubstitutionStripeLength));
+ }
+ }
+ return aRetval;
+}
-Point SubstitutionOverlay::GetPosition (void) const
+void SubstitutionOverlay::stripeDefinitionHasChanged()
{
- return maPosition;
+ // react on OverlayManager's stripe definition change
+ objectChange();
}
-
-
//===== SelectionRectangleOverlay ===========================================
SelectionRectangleOverlay::SelectionRectangleOverlay (ViewOverlay& rViewOverlay)
@@ -418,28 +347,33 @@ void SelectionRectangleOverlay::Update (const Point& rSecondCorner)
-void SelectionRectangleOverlay::drawGeometry (OutputDevice& rOutputDevice)
+drawinglayer::primitive2d::Primitive2DSequence SelectionRectangleOverlay::createOverlayObjectPrimitive2DSequence()
{
- ImpDrawRangeStriped(
- rOutputDevice,
- basegfx::B2DRange(
- maAnchor.X(),
- maAnchor.Y(),
- maSecondCorner.X(),
- maSecondCorner.Y()));
-}
-
+ drawinglayer::primitive2d::Primitive2DSequence aRetval;
+ const basegfx::B2DRange aRange(maAnchor.X(), maAnchor.Y(), maSecondCorner.X(), maSecondCorner.Y());
+ const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
+ if(aPolygon.count())
+ {
+ const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
+ const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
+ const drawinglayer::primitive2d::Primitive2DReference xReference(
+ new drawinglayer::primitive2d::PolygonMarkerPrimitive2D(
+ aPolygon,
+ aRGBColorA,
+ aRGBColorB,
+ gnSubstitutionStripeLength));
+
+ aRetval = drawinglayer::primitive2d::Primitive2DSequence(&xReference, 1);
+ }
+ return aRetval;
+}
-void SelectionRectangleOverlay::createBaseRange (OutputDevice& rOutputDevice)
+void SelectionRectangleOverlay::stripeDefinitionHasChanged()
{
- (void)rOutputDevice;
- maBaseRange = basegfx::B2DRange(
- maAnchor.X(),
- maAnchor.Y(),
- maSecondCorner.X(),
- maSecondCorner.Y());
+ // react on OverlayManager's stripe definition change
+ objectChange();
}
@@ -540,40 +474,23 @@ sal_Int32 InsertionIndicatorOverlay::GetInsertionPageIndex (void) const
-void InsertionIndicatorOverlay::drawGeometry (OutputDevice& rOutputDevice)
+drawinglayer::primitive2d::Primitive2DSequence InsertionIndicatorOverlay::createOverlayObjectPrimitive2DSequence()
{
- const Color aFillColor (rOutputDevice.GetFillColor());
- const Color aLineColor (rOutputDevice.GetLineColor());
-
- if (isVisible())
- {
- const Color aColor (rOutputDevice.GetSettings().GetStyleSettings().GetFontColor());
- rOutputDevice.SetLineColor(aColor);
- rOutputDevice.SetFillColor(aColor);
-
- // Reduce width of indicator by one pixel to be of the same width as
- // the page objects.
- Rectangle aBox (rOutputDevice.LogicToPixel(maBoundingBox));
- aBox.Right() -= 1;
- rOutputDevice.DrawRect(rOutputDevice.PixelToLogic(aBox));
- }
-
- rOutputDevice.SetFillColor(aFillColor);
- rOutputDevice.SetLineColor(aLineColor);
-}
-
+ drawinglayer::primitive2d::Primitive2DSequence aRetval(2);
+ const basegfx::B2DRange aRange(maBoundingBox.Left(), maBoundingBox.Top(), maBoundingBox.Right(), maBoundingBox.Bottom());
+ const basegfx::B2DPolygon aPolygon(basegfx::tools::createPolygonFromRect(aRange));
+ const basegfx::BColor aRGBColor(Application::GetDefaultDevice()->GetSettings().GetStyleSettings().GetFontColor().getBColor());
+ aRetval[0] = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(
+ basegfx::B2DPolyPolygon(aPolygon),
+ aRGBColor));
+ aRetval[1] = drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+ aPolygon,
+ aRGBColor));
-
-void InsertionIndicatorOverlay::createBaseRange (OutputDevice& rOutputDevice)
-{
- (void)rOutputDevice;
- const sal_Int32 nBorder (10);
- maBaseRange = basegfx::B2DRange(
- maBoundingBox.Left()-nBorder,
- maBoundingBox.Top()-nBorder,
- maBoundingBox.Right()-nBorder,
- maBoundingBox.Bottom()-nBorder);
+ return aRetval;
}
@@ -634,34 +551,16 @@ void MouseOverIndicatorOverlay::SetSlideUnderMouse (
-void MouseOverIndicatorOverlay::drawGeometry (OutputDevice& rOutputDevice)
+drawinglayer::primitive2d::Primitive2DSequence MouseOverIndicatorOverlay::createOverlayObjectPrimitive2DSequence()
{
- const Color aFillColor (rOutputDevice.GetFillColor());
- const Color aLineColor (rOutputDevice.GetLineColor());
-
view::PageObjectViewObjectContact* pContact = GetViewObjectContact();
- if (pContact != NULL)
- pContact->PaintMouseOverEffect(rOutputDevice, true);
-
- rOutputDevice.SetFillColor(aFillColor);
- rOutputDevice.SetLineColor(aLineColor);
-}
-
-
-
-void MouseOverIndicatorOverlay::createBaseRange (OutputDevice& rOutputDevice)
-{
- (void)rOutputDevice;
- view::PageObjectViewObjectContact* pContact = GetViewObjectContact();
- if (pContact != NULL)
+ if(pContact)
{
- Rectangle aBox (pContact->GetBoundingBox(
- rOutputDevice,
- view::PageObjectViewObjectContact::MouseOverIndicatorBoundingBox,
- view::PageObjectViewObjectContact::ModelCoordinateSystem));
- maBaseRange = basegfx::B2DRange(aBox.Left(),aBox.Top(),aBox.Right(),aBox.Bottom());
+ return pContact->createMouseOverEffectPrimitive2DSequence();
}
+
+ return drawinglayer::primitive2d::Primitive2DSequence();
}
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index eb3665fa05f2..9a63afc03479 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -793,7 +793,7 @@ sal_Bool View::SdrBeginTextEdit(
Color aBackground;
if( pObj->GetObjInventor() == SdrInventor && pObj->GetObjIdentifier() == OBJ_TABLE )
{
- aBackground = ImpGetTextEditBackgroundColor();
+ aBackground = GetTextEditBackgroundColor(*this);
}
else
{
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index bcf84ec006cf..7f30660c6e4d 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -584,19 +584,8 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
{
static_cast< SdrHdlColor* >( pIAOHandle )->SetSize( SDR_HANDLE_COLOR_SIZE_NORMAL );
}
-
- //OLMconst B2dIAOGroup& rIAOGroup = pIAOHandle->GetIAOGroup();
- //OLMif( rIAOGroup.IsHit( rEvt.maPosPixel ) )
- //OLM{
- //OLM nRet = nDropAction;
- //OLM static_cast< SdrHdlColor* >( pIAOHandle )->SetSize( SDR_HANDLE_COLOR_SIZE_SELECTED );
- //OLM}
- //OLMelse
- //OLM static_cast< SdrHdlColor* >( pIAOHandle )->SetSize( SDR_HANDLE_COLOR_SIZE_NORMAL );
}
}
-
- //OLMRefreshAllIAOManagers();
}
// check object insert
@@ -606,7 +595,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
SdrPageView* pPageView = NULL;
::sd::Window* pWindow = mpViewSh->GetActiveWindow();
Point aPos( pWindow->PixelToLogic( rEvt.maPosPixel ) );
- const BOOL bHasPickObj = PickObj( aPos, pPickObj, pPageView );
+ const BOOL bHasPickObj = PickObj( aPos, getHitTolLog(), pPickObj, pPageView );
BOOL bIsPresTarget = FALSE;
if( bHasPickObj && pPickObj && ( pPickObj->IsEmptyPresObj() || pPickObj->GetUserCall() ) )
@@ -756,20 +745,6 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
nRet = nDropAction;
}
}
-
- //OLMconst B2dIAOGroup& rIAOGroup = pIAOHandle->GetIAOGroup();
- //OLMif( rIAOGroup.IsHit( rEvt.maPosPixel ) )
- //OLM{
- //OLM SotStorageStreamRef xStm;
- //OLM if( aDataHelper.GetSotStorageStream( SOT_FORMATSTR_ID_XFA, xStm ) && xStm.Is() )
- //OLM {
- //OLM XFillExchangeData aFillData( XFillAttrSetItem( &pDoc->GetPool() ) );
- //OLM *xStm >> aFillData;
- //OLM const Color aColor( ( (XFillColorItem&) aFillData.GetXFillAttrSetItem()->GetItemSet().Get( XATTR_FILLCOLOR ) ).GetValue() );
- //OLM static_cast< SdrHdlColor* >( pIAOHandle )->SetColor( aColor, TRUE );
- //OLM nRet = nDropAction;
- //OLM }
- //OLM}
}
}
}
@@ -805,7 +780,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
SdrObject* pPickObj = NULL;
SdrPageView* pPageView = NULL;
- if( PickObj( aPos, pPickObj, pPageView ) )
+ if( PickObj( aPos, getHitTolLog(), pPickObj, pPageView ) )
{
// insert as clip action => jump
rtl::OUString aBookmark( aINetBookmark.GetURL() );
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 04cebfbdd577..184949f4e683 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -94,6 +94,7 @@
#include <comphelper/processfactory.hxx>
#include <tools/stream.hxx>
#include <vcl/cvtgrf.hxx>
+#include <svx/sdrhittesthelper.hxx>
// --------------
// - Namespaces -
@@ -327,7 +328,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
if( bDrag )
{
SdrPageView* pPV = NULL;
- PickObj( rPos, pPickObj, pPV );
+ PickObj( rPos, getHitTolLog(), pPickObj, pPV );
}
if( nPage != SDRPAGE_NOTFOUND )
@@ -721,7 +722,7 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
SdrObject* pObj = pModel->GetSdPage( 0, PK_STANDARD )->GetObj( 0 );
SdrObject* pPickObj2 = NULL;
SdrPageView* pPV = NULL;
- PickObj( rPos, pPickObj2, pPV );
+ PickObj( rPos, getHitTolLog(), pPickObj2, pPV );
if( ( mnAction & DND_ACTION_MOVE ) && pPickObj2 && pObj )
{
@@ -1311,11 +1312,11 @@ BOOL View::InsertData( const TransferableDataHelper& rDataHelper,
aHitPosT.Y() += n2HitLog;
aHitPosB.Y() -= n2HitLog;
- if( bClosed &&
- pPickObj->IsHit( aHitPosR, nHitLog, pVisiLayer ) &&
- pPickObj->IsHit( aHitPosL, nHitLog, pVisiLayer ) &&
- pPickObj->IsHit( aHitPosT, nHitLog, pVisiLayer ) &&
- pPickObj->IsHit( aHitPosB, nHitLog, pVisiLayer ) )
+ if( bClosed &&
+ SdrObjectPrimitiveHit(*pPickObj, aHitPosR, nHitLog, *GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pPickObj, aHitPosL, nHitLog, *GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pPickObj, aHitPosT, nHitLog, *GetSdrPageView(), pVisiLayer, false) &&
+ SdrObjectPrimitiveHit(*pPickObj, aHitPosB, nHitLog, *GetSdrPageView(), pVisiLayer, false) )
{
// area fill
if(eFill == XFILL_SOLID )
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 1e6842408e67..72534b476a73 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -115,7 +115,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if( !pPickObj && pPV )
{
SdrPageView* pPageView = pPV;
- PickObj(rPos, pPickObj, pPageView);
+ PickObj(rPos, getHitTolLog(), pPickObj, pPageView);
}
if( mnAction == DND_ACTION_LINK && pPickObj && pPV )
@@ -312,7 +312,7 @@ SdrMediaObj* View::InsertMediaURL( const rtl::OUString& rMediaURL, sal_Int8& rAc
if( !pPickObj && pPV )
{
SdrPageView* pPageView = pPV;
- PickObj(rPos, pPickObj, pPageView);
+ PickObj(rPos, getHitTolLog(), pPickObj, pPageView);
}
if( mnAction == DND_ACTION_LINK && pPickObj && pPV && pPickObj->ISA( SdrMediaObj ) )