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
2a1e3dff
Kaydet (Commit)
2a1e3dff
authored
Nis 06, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Actually no need to have it inline in the header
Change-Id: I3891441fee41dd56ff183c833b17d926722b8f91
üst
beda8fee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
81 deletions
+85
-81
sallayout.hxx
vcl/inc/sallayout.hxx
+1
-81
sallayout.cxx
vcl/source/gdi/sallayout.cxx
+84
-0
No files found.
vcl/inc/sallayout.hxx
Dosyayı görüntüle @
2a1e3dff
...
...
@@ -21,7 +21,6 @@
#define _SV_SALLAYOUT_HXX
#include <iostream>
#include <iomanip>
#include <tools/gen.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
...
...
@@ -127,86 +126,7 @@ protected:
};
// For nice SAL_INFO logging of ImplLayoutArgs values
inline
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
ImplLayoutArgs
&
rArgs
)
{
#ifndef SAL_LOG_INFO
(
void
)
rArgs
;
#else
s
<<
"ImplLayoutArgs{"
;
s
<<
"Flags="
;
if
(
rArgs
.
mnFlags
==
0
)
s
<<
0
;
else
{
bool
need_or
=
false
;
s
<<
"{"
;
#define TEST(x) if (rArgs.mnFlags & SAL_LAYOUT_##x) { if (need_or) s << "|"; s << #x; need_or = true; }
TEST
(
BIDI_RTL
);
TEST
(
BIDI_STRONG
);
TEST
(
RIGHT_ALIGN
);
TEST
(
KERNING_PAIRS
);
TEST
(
KERNING_ASIAN
);
TEST
(
VERTICAL
);
TEST
(
COMPLEX_DISABLED
);
TEST
(
ENABLE_LIGATURES
);
TEST
(
SUBSTITUTE_DIGITS
);
TEST
(
KASHIDA_JUSTIFICATON
);
TEST
(
DISABLE_GLYPH_PROCESSING
);
TEST
(
FOR_FALLBACK
);
#undef TEST
s
<<
"}"
;
}
s
<<
",Length="
<<
rArgs
.
mnLength
;
s
<<
",MinCharPos="
<<
rArgs
.
mnMinCharPos
;
s
<<
",EndCharPos="
<<
rArgs
.
mnEndCharPos
;
s
<<
",Str=
\"
"
;
int
lim
=
rArgs
.
mnLength
;
if
(
lim
>
10
)
lim
=
7
;
for
(
int
i
=
0
;
i
<
lim
;
i
++
)
{
if
(
rArgs
.
mpStr
[
i
]
==
'\n'
)
s
<<
"
\\
n"
;
else
if
(
rArgs
.
mpStr
[
i
]
<
' '
||
(
rArgs
.
mpStr
[
i
]
>=
0x7F
&&
rArgs
.
mpStr
[
i
]
<=
0xFF
))
s
<<
"
\\
0x"
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
rArgs
.
mpStr
[
i
]
<<
std
::
setfill
(
' '
)
<<
std
::
setw
(
1
)
<<
std
::
dec
;
else
if
(
rArgs
.
mpStr
[
i
]
<
0x7F
)
s
<<
(
char
)
rArgs
.
mpStr
[
i
];
else
s
<<
"
\\
u"
<<
std
::
hex
<<
std
::
setw
(
4
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
rArgs
.
mpStr
[
i
]
<<
std
::
setfill
(
' '
)
<<
std
::
setw
(
1
)
<<
std
::
dec
;
}
if
(
rArgs
.
mnLength
>
lim
)
s
<<
"..."
;
s
<<
"
\"
"
;
s
<<
",DXArray="
;
if
(
rArgs
.
mpDXArray
)
{
s
<<
"["
;
int
count
=
rArgs
.
mnEndCharPos
-
rArgs
.
mnMinCharPos
;
lim
=
count
;
if
(
lim
>
10
)
lim
=
7
;
for
(
int
i
=
0
;
i
<
lim
;
i
++
)
{
s
<<
rArgs
.
mpDXArray
[
i
];
if
(
i
<
lim
-
1
)
s
<<
","
;
}
if
(
count
>
lim
)
{
if
(
count
>
lim
+
1
)
s
<<
"..."
;
s
<<
rArgs
.
mpDXArray
[
count
-
1
];
}
s
<<
"]"
;
}
else
s
<<
"NULL"
;
s
<<
",LayoutWidth="
<<
rArgs
.
mnLayoutWidth
;
s
<<
"}"
;
#endif
return
s
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
ImplLayoutArgs
&
rArgs
);
// helper functions often used with ImplLayoutArgs
bool
IsDiacritic
(
sal_UCS4
);
...
...
vcl/source/gdi/sallayout.cxx
Dosyayı görüntüle @
2a1e3dff
...
...
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <iostream>
#include <iomanip>
#include "sal/config.h"
#include <cstdio>
...
...
@@ -69,6 +72,87 @@ FILE * mslLog()
#endif
// =======================================================================
std
::
ostream
&
operator
<<
(
std
::
ostream
&
s
,
ImplLayoutArgs
&
rArgs
)
{
#ifndef SAL_LOG_INFO
(
void
)
rArgs
;
#else
s
<<
"ImplLayoutArgs{"
;
s
<<
"Flags="
;
if
(
rArgs
.
mnFlags
==
0
)
s
<<
0
;
else
{
bool
need_or
=
false
;
s
<<
"{"
;
#define TEST(x) if (rArgs.mnFlags & SAL_LAYOUT_##x) { if (need_or) s << "|"; s << #x; need_or = true; }
TEST
(
BIDI_RTL
);
TEST
(
BIDI_STRONG
);
TEST
(
RIGHT_ALIGN
);
TEST
(
KERNING_PAIRS
);
TEST
(
KERNING_ASIAN
);
TEST
(
VERTICAL
);
TEST
(
COMPLEX_DISABLED
);
TEST
(
ENABLE_LIGATURES
);
TEST
(
SUBSTITUTE_DIGITS
);
TEST
(
KASHIDA_JUSTIFICATON
);
TEST
(
DISABLE_GLYPH_PROCESSING
);
TEST
(
FOR_FALLBACK
);
#undef TEST
s
<<
"}"
;
}
s
<<
",Length="
<<
rArgs
.
mnLength
;
s
<<
",MinCharPos="
<<
rArgs
.
mnMinCharPos
;
s
<<
",EndCharPos="
<<
rArgs
.
mnEndCharPos
;
s
<<
",Str=
\"
"
;
int
lim
=
rArgs
.
mnLength
;
if
(
lim
>
10
)
lim
=
7
;
for
(
int
i
=
0
;
i
<
lim
;
i
++
)
{
if
(
rArgs
.
mpStr
[
i
]
==
'\n'
)
s
<<
"
\\
n"
;
else
if
(
rArgs
.
mpStr
[
i
]
<
' '
||
(
rArgs
.
mpStr
[
i
]
>=
0x7F
&&
rArgs
.
mpStr
[
i
]
<=
0xFF
))
s
<<
"
\\
0x"
<<
std
::
hex
<<
std
::
setw
(
2
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
rArgs
.
mpStr
[
i
]
<<
std
::
setfill
(
' '
)
<<
std
::
setw
(
1
)
<<
std
::
dec
;
else
if
(
rArgs
.
mpStr
[
i
]
<
0x7F
)
s
<<
(
char
)
rArgs
.
mpStr
[
i
];
else
s
<<
"
\\
u"
<<
std
::
hex
<<
std
::
setw
(
4
)
<<
std
::
setfill
(
'0'
)
<<
(
int
)
rArgs
.
mpStr
[
i
]
<<
std
::
setfill
(
' '
)
<<
std
::
setw
(
1
)
<<
std
::
dec
;
}
if
(
rArgs
.
mnLength
>
lim
)
s
<<
"..."
;
s
<<
"
\"
"
;
s
<<
",DXArray="
;
if
(
rArgs
.
mpDXArray
)
{
s
<<
"["
;
int
count
=
rArgs
.
mnEndCharPos
-
rArgs
.
mnMinCharPos
;
lim
=
count
;
if
(
lim
>
10
)
lim
=
7
;
for
(
int
i
=
0
;
i
<
lim
;
i
++
)
{
s
<<
rArgs
.
mpDXArray
[
i
];
if
(
i
<
lim
-
1
)
s
<<
","
;
}
if
(
count
>
lim
)
{
if
(
count
>
lim
+
1
)
s
<<
"..."
;
s
<<
rArgs
.
mpDXArray
[
count
-
1
];
}
s
<<
"]"
;
}
else
s
<<
"NULL"
;
s
<<
",LayoutWidth="
<<
rArgs
.
mnLayoutWidth
;
s
<<
"}"
;
#endif
return
s
;
}
// TODO: ask the glyph directly, for now we need this method because of #i99367#
// true if a codepoint doesn't influence the logical text width
bool
IsDiacritic
(
sal_UCS4
nChar
)
...
...
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