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
94a569c2
Kaydet (Commit)
94a569c2
authored
Eki 31, 2013
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't hard-code the start row position of string array to 0...
Change-Id: I06724e2e8754ac20217f5375a445c85f9a5b31e6
üst
6d2f4219
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
6 deletions
+39
-6
opencl-test.cxx
sc/qa/unit/opencl-test.cxx
+3
-4
ucalc_formula.cxx
sc/qa/unit/ucalc_formula.cxx
+35
-1
column2.cxx
sc/source/core/data/column2.cxx
+1
-1
No files found.
sc/qa/unit/opencl-test.cxx
Dosyayı görüntüle @
94a569c2
...
...
@@ -237,13 +237,12 @@ void ScOpenclTest::testCompilerString()
// Check the results of formula cells in the shared formula range.
for
(
SCROW
i
=
1
;
i
<
5
;
++
i
)
{
#if 0
double
fLibre
=
pDoc
->
GetValue
(
ScAddress
(
2
,
i
,
0
));
double
fExcel
=
pDocRes
->
GetValue
(
ScAddress
(
2
,
i
,
0
));
CPPUNIT_ASSERT_DOUBLES_EQUAL
(
fExcel
,
fLibre
,
fabs
(
0.0001
*
fExcel
));
#endif
double
fLibre
=
pDoc
->
GetValue
(
ScAddress
(
3
,
i
,
0
));
double
fExcel
=
pDocRes
->
GetValue
(
ScAddress
(
3
,
i
,
0
));
fLibre
=
pDoc
->
GetValue
(
ScAddress
(
3
,
i
,
0
));
fExcel
=
pDocRes
->
GetValue
(
ScAddress
(
3
,
i
,
0
));
CPPUNIT_ASSERT_DOUBLES_EQUAL
(
fExcel
,
fLibre
,
fabs
(
0.0001
*
fExcel
));
}
xDocSh
->
DoClose
();
...
...
sc/qa/unit/ucalc_formula.cxx
Dosyayı görüntüle @
94a569c2
...
...
@@ -61,7 +61,13 @@ bool equals( const formula::VectorRefArray& rArray, size_t nPos, const OUString&
if
(
!
rArray
.
mpStringArray
)
return
false
;
return
OUString
(
rArray
.
mpStringArray
[
nPos
]).
equalsIgnoreAsciiCase
(
rVal
);
bool
bEquals
=
OUString
(
rArray
.
mpStringArray
[
nPos
]).
equalsIgnoreAsciiCase
(
rVal
);
if
(
!
bEquals
)
{
cerr
<<
"Expected: "
<<
rVal
.
toAsciiUpperCase
()
<<
" (upcased)"
<<
endl
;
cerr
<<
"Actual: "
<<
OUString
(
rArray
.
mpStringArray
[
nPos
])
<<
" (upcased)"
<<
endl
;
}
return
bEquals
;
}
}
...
...
@@ -235,6 +241,34 @@ void Test::testFetchVectorRefArray()
CPPUNIT_ASSERT_MESSAGE
(
"Array should have a numeric array."
,
aArray
.
mpNumericArray
);
CPPUNIT_ASSERT_MESSAGE
(
"Array should NOT have a string array."
,
!
aArray
.
mpStringArray
);
// Column G consists only of strings.
m_pDoc
->
SetString
(
ScAddress
(
6
,
0
,
0
),
"Title"
);
m_pDoc
->
SetString
(
ScAddress
(
6
,
1
,
0
),
"foo"
);
m_pDoc
->
SetString
(
ScAddress
(
6
,
2
,
0
),
"bar"
);
m_pDoc
->
SetString
(
ScAddress
(
6
,
3
,
0
),
"foo"
);
m_pDoc
->
SetString
(
ScAddress
(
6
,
4
,
0
),
"baz"
);
m_pDoc
->
SetString
(
ScAddress
(
6
,
5
,
0
),
"quack"
);
m_pDoc
->
SetString
(
ScAddress
(
6
,
6
,
0
),
"beep"
);
m_pDoc
->
SetString
(
ScAddress
(
6
,
7
,
0
),
"kerker"
);
aArray
=
m_pDoc
->
FetchVectorRefArray
(
ScAddress
(
6
,
1
,
0
),
4
);
// G2:G5
CPPUNIT_ASSERT_MESSAGE
(
"Failed to fetch vector ref array."
,
aArray
.
isValid
());
CPPUNIT_ASSERT_MESSAGE
(
"Array should NOT have a numeric array."
,
!
aArray
.
mpNumericArray
);
CPPUNIT_ASSERT_MESSAGE
(
"Array should have a string array."
,
aArray
.
mpStringArray
);
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
0
,
"foo"
));
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
1
,
"bar"
));
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
2
,
"foo"
));
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
3
,
"baz"
));
aArray
=
m_pDoc
->
FetchVectorRefArray
(
ScAddress
(
6
,
2
,
0
),
4
);
// G3:G6
CPPUNIT_ASSERT_MESSAGE
(
"Failed to fetch vector ref array."
,
aArray
.
isValid
());
CPPUNIT_ASSERT_MESSAGE
(
"Array should NOT have a numeric array."
,
!
aArray
.
mpNumericArray
);
CPPUNIT_ASSERT_MESSAGE
(
"Array should have a string array."
,
aArray
.
mpStringArray
);
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
0
,
"bar"
));
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
1
,
"foo"
));
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
2
,
"baz"
));
CPPUNIT_ASSERT_MESSAGE
(
"Unexpected string cell."
,
equals
(
aArray
,
3
,
"quack"
));
m_pDoc
->
DeleteTab
(
0
);
}
...
...
sc/source/core/data/column2.cxx
Dosyayı görüntüle @
94a569c2
...
...
@@ -2722,7 +2722,7 @@ formula::VectorRefArray ScColumn::FetchVectorRefArray( SCROW nRow1, SCROW nRow2
{
// Requested range falls within the first block.
copyFirstStringBlock
(
*
pDocument
,
rArray
,
nRow2
+
1
,
itBlk
);
return
formula
::
VectorRefArray
(
&
rArray
[
0
]);
return
formula
::
VectorRefArray
(
&
rArray
[
nRow1
]);
}
copyFirstStringBlock
(
*
pDocument
,
rArray
,
itBlk
->
size
,
itBlk
);
...
...
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