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
5626e723
Kaydet (Commit)
5626e723
authored
Agu 04, 2012
tarafından
Marco Cecchetti
Kaydeden (comit)
Thorsten Behrens
Eki 10, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
text-export: meta-action based implementation
üst
2b44ae0a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
0 deletions
+88
-0
svgexport.cxx
filter/source/svg/svgexport.cxx
+9
-0
svgfilter.hxx
filter/source/svg/svgfilter.hxx
+1
-0
svgwriter.cxx
filter/source/svg/svgwriter.cxx
+0
-0
svgwriter.hxx
filter/source/svg/svgwriter.hxx
+78
-0
No files found.
filter/source/svg/svgexport.cxx
Dosyayı görüntüle @
5626e723
...
...
@@ -371,6 +371,13 @@ sal_Bool SVGExport::IsEmbedFonts() const
// -----------------------------------------------------------------------------
sal_Bool
SVGExport
::
IsUsePositionedCharacters
()
const
{
return
false
;
}
// -----------------------------------------------------------------------------
sal_Bool
SVGExport
::
IsUseNativeTextDecoration
()
const
{
sal_Bool
bRet
=
!
IsUseTinyProfile
();
...
...
@@ -1566,6 +1573,8 @@ sal_Bool SVGFilter::implExportShape( const Reference< XShape >& rxShape )
}
{
Reference
<
XText
>
xText
(
rxShape
,
UNO_QUERY
);
mpSVGWriter
->
bIsTextShape
=
xText
.
is
();
SvXMLElementExport
aExp2
(
*
mpSVGExport
,
XML_NAMESPACE_NONE
,
"g"
,
sal_True
,
sal_True
);
mpSVGWriter
->
WriteMetaFile
(
aTopLeft
,
aSize
,
rMtf
,
SVGWRITER_WRITE_ALL
,
pElementId
);
}
...
...
filter/source/svg/svgfilter.hxx
Dosyayı görüntüle @
5626e723
...
...
@@ -127,6 +127,7 @@ public:
sal_Bool
IsUseTinyProfile
()
const
;
sal_Bool
IsEmbedFonts
()
const
;
sal_Bool
IsUsePositionedCharacters
()
const
;
sal_Bool
IsUseNativeTextDecoration
()
const
;
sal_Bool
IsUseOpacity
()
const
;
...
...
filter/source/svg/svgwriter.cxx
Dosyayı görüntüle @
5626e723
This diff is collapsed.
Click to expand it.
filter/source/svg/svgwriter.hxx
Dosyayı görüntüle @
5626e723
...
...
@@ -114,6 +114,9 @@ public:
const
Rectangle
*
pObjBoundRect
=
NULL
,
const
Gradient
*
pFillGradient
=
NULL
);
void
SetFontAttr
(
const
Font
&
rFont
);
void
startFontSettings
();
void
endFontSettings
();
void
setFontFamily
();
static
void
ImplGetColorStr
(
const
Color
&
rColor
,
::
rtl
::
OUString
&
rColorStr
);
};
...
...
@@ -145,6 +148,75 @@ struct SVGShapeDescriptor
class
SVGAttributeWriter
;
class
GDIMetaFile
;
// -------------------
// - SVGTextWriter -
// -------------------
class
SVGTextWriter
{
private
:
SVGExport
&
mrExport
;
SVGFontExport
&
mrFontExport
;
SVGAttributeWriter
*
mpContext
;
VirtualDevice
*
mpVDev
;
MapMode
*
mpTargetMapMode
;
SvXMLElementExport
*
mpTextShapeElem
;
SvXMLElementExport
*
mpTextParagraphElem
;
SvXMLElementExport
*
mpTextPositionElem
;
Point
maTextPos
;
long
int
mnTextWidth
;
sal_Bool
mbIsPlacehlolderShape
;
sal_Bool
mbIWS
;
Font
maCurrentFont
;
Font
maParentFont
;
public
:
SVGTextWriter
(
SVGExport
&
rExport
,
SVGFontExport
&
rFontExport
);
virtual
~
SVGTextWriter
();
sal_Int32
setTextPosition
(
const
GDIMetaFile
&
rMtf
,
sal_uLong
&
nCurAction
);
void
setTextProperties
(
const
GDIMetaFile
&
rMtf
,
sal_uLong
nCurAction
);
void
addFontAttributes
(
sal_Bool
bIsTextContainer
);
void
startTextShape
();
void
endTextShape
();
void
startTextParagraph
();
void
endTextParagraph
();
void
startTextPosition
(
sal_Bool
bExportX
=
sal_True
,
sal_Bool
bExportY
=
sal_True
);
void
endTextPosition
();
void
writeTextPortion
(
const
Point
&
rPos
,
const
String
&
rText
,
sal_Bool
bApplyMapping
=
sal_True
);
void
implWriteTextPortion
(
const
Point
&
rPos
,
const
String
&
rText
,
Color
aTextColor
,
sal_Bool
bApplyMapping
);
void
setVirtualDevice
(
VirtualDevice
*
pVDev
,
MapMode
&
rTargetMapMode
)
{
if
(
!
pVDev
)
OSL_FAIL
(
"SVGTextWriter::setVirtualDevice: invalid virtual device."
);
mpVDev
=
pVDev
;
mpTargetMapMode
=
&
rTargetMapMode
;
}
void
setContext
(
SVGAttributeWriter
*
pContext
)
{
mpContext
=
pContext
;
}
void
setPlaceholderShapeFlag
(
sal_Bool
bState
)
{
mbIsPlacehlolderShape
=
bState
;
}
private
:
void
implMap
(
const
Size
&
rSz
,
Size
&
rDstSz
)
const
;
void
implMap
(
const
Point
&
rPt
,
Point
&
rDstPt
)
const
;
void
implSetCurrentFont
();
void
implSetFontFamily
();
template
<
typename
SubType
>
sal_Bool
implGetTextPosition
(
const
MetaAction
*
pAction
,
Point
&
raPos
,
sal_Bool
&
bEmpty
);
};
class
SVGActionWriter
{
private
:
...
...
@@ -157,6 +229,7 @@ private:
SVGExport
&
mrExport
;
SVGFontExport
&
mrFontExport
;
SVGAttributeWriter
*
mpContext
;
SVGTextWriter
maTextWriter
;
VirtualDevice
*
mpVDev
;
MapMode
maTargetMapMode
;
sal_uInt32
mnInnerMtfCount
;
...
...
@@ -170,6 +243,7 @@ private:
SVGAttributeWriter
*
ImplAcquireContext
()
{
maContextStack
.
push
(
mpContext
=
new
SVGAttributeWriter
(
mrExport
,
mrFontExport
)
);
maTextWriter
.
setContext
(
mpContext
);
return
mpContext
;
}
void
ImplReleaseContext
()
...
...
@@ -180,6 +254,7 @@ private:
maContextStack
.
pop
();
}
mpContext
=
(
maContextStack
.
empty
()
?
NULL
:
maContextStack
.
top
());
maTextWriter
.
setContext
(
mpContext
);
}
long
ImplMap
(
sal_Int32
nVal
)
const
;
...
...
@@ -216,6 +291,8 @@ private:
void
ImplWriteActions
(
const
GDIMetaFile
&
rMtf
,
sal_uInt32
nWriteFlags
,
const
::
rtl
::
OUString
*
pElementId
);
Font
ImplSetCorrectFontHeight
()
const
;
public
:
static
::
rtl
::
OUString
GetPathString
(
const
PolyPolygon
&
rPolyPoly
,
sal_Bool
bLine
);
...
...
@@ -230,6 +307,7 @@ public:
const
GDIMetaFile
&
rMtf
,
sal_uInt32
nWriteFlags
,
const
::
rtl
::
OUString
*
pElementId
=
NULL
);
sal_Bool
bIsTextShape
;
};
#endif
...
...
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