From 18bfd9d5385765ed63818d776473b1505f0adaa8 Mon Sep 17 00:00:00 2001 From: Pedro Giffuni Date: Wed, 12 Oct 2011 00:30:28 +0000 Subject: 118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand. --- sd/source/ui/app/popup2_tmpl.src | 17 ++++++++++++++++- sd/source/ui/func/fupoor.cxx | 3 ++- sd/source/ui/view/drviews7.cxx | 6 +++--- sd/source/ui/view/viewshe2.cxx | 9 +++++++++ 4 files changed, 30 insertions(+), 5 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/app/popup2_tmpl.src b/sd/source/ui/app/popup2_tmpl.src index c76c09df62e6..dc926e7b81dc 100644 --- a/sd/source/ui/app/popup2_tmpl.src +++ b/sd/source/ui/app/popup2_tmpl.src @@ -636,11 +636,26 @@ { MN_TRANSFORM MN_ORIGINAL_SIZE + + //-#i118485# Added support for Line,Area and Text + MN_LINE + MN_AREA + SEPARATOR + MN_CHAR_PARAGRAPH + SEPARATOR + //-#i118485#---------------------- + MN_OLE_OBJECT SEPARATOR - MN_POSITION MN_OBJECT_ALIGN + MN_POSITION MN_DISTRIBUTE + + //-#i118485# Added support for conversions + MNSUB_MIRROR + MNSUB_CONVERT + //-#i118485#---------------------- + MN_BREAK //-#i68101#---------------------- diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 57a06e873f81..945ce515d2f2 100755 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -884,7 +884,8 @@ sal_Bool FuPoor::KeyInput(const KeyEvent& rKEvt) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - if(pObj->ISA(SdrTextObj) && pObj->HasTextEdit() && !pObj->ISA(SdrOle2Obj)) + // #i118485# allow TextInput for OLEs, too + if(pObj->ISA(SdrTextObj) && pObj->HasTextEdit()) { // #98533# use common IsSimpleCharInput from // the EditEngine. diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index acdcb58b5daf..0386b62b64c7 100755 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1424,9 +1424,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) bFoundNoGraphicObj = sal_True; break; case OBJ_OLE2 : - bFoundObjNoLine = sal_True; - bFoundObjNoArea = sal_True; - bFoundNoGraphicObj = sal_True; + // #i118485# Allow Line, Area and Graphic (Metafile) + bSingleGraphicSelected = nMarkCount == 1; + bFoundMetafile = sal_True; break; case OBJ_GRAF : bSingleGraphicSelected = nMarkCount == 1; diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx index 637e3ac1793d..75e346158795 100755 --- a/sd/source/ui/view/viewshe2.cxx +++ b/sd/source/ui/view/viewshe2.cxx @@ -951,6 +951,15 @@ sal_Bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb) } Rectangle aRect = pObj->GetLogicRect(); + + { + // #i118485# center on BoundRect for activation, + // OLE may be sheared/rotated now + const Rectangle& rBoundRect = pObj->GetCurrentBoundRect(); + const Point aDelta(rBoundRect.Center() - aRect.Center()); + aRect.Move(aDelta.X(), aDelta.Y()); + } + Size aDrawSize = aRect.GetSize(); MapMode aMapMode( GetDoc()->GetScaleUnit() ); -- cgit