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
5830799d
Kaydet (Commit)
5830799d
authored
Nis 11, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
macros_test: use "css" short form
Change-Id: I2e8d8773703df67d090059be8bd9f3c7c7335f78
üst
69fe1066
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
macros_test.hxx
include/unotest/macros_test.hxx
+2
-2
macros_test.cxx
unotest/source/cpp/macros_test.cxx
+8
-9
No files found.
include/unotest/macros_test.hxx
Dosyayı görüntüle @
5830799d
...
...
@@ -27,10 +27,10 @@ namespace unotest {
class
OOO_DLLPUBLIC_UNOTEST
MacrosTest
{
public
:
c
om
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XComponent
>
loadFromDesktop
(
const
OUString
&
rURL
,
const
OUString
&
rDocService
=
OUString
()
);
c
ss
::
uno
::
Reference
<
css
::
lang
::
XComponent
>
loadFromDesktop
(
const
OUString
&
rURL
,
const
OUString
&
rDocService
=
OUString
()
);
protected
:
c
om
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XDesktop2
>
mxDesktop
;
c
ss
::
uno
::
Reference
<
css
::
frame
::
XDesktop2
>
mxDesktop
;
};
}
...
...
unotest/source/cpp/macros_test.cxx
Dosyayı görüntüle @
5830799d
...
...
@@ -15,21 +15,20 @@
#include "cppunit/TestAssert.h"
#include <rtl/ustrbuf.hxx>
using
namespace
c
om
::
sun
::
star
;
using
namespace
c
ss
;
namespace
unotest
{
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XComponent
>
MacrosTest
::
loadFromDesktop
(
const
OUString
&
rURL
,
const
OUString
&
rDocService
)
uno
::
Reference
<
css
::
lang
::
XComponent
>
MacrosTest
::
loadFromDesktop
(
const
OUString
&
rURL
,
const
OUString
&
rDocService
)
{
CPPUNIT_ASSERT_MESSAGE
(
"no desktop"
,
mxDesktop
.
is
());
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XComponentLoader
>
xLoader
=
uno
::
Reference
<
com
::
sun
::
star
::
frame
::
XComponentLoader
>
(
mxDesktop
,
uno
::
UNO_QUERY
);
uno
::
Reference
<
frame
::
XComponentLoader
>
xLoader
=
uno
::
Reference
<
frame
::
XComponentLoader
>
(
mxDesktop
,
uno
::
UNO_QUERY
);
CPPUNIT_ASSERT_MESSAGE
(
"no loader"
,
xLoader
.
is
());
com
::
sun
::
star
::
uno
::
Sequence
<
com
::
sun
::
star
::
beans
::
PropertyValue
>
args
(
1
);
uno
::
Sequence
<
beans
::
PropertyValue
>
args
(
1
);
args
[
0
].
Name
=
"MacroExecutionMode"
;
args
[
0
].
Handle
=
-
1
;
args
[
0
].
Value
<<=
com
::
sun
::
star
::
document
::
MacroExecMode
::
ALWAYS_EXECUTE_NO_WARN
;
args
[
0
].
State
=
com
::
sun
::
star
::
beans
::
PropertyState_DIRECT_VALUE
;
args
[
0
].
Value
<<=
document
::
MacroExecMode
::
ALWAYS_EXECUTE_NO_WARN
;
args
[
0
].
State
=
beans
::
PropertyState_DIRECT_VALUE
;
if
(
!
rDocService
.
isEmpty
())
{
...
...
@@ -37,10 +36,10 @@ uno::Reference< com::sun::star::lang::XComponent > MacrosTest::loadFromDesktop(c
args
[
1
].
Name
=
"DocumentService"
;
args
[
1
].
Handle
=
-
1
;
args
[
1
].
Value
<<=
rDocService
;
args
[
1
].
State
=
com
::
sun
::
star
::
beans
::
PropertyState_DIRECT_VALUE
;
args
[
1
].
State
=
beans
::
PropertyState_DIRECT_VALUE
;
}
uno
::
Reference
<
com
::
sun
::
star
::
lang
::
XComponent
>
xComponent
=
xLoader
->
loadComponentFromURL
(
rURL
,
OUString
(
"_default"
),
0
,
args
);
uno
::
Reference
<
lang
::
XComponent
>
xComponent
=
xLoader
->
loadComponentFromURL
(
rURL
,
OUString
(
"_default"
),
0
,
args
);
OUString
sMessage
=
"loading failed: "
+
rURL
;
CPPUNIT_ASSERT_MESSAGE
(
OUStringToOString
(
sMessage
,
RTL_TEXTENCODING_UTF8
).
getStr
(
),
xComponent
.
is
());
return
xComponent
;
...
...
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