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
e92ed156
Kaydet (Commit)
e92ed156
authored
Mar 13, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Annotate this algorithm & a few cleanup and one possible bug fix.
Change-Id: Ifd101364119db7c30ba28e66b4a8b1320a54fe66
üst
a8da9a9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
11 deletions
+21
-11
documen8.cxx
sc/source/core/data/documen8.cxx
+21
-11
No files found.
sc/source/core/data/documen8.cxx
Dosyayı görüntüle @
e92ed156
...
@@ -482,12 +482,13 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
...
@@ -482,12 +482,13 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
if
(
pStyle
&&
0
==
GET_SCALEVALUE
(
pStyle
->
GetItemSet
(),
ATTR_PAGE_SCALETOPAGES
)
)
if
(
pStyle
&&
0
==
GET_SCALEVALUE
(
pStyle
->
GetItemSet
(),
ATTR_PAGE_SCALETOPAGES
)
)
{
{
sal_uInt16
nRestart
=
0
;
sal_uInt16
nRestart
=
0
;
sal_uInt16
nZoom
=
0
;
sal_uInt16
nCount
=
0
;
sal_uInt16
nCount
=
0
;
ScBaseCell
*
pCell
=
NULL
;
ScBaseCell
*
pCell
=
NULL
;
nZoom
=
GET_SCALEVALUE
(
pStyle
->
GetItemSet
(),
ATTR_PAGE_SCALE
);
sal_uInt16
nZoom
=
GET_SCALEVALUE
(
pStyle
->
GetItemSet
(),
ATTR_PAGE_SCALE
);
Fraction
aZoomFract
(
nZoom
,
100
);
Fraction
aZoomFract
(
nZoom
,
100
);
// Start at specified cell position (nCol, nRow, nTab).
ScColumn
*
pColumn
=
&
pTable
->
aCol
[
nCol
];
ScColumn
*
pColumn
=
&
pTable
->
aCol
[
nCol
];
pColIter
=
new
ScColumnIterator
(
pColumn
,
nRow
,
MAXROW
);
pColIter
=
new
ScColumnIterator
(
pColumn
,
nRow
,
MAXROW
);
...
@@ -495,8 +496,11 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
...
@@ -495,8 +496,11 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
{
{
if
(
pColIter
->
Next
(
nRow
,
pCell
)
)
if
(
pColIter
->
Next
(
nRow
,
pCell
)
)
{
{
// More cell in this column.
if
(
TEXTWIDTH_DIRTY
==
pCell
->
GetTextWidth
()
)
if
(
TEXTWIDTH_DIRTY
==
pCell
->
GetTextWidth
()
)
{
{
// Calculate text width for this cell.
double
nPPTX
=
0.0
;
double
nPPTX
=
0.0
;
double
nPPTY
=
0.0
;
double
nPPTY
=
0.0
;
if
(
!
pDev
)
if
(
!
pDev
)
...
@@ -528,6 +532,8 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
...
@@ -528,6 +532,8 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
}
}
else
else
{
{
// No more cell in this column. Move to the left column and start at row 0.
bool
bNewTab
=
false
;
bool
bNewTab
=
false
;
nRow
=
0
;
nRow
=
0
;
...
@@ -535,6 +541,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
...
@@ -535,6 +541,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
if
(
nCol
<
0
)
if
(
nCol
<
0
)
{
{
// No more column to the left. Move to the right-most column of the next sheet.
nCol
=
MAXCOL
;
nCol
=
MAXCOL
;
nTab
++
;
nTab
++
;
bNewTab
=
true
;
bNewTab
=
true
;
...
@@ -542,6 +549,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
...
@@ -542,6 +549,7 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
if
(
!
ValidTab
(
nTab
)
||
nTab
>=
static_cast
<
SCTAB
>
(
maTabs
.
size
())
||
!
maTabs
[
nTab
]
)
if
(
!
ValidTab
(
nTab
)
||
nTab
>=
static_cast
<
SCTAB
>
(
maTabs
.
size
())
||
!
maTabs
[
nTab
]
)
{
{
// Sheet doesn't exist at specified sheet position. Restart at sheet 0.
nTab
=
0
;
nTab
=
0
;
nRestart
++
;
nRestart
++
;
bNewTab
=
true
;
bNewTab
=
true
;
...
@@ -557,9 +565,15 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
...
@@ -557,9 +565,15 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
if
(
pStyle
)
if
(
pStyle
)
{
{
// Check if the scale-to-pages setting is set. If
// set, we exit the loop. If not, get the page
// scale factor of the new sheet.
SfxItemSet
&
rSet
=
pStyle
->
GetItemSet
();
SfxItemSet
&
rSet
=
pStyle
->
GetItemSet
();
if
(
GET_SCALEVALUE
(
rSet
,
ATTR_PAGE_SCALETOPAGES
)
==
0
)
if
(
GET_SCALEVALUE
(
rSet
,
ATTR_PAGE_SCALETOPAGES
)
==
0
)
{
nZoom
=
GET_SCALEVALUE
(
rSet
,
ATTR_PAGE_SCALE
);
nZoom
=
GET_SCALEVALUE
(
rSet
,
ATTR_PAGE_SCALE
);
aZoomFract
=
Fraction
(
nZoom
,
100
);
}
else
else
nZoom
=
0
;
nZoom
=
0
;
}
}
...
@@ -577,24 +591,20 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
...
@@ -577,24 +591,20 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers
pColIter
=
new
ScColumnIterator
(
pColumn
,
nRow
,
MAXROW
);
pColIter
=
new
ScColumnIterator
(
pColumn
,
nRow
,
MAXROW
);
}
}
else
else
nTab
++
;
// Tabelle nicht mit absolutem Zoom -> naechste
++
nTab
;
// Move to the next sheet as the current one has scale-to-pages set.
}
}
}
}
nCount
++
;
nCount
++
;
// Idle Berechnung abbrechen, wenn Berechnungen laenger als
// Quit if either 1) its duration exceeds 50 ms, or 2) there is
// 50ms dauern, oder nach 32 Berechnungen mal nachschauen, ob
// any pending event after processing 32 cells.
// bestimmte Events anstehen, die Beachtung wuenschen:
if
((
50L
<
Time
::
GetSystemTicks
()
-
nStart
)
||
(
nCount
>
31
&&
Application
::
AnyInput
(
ABORT_EVENTS
)))
if
(
(
50L
<
Time
::
GetSystemTicks
()
-
nStart
)
||
(
!
(
nCount
&
31
)
&&
Application
::
AnyInput
(
ABORT_EVENTS
)
)
)
nCount
=
CALCMAX
;
nCount
=
CALCMAX
;
}
}
}
}
else
else
nTab
++
;
// Tabelle nicht mit absolutem Zoom -> naechste
++
nTab
;
// Move to the next sheet as the current one has scale-to-pages set.
if
(
bProgress
)
if
(
bProgress
)
ScProgress
::
DeleteInterpretProgress
();
ScProgress
::
DeleteInterpretProgress
();
...
...
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