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
8523e57e
Kaydet (Commit)
8523e57e
authored
Eyl 18, 2015
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
rework this so we don't read the string, backup and re-read the string again
Change-Id: If2715430a153fd86e7000af2c91bcdfc60464046
üst
1fa23989
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
42 deletions
+40
-42
pptin.cxx
sd/source/filter/ppt/pptin.cxx
+2
-1
propread.cxx
sd/source/filter/ppt/propread.cxx
+36
-39
propread.hxx
sd/source/filter/ppt/propread.hxx
+2
-2
No files found.
sd/source/filter/ppt/pptin.cxx
Dosyayı görüntüle @
8523e57e
...
@@ -368,7 +368,8 @@ bool ImplSdPPTImport::Import()
...
@@ -368,7 +368,8 @@ bool ImplSdPPTImport::Import()
if
(
pSection
)
if
(
pSection
)
{
{
Dictionary
aDict
;
Dictionary
aDict
;
if
(
pSection
->
GetDictionary
(
aDict
)
)
pSection
->
GetDictionary
(
aDict
);
if
(
!
aDict
.
empty
())
{
{
Dictionary
::
const_iterator
iter
=
aDict
.
find
(
OUString
(
"_PID_HLINKS"
)
);
Dictionary
::
const_iterator
iter
=
aDict
.
find
(
OUString
(
"_PID_HLINKS"
)
);
...
...
sd/source/filter/ppt/propread.cxx
Dosyayı görüntüle @
8523e57e
...
@@ -269,10 +269,8 @@ void Section::AddProperty( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBu
...
@@ -269,10 +269,8 @@ void Section::AddProperty( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBu
maEntries
.
push_back
(
new
PropEntry
(
nId
,
pBuf
,
nBufSize
,
mnTextEnc
)
);
maEntries
.
push_back
(
new
PropEntry
(
nId
,
pBuf
,
nBufSize
,
mnTextEnc
)
);
}
}
bool
Section
::
GetDictionary
(
Dictionary
&
rDict
)
void
Section
::
GetDictionary
(
Dictionary
&
rDict
)
{
{
bool
bRetValue
=
false
;
boost
::
ptr_vector
<
PropEntry
>::
iterator
iter
;
boost
::
ptr_vector
<
PropEntry
>::
iterator
iter
;
for
(
iter
=
maEntries
.
begin
();
iter
!=
maEntries
.
end
();
++
iter
)
for
(
iter
=
maEntries
.
begin
();
iter
!=
maEntries
.
end
();
++
iter
)
{
{
...
@@ -280,48 +278,47 @@ bool Section::GetDictionary( Dictionary& rDict )
...
@@ -280,48 +278,47 @@ bool Section::GetDictionary( Dictionary& rDict )
break
;
break
;
}
}
if
(
iter
!=
maEntries
.
end
()
)
if
(
iter
==
maEntries
.
end
())
return
;
SvMemoryStream
aStream
(
iter
->
mpBuf
,
iter
->
mnSize
,
StreamMode
::
READ
);
aStream
.
Seek
(
STREAM_SEEK_TO_BEGIN
);
sal_uInt32
nDictCount
(
0
);
aStream
.
ReadUInt32
(
nDictCount
);
for
(
sal_uInt32
i
=
0
;
i
<
nDictCount
;
++
i
)
{
{
sal_uInt32
nDictCount
,
nId
,
nSize
,
nPos
;
sal_uInt32
nId
(
0
),
nSize
(
0
);
SvMemoryStream
aStream
(
iter
->
mpBuf
,
iter
->
mnSize
,
StreamMode
::
READ
);
aStream
.
ReadUInt32
(
nId
).
ReadUInt32
(
nSize
);
aStream
.
Seek
(
STREAM_SEEK_TO_BEGIN
);
if
(
!
nSize
)
aStream
.
ReadUInt32
(
nDictCount
);
continue
;
for
(
sal_uInt32
i
=
0
;
i
<
nDictCount
;
i
++
)
OUString
aString
;
try
{
{
aStream
.
ReadUInt32
(
nId
).
ReadUInt32
(
nSize
);
if
(
mnTextEnc
==
RTL_TEXTENCODING_UCS2
)
if
(
nSize
)
{
{
OUString
aString
;
nSize
>>=
1
;
nPos
=
aStream
.
Tell
();
sal_Unicode
*
pWString
=
new
sal_Unicode
[
nSize
];
try
for
(
sal_uInt32
j
=
0
;
j
<
nSize
;
++
j
)
{
aStream
.
ReadUInt16
(
pWString
[
j
]);
sal_Char
*
pString
=
new
sal_Char
[
nSize
];
aString
=
OUString
(
pWString
,
lcl_getMaxSafeStrLen
(
nSize
));
aStream
.
Read
(
pString
,
nSize
);
delete
[]
pWString
;
if
(
mnTextEnc
==
RTL_TEXTENCODING_UCS2
)
{
nSize
>>=
1
;
aStream
.
Seek
(
nPos
);
sal_Unicode
*
pWString
=
reinterpret_cast
<
sal_Unicode
*>
(
pString
);
for
(
sal_uInt32
j
=
0
;
j
<
nSize
;
++
j
)
aStream
.
ReadUInt16
(
pWString
[
j
]);
aString
=
OUString
(
pWString
,
lcl_getMaxSafeStrLen
(
nSize
));
}
else
aString
=
OUString
(
pString
,
lcl_getMaxSafeStrLen
(
nSize
),
mnTextEnc
);
delete
[]
pString
;
}
catch
(
const
std
::
bad_alloc
&
)
{
OSL_FAIL
(
"sd Section::GetDictionary bad alloc"
);
}
if
(
aString
.
isEmpty
()
)
break
;
rDict
.
insert
(
std
::
make_pair
(
aString
,
nId
)
);
}
}
bRetValue
=
true
;
else
{
sal_Char
*
pString
=
new
sal_Char
[
nSize
];
aStream
.
Read
(
pString
,
nSize
);
aString
=
OUString
(
pString
,
lcl_getMaxSafeStrLen
(
nSize
),
mnTextEnc
);
delete
[]
pString
;
}
}
catch
(
const
std
::
bad_alloc
&
)
{
OSL_FAIL
(
"sd Section::GetDictionary bad alloc"
);
}
}
if
(
aString
.
isEmpty
())
break
;
rDict
.
insert
(
std
::
make_pair
(
aString
,
nId
)
);
}
}
return
bRetValue
;
}
}
void
Section
::
Read
(
SotStorageStream
*
pStrm
)
void
Section
::
Read
(
SotStorageStream
*
pStrm
)
...
...
sd/source/filter/ppt/propread.hxx
Dosyayı görüntüle @
8523e57e
...
@@ -130,8 +130,8 @@ class Section
...
@@ -130,8 +130,8 @@ class Section
Section
(
const
Section
&
rSection
);
Section
(
const
Section
&
rSection
);
Section
&
operator
=
(
const
Section
&
rSection
);
Section
&
operator
=
(
const
Section
&
rSection
);
bool
GetProperty
(
sal_uInt32
nId
,
PropItem
&
rPropItem
);
bool
GetProperty
(
sal_uInt32
nId
,
PropItem
&
rPropItem
);
bool
GetDictionary
(
Dictionary
&
rDict
);
void
GetDictionary
(
Dictionary
&
rDict
);
const
sal_uInt8
*
GetFMTID
()
const
{
return
aFMTID
;
};
const
sal_uInt8
*
GetFMTID
()
const
{
return
aFMTID
;
};
void
Read
(
SotStorageStream
*
pStrm
);
void
Read
(
SotStorageStream
*
pStrm
);
};
};
...
...
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