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
41cfd0fd
Kaydet (Commit)
41cfd0fd
authored
Şub 25, 2013
tarafından
Radek Doulik
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
workaround for emf+ files with broken dataSize of Image object record
Change-Id: I5005961e1b618af949dc978a7ac560fc9eca3e65
üst
804f47a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
implrenderer.hxx
cppcanvas/source/inc/implrenderer.hxx
+1
-1
emfplus.cxx
cppcanvas/source/mtfrenderer/emfplus.cxx
+7
-7
No files found.
cppcanvas/source/inc/implrenderer.hxx
Dosyayı görüntüle @
41cfd0fd
...
@@ -259,7 +259,7 @@ static float GetSwapFloat( SvStream& rSt )
...
@@ -259,7 +259,7 @@ static float GetSwapFloat( SvStream& rSt )
ActionVector
::
const_iterator
&
o_rRangeBegin
,
ActionVector
::
const_iterator
&
o_rRangeBegin
,
ActionVector
::
const_iterator
&
o_rRangeEnd
)
const
;
ActionVector
::
const_iterator
&
o_rRangeEnd
)
const
;
void
processObjectRecord
(
SvMemoryStream
&
rObjectStream
,
sal_uInt16
flags
,
sal_Bool
bUseWholeStream
=
sal_False
);
void
processObjectRecord
(
SvMemoryStream
&
rObjectStream
,
sal_uInt16
flags
,
sal_
uInt32
dataSize
,
sal_
Bool
bUseWholeStream
=
sal_False
);
/* EMF+ */
/* EMF+ */
void
processEMFPlus
(
MetaCommentAction
*
pAct
,
const
ActionFactoryParameters
&
rFactoryParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
);
void
processEMFPlus
(
MetaCommentAction
*
pAct
,
const
ActionFactoryParameters
&
rFactoryParms
,
OutDevState
&
rState
,
const
CanvasSharedPtr
&
rCanvas
);
...
...
cppcanvas/source/mtfrenderer/emfplus.cxx
Dosyayı görüntüle @
41cfd0fd
...
@@ -714,7 +714,7 @@ namespace cppcanvas
...
@@ -714,7 +714,7 @@ namespace cppcanvas
Graphic
graphic
;
Graphic
graphic
;
void
Read
(
SvMemoryStream
&
s
,
sal_Bool
bUseWholeStream
)
void
Read
(
SvMemoryStream
&
s
,
sal_
uInt32
dataSize
,
sal_
Bool
bUseWholeStream
)
{
{
sal_uInt32
header
,
unknown
;
sal_uInt32
header
,
unknown
;
...
@@ -736,11 +736,11 @@ namespace cppcanvas
...
@@ -736,11 +736,11 @@ namespace cppcanvas
sal_Int32
mfType
,
mfSize
;
sal_Int32
mfType
,
mfSize
;
s
>>
mfType
>>
mfSize
;
s
>>
mfType
>>
mfSize
;
EMFP_DEBUG
(
printf
(
"EMF+
\t
metafile type: %d dataSize: %d
\n
"
,
mfType
,
mfSize
));
EMFP_DEBUG
(
printf
(
"EMF+
\t
metafile type: %d dataSize: %d
real size calculated from record dataSize: %d
\n
"
,
mfType
,
mfSize
,
dataSize
-
16
));
GraphicFilter
filter
;
GraphicFilter
filter
;
// workaround buggy metafiles, which have wrong mfSize set (n#705956 for example)
// workaround buggy metafiles, which have wrong mfSize set (n#705956 for example)
SvMemoryStream
mfStream
(((
char
*
)
s
.
GetData
())
+
s
.
Tell
(),
bUseWholeStream
?
s
.
remainingSize
()
:
mfSize
,
STREAM_READ
);
SvMemoryStream
mfStream
(((
char
*
)
s
.
GetData
())
+
s
.
Tell
(),
bUseWholeStream
?
s
.
remainingSize
()
:
dataSize
-
16
,
STREAM_READ
);
filter
.
ImportGraphic
(
graphic
,
String
(),
mfStream
);
filter
.
ImportGraphic
(
graphic
,
String
(),
mfStream
);
...
@@ -1090,7 +1090,7 @@ namespace cppcanvas
...
@@ -1090,7 +1090,7 @@ namespace cppcanvas
}
}
}
}
void
ImplRenderer
::
processObjectRecord
(
SvMemoryStream
&
rObjectStream
,
sal_uInt16
flags
,
sal_Bool
bUseWholeStream
)
void
ImplRenderer
::
processObjectRecord
(
SvMemoryStream
&
rObjectStream
,
sal_uInt16
flags
,
sal_
uInt32
dataSize
,
sal_
Bool
bUseWholeStream
)
{
{
sal_uInt32
index
;
sal_uInt32
index
;
...
@@ -1145,7 +1145,7 @@ namespace cppcanvas
...
@@ -1145,7 +1145,7 @@ namespace cppcanvas
{
{
EMFPImage
*
image
;
EMFPImage
*
image
;
aObjects
[
index
]
=
image
=
new
EMFPImage
();
aObjects
[
index
]
=
image
=
new
EMFPImage
();
image
->
Read
(
rObjectStream
,
bUseWholeStream
);
image
->
Read
(
rObjectStream
,
dataSize
,
bUseWholeStream
);
break
;
break
;
}
}
...
@@ -1211,7 +1211,7 @@ namespace cppcanvas
...
@@ -1211,7 +1211,7 @@ namespace cppcanvas
if
(
mbMultipart
)
{
if
(
mbMultipart
)
{
EMFP_DEBUG
(
printf
(
"EMF+ multipart record flags: %04hx
\n
"
,
mMFlags
));
EMFP_DEBUG
(
printf
(
"EMF+ multipart record flags: %04hx
\n
"
,
mMFlags
));
mMStream
.
Seek
(
0
);
mMStream
.
Seek
(
0
);
processObjectRecord
(
mMStream
,
mMFlags
,
sal_True
);
processObjectRecord
(
mMStream
,
mMFlags
,
dataSize
,
sal_True
);
}
}
mbMultipart
=
false
;
mbMultipart
=
false
;
}
}
...
@@ -1235,7 +1235,7 @@ namespace cppcanvas
...
@@ -1235,7 +1235,7 @@ namespace cppcanvas
EMFP_DEBUG
(
printf
(
"EMF+
\t
already used in svtools wmf/emf filter parser
\n
"
));
EMFP_DEBUG
(
printf
(
"EMF+
\t
already used in svtools wmf/emf filter parser
\n
"
));
break
;
break
;
case
EmfPlusRecordTypeObject
:
case
EmfPlusRecordTypeObject
:
processObjectRecord
(
rMF
,
flags
);
processObjectRecord
(
rMF
,
flags
,
dataSize
);
break
;
break
;
case
EmfPlusRecordTypeFillPie
:
case
EmfPlusRecordTypeFillPie
:
{
{
...
...
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