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
3454d186
Kaydet (Commit)
3454d186
authored
Nis 24, 2013
tarafından
Armin Le Grand
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
i122132 Some simple extensions to exporter
üst
cc9eaeaa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
15 deletions
+72
-15
vclmetafileprocessor2d.cxx
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+18
-11
svgwriter.cxx
filter/source/svg/svgwriter.cxx
+40
-4
metaact.cxx
vcl/source/gdi/metaact.cxx
+14
-0
No files found.
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
Dosyayı görüntüle @
3454d186
...
@@ -370,6 +370,7 @@ namespace drawinglayer
...
@@ -370,6 +370,7 @@ namespace drawinglayer
if
(
rB2DPolygon
.
count
()
&&
!
mnSvtGraphicStrokeCount
)
if
(
rB2DPolygon
.
count
()
&&
!
mnSvtGraphicStrokeCount
)
{
{
basegfx
::
B2DPolygon
aLocalPolygon
(
rB2DPolygon
);
basegfx
::
BColor
aStrokeColor
;
basegfx
::
BColor
aStrokeColor
;
basegfx
::
B2DPolyPolygon
aStartArrow
;
basegfx
::
B2DPolyPolygon
aStartArrow
;
basegfx
::
B2DPolyPolygon
aEndArrow
;
basegfx
::
B2DPolyPolygon
aEndArrow
;
...
@@ -387,29 +388,37 @@ namespace drawinglayer
...
@@ -387,29 +388,37 @@ namespace drawinglayer
// SvtGraphicStroke has NO entry for stroke color(!)
// SvtGraphicStroke has NO entry for stroke color(!)
mpOutputDevice
->
SetLineColor
(
Color
(
aStrokeColor
));
mpOutputDevice
->
SetLineColor
(
Color
(
aStrokeColor
));
if
(
!
rB2D
Polygon
.
isClosed
())
if
(
!
aLocal
Polygon
.
isClosed
())
{
{
double
fPolyLength
(
0.0
);
double
fPolyLength
(
0.0
);
double
fStart
(
0.0
);
double
fEnd
(
0.0
);
if
(
pStart
&&
pStart
->
isActive
())
if
(
pStart
&&
pStart
->
isActive
())
{
{
fPolyLength
=
basegfx
::
tools
::
getLength
(
rB2D
Polygon
);
fPolyLength
=
basegfx
::
tools
::
getLength
(
aLocal
Polygon
);
aStartArrow
=
basegfx
::
tools
::
createAreaGeometryForLineStartEnd
(
aStartArrow
=
basegfx
::
tools
::
createAreaGeometryForLineStartEnd
(
rB2D
Polygon
,
pStart
->
getB2DPolyPolygon
(),
true
,
pStart
->
getWidth
(),
aLocal
Polygon
,
pStart
->
getB2DPolyPolygon
(),
true
,
pStart
->
getWidth
(),
fPolyLength
,
pStart
->
isCentered
()
?
0.5
:
0.0
,
0
);
fPolyLength
,
pStart
->
isCentered
()
?
0.5
:
0.0
,
&
fStart
);
}
}
if
(
pEnd
&&
pEnd
->
isActive
())
if
(
pEnd
&&
pEnd
->
isActive
())
{
{
if
(
basegfx
::
fTools
::
equalZero
(
fPolyLength
))
if
(
basegfx
::
fTools
::
equalZero
(
fPolyLength
))
{
{
fPolyLength
=
basegfx
::
tools
::
getLength
(
rB2D
Polygon
);
fPolyLength
=
basegfx
::
tools
::
getLength
(
aLocal
Polygon
);
}
}
aEndArrow
=
basegfx
::
tools
::
createAreaGeometryForLineStartEnd
(
aEndArrow
=
basegfx
::
tools
::
createAreaGeometryForLineStartEnd
(
rB2DPolygon
,
pEnd
->
getB2DPolyPolygon
(),
false
,
pEnd
->
getWidth
(),
aLocalPolygon
,
pEnd
->
getB2DPolyPolygon
(),
false
,
pEnd
->
getWidth
(),
fPolyLength
,
pEnd
->
isCentered
()
?
0.5
:
0.0
,
0
);
fPolyLength
,
pEnd
->
isCentered
()
?
0.5
:
0.0
,
&
fEnd
);
}
if
(
0.0
!=
fStart
||
0.0
!=
fEnd
)
{
// build new poly, consume something from old poly
aLocalPolygon
=
basegfx
::
tools
::
getSnippetAbsolute
(
aLocalPolygon
,
fStart
,
fPolyLength
-
fEnd
,
fPolyLength
);
}
}
}
}
...
@@ -490,14 +499,12 @@ namespace drawinglayer
...
@@ -490,14 +499,12 @@ namespace drawinglayer
// concept of PDF export and SvtGraphicStroke usage does simply not
// concept of PDF export and SvtGraphicStroke usage does simply not
// allow handling such definitions. The only clean way would be to
// allow handling such definitions. The only clean way would be to
// add the transformation to SvtGraphicStroke and to handle it there
// add the transformation to SvtGraphicStroke and to handle it there
basegfx
::
B2DPolygon
aB2DPolygon
(
rB2DPolygon
);
aLocalPolygon
.
transform
(
maCurrentTransformation
);
aB2DPolygon
.
transform
(
maCurrentTransformation
);
aStartArrow
.
transform
(
maCurrentTransformation
);
aStartArrow
.
transform
(
maCurrentTransformation
);
aEndArrow
.
transform
(
maCurrentTransformation
);
aEndArrow
.
transform
(
maCurrentTransformation
);
pRetval
=
new
SvtGraphicStroke
(
pRetval
=
new
SvtGraphicStroke
(
Polygon
(
a
B2D
Polygon
),
Polygon
(
a
Local
Polygon
),
PolyPolygon
(
aStartArrow
),
PolyPolygon
(
aStartArrow
),
PolyPolygon
(
aEndArrow
),
PolyPolygon
(
aEndArrow
),
mfCurrentUnifiedTransparence
,
mfCurrentUnifiedTransparence
,
...
...
filter/source/svg/svgwriter.cxx
Dosyayı görüntüle @
3454d186
...
@@ -1280,6 +1280,14 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
...
@@ -1280,6 +1280,14 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
if
(
rPoly
.
GetSize
()
)
if
(
rPoly
.
GetSize
()
)
{
{
const
LineInfo
&
rLineInfo
=
pA
->
GetLineInfo
();
if
(
rLineInfo
.
GetWidth
())
{
sal_Int32
nStrokeWidth
=
ImplMap
(
rLineInfo
.
GetWidth
());
mrExport
.
AddAttribute
(
XML_NAMESPACE_NONE
,
aXMLAttrStrokeWidth
,
::
rtl
::
OUString
::
valueOf
(
nStrokeWidth
)
);
}
mpContext
->
AddPaintAttr
(
mpVDev
->
GetLineColor
(),
Color
(
COL_TRANSPARENT
)
);
mpContext
->
AddPaintAttr
(
mpVDev
->
GetLineColor
(),
Color
(
COL_TRANSPARENT
)
);
ImplWritePolyPolygon
(
rPoly
,
sal_True
);
ImplWritePolyPolygon
(
rPoly
,
sal_True
);
}
}
...
@@ -1550,10 +1558,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
...
@@ -1550,10 +1558,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
aStroke
.
getEndArrow
(
aEndArrow
);
aStroke
.
getEndArrow
(
aEndArrow
);
// Currently no support for strokes with start/end arrow(s)
// Currently no support for strokes with start/end arrow(s)
sal_Bool
bSkip
=
(
!
aStartArrow
.
Count
()
&&
!
aEndArrow
.
Count
()
);
// added that support
if
(
bSkip
)
{
Polygon
aPoly
;
Polygon
aPoly
;
aStroke
.
getPath
(
aPoly
);
aStroke
.
getPath
(
aPoly
);
...
@@ -1627,6 +1632,35 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
...
@@ -1627,6 +1632,35 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
break
;
break
;
}
}
}
}
if
(
mapCurShape
.
get
()
&&
(
aStartArrow
.
Count
()
||
aEndArrow
.
Count
()))
{
ImplWriteShape
(
*
mapCurShape
);
mapCurShape
->
maShapeFillColor
=
mapCurShape
->
maShapeLineColor
;
mapCurShape
->
maShapeLineColor
=
Color
(
COL_TRANSPARENT
);
mapCurShape
->
mnStrokeWidth
=
0
;
mapCurShape
->
maDashArray
.
clear
();
mapCurShape
->
maLineJoin
=
basegfx
::
B2DLINEJOIN_MITER
;
mapCurShape
->
maLineCap
=
com
::
sun
::
star
::
drawing
::
LineCap_BUTT
;
if
(
aStartArrow
.
Count
())
{
mapCurShape
->
maShapePolyPoly
=
aStartArrow
;
mapCurShape
->
maId
=
*
pElementId
+
B2UCONST
(
"_"
)
+
::
rtl
::
OUString
::
valueOf
(
nEntryCount
++
);
ImplWriteShape
(
*
mapCurShape
);
}
if
(
aEndArrow
.
Count
())
{
mapCurShape
->
maShapePolyPoly
=
aEndArrow
;
mapCurShape
->
maId
=
*
pElementId
+
B2UCONST
(
"_"
)
+
::
rtl
::
OUString
::
valueOf
(
nEntryCount
++
);
ImplWriteShape
(
*
mapCurShape
);
}
mapCurShape
.
reset
();
}
}
// write open shape in every case
// write open shape in every case
...
@@ -1637,6 +1671,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
...
@@ -1637,6 +1671,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
}
}
// skip rest of comment
// skip rest of comment
sal_Bool
bSkip
=
true
;
while
(
bSkip
&&
(
++
nCurAction
<
nCount
)
)
while
(
bSkip
&&
(
++
nCurAction
<
nCount
)
)
{
{
pAction
=
rMtf
.
GetAction
(
nCurAction
);
pAction
=
rMtf
.
GetAction
(
nCurAction
);
...
...
vcl/source/gdi/metaact.cxx
Dosyayı görüntüle @
3454d186
...
@@ -4104,20 +4104,34 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
...
@@ -4104,20 +4104,34 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
{
{
SvtGraphicStroke
aStroke
;
SvtGraphicStroke
aStroke
;
aMemStm
>>
aStroke
;
aMemStm
>>
aStroke
;
Polygon
aPath
;
Polygon
aPath
;
aStroke
.
getPath
(
aPath
);
aStroke
.
getPath
(
aPath
);
aPath
.
Move
(
nXMove
,
nYMove
);
aPath
.
Move
(
nXMove
,
nYMove
);
aStroke
.
setPath
(
aPath
);
aStroke
.
setPath
(
aPath
);
PolyPolygon
aStartArrow
;
aStroke
.
getStartArrow
(
aStartArrow
);
aStartArrow
.
Move
(
nXMove
,
nYMove
);
aStroke
.
setStartArrow
(
aStartArrow
);
PolyPolygon
aEndArrow
;
aStroke
.
getEndArrow
(
aEndArrow
);
aEndArrow
.
Move
(
nXMove
,
nYMove
);
aStroke
.
setEndArrow
(
aEndArrow
);
aDest
<<
aStroke
;
aDest
<<
aStroke
;
}
}
else
else
{
{
SvtGraphicFill
aFill
;
SvtGraphicFill
aFill
;
aMemStm
>>
aFill
;
aMemStm
>>
aFill
;
PolyPolygon
aPath
;
PolyPolygon
aPath
;
aFill
.
getPath
(
aPath
);
aFill
.
getPath
(
aPath
);
aPath
.
Move
(
nXMove
,
nYMove
);
aPath
.
Move
(
nXMove
,
nYMove
);
aFill
.
setPath
(
aPath
);
aFill
.
setPath
(
aPath
);
aDest
<<
aFill
;
aDest
<<
aFill
;
}
}
delete
[]
mpData
;
delete
[]
mpData
;
...
...
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