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
e4be770e
Kaydet (Commit)
e4be770e
authored
Şub 02, 2014
tarafından
Michael Stahl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add std::ostream operators for Region and PolyPolygon
Change-Id: I8f4129b840a27f3029643ad2a4852f9e10604905
üst
9b9eb2e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
poly.hxx
include/tools/poly.hxx
+12
-0
region.hxx
include/vcl/region.hxx
+29
-0
No files found.
include/tools/poly.hxx
Dosyayı görüntüle @
e4be770e
...
...
@@ -278,6 +278,18 @@ public:
typedef
std
::
vector
<
PolyPolygon
>
PolyPolyVector
;
template
<
typename
charT
,
typename
traits
>
inline
std
::
basic_ostream
<
charT
,
traits
>
&
operator
<<
(
std
::
basic_ostream
<
charT
,
traits
>
&
stream
,
const
PolyPolygon
&
rPolyPoly
)
{
if
(
!
rPolyPoly
.
Count
())
stream
<<
"EMPTY"
;
for
(
sal_uInt16
i
=
0
;
i
<
rPolyPoly
.
Count
();
++
i
)
stream
<<
"["
<<
i
<<
"] "
<<
rPolyPoly
.
GetObject
(
i
);
return
stream
;
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
include/vcl/region.hxx
Dosyayı görüntüle @
e4be770e
...
...
@@ -126,6 +126,35 @@ public:
static
Region
GetRegionFromPolyPolygon
(
const
PolyPolygon
&
rPolyPoly
);
};
template
<
typename
charT
,
typename
traits
>
inline
std
::
basic_ostream
<
charT
,
traits
>
&
operator
<<
(
std
::
basic_ostream
<
charT
,
traits
>
&
stream
,
const
Region
&
rRegion
)
{
if
(
rRegion
.
IsEmpty
())
return
stream
<<
"EMPTY"
;
if
(
rRegion
.
getB2DPolyPolygon
())
return
stream
<<
"B2DPolyPolygon("
<<
*
rRegion
.
getB2DPolyPolygon
()
<<
")"
;
if
(
rRegion
.
getPolyPolygon
())
return
stream
<<
"PolyPolygon("
<<
*
rRegion
.
getPolyPolygon
()
<<
")"
;
if
(
rRegion
.
getRegionBand
())
{
// inlined because RegionBand is private to vcl
stream
<<
"RegionBand("
;
RectangleVector
rects
;
rRegion
.
GetRegionRectangles
(
rects
);
if
(
rects
.
empty
())
stream
<<
"EMPTY"
;
for
(
size_t
i
=
0
;
i
<
rects
.
size
();
++
i
)
stream
<<
"["
<<
i
<<
"] "
<<
rects
[
i
];
stream
<<
")"
;
}
return
stream
;
}
#endif // INCLUDED_VCL_REGION_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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