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
42e2262c
Kaydet (Commit)
42e2262c
authored
Kas 10, 2015
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
loplugin:nullptr (automatic rewrite)
Change-Id: Ie4d4ce386f2810244fb97bf909870a839256971d
üst
0a1c17a3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
61 deletions
+61
-61
DirectoryStreamTest.cxx
writerperfect/qa/unit/DirectoryStreamTest.cxx
+1
-1
WPXSvStreamTest.cxx
writerperfect/qa/unit/WPXSvStreamTest.cxx
+5
-5
wpftcalc_genericfilter.cxx
writerperfect/source/calc/wpftcalc_genericfilter.cxx
+4
-4
DirectoryStream.cxx
writerperfect/source/common/DirectoryStream.cxx
+10
-10
WPXSvInputStream.cxx
writerperfect/source/common/WPXSvInputStream.cxx
+21
-21
wpftdraw_genericfilter.cxx
writerperfect/source/draw/wpftdraw_genericfilter.cxx
+9
-9
wpftimpress_genericfilter.cxx
writerperfect/source/impress/wpftimpress_genericfilter.cxx
+3
-3
WordPerfectImportFilter.cxx
writerperfect/source/writer/WordPerfectImportFilter.cxx
+1
-1
wpftwriter_genericfilter.cxx
writerperfect/source/writer/wpftwriter_genericfilter.cxx
+7
-7
No files found.
writerperfect/qa/unit/DirectoryStreamTest.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -106,7 +106,7 @@ void lcl_testDataOperations(RVNGInputStream &rStream)
...
@@ -106,7 +106,7 @@ void lcl_testDataOperations(RVNGInputStream &rStream)
CPPUNIT_ASSERT_EQUAL
(
-
1
,
rStream
.
seek
(
0
,
librevenge
::
RVNG_SEEK_CUR
));
CPPUNIT_ASSERT_EQUAL
(
-
1
,
rStream
.
seek
(
0
,
librevenge
::
RVNG_SEEK_CUR
));
unsigned
long
numBytesRead
=
0
;
unsigned
long
numBytesRead
=
0
;
CPPUNIT_ASSERT
(
0
==
rStream
.
read
(
1
,
numBytesRead
));
CPPUNIT_ASSERT
(
nullptr
==
rStream
.
read
(
1
,
numBytesRead
));
CPPUNIT_ASSERT_EQUAL
(
0UL
,
numBytesRead
);
CPPUNIT_ASSERT_EQUAL
(
0UL
,
numBytesRead
);
}
}
...
...
writerperfect/qa/unit/WPXSvStreamTest.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -122,7 +122,7 @@ void WPXSvStreamTest::testRead()
...
@@ -122,7 +122,7 @@ void WPXSvStreamTest::testRead()
const
unsigned
long
nLen
=
sizeof
aText
;
const
unsigned
long
nLen
=
sizeof
aText
;
unsigned
long
nReadBytes
=
0
;
unsigned
long
nReadBytes
=
0
;
const
unsigned
char
*
pData
=
0
;
const
unsigned
char
*
pData
=
nullptr
;
const
unsigned
char
*
const
pTextOrig
=
reinterpret_cast
<
const
unsigned
char
*>
(
aText
);
const
unsigned
char
*
const
pTextOrig
=
reinterpret_cast
<
const
unsigned
char
*>
(
aText
);
const
unsigned
char
*
pText
=
pTextOrig
;
const
unsigned
char
*
pText
=
pTextOrig
;
...
@@ -174,7 +174,7 @@ void WPXSvStreamTest::testRead()
...
@@ -174,7 +174,7 @@ void WPXSvStreamTest::testRead()
pData
=
pInput
->
read
(
0UL
,
nReadBytes
);
pData
=
pInput
->
read
(
0UL
,
nReadBytes
);
CPPUNIT_ASSERT_EQUAL
(
0UL
,
nReadBytes
);
CPPUNIT_ASSERT_EQUAL
(
0UL
,
nReadBytes
);
CPPUNIT_ASSERT_EQUAL
(
0L
,
pInput
->
tell
());
CPPUNIT_ASSERT_EQUAL
(
0L
,
pInput
->
tell
());
CPPUNIT_ASSERT_EQUAL
(
pData
,
static_cast
<
const
unsigned
char
*>
(
0
));
CPPUNIT_ASSERT_EQUAL
(
pData
,
static_cast
<
const
unsigned
char
*>
(
nullptr
));
CPPUNIT_ASSERT
(
!
pInput
->
isEnd
());
CPPUNIT_ASSERT
(
!
pInput
->
isEnd
());
}
}
...
@@ -340,9 +340,9 @@ void WPXSvStreamTest::testStructured()
...
@@ -340,9 +340,9 @@ void WPXSvStreamTest::testStructured()
CPPUNIT_ASSERT
(
!
pInput
->
isStructured
());
CPPUNIT_ASSERT
(
!
pInput
->
isStructured
());
CPPUNIT_ASSERT
(
0
==
pInput
->
subStreamCount
());
CPPUNIT_ASSERT
(
0
==
pInput
->
subStreamCount
());
CPPUNIT_ASSERT
(
!
pInput
->
existsSubStream
(
"foo"
));
CPPUNIT_ASSERT
(
!
pInput
->
existsSubStream
(
"foo"
));
CPPUNIT_ASSERT
(
0
==
pInput
->
getSubStreamByName
(
"foo"
));
CPPUNIT_ASSERT
(
nullptr
==
pInput
->
getSubStreamByName
(
"foo"
));
CPPUNIT_ASSERT
(
0
==
pInput
->
getSubStreamById
(
42
));
CPPUNIT_ASSERT
(
nullptr
==
pInput
->
getSubStreamById
(
42
));
CPPUNIT_ASSERT
(
0
==
pInput
->
subStreamName
(
42
));
CPPUNIT_ASSERT
(
nullptr
==
pInput
->
subStreamName
(
42
));
}
}
}
}
...
...
writerperfect/source/calc/wpftcalc_genericfilter.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -41,19 +41,19 @@ static cppu::ImplementationEntry const services[] =
...
@@ -41,19 +41,19 @@ static cppu::ImplementationEntry const services[] =
{
{
&
MSWorksCalcImportFilter_createInstance
,
&
MSWorksCalcImportFilter_getImplementationName
,
&
MSWorksCalcImportFilter_createInstance
,
&
MSWorksCalcImportFilter_getImplementationName
,
&
MSWorksCalcImportFilter_getSupportedServiceNames
,
&
MSWorksCalcImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
MWAWCalcImportFilter_createInstance
,
&
MWAWCalcImportFilter_getImplementationName
,
&
MWAWCalcImportFilter_createInstance
,
&
MWAWCalcImportFilter_getImplementationName
,
&
MWAWCalcImportFilter_getSupportedServiceNames
,
&
MWAWCalcImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
NumbersImportFilter_createInstance
,
&
NumbersImportFilter_getImplementationName
,
&
NumbersImportFilter_createInstance
,
&
NumbersImportFilter_getImplementationName
,
&
NumbersImportFilter_getSupportedServiceNames
,
&
NumbersImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
0
,
0
,
0
,
0
,
0
,
0
}
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
0
}
};
};
}
}
...
...
writerperfect/source/common/DirectoryStream.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -106,7 +106,7 @@ DirectoryStream::Impl::Impl(const uno::Reference<ucb::XContent> &rxContent)
...
@@ -106,7 +106,7 @@ DirectoryStream::Impl::Impl(const uno::Reference<ucb::XContent> &rxContent)
}
}
DirectoryStream
::
DirectoryStream
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XContent
>
&
xContent
)
DirectoryStream
::
DirectoryStream
(
const
com
::
sun
::
star
::
uno
::
Reference
<
com
::
sun
::
star
::
ucb
::
XContent
>
&
xContent
)
:
m_pImpl
(
isDirectory
(
xContent
)
?
new
Impl
(
xContent
)
:
0
)
:
m_pImpl
(
isDirectory
(
xContent
)
?
new
Impl
(
xContent
)
:
nullptr
)
{
{
}
}
...
@@ -120,9 +120,9 @@ DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Ref
...
@@ -120,9 +120,9 @@ DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Ref
try
try
{
{
if
(
!
xContent
.
is
())
if
(
!
xContent
.
is
())
return
0
;
return
nullptr
;
DirectoryStream
*
pDir
(
0
);
DirectoryStream
*
pDir
(
nullptr
);
const
uno
::
Reference
<
container
::
XChild
>
xChild
(
xContent
,
uno
::
UNO_QUERY
);
const
uno
::
Reference
<
container
::
XChild
>
xChild
(
xContent
,
uno
::
UNO_QUERY
);
if
(
xChild
.
is
())
if
(
xChild
.
is
())
...
@@ -134,7 +134,7 @@ DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Ref
...
@@ -134,7 +134,7 @@ DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Ref
if
(
!
pDir
->
isStructured
())
if
(
!
pDir
->
isStructured
())
{
{
delete
pDir
;
delete
pDir
;
pDir
=
0
;
pDir
=
nullptr
;
}
}
}
}
}
}
...
@@ -143,7 +143,7 @@ DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Ref
...
@@ -143,7 +143,7 @@ DirectoryStream *DirectoryStream::createForParent(const com::sun::star::uno::Ref
}
}
catch
(...)
catch
(...)
{
{
return
0
;
return
nullptr
;
}
}
}
}
...
@@ -180,7 +180,7 @@ unsigned DirectoryStream::subStreamCount()
...
@@ -180,7 +180,7 @@ unsigned DirectoryStream::subStreamCount()
const
char
*
DirectoryStream
::
subStreamName
(
unsigned
/* id */
)
const
char
*
DirectoryStream
::
subStreamName
(
unsigned
/* id */
)
{
{
// TODO: implement me
// TODO: implement me
return
0
;
return
nullptr
;
}
}
bool
DirectoryStream
::
existsSubStream
(
const
char
*
/* name */
)
bool
DirectoryStream
::
existsSubStream
(
const
char
*
/* name */
)
...
@@ -192,26 +192,26 @@ bool DirectoryStream::existsSubStream(const char * /* name */)
...
@@ -192,26 +192,26 @@ bool DirectoryStream::existsSubStream(const char * /* name */)
librevenge
::
RVNGInputStream
*
DirectoryStream
::
getSubStreamByName
(
const
char
*
const
pName
)
librevenge
::
RVNGInputStream
*
DirectoryStream
::
getSubStreamByName
(
const
char
*
const
pName
)
{
{
if
(
!
m_pImpl
)
if
(
!
m_pImpl
)
return
0
;
return
nullptr
;
ucbhelper
::
Content
aContent
(
m_pImpl
->
xContent
,
uno
::
Reference
<
ucb
::
XCommandEnvironment
>
(),
comphelper
::
getProcessComponentContext
());
ucbhelper
::
Content
aContent
(
m_pImpl
->
xContent
,
uno
::
Reference
<
ucb
::
XCommandEnvironment
>
(),
comphelper
::
getProcessComponentContext
());
const
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
(
findStream
(
aContent
,
rtl
::
OUString
::
createFromAscii
(
pName
)));
const
uno
::
Reference
<
io
::
XInputStream
>
xInputStream
(
findStream
(
aContent
,
rtl
::
OUString
::
createFromAscii
(
pName
)));
if
(
xInputStream
.
is
())
if
(
xInputStream
.
is
())
return
new
WPXSvInputStream
(
xInputStream
);
return
new
WPXSvInputStream
(
xInputStream
);
return
0
;
return
nullptr
;
}
}
librevenge
::
RVNGInputStream
*
DirectoryStream
::
getSubStreamById
(
unsigned
/* id */
)
librevenge
::
RVNGInputStream
*
DirectoryStream
::
getSubStreamById
(
unsigned
/* id */
)
{
{
// TODO: implement me
// TODO: implement me
return
0
;
return
nullptr
;
}
}
const
unsigned
char
*
DirectoryStream
::
read
(
unsigned
long
,
unsigned
long
&
nNumBytesRead
)
const
unsigned
char
*
DirectoryStream
::
read
(
unsigned
long
,
unsigned
long
&
nNumBytesRead
)
{
{
nNumBytesRead
=
0
;
nNumBytesRead
=
0
;
return
0
;
return
nullptr
;
}
}
int
DirectoryStream
::
seek
(
long
,
librevenge
::
RVNG_SEEK_TYPE
)
int
DirectoryStream
::
seek
(
long
,
librevenge
::
RVNG_SEEK_TYPE
)
...
...
writerperfect/source/common/WPXSvInputStream.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -254,7 +254,7 @@ tools::SvRef<SotStorageStream> OLEStorageImpl::createStream(const rtl::OUString
...
@@ -254,7 +254,7 @@ tools::SvRef<SotStorageStream> OLEStorageImpl::createStream(const rtl::OUString
const
OLEStorageMap_t
::
const_iterator
aIt
=
maStorageMap
.
find
(
aDir
);
const
OLEStorageMap_t
::
const_iterator
aIt
=
maStorageMap
.
find
(
aDir
);
if
(
maStorageMap
.
end
()
==
aIt
)
if
(
maStorageMap
.
end
()
==
aIt
)
return
0
;
return
nullptr
;
return
aIt
->
second
.
ref
->
OpenSotStream
(
aName
,
STREAM_STD_READ
);
return
aIt
->
second
.
ref
->
OpenSotStream
(
aName
,
STREAM_STD_READ
);
}
}
...
@@ -452,7 +452,7 @@ WPXSvInputStreamImpl::WPXSvInputStreamImpl(Reference< XInputStream > xStream) :
...
@@ -452,7 +452,7 @@ WPXSvInputStreamImpl::WPXSvInputStreamImpl(Reference< XInputStream > xStream) :
mbCheckedOLE
(
false
),
mbCheckedOLE
(
false
),
mbCheckedZip
(
false
),
mbCheckedZip
(
false
),
mnLength
(
0
),
mnLength
(
0
),
mpReadBuffer
(
0
),
mpReadBuffer
(
nullptr
),
mnReadBufferLength
(
0
),
mnReadBufferLength
(
0
),
mnReadBufferPos
(
0
)
mnReadBufferPos
(
0
)
{
{
...
@@ -488,11 +488,11 @@ const unsigned char *WPXSvInputStreamImpl::read(unsigned long numBytes, unsigned
...
@@ -488,11 +488,11 @@ const unsigned char *WPXSvInputStreamImpl::read(unsigned long numBytes, unsigned
numBytesRead
=
0
;
numBytesRead
=
0
;
if
(
numBytes
==
0
||
isEnd
())
if
(
numBytes
==
0
||
isEnd
())
return
0
;
return
nullptr
;
numBytesRead
=
mxStream
->
readSomeBytes
(
maData
,
numBytes
);
numBytesRead
=
mxStream
->
readSomeBytes
(
maData
,
numBytes
);
if
(
numBytesRead
==
0
)
if
(
numBytesRead
==
0
)
return
0
;
return
nullptr
;
return
reinterpret_cast
<
const
unsigned
char
*>
(
maData
.
getConstArray
());
return
reinterpret_cast
<
const
unsigned
char
*>
(
maData
.
getConstArray
());
}
}
...
@@ -584,7 +584,7 @@ unsigned WPXSvInputStreamImpl::subStreamCount()
...
@@ -584,7 +584,7 @@ unsigned WPXSvInputStreamImpl::subStreamCount()
const
char
*
WPXSvInputStreamImpl
::
subStreamName
(
const
unsigned
id
)
const
char
*
WPXSvInputStreamImpl
::
subStreamName
(
const
unsigned
id
)
{
{
if
((
mnLength
==
0
)
||
!
mxStream
.
is
()
||
!
mxSeekable
.
is
())
if
((
mnLength
==
0
)
||
!
mxStream
.
is
()
||
!
mxSeekable
.
is
())
return
0
;
return
nullptr
;
PositionHolder
pos
(
mxSeekable
);
PositionHolder
pos
(
mxSeekable
);
mxSeekable
->
seek
(
0
);
mxSeekable
->
seek
(
0
);
...
@@ -594,7 +594,7 @@ const char *WPXSvInputStreamImpl::subStreamName(const unsigned id)
...
@@ -594,7 +594,7 @@ const char *WPXSvInputStreamImpl::subStreamName(const unsigned id)
ensureOLEIsInitialized
();
ensureOLEIsInitialized
();
if
(
mpOLEStorage
->
maStreams
.
size
()
<=
id
)
if
(
mpOLEStorage
->
maStreams
.
size
()
<=
id
)
return
0
;
return
nullptr
;
return
mpOLEStorage
->
maStreams
[
id
].
name
.
getStr
();
return
mpOLEStorage
->
maStreams
[
id
].
name
.
getStr
();
}
}
...
@@ -606,12 +606,12 @@ const char *WPXSvInputStreamImpl::subStreamName(const unsigned id)
...
@@ -606,12 +606,12 @@ const char *WPXSvInputStreamImpl::subStreamName(const unsigned id)
ensureZipIsInitialized
();
ensureZipIsInitialized
();
if
(
mpZipStorage
->
maStreams
.
size
()
<=
id
)
if
(
mpZipStorage
->
maStreams
.
size
()
<=
id
)
return
0
;
return
nullptr
;
return
mpZipStorage
->
maStreams
[
id
].
aName
.
getStr
();
return
mpZipStorage
->
maStreams
[
id
].
aName
.
getStr
();
}
}
return
0
;
return
nullptr
;
}
}
bool
WPXSvInputStreamImpl
::
existsSubStream
(
const
char
*
const
name
)
bool
WPXSvInputStreamImpl
::
existsSubStream
(
const
char
*
const
name
)
...
@@ -647,10 +647,10 @@ bool WPXSvInputStreamImpl::existsSubStream(const char *const name)
...
@@ -647,10 +647,10 @@ bool WPXSvInputStreamImpl::existsSubStream(const char *const name)
librevenge
::
RVNGInputStream
*
WPXSvInputStreamImpl
::
getSubStreamByName
(
const
char
*
const
name
)
librevenge
::
RVNGInputStream
*
WPXSvInputStreamImpl
::
getSubStreamByName
(
const
char
*
const
name
)
{
{
if
(
!
name
)
if
(
!
name
)
return
0
;
return
nullptr
;
if
((
mnLength
==
0
)
||
!
mxStream
.
is
()
||
!
mxSeekable
.
is
())
if
((
mnLength
==
0
)
||
!
mxStream
.
is
()
||
!
mxSeekable
.
is
())
return
0
;
return
nullptr
;
PositionHolder
pos
(
mxSeekable
);
PositionHolder
pos
(
mxSeekable
);
mxSeekable
->
seek
(
0
);
mxSeekable
->
seek
(
0
);
...
@@ -679,13 +679,13 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamByName(const char
...
@@ -679,13 +679,13 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamByName(const char
}
}
}
}
return
0
;
return
nullptr
;
}
}
librevenge
::
RVNGInputStream
*
WPXSvInputStreamImpl
::
getSubStreamById
(
const
unsigned
id
)
librevenge
::
RVNGInputStream
*
WPXSvInputStreamImpl
::
getSubStreamById
(
const
unsigned
id
)
{
{
if
((
mnLength
==
0
)
||
!
mxStream
.
is
()
||
!
mxSeekable
.
is
())
if
((
mnLength
==
0
)
||
!
mxStream
.
is
()
||
!
mxSeekable
.
is
())
return
0
;
return
nullptr
;
PositionHolder
pos
(
mxSeekable
);
PositionHolder
pos
(
mxSeekable
);
mxSeekable
->
seek
(
0
);
mxSeekable
->
seek
(
0
);
...
@@ -695,7 +695,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsign
...
@@ -695,7 +695,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsign
ensureOLEIsInitialized
();
ensureOLEIsInitialized
();
if
(
mpOLEStorage
->
maStreams
.
size
()
<=
id
)
if
(
mpOLEStorage
->
maStreams
.
size
()
<=
id
)
return
0
;
return
nullptr
;
return
createWPXStream
(
mpOLEStorage
->
getStream
(
id
));
return
createWPXStream
(
mpOLEStorage
->
getStream
(
id
));
}
}
...
@@ -707,7 +707,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsign
...
@@ -707,7 +707,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsign
ensureZipIsInitialized
();
ensureZipIsInitialized
();
if
(
mpZipStorage
->
maStreams
.
size
()
<=
id
)
if
(
mpZipStorage
->
maStreams
.
size
()
<=
id
)
return
0
;
return
nullptr
;
try
try
{
{
...
@@ -718,7 +718,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsign
...
@@ -718,7 +718,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::getSubStreamById(const unsign
// nothing needed
// nothing needed
}
}
}
}
return
0
;
return
nullptr
;
}
}
void
WPXSvInputStreamImpl
::
invalidateReadBuffer
()
void
WPXSvInputStreamImpl
::
invalidateReadBuffer
()
...
@@ -726,7 +726,7 @@ void WPXSvInputStreamImpl::invalidateReadBuffer()
...
@@ -726,7 +726,7 @@ void WPXSvInputStreamImpl::invalidateReadBuffer()
if
(
mpReadBuffer
)
if
(
mpReadBuffer
)
{
{
seek
((
long
)
tell
()
+
(
long
)
mnReadBufferPos
-
(
long
)
mnReadBufferLength
);
seek
((
long
)
tell
()
+
(
long
)
mnReadBufferPos
-
(
long
)
mnReadBufferLength
);
mpReadBuffer
=
0
;
mpReadBuffer
=
nullptr
;
mnReadBufferPos
=
0
;
mnReadBufferPos
=
0
;
mnReadBufferLength
=
0
;
mnReadBufferLength
=
0
;
}
}
...
@@ -739,7 +739,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const tools::
...
@@ -739,7 +739,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const tools::
Reference
<
XInputStream
>
xContents
(
new
utl
::
OSeekableInputStreamWrapper
(
rxStorage
));
Reference
<
XInputStream
>
xContents
(
new
utl
::
OSeekableInputStreamWrapper
(
rxStorage
));
return
new
WPXSvInputStream
(
xContents
);
return
new
WPXSvInputStream
(
xContents
);
}
}
return
0
;
return
nullptr
;
}
}
librevenge
::
RVNGInputStream
*
WPXSvInputStreamImpl
::
createWPXStream
(
const
Reference
<
XInputStream
>
&
rxStream
)
librevenge
::
RVNGInputStream
*
WPXSvInputStreamImpl
::
createWPXStream
(
const
Reference
<
XInputStream
>
&
rxStream
)
...
@@ -747,7 +747,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const Referen
...
@@ -747,7 +747,7 @@ librevenge::RVNGInputStream *WPXSvInputStreamImpl::createWPXStream(const Referen
if
(
rxStream
.
is
())
if
(
rxStream
.
is
())
return
new
WPXSvInputStream
(
rxStream
);
return
new
WPXSvInputStream
(
rxStream
);
else
else
return
0
;
return
nullptr
;
}
}
bool
WPXSvInputStreamImpl
::
isOLE
()
bool
WPXSvInputStreamImpl
::
isOLE
()
...
@@ -827,7 +827,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
...
@@ -827,7 +827,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
numBytesRead
=
0
;
numBytesRead
=
0
;
if
(
numBytes
==
0
||
numBytes
>
(
std
::
numeric_limits
<
unsigned
long
>::
max
)()
/
2
)
if
(
numBytes
==
0
||
numBytes
>
(
std
::
numeric_limits
<
unsigned
long
>::
max
)()
/
2
)
return
0
;
return
nullptr
;
if
(
mpImpl
->
mpReadBuffer
)
if
(
mpImpl
->
mpReadBuffer
)
{
{
...
@@ -844,7 +844,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
...
@@ -844,7 +844,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
unsigned
long
curpos
=
(
unsigned
long
)
mpImpl
->
tell
();
unsigned
long
curpos
=
(
unsigned
long
)
mpImpl
->
tell
();
if
(
curpos
==
(
unsigned
long
)
-
1
)
// returned ERROR
if
(
curpos
==
(
unsigned
long
)
-
1
)
// returned ERROR
return
0
;
return
nullptr
;
if
((
curpos
+
numBytes
<
curpos
)
/*overflow*/
||
if
((
curpos
+
numBytes
<
curpos
)
/*overflow*/
||
(
curpos
+
numBytes
>=
(
sal_uInt64
)
mpImpl
->
mnLength
))
/*reading more than available*/
(
curpos
+
numBytes
>=
(
sal_uInt64
)
mpImpl
->
mnLength
))
/*reading more than available*/
...
@@ -869,7 +869,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
...
@@ -869,7 +869,7 @@ const unsigned char *WPXSvInputStream::read(unsigned long numBytes, unsigned lon
mpImpl
->
mnReadBufferPos
=
0
;
mpImpl
->
mnReadBufferPos
=
0
;
if
(
!
mpImpl
->
mnReadBufferLength
)
if
(
!
mpImpl
->
mnReadBufferLength
)
return
0
;
return
nullptr
;
numBytesRead
=
numBytes
;
numBytesRead
=
numBytes
;
...
...
writerperfect/source/draw/wpftdraw_genericfilter.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -46,49 +46,49 @@ static cppu::ImplementationEntry const services[] =
...
@@ -46,49 +46,49 @@ static cppu::ImplementationEntry const services[] =
{
{
&
CDRImportFilter_createInstance
,
&
CDRImportFilter_getImplementationName
,
&
CDRImportFilter_createInstance
,
&
CDRImportFilter_getImplementationName
,
&
CDRImportFilter_getSupportedServiceNames
,
&
CDRImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
CMXImportFilter_createInstance
,
&
CMXImportFilter_getImplementationName
,
&
CMXImportFilter_createInstance
,
&
CMXImportFilter_getImplementationName
,
&
CMXImportFilter_getSupportedServiceNames
,
&
CMXImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
FreehandImportFilter_createInstance
,
&
FreehandImportFilter_createInstance
,
&
FreehandImportFilter_getImplementationName
,
&
FreehandImportFilter_getImplementationName
,
&
FreehandImportFilter_getSupportedServiceNames
,
&
FreehandImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
PageMakerImportFilter_createInstance
,
&
PageMakerImportFilter_createInstance
,
&
PageMakerImportFilter_getImplementationName
,
&
PageMakerImportFilter_getImplementationName
,
&
PageMakerImportFilter_getSupportedServiceNames
,
&
PageMakerImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
MSPUBImportFilter_createInstance
,
&
MSPUBImportFilter_createInstance
,
&
MSPUBImportFilter_getImplementationName
,
&
MSPUBImportFilter_getImplementationName
,
&
MSPUBImportFilter_getSupportedServiceNames
,
&
MSPUBImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
MWAWDrawImportFilter_createInstance
,
&
MWAWDrawImportFilter_createInstance
,
&
MWAWDrawImportFilter_getImplementationName
,
&
MWAWDrawImportFilter_getImplementationName
,
&
MWAWDrawImportFilter_getSupportedServiceNames
,
&
MWAWDrawImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
VisioImportFilter_createInstance
,
&
VisioImportFilter_createInstance
,
&
VisioImportFilter_getImplementationName
,
&
VisioImportFilter_getImplementationName
,
&
VisioImportFilter_getSupportedServiceNames
,
&
VisioImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
WPGImportFilter_createInstance
,
&
WPGImportFilter_getImplementationName
,
&
WPGImportFilter_createInstance
,
&
WPGImportFilter_getImplementationName
,
&
WPGImportFilter_getSupportedServiceNames
,
&
WPGImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
0
,
0
,
0
,
0
,
0
,
0
}
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
0
}
};
};
}
}
...
...
writerperfect/source/impress/wpftimpress_genericfilter.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -36,15 +36,15 @@ static cppu::ImplementationEntry const services[] =
...
@@ -36,15 +36,15 @@ static cppu::ImplementationEntry const services[] =
{
{
&
KeynoteImportFilter_createInstance
,
&
KeynoteImportFilter_getImplementationName
,
&
KeynoteImportFilter_createInstance
,
&
KeynoteImportFilter_getImplementationName
,
&
KeynoteImportFilter_getSupportedServiceNames
,
&
KeynoteImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
MWAWPresentationImportFilter_createInstance
,
&
MWAWPresentationImportFilter_createInstance
,
&
MWAWPresentationImportFilter_getImplementationName
,
&
MWAWPresentationImportFilter_getImplementationName
,
&
MWAWPresentationImportFilter_getSupportedServiceNames
,
&
MWAWPresentationImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
0
,
0
,
0
,
0
,
0
,
0
}
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
0
}
};
};
}
}
...
...
writerperfect/source/writer/WordPerfectImportFilter.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -155,7 +155,7 @@ throw (RuntimeException, std::exception)
...
@@ -155,7 +155,7 @@ throw (RuntimeException, std::exception)
collector
.
addDocumentHandler
(
&
xHandler
,
ODF_FLAT_XML
);
collector
.
addDocumentHandler
(
&
xHandler
,
ODF_FLAT_XML
);
collector
.
registerEmbeddedObjectHandler
(
"image/x-wpg"
,
&
handleEmbeddedWPGObject
);
collector
.
registerEmbeddedObjectHandler
(
"image/x-wpg"
,
&
handleEmbeddedWPGObject
);
collector
.
registerEmbeddedImageHandler
(
"image/x-wpg"
,
&
handleEmbeddedWPGImage
);
collector
.
registerEmbeddedImageHandler
(
"image/x-wpg"
,
&
handleEmbeddedWPGImage
);
if
(
libwpd
::
WPD_OK
==
libwpd
::
WPDocument
::
parse
(
&
input
,
&
collector
,
aUtf8Passwd
.
isEmpty
()
?
0
:
aUtf8Passwd
.
getStr
()))
if
(
libwpd
::
WPD_OK
==
libwpd
::
WPDocument
::
parse
(
&
input
,
&
collector
,
aUtf8Passwd
.
isEmpty
()
?
nullptr
:
aUtf8Passwd
.
getStr
()))
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
writerperfect/source/writer/wpftwriter_genericfilter.cxx
Dosyayı görüntüle @
42e2262c
...
@@ -46,34 +46,34 @@ static cppu::ImplementationEntry const services[] =
...
@@ -46,34 +46,34 @@ static cppu::ImplementationEntry const services[] =
{
{
&
AbiWordImportFilter_createInstance
,
&
AbiWordImportFilter_getImplementationName
,
&
AbiWordImportFilter_createInstance
,
&
AbiWordImportFilter_getImplementationName
,
&
AbiWordImportFilter_getSupportedServiceNames
,
&
AbiWordImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
WordPerfectImportFilter_createInstance
,
&
WordPerfectImportFilter_getImplementationName
,
&
WordPerfectImportFilter_createInstance
,
&
WordPerfectImportFilter_getImplementationName
,
&
WordPerfectImportFilter_getSupportedServiceNames
,
&
WordPerfectImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
MSWorksImportFilter_createInstance
,
&
MSWorksImportFilter_getImplementationName
,
&
MSWorksImportFilter_createInstance
,
&
MSWorksImportFilter_getImplementationName
,
&
MSWorksImportFilter_getSupportedServiceNames
,
&
MSWorksImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
MWAWImportFilter_createInstance
,
&
MWAWImportFilter_getImplementationName
,
&
MWAWImportFilter_createInstance
,
&
MWAWImportFilter_getImplementationName
,
&
MWAWImportFilter_getSupportedServiceNames
,
&
MWAWImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
EBookImportFilter_createInstance
,
&
EBookImportFilter_getImplementationName
,
&
EBookImportFilter_createInstance
,
&
EBookImportFilter_getImplementationName
,
&
EBookImportFilter_getSupportedServiceNames
,
&
EBookImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
{
&
PagesImportFilter_createInstance
,
&
PagesImportFilter_getImplementationName
,
&
PagesImportFilter_createInstance
,
&
PagesImportFilter_getImplementationName
,
&
PagesImportFilter_getSupportedServiceNames
,
&
PagesImportFilter_getSupportedServiceNames
,
&
cppu
::
createSingleComponentFactory
,
0
,
0
&
cppu
::
createSingleComponentFactory
,
nullptr
,
0
},
},
{
0
,
0
,
0
,
0
,
0
,
0
}
{
nullptr
,
nullptr
,
nullptr
,
nullptr
,
nullptr
,
0
}
};
};
}
}
...
...
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