Author: alg
Date: Thu Sep 12 12:17:45 2013
New Revision: 1522546

URL: http://svn.apache.org/r1522546
Log:
in-between work commit

Modified:
    
openoffice/branches/alg/aw080/main/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
    openoffice/branches/alg/aw080/main/sc/source/ui/inc/drawview.hxx
    openoffice/branches/alg/aw080/main/sc/source/ui/view/drawview.cxx
    openoffice/branches/alg/aw080/main/sd/source/ui/func/fusel.cxx
    openoffice/branches/alg/aw080/main/sd/source/ui/inc/View.hxx
    openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx
    openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx
    
openoffice/branches/alg/aw080/main/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx
    openoffice/branches/alg/aw080/main/svx/inc/svx/svdhdl.hxx
    openoffice/branches/alg/aw080/main/svx/inc/svx/svdmrkv.hxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrselection.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svddrgv.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedtv.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedxv.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdhdl.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv1.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx
    openoffice/branches/alg/aw080/main/svx/source/svdraw/svdview.cxx
    openoffice/branches/alg/aw080/main/sw/source/core/draw/dview.cxx
    openoffice/branches/alg/aw080/main/sw/source/core/inc/dview.hxx

Modified: 
openoffice/branches/alg/aw080/main/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- 
openoffice/branches/alg/aw080/main/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
 (original)
+++ 
openoffice/branches/alg/aw080/main/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
 Thu Sep 12 12:17:45 2013
@@ -222,7 +222,12 @@ SdrPageView* DrawViewWrapper::GetPageVie
 //virtual
 void DrawViewWrapper::SetMarkHandles()
 {
-    if( m_pMarkHandleProvider && m_pMarkHandleProvider->getMarkHandles( 
maViewHandleList ) )
+    // hack for chart: It creates ominous own handles, and that by directly 
manipulating
+    // the normally not accessible maViewHandleList. For now, allow access to 
it by casting
+    // it to non-const
+    const SdrHdlList& rHdlList = GetHdlList();
+
+    if( m_pMarkHandleProvider && m_pMarkHandleProvider->getMarkHandles( 
const_cast< SdrHdlList& >(rHdlList) ) )
         return;
     else
         SdrView::SetMarkHandles();

Modified: openoffice/branches/alg/aw080/main/sc/source/ui/inc/drawview.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/ui/inc/drawview.hxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/ui/inc/drawview.hxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/ui/inc/drawview.hxx Thu Sep 12 
12:17:45 2013
@@ -54,7 +54,7 @@ protected:
        virtual void    LazyReactOnObjectChanges();
 
        // add custom handles (used by other apps, e.g. AnchorPos)
-    virtual void AddCustomHdl();
+    virtual void AddCustomHdl(SdrHdlList& rTarget);
 
        void ImplClearCalcDropMarker();
 

Modified: openoffice/branches/alg/aw080/main/sc/source/ui/view/drawview.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sc/source/ui/view/drawview.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sc/source/ui/view/drawview.cxx (original)
+++ openoffice/branches/alg/aw080/main/sc/source/ui/view/drawview.cxx Thu Sep 
12 12:17:45 2013
@@ -152,7 +152,7 @@ __EXPORT ScDrawView::~ScDrawView()
        ImplClearCalcDropMarker();
 }
 
-void ScDrawView::AddCustomHdl()
+void ScDrawView::AddCustomHdl(SdrHdlList& rTarget)
 {
        sal_Bool bNegativePage = pDoc->IsNegativePage( nTab );
        const SdrObjectVector 
aSelection(getSelectedSdrObjectVectorFromSdrMarkView());
@@ -193,7 +193,7 @@ void ScDrawView::AddCustomHdl()
 
                        ScTabView* pView = pViewData->GetView();
                        ScAddress aScAddress(nCol, nRow, nTab);
-                       pView->CreateAnchorHandles(maViewHandleList, 
aScAddress);
+                       pView->CreateAnchorHandles(rTarget, aScAddress);
                }
        }
 }

Modified: openoffice/branches/alg/aw080/main/sd/source/ui/func/fusel.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/func/fusel.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/func/fusel.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/func/fusel.cxx Thu Sep 12 
12:17:45 2013
@@ -403,6 +403,12 @@ bool FuSelection::MouseButtonDown(const 
                         }
                     }
 
