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
45cb9295
Kaydet (Commit)
45cb9295
authored
Agu 21, 2013
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
keep empty spanned rows/cols for homogeneous grids
Change-Id: I5560ae291cd5bf9e5f57a5bad5ecdfe7a6cd0bb8
üst
22d1beb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
42 deletions
+58
-42
layout.cxx
vcl/source/window/layout.cxx
+58
-42
No files found.
vcl/source/window/layout.cxx
Dosyayı görüntüle @
45cb9295
...
...
@@ -774,64 +774,80 @@ VclGrid::array_type VclGrid::assembleGrid() const
if
(
pChild
&&
pChild
->
IsVisible
())
{
aNonEmptyCols
[
x
]
=
true
;
if
(
get_column_homogeneous
())
{
for
(
sal_Int32
nSpanX
=
1
;
nSpanX
<
rEntry
.
nSpanWidth
;
++
nSpanX
)
aNonEmptyCols
[
x
+
1
]
=
true
;
}
aNonEmptyRows
[
y
]
=
true
;
if
(
get_row_homogeneous
())
{
for
(
sal_Int32
nSpanY
=
1
;
nSpanY
<
rEntry
.
nSpanHeight
;
++
nSpanY
)
aNonEmptyRows
[
x
+
1
]
=
true
;
}
}
}
}
//reduce the spans of elements that span empty columns
for
(
sal_Int32
x
=
0
;
x
<
nMaxX
;
++
x
)
if
(
!
get_column_homogeneous
())
{
std
::
set
<
ExtendedGridEntry
*>
candidates
;
for
(
sal_Int32
y
=
0
;
y
<
nMaxY
;
++
y
)
//reduce the spans of elements that span empty columns
for
(
sal_Int32
x
=
0
;
x
<
nMaxX
;
++
x
)
{
if
(
aNonEmptyCols
[
x
])
continue
;
ExtendedGridEntry
&
rSpan
=
A
[
x
][
y
];
//cell x/y is spanned by the widget at cell rSpan.x/rSpan.y,
//just points back to itself if there's no cell spanning
if
((
rSpan
.
x
==
-
1
)
||
(
rSpan
.
y
==
-
1
))
std
::
set
<
ExtendedGridEntry
*>
candidates
;
for
(
sal_Int32
y
=
0
;
y
<
nMaxY
;
++
y
)
{
//there is no entry for this cell, i.e. this is a cell
//with no widget in it, or spanned by any other widget
continue
;
if
(
aNonEmptyCols
[
x
])
continue
;
ExtendedGridEntry
&
rSpan
=
A
[
x
][
y
];
//cell x/y is spanned by the widget at cell rSpan.x/rSpan.y,
//just points back to itself if there's no cell spanning
if
((
rSpan
.
x
==
-
1
)
||
(
rSpan
.
y
==
-
1
))
{
//there is no entry for this cell, i.e. this is a cell
//with no widget in it, or spanned by any other widget
continue
;
}
ExtendedGridEntry
&
rEntry
=
A
[
rSpan
.
x
][
rSpan
.
y
];
candidates
.
insert
(
&
rEntry
);
}
for
(
std
::
set
<
ExtendedGridEntry
*>::
iterator
aI
=
candidates
.
begin
(),
aEnd
=
candidates
.
end
();
aI
!=
aEnd
;
++
aI
)
{
ExtendedGridEntry
*
pEntry
=
*
aI
;
--
pEntry
->
nSpanWidth
;
}
ExtendedGridEntry
&
rEntry
=
A
[
rSpan
.
x
][
rSpan
.
y
];
candidates
.
insert
(
&
rEntry
);
}
for
(
std
::
set
<
ExtendedGridEntry
*>::
iterator
aI
=
candidates
.
begin
(),
aEnd
=
candidates
.
end
();
aI
!=
aEnd
;
++
aI
)
{
ExtendedGridEntry
*
pEntry
=
*
aI
;
--
pEntry
->
nSpanWidth
;
}
}
//reduce the spans of elements that span empty rows
for
(
sal_Int32
y
=
0
;
y
<
nMaxY
;
++
y
)
if
(
!
get_row_homogeneous
())
{
std
::
set
<
ExtendedGridEntry
*>
candidates
;
for
(
sal_Int32
x
=
0
;
x
<
nMaxX
;
++
x
)
//reduce the spans of elements that span empty rows
for
(
sal_Int32
y
=
0
;
y
<
nMaxY
;
++
y
)
{
if
(
aNonEmptyRows
[
y
])
continue
;
ExtendedGridEntry
&
rSpan
=
A
[
x
][
y
];
//cell x/y is spanned by the widget at cell rSpan.x/rSpan.y,
//just points back to itself if there's no cell spanning
if
((
rSpan
.
x
==
-
1
)
||
(
rSpan
.
y
==
-
1
))
std
::
set
<
ExtendedGridEntry
*>
candidates
;
for
(
sal_Int32
x
=
0
;
x
<
nMaxX
;
++
x
)
{
//there is no entry for this cell, i.e. this is a cell
//with no widget in it, or spanned by any other widget
continue
;
if
(
aNonEmptyRows
[
y
])
continue
;
ExtendedGridEntry
&
rSpan
=
A
[
x
][
y
];
//cell x/y is spanned by the widget at cell rSpan.x/rSpan.y,
//just points back to itself if there's no cell spanning
if
((
rSpan
.
x
==
-
1
)
||
(
rSpan
.
y
==
-
1
))
{
//there is no entry for this cell, i.e. this is a cell
//with no widget in it, or spanned by any other widget
continue
;
}
ExtendedGridEntry
&
rEntry
=
A
[
rSpan
.
x
][
rSpan
.
y
];
candidates
.
insert
(
&
rEntry
);
}
for
(
std
::
set
<
ExtendedGridEntry
*>::
iterator
aI
=
candidates
.
begin
(),
aEnd
=
candidates
.
end
();
aI
!=
aEnd
;
++
aI
)
{
ExtendedGridEntry
*
pEntry
=
*
aI
;
--
pEntry
->
nSpanHeight
;
}
ExtendedGridEntry
&
rEntry
=
A
[
rSpan
.
x
][
rSpan
.
y
];
candidates
.
insert
(
&
rEntry
);
}
for
(
std
::
set
<
ExtendedGridEntry
*>::
iterator
aI
=
candidates
.
begin
(),
aEnd
=
candidates
.
end
();
aI
!=
aEnd
;
++
aI
)
{
ExtendedGridEntry
*
pEntry
=
*
aI
;
--
pEntry
->
nSpanHeight
;
}
}
...
...
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