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
2bcb5f5c
Kaydet (Commit)
2bcb5f5c
authored
Eki 22, 2013
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix tools/string.hxx remnants
Change-Id: I06c95dcfcf2af14e109fabdde69bf98d06801331
üst
e0280873
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
macros-test.cxx
sc/qa/extras/macros-test.cxx
+11
-8
No files found.
sc/qa/extras/macros-test.cxx
Dosyayı görüntüle @
2bcb5f5c
...
@@ -70,8 +70,6 @@ void ScMacrosTest::testMSP()
...
@@ -70,8 +70,6 @@ void ScMacrosTest::testMSP()
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load MasterScriptProviderProblem.ods"
,
xComponent
.
is
());
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load MasterScriptProviderProblem.ods"
,
xComponent
.
is
());
OUString
aURL
(
"vnd.sun.Star.script:Standard.Module1.TestMSP?language=Basic&location=document"
);
String
sUrl
=
aURL
;
Any
aRet
;
Any
aRet
;
Sequence
<
sal_Int16
>
aOutParamIndex
;
Sequence
<
sal_Int16
>
aOutParamIndex
;
Sequence
<
Any
>
aOutParam
;
Sequence
<
Any
>
aOutParam
;
...
@@ -83,7 +81,10 @@ void ScMacrosTest::testMSP()
...
@@ -83,7 +81,10 @@ void ScMacrosTest::testMSP()
ScDocShell
*
xDocSh
=
dynamic_cast
<
ScDocShell
*>
(
pFoundShell
);
ScDocShell
*
xDocSh
=
dynamic_cast
<
ScDocShell
*>
(
pFoundShell
);
CPPUNIT_ASSERT
(
xDocSh
!=
NULL
);
CPPUNIT_ASSERT
(
xDocSh
!=
NULL
);
pFoundShell
->
CallXScript
(
xComponent
,
sUrl
,
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
pFoundShell
->
CallXScript
(
xComponent
,
"vnd.sun.Star.script:Standard.Module1.TestMSP?language=Basic&location=document"
,
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
OUString
sResult
;
OUString
sResult
;
aRet
>>=
sResult
;
aRet
>>=
sResult
;
...
@@ -102,8 +103,6 @@ void ScMacrosTest::testStarBasic()
...
@@ -102,8 +103,6 @@ void ScMacrosTest::testStarBasic()
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load StarBasic.ods"
,
xComponent
.
is
());
CPPUNIT_ASSERT_MESSAGE
(
"Failed to load StarBasic.ods"
,
xComponent
.
is
());
OUString
aURL
(
"vnd.sun.Star.script:Standard.Module1.Macro1?language=Basic&location=document"
);
String
sUrl
=
aURL
;
Any
aRet
;
Any
aRet
;
Sequence
<
sal_Int16
>
aOutParamIndex
;
Sequence
<
sal_Int16
>
aOutParamIndex
;
Sequence
<
Any
>
aOutParam
;
Sequence
<
Any
>
aOutParam
;
...
@@ -115,7 +114,10 @@ void ScMacrosTest::testStarBasic()
...
@@ -115,7 +114,10 @@ void ScMacrosTest::testStarBasic()
ScDocShell
*
xDocSh
=
static_cast
<
ScDocShell
*>
(
pFoundShell
);
ScDocShell
*
xDocSh
=
static_cast
<
ScDocShell
*>
(
pFoundShell
);
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
ScDocument
*
pDoc
=
xDocSh
->
GetDocument
();
pFoundShell
->
CallXScript
(
xComponent
,
sUrl
,
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
pFoundShell
->
CallXScript
(
xComponent
,
"vnd.sun.Star.script:Standard.Module1.Macro1?language=Basic&location=document"
,
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
double
aValue
;
double
aValue
;
pDoc
->
GetValue
(
0
,
0
,
0
,
aValue
);
pDoc
->
GetValue
(
0
,
0
,
0
,
aValue
);
std
::
cout
<<
"returned value = "
<<
aValue
<<
std
::
endl
;
std
::
cout
<<
"returned value = "
<<
aValue
<<
std
::
endl
;
...
@@ -238,7 +240,6 @@ void ScMacrosTest::testVba()
...
@@ -238,7 +240,6 @@ void ScMacrosTest::testVba()
OUString
sMsg
(
"Failed to load "
+
aFileName
);
OUString
sMsg
(
"Failed to load "
+
aFileName
);
CPPUNIT_ASSERT_MESSAGE
(
OUStringToOString
(
sMsg
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
xComponent
.
is
()
);
CPPUNIT_ASSERT_MESSAGE
(
OUStringToOString
(
sMsg
,
RTL_TEXTENCODING_UTF8
).
getStr
(),
xComponent
.
is
()
);
String
sUrl
=
testInfo
[
i
].
sMacroUrl
;
Any
aRet
;
Any
aRet
;
Sequence
<
sal_Int16
>
aOutParamIndex
;
Sequence
<
sal_Int16
>
aOutParamIndex
;
Sequence
<
Any
>
aOutParam
;
Sequence
<
Any
>
aOutParam
;
...
@@ -256,7 +257,9 @@ void ScMacrosTest::testVba()
...
@@ -256,7 +257,9 @@ void ScMacrosTest::testVba()
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
;
std
::
cout
<<
"about to invoke vba test in "
<<
OUStringToOString
(
aFileName
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
pFoundShell
->
CallXScript
(
xComponent
,
sUrl
,
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
pFoundShell
->
CallXScript
(
xComponent
,
testInfo
[
i
].
sMacroUrl
,
aParams
,
aRet
,
aOutParamIndex
,
aOutParam
);
OUString
aStringRes
;
OUString
aStringRes
;
aRet
>>=
aStringRes
;
aRet
>>=
aStringRes
;
std
::
cout
<<
"value of Ret "
<<
OUStringToOString
(
aStringRes
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
std
::
cout
<<
"value of Ret "
<<
OUStringToOString
(
aStringRes
,
RTL_TEXTENCODING_UTF8
).
getStr
()
<<
std
::
endl
;
...
...
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