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
d0712d61
Kaydet (Commit)
d0712d61
authored
Eki 19, 2010
tarafından
Katarina Machalkova
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merged oox-drawingml-fix-shapes-map-crash.diff from ooo-build
üst
3378115e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
shapes.hxx
oox/inc/oox/export/shapes.hxx
+19
-13
shapes.cxx
oox/source/export/shapes.cxx
+10
-6
No files found.
oox/inc/oox/export/shapes.hxx
Dosyayı görüntüle @
d0712d61
...
...
@@ -49,16 +49,7 @@ namespace oox { namespace drawingml {
class
OOX_DLLPUBLIC
ShapeExport
:
public
DrawingML
{
protected
:
sal_Int32
mnShapeIdMax
,
mnPictureIdMax
;
private
:
sal_Int32
mnXmlNamespace
;
Fraction
maFraction
;
MapMode
maMapModeSrc
,
maMapModeDest
;
::
com
::
sun
::
star
::
awt
::
Size
MapSize
(
const
::
com
::
sun
::
star
::
awt
::
Size
&
)
const
;
struct
ShapeCheck
{
bool
operator
()(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
s1
,
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
s2
)
const
...
...
@@ -74,11 +65,25 @@ private:
size_t
operator
()(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
)
const
;
};
public
:
typedef
std
::
hash_map
<
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
,
sal_Int32
,
ShapeHash
,
ShapeCheck
>
ShapeHashMap
;
static
ShapeHashMap
saShapeMap
;
protected
:
sal_Int32
mnShapeIdMax
,
mnPictureIdMax
;
private
:
sal_Int32
mnXmlNamespace
;
Fraction
maFraction
;
MapMode
maMapModeSrc
,
maMapModeDest
;
::
com
::
sun
::
star
::
awt
::
Size
MapSize
(
const
::
com
::
sun
::
star
::
awt
::
Size
&
)
const
;
ShapeHashMap
maShapeMap
;
ShapeHashMap
*
mpShapeMap
;
public
:
ShapeExport
(
sal_Int32
nXmlNamespace
,
::
sax_fastparser
::
FSHelperPtr
pFS
,
::
oox
::
core
::
XmlFilterBase
*
pFB
=
NULL
,
DocumentType
eDocumentType
=
DOCUMENT_PPTX
);
ShapeExport
(
sal_Int32
nXmlNamespace
,
::
sax_fastparser
::
FSHelperPtr
pFS
,
ShapeHashMap
*
pShapeMap
=
NULL
,
::
oox
::
core
::
XmlFilterBase
*
pFB
=
NULL
,
DocumentType
eDocumentType
=
DOCUMENT_PPTX
);
virtual
~
ShapeExport
()
{}
sal_Int32
GetXmlNamespace
()
const
;
...
...
@@ -157,8 +162,9 @@ public:
WriteUnknownShape
(
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
xShape
);
sal_Int32
GetNewShapeID
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
rShape
);
static
sal_Int32
GetNewShapeID
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
rShape
,
::
oox
::
core
::
XmlFilterBase
*
pFB
);
static
sal_Int32
GetShapeID
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
rShape
);
sal_Int32
GetNewShapeID
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
rShape
,
::
oox
::
core
::
XmlFilterBase
*
pFB
);
sal_Int32
GetShapeID
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
rShape
);
static
sal_Int32
GetShapeID
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
rShape
,
ShapeHashMap
*
pShapeMap
);
};
}}
...
...
oox/source/export/shapes.cxx
Dosyayı görüntüle @
d0712d61
...
...
@@ -359,7 +359,7 @@ namespace oox { namespace drawingml {
if ( GETA(propName) ) \
mAny >>= variable;
ShapeExport
::
ShapeExport
(
sal_Int32
nXmlNamespace
,
FSHelperPtr
pFS
,
XmlFilterBase
*
pFB
,
DocumentType
eDocumentType
)
ShapeExport
::
ShapeExport
(
sal_Int32
nXmlNamespace
,
FSHelperPtr
pFS
,
ShapeHashMap
*
pShapeMap
,
XmlFilterBase
*
pFB
,
DocumentType
eDocumentType
)
:
DrawingML
(
pFS
,
pFB
,
eDocumentType
)
,
mnShapeIdMax
(
1
)
,
mnPictureIdMax
(
1
)
...
...
@@ -367,6 +367,7 @@ ShapeExport::ShapeExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, XmlFilterBas
,
maFraction
(
1
,
576
)
,
maMapModeSrc
(
MAP_100TH_MM
)
,
maMapModeDest
(
MAP_INCH
,
Point
(),
maFraction
,
maFraction
)
,
mpShapeMap
(
pShapeMap
?
pShapeMap
:
&
maShapeMap
)
{
}
...
...
@@ -987,26 +988,29 @@ sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape > rXShape, XmlFilt
sal_Int32
nID
=
pFB
->
GetUniqueId
();
saShapeMap
[
rXShape
]
=
nID
;
(
*
mpShapeMap
)
[
rXShape
]
=
nID
;
return
nID
;
}
sal_Int32
ShapeExport
::
GetShapeID
(
const
Reference
<
XShape
>
rXShape
)
{
return
GetShapeID
(
rXShape
,
mpShapeMap
);
}
sal_Int32
ShapeExport
::
GetShapeID
(
const
Reference
<
XShape
>
rXShape
,
ShapeHashMap
*
pShapeMap
)
{
if
(
!
rXShape
.
is
()
)
return
-
1
;
ShapeHashMap
::
const_iterator
aIter
=
saShapeMap
.
find
(
rXShape
);
ShapeHashMap
::
const_iterator
aIter
=
pShapeMap
->
find
(
rXShape
);
if
(
aIter
==
saShapeMap
.
end
()
)
if
(
aIter
==
pShapeMap
->
end
()
)
return
-
1
;
return
aIter
->
second
;
}
ShapeExport
::
ShapeHashMap
ShapeExport
::
saShapeMap
;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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