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
00269d39
Kaydet (Commit)
00269d39
authored
Tem 29, 2015
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
svx: remove duplicate "Kuerzen" function
Change-Id: I319ba12684398bcdfcd8d8ede1648e1d213e75a7
üst
f08ffc15
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
42 deletions
+3
-42
svdtrans.hxx
include/svx/svdtrans.hxx
+0
-6
svddrgmt.cxx
svx/source/svdraw/svddrgmt.cxx
+1
-1
svdoole2.cxx
svx/source/svdraw/svdoole2.cxx
+2
-2
svdtrans.cxx
svx/source/svdraw/svdtrans.cxx
+0
-33
No files found.
include/svx/svdtrans.hxx
Dosyayı görüntüle @
00269d39
...
...
@@ -249,12 +249,6 @@ SVX_DLLPUBLIC void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho)
// Calculation and intermediate values are in BigInt
SVX_DLLPUBLIC
long
BigMulDiv
(
long
nVal
,
long
nMul
,
long
nDiv
);
// Lossy cancellation of a fraction
// nDigits specifies, how many significant digits the numerator
// and denominator should at least be retained
void
Kuerzen
(
Fraction
&
rF
,
unsigned
nDigits
);
class
FrPair
{
Fraction
aX
;
Fraction
aY
;
...
...
svx/source/svdraw/svddrgmt.cxx
Dosyayı görüntüle @
00269d39
...
...
@@ -2422,7 +2422,7 @@ void SdrDragShear::MoveSdrDrag(const Point& rPnt)
bResize
=
true
;
double
nCos
=
cos
(
nTmpAngle
*
nPi180
);
aNeuFact
=
nCos
;
Kuerzen
(
aFact
,
10
);
// three decimals should be enough
aFact
.
ReduceInaccurate
(
10
);
// three decimals should be enough
}
if
(
nNewAngle
>
8900
)
...
...
svx/source/svdraw/svdoole2.cxx
Dosyayı görüntüle @
00269d39
...
...
@@ -2225,8 +2225,8 @@ bool SdrOle2Obj::CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHei
aScaleHeight
=
Fraction
(
aSize
.
Height
(),
aObjAreaSize
.
Height
()
);
// reduce to 10 binary digits
Kuerzen
(
aScaleHeight
,
10
);
Kuerzen
(
aScaleWidth
,
10
);
aScaleHeight
.
ReduceInaccurate
(
10
);
aScaleWidth
.
ReduceInaccurate
(
10
);
return
true
;
}
...
...
svx/source/svdraw/svdtrans.cxx
Dosyayı görüntüle @
00269d39
...
...
@@ -584,39 +584,6 @@ long BigMulDiv(long nVal, long nMul, long nDiv)
return
0x7fffffff
;
}
void
Kuerzen
(
Fraction
&
rF
,
unsigned
nDigits
)
{
sal_Int32
nMul
=
rF
.
GetNumerator
();
sal_Int32
nDiv
=
rF
.
GetDenominator
();
bool
bNeg
=
false
;
if
(
nMul
<
0
)
{
nMul
=-
nMul
;
bNeg
=!
bNeg
;
}
if
(
nDiv
<
0
)
{
nDiv
=-
nDiv
;
bNeg
=!
bNeg
;
}
if
(
nMul
==
0
||
nDiv
==
0
)
return
;
sal_uInt32
a
;
a
=
sal_uInt32
(
nMul
);
unsigned
nMulZ
=
0
;
// count leading zeros
while
(
a
<
0x00800000
)
{
nMulZ
+=
8
;
a
<<=
8
;
}
while
(
a
<
0x80000000
)
{
nMulZ
++
;
a
<<=
1
;
}
a
=
sal_uInt32
(
nDiv
);
unsigned
nDivZ
=
0
;
// count leading zeros
while
(
a
<
0x00800000
)
{
nDivZ
+=
8
;
a
<<=
8
;
}
while
(
a
<
0x80000000
)
{
nDivZ
++
;
a
<<=
1
;
}
// count the number of digits
int
nMulDigits
=
32
-
nMulZ
;
int
nDivDigits
=
32
-
nDivZ
;
// count how many decimal places can be removed
int
nMulWeg
=
nMulDigits
-
nDigits
;
if
(
nMulWeg
<
0
)
nMulWeg
=
0
;
int
nDivWeg
=
nDivDigits
-
nDigits
;
if
(
nDivWeg
<
0
)
nDivWeg
=
0
;
int
nWeg
=
std
::
min
(
nMulWeg
,
nDivWeg
);
nMul
>>=
nWeg
;
nDiv
>>=
nWeg
;
if
(
nMul
==
0
||
nDiv
==
0
)
{
DBG_WARNING
(
"Math error after canceling decimal places."
);
return
;
}
if
(
bNeg
)
nMul
=-
nMul
;
rF
=
Fraction
(
nMul
,
nDiv
);
}
// How many eU units fit into a mm, respectively an inch?
// Or: How many mm, respectively inches, are there in an eU (and then give me the inverse)
...
...
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