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
3c440aad
Kaydet (Commit)
3c440aad
authored
Haz 26, 2014
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
LOK DocView: handle document load failure without crashing.
Change-Id: Icd668b3a7ec3ac58322a6af3f1da6008837d0b6b
üst
c6bd06cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
lokdocview.c
libreofficekit/source/gtk/lokdocview.c
+15
-7
No files found.
libreofficekit/source/gtk/lokdocview.c
Dosyayı görüntüle @
3c440aad
...
...
@@ -22,8 +22,9 @@ static void lok_docview_init( LOKDocView* pDocView );
void
lcl_onDestroy
(
LOKDocView
*
pDocView
,
gpointer
pData
)
{
(
void
)
pData
;
pDocView
->
pDocument
->
pClass
->
destroy
(
pDocView
->
pDocument
);
pDocView
->
pDocument
=
0
;
if
(
pDocView
->
pDocument
)
pDocView
->
pDocument
->
pClass
->
destroy
(
pDocView
->
pDocument
);
pDocView
->
pDocument
=
NULL
;
}
SAL_DLLPUBLIC_EXPORT
guint
lok_docview_get_type
()
...
...
@@ -139,15 +140,22 @@ SAL_DLLPUBLIC_EXPORT gboolean lok_docview_open_document( LOKDocView* pDocView, c
if
(
pDocView
->
pDocument
)
{
pDocView
->
pDocument
->
pClass
->
destroy
(
pDocView
->
pDocument
);
pDocView
->
pDocument
=
0
;
pDocView
->
pDocument
=
NULL
;
}
pDocView
->
pDocument
=
pDocView
->
pOffice
->
pClass
->
documentLoad
(
pDocView
->
pOffice
,
pPath
);
renderDocument
(
pDocView
);
pPath
);
if
(
!
pDocView
->
pDocument
)
{
// FIXME: should have a GError parameter and populate it.
char
*
pError
=
pDocView
->
pOffice
->
pClass
->
getError
(
pDocView
->
pOffice
);
fprintf
(
stderr
,
"Error opening document '%s'
\n
"
,
pError
);
return
FALSE
;
}
else
renderDocument
(
pDocView
);
return
FALS
E
;
return
TRU
E
;
}
SAL_DLLPUBLIC_EXPORT
void
lok_docview_set_zoom
(
LOKDocView
*
pDocView
,
float
fZoom
)
...
...
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