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
0ce59463
Kaydet (Commit)
0ce59463
authored
Ara 10, 2012
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#121382# Corrected size handling including font size handling for EMF/WMF imports
üst
4faa4687
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
enhwmf.cxx
svtools/source/filter/wmf/enhwmf.cxx
+11
-0
winmtf.cxx
svtools/source/filter/wmf/winmtf.cxx
+7
-3
winmtf.hxx
svtools/source/filter/wmf/winmtf.hxx
+1
-0
No files found.
svtools/source/filter/wmf/enhwmf.cxx
Dosyayı görüntüle @
0ce59463
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "winmtf.hxx"
#include "winmtf.hxx"
#include <osl/endian.h>
#include <osl/endian.h>
#include <basegfx/matrix/b2dhommatrix.hxx>
//=========================== GDI-Array ===================================
//=========================== GDI-Array ===================================
...
@@ -1021,6 +1022,16 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
...
@@ -1021,6 +1022,16 @@ sal_Bool EnhWMFReader::ReadEnhWMF()
lfFaceName
[
i
]
=
nChar
;
lfFaceName
[
i
]
=
nChar
;
}
}
aLogFont
.
alfFaceName
=
UniString
(
lfFaceName
);
aLogFont
.
alfFaceName
=
UniString
(
lfFaceName
);
// #121382# Need to apply WorldTransform to FontHeight/Width; this should be completely
// chnaged to basegfx::B2DHomMatrix instead of 'struct XForm', but not now due to time
// constraints and dangers
const
XForm
&
rXF
=
pOut
->
GetWorldTransform
();
const
basegfx
::
B2DHomMatrix
aWT
(
rXF
.
eM11
,
rXF
.
eM21
,
rXF
.
eDx
,
rXF
.
eM12
,
rXF
.
eM22
,
rXF
.
eDy
);
const
basegfx
::
B2DVector
aTransVec
(
aWT
*
basegfx
::
B2DVector
(
aLogFont
.
lfWidth
,
aLogFont
.
lfHeight
));
aLogFont
.
lfWidth
=
aTransVec
.
getX
();
aLogFont
.
lfHeight
=
aTransVec
.
getY
();
pOut
->
CreateObject
(
nIndex
,
GDI_FONT
,
new
WinMtfFontStyle
(
aLogFont
)
);
pOut
->
CreateObject
(
nIndex
,
GDI_FONT
,
new
WinMtfFontStyle
(
aLogFont
)
);
}
}
}
}
...
...
svtools/source/filter/wmf/winmtf.cxx
Dosyayı görüntüle @
0ce59463
...
@@ -492,8 +492,9 @@ Size WinMtfOutput::ImplMap( const Size& rSz )
...
@@ -492,8 +492,9 @@ Size WinMtfOutput::ImplMap( const Size& rSz )
{
{
if
(
mnWinExtX
&&
mnWinExtY
)
if
(
mnWinExtX
&&
mnWinExtY
)
{
{
double
fWidth
=
rSz
.
Width
()
*
maXForm
.
eM11
;
// #121382# apply the whole WorldTransform, else a rotation will be misinterpreted
double
fHeight
=
rSz
.
Height
()
*
maXForm
.
eM22
;
double
fWidth
=
rSz
.
Width
()
*
maXForm
.
eM11
+
rSz
.
Height
()
*
maXForm
.
eM21
;
double
fHeight
=
rSz
.
Width
()
*
maXForm
.
eM12
+
rSz
.
Height
()
*
maXForm
.
eM22
;
if
(
mnGfxMode
==
GM_COMPATIBLE
)
if
(
mnGfxMode
==
GM_COMPATIBLE
)
{
{
...
@@ -1476,7 +1477,10 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
...
@@ -1476,7 +1477,10 @@ void WinMtfOutput::DrawText( Point& rPosition, String& rText, sal_Int32* pDXArry
for
(
i
=
0
,
nSum
=
0
;
i
<
nLen
;
i
++
)
for
(
i
=
0
,
nSum
=
0
;
i
<
nLen
;
i
++
)
{
{
sal_Int32
nTemp
=
ImplMap
(
Size
(
pDXArry
[
i
],
0
)
).
Width
();
// #121382# Map DXArray using WorldTransform
const
Size
aSize
(
ImplMap
(
Size
(
pDXArry
[
i
],
0
)));
const
basegfx
::
B2DVector
aVector
(
aSize
.
Width
(),
aSize
.
Height
());
const
sal_Int32
nTemp
(
basegfx
::
fround
(
aVector
.
getLength
()));
nSum
+=
nTemp
;
nSum
+=
nTemp
;
pDXArry
[
i
]
=
nSum
;
pDXArry
[
i
]
=
nSum
;
}
}
...
...
svtools/source/filter/wmf/winmtf.hxx
Dosyayı görüntüle @
0ce59463
...
@@ -614,6 +614,7 @@ class WinMtfOutput
...
@@ -614,6 +614,7 @@ class WinMtfOutput
sal_uInt32
GetMapMode
()
const
{
return
mnMapMode
;
};
sal_uInt32
GetMapMode
()
const
{
return
mnMapMode
;
};
void
SetMapMode
(
sal_uInt32
mnMapMode
);
void
SetMapMode
(
sal_uInt32
mnMapMode
);
void
SetWorldTransform
(
const
XForm
&
rXForm
);
void
SetWorldTransform
(
const
XForm
&
rXForm
);
const
XForm
&
GetWorldTransform
()
const
{
return
maXForm
;
}
void
ModifyWorldTransform
(
const
XForm
&
rXForm
,
sal_uInt32
nMode
);
void
ModifyWorldTransform
(
const
XForm
&
rXForm
,
sal_uInt32
nMode
);
void
Push
();
void
Push
();
...
...
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