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
c2d5b59f
Kaydet (Commit)
c2d5b59f
authored
Nis 24, 2014
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#77089 pass shape dimensions to graphicfilter for WMF
Change-Id: I673a76ef85038b1f304ea85faeed5b4a462cb144
üst
4abaaf76
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
graphichelper.hxx
include/oox/helper/graphichelper.hxx
+3
-1
shape.cxx
oox/source/drawingml/shape.cxx
+9
-1
graphichelper.cxx
oox/source/helper/graphichelper.cxx
+2
-2
vmlshape.cxx
oox/source/vml/vmlshape.cxx
+8
-2
No files found.
include/oox/helper/graphichelper.hxx
Dosyayı görüntüle @
c2d5b59f
...
@@ -115,7 +115,9 @@ public:
...
@@ -115,7 +115,9 @@ public:
/** Imports a graphic from the storage stream with the passed path and name. */
/** Imports a graphic from the storage stream with the passed path and name. */
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
graphic
::
XGraphic
>
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
graphic
::
XGraphic
>
importEmbeddedGraphic
(
const
OUString
&
rStreamName
)
const
;
importEmbeddedGraphic
(
const
OUString
&
rStreamName
,
const
WMF_EXTERNALHEADER
*
pExtHeader
=
NULL
)
const
;
/** Creates a persistent graphic object from the passed graphic.
/** Creates a persistent graphic object from the passed graphic.
@return The URL of the created and internally cached graphic object. */
@return The URL of the created and internally cached graphic object. */
...
...
oox/source/drawingml/shape.cxx
Dosyayı görüntüle @
c2d5b59f
...
@@ -70,6 +70,8 @@
...
@@ -70,6 +70,8 @@
#include <vcl/graphicfilter.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/svapp.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wmf.hxx>
using
namespace
::
oox
::
core
;
using
namespace
::
oox
::
core
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
;
using
namespace
::
com
::
sun
::
star
::
uno
;
using
namespace
::
com
::
sun
::
star
::
uno
;
...
@@ -1153,7 +1155,13 @@ OUString Shape::finalizeServiceName( XmlFilterBase& rFilter, const OUString& rSe
...
@@ -1153,7 +1155,13 @@ OUString Shape::finalizeServiceName( XmlFilterBase& rFilter, const OUString& rSe
// import and store the graphic
// import and store the graphic
if
(
!
aGraphicPath
.
isEmpty
()
)
if
(
!
aGraphicPath
.
isEmpty
()
)
{
{
Reference
<
graphic
::
XGraphic
>
xGraphic
=
rFilter
.
getGraphicHelper
().
importEmbeddedGraphic
(
aGraphicPath
);
// Transfer shape's width and heightto graphicsfilter (can be used by WMF/EMF)
WMF_EXTERNALHEADER
aExtHeader
;
aExtHeader
.
mapMode
=
8
;
// MM_ANISOTROPIC
aExtHeader
.
xExt
=
rShapeRect
.
Width
;
aExtHeader
.
yExt
=
rShapeRect
.
Height
;
Reference
<
graphic
::
XGraphic
>
xGraphic
=
rFilter
.
getGraphicHelper
().
importEmbeddedGraphic
(
aGraphicPath
,
&
aExtHeader
);
if
(
xGraphic
.
is
()
)
if
(
xGraphic
.
is
()
)
maShapeProperties
.
setProperty
(
PROP_Graphic
,
xGraphic
);
maShapeProperties
.
setProperty
(
PROP_Graphic
,
xGraphic
);
}
}
...
...
oox/source/helper/graphichelper.cxx
Dosyayı görüntüle @
c2d5b59f
...
@@ -275,7 +275,7 @@ Reference< XGraphic > GraphicHelper::importGraphic( const StreamDataSequence& rG
...
@@ -275,7 +275,7 @@ Reference< XGraphic > GraphicHelper::importGraphic( const StreamDataSequence& rG
return
xGraphic
;
return
xGraphic
;
}
}
Reference
<
XGraphic
>
GraphicHelper
::
importEmbeddedGraphic
(
const
OUString
&
rStreamName
)
const
Reference
<
XGraphic
>
GraphicHelper
::
importEmbeddedGraphic
(
const
OUString
&
rStreamName
,
const
WMF_EXTERNALHEADER
*
pExtHeader
)
const
{
{
Reference
<
XGraphic
>
xGraphic
;
Reference
<
XGraphic
>
xGraphic
;
OSL_ENSURE
(
!
rStreamName
.
isEmpty
(),
"GraphicHelper::importEmbeddedGraphic - empty stream name"
);
OSL_ENSURE
(
!
rStreamName
.
isEmpty
(),
"GraphicHelper::importEmbeddedGraphic - empty stream name"
);
...
@@ -284,7 +284,7 @@ Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& rStr
...
@@ -284,7 +284,7 @@ Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& rStr
EmbeddedGraphicMap
::
const_iterator
aIt
=
maEmbeddedGraphics
.
find
(
rStreamName
);
EmbeddedGraphicMap
::
const_iterator
aIt
=
maEmbeddedGraphics
.
find
(
rStreamName
);
if
(
aIt
==
maEmbeddedGraphics
.
end
()
)
if
(
aIt
==
maEmbeddedGraphics
.
end
()
)
{
{
xGraphic
=
importGraphic
(
mxStorage
->
openInputStream
(
rStreamName
)
);
xGraphic
=
importGraphic
(
mxStorage
->
openInputStream
(
rStreamName
),
pExtHeader
);
if
(
xGraphic
.
is
()
)
if
(
xGraphic
.
is
()
)
maEmbeddedGraphics
[
rStreamName
]
=
xGraphic
;
maEmbeddedGraphics
[
rStreamName
]
=
xGraphic
;
}
}
...
...
oox/source/vml/vmlshape.cxx
Dosyayı görüntüle @
c2d5b59f
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include <boost/optional.hpp>
#include <boost/optional.hpp>
#include "oox/vml/vmlshape.hxx"
#include "oox/vml/vmlshape.hxx"
#include <vcl/wmf.hxx>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
...
@@ -997,8 +998,13 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes
...
@@ -997,8 +998,13 @@ Reference< XShape > ComplexShape::implConvertAndInsert( const Reference< XShapes
// set the replacement graphic
// set the replacement graphic
if
(
!
aGraphicPath
.
isEmpty
()
)
if
(
!
aGraphicPath
.
isEmpty
()
)
{
{
Reference
<
XGraphic
>
xGraphic
=
rFilter
.
getGraphicHelper
().
importEmbeddedGraphic
(
aGraphicPath
);
WMF_EXTERNALHEADER
aExtHeader
;
if
(
xGraphic
.
is
()
)
aExtHeader
.
mapMode
=
8
;
aExtHeader
.
xExt
=
rShapeRect
.
Width
;
aExtHeader
.
yExt
=
rShapeRect
.
Height
;
Reference
<
XGraphic
>
xGraphic
=
rFilter
.
getGraphicHelper
().
importEmbeddedGraphic
(
aGraphicPath
,
&
aExtHeader
);
if
(
xGraphic
.
is
())
aOleProps
.
setProperty
(
PROP_Graphic
,
xGraphic
);
aOleProps
.
setProperty
(
PROP_Graphic
,
xGraphic
);
}
}
...
...
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