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
0fdf09b9
Kaydet (Commit)
0fdf09b9
authored
Kas 03, 2004
tarafından
Pascal Junck
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS aw019 (1.21.300); FILE MERGED
2004/09/28 15:53:07 aw 1.21.300.1: #i11190#
üst
1804b82c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
80 deletions
+80
-80
fmpgeimp.cxx
svx/source/form/fmpgeimp.cxx
+80
-80
No files found.
svx/source/form/fmpgeimp.cxx
Dosyayı görüntüle @
0fdf09b9
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: fmpgeimp.cxx,v $
* $RCSfile: fmpgeimp.cxx,v $
*
*
* $Revision: 1.2
1
$
* $Revision: 1.2
2
$
*
*
* last change: $Author:
hr $ $Date: 2004-04-13 10:58:25
$
* last change: $Author:
pjunck $ $Date: 2004-11-03 10:44:01
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -663,86 +663,86 @@ UniString FmFormPageImpl::getDefaultName( sal_Int16 _nClassId, const Reference<
...
@@ -663,86 +663,86 @@ UniString FmFormPageImpl::getDefaultName( sal_Int16 _nClassId, const Reference<
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
FmFormPageImpl
::
WriteData
(
SvStream
&
rOut
)
const
//BFS01
void FmFormPageImpl::WriteData(SvStream& rOut) const
{
//BFS01
{
// anlegen eines output streams fuer UNO
//BFS01
// anlegen eines output streams fuer UNO
Reference
<
::
com
::
sun
::
star
::
io
::
XActiveDataSource
>
xSource
(
::
comphelper
::
getProcessServiceFactory
()
->
createInstance
(
::
rtl
::
OUString
::
createFromAscii
(
"com.sun.star.io.ObjectOutputStream"
)),
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XActiveDataSource > xSource(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectOutputStream")), UNO_QUERY);
Reference
<
::
com
::
sun
::
star
::
io
::
XOutputStream
>
xMarkOut
(
::
comphelper
::
getProcessServiceFactory
()
->
createInstance
(
::
rtl
::
OUString
::
createFromAscii
(
"com.sun.star.io.MarkableOutputStream"
)),
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XOutputStream > xMarkOut(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableOutputStream")), UNO_QUERY);
Reference
<
::
com
::
sun
::
star
::
io
::
XActiveDataSource
>
xMarkSource
(
xMarkOut
,
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XActiveDataSource > xMarkSource(xMarkOut, UNO_QUERY);
//BFS01
if
(
xSource
.
is
())
//BFS01
if (xSource.is())
{
//BFS01
{
xMarkSource
->
setOutputStream
(
new
::
utl
::
OOutputStreamWrapper
(
rOut
));
//BFS01
xMarkSource->setOutputStream(new ::utl::OOutputStreamWrapper(rOut));
xSource
->
setOutputStream
(
xMarkOut
);
//BFS01
xSource->setOutputStream(xMarkOut);
//BFS01
Reference
<
::
com
::
sun
::
star
::
io
::
XObjectOutputStream
>
xOutStrm
(
xSource
,
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XObjectOutputStream > xOutStrm(xSource, UNO_QUERY);
try
//BFS01
try
{
//BFS01
{
write
(
xOutStrm
);
//BFS01
write(xOutStrm);
}
//BFS01
}
catch
(
Exception
&
)
//BFS01
catch(Exception&)
{
//BFS01
{
rOut
.
SetError
(
ERRCODE_CLASS_WRITE
|
ERRCODE_SVX_FORMS_READWRITEFAILED
|
ERRCODE_WARNING_MASK
);
//BFS01
rOut.SetError( ERRCODE_CLASS_WRITE | ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_WARNING_MASK );
}
//BFS01
}
//BFS01
xOutStrm
->
closeOutput
();
//BFS01
xOutStrm->closeOutput();
}
//BFS01
}
else
//BFS01
else
{
//BFS01
{
// let's do a hack : in former versions we didn't use UNO-stream but SvStreams, so there was
//BFS01
// let's do a hack : in former versions we didn't use UNO-stream but SvStreams, so there was
// no possibility that we couldn't write because of the lack of stream objects. Now, with UNO, this may happen
//BFS01
// no possibility that we couldn't write because of the lack of stream objects. Now, with UNO, this may happen
// (as it happended here). But the read-methods of the older versions don't expect that (there is no flag in
//BFS01
// (as it happended here). But the read-methods of the older versions don't expect that (there is no flag in
// the fileformat as it never was neccessary). To allow the old versions the read of the documents, we fake the
//BFS01
// the fileformat as it never was neccessary). To allow the old versions the read of the documents, we fake the
// write : the first token usually written by our impl is an sal_Int32 giving the number of forms within the forms
//BFS01
// write : the first token usually written by our impl is an sal_Int32 giving the number of forms within the forms
// collection. If this number is 0, no further reading will occur.
//BFS01
// collection. If this number is 0, no further reading will occur.
sal_Int32
nDummLength
=
0
;
rOut
<<
nDummLength
;
// this means 'no forms'
//BFS01
sal_Int32 nDummLength = 0; rOut << nDummLength; // this means 'no forms'
nDummLength
=
0
;
rOut
<<
nDummLength
;
// this means 'no form controls"
//BFS01
nDummLength = 0; rOut << nDummLength; // this means 'no form controls"
// To tell the user that something went wrong we set a warning on the stream.
//BFS01
// To tell the user that something went wrong we set a warning on the stream.
rOut
.
SetError
(
ERRCODE_CLASS_WRITE
|
ERRCODE_SVX_FORMS_NOIOSERVICES
|
ERRCODE_WARNING_MASK
);
//BFS01
rOut.SetError( ERRCODE_CLASS_WRITE | ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_WARNING_MASK );
}
//BFS01
}
}
//BFS01
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
FmFormPageImpl
::
ReadData
(
const
SdrIOHeader
&
rHead
,
SvStream
&
rIn
)
//BFS01
void FmFormPageImpl::ReadData(const SdrIOHeader& rHead, SvStream& rIn)
{
//BFS01
{
// Abholen des InputStreams ueber uno
//BFS01
// Abholen des InputStreams ueber uno
Reference
<
::
com
::
sun
::
star
::
io
::
XActiveDataSink
>
xSink
(
::
comphelper
::
getProcessServiceFactory
()
->
createInstance
(
::
rtl
::
OUString
::
createFromAscii
(
"com.sun.star.io.ObjectInputStream"
)),
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XActiveDataSink > xSink(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.ObjectInputStream")), UNO_QUERY);
//BFS01
// creating the mark streams
//BFS01
// creating the mark streams
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
xMarkIn
(
::
comphelper
::
getProcessServiceFactory
()
->
createInstance
(
::
rtl
::
OUString
::
createFromAscii
(
"com.sun.star.io.MarkableInputStream"
)),
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XInputStream > xMarkIn(::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.io.MarkableInputStream")), UNO_QUERY);
Reference
<
::
com
::
sun
::
star
::
io
::
XActiveDataSink
>
xMarkSink
(
xMarkIn
,
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XActiveDataSink > xMarkSink(xMarkIn, UNO_QUERY);
//BFS01
if
(
xSink
.
is
())
//BFS01
if (xSink.is())
{
//BFS01
{
::
utl
::
OInputStreamWrapper
*
pUnoStream
=
new
::
utl
::
OInputStreamWrapper
(
rIn
);
//BFS01
::utl::OInputStreamWrapper* pUnoStream = new ::utl::OInputStreamWrapper(rIn);
xMarkSink
->
setInputStream
(
Reference
<
::
com
::
sun
::
star
::
io
::
XInputStream
>
(
pUnoStream
));
//BFS01
xMarkSink->setInputStream(Reference< ::com::sun::star::io::XInputStream > (pUnoStream));
xSink
->
setInputStream
(
xMarkIn
);
//BFS01
xSink->setInputStream(xMarkIn);
//BFS01
// freigeben aller forms
//BFS01
// freigeben aller forms
xCurrentForm
=
NULL
;
//BFS01
xCurrentForm = NULL;
//BFS01
if
(
xForms
->
hasElements
())
//BFS01
if (xForms->hasElements())
{
//BFS01
{
::
comphelper
::
disposeComponent
(
xForms
);
//BFS01
::comphelper::disposeComponent(xForms);
Init
();
//BFS01
Init();
}
//BFS01
}
//BFS01
Reference
<
::
com
::
sun
::
star
::
io
::
XObjectInputStream
>
xInStrm
(
xSink
,
UNO_QUERY
);
//BFS01
Reference< ::com::sun::star::io::XObjectInputStream > xInStrm(xSink,UNO_QUERY);
try
//BFS01
try
{
//BFS01
{
read
(
xInStrm
);
//BFS01
read(xInStrm);
}
//BFS01
}
catch
(
Exception
&
)
//BFS01
catch(Exception&)
{
//BFS01
{
rIn
.
SetError
(
ERRCODE_CLASS_READ
|
ERRCODE_SVX_FORMS_READWRITEFAILED
|
ERRCODE_WARNING_MASK
);
//BFS01
rIn.SetError( ERRCODE_CLASS_READ | ERRCODE_SVX_FORMS_READWRITEFAILED | ERRCODE_WARNING_MASK );
}
//BFS01
}
//BFS01
//BFS01
xInStrm
->
closeInput
();
//BFS01
xInStrm->closeInput();
}
//BFS01
}
else
//BFS01
else
rIn
.
SetError
(
ERRCODE_CLASS_READ
|
ERRCODE_SVX_FORMS_NOIOSERVICES
|
ERRCODE_WARNING_MASK
);
//BFS01
rIn.SetError( ERRCODE_CLASS_READ | ERRCODE_SVX_FORMS_NOIOSERVICES | ERRCODE_WARNING_MASK );
}
//BFS01
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
FmFormPageImpl
::
write
(
const
Reference
<
::
com
::
sun
::
star
::
io
::
XObjectOutputStream
>
&
xOutStrm
)
const
void
FmFormPageImpl
::
write
(
const
Reference
<
::
com
::
sun
::
star
::
io
::
XObjectOutputStream
>
&
xOutStrm
)
const
...
...
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