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
a0e7d661
Kaydet (Commit)
a0e7d661
authored
Şub 05, 2012
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed unused variable
üst
22dc17dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
valueset.cxx
svtools/source/control/valueset.cxx
+10
-16
No files found.
svtools/source/control/valueset.cxx
Dosyayı görüntüle @
a0e7d661
...
@@ -339,7 +339,6 @@ void ValueSet::Format()
...
@@ -339,7 +339,6 @@ void ValueSet::Format()
WinBits
nStyle
=
GetStyle
();
WinBits
nStyle
=
GetStyle
();
long
nTxtHeight
=
GetTextHeight
();
long
nTxtHeight
=
GetTextHeight
();
long
nOff
;
long
nOff
;
long
nSpace
;
long
nNoneHeight
;
long
nNoneHeight
;
long
nNoneSpace
;
long
nNoneSpace
;
ScrollBar
*
pDelScrBar
=
NULL
;
ScrollBar
*
pDelScrBar
=
NULL
;
...
@@ -367,7 +366,6 @@ void ValueSet::Format()
...
@@ -367,7 +366,6 @@ void ValueSet::Format()
}
}
else
else
nOff
=
0
;
nOff
=
0
;
nSpace
=
mnSpacing
;
// consider size, if NameField does exist
// consider size, if NameField does exist
if
(
nStyle
&
WB_NAMEFIELD
)
if
(
nStyle
&
WB_NAMEFIELD
)
...
@@ -388,7 +386,7 @@ void ValueSet::Format()
...
@@ -388,7 +386,7 @@ void ValueSet::Format()
if
(
nStyle
&
WB_NONEFIELD
)
if
(
nStyle
&
WB_NONEFIELD
)
{
{
nNoneHeight
=
nTxtHeight
+
nOff
;
nNoneHeight
=
nTxtHeight
+
nOff
;
nNoneSpace
=
nSpace
;
nNoneSpace
=
mnSpacing
;
if
(
nStyle
&
WB_RADIOSEL
)
if
(
nStyle
&
WB_RADIOSEL
)
nNoneHeight
+=
8
;
nNoneHeight
+=
8
;
}
}
...
@@ -414,7 +412,7 @@ void ValueSet::Format()
...
@@ -414,7 +412,7 @@ void ValueSet::Format()
{
{
if
(
mnUserItemWidth
)
if
(
mnUserItemWidth
)
{
{
mnCols
=
(
sal_uInt16
)((
aWinSize
.
Width
()
-
nScrBarWidth
+
nSpace
)
/
(
mnUserItemWidth
+
nSpace
));
mnCols
=
(
sal_uInt16
)((
aWinSize
.
Width
()
-
nScrBarWidth
+
mnSpacing
)
/
(
mnUserItemWidth
+
mnSpacing
));
if
(
!
mnCols
)
if
(
!
mnCols
)
mnCols
=
1
;
mnCols
=
1
;
}
}
...
@@ -437,7 +435,7 @@ void ValueSet::Format()
...
@@ -437,7 +435,7 @@ void ValueSet::Format()
mnVisLines
=
mnUserVisLines
;
mnVisLines
=
mnUserVisLines
;
else
if
(
mnUserItemHeight
)
else
if
(
mnUserItemHeight
)
{
{
mnVisLines
=
(
nCalcHeight
-
nNoneSpace
+
nSpace
)
/
(
mnUserItemHeight
+
nSpace
);
mnVisLines
=
(
nCalcHeight
-
nNoneSpace
+
mnSpacing
)
/
(
mnUserItemHeight
+
mnSpacing
);
if
(
!
mnVisLines
)
if
(
!
mnVisLines
)
mnVisLines
=
1
;
mnVisLines
=
1
;
}
}
...
@@ -454,8 +452,8 @@ void ValueSet::Format()
...
@@ -454,8 +452,8 @@ void ValueSet::Format()
}
}
// calculate item size
// calculate item size
long
nColSpace
=
(
mnCols
-
1
)
*
nSpace
;
long
nColSpace
=
(
mnCols
-
1
)
*
mnSpacing
;
long
nLineSpace
=
((
mnVisLines
-
1
)
*
nSpace
)
+
nNoneSpace
;
long
nLineSpace
=
((
mnVisLines
-
1
)
*
mnSpacing
)
+
nNoneSpace
;
long
nItemWidth
;
long
nItemWidth
;
long
nItemHeight
;
long
nItemHeight
;
if
(
mnUserItemWidth
&&
!
mnUserCols
)
if
(
mnUserItemWidth
&&
!
mnUserCols
)
...
@@ -583,7 +581,7 @@ void ValueSet::Format()
...
@@ -583,7 +581,7 @@ void ValueSet::Format()
// If want also draw parts of items in the last line,
// If want also draw parts of items in the last line,
// then we add one more line if parts of these line are
// then we add one more line if parts of these line are
// visible
// visible
if
(
y
+
(
mnVisLines
*
(
nItemHeight
+
nSpace
))
<
aWinSize
.
Height
()
)
if
(
y
+
(
mnVisLines
*
(
nItemHeight
+
mnSpacing
))
<
aWinSize
.
Height
()
)
nLastItem
+=
mnCols
;
nLastItem
+=
mnCols
;
}
}
for
(
size_t
i
=
0
;
i
<
nItemCount
;
i
++
)
for
(
size_t
i
=
0
;
i
<
nItemCount
;
i
++
)
...
@@ -612,10 +610,10 @@ void ValueSet::Format()
...
@@ -612,10 +610,10 @@ void ValueSet::Format()
if
(
!
((
i
+
1
)
%
mnCols
)
)
if
(
!
((
i
+
1
)
%
mnCols
)
)
{
{
x
=
nStartX
;
x
=
nStartX
;
y
+=
nItemHeight
+
nSpace
;
y
+=
nItemHeight
+
mnSpacing
;
}
}
else
else
x
+=
nItemWidth
+
nSpace
;
x
+=
nItemWidth
+
mnSpacing
;
}
}
else
else
{
{
...
@@ -640,7 +638,7 @@ void ValueSet::Format()
...
@@ -640,7 +638,7 @@ void ValueSet::Format()
if
(
nStyle
&
WB_NONEFIELD
)
if
(
nStyle
&
WB_NONEFIELD
)
{
{
aPos
.
Y
()
=
nStartY
+
nNoneHeight
+
1
;
aPos
.
Y
()
=
nStartY
+
nNoneHeight
+
1
;
aSize
.
Height
()
=
((
nItemHeight
+
nSpace
)
*
mnVisLines
)
-
2
-
nSpace
;
aSize
.
Height
()
=
((
nItemHeight
+
mnSpacing
)
*
mnVisLines
)
-
2
-
mnSpacing
;
}
}
mpScrBar
->
SetPosSizePixel
(
aPos
,
aSize
);
mpScrBar
->
SetPosSizePixel
(
aPos
,
aSize
);
mpScrBar
->
SetRangeMax
(
mnLines
);
mpScrBar
->
SetRangeMax
(
mnLines
);
...
@@ -2380,7 +2378,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
...
@@ -2380,7 +2378,6 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
Size
aSize
(
rItemSize
.
Width
()
*
nCalcCols
,
rItemSize
.
Height
()
*
nCalcLines
);
Size
aSize
(
rItemSize
.
Width
()
*
nCalcCols
,
rItemSize
.
Height
()
*
nCalcLines
);
WinBits
nStyle
=
GetStyle
();
WinBits
nStyle
=
GetStyle
();
long
nTxtHeight
=
GetTextHeight
();
long
nTxtHeight
=
GetTextHeight
();
long
nSpace
;
long
n
;
long
n
;
if
(
nStyle
&
WB_ITEMBORDER
)
if
(
nStyle
&
WB_ITEMBORDER
)
...
@@ -2398,12 +2395,9 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
...
@@ -2398,12 +2395,9 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
if
(
mnSpacing
)
if
(
mnSpacing
)
{
{
nSpace
=
mnSpacing
;
aSize
.
Width
()
+=
mnSpacing
*
(
nCalcCols
-
1
);
aSize
.
Width
()
+=
mnSpacing
*
(
nCalcCols
-
1
);
aSize
.
Height
()
+=
mnSpacing
*
(
nCalcLines
-
1
);
aSize
.
Height
()
+=
mnSpacing
*
(
nCalcLines
-
1
);
}
}
else
nSpace
=
0
;
if
(
nStyle
&
WB_NAMEFIELD
)
if
(
nStyle
&
WB_NAMEFIELD
)
{
{
...
@@ -2414,7 +2408,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
...
@@ -2414,7 +2408,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol
if
(
nStyle
&
WB_NONEFIELD
)
if
(
nStyle
&
WB_NONEFIELD
)
{
{
aSize
.
Height
()
+=
nTxtHeight
+
n
+
nSpace
;
aSize
.
Height
()
+=
nTxtHeight
+
n
+
mnSpacing
;
if
(
nStyle
&
WB_RADIOSEL
)
if
(
nStyle
&
WB_RADIOSEL
)
aSize
.
Height
()
+=
8
;
aSize
.
Height
()
+=
8
;
}
}
...
...
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