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
e50699e6
Kaydet (Commit)
e50699e6
authored
Nis 06, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
liblo: clean-up liblibreoffice.h(xx)
Change-Id: I596fc3afde94e095ecf97c23617158f3d49afcc1
üst
4aec6c9e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
31 deletions
+52
-31
liblibreoffice.h
desktop/inc/liblibreoffice.h
+14
-12
liblibreoffice.hxx
desktop/inc/liblibreoffice.hxx
+38
-19
No files found.
desktop/inc/liblibreoffice.h
Dosyayı görüntüle @
e50699e6
...
@@ -11,32 +11,34 @@
...
@@ -11,32 +11,34 @@
#define INCLUDED_DESKTOP_INC_LIBLIBREOFFICE_H
#define INCLUDED_DESKTOP_INC_LIBLIBREOFFICE_H
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif
#endif
typedef
struct
_LibreOffice
LibreOffice
;
typedef
struct
_LibreOffice
LibreOffice
;
typedef
struct
_LibreOfficeDocument
LibreOfficeDocument
;
typedef
struct
_LibreOfficeDocument
LibreOfficeDocument
;
struct
_LibreOffice
{
struct
_LibreOffice
{
int
nSize
;
int
nSize
;
void
(
*
destroy
)
(
LibreOffice
*
pThis
);
void
(
*
destroy
)
(
LibreOffice
*
pThis
);
int
(
*
initialize
)
(
LibreOffice
*
pThis
,
int
(
*
initialize
)
(
LibreOffice
*
pThis
,
const
char
*
pInstallPath
);
const
char
*
pInstallPath
);
LibreOfficeDocument
*
(
*
documentLoad
)
(
LibreOffice
*
pThis
,
const
char
*
pURL
);
LibreOfficeDocument
*
(
*
documentLoad
)
(
LibreOffice
*
pThis
,
char
*
(
*
getError
)
(
LibreOffice
*
pThis
);
const
char
*
pURL
);
char
*
(
*
getError
)
(
LibreOffice
*
pThis
);
};
};
struct
_LibreOfficeDocument
{
struct
_LibreOfficeDocument
{
int
nSize
;
int
nSize
;
void
(
*
destroy
)
(
LibreOfficeDocument
*
pThis
);
void
(
*
destroy
)
(
LibreOfficeDocument
*
pThis
);
int
(
*
saveAs
)
(
LibreOfficeDocument
*
pThis
,
int
(
*
saveAs
)
(
LibreOfficeDocument
*
pThis
,
const
char
*
pUrl
,
const
char
*
pFormat
);
const
char
*
pUrl
,
const
char
*
pFormat
);
};
};
LibreOffice
*
lo_init
(
const
char
*
install_p
ath
);
LibreOffice
*
lo_init
(
const
char
*
pInstallP
ath
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
desktop/inc/liblibreoffice.hxx
Dosyayı görüntüle @
e50699e6
...
@@ -21,48 +21,67 @@
...
@@ -21,48 +21,67 @@
class
LODocument
class
LODocument
{
{
LibreOfficeDocument
*
mpDoc
;
private
:
LibreOfficeDocument
*
mpDoc
;
public
:
public
:
inline
LODocument
(
LibreOfficeDocument
*
pDoc
)
:
mpDoc
(
pDoc
)
{}
inline
LODocument
(
LibreOfficeDocument
*
pDoc
)
:
inline
~
LODocument
()
{
mpDoc
->
destroy
(
mpDoc
);
}
mpDoc
(
pDoc
)
{}
inline
~
LODocument
()
{
mpDoc
->
destroy
(
mpDoc
);
}
// Save as the given format, if format is NULL sniff from ext'n
// Save as the given format, if format is NULL sniff from ext'n
inline
bool
saveAs
(
const
char
*
url
,
const
char
*
format
=
NULL
)
inline
bool
saveAs
(
const
char
*
pUrl
,
const
char
*
pFormat
=
NULL
)
{
{
return
mpDoc
->
saveAs
(
mpDoc
,
url
,
format
);
return
mpDoc
->
saveAs
(
mpDoc
,
pUrl
,
pFormat
);
}
}
};
};
class
LibLibreOffice
class
LibLibreOffice
{
{
LibreOffice
*
mpThis
;
private
:
LibreOffice
*
mpThis
;
public
:
public
:
inline
LibLibreOffice
(
LibreOffice
*
pThis
)
:
mpThis
(
pThis
)
{}
inline
LibLibreOffice
(
LibreOffice
*
pThis
)
:
inline
~
LibLibreOffice
()
{
mpThis
->
destroy
(
mpThis
);
};
mpThis
(
pThis
)
{}
inline
bool
initialize
(
const
char
*
installPath
)
inline
~
LibLibreOffice
(
)
{
{
return
mpThis
->
initialize
(
mpThis
,
installPath
);
mpThis
->
destroy
(
mpThis
);
}
}
inline
LODocument
*
documentLoad
(
const
char
*
url
)
inline
bool
initialize
(
const
char
*
pInstallPath
)
{
{
LibreOfficeDocument
*
pDoc
=
mpThis
->
documentLoad
(
mpThis
,
url
);
return
mpThis
->
initialize
(
mpThis
,
pInstallPath
);
if
(
!
pDoc
)
}
inline
LODocument
*
documentLoad
(
const
char
*
pUrl
)
{
LibreOfficeDocument
*
pDoc
=
mpThis
->
documentLoad
(
mpThis
,
pUrl
);
if
(
pDoc
==
NULL
)
return
NULL
;
return
NULL
;
return
new
LODocument
(
pDoc
);
return
new
LODocument
(
pDoc
);
}
}
// return the last error as a string, free me.
// return the last error as a string, free me.
inline
char
*
getError
()
{
return
mpThis
->
getError
(
mpThis
);
}
inline
char
*
getError
()
{
return
mpThis
->
getError
(
mpThis
);
}
};
};
inline
LibLibreOffice
*
lo_cpp_init
(
const
char
*
install_path
)
inline
LibLibreOffice
*
lo_cpp_init
(
const
char
*
pInstallPath
)
{
{
LibreOffice
*
pThis
=
lo_init
(
install_path
);
LibreOffice
*
pThis
=
lo_init
(
pInstallPath
);
if
(
!
pThis
||
pThis
->
nSize
==
0
)
if
(
pThis
==
NULL
||
pThis
->
nSize
==
0
)
return
NULL
;
return
NULL
;
return
new
LibLibreOffice
(
pThis
);
return
new
LibLibreOffice
(
pThis
);
}
}
#endif
#endif
...
...
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