Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
79fe1227
Kaydet (Commit)
79fe1227
authored
Ara 11, 2012
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#55394# Applied patch from Regina to solve mirror problem for CustomShapes
Patch by: Regina Review by: alg
üst
a2bbabbe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
64 deletions
+49
-64
svdoashp.cxx
svx/source/svdraw/svdoashp.cxx
+49
-64
No files found.
svx/source/svdraw/svdoashp.cxx
Dosyayı görüntüle @
79fe1227
...
...
@@ -1921,67 +1921,48 @@ void SdrObjCustomShape::NbcRotate( const Point& rRef, long nWink, double sn, dou
void
SdrObjCustomShape
::
NbcMirror
(
const
Point
&
rRef1
,
const
Point
&
rRef2
)
{
// TTTT: Fix for old mirroring, can be removed again in aw080
// storing horizontal and vertical flipping without modifying the rotate angle
// decompose other flipping to rotation and MirrorX.
long
ndx
=
rRef2
.
X
()
-
rRef1
.
X
();
long
ndy
=
rRef2
.
Y
()
-
rRef1
.
Y
();
sal_Bool
bHorz
=
sal_False
;
sal_Bool
bVert
=
sal_False
;
if
(
rRef1
.
X
()
==
rRef2
.
X
()
)
bHorz
=
sal_True
;
if
(
rRef1
.
Y
()
==
rRef2
.
Y
()
)
bVert
=
sal_True
;
if
(
!
bHorz
&&
!
bVert
)
bHorz
=
bVert
=
sal_True
;
if
(
bHorz
||
bVert
)
if
(
!
ndx
)
// MirroredX
{
SdrCustomShapeGeometryItem
aGeometryItem
(
(
SdrCustomShapeGeometryItem
&
)
GetMergedItem
(
SDRATTR_CUSTOMSHAPE_GEOMETRY
)
);
/////////////////
// "MirroredX" //
/////////////////
if
(
bHorz
)
SetMirroredX
(
!
IsMirroredX
()
);
SdrTextObj
::
NbcMirror
(
rRef1
,
rRef2
);
}
else
{
if
(
!
ndy
)
// MirroredY
{
const
rtl
::
OUString
sMirroredX
(
RTL_CONSTASCII_USTRINGPARAM
(
"MirroredX"
)
);
com
::
sun
::
star
::
uno
::
Any
*
pAny
=
aGeometryItem
.
GetPropertyValueByName
(
sMirroredX
);
if
(
pAny
)
{
sal_Bool
bFlip
=
sal_Bool
();
if
(
*
pAny
>>=
bFlip
)
{
if
(
bFlip
)
bHorz
=
sal_False
;
}
}
PropertyValue
aPropVal
;
aPropVal
.
Name
=
sMirroredX
;
aPropVal
.
Value
<<=
bHorz
;
aGeometryItem
.
SetPropertyValue
(
aPropVal
);
SetMirroredY
(
!
IsMirroredY
());
SdrTextObj
::
NbcMirror
(
rRef1
,
rRef2
);
}
/////////////////
// "MirroredY" //
/////////////////
if
(
bVert
)
else
// neither horizontal nor vertical
{
const
rtl
::
OUString
sMirroredY
(
RTL_CONSTASCII_USTRINGPARAM
(
"MirroredY"
)
);
com
::
sun
::
star
::
uno
::
Any
*
pAny
=
aGeometryItem
.
GetPropertyValueByName
(
sMirroredY
);
if
(
pAny
)
SetMirroredX
(
!
IsMirroredX
());
// call parent
SdrTextObj
::
NbcMirror
(
rRef1
,
rRef2
);
// update fObjectRotation
long
nTextObjRotation
=
aGeo
.
nDrehWink
;
double
fWink
=
nTextObjRotation
;
fWink
/=
100.0
;
bool
bSingleFlip
=
(
IsMirroredX
()
!=
IsMirroredY
());
fObjectRotation
=
fmod
(
bSingleFlip
?
-
fWink
:
fWink
,
360.0
);
if
(
fObjectRotation
<
0
)
{
sal_Bool
bFlip
=
sal_Bool
();
if
(
*
pAny
>>=
bFlip
)
{
if
(
bFlip
)
bVert
=
sal_False
;
}
fObjectRotation
=
360.0
+
fObjectRotation
;
}
PropertyValue
aPropVal
;
aPropVal
.
Name
=
sMirroredY
;
aPropVal
.
Value
<<=
bVert
;
aGeometryItem
.
SetPropertyValue
(
aPropVal
);
}
SetMergedItem
(
aGeometryItem
);
}
}
SdrTextObj
::
NbcMirror
(
rRef1
,
rRef2
);
InvalidateRenderGeometry
();
}
...
...
@@ -1992,20 +1973,24 @@ void SdrObjCustomShape::Shear( const Point& rRef, long nWink, double tn, FASTBOO
}
void
SdrObjCustomShape
::
NbcShear
(
const
Point
&
rRef
,
long
nWink
,
double
tn
,
FASTBOOL
bVShear
)
{
long
nDrehWink
=
aGeo
.
nDrehWink
;
if
(
nDrehWink
)
{
aGeo
.
nDrehWink
=
-
nDrehWink
;
aGeo
.
RecalcSinCos
();
NbcRotate
(
rRef
,
aGeo
.
nDrehWink
,
aGeo
.
nSin
,
aGeo
.
nCos
);
}
SdrTextObj
::
NbcShear
(
rRef
,
nWink
,
tn
,
bVShear
);
if
(
nDrehWink
)
// TTTT: Fix for old mirroring, can be removed again in aw080
SdrTextObj
::
NbcShear
(
rRef
,
nWink
,
tn
,
bVShear
);
// updating fObjectRotation
long
nTextObjRotation
=
aGeo
.
nDrehWink
;
double
fWink
=
nTextObjRotation
;
fWink
/=
100.0
;
bool
bSingleFlip
=
(
IsMirroredX
()
!=
IsMirroredY
());
fObjectRotation
=
fmod
(
bSingleFlip
?
-
fWink
:
fWink
,
360.0
);
if
(
fObjectRotation
<
0
)
{
aGeo
.
nDrehWink
=
nDrehWink
;
aGeo
.
RecalcSinCos
();
Rotate
(
rRef
,
aGeo
.
nDrehWink
,
aGeo
.
nSin
,
aGeo
.
nCos
);
fObjectRotation
=
360.0
+
fObjectRotation
;
}
InvalidateRenderGeometry
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment