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
343ba6ac
Kaydet (Commit)
343ba6ac
authored
Ock 09, 2016
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
uitest: actually implement the UNO interfaces
Change-Id: I3cbb3d8f7c6fa0d2616a31192a959f89d4cc7703
üst
070d9231
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
229 additions
and
0 deletions
+229
-0
Library_vcl.mk
vcl/Library_vcl.mk
+2
-0
uiobject_uno.cxx
vcl/source/uitest/uno/uiobject_uno.cxx
+58
-0
uiobject_uno.hxx
vcl/source/uitest/uno/uiobject_uno.hxx
+57
-0
uitest_uno.cxx
vcl/source/uitest/uno/uitest_uno.cxx
+108
-0
vcl.unx.component
vcl/vcl.unx.component
+4
-0
No files found.
vcl/Library_vcl.mk
Dosyayı görüntüle @
343ba6ac
...
...
@@ -396,6 +396,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/uitest/factory \
vcl/source/uitest/uiobject \
vcl/source/uitest/uitest \
vcl/source/uitest/uno/uiobject_uno \
vcl/source/uitest/uno/uitest_uno \
))
$(eval $(call gb_Library_add_cobjects,vcl,\
...
...
vcl/source/uitest/uno/uiobject_uno.cxx
0 → 100644
Dosyayı görüntüle @
343ba6ac
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "uiobject_uno.hxx"
#include <vcl/svapp.hxx>
UIObjectUnoObj
::
UIObjectUnoObj
(
std
::
unique_ptr
<
UIObject
>
pObj
)
:
UIObjectBase
(
m_aMutex
),
mpObj
(
std
::
move
(
pObj
))
{
}
UIObjectUnoObj
::~
UIObjectUnoObj
()
{
}
css
::
uno
::
Reference
<
css
::
ui
::
test
::
XUIObject
>
SAL_CALL
UIObjectUnoObj
::
getChild
(
const
OUString
&
rID
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
std
::
unique_ptr
<
UIObject
>
pObj
=
mpObj
->
get_child
(
rID
);
return
new
UIObjectUnoObj
(
std
::
move
(
pObj
));
}
void
SAL_CALL
UIObjectUnoObj
::
executeAction
(
const
OUString
&
rAction
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
mpObj
->
execute
(
rAction
,
StringMap
());
}
OUString
SAL_CALL
UIObjectUnoObj
::
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
OUString
(
"org.libreoffice.uitest.UIObject"
);
}
sal_Bool
UIObjectUnoObj
::
supportsService
(
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
cppu
::
supportsService
(
this
,
ServiceName
);
}
css
::
uno
::
Sequence
<
OUString
>
UIObjectUnoObj
::
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
css
::
uno
::
Sequence
<
OUString
>
aServiceNames
(
1
);
aServiceNames
[
0
]
=
"com.sun.star.ui.test.UIObject"
;
return
aServiceNames
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/source/uitest/uno/uiobject_uno.hxx
0 → 100644
Dosyayı görüntüle @
343ba6ac
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_VCL_SOURCE_UITEST_UNO_UIOBJECT_UNO_HXX
#define INCLUDED_VCL_SOURCE_UITEST_UNO_UIOBJECT_UNO_HXX
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/ui/test/XUIObject.hpp>
#include <memory>
#include <vcl/uitest/uiobject.hxx>
typedef
::
cppu
::
WeakComponentImplHelper
<
css
::
ui
::
test
::
XUIObject
,
css
::
lang
::
XServiceInfo
>
UIObjectBase
;
class
UIObjectUnoObj
:
public
cppu
::
BaseMutex
,
public
UIObjectBase
{
private
:
std
::
unique_ptr
<
UIObject
>
mpObj
;
public
:
UIObjectUnoObj
(
std
::
unique_ptr
<
UIObject
>
pObj
);
virtual
~
UIObjectUnoObj
();
css
::
uno
::
Reference
<
css
::
ui
::
test
::
XUIObject
>
SAL_CALL
getChild
(
const
OUString
&
rID
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
void
SAL_CALL
executeAction
(
const
OUString
&
rAction
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
OUString
SAL_CALL
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
sal_Bool
SAL_CALL
supportsService
(
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/source/uitest/uno/uitest_uno.cxx
0 → 100644
Dosyayı görüntüle @
343ba6ac
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/ui/test/XUITest.hpp>
#include <memory>
#include <vcl/uitest/uitest.hxx>
#include <vcl/svapp.hxx>
#include "uiobject_uno.hxx"
namespace
{
typedef
::
cppu
::
WeakComponentImplHelper
<
css
::
ui
::
test
::
XUITest
,
css
::
lang
::
XServiceInfo
>
UITestBase
;
}
class
UITestUnoObj
:
public
cppu
::
BaseMutex
,
public
UITestBase
{
private
:
std
::
unique_ptr
<
UITest
>
mpUITest
;
public
:
UITestUnoObj
();
virtual
~
UITestUnoObj
();
void
SAL_CALL
executeCommand
(
const
OUString
&
rCommand
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
css
::
uno
::
Reference
<
css
::
ui
::
test
::
XUIObject
>
SAL_CALL
getTopFocusWindow
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
OUString
SAL_CALL
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
sal_Bool
SAL_CALL
supportsService
(
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
};
UITestUnoObj
::
UITestUnoObj
()
:
UITestBase
(
m_aMutex
),
mpUITest
(
new
UITest
)
{
}
UITestUnoObj
::~
UITestUnoObj
()
{
}
void
SAL_CALL
UITestUnoObj
::
executeCommand
(
const
OUString
&
rCommand
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
SolarMutexGuard
aGuard
;
mpUITest
->
executeCommand
(
rCommand
);
}
css
::
uno
::
Reference
<
css
::
ui
::
test
::
XUIObject
>
SAL_CALL
UITestUnoObj
::
getTopFocusWindow
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
std
::
unique_ptr
<
UIObject
>
pObj
=
mpUITest
->
getFocusTopWindow
();
return
new
UIObjectUnoObj
(
std
::
move
(
pObj
));
}
OUString
SAL_CALL
UITestUnoObj
::
getImplementationName
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
OUString
(
"org.libreoffice.uitest.UITest"
);
}
sal_Bool
UITestUnoObj
::
supportsService
(
OUString
const
&
ServiceName
)
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
return
cppu
::
supportsService
(
this
,
ServiceName
);
}
css
::
uno
::
Sequence
<
OUString
>
UITestUnoObj
::
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
{
css
::
uno
::
Sequence
<
OUString
>
aServiceNames
(
1
);
aServiceNames
[
0
]
=
"com.sun.star.ui.test.UITest"
;
return
aServiceNames
;
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
UITest_get_implementation
(
css
::
uno
::
XComponentContext
*
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
)
{
return
cppu
::
acquire
(
new
UITestUnoObj
());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/vcl.unx.component
Dosyayı görüntüle @
343ba6ac
...
...
@@ -34,4 +34,8 @@
<implementation
name=
"vcl::FontIdentificator"
>
<service
name=
"com.sun.star.awt.FontIdentificator"
/>
</implementation>
<implementation
name=
"org.libreoffice.uitest.UITest"
constructor=
"UITest_get_implementation"
>
<service
name=
"com.sun.star.ui.test.UITest"
/>
</implementation>
</component>
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