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
964ddc14
Kaydet (Commit)
964ddc14
authored
Ock 10, 2015
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
std::cout to SAL_INFO
Change-Id: I92c48f71baa24cef3b061b9bb6853b99ea1546d4
üst
c32a5a3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
macros-test.cxx
sc/qa/extras/macros-test.cxx
+4
-7
No files found.
sc/qa/extras/macros-test.cxx
Dosyayı görüntüle @
964ddc14
...
@@ -69,7 +69,6 @@ void ScMacrosTest::testMSP()
...
@@ -69,7 +69,6 @@ void ScMacrosTest::testMSP()
const
OUString
aFileNameBase
(
"MasterScriptProviderProblem.ods"
);
const
OUString
aFileNameBase
(
"MasterScriptProviderProblem.ods"
);
OUString
aFileName
;
OUString
aFileName
;
createFileURL
(
aFileNameBase
,
aFileName
);
createFileURL
(
aFileNameBase
,
aFileName
);
std
::
cout
<<
"MasterScriptProviderProblem (fdo#67547) test"
<<
std
::
endl
;
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XComponent
>
xComponent
=
loadFromDesktop
(
aFileName
,
"com.sun.star.sheet.SpreadsheetDocument"
);
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XComponent
>
xComponent
=
loadFromDesktop
(
aFileName
,
"com.sun.star.sheet.SpreadsheetDocument"
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load MasterScriptProviderProblem.ods"
,
xComponent
.
is
());
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load MasterScriptProviderProblem.ods"
,
xComponent
.
is
());
...
@@ -92,7 +91,7 @@ void ScMacrosTest::testMSP()
...
@@ -92,7 +91,7 @@ void ScMacrosTest::testMSP()
OUString
sResult
;
OUString
sResult
;
aRet
>>=
sResult
;
aRet
>>=
sResult
;
std
::
cout
<<
"Result is "
<<
sResult
<<
std
::
endl
;
SAL_INFO
(
"sc.qa"
,
"Result is "
<<
sResult
)
;
CPPUNIT_ASSERT_MESSAGE
(
"TestMSP ( for fdo#67547) failed"
,
sResult
==
"OK"
);
CPPUNIT_ASSERT_MESSAGE
(
"TestMSP ( for fdo#67547) failed"
,
sResult
==
"OK"
);
xDocSh
->
DoClose
();
xDocSh
->
DoClose
();
}
}
...
@@ -102,7 +101,6 @@ void ScMacrosTest::testStarBasic()
...
@@ -102,7 +101,6 @@ void ScMacrosTest::testStarBasic()
const
OUString
aFileNameBase
(
"StarBasic.ods"
);
const
OUString
aFileNameBase
(
"StarBasic.ods"
);
OUString
aFileName
;
OUString
aFileName
;
createFileURL
(
aFileNameBase
,
aFileName
);
createFileURL
(
aFileNameBase
,
aFileName
);
std
::
cout
<<
"StarBasic test"
<<
std
::
endl
;
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XComponent
>
xComponent
=
loadFromDesktop
(
aFileName
,
"com.sun.star.sheet.SpreadsheetDocument"
);
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XComponent
>
xComponent
=
loadFromDesktop
(
aFileName
,
"com.sun.star.sheet.SpreadsheetDocument"
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load StarBasic.ods"
,
xComponent
.
is
());
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load StarBasic.ods"
,
xComponent
.
is
());
...
@@ -124,7 +122,6 @@ void ScMacrosTest::testStarBasic()
...
@@ -124,7 +122,6 @@ void ScMacrosTest::testStarBasic()
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
double
aValue
;
double
aValue
;
rDoc
.
GetValue
(
0
,
0
,
0
,
aValue
);
rDoc
.
GetValue
(
0
,
0
,
0
,
aValue
);
std
::
cout
<<
"returned value = "
<<
aValue
<<
std
::
endl
;
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE
(
"script did not change the value of Sheet1.A1"
,
2.0
,
aValue
,
0.00001
);
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE
(
"script did not change the value of Sheet1.A1"
,
2.0
,
aValue
,
0.00001
);
xDocSh
->
DoClose
();
xDocSh
->
DoClose
();
}
}
...
@@ -259,15 +256,15 @@ void ScMacrosTest::testVba()
...
@@ -259,15 +256,15 @@ void ScMacrosTest::testVba()
SfxObjectShell
*
pFoundShell
=
SfxObjectShell
::
GetShellFromComponent
(
xComponent
);
SfxObjectShell
*
pFoundShell
=
SfxObjectShell
::
GetShellFromComponent
(
xComponent
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to access document shell"
,
pFoundShell
);
CPPUNIT_ASSERT_MESSAGE
(
"Failed to access document shell"
,
pFoundShell
);
std
::
cout
<<
"about to invoke vba test in "
<<
OUStringToOString
(
aFileName
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
SAL_INFO
(
"sc.qa"
,
"about to invoke vba test in "
<<
aFileName
)
;
SfxObjectShell
::
CallXScript
(
SfxObjectShell
::
CallXScript
(
xComponent
,
testInfo
[
i
].
sMacroUrl
,
aParams
,
aRet
,
aOutParamIndex
,
xComponent
,
testInfo
[
i
].
sMacroUrl
,
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
aOutParam
);
OUString
aStringRes
;
OUString
aStringRes
;
aRet
>>=
aStringRes
;
aRet
>>=
aStringRes
;
std
::
cout
<<
"value of Ret "
<<
OUStringToOString
(
aStringRes
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
SAL_INFO
(
"sc.qa"
,
"value of Ret "
<<
aStringRes
)
;
CPPUNIT_ASSERT_MESSAGE
(
"script reported failure"
,
aStringRes
==
"OK"
);
CPPUNIT_ASSERT_MESSAGE
(
"script reported failure"
,
aStringRes
==
"OK"
);
pFoundShell
->
DoClose
();
pFoundShell
->
DoClose
();
if
(
bWorkbooksHandling
)
if
(
bWorkbooksHandling
)
{
{
...
...
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