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
3774a6fd
Kaydet (Commit)
3774a6fd
authored
Ock 27, 2014
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Support direct ctor calls for singletons too.
Change-Id: I6db797c950b8222b3ad95faff86adf5e7b41ff4b
üst
478ec012
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
cpputype.cxx
codemaker/source/cppumaker/cpputype.cxx
+31
-3
component-defines.h
include/osl/detail/component-defines.h
+2
-0
No files found.
codemaker/source/cppumaker/cpputype.cxx
Dosyayı görüntüle @
3774a6fd
...
...
@@ -3742,6 +3742,18 @@ void SingletonType::dumpHxxFile(
includes.addRtlUstringH();
includes.addRtlUstringHxx();
includes.dump(o, 0);
o << ("\n#if defined ANDROID || defined IOS //TODO\n"
"#include <com/sun/star/lang/XInitialization.hpp>\n"
"#include <osl/detail/component-defines.h>\n#endif\n\n"
"#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_")
<< name_.replaceAll(".", "_dot_")
<< " && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_"
<< name_.replaceAll(".", "_dot_") << ") && defined LO_URE_CTOR_FUN_"
<< name_.replaceAll(".", "_dot_")
<< "\nextern \"C\" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_"
<< name_.replaceAll(".", "_dot_")
<< "(::css::uno::XComponentContext *, ::css::uno::Sequence< "
"::css::uno::Any > const &);\n#endif\n";
o << "\n";
if (codemaker::cppumaker::dumpNamespaceOpen(o, name_, false)) {
o << "\n";
...
...
@@ -3758,10 +3770,26 @@ void SingletonType::dumpHxxFile(
inc();
o << indent() << "assert(the_context.is());\n" << indent()
<< "::css::uno::Reference< " << scopedBaseName
<<
" > instance;
\n
"
<<
indent
()
<<
(
"if (!(the_context->getValueByName("
<< " > instance;\n"
<< ("#if defined LO_URE_CURRENT_ENV && defined "
"LO_URE_CTOR_ENV_")
<< name_.replaceAll(".", "_dot_")
<< " && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_"
<< name_.replaceAll(".", "_dot_")
<< ") && defined LO_URE_CTOR_FUN_"
<< name_.replaceAll(".", "_dot_") << "\n" << indent()
<< "the_instance = ::css::uno::Reference< " << scopedBaseName
<< (" >(::css::uno::Reference< ::css::uno::XInterface >("
"static_cast< ::css::uno::XInterface * >((*"
"LO_URE_CTOR_FUN_")
<< name_.replaceAll(".", "_dot_")
<< (")(the_context.get(), ::css::uno::Sequence<"
" ::css::uno::Any >())), ::SAL_NO_ACQUIRE),"
" ::css::uno::UNO_QUERY);\n#else\n")
<< indent() << ("the_context->getValueByName("
"::rtl::OUString( \"/singletons/")
<<
name_
<<
"
\"
)) >>= instance) || !instance.is()) {
\n
"
;
<< name_ << "\" )) >>= instance;\n" << "#endif\n"
<< indent() << "if (!instance.is()) {\n";
inc();
o << indent()
<< ("throw ::css::uno::DeploymentException("
...
...
include/osl/detail/component-defines.h
Dosyayı görüntüle @
3774a6fd
...
...
@@ -33,6 +33,8 @@
#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_frame_dot_DocumentTemplates com_sun_star_comp_sfx2_DocumentTemplates_get_implementation
#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_frame_dot_GlobalEventBroadcaster 1
#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_frame_dot_GlobalEventBroadcaster com_sun_star_comp_sfx2_GlobalEventBroadcaster_get_implementation
#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_frame_dot_theGlobalEventBroadcaster 1
#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_frame_dot_theGlobalEventBroadcaster com_sun_star_comp_sfx2_GlobalEventBroadcaster_get_implementation
// svtools/util/svt_dot_component
#define LO_URE_CTOR_ENV_com_dot_sun_dot_star_dot_graphic_dot_GraphicProvider 1
#define LO_URE_CTOR_FUN_com_dot_sun_dot_star_dot_graphic_dot_GraphicProvider com_sun_star_comp_graphic_GraphicProvider_get_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