/[packages]/updates/5/libreoffice/current/SOURCES/0001-tdf-95210-SetHandleControllerPosition-is-busted-wrt-.patch
ViewVC logotype

Contents of /updates/5/libreoffice/current/SOURCES/0001-tdf-95210-SetHandleControllerPosition-is-busted-wrt-.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 903306 - (show annotations) (download)
Sun Nov 15 12:42:22 2015 UTC (8 years, 5 months ago) by tv
File size: 2676 byte(s)
- add insert special character to spelling dialog (tdf#95682)
- SetHandleControllerPosition is busted (tdf#95210)
1 From eafd3ee3f01bceef0eb3327be3139a8eee2a2b2e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
3 Date: Thu, 5 Nov 2015 13:42:13 +0000
4 Subject: [PATCH] tdf#95210 SetHandleControllerPosition is busted wrt
5 HandleFlags::REFX
6
7 so instead of saving the initial pos and trying to restore the pos, instead use
8 a bigger hammer and save the entire geometry and restore that instead.
9
10 Change-Id: Id06ea8f205f30771987089c5dc949bb52adc7a27
11 ---
12 cui/source/tabpages/transfrm.cxx | 16 ++++++++++------
13 1 file changed, 10 insertions(+), 6 deletions(-)
14
15 diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
16 index f6b1f26..0db63db 100644
17 --- a/cui/source/tabpages/transfrm.cxx
18 +++ b/cui/source/tabpages/transfrm.cxx
19 @@ -633,10 +633,15 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
20 SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier();
21 if (eKind == OBJ_CUSTOMSHAPE)
22 {
23 + //save geometry
24 + SdrCustomShapeGeometryItem aInitialGeometry =
25 + static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem(SDRATTR_CUSTOMSHAPE_GEOMETRY));
26 +
27 EnhancedCustomShape2d aShape(pObj);
28 - Point aInitialPosition;
29 +
30 for (int i = 0; i < 2; ++i)
31 {
32 + Point aInitialPosition;
33 if (!aShape.GetHandlePosition(i, aInitialPosition))
34 break;
35 m_aControlGroups[i]->Enable();
36 @@ -655,14 +660,10 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
37 aShape.GetHandlePosition(i, aMinPosition);
38
39 Rectangle aLogicRect = aShape.GetLogicRect();
40 + aInitialPosition.Move(-aLogicRect.Left(), -aLogicRect.Top());
41 aMaxPosition.Move(-aLogicRect.Left(), -aLogicRect.Top());
42 aMinPosition.Move(-aLogicRect.Left(), -aLogicRect.Top());
43
44 - aPosition.X = aInitialPosition.X();
45 - aPosition.Y = aInitialPosition.Y();
46 - aInitialPosition.Move(-aLogicRect.Left(), -aLogicRect.Top());
47 - aShape.SetHandleControllerPosition(i, aPosition);
48 -
49 SetMetricValue(*m_aControlX[i], aInitialPosition.X(), ePoolUnit);
50 SetMetricValue(*m_aControlY[i], aInitialPosition.Y(), ePoolUnit);
51
52 @@ -681,6 +682,9 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs)
53 m_aControlY[i]->SetMax(aMaxPosition.Y(), FUNIT_MM);
54 }
55 }
56 +
57 + //restore geometry
58 + pObj->SetMergedItem(aInitialGeometry);
59 }
60 }
61 for (int i = 0; i < 2; ++i)
62 --
63 2.5.0
64

  ViewVC Help
Powered by ViewVC 1.1.30