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
7c3560f5
Kaydet (Commit)
7c3560f5
authored
Tem 11, 2013
tarafından
Andrzej J.R. Hunt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Write embedded .fdb into Storage for OnSave & OnSaveAs.
Change-Id: I2534378c48253584904d11bf049d5d4a05c300dd
üst
031009ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
FConnection.cxx
connectivity/source/drivers/firebird/FConnection.cxx
+22
-2
No files found.
connectivity/source/drivers/firebird/FConnection.cxx
Dosyayı görüntüle @
7c3560f5
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,7 @@
#include "resource/sharedresources.hxx"
#include "resource/sharedresources.hxx"
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/tempfile.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
...
@@ -498,9 +499,28 @@ void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeExceptio
...
@@ -498,9 +499,28 @@ void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeExceptio
void
SAL_CALL
OConnection
::
documentEventOccured
(
const
DocumentEvent
&
_Event
)
void
SAL_CALL
OConnection
::
documentEventOccured
(
const
DocumentEvent
&
_Event
)
throw
(
RuntimeException
)
throw
(
RuntimeException
)
{
{
if
(
_Event
.
EventName
==
"
onSave"
||
_Event
.
EventName
==
"o
nSaveAs"
)
if
(
_Event
.
EventName
==
"
OnSave"
||
_Event
.
EventName
==
"O
nSaveAs"
)
{
{
// TODO: write to storage
if
(
m_bIsEmbedded
&&
m_xEmbeddedStorage
.
is
()
)
{
const
OUString
sDBName
(
"firebird.fdb"
);
// Location within .odb container
SAL_INFO
(
"connectivity.firebird"
,
"Writing .fdb into .odb"
);
Reference
<
XStream
>
xDBStream
(
m_xEmbeddedStorage
->
openStreamElement
(
sDBName
,
ElementModes
::
WRITE
));
using
namespace
::
comphelper
;
Reference
<
XComponentContext
>
xContext
=
comphelper
::
getProcessComponentContext
();
Reference
<
XInputStream
>
xInputStream
;
if
(
xContext
.
is
())
xInputStream
=
OStorageHelper
::
GetInputStreamFromURL
(
m_aURL
,
xContext
);
if
(
xInputStream
.
is
())
OStorageHelper
::
CopyInputToOutput
(
xInputStream
,
xDBStream
->
getOutputStream
());
// TODO: ensure db is in safe state
}
}
}
}
}
// XEventListener
// XEventListener
...
...
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