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
4db23a9d
Kaydet (Commit)
4db23a9d
authored
Ara 26, 2015
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tdf#74608: Constructor function for OfficeInstallationDirectories singleton
Change-Id: Ia0de503c50b6b1d568df27f6a8139fdcc8d0cfbf
üst
9e3c7725
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
63 deletions
+33
-63
comphelper_services.hxx
comphelper/source/inc/comphelper_services.hxx
+0
-1
comphelper_services.cxx
comphelper/source/misc/comphelper_services.cxx
+0
-1
officeinstallationdirectories.cxx
...er/source/officeinstdir/officeinstallationdirectories.cxx
+31
-52
officeinstallationdirectories.hxx
...er/source/officeinstdir/officeinstallationdirectories.hxx
+0
-8
comphelp.component
comphelper/util/comphelp.component
+2
-1
No files found.
comphelper/source/inc/comphelper_services.hxx
Dosyayı görüntüle @
4db23a9d
...
...
@@ -29,7 +29,6 @@ void createRegistryInfo_NamedPropertyValuesContainer();
void
createRegistryInfo_OInstanceLocker
();
void
createRegistryInfo_OPropertyBag
();
void
createRegistryInfo_OSimpleLogRing
();
void
createRegistryInfo_OfficeInstallationDirectories
();
void
createRegistryInfo_SequenceInputStream
();
void
createRegistryInfo_SequenceOutputStream
();
void
createRegistryInfo_UNOMemoryStream
();
...
...
comphelper/source/misc/comphelper_services.cxx
Dosyayı görüntüle @
4db23a9d
...
...
@@ -41,7 +41,6 @@ namespace comphelper { namespace module
createRegistryInfo_IndexedPropertyValuesContainer
();
createRegistryInfo_NamedPropertyValuesContainer
();
createRegistryInfo_AnyCompareFactory
();
createRegistryInfo_OfficeInstallationDirectories
();
createRegistryInfo_OInstanceLocker
();
createRegistryInfo_Map
();
createRegistryInfo_OSimpleLogRing
();
...
...
comphelper/source/officeinstdir/officeinstallationdirectories.cxx
Dosyayı görüntüle @
4db23a9d
...
...
@@ -19,8 +19,6 @@
#include <config_folders.h>
#include "comphelper_module.hxx"
#include "comphelper_services.hxx"
#include <cppuhelper/supportsservice.hxx>
/**************************************************************************
...
...
@@ -30,7 +28,7 @@
*************************************************************************/
#include <osl/file.hxx>
#include <
com/sun/star/beans/XPropertySet.hpp
>
#include <
rtl/ref.hxx
>
#include <com/sun/star/util/theMacroExpander.hpp>
#include <comphelper/fileurl.hxx>
...
...
@@ -38,13 +36,6 @@
using
namespace
com
::
sun
::
star
;
using
namespace
comphelper
;
// helpers
static
bool
makeCanonicalFileURL
(
OUString
&
rURL
)
{
OSL_ENSURE
(
comphelper
::
isFileUrl
(
rURL
),
"File URL expected!"
);
...
...
@@ -82,13 +73,7 @@ static bool makeCanonicalFileURL( OUString & rURL )
return
false
;
}
// OfficeInstallationDirectories Implementation.
namespace
comphelper
{
OfficeInstallationDirectories
::
OfficeInstallationDirectories
(
const
uno
::
Reference
<
uno
::
XComponentContext
>
&
xCtx
)
...
...
@@ -212,7 +197,7 @@ OUString SAL_CALL
OfficeInstallationDirectories
::
getImplementationName
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
getImplementationName_static
(
);
return
OUString
(
"com.sun.star.comp.util.OfficeInstallationDirectories"
);
}
// virtual
...
...
@@ -228,40 +213,9 @@ uno::Sequence< OUString > SAL_CALL
OfficeInstallationDirectories
::
getSupportedServiceNames
()
throw
(
uno
::
RuntimeException
,
std
::
exception
)
{
return
getSupportedServiceNames_static
();
}
// static
OUString
SAL_CALL
OfficeInstallationDirectories
::
getImplementationName_static
()
{
return
OUString
(
"com.sun.star.comp.util.OfficeInstallationDirectories"
);
}
// static
uno
::
Sequence
<
OUString
>
SAL_CALL
OfficeInstallationDirectories
::
getSupportedServiceNames_static
()
{
const
OUString
aServiceName
(
"com.sun.star.util.OfficeInstallationDirectories"
);
return
uno
::
Sequence
<
OUString
>
(
&
aServiceName
,
1
);
}
// static
uno
::
Reference
<
uno
::
XInterface
>
SAL_CALL
OfficeInstallationDirectories
::
Create
(
const
uno
::
Reference
<
uno
::
XComponentContext
>
&
rxContext
)
{
return
static_cast
<
cppu
::
OWeakObject
*
>
(
new
OfficeInstallationDirectories
(
rxContext
)
);
return
{
"com.sun.star.util.OfficeInstallationDirectories"
};
}
// non-UNO
void
OfficeInstallationDirectories
::
initDirs
()
{
if
(
m_pOfficeBrandDir
==
nullptr
)
...
...
@@ -293,9 +247,34 @@ void OfficeInstallationDirectories::initDirs()
}
}
void
createRegistryInfo_OfficeInstallationDirectories
()
}
namespace
{
struct
Instance
{
explicit
Instance
(
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
const
&
context
)
:
instance
(
static_cast
<
cppu
::
OWeakObject
*>
(
new
comphelper
::
OfficeInstallationDirectories
(
context
)))
{}
rtl
::
Reference
<
css
::
uno
::
XInterface
>
instance
;
};
struct
Singleton
:
public
rtl
::
StaticWithArg
<
Instance
,
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>
,
Singleton
>
{};
}
extern
"C"
SAL_DLLPUBLIC_EXPORT
css
::
uno
::
XInterface
*
SAL_CALL
com_sun_star_comp_util_OfficeInstallationDirectories
(
css
::
uno
::
XComponentContext
*
context
,
css
::
uno
::
Sequence
<
css
::
uno
::
Any
>
const
&
)
{
static
::
comphelper
::
module
::
OSingletonRegistration
<
OfficeInstallationDirectories
>
aAutoRegistration
;
return
cppu
::
acquire
(
static_cast
<
cppu
::
OWeakObject
*>
(
Singleton
::
get
(
context
).
instance
.
get
()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
comphelper/source/officeinstdir/officeinstallationdirectories.hxx
Dosyayı görüntüle @
4db23a9d
...
...
@@ -72,14 +72,6 @@ public:
getSupportedServiceNames
()
throw
(
css
::
uno
::
RuntimeException
,
std
::
exception
)
override
;
// XServiceInfo - static versions (used for component registration)
static
OUString
SAL_CALL
getImplementationName_static
();
static
css
::
uno
::
Sequence
<
OUString
>
SAL_CALL
getSupportedServiceNames_static
();
static
css
::
uno
::
Reference
<
css
::
uno
::
XInterface
>
SAL_CALL
Create
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
);
private
:
void
initDirs
();
...
...
comphelper/util/comphelp.component
Dosyayı görüntüle @
4db23a9d
...
...
@@ -52,7 +52,8 @@
<service
name=
"com.sun.star.comp.task.OfficeRestartManager"
/>
<singleton
name=
"com.sun.star.task.OfficeRestartManager"
/>
</implementation>
<implementation
name=
"com.sun.star.comp.util.OfficeInstallationDirectories"
>
<implementation
name=
"com.sun.star.comp.util.OfficeInstallationDirectories"
constructor=
"com_sun_star_comp_util_OfficeInstallationDirectories"
>
<service
name=
"com.sun.star.util.OfficeInstallationDirectories"
/>
<singleton
name=
"com.sun.star.util.theOfficeInstallationDirectories"
/>
</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