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
559ecabb
Kaydet (Commit)
559ecabb
authored
Mar 27, 2012
tarafından
Miklos Vajna
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
n#751117 oox: implement VML import of v:line token
üst
8b8fad38
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
1 deletion
+57
-1
vmlshape.hxx
oox/inc/oox/vml/vmlshape.hxx
+15
-0
vmlshapecontext.hxx
oox/inc/oox/vml/vmlshapecontext.hxx
+4
-0
vmlshape.cxx
oox/source/vml/vmlshape.cxx
+21
-0
vmlshapecontext.cxx
oox/source/vml/vmlshapecontext.cxx
+17
-1
No files found.
oox/inc/oox/vml/vmlshape.hxx
Dosyayı görüntüle @
559ecabb
...
@@ -186,6 +186,8 @@ struct ShapeModel
...
@@ -186,6 +186,8 @@ struct ShapeModel
TextBoxPtr
mxTextBox
;
/// Text contents and properties.
TextBoxPtr
mxTextBox
;
/// Text contents and properties.
ClientDataPtr
mxClientData
;
/// Excel specific client data.
ClientDataPtr
mxClientData
;
/// Excel specific client data.
::
rtl
::
OUString
maLegacyDiagramPath
;
/// Legacy Diagram Fragment Path
::
rtl
::
OUString
maLegacyDiagramPath
;
/// Legacy Diagram Fragment Path
::
rtl
::
OUString
maFrom
;
/// Start point for line shape.
::
rtl
::
OUString
maTo
;
/// End point for line shape.
explicit
ShapeModel
();
explicit
ShapeModel
();
~
ShapeModel
();
~
ShapeModel
();
...
@@ -312,6 +314,19 @@ protected:
...
@@ -312,6 +314,19 @@ protected:
const
::
com
::
sun
::
star
::
awt
::
Rectangle
&
rShapeRect
)
const
;
const
::
com
::
sun
::
star
::
awt
::
Rectangle
&
rShapeRect
)
const
;
};
};
/** A Line shape object. */
class
LineShape
:
public
SimpleShape
{
public
:
explicit
LineShape
(
Drawing
&
rDrawing
);
protected
:
/** Creates the corresponding XShape and inserts it into the passed container. */
virtual
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShape
>
implConvertAndInsert
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
drawing
::
XShapes
>&
rxShapes
,
const
::
com
::
sun
::
star
::
awt
::
Rectangle
&
rShapeRect
)
const
;
};
// ============================================================================
// ============================================================================
/** A shape object with custom geometry. */
/** A shape object with custom geometry. */
...
...
oox/inc/oox/vml/vmlshapecontext.hxx
Dosyayı görüntüle @
559ecabb
...
@@ -139,6 +139,10 @@ public:
...
@@ -139,6 +139,10 @@ public:
private
:
private
:
/** Processes the 'points' attribute. */
/** Processes the 'points' attribute. */
void
setPoints
(
const
::
rtl
::
OUString
&
rPoints
);
void
setPoints
(
const
::
rtl
::
OUString
&
rPoints
);
/** Processes the 'from' attribute. */
void
setFrom
(
const
::
rtl
::
OUString
&
rPoints
);
/** Processes the 'to' attribute. */
void
setTo
(
const
::
rtl
::
OUString
&
rPoints
);
protected
:
protected
:
ShapeBase
&
mrShape
;
ShapeBase
&
mrShape
;
...
...
oox/source/vml/vmlshape.cxx
Dosyayı görüntüle @
559ecabb
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <rtl/math.hxx>
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/oustringostreaminserter.hxx>
#include "oox/drawingml/shapepropertymap.hxx"
#include "oox/drawingml/shapepropertymap.hxx"
#include "oox/helper/graphichelper.hxx"
#include "oox/helper/graphichelper.hxx"
#include "oox/helper/propertyset.hxx"
#include "oox/helper/propertyset.hxx"
...
@@ -428,6 +429,26 @@ Reference< XShape > PolyLineShape::implConvertAndInsert( const Reference< XShape
...
@@ -428,6 +429,26 @@ Reference< XShape > PolyLineShape::implConvertAndInsert( const Reference< XShape
return
xShape
;
return
xShape
;
}
}
LineShape
::
LineShape
(
Drawing
&
rDrawing
)
:
SimpleShape
(
rDrawing
,
"com.sun.star.drawing.LineShape"
)
{
}
Reference
<
XShape
>
LineShape
::
implConvertAndInsert
(
const
Reference
<
XShapes
>&
rxShapes
,
const
Rectangle
&
rShapeRect
)
const
{
const
GraphicHelper
&
rGraphicHelper
=
mrDrawing
.
getFilter
().
getGraphicHelper
();
Rectangle
aShapeRect
(
rShapeRect
);
sal_Int32
nIndex
=
0
;
aShapeRect
.
X
=
ConversionHelper
::
decodeMeasureToHmm
(
rGraphicHelper
,
maShapeModel
.
maFrom
.
getToken
(
0
,
','
,
nIndex
),
0
,
true
,
true
);
aShapeRect
.
Y
=
ConversionHelper
::
decodeMeasureToHmm
(
rGraphicHelper
,
maShapeModel
.
maFrom
.
getToken
(
0
,
','
,
nIndex
),
0
,
true
,
true
);
nIndex
=
0
;
aShapeRect
.
Width
=
ConversionHelper
::
decodeMeasureToHmm
(
rGraphicHelper
,
maShapeModel
.
maTo
.
getToken
(
0
,
','
,
nIndex
),
0
,
true
,
true
)
-
aShapeRect
.
X
;
aShapeRect
.
Height
=
ConversionHelper
::
decodeMeasureToHmm
(
rGraphicHelper
,
maShapeModel
.
maTo
.
getToken
(
0
,
','
,
nIndex
),
0
,
true
,
true
)
-
aShapeRect
.
Y
;
return
SimpleShape
::
implConvertAndInsert
(
rxShapes
,
aShapeRect
);
}
// ============================================================================
// ============================================================================
CustomShape
::
CustomShape
(
Drawing
&
rDrawing
)
:
CustomShape
::
CustomShape
(
Drawing
&
rDrawing
)
:
...
...
oox/source/vml/vmlshapecontext.cxx
Dosyayı görüntüle @
559ecabb
...
@@ -234,11 +234,12 @@ ShapeContextBase::ShapeContextBase( ContextHandler2Helper& rParent ) :
...
@@ -234,11 +234,12 @@ ShapeContextBase::ShapeContextBase( ContextHandler2Helper& rParent ) :
return
new
ShapeContext
(
rParent
,
rShapes
.
createShape
<
EllipseShape
>
(),
rAttribs
);
return
new
ShapeContext
(
rParent
,
rShapes
.
createShape
<
EllipseShape
>
(),
rAttribs
);
case
VML_TOKEN
(
polyline
):
case
VML_TOKEN
(
polyline
):
return
new
ShapeContext
(
rParent
,
rShapes
.
createShape
<
PolyLineShape
>
(),
rAttribs
);
return
new
ShapeContext
(
rParent
,
rShapes
.
createShape
<
PolyLineShape
>
(),
rAttribs
);
case
VML_TOKEN
(
line
):
return
new
ShapeContext
(
rParent
,
rShapes
.
createShape
<
LineShape
>
(),
rAttribs
);
// TODO:
// TODO:
case
VML_TOKEN
(
arc
):
case
VML_TOKEN
(
arc
):
case
VML_TOKEN
(
curve
):
case
VML_TOKEN
(
curve
):
case
VML_TOKEN
(
line
):
case
VML_TOKEN
(
diagram
):
case
VML_TOKEN
(
diagram
):
case
VML_TOKEN
(
image
):
case
VML_TOKEN
(
image
):
return
new
ShapeContext
(
rParent
,
rShapes
.
createShape
<
ComplexShape
>
(),
rAttribs
);
return
new
ShapeContext
(
rParent
,
rShapes
.
createShape
<
ComplexShape
>
(),
rAttribs
);
...
@@ -364,6 +365,9 @@ ShapeContext::ShapeContext( ContextHandler2Helper& rParent, ShapeBase& rShape, c
...
@@ -364,6 +365,9 @@ ShapeContext::ShapeContext( ContextHandler2Helper& rParent, ShapeBase& rShape, c
mrShapeModel
.
maType
=
rAttribs
.
getXString
(
XML_type
,
OUString
()
);
mrShapeModel
.
maType
=
rAttribs
.
getXString
(
XML_type
,
OUString
()
);
// polyline path
// polyline path
setPoints
(
rAttribs
.
getString
(
XML_points
,
OUString
()
)
);
setPoints
(
rAttribs
.
getString
(
XML_points
,
OUString
()
)
);
// line start and end positions
setFrom
(
rAttribs
.
getString
(
XML_from
,
OUString
()));
setTo
(
rAttribs
.
getString
(
XML_to
,
OUString
()));
}
}
ContextHandlerRef
ShapeContext
::
onCreateContext
(
sal_Int32
nElement
,
const
AttributeList
&
rAttribs
)
ContextHandlerRef
ShapeContext
::
onCreateContext
(
sal_Int32
nElement
,
const
AttributeList
&
rAttribs
)
...
@@ -402,6 +406,18 @@ void ShapeContext::setPoints( const OUString& rPoints )
...
@@ -402,6 +406,18 @@ void ShapeContext::setPoints( const OUString& rPoints )
}
}
}
}
void
ShapeContext
::
setFrom
(
const
OUString
&
rPoints
)
{
if
(
!
rPoints
.
isEmpty
())
mrShapeModel
.
maFrom
=
rPoints
;
}
void
ShapeContext
::
setTo
(
const
OUString
&
rPoints
)
{
if
(
!
rPoints
.
isEmpty
())
mrShapeModel
.
maTo
=
rPoints
;
}
// ============================================================================
// ============================================================================
GroupShapeContext
::
GroupShapeContext
(
ContextHandler2Helper
&
rParent
,
GroupShape
&
rShape
,
const
AttributeList
&
rAttribs
)
:
GroupShapeContext
::
GroupShapeContext
(
ContextHandler2Helper
&
rParent
,
GroupShape
&
rShape
,
const
AttributeList
&
rAttribs
)
:
...
...
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