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
c04f3c0f
Kaydet (Commit)
c04f3c0f
authored
Ara 23, 2013
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
svt: use constructor feature for HatchWindowFactory.
Change-Id: I0881c0994342816b8f0ac0281d884ce618d5e285
üst
a587899c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
69 deletions
+39
-69
hatchwindowfactory.cxx
svtools/source/hatchwindow/hatchwindowfactory.cxx
+37
-21
hatchwindowfactory.hxx
svtools/source/inc/hatchwindowfactory.hxx
+0
-39
miscservices.cxx
svtools/source/uno/miscservices.cxx
+0
-8
svt.component
svtools/util/svt.component
+2
-1
No files found.
svtools/source/hatchwindow/hatchwindowfactory.cxx
Dosyayı görüntüle @
c04f3c0f
...
...
@@ -17,34 +17,33 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include
"hatchwindowfactory.hxx"
#include
"hatchwindow.hxx"
#include
"cppuhelper/factory.hxx"
#include
<com/sun/star/embed/XHatchWindowFactory.hpp>
#include
<com/sun/star/lang/XServiceInfo.hpp>
#include
<cppuhelper/implbase2.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
#include
"documentcloser.hxx"
#include
<hatchwindow.hxx>
using
namespace
::
com
::
sun
::
star
;
uno
::
Sequence
<
OUString
>
SAL_CALL
OHatchWindowFactory
::
impl_staticGetSupportedServiceNames
()
{
uno
::
Sequence
<
OUString
>
aRet
(
2
);
aRet
[
0
]
=
"com.sun.star.embed.HatchWindowFactory"
;
aRet
[
1
]
=
"com.sun.star.comp.embed.HatchWindowFactory"
;
return
aRet
;
}
namespace
{
OUString
SAL_CALL
OHatchWindowFactory
::
impl_staticGetImplementationName
()
class
OHatchWindowFactory
:
public
::
cppu
::
WeakImplHelper2
<
embed
::
XHatchWindowFactory
,
lang
::
XServiceInfo
>
{
return
OUString
(
"com.sun.star.comp.embed.HatchWindowFactory"
);
}
public
:
OHatchWindowFactory
()
{
}
uno
::
Reference
<
uno
::
XInterface
>
SAL_CALL
OHatchWindowFactory
::
impl_staticCreateSelfInstance
(
const
uno
::
Reference
<
lang
::
XMultiServiceFactory
>&
xServiceManager
)
{
return
uno
::
Reference
<
uno
::
XInterface
>
(
*
new
OHatchWindowFactory
(
xServiceManager
)
);
}
// XHatchWindowFactory
virtual
uno
::
Reference
<
embed
::
XHatchWindow
>
SAL_CALL
createHatchWindowInstance
(
const
uno
::
Reference
<
awt
::
XWindowPeer
>&
xParent
,
const
awt
::
Rectangle
&
aBounds
,
const
awt
::
Size
&
aSize
)
throw
(
uno
::
RuntimeException
);
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
throw
(
uno
::
RuntimeException
);
virtual
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
ServiceName
)
throw
(
uno
::
RuntimeException
);
virtual
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
uno
::
RuntimeException
);
};
uno
::
Reference
<
embed
::
XHatchWindow
>
SAL_CALL
OHatchWindowFactory
::
createHatchWindowInstance
(
const
uno
::
Reference
<
awt
::
XWindowPeer
>&
xParent
,
...
...
@@ -64,7 +63,7 @@ uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchW
OUString
SAL_CALL
OHatchWindowFactory
::
getImplementationName
()
throw
(
uno
::
RuntimeException
)
{
return
impl_staticGetImplementationName
(
);
return
OUString
(
"com.sun.star.comp.embed.HatchWindowFactory"
);
}
sal_Bool
SAL_CALL
OHatchWindowFactory
::
supportsService
(
const
OUString
&
ServiceName
)
...
...
@@ -76,7 +75,24 @@ sal_Bool SAL_CALL OHatchWindowFactory::supportsService( const OUString& ServiceN
uno
::
Sequence
<
OUString
>
SAL_CALL
OHatchWindowFactory
::
getSupportedServiceNames
()
throw
(
uno
::
RuntimeException
)
{
return
impl_staticGetSupportedServiceNames
();
uno
::
Sequence
<
OUString
>
aRet
(
2
);
aRet
[
0
]
=
"com.sun.star.embed.HatchWindowFactory"
;
aRet
[
1
]
=
"com.sun.star.comp.embed.HatchWindowFactory"
;
return
aRet
;
}
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
com_sun_star_comp_embed_HatchWindowFactory_get_implementation
(
SAL_UNUSED_PARAMETER
css
::
uno
::
XComponentContext
*
,
uno_Sequence
*
arguments
)
{
assert
(
arguments
!=
0
&&
arguments
->
nElements
==
0
);
(
void
)
arguments
;
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
x
(
static_cast
<
cppu
::
OWeakObject
*>
(
new
OHatchWindowFactory
));
x
->
acquire
();
return
x
.
get
();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
svtools/source/inc/hatchwindowfactory.hxx
Dosyayı görüntüle @
c04f3c0f
...
...
@@ -20,45 +20,6 @@
#ifndef INCLUDED_SVTOOLS_SOURCE_HATCHWINDOW_HATCHWINDOWFACTORY_HXX
#define INCLUDED_SVTOOLS_SOURCE_HATCHWINDOW_HATCHWINDOWFACTORY_HXX
#include <com/sun/star/embed/XHatchWindowFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase2.hxx>
class
OHatchWindowFactory
:
public
::
cppu
::
WeakImplHelper2
<
::
com
::
sun
::
star
::
embed
::
XHatchWindowFactory
,
::
com
::
sun
::
star
::
lang
::
XServiceInfo
>
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
m_xFactory
;
public
:
OHatchWindowFactory
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
xFactory
)
:
m_xFactory
(
xFactory
)
{
OSL_ENSURE
(
xFactory
.
is
(),
"No service manager is provided!
\n
"
);
}
static
::
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
SAL_CALL
impl_staticGetSupportedServiceNames
();
static
OUString
SAL_CALL
impl_staticGetImplementationName
();
static
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
uno
::
XInterface
>
SAL_CALL
impl_staticCreateSelfInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>&
xServiceManager
);
// XHatchWindowFactory
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
embed
::
XHatchWindow
>
SAL_CALL
createHatchWindowInstance
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
awt
::
XWindowPeer
>&
xParent
,
const
::
com
::
sun
::
star
::
awt
::
Rectangle
&
aBounds
,
const
::
com
::
sun
::
star
::
awt
::
Size
&
aSize
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
// XServiceInfo
virtual
OUString
SAL_CALL
getImplementationName
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
sal_Bool
SAL_CALL
supportsService
(
const
OUString
&
ServiceName
)
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
virtual
::
com
::
sun
::
star
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames
()
throw
(
::
com
::
sun
::
star
::
uno
::
RuntimeException
);
};
#endif
...
...
svtools/source/uno/miscservices.cxx
Dosyayı görüntüle @
c04f3c0f
...
...
@@ -27,7 +27,6 @@
#include <osl/diagnose.h>
#include <uno/mapping.hxx>
#include "documentcloser.hxx"
#include "hatchwindowfactory.hxx"
#include "hatchwindow.hxx"
#include "provider.hxx"
#include "unowizard.hxx"
...
...
@@ -127,13 +126,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory (
ODocumentCloser
::
impl_staticCreateSelfInstance
,
ODocumentCloser
::
impl_staticGetSupportedServiceNames
());
}
else
if
(
rtl_str_compare
(
pImplementationName
,
"com.sun.star.comp.embed.HatchWindowFactory"
)
==
0
)
{
xFactory
=
::
cppu
::
createOneInstanceFactory
(
xSMgr
,
OHatchWindowFactory
::
impl_staticGetImplementationName
(),
OHatchWindowFactory
::
impl_staticCreateSelfInstance
,
OHatchWindowFactory
::
impl_staticGetSupportedServiceNames
());
}
else
{
pResult
=
comphelper
::
service_decl
::
component_getFactoryHelper
(
...
...
svtools/util/svt.component
Dosyayı görüntüle @
c04f3c0f
...
...
@@ -49,7 +49,8 @@
<implementation
name=
"com.sun.star.comp.embed.DocumentCloser"
>
<service
name=
"com.sun.star.embed.DocumentCloser"
/>
</implementation>
<implementation
name=
"com.sun.star.comp.embed.HatchWindowFactory"
>
<implementation
name=
"com.sun.star.comp.embed.HatchWindowFactory"
constructor=
"com_sun_star_comp_embed_HatchWindowFactory_get_implementation"
>
<service
name=
"com.sun.star.comp.embed.HatchWindowFactory"
/>
<service
name=
"com.sun.star.embed.HatchWindowFactory"
/>
</implementation>
...
...
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