summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmrkv.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-08-29 16:32:05 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-08-29 20:02:59 +0100
commitb1a6dbc2dd118627360282dd304e24263c3bca51 (patch)
tree8a4bd5045cbfa424f03045356285c3620586a87f /svx/source/svdraw/svdmrkv.cxx
parente57a73cc6bedcb8f176e1804792a7ea1fd88796b (diff)
Resolves: #i123003# Corrected Handle/Overlay visualization...
when TextEdit is active (cherry picked from commit 5960cf3dc57dc455bc98343dfafccafaf808ecdc) Conflicts: svx/source/svdraw/svdmrkv.cxx Change-Id: I05c9c3d10ba3e9b29a1a759a18dbb19d85016640
Diffstat (limited to 'svx/source/svdraw/svdmrkv.cxx')
-rw-r--r--svx/source/svdraw/svdmrkv.cxx46
1 files changed, 27 insertions, 19 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index cefe73b1cf8b..896b19a6fcd5 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -624,33 +624,41 @@ void SdrMarkView::SetMarkHandles()
// correct position )
Point aGridOff = GetGridOffset();
- // #i122142# 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;
- }
+ // 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);
- if (bFrmHdl)
- {
- Rectangle aRect(GetMarkedObjRect());
- // #i33755#
- const 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())
{ // otherwise nothing is found
if( bSingleTextObjMark )
{