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
970ccf4f
Kaydet (Commit)
970ccf4f
authored
Ock 31, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
drop unnecessary includes
üst
2762c6dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
20 deletions
+18
-20
rect.hxx
starmath/inc/rect.hxx
+6
-5
rect.cxx
starmath/source/rect.cxx
+12
-15
No files found.
starmath/inc/rect.hxx
Dosyayı görüntüle @
970ccf4f
...
...
@@ -31,6 +31,7 @@
#include <new>
#include <rtl/ustring.hxx>
#include <tools/gen.hxx>
#include <vcl/outdev.hxx>
#include <vcl/metric.hxx>
...
...
@@ -39,9 +40,9 @@
bool
SmGetGlyphBoundRect
(
const
OutputDevice
&
rDev
,
const
Xub
String
&
rText
,
Rectangle
&
rRect
);
const
rtl
::
OU
String
&
rText
,
Rectangle
&
rRect
);
bool
SmIsMathAlpha
(
const
Xub
String
&
rText
);
bool
SmIsMathAlpha
(
const
rtl
::
OU
String
&
rText
);
inline
long
SmFromTo
(
long
nFrom
,
long
nTo
,
double
fRelDist
)
...
...
@@ -109,9 +110,9 @@ class SmRect
protected
:
void
BuildRect
(
const
OutputDevice
&
rDev
,
const
SmFormat
*
pFormat
,
const
Xub
String
&
rText
,
sal_uInt16
nBorderWidth
);
const
rtl
::
OU
String
&
rText
,
sal_uInt16
nBorderWidth
);
void
Init
(
const
OutputDevice
&
rDev
,
const
SmFormat
*
pFormat
,
const
Xub
String
&
rText
,
sal_uInt16
nBorderWidth
);
const
rtl
::
OU
String
&
rText
,
sal_uInt16
nBorderWidth
);
void
ClearBaseline
()
{
bHasBaseline
=
false
;
};
inline
void
CopyMBL
(
const
SmRect
&
rRect
);
...
...
@@ -122,7 +123,7 @@ protected:
public
:
SmRect
();
SmRect
(
const
OutputDevice
&
rDev
,
const
SmFormat
*
pFormat
,
const
Xub
String
&
rText
,
long
nBorderWidth
);
const
rtl
::
OU
String
&
rText
,
long
nBorderWidth
);
SmRect
(
long
nWidth
,
long
nHeight
);
SmRect
(
const
SmRect
&
rRect
);
...
...
starmath/source/rect.cxx
Dosyayı görüntüle @
970ccf4f
...
...
@@ -26,9 +26,6 @@
*
************************************************************************/
#include <tools/string.hxx>
#include <osl/diagnose.h>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
...
...
@@ -60,14 +57,14 @@ static xub_Unicode const aMathAlpha[] =
xub_Unicode
(
'\0'
)
};
bool
SmIsMathAlpha
(
const
Xub
String
&
rText
)
bool
SmIsMathAlpha
(
const
rtl
::
OU
String
&
rText
)
// true iff symbol (from StarMath Font) should be treated as letter
{
if
(
rText
.
Len
()
==
0
)
if
(
rText
.
isEmpty
()
)
return
false
;
OSL_ENSURE
(
rText
.
Len
()
==
1
,
"Sm : string must be exactly one character long"
);
xub_Unicode
cChar
=
rText
.
GetChar
(
0
)
;
OSL_ENSURE
(
rText
.
getLength
()
==
1
,
"Sm : string must be exactly one character long"
);
xub_Unicode
cChar
=
rText
[
0
]
;
// is it a greek symbol?
if
(
xub_Unicode
(
0xE0AC
)
<=
cChar
&&
cChar
<=
xub_Unicode
(
0xE0D4
))
...
...
@@ -138,7 +135,7 @@ void SmRect::CopyAlignInfo(const SmRect &rRect)
void
SmRect
::
BuildRect
(
const
OutputDevice
&
rDev
,
const
SmFormat
*
pFormat
,
const
Xub
String
&
rText
,
sal_uInt16
nBorder
)
const
rtl
::
OU
String
&
rText
,
sal_uInt16
nBorder
)
{
OSL_ENSURE
(
aTopLeft
==
Point
(
0
,
0
),
"Sm: Ooops..."
);
...
...
@@ -227,13 +224,13 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
if
(
nLoAttrFence
>
GetBottom
())
nLoAttrFence
=
GetBottom
();
OSL_ENSURE
(
rText
.
Len
()
==
0
||
!
IsEmpty
(),
OSL_ENSURE
(
rText
.
isEmpty
()
||
!
IsEmpty
(),
"Sm: empty rectangle created"
);
}
void
SmRect
::
Init
(
const
OutputDevice
&
rDev
,
const
SmFormat
*
pFormat
,
const
Xub
String
&
rText
,
sal_uInt16
nEBorderWidth
)
const
rtl
::
OU
String
&
rText
,
sal_uInt16
nEBorderWidth
)
// get rectangle fitting for drawing 'rText' on OutputDevice 'rDev'
{
BuildRect
(
rDev
,
pFormat
,
rText
,
nEBorderWidth
);
...
...
@@ -241,7 +238,7 @@ void SmRect::Init(const OutputDevice &rDev, const SmFormat *pFormat,
SmRect
::
SmRect
(
const
OutputDevice
&
rDev
,
const
SmFormat
*
pFormat
,
const
Xub
String
&
rText
,
long
nEBorderWidth
)
const
rtl
::
OU
String
&
rText
,
long
nEBorderWidth
)
{
OSL_ENSURE
(
nEBorderWidth
>=
0
,
"BorderWidth is negative"
);
if
(
nEBorderWidth
<
0
)
...
...
@@ -613,14 +610,14 @@ SmRect SmRect::AsGlyphRect() const
}
bool
SmGetGlyphBoundRect
(
const
OutputDevice
&
rDev
,
const
Xub
String
&
rText
,
Rectangle
&
rRect
)
const
rtl
::
OU
String
&
rText
,
Rectangle
&
rRect
)
// basically the same as 'GetTextBoundRect' (in class 'OutputDevice')
// but with a string as argument.
{
// handle special case first
xub_StrLen
nLen
=
rText
.
Len
();
if
(
nLen
==
0
)
{
rRect
.
SetEmpty
();
if
(
rText
.
isEmpty
())
{
rRect
.
SetEmpty
();
return
true
;
}
...
...
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