summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorPedro Giffuni <pfg@apache.org>2011-10-12 00:30:28 +0000
committerPedro Giffuni <pfg@apache.org>2011-10-12 00:30:28 +0000
commit18bfd9d5385765ed63818d776473b1505f0adaa8 (patch)
treecbe9d7b18b6942416152bccb8345c9ca53ce2858 /sd
parent7de53f9d42fd7347d41d5945dbb37473b83a22e4 (diff)
118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand.
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/app/popup2_tmpl.src17
-rwxr-xr-xsd/source/ui/func/fupoor.cxx3
-rwxr-xr-xsd/source/ui/view/drviews7.cxx6
-rwxr-xr-xsd/source/ui/view/viewshe2.cxx9
4 files changed, 30 insertions, 5 deletions
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() );