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
7d48d41d
Kaydet (Commit)
7d48d41d
authored
Ara 29, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
don't remove blank rows/cols more than once
Change-Id: I7b46ac1f9fcca5a3ae9dbb6b6c4f92917f522295
üst
fd38d60c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
7 deletions
+41
-7
layout.cxx
vcl/source/window/layout.cxx
+41
-7
No files found.
vcl/source/window/layout.cxx
Dosyayı görüntüle @
7d48d41d
...
...
@@ -543,11 +543,14 @@ VclGrid::array_type VclGrid::assembleGrid() const
}
}
//reduce the spans of elements that span empty
rows or
columns
//reduce the spans of elements that span empty columns
for
(
sal_Int32
x
=
0
;
x
<
nMaxX
;
++
x
)
{
std
::
set
<
ExtendedGridEntry
*>
candidates
;
for
(
sal_Int32
y
=
0
;
y
<
nMaxY
;
++
y
)
{
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
...
...
@@ -558,10 +561,41 @@ VclGrid::array_type VclGrid::assembleGrid() const
continue
;
}
ExtendedGridEntry
&
rEntry
=
A
[
rSpan
.
x
][
rSpan
.
y
];
if
(
aNonEmptyCols
[
x
]
==
false
)
--
rEntry
.
nSpanWidth
;
if
(
aNonEmptyRows
[
y
]
==
false
)
--
rEntry
.
nSpanHeight
;
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
)
{
std
::
set
<
ExtendedGridEntry
*>
candidates
;
for
(
sal_Int32
x
=
0
;
x
<
nMaxX
;
++
x
)
{
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
;
}
}
...
...
@@ -612,7 +646,7 @@ void VclGrid::calcMaxs(const array_type &A, std::vector<Value> &rWidths, std::ve
{
const
GridEntry
&
rEntry
=
A
[
x
][
y
];
const
Window
*
pChild
=
rEntry
.
pChild
;
if
(
!
pChild
)
if
(
!
pChild
||
!
pChild
->
IsVisible
()
)
continue
;
sal_Int32
nWidth
=
rEntry
.
nSpanWidth
;
...
...
@@ -643,7 +677,7 @@ void VclGrid::calcMaxs(const array_type &A, std::vector<Value> &rWidths, std::ve
{
const
GridEntry
&
rEntry
=
A
[
x
][
y
];
const
Window
*
pChild
=
rEntry
.
pChild
;
if
(
!
pChild
)
if
(
!
pChild
||
!
pChild
->
IsVisible
()
)
continue
;
sal_Int32
nWidth
=
rEntry
.
nSpanWidth
;
...
...
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