+                    // refresh mbMoveAllowedOnSelection when selection has 
changed
+                    if(mpView->isSelectionChangePending())
+                    {
+                        mpView->forceSelectionChange();
+                    }
+
                     if( !bDeactivateOLE )
                     {
                         if ( !bReadOnly &&
@@ -495,8 +501,13 @@ bool FuSelection::MouseButtonDown(const 
             {
                 if (!rMEvt.IsShift())
                 {
-                    mpView->MarkPoints(0, true); // unmarkall
-                                       mpView->forceSelectionChange();
+                    // unmarkall
+                    mpView->MarkPoints(0, true); 
+
+                    // update all SdrHdl before getting one
+                    mpView->forceSelectionChange();
+
+                    // get one
                     pHdl = mpView->PickHandle(aMDPos);
                 }
                 else
@@ -520,14 +531,12 @@ bool FuSelection::MouseButtonDown(const 
 
                     if ( ! rMEvt.IsRight())
                                        {
-                                               // here HAVE to check for 
pending selection change; if this
-                                               // is the case, pHdl WILL be 
deleted on the next execution of this
-                                               // pending change and a new one 
will be created. Need to force
-                                               // that change to get the new 
created pHdl to not continue
-                                               // processing on the dying one
-                                               
if(mpView->isSelectionChangePending()) // TTTT: Check again: Is this needed?
+                                               
if(mpView->isSelectionChangePending())
                                                {
+                            // trigger evtl. outstanding selection change
+                            // to get a valid SdrHdl with the next call
                                                        
mpView->forceSelectionChange();
+
                                                        pHdl = 
mpView->PickHandle(aMDPos);
                                                }
 
@@ -697,12 +706,9 @@ bool FuSelection::MouseButtonUp(const Mo
        if( !mpView )
                return false;
 
-    if(mpView->isSelectionChangePending())
-    {
-        // force trigger selection change to get bSelectionChanged
-        // set in FuSelection::SelectionHasChanged() call eventually
-        mpView->forceSelectionChange();
-    }
+    // force trigger selection change to get bSelectionChanged
+    // set in FuSelection::SelectionHasChanged() call eventually
+    mpView->forceSelectionChange();
 
        const double 
fHitLog(basegfx::B2DVector(mpWindow->GetInverseViewTransformation() * 
basegfx::B2DVector(HITPIX, 0.0)).getLength());
        const double 
fDrgLog(basegfx::B2DVector(mpWindow->GetInverseViewTransformation() * 
basegfx::B2DVector(DRGPIX, 0.0)).getLength());

Modified: openoffice/branches/alg/aw080/main/sd/source/ui/inc/View.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/inc/View.hxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/inc/View.hxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/inc/View.hxx Thu Sep 12 
12:17:45 2013
@@ -167,7 +167,7 @@ public:
        /** returns true if we have an undo manager and there is an open list 
undo action */
        bool isRecordingUndo() const;
 
-       virtual void AddCustomHdl();
+       virtual void AddCustomHdl(SdrHdlList& rTarget);
 
        SmartTagSet& getSmartTags() { return maSmartTags; }
        void selectSmartTag( const SmartTagReference& xTag );

Modified: openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview.cxx Thu Sep 12 
12:17:45 2013
@@ -1199,9 +1199,9 @@ bool View::isRecordingUndo() const
        }
 }
 
-void View::AddCustomHdl()
+void View::AddCustomHdl(SdrHdlList& rTarget)
 {
-       maSmartTags.addCustomHandles(maViewHandleList);
+       maSmartTags.addCustomHandles(rTarget);
 }
 
 SdrViewContext View::GetContext() const

Modified: openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx (original)
+++ openoffice/branches/alg/aw080/main/sd/source/ui/view/sdview3.cxx Thu Sep 12 
12:17:45 2013
@@ -610,13 +610,22 @@ bool View::InsertData( const Transferabl
                                                        }
                                                }
                                        }
-                                       else
-                                       {
-                                               pOwnData->SetInternalMove( true 
);
-                                               MoveMarkedObj(maDropPos - 
pOwnData->GetStartPos(), bCopy );
-                                               bReturn = true;
-                                       }
-                               }
+                    else
+                    {
+                        const basegfx::B2DVector aDelta(maDropPos - 
pOwnData->GetStartPos());
+                        const double fMoveLength(aDelta.getLength());
+
+                        pOwnData->SetInternalMove( true );
+
+                        // only move when the minimum move distance is 
travelled
+                        if(fMoveLength > getMinMovLog())
+                        {
+                            MoveMarkedObj(maDropPos - pOwnData->GetStartPos(), 
bCopy );
+                        }
+
+                        bReturn = true;
+                    }
+                }
                        }
                        else
                        {

Modified: 
openoffice/branches/alg/aw080/main/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- 
openoffice/branches/alg/aw080/main/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx
 (original)
+++ 
openoffice/branches/alg/aw080/main/svx/inc/svx/sdr/overlay/overlayobjectlist.hxx
 Thu Sep 12 12:17:45 2013
@@ -59,6 +59,7 @@ namespace sdr
                        void remove(OverlayObject& rOverlayObject);
 
                        // access to objects
+            bool isEmpty() const { return maVector.empty(); }
                        sal_uInt32 count() const { return maVector.size(); }
                        OverlayObject& getOverlayObject(sal_uInt32 nIndex) 
const { return *(maVector[nIndex]); }
 

Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/svdhdl.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdhdl.hxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdhdl.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdhdl.hxx Thu Sep 12 
12:17:45 2013
@@ -43,9 +43,11 @@
 class SdrHdlList;
 class SdrMarkView;
 class SdrObject;
-//class SdrPageView;
 class MouseEvent;
 
+#define SDR_HANDLE_COLOR_SIZE_NORMAL            Size(13, 13)
+#define SDR_HANDLE_COLOR_SIZE_SELECTED          Size(17, 17)
+
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 // Jedes Objekt muss in der Lage seine Handles zu erzeugen. Diese werden dann
 // bei einer Selektion abgeholt, bei der View angemeldet und sichtbar gemacht.
@@ -271,7 +273,7 @@ public:
 
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
-class SVX_DLLPUBLIC SdrHdlList : private boost::noncopyable, public Timer
+class SVX_DLLPUBLIC SdrHdlList : private boost::noncopyable
 {
 private:
     typedef ::std::vector< SdrHdl* > SdrHdlContainerType;
@@ -280,12 +282,6 @@ private:
        SVX_DLLPRIVATE bool operator==(const SdrHdlList&);
        SVX_DLLPRIVATE bool operator!=(const SdrHdlList&);
 
-       // derived from Timer; starts timer to call a delayed Timeout
-       // which then calls CreateB2dIAObject for each handle. Only to be 
called 
-       // from SdrHdl itself
-       virtual void Timeout();
-       void SdrHdlVisualisationChanged();
-
 protected:
        sal_uInt32                              mnFocusIndex;
        SdrMarkView&                    mrView;
@@ -303,6 +299,7 @@ public:
        ~SdrHdlList();
        
        void Clear();
+    void CreateVisualizations();
 
        // #97016# II
        void TravelFocusHdl(bool bForward);
@@ -344,9 +341,6 @@ public:
 
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
-#define        SDR_HANDLE_COLOR_SIZE_NORMAL                    Size(13, 13)
-#define        SDR_HANDLE_COLOR_SIZE_SELECTED                  Size(17, 17)
-
 class SVX_DLLPUBLIC SdrHdlColor : public SdrHdl
 {
 private:

Modified: openoffice/branches/alg/aw080/main/svx/inc/svx/svdmrkv.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/inc/svx/svdmrkv.hxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/inc/svx/svdmrkv.hxx (original)
+++ openoffice/branches/alg/aw080/main/svx/inc/svx/svdmrkv.hxx Thu Sep 12 
12:17:45 2013
@@ -113,9 +113,12 @@ protected:
     basegfx::B2DPoint                  maRef2;            // Persistent
     basegfx::B2DPoint                  maLastCrookCenter; // Persistent
     
+private:
+    // make private; access should be limited since it is dependent of 
selection and thus from
+    // the selection to be up-to-date. Before using a call to 
isSelectionChangePending() and 
+    // evtl. to forceSelectionChange() may be done which will potentially 
recreate all SdrHdl objects
        SdrHdlList                                      maViewHandleList;
 
-private:
        // new selection abstraction. Private to guarantee isolation
        sdr::selection::Selection       maSelection;
 
@@ -137,7 +140,7 @@ protected:
        virtual bool MouseMove(const MouseEvent& rMEvt, Window* pWin);
 
        // add custom handles (used by other apps, e.g. AnchorPos)
-    virtual void AddCustomHdl();
+    virtual void AddCustomHdl(SdrHdlList& rTarget);
     void ForceRefToMarked();
 
     virtual SdrObject* CheckSingleSdrObjectHit(const basegfx::B2DPoint& rPnt, 
double fTol, SdrObject* pObj, sal_uInt32 nOptions, const SetOfByte* pMVisLay) 
const;
@@ -209,31 +212,24 @@ public:
     
////////////////////////////////////////////////////////////////////////////////////////////////////
        // new interface to selection, a direct wrapper to 
sdr::selection::Selection
 
+    // validity of selection check and force
+       bool isSelectionChangePending() const { return 
maSelection.isSelectionChangePending(); }
+       void forceSelectionChange() { maSelection.forceSelectionChange(); }
+
        // selection const accesses
        SdrObjectVector getSelectedSdrObjectVectorFromSdrMarkView() const { 
return maSelection.getVector(); }
        SdrObject* getSelectedIfSingle() const { return 
maSelection.getSingle(); }
        bool areSdrObjectsSelected() const { return !maSelection.empty(); }
     sal_uInt32 getSelectedSdrObjectCount() const { return maSelection.size(); }
        bool isSdrObjectSelected(const SdrObject& rObject) const { return 
maSelection.isSdrObject(rObject); }
-
-       // selection const accesses: possibility to ask for pending 
SelectionChange and to force it
-       bool isSelectionChangePending() const { return 
maSelection.isSelectionChangePending(); }
-       void forceSelectionChange() { maSelection.forceSelectionChange(); }
-
-       // selection const accesses: point selection
        sdr::selection::Indices getSelectedPointsForSelectedSdrObject(const 
SdrObject& rObject) const { return maSelection.getIndicesForSdrObject(rObject, 
true); }
        String getSelectedPointsDescription() const { return 
maSelection.getIndexDescription(true); }
        bool arePointsSelected() const { return maSelection.hasIndices(true); }
-
-       // selection const accesses: gluepoint selection
        sdr::selection::Indices getSelectedGluesForSelectedSdrObject(const 
SdrObject& rObject) const { return maSelection.getIndicesForSdrObject(rObject, 
false); }
        String getSelectedGluesDescription() const { return 
maSelection.getIndexDescription(false); }
        bool areGluesSelected() const { return maSelection.hasIndices(false); }
 
-       // selection changers. These will trigger a delayedSelectionChanged() 
which will
-       // on forceSelectionChange() or timer event trigger 
handleSelectionChange(). This will
-       // recreate e.g. the SdrHdl. This means that ALL code which works with 
SdrHdl and selection
-       // has to take care of working woith valid SdrHdl when changing the 
selection (!)
+       // selection changers. These will trigger a delayedSelectionChanged()
        void removeSdrObjectFromSelection(const SdrObject& rObject) { 
maSelection.removeSdrObject(rObject); }
        void addSdrObjectToSelection(const SdrObject& rObject) { 
maSelection.addSdrObject(rObject); }
        void setSdrObjectSelection(const SdrObjectVector& rSdrObjectVector) { 
maSelection.setSdrObjects(rSdrObjectVector); }
@@ -307,7 +303,7 @@ public:
     // Dazu muessen die Handles ggf. verkleinert dargestellt werden. Mit der
     // MinMarkHdlSize kann man hierfuer eine Mindestgroesse angeben.
     // Defaultwert ist 3, Mindestwert 3 Pixel.
-    bool IsSolidMarkHdl() const { return maViewHandleList.IsFineHdl(); }
+    bool IsSolidMarkHdl() const;
     void SetSolidMarkHdl(bool bOn);
 
     virtual bool HasMarkablePoints() const;
@@ -341,9 +337,9 @@ public:
     
        // Die Nummer des passenden Handles raussuchen. Nicht gefunden
     // liefert CONTAINER_ENTRY_NOTFOUND.
-    sal_uInt32 GetHdlNum(SdrHdl* pHdl) const { return 
maViewHandleList.GetHdlNum(pHdl); }
-    SdrHdl* GetHdlByIndex(sal_uInt32 nHdlNum)  const { if(nHdlNum < 
maViewHandleList.GetHdlCount()) return maViewHandleList.GetHdlByIndex(nHdlNum); 
return 0; }
-    const SdrHdlList& GetHdlList() const { return maViewHandleList; }
+    sal_uInt32 GetHdlNum(SdrHdl* pHdl) const;
+    SdrHdl* GetHdlByIndex(sal_uInt32 nHdlNum) const;
+    const SdrHdlList& GetHdlList() const;
 
     // Selektionsrahmen fuer Punktmarkierung aufziehen.
     // Wird nur gestartet, wenn HasMarkablePoints() true liefert.

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrselection.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrselection.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrselection.cxx 
(original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/sdrselection.cxx Thu 
Sep 12 12:17:45 2013
@@ -159,8 +159,11 @@ namespace sdr
                void Selection::delayedSelectionChanged()
                {
                        // trigger a delayed selection change
-                       SetTimeout(1);
-                       Start();
+                       if(!IsActive())
+                       {
+                SetTimeout(1);
+                Start();
+            }
                }
 
                bool Selection::isSelectionChangePending() const
@@ -528,7 +531,7 @@ namespace sdr
 
                sdr::selection::Indices Selection::getIndicesForSdrObject(const 
SdrObject& rObject, bool bPoints) const 
                {
-                       const IndicesMap& rIndices = bPoints ? maPointIndices : 
maGlueIndices;
+            const IndicesMap& rIndices = bPoints ? maPointIndices : 
maGlueIndices;
 
                        if(!rIndices.empty())
                        {
@@ -638,7 +641,7 @@ namespace sdr
 
                bool Selection::hasIndices(bool bPoints) const
                {
-                       const IndicesMap& rIndices = bPoints ? maPointIndices : 
maGlueIndices;
+            const IndicesMap& rIndices = bPoints ? maPointIndices : 
maGlueIndices;
 
                        return !rIndices.empty();
                }

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svddrgv.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svddrgv.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svddrgv.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svddrgv.cxx Thu Sep 12 
12:17:45 2013
@@ -767,9 +767,9 @@ bool SdrDragView::ImpBegInsObjPoint(bool
                {
                        mbInsPolyPoint = true;
                        MarkPoints(0, true); // unmarkall
-                       SetMarkHandles();
+                       // SetMarkHandles(); TTTT should be triggered by 
GetHdlList() below
 
-                       bRetval = BegDragObj(rPnt, 
maViewHandleList.GetHdlByIndex(mnInsPointNum), 0.0);
+                       bRetval = BegDragObj(rPnt, 
GetHdlList().GetHdlByIndex(mnInsPointNum), 0.0);
 
                        if (bRetval) 
                        {

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedtv.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedtv.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedtv.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedtv.cxx Thu Sep 12 
12:17:45 2013
@@ -879,9 +879,6 @@ void SdrEditView::CheckPossibilities()
 
 void SdrEditView::ForcePossibilities() const 
 { 
-       // trigger evtl. delayed selection changes
-       const_cast< SdrEditView* >(this)->forceSelectionChange();
-
        if(mbPossibilitiesDirty)
        {
                const_cast< SdrEditView* >(this)->CheckPossibilities(); 

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedxv.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedxv.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedxv.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdedxv.cxx Thu Sep 12 
12:17:45 2013
@@ -547,7 +547,7 @@ OutlinerView* SdrObjEditView::ImpMakeOut
 
     if(bTextFrame) 
        {
-        sal_uInt16 nPixSiz = maViewHandleList.GetHdlSize() * 2 + 1;
+        sal_uInt16 nPixSiz = GetHdlList().GetHdlSize() * 2 + 1;
         nStat|=EV_CNTRL_INVONEMORE;
         pOutlView->SetInvalidateMore(nPixSiz);
     }
@@ -808,8 +808,8 @@ bool SdrObjEditView::SdrBeginTextEdit(
             maMinTextEditArea.transform(aTextEditOffsetTransform);
 
                        mpTextEditCursorMerker = pWin->GetCursor();
-               maViewHandleList.SetMoveOutside(true);
-                       SetMarkHandles();
+               SetMoveOutside(true);
+                       // SetMarkHandles(); TTTT: Should be triggered by 
SetMoveOutside directly
 
             mpTextEditOutlinerView = ImpMakeOutlinerView(pWin, !bEmpty, 
pGivenOutlinerView);
 
@@ -829,8 +829,8 @@ bool SdrObjEditView::SdrBeginTextEdit(
                                
GetTextEditOutliner()->InsertView(GetTextEditOutlinerView(), 0);
                        }
 
-               maViewHandleList.SetMoveOutside(false);
-               maViewHandleList.SetMoveOutside(true);
+               SetMoveOutside(false);
+               SetMoveOutside(true);
 
             // alle Wins als OutlinerView beim Outliner anmelden
             if(!bOnlyOneView) 
@@ -959,7 +959,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
     mpTextEditOutlinerView = 0;
     mxTextEditObj.reset(0);
     mpTextEditWin = 0;
-    maViewHandleList.SetMoveOutside(false);
+    SetMoveOutside(false);
 
        return false;
 }
@@ -1208,7 +1208,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEn
             pTEWin->SetCursor(pTECursorMerker);
                }
         
-               maViewHandleList.SetMoveOutside(false);
+               SetMoveOutside(false);
         
 #ifdef DBG_UTIL
         if(GetItemBrowser()) 

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdhdl.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdhdl.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdhdl.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdhdl.cxx Thu Sep 12 
12:17:45 2013
@@ -312,10 +312,6 @@ SdrHdl::SdrHdl(
 {
        // add to owning list
        mrHdlList.maList.push_back(this);
-
-       // make sure graphical representation gets created. Cannot call
-       // CreateB2dIAObject() here since it's a virtual function
-       mrHdlList.SdrHdlVisualisationChanged();
 }
 
 SdrHdl::~SdrHdl()
@@ -377,8 +373,14 @@ void SdrHdl::SetSelected(bool bJa) 
 
 void SdrHdl::Touch()
 {
-       // force update of graphic representation
-       CreateB2dIAObject();
+    // force update of graphic representation, but only when not empty. When
+    // it is empty, the finishing call to CreateVisualizations() is not yet 
+    // done but can be expected. If not empty, attributes are changed outside
+    // handle creation (SdrMarkView::SetMarkHandles()), e.g. blinking or 
MouseOver
+    if(!getOverlayObjectList().isEmpty())
+    {
+        CreateB2dIAObject();
+    }
 }
 
 void SdrHdl::GetRidOfIAObject()
@@ -1084,23 +1086,8 @@ extern "C" int __LOADONCALLAPI ImplSortH
 
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
-void SdrHdlList::Timeout()
-{
-       for(sal_uInt32 a(0); a < maList.size(); a++)
-    {
-               maList[a]->CreateB2dIAObject();
-       }
-}
-
-void SdrHdlList::SdrHdlVisualisationChanged()
-{
-       SetTimeout(1);
-       Start();
-}
-
 SdrHdlList::SdrHdlList(SdrMarkView& rV)
 :      boost::noncopyable(),
-       Timer(),
        mnFocusIndex(CONTAINER_ENTRY_NOTFOUND), 
        mrView(rV),
        maList(),
@@ -1117,6 +1104,14 @@ SdrHdlList::~SdrHdlList() 
        Clear(); 
 }
        
+void SdrHdlList::CreateVisualizations()
+{
+    for(sal_uInt32 a(0); a < maList.size(); a++)
+    {
+        maList[a]->CreateB2dIAObject();
+    }
+}
+
 SdrHdl* SdrHdlList::GetHdlByIndex(sal_uInt32 nNum) const 
 {
        if(nNum < maList.size()) 

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv.cxx Thu Sep 12 
12:17:45 2013
@@ -400,6 +400,30 @@ void SdrMarkView::BrkMarkObj()
 
 
////////////////////////////////////////////////////////////////////////////////////////////////////
 
+sal_uInt32 SdrMarkView::GetHdlNum(SdrHdl* pHdl) const 
+{
+    return GetHdlList().GetHdlNum(pHdl); 
+}
+
+SdrHdl* SdrMarkView::GetHdlByIndex(sal_uInt32 nHdlNum)  const 
+{ 
+    const SdrHdlList& rHdlList = GetHdlList();
+
+    if(nHdlNum < rHdlList.GetHdlCount()) 
+    {
+        return rHdlList.GetHdlByIndex(nHdlNum); 
+    }
+
+    return 0; 
+}
+
+const SdrHdlList& SdrMarkView::GetHdlList() const 
+{
+    return maViewHandleList; 
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
 bool SdrMarkView::BegMarkPoints(const basegfx::B2DPoint& rPnt, bool bUnmark)
 {
        if(HasMarkablePoints()) 
@@ -873,7 +897,7 @@ void SdrMarkView::SetMarkHandles()
        AddDragModeHdl(GetDragMode());
 
        // add custom handles (used by other apps, e.g. AnchorPos)
-       AddCustomHdl();
+       AddCustomHdl(maViewHandleList);
 
        // sort handles
        maViewHandleList.Sort();
@@ -896,9 +920,12 @@ void SdrMarkView::SetMarkHandles()
                        }
                }
        }
+
+    // create overlay objects
+    maViewHandleList.CreateVisualizations();
 }
 
-void SdrMarkView::AddCustomHdl()
+void SdrMarkView::AddCustomHdl(SdrHdlList& /*rTarget*/)
 {
        // add custom handles (used by other apps, e.g. AnchorPos)
 }
@@ -1039,7 +1066,9 @@ void SdrMarkView::AddDragModeHdl(SdrDrag
 
 bool SdrMarkView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
 {
-       if(maViewHandleList.GetHdlCount())
+    const SdrHdlList& rHdlList = GetHdlList();
+
+       if(rHdlList.GetHdlCount())
        {
                SdrHdl* pMouseOverHdl(0);
                
@@ -1052,7 +1081,7 @@ bool SdrMarkView::MouseMove(const MouseE
                }
 
                // notify last mouse over handle that he lost the mouse
-               const sal_uInt32 nHdlCount(maViewHandleList.GetHdlCount());
+               const sal_uInt32 nHdlCount(rHdlList.GetHdlCount());
 
                for(sal_uInt32 nHdl(0); nHdl < nHdlCount; nHdl++)
                {
@@ -1208,7 +1237,7 @@ void SdrMarkView::SetRef1(const basegfx:
        if(SDRDRAG_ROTATE == GetDragMode() || SDRDRAG_MIRROR == GetDragMode())
        {
                maRef1 = rPt;
-               SdrHdl* pH = maViewHandleList.GetHdlByKind(HDL_REF1);
+               SdrHdl* pH = GetHdlList().GetHdlByKind(HDL_REF1);
 
                if(pH)
                {
@@ -1222,7 +1251,7 @@ void SdrMarkView::SetRef2(const basegfx:
        if(SDRDRAG_MIRROR == GetDragMode())
        {
                maRef2 = rPt;
-               SdrHdl* pH = maViewHandleList.GetHdlByKind(HDL_REF2);
+               SdrHdl* pH = GetHdlList().GetHdlByKind(HDL_REF2);
 
                if(pH)
         {
@@ -1314,7 +1343,7 @@ bool SdrMarkView::IsMarkedObjHit(const b
 
 SdrHdl* SdrMarkView::PickHandle(const basegfx::B2DPoint& rPnt) const
 {
-       return maViewHandleList.IsHdlListHit(rPnt);
+    return GetHdlList().IsHdlListHit(rPnt);
 }
 
 bool SdrMarkView::MarkObj(const basegfx::B2DPoint& rPnt, double fTol, bool 
bToggle, bool bDeep)
@@ -1602,11 +1631,17 @@ sal_uInt16 SdrMarkView::GetMarkHdlSizePi
        return maViewHandleList.GetHdlSize()*2+1;
 }
 
+bool SdrMarkView::IsSolidMarkHdl() const 
+{ 
+    return maViewHandleList.IsFineHdl(); 
+}
+
 void SdrMarkView::SetSolidMarkHdl(bool bOn)
 {
        if(bOn != maViewHandleList.IsFineHdl()) 
        {
                maViewHandleList.SetFineHdl(bOn);
+        SetMarkHandles();
        }
 }
 
@@ -1617,6 +1652,7 @@ void SdrMarkView::SetMarkHdlSizePixel(sa
        if (nSiz!=maViewHandleList.GetHdlSize()) 
     {
                maViewHandleList.SetHdlSize(nSiz);
+        SetMarkHandles();
        }
 }
 
@@ -2146,6 +2182,7 @@ void SdrMarkView::handleSelectionChange(
 void SdrMarkView::SetMoveOutside(bool bOn)
 {
        maViewHandleList.SetMoveOutside(bOn);
+    SetMarkHandles();
 }
 
 bool SdrMarkView::IsMoveOutside() const                     

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv1.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv1.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv1.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdmrkv1.cxx Thu Sep 
12 12:17:45 2013
@@ -158,7 +158,7 @@ bool SdrMarkView::ImpMarkPoint(SdrHdl* p
        }
 
        setSelectedPointsForSelectedSdrObject(*pObj, aMarkedPoints);
-       pHdl->SetSelected(!bUnmark);
+       // pHdl->SetSelected(!bUnmark); TTTT: not needed, 
setSelectedPointsForSelectedSdrObject already triggers selection change and 
starts recreation
 
        return true;
 }
@@ -175,7 +175,7 @@ bool SdrMarkView::MarkPoint(SdrHdl& rHdl
 
        if(IsPointMarkable(rHdl) && rHdl.IsSelected() == bUnmark) 
     {
-       const SdrObject* pObj=rHdl.GetObj();
+        const SdrObject* pObj = rHdl.GetObj();
 
                if(isSdrObjectSelected(*pObj))
                {
@@ -192,14 +192,15 @@ bool SdrMarkView::MarkPoint(SdrHdl& rHdl
 void SdrMarkView::MarkPoints(const basegfx::B2DRange* pRange, bool bUnmark)
 {
        const SdrObject* pObj0 = 0;
+    const SdrHdlList& rHdlList = GetHdlList();
+       const sal_uInt32 nHdlAnz(rHdlList.GetHdlCount());
 
        maViewHandleList.Sort();
-       const sal_uInt32 nHdlAnz(maViewHandleList.GetHdlCount());
 
        for(sal_uInt32 nHdlNum(nHdlAnz); nHdlNum > 0;) 
     {
                nHdlNum--;
-               SdrHdl* pHdl = maViewHandleList.GetHdlByIndex(nHdlNum);
+               SdrHdl* pHdl = rHdlList.GetHdlByIndex(nHdlNum);
 
                if(IsPointMarkable(*pHdl) && pHdl->IsSelected() == bUnmark) 
         {
@@ -234,11 +235,12 @@ void SdrMarkView::impCreatePointRanges()
 {
        basegfx::B2DRange aNewMarkedPointRange;
        basegfx::B2DRange aNewMarkedGluePointRange;
-       const sal_uInt32 nCount(maViewHandleList.GetHdlCount());
+    const SdrHdlList& rHdlList = GetHdlList();
+       const sal_uInt32 nCount(rHdlList.GetHdlCount());
 
        for(sal_uInt32 a(0); a < nCount; a++) 
-                               {
-               const SdrHdl* pHdl = maViewHandleList.GetHdlByIndex(a);
+    {
+               const SdrHdl* pHdl = rHdlList.GetHdlByIndex(a);
                const SdrHdlKind eKind(pHdl->GetKind());
 
                if(HDL_POLY == eKind && pHdl->IsSelected())
@@ -515,11 +517,12 @@ bool SdrMarkView::UnmarkGluePoint(const 
 
 SdrHdl* SdrMarkView::GetGluePointHdl(const SdrObject* pObj, sal_uInt32 nId) 
const
 {
-       const sal_uInt32 nHdlAnz(maViewHandleList.GetHdlCount());
+    const SdrHdlList& rHdlList = GetHdlList();
+       const sal_uInt32 nHdlAnz(rHdlList.GetHdlCount());
 
        for(sal_uInt32 nHdlNum(0); nHdlNum < nHdlAnz; nHdlNum++) 
     {
-               SdrHdl* pHdl = maViewHandleList.GetHdlByIndex(nHdlNum);
+               SdrHdl* pHdl = rHdlList.GetHdlByIndex(nHdlNum);
 
                if (pHdl->GetObj()==pObj &&
                        HDL_GLUE == pHdl->GetKind() &&

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdopath.cxx Thu Sep 
12 12:17:45 2013
@@ -402,9 +402,8 @@ public:
        bool IsCreating() const { return mbCreating; }
 
        // get the polygon
-       basegfx::B2DPolyPolygon TakeObjectPolyPolygon(const SdrDragStat& rDrag) 
const;
+       basegfx::B2DPolyPolygon TakeObjectPolyPolygon(const SdrDragStat& rDrag, 
bool bAdaptToSdrPathObjType) const;
        basegfx::B2DPolyPolygon TakeDragPolyPolygon(const SdrDragStat& rDrag) 
const;
-       basegfx::B2DPolyPolygon getModifiedPolyPolygon() const { return  
aPathPolygon.getB2DPolyPolygon(); }
 };
 
 ImpPathForDragAndCreate::ImpPathForDragAndCreate(const SdrPathObj& 
rSdrPathObject, SdrPathObjType ePathType, bool bFreehandMode)
@@ -1208,6 +1207,13 @@ bool ImpPathForDragAndCreate::BegCreate(
 bool ImpPathForDragAndCreate::MovCreate(SdrDragStat& rDrag)
 {
        ImpPathCreateUser* pU=(ImpPathCreateUser*)rDrag.GetUser();
+
+    if(!pU)
+    {
+        OSL_ENSURE(false, "MovCreate but no ImpPathCreateUser instance in pU, 
probably BegCreate call missing (!)");
+        return false;
+    }
+
        SdrView& rView = rDrag.GetSdrViewFromSdrDragStat();
        XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
        sal_uInt16 nActPoint=rXPoly.GetPointCount();
@@ -1321,6 +1327,13 @@ bool ImpPathForDragAndCreate::MovCreate(
 bool ImpPathForDragAndCreate::EndCreate(SdrDragStat& rDrag, SdrCreateCmd eCmd)
 {
        ImpPathCreateUser* pU=(ImpPathCreateUser*)rDrag.GetUser();
+
+    if(!pU)
+    {
+        OSL_ENSURE(false, "EndCreate but no ImpPathCreateUser instance in pU, 
probably BegCreate call missing (!)");
+        return false;
+    }
+
        bool bRet(false);
        XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
        sal_uInt16 nActPoint=rXPoly.GetPointCount()-1;
@@ -1458,7 +1471,13 @@ bool ImpPathForDragAndCreate::EndCreate(
 bool ImpPathForDragAndCreate::BckCreate(SdrDragStat& rDrag)
 {
        ImpPathCreateUser* pU=(ImpPathCreateUser*)rDrag.GetUser();
-       
+
+    if(!pU)
+    {
+        OSL_ENSURE(false, "BckCreate but no ImpPathCreateUser instance in pU, 
probably BegCreate call missing (!)");
+        return false;
+    }
+
     if (aPathPolygon.Count()>0) 
     {
                XPolygon& rXPoly=aPathPolygon[aPathPolygon.Count()-1];
@@ -1524,41 +1543,58 @@ void ImpPathForDragAndCreate::BrkCreate(
        rDrag.SetUser(NULL);
 }
 
-basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeObjectPolyPolygon(const 
SdrDragStat& rDrag) const
+basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeObjectPolyPolygon(const 
SdrDragStat& rDrag, bool bAdaptToSdrPathObjType) const
 {
-       basegfx::B2DPolyPolygon aRetval(aPathPolygon.getB2DPolyPolygon());
-       ImpPathCreateUser* pU = (ImpPathCreateUser*)rDrag.GetUser();
-       basegfx::B2DPolygon aNewPolygon(aRetval.count() ? 
aRetval.getB2DPolygon(aRetval.count() - 1L) : basegfx::B2DPolygon());
+    basegfx::B2DPolyPolygon aRetval(aPathPolygon.getB2DPolyPolygon());
 
-       if(pU->IsFormFlag() && aNewPolygon.count() > 1L)
-       { 
-               // remove last segment and replace with current
-               // do not forget to rescue the previous control point which 
will be lost when 
-               // the point it's associated with is removed
-               const sal_uInt32 nChangeIndex(aNewPolygon.count() - 2);
-               const basegfx::B2DPoint 
aSavedPrevCtrlPoint(aNewPolygon.getPrevControlPoint(nChangeIndex));
-               
-               aNewPolygon.remove(nChangeIndex, 2L);
-               aNewPolygon.append(pU->GetFormPoly().getB2DPolygon());
+    if(aRetval.count())
+    {
+        ImpPathCreateUser* pU = static_cast< ImpPathCreateUser* 
>(rDrag.GetUser());
 
-               if(nChangeIndex < aNewPolygon.count())
-               {
-                       // if really something was added, set the saved prev 
control point at the
-                       // point where it belongs
-                       aNewPolygon.setPrevControlPoint(nChangeIndex, 
aSavedPrevCtrlPoint);
-               }
-       }
+        if(pU && pU->IsFormFlag())
+        {
+            basegfx::B2DPolygon 
aNewPolygon(aRetval.getB2DPolygon(aRetval.count() - 1));
 
-       if(aRetval.count())
-       {
-               aRetval.setB2DPolygon(aRetval.count() - 1L, aNewPolygon);
-       }
-       else
-       {
-               aRetval.append(aNewPolygon);
-       }
+            if(aNewPolygon.count() > 1)
+            {
+                // remove last segment and replace with current
+                // do not forget to rescue the previous control point which 
will be lost when 
+                // the point it's associated with is removed
+                const sal_uInt32 nChangeIndex(aNewPolygon.count() - 2);
+                const basegfx::B2DPoint 
aSavedPrevCtrlPoint(aNewPolygon.getPrevControlPoint(nChangeIndex));
 
-       return aRetval;
+                aNewPolygon.remove(nChangeIndex, 2L);
+                aNewPolygon.append(pU->GetFormPoly().getB2DPolygon());
+
+                if(nChangeIndex < aNewPolygon.count())
+                {
+                    // if really something was added, set the saved prev 
control point at the
+                    // point where it belongs
+                    aNewPolygon.setPrevControlPoint(nChangeIndex, 
aSavedPrevCtrlPoint);
+                }
+
+                aRetval.setB2DPolygon(aRetval.count() - 1, aNewPolygon);
+            }
+        }
+
+        if(bAdaptToSdrPathObjType)
+        {
+            const bool bShouldBeClosed(isClosed());
+
+            for(sal_uInt32 a(0); a < aRetval.count(); a++)
+            {
+                if(aRetval.getB2DPolygon(a).isClosed() != bShouldBeClosed)
+                {
+                    basegfx::B2DPolygon aCandidate(aRetval.getB2DPolygon(a));
+
+                    aCandidate.setClosed(bShouldBeClosed);
+                    aRetval.setB2DPolygon(a, aCandidate);
+                }
+            }
+        }
+    }
+
+    return aRetval;
 }
 
 basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeDragPolyPolygon(const 
SdrDragStat& rDrag) const
@@ -2164,7 +2200,7 @@ bool SdrPathObj::applySpecialDrag(SdrDra
 
        if(bRetval)
        {
-               
setB2DPolyPolygonInObjectCoordinates(aDragAndCreate.getModifiedPolyPolygon());
+        
setB2DPolyPolygonInObjectCoordinates(aDragAndCreate.TakeObjectPolyPolygon(rDrag,
 false));
        }
 
        return bRetval;
@@ -2230,7 +2266,7 @@ bool SdrPathObj::EndCreate(SdrDragStat& 
 
        if(bRetval && mpDAC)
        {
-               
setB2DPolyPolygonInObjectCoordinates(mpDAC->getModifiedPolyPolygon());
+        
setB2DPolyPolygonInObjectCoordinates(mpDAC->TakeObjectPolyPolygon(rDrag, true));
 
                // #i75974# Check for AutoClose feature. Moved here from 
ImpPathForDragAndCreate::EndCreate
                // to be able to use the type-changing ImpSetClosed method
@@ -2288,7 +2324,7 @@ basegfx::B2DPolyPolygon SdrPathObj::Take
        
        if(mpDAC)
        {
-               aRetval = mpDAC->TakeObjectPolyPolygon(rDrag);
+               aRetval = mpDAC->TakeObjectPolyPolygon(rDrag, false);
                aRetval.append(mpDAC->TakeDragPolyPolygon(rDrag));
        }
 
@@ -2298,14 +2334,14 @@ basegfx::B2DPolyPolygon SdrPathObj::Take
 // during drag or create, allow accessing the so-far created/modified 
polyPolygon
 basegfx::B2DPolyPolygon SdrPathObj::getObjectPolyPolygon(const SdrDragStat& 
rDrag) const
 {
-       basegfx::B2DPolyPolygon aRetval;
+    basegfx::B2DPolyPolygon aRetval;
 
-       if(mpDAC)
-       {
-               aRetval = mpDAC->TakeObjectPolyPolygon(rDrag);
-       }
+    if(mpDAC)
+    {
+        aRetval = mpDAC->TakeObjectPolyPolygon(rDrag, true);
+    }
 
-       return aRetval;
+    return aRetval;
 }
 
 basegfx::B2DPolyPolygon SdrPathObj::getDragPolyPolygon(const SdrDragStat& 
rDrag) const

Modified: openoffice/branches/alg/aw080/main/svx/source/svdraw/svdview.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/svx/source/svdraw/svdview.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/svx/source/svdraw/svdview.cxx (original)
+++ openoffice/branches/alg/aw080/main/svx/source/svdraw/svdview.cxx Thu Sep 12 
12:17:45 2013
@@ -1536,8 +1536,9 @@ Pointer SdrView::GetPreferedPointer(cons
                        {
                                if(bCorner || bVertex || bMov) 
                                {
-                                       SdrHdl* pH1 = 
maViewHandleList.GetHdlByKind(HDL_REF1);
-                                       SdrHdl* pH2 = 
maViewHandleList.GetHdlByKind(HDL_REF2);
+                    const SdrHdlList& rHdlList = GetHdlList();
+                                       SdrHdl* pH1 = 
rHdlList.GetHdlByKind(HDL_REF1);
+                                       SdrHdl* pH2 = 
rHdlList.GetHdlByKind(HDL_REF2);
                                        bool b90(false);
                                        bool b45(false);
                                        basegfx::B2DPoint aDif(0.0, 0.0);

Modified: openoffice/branches/alg/aw080/main/sw/source/core/draw/dview.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/draw/dview.cxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/draw/dview.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/draw/dview.cxx Thu Sep 12 
12:17:45 2013
@@ -237,7 +237,7 @@ SdrObject* SwDrawView::CheckSingleSdrObj
 
 /*************************************************************************
 |*
-|*     SwDrawView::AddCustomHdl()
+|*     SwDrawView::AddCustomHdl(SdrHdlList& rTarget)
 |*
 |*  Gets called every time the handles need to be build
 |*
@@ -246,7 +246,7 @@ SdrObject* SwDrawView::CheckSingleSdrObj
 |*
 *************************************************************************/
 
-void SwDrawView::AddCustomHdl()
+void SwDrawView::AddCustomHdl(SdrHdlList& rTarget)
 {
        SdrObject *pObj = getSelectedIfSingle();
 
@@ -288,7 +288,7 @@ void SwDrawView::AddCustomHdl()
        // add anchor handle:
     //Badaa: 2008-04-18 * Support for Classical Mongolian Script (SCMS) joint 
with Jiayanmin
        new SwSdrHdl( 
-               maViewHandleList,
+               rTarget,
                *pObj,
                basegfx::B2DPoint(aPos.X(),aPos.Y()), 
                ( pAnch->IsVertical() && !pAnch->IsVertLR() ) || 
pAnch->IsRightToLeft());
@@ -898,9 +898,9 @@ const SwFrm* SwDrawView::CalcAnchor()
 
 void SwDrawView::ShowDragAnchor()
 {
-       SdrHdl* pHdl = maViewHandleList.GetHdlByKind(HDL_ANCHOR);
+       SdrHdl* pHdl = GetHdlList().GetHdlByKind(HDL_ANCHOR);
        if ( ! pHdl )
-               pHdl = maViewHandleList.GetHdlByKind(HDL_ANCHOR_TR);
+               pHdl = GetHdlList().GetHdlByKind(HDL_ANCHOR_TR);
 
        if(pHdl)
        {

Modified: openoffice/branches/alg/aw080/main/sw/source/core/inc/dview.hxx
URL: 
http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/core/inc/dview.hxx?rev=1522546&r1=1522545&r2=1522546&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/core/inc/dview.hxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/core/inc/dview.hxx Thu Sep 12 
12:17:45 2013
@@ -82,7 +82,7 @@ class SwDrawView : public FmFormView
 
 protected:
        // add custom handles (used by other apps, e.g. AnchorPos)
-    virtual void AddCustomHdl();
+    virtual void AddCustomHdl(SdrHdlList& rTarget);
 
     // overloaded to allow extra handling when picking SwVirtFlyDrawObj's
     using FmFormView::CheckSingleSdrObjectHit;


Reply via email to