diff options
author | Jürgen Schmidt <jsc@apache.org> | 2011-10-19 09:35:16 +0000 |
---|---|---|
committer | Jürgen Schmidt <jsc@apache.org> | 2011-10-19 09:35:16 +0000 |
commit | c13162c59402230bdd8f46300bbfa8142c4e01b7 (patch) | |
tree | b4056f4c6997a83842f319eeb3801b9309cad0b1 /sc | |
parent | 6bf17dc7ffa79f52458df707c9da798951e19b2e (diff) |
#118524: apply patch, followup fixes to 118485, thanks to Armin Le Grand (alg)
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/app/client.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/view/tabview5.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshb.cxx | 5 |
3 files changed, 26 insertions, 2 deletions
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx index 9dac737372ae..aa3a648bd06b 100644 --- a/sc/source/ui/app/client.cxx +++ b/sc/source/ui/app/client.cxx @@ -169,7 +169,23 @@ void __EXPORT ScClient::ObjectAreaChanged() SdrOle2Obj* pDrawObj = GetDrawObj(); if (pDrawObj) { - pDrawObj->SetLogicRect( GetScaledObjArea() ); + Rectangle aNewRectangle(GetScaledObjArea()); + + // #i118524# if sheared/rotated, center to non-rotated LogicRect + pDrawObj->setSuppressSetVisAreaSize(true); + + if(pDrawObj->GetGeoStat().nDrehWink || pDrawObj->GetGeoStat().nShearWink) + { + pDrawObj->SetLogicRect( aNewRectangle ); + + const Rectangle& rBoundRect = pDrawObj->GetCurrentBoundRect(); + const Point aDelta(aNewRectangle.Center() - rBoundRect.Center()); + + aNewRectangle.Move(aDelta.X(), aDelta.Y()); + } + + pDrawObj->SetLogicRect( aNewRectangle ); + pDrawObj->setSuppressSetVisAreaSize(false); // set document modified (SdrModel::SetChanged is not used) // TODO/LATER: is there a reason that this code is not executed in Draw? diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx index a20c73d04adf..17ef37237618 100644 --- a/sc/source/ui/view/tabview5.cxx +++ b/sc/source/ui/view/tabview5.cxx @@ -603,7 +603,10 @@ void ScTabView::DigitLanguageChanged() void ScTabView::ScrollToObject( SdrObject* pDrawObj ) { if ( pDrawObj ) - MakeVisible( pDrawObj->GetLogicRect() ); + { + // #i118524# use the BoundRect, this defines the visible area + MakeVisible(pDrawObj->GetCurrentBoundRect()); + } } void ScTabView::MakeVisible( const Rectangle& rHMMRect ) diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index c1fb1d9959a9..659d59695ba0 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -225,6 +225,11 @@ sal_Bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) if (nErr != ERRCODE_NONE && !bErrorShown) ErrorHandler::HandleError(nErr); + // #i118524# refresh handles to suppress for activated OLE + if(GetSdrView()) + { + GetSdrView()->AdjustMarkHdl(); + } //! SetDocumentName sollte schon im Sfx passieren ??? //TODO/LATER: how "SetDocumentName"? //xIPObj->SetDocumentName( GetViewData()->GetDocShell()->GetTitle() ); |