[Libreoffice-commits] core.git: 2 commits - sd/source svx/source
Armin Le Grand
alg at apache.org
Sat May 18 07:24:23 PDT 2013
sd/source/ui/view/drviews2.cxx | 30 ++++++++++++++++++++++++------
svx/source/svdraw/svdopath.cxx | 4 ++++
2 files changed, 28 insertions(+), 6 deletions(-)
New commits:
commit 20dee85b6390ef3edc5434889523cd9fd0137bae
Author: Armin Le Grand <alg at apache.org>
Date: Thu Jul 26 09:07:28 2012 +0000
Resolves: #i116244# need to reset rotation...
when a polygon object in construction becomes more than a simple line
(cherry picked from commit 0c170376f7e1896455f439237055e39df020e7ae)
Change-Id: Ic3b3676b8932b40b1d0206220503cbcdea7385cd
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index f416cea..da8a767 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1770,6 +1770,10 @@ void SdrPathObj::ImpForceKind()
{
aRect = lcl_ImpGetBoundRect(GetPathPoly());
}
+
+ // #i116244# reset rotation
+ aGeo.nDrehWink = aGeo.nShearWink = 0;
+ aGeo.RecalcSinCos(); aGeo.RecalcTan();
}
// #i75974# adapt polygon state to object type. This may include a reinterpretation
commit 196ec14db1d4f39e25c83517cc7bad4d78ee6572
Author: Armin Le Grand <alg at apache.org>
Date: Thu Jul 26 08:16:50 2012 +0000
Resolves: #i118267# Add undo actions for adapted arrowhead sizes...
when linewidth is changed
(cherry picked from commit 8e63413dbf514303095790630a2d77d854c3da95)
Change-Id: I538805726ca29e3cdb05dc32577b91b7157d0e0f
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index d474872..de3c663 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -257,8 +257,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
sal_uLong nCount = rMarkList.GetMarkCount();
-
- sal_Int32 nNewLineWidth = ((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue();
+ const sal_Int32 nNewLineWidth(((const XLineWidthItem&)rReq.GetArgs()->Get(XATTR_LINEWIDTH)).GetValue());
+ const bool bUndo(mpDrawView->IsUndoEnabled());
for (sal_uLong i=0; i<nCount; i++)
{
@@ -295,9 +295,28 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
if(bSetItemSet)
+ {
+ if(bUndo)
+ {
+ if(!bMergeUndo)
+ {
+ pUndoManager->EnterListAction( String(), String() );
+ mpDrawView->BegUndo();
+ bMergeUndo = sal_True;
+ }
+
+ mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
+ }
+
pObj->SetMergedItemSet(aAttr);
+ }
}
}
+
+ if(bMergeUndo)
+ {
+ mpDrawView->EndUndo();
+ }
}
if (nSId == SID_ATTR_FILL_SHADOW)
@@ -306,7 +325,6 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdrObject* pObj = NULL;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
sal_uLong nCount = rMarkList.GetMarkCount();
-
const bool bUndo = mpDrawView->IsUndoEnabled();
for (sal_uLong i=0; i<nCount; i++)
@@ -319,10 +337,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
aAttr.Put(pObj->GetMergedItemSet());
- const XFillStyleItem& rFillStyle =
- (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE);
+ const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aAttr.Get(XATTR_FILLSTYLE);
+ const XLineStyleItem& rLineStyle = (const XLineStyleItem&) aAttr.Get(XATTR_LINESTYLE);
- if (rFillStyle.GetValue() == XFILL_NONE)
+ if(XFILL_NONE == rFillStyle.GetValue() && XLINE_NONE == rLineStyle.GetValue())
{
if( bUndo )
{
More information about the Libreoffice-commits
mailing list