You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/08/30 11:10:27 UTC

svn commit: r1518918 - in /openoffice/branches/AOO401/main: ./ svx/source/svdraw/svdmrkv.cxx

Author: alg
Date: Fri Aug 30 09:10:27 2013
New Revision: 1518918

URL: http://svn.apache.org/r1518918
Log:
i123003 Corrected Handle/Overlay visualization when TextEdit is active

Modified:
    openoffice/branches/AOO401/main/   (props changed)
    openoffice/branches/AOO401/main/svx/source/svdraw/svdmrkv.cxx

Propchange: openoffice/branches/AOO401/main/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Aug 30 09:10:27 2013
@@ -0,0 +1,7 @@
+/incubator/ooo/branches/AOO34/main:1346776-1346777,1347535,1348052,1348914,1350569,1352456,1358991,1359004,1359010,1359024,1359546-1359547,1359553,1359555-1359556,1360552,1368968,1369110,1371068
+/incubator/ooo/branches/alg/linecap/main:1226811-1232461
+/incubator/ooo/branches/alg/svgreplacement/main:1205420-1220782
+/incubator/ooo/branches/writer001/main:1356067-1386577
+/openoffice/branches/alg/clibboard/main:1428975-1437368
+/openoffice/branches/sidebar/main:1415095-1466374
+/openoffice/trunk/main:1506958,1509224,1509576,1510489,1510954,1512298,1512966,1513112,1515312,1515732,1515749,1515762,1516435,1516741,1516789,1516794,1517535,1518091,1518253,1518697

Modified: openoffice/branches/AOO401/main/svx/source/svdraw/svdmrkv.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO401/main/svx/source/svdraw/svdmrkv.cxx?rev=1518918&r1=1518917&r2=1518918&view=diff
==============================================================================
--- openoffice/branches/AOO401/main/svx/source/svdraw/svdmrkv.cxx (original)
+++ openoffice/branches/AOO401/main/svx/source/svdraw/svdmrkv.cxx Fri Aug 30 09:10:27 2013
@@ -718,34 +718,41 @@ void SdrMarkView::SetMarkHandles()
 			}
 		}
 
-        // #122142# for captions in TextEdit, force to FrameHdls to get the special text selection
-        if(!bFrmHdl && pMarkedObj && bSingleTextObjMark && dynamic_cast< SdrCaptionObj* >(pMarkedObj))
+        // check if text edit or ole is active and handles need to be suppressed. This may be the case
+        // when a single object is selected
+        // Using a strict return statement is okay here; no handles means *no* handles.
+        if(pMarkedObj)
         {
-            bFrmHdl = true;
-        }
-		
-		if (bFrmHdl) 
-		{
-			Rectangle aRect(GetMarkedObjRect());
+            // formally #i33755#: If TextEdit is active the EditEngine will directly paint
+            // to the window, so suppress Overlay and handles completely; a text frame for
+            // the active text edit will be painted by the repaitnt mechanism in
+            // SdrObjEditView::ImpPaintOutlinerView in this case. This needs to be reworked
+            // in the future
+            // Also formally #122142#: Pretty much the same for SdrCaptionObj's in calc.
+            if(((SdrView*)this)->IsTextEdit())
+            {
+                const SdrTextObj* pSdrTextObj = dynamic_cast< const SdrTextObj* >(pMarkedObj);
 
-			// #i33755#
-			const sal_Bool bHideHandlesWhenInTextEdit(
-				((SdrView*)this)->IsTextEdit()
-				&& pMarkedObj 
-				&& pMarkedObj->ISA(SdrTextObj) 
-				&& ((SdrTextObj*)pMarkedObj)->IsInEditMode());
-			
-            // #i118524# if inplace activated OLE is selected,
-            // suppress handles
-            bool bHideHandlesWhenOleActive(false);
+                if(pSdrTextObj && pSdrTextObj->IsInEditMode())
+                {
+                    return;
+                }
+            }
+
+            // formally #i118524#: if inplace activated OLE is selected, suppress handles
             const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pMarkedObj);
 
             if(pSdrOle2Obj && (pSdrOle2Obj->isInplaceActive() || pSdrOle2Obj->isUiActive()))
             {
-                bHideHandlesWhenOleActive = true;
+                return;
             }
+        }
+
+        if (bFrmHdl) 
+		{
+			Rectangle aRect(GetMarkedObjRect());
 
-            if(!aRect.IsEmpty() && !bHideHandlesWhenInTextEdit && !bHideHandlesWhenOleActive) 
+            if(!aRect.IsEmpty()) 
 			{ // sonst nix gefunden
                 if( bSingleTextObjMark )
                 {