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
f73e4594
Kaydet (Commit)
f73e4594
authored
Haz 17, 2014
tarafından
Andrzej Hunt
Kaydeden (comit)
Michael Meeks
Haz 18, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
LOK: kill double initialize.
Change-Id: I4d3dd913faea8b9f4a0bd3c13af37d097ced9888
üst
2ddcc1af
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
18 deletions
+19
-18
init.cxx
desktop/source/lib/init.cxx
+17
-3
LibreOfficeKit.h
include/LibreOfficeKit/LibreOfficeKit.h
+0
-1
LibreOfficeKit.hxx
include/LibreOfficeKit/LibreOfficeKit.hxx
+0
-5
shim.c
libreofficekit/source/shim.c
+2
-2
libtest.cxx
smoketest/libtest.cxx
+0
-7
No files found.
desktop/source/lib/init.cxx
Dosyayı görüntüle @
f73e4594
...
@@ -41,6 +41,7 @@
...
@@ -41,6 +41,7 @@
#include <vcl/graphicfilter.hxx>
#include <vcl/graphicfilter.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <unotools/mediadescriptor.hxx>
#include <unotools/mediadescriptor.hxx>
#include <osl/module.hxx>
using
namespace
css
;
using
namespace
css
;
using
namespace
utl
;
using
namespace
utl
;
...
@@ -207,7 +208,6 @@ struct LibLibreOffice_Impl : public _LibreOfficeKit
...
@@ -207,7 +208,6 @@ struct LibLibreOffice_Impl : public _LibreOfficeKit
m_pOfficeClass
->
nSize
=
sizeof
(
LibreOfficeKitClass
);
m_pOfficeClass
->
nSize
=
sizeof
(
LibreOfficeKitClass
);
m_pOfficeClass
->
destroy
=
lo_destroy
;
m_pOfficeClass
->
destroy
=
lo_destroy
;
m_pOfficeClass
->
initialize
=
lo_initialize
;
m_pOfficeClass
->
documentLoad
=
lo_documentLoad
;
m_pOfficeClass
->
documentLoad
=
lo_documentLoad
;
m_pOfficeClass
->
getError
=
lo_getError
;
m_pOfficeClass
->
getError
=
lo_getError
;
...
@@ -411,7 +411,17 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
...
@@ -411,7 +411,17 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
if
(
!
pAppPath
)
if
(
!
pAppPath
)
return
0
;
return
0
;
OUString
aAppPath
(
pAppPath
,
strlen
(
pAppPath
),
RTL_TEXTENCODING_UTF8
);
OUString
aAppPath
;
if
(
pAppPath
)
{
aAppPath
=
OUString
(
pAppPath
,
strlen
(
pAppPath
),
RTL_TEXTENCODING_UTF8
);
}
else
{
::
osl
::
Module
::
getUrlFromAddress
(
reinterpret_cast
<
oslGenericFunction
>
(
lo_initialize
),
aAppPath
);
}
OUString
aAppURL
;
OUString
aAppURL
;
if
(
osl
::
FileBase
::
getFileURLFromSystemPath
(
aAppPath
,
aAppURL
)
!=
osl
::
FileBase
::
E_None
)
if
(
osl
::
FileBase
::
getFileURLFromSystemPath
(
aAppPath
,
aAppURL
)
!=
osl
::
FileBase
::
E_None
)
return
0
;
return
0
;
...
@@ -440,12 +450,16 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
...
@@ -440,12 +450,16 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath)
return
bInitialized
;
return
bInitialized
;
}
}
SAL_DLLPUBLIC_EXPORT
LibreOfficeKit
*
libreofficekit_hook
(
void
)
SAL_DLLPUBLIC_EXPORT
LibreOfficeKit
*
libreofficekit_hook
(
const
char
*
install_path
)
{
{
if
(
!
gImpl
)
if
(
!
gImpl
)
{
{
fprintf
(
stderr
,
"create libreoffice object
\n
"
);
fprintf
(
stderr
,
"create libreoffice object
\n
"
);
gImpl
=
new
LibLibreOffice_Impl
();
gImpl
=
new
LibLibreOffice_Impl
();
if
(
!
lo_initialize
(
gImpl
,
install_path
))
{
lo_destroy
(
gImpl
);
}
}
}
return
static_cast
<
LibreOfficeKit
*>
(
gImpl
);
return
static_cast
<
LibreOfficeKit
*>
(
gImpl
);
}
}
...
...
include/LibreOfficeKit/LibreOfficeKit.h
Dosyayı görüntüle @
f73e4594
...
@@ -40,7 +40,6 @@ struct _LibreOfficeKitClass
...
@@ -40,7 +40,6 @@ struct _LibreOfficeKitClass
size_t
nSize
;
size_t
nSize
;
void
(
*
destroy
)
(
LibreOfficeKit
*
pThis
);
void
(
*
destroy
)
(
LibreOfficeKit
*
pThis
);
int
(
*
initialize
)
(
LibreOfficeKit
*
pThis
,
const
char
*
pInstallPath
);
LibreOfficeKitDocument
*
(
*
documentLoad
)
(
LibreOfficeKit
*
pThis
,
const
char
*
pURL
);
LibreOfficeKitDocument
*
(
*
documentLoad
)
(
LibreOfficeKit
*
pThis
,
const
char
*
pURL
);
char
*
(
*
getError
)
(
LibreOfficeKit
*
pThis
);
char
*
(
*
getError
)
(
LibreOfficeKit
*
pThis
);
};
};
...
...
include/LibreOfficeKit/LibreOfficeKit.hxx
Dosyayı görüntüle @
f73e4594
...
@@ -64,11 +64,6 @@ public:
...
@@ -64,11 +64,6 @@ public:
mpThis
->
pClass
->
destroy
(
mpThis
);
mpThis
->
pClass
->
destroy
(
mpThis
);
}
}
inline
bool
initialize
(
const
char
*
pInstallPath
)
{
return
mpThis
->
pClass
->
initialize
(
mpThis
,
pInstallPath
);
}
inline
Document
*
documentLoad
(
const
char
*
pUrl
)
inline
Document
*
documentLoad
(
const
char
*
pUrl
)
{
{
LibreOfficeKitDocument
*
pDoc
=
mpThis
->
pClass
->
documentLoad
(
mpThis
,
pUrl
);
LibreOfficeKitDocument
*
pDoc
=
mpThis
->
pClass
->
documentLoad
(
mpThis
,
pUrl
);
...
...
libreofficekit/source/shim.c
Dosyayı görüntüle @
f73e4594
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
#define TARGET_LIB SAL_MODULENAME( "sofficeapp" )
#define TARGET_LIB SAL_MODULENAME( "sofficeapp" )
typedef
LibreOfficeKit
*
(
HookFunction
)(
void
);
typedef
LibreOfficeKit
*
(
HookFunction
)(
const
char
*
install_path
);
SAL_DLLPUBLIC_EXPORT
LibreOfficeKit
*
lok_init
(
const
char
*
install_path
)
SAL_DLLPUBLIC_EXPORT
LibreOfficeKit
*
lok_init
(
const
char
*
install_path
)
{
{
...
@@ -59,7 +59,7 @@ SAL_DLLPUBLIC_EXPORT LibreOfficeKit *lok_init( const char *install_path )
...
@@ -59,7 +59,7 @@ SAL_DLLPUBLIC_EXPORT LibreOfficeKit *lok_init( const char *install_path )
}
}
free
(
imp_lib
);
free
(
imp_lib
);
return
pSym
();
return
pSym
(
install_path
);
}
}
#endif // not LINUX => port me !
#endif // not LINUX => port me !
...
...
smoketest/libtest.cxx
Dosyayı görüntüle @
f73e4594
...
@@ -54,13 +54,6 @@ int main (int argc, char **argv)
...
@@ -54,13 +54,6 @@ int main (int argc, char **argv)
return
-
1
;
return
-
1
;
}
}
// This separate init is lame I think.
if
(
!
pOffice
->
initialize
(
argv
[
1
]
)
)
{
fprintf
(
stderr
,
"failed to initialize
\n
"
);
return
-
1
;
}
end
=
getTimeMS
();
end
=
getTimeMS
();
fprintf
(
stderr
,
"init time: %ld ms
\n
"
,
(
end
-
start
)
);
fprintf
(
stderr
,
"init time: %ld ms
\n
"
,
(
end
-
start
)
);
start
=
end
;
start
=
end
;
...
...
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