summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2012-01-17 16:54:04 +0000
committerArmin Le Grand <alg@apache.org>2012-01-17 16:54:04 +0000
commit2a0cd925bebb0c7d3513db311b185a04f259b68d (patch)
tree8d1ed154b241a9823c54b76ed091ecb6b6935a9d /svx
parent63480c993d8e2fb0929d3c39f621aae9443faa04 (diff)
linecap: Reintegrating finished LineCap feature, kudos to Regina Henschel for doing the basic implementation and offering it under apache license
Notes
Notes: merged as: 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70
Diffstat (limited to 'svx')
-rw-r--r--svx/Package_inc.mk1
-rwxr-xr-xsvx/inc/svx/dialogs.hrc5
-rw-r--r--svx/inc/svx/unoshprp.hxx2
-rw-r--r--svx/inc/svx/xattr.hxx1
-rw-r--r--svx/inc/svx/xdef.hxx3
-rw-r--r--svx/inc/svx/xlncapit.hxx57
-rw-r--r--svx/source/dialog/sdstring.src13
-rw-r--r--svx/source/sdr/attribute/sdrformtextattribute.cxx9
-rw-r--r--svx/source/sdr/primitive2d/sdrattributecreator.cxx4
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.cxx7
-rw-r--r--svx/source/svdraw/svdfmtf.hxx1
-rw-r--r--svx/source/xoutdev/xattr2.cxx145
-rw-r--r--svx/source/xoutdev/xpool.cxx1
14 files changed, 248 insertions, 3 deletions
diff --git a/svx/Package_inc.mk b/svx/Package_inc.mk
index 6550b70493a5..d157384731b7 100644
--- a/svx/Package_inc.mk
+++ b/svx/Package_inc.mk
@@ -172,6 +172,7 @@ $(eval $(call gb_Package_add_file,svx_inc,inc/svx/dbexch.hrc,svx/dbexch.hrc))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/unomaster.hxx,svx/unomaster.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/svdedtv.hxx,svx/svdedtv.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xlinjoit.hxx,svx/xlinjoit.hxx))
+$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xlncapit.hxx,svx/xlncapit.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/sxmbritm.hxx,svx/sxmbritm.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/AccessibleGraphicShape.hxx,svx/AccessibleGraphicShape.hxx))
$(eval $(call gb_Package_add_file,svx_inc,inc/svx/xlnstit.hxx,svx/xlnstit.hxx))
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index 9df4d1638d29..0310b8a32791 100755
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -633,6 +633,11 @@
#define RID_SVXSTR_TBLAFMT_YELLOW (RID_SVX_START + 575)
#define RID_SVXSTR_TBLAFMT_END (RID_SVX_START + 576)
+// string resources for XLineCap item
+#define RID_SVXSTR_LINECAP_BUTT (RID_SVX_START + 586 )
+#define RID_SVXSTR_LINECAP_ROUND (RID_SVX_START + 587 )
+#define RID_SVXSTR_LINECAP_SQUARE (RID_SVX_START + 588 )
+
// string resources for XLineJoint item
#define RID_SVXSTR_LINEJOINT_NONE RID_SVXSTR_NONE
#define RID_SVXSTR_LINEJOINT_MIDDLE (RID_SVX_START + 589 )
diff --git a/svx/inc/svx/unoshprp.hxx b/svx/inc/svx/unoshprp.hxx
index 13c265a29365..5c31a0aaa8f4 100644
--- a/svx/inc/svx/unoshprp.hxx
+++ b/svx/inc/svx/unoshprp.hxx
@@ -32,6 +32,7 @@
#include <com/sun/star/awt/Gradient.hpp>
#include <com/sun/star/drawing/Hatch.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/drawing/LineDash.hpp>
#include <com/sun/star/drawing/LineJoint.hpp>
#include <com/sun/star/drawing/LineStyle.hpp>
@@ -211,6 +212,7 @@
{ MAP_CHAR_LEN(UNO_NAME_SHADOWYDIST), SDRATTR_SHADOWYDIST, &::getCppuType((const sal_Int32*)0), 0, SFX_METRIC_ITEM},
#define LINE_PROPERTIES_DEFAULTS\
+ { MAP_CHAR_LEN(UNO_NAME_LINECAP), XATTR_LINECAP, &::getCppuType((const ::com::sun::star::drawing::LineCap*)0), 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_LINECOLOR), XATTR_LINECOLOR, &::getCppuType((const sal_Int32*)0) , 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_LINEENDCENTER), XATTR_LINEENDCENTER, &::getBooleanCppuType() , 0, 0}, \
{ MAP_CHAR_LEN(UNO_NAME_LINEENDWIDTH), XATTR_LINEENDWIDTH, &::getCppuType((const sal_Int32*)0) , 0, SFX_METRIC_ITEM}, \
diff --git a/svx/inc/svx/xattr.hxx b/svx/inc/svx/xattr.hxx
index b85efde692b7..6dea0ad2cbcf 100644
--- a/svx/inc/svx/xattr.hxx
+++ b/svx/inc/svx/xattr.hxx
@@ -57,6 +57,7 @@ class XGradientTable;
#include <svx/xtextit0.hxx>
#include <svx/xsetit.hxx>
#include <svx/xlinjoit.hxx>
+#include <svx/xlncapit.hxx>
#endif // _XATTR_HXX
diff --git a/svx/inc/svx/xdef.hxx b/svx/inc/svx/xdef.hxx
index e6a26669323e..099542c573b4 100644
--- a/svx/inc/svx/xdef.hxx
+++ b/svx/inc/svx/xdef.hxx
@@ -50,7 +50,8 @@
#define XATTR_LINEENDCENTER (XATTR_LINE_FIRST + 9) /* V3: 1009 V2: 1009 */
#define XATTR_LINETRANSPARENCE (XATTR_LINE_FIRST + 10) /* V3: 1010 V2: 1010 */
#define XATTR_LINEJOINT (XATTR_LINE_FIRST + 11) /* V3: 1011 V2: 1011 */
-#define XATTR_LINE_LAST XATTR_LINEJOINT
+#define XATTR_LINECAP (XATTR_LINE_FIRST + 12) /* V3: 1012 */
+#define XATTR_LINE_LAST XATTR_LINECAP
#define XATTRSET_LINE (XATTR_LINE_LAST + 1) /* V3: 1017 V2: 1017 */
#define XATTR_FILL_FIRST (XATTRSET_LINE + 1) /* V3: 1018 V2: 1018 */
diff --git a/svx/inc/svx/xlncapit.hxx b/svx/inc/svx/xlncapit.hxx
new file mode 100644
index 000000000000..1949e9fda419
--- /dev/null
+++ b/svx/inc/svx/xlncapit.hxx
@@ -0,0 +1,57 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#ifndef _SVX_XLNCAPIT_HXX
+#define _SVX_XLNCAPIT_HXX
+
+#include <svx/svxdllapi.h>
+#include <svl/eitem.hxx>
+#include <svx/xenum.hxx>
+#include <com/sun/star/drawing/LineCap.hpp>
+
+//---------------------
+// class LineStyleItem
+//---------------------
+
+class SVX_DLLPUBLIC XLineCapItem : public SfxEnumItem
+{
+public:
+ TYPEINFO();
+ XLineCapItem(com::sun::star::drawing::LineCap eLineCap = com::sun::star::drawing::LineCap_BUTT);
+ XLineCapItem(SvStream& rIn);
+
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
+ virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const;
+
+ virtual sal_Bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
+ virtual sal_Bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
+ virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+ SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric,
+ String &rText, const IntlWrapper * = 0 ) const;
+
+ virtual sal_uInt16 GetValueCount() const;
+ com::sun::star::drawing::LineCap GetValue() const;
+};
+
+#endif // _SVX_XLNCAPIT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
index b53fcbea056a..319689163e73 100644
--- a/svx/source/dialog/sdstring.src
+++ b/svx/source/dialog/sdstring.src
@@ -359,6 +359,19 @@ String RID_SVXSTR_LINEJOINT_ROUND
{
Text [ en-US ] = "Line joint round";
};
+String RID_SVXSTR_LINECAP_BUTT
+{
+ Text [ en-US ] = "Line cap flat"; // string as in Excel
+};
+String RID_SVXSTR_LINECAP_ROUND
+{
+ Text [ en-US ] = "Line cap round";
+};
+String RID_SVXSTR_LINECAP_SQUARE
+{
+ Text [ en-US ] = "Line cap square";
+};
+
///////////////////////////////////////////////////////////////////////////////
//
diff --git a/svx/source/sdr/attribute/sdrformtextattribute.cxx b/svx/source/sdr/attribute/sdrformtextattribute.cxx
index d128d7f8a1da..1608b9524391 100644
--- a/svx/source/sdr/attribute/sdrformtextattribute.cxx
+++ b/svx/source/sdr/attribute/sdrformtextattribute.cxx
@@ -42,12 +42,14 @@
#include <svx/xlnclit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xlinjoit.hxx>
+#include <svx/xlncapit.hxx>
#include <svx/xlineit0.hxx>
#include <svx/xdash.hxx>
#include <svx/xlndsit.hxx>
#include <drawinglayer/attribute/lineattribute.hxx>
#include <drawinglayer/attribute/strokeattribute.hxx>
#include <svx/sdr/attribute/sdrformtextoutlineattribute.hxx>
+#include <com/sun/star/drawing/LineCap.hpp>
//////////////////////////////////////////////////////////////////////////////
// helper to get line, stroke and transparence attributes from SfxItemSet
@@ -114,8 +116,13 @@ namespace
const sal_uInt32 nLineWidth = ((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue();
const XLineJoint eLineJoint = ((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue();
+ const com::sun::star::drawing::LineCap eLineCap = ((const XLineCapItem&)(rSet.Get(XATTR_LINECAP))).GetValue();
- return drawinglayer::attribute::LineAttribute(aColorAttribute, (double)nLineWidth, impGetB2DLineJoin(eLineJoint));
+ return drawinglayer::attribute::LineAttribute(
+ aColorAttribute,
+ (double)nLineWidth,
+ impGetB2DLineJoin(eLineJoint),
+ eLineCap);
}
drawinglayer::attribute::StrokeAttribute impGetStrokeAttribute(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 11d64679b738..40a42e74849a 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -31,6 +31,7 @@
#include <svx/xlntrit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xlinjoit.hxx>
+#include <svx/xlncapit.hxx>
#include <svx/xlnclit.hxx>
#include <svx/xlnstwit.hxx>
#include <svx/xlnedwit.hxx>
@@ -78,6 +79,7 @@
#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
#include <drawinglayer/attribute/sdrlightattribute3d.hxx>
#include <svx/sdr/attribute/sdrfilltextattribute.hxx>
+#include <com/sun/star/drawing/LineCap.hpp>
//////////////////////////////////////////////////////////////////////////////
@@ -237,6 +239,7 @@ namespace drawinglayer
const sal_uInt32 nWidth(((const XLineWidthItem&)(rSet.Get(XATTR_LINEWIDTH))).GetValue());
const Color aColor(((const XLineColorItem&)(rSet.Get(XATTR_LINECOLOR))).GetColorValue());
const XLineJoint eJoint(((const XLineJointItem&)(rSet.Get(XATTR_LINEJOINT))).GetValue());
+ const com::sun::star::drawing::LineCap eCap(((const XLineCapItem&)(rSet.Get(XATTR_LINECAP))).GetValue());
::std::vector< double > aDotDashArray;
double fFullDotDashLen(0.0);
@@ -255,6 +258,7 @@ namespace drawinglayer
(double)nWidth,
(double)nTransparence * 0.01,
aColor.getBColor(),
+ eCap,
aDotDashArray,
fFullDotDashLen);
}
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 19cadccbd15e..3b58c04d5717 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -129,7 +129,7 @@ namespace drawinglayer
aScaledPolygon.transform(rObjectTransform);
// create line and stroke attribute
- const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin());
+ const attribute::LineAttribute aLineAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin(), rLine.getCap());
const attribute::StrokeAttribute aStrokeAttribute(rLine.getDotDashArray(), rLine.getFullDotDashLen());
BasePrimitive2D* pNewLinePrimitive = 0L;
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 5519973e0c88..6156e7868f01 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -37,6 +37,7 @@
#include <editeng/crsditem.hxx>
#include <editeng/shdditem.hxx>
#include <svx/xlnclit.hxx>
+#include <svx/xlncapit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/xflclit.hxx>
#include <svx/xgrad.hxx>
@@ -76,6 +77,7 @@ ImpSdrGDIMetaFileImport::ImpSdrGDIMetaFileImport(SdrModel& rModel):
pPage(NULL),pModel(NULL),nLayer(0),
nLineWidth(0),
maLineJoin(basegfx::B2DLINEJOIN_NONE),
+ maLineCap(com::sun::star::drawing::LineCap_BUTT),
maDash(XDASH_RECT, 0, 0, 0, 0, 0),
bFntDirty(sal_True),
bLastObjWasPolyWithoutLine(sal_False),bNoLine(sal_False),bNoFill(sal_False),bLastObjWasLine(sal_False)
@@ -305,6 +307,9 @@ void ImpSdrGDIMetaFileImport::SetAttributes(SdrObject* pObj, FASTBOOL bForceText
break;
}
+ // Add LineCap support
+ pLineAttr->Put(XLineCapItem(maLineCap));
+
if(((maDash.GetDots() && maDash.GetDotLen()) || (maDash.GetDashes() && maDash.GetDashLen())) && maDash.GetDistance())
{
pLineAttr->Put(XLineDashItem(String(), maDash));
@@ -480,6 +485,7 @@ void ImpSdrGDIMetaFileImport::DoAction(MetaLineAction& rAct)
SdrPathObj* pPath = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aLine));
nLineWidth = nNewLineWidth;
maLineJoin = rLineInfo.GetLineJoin();
+ maLineCap = rLineInfo.GetLineCap();
maDash = XDash(XDASH_RECT,
rLineInfo.GetDotCount(), rLineInfo.GetDotLen(),
rLineInfo.GetDashCount(), rLineInfo.GetDashLen(),
@@ -685,6 +691,7 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaPolyLineAction& rAct )
basegfx::B2DPolyPolygon(aSource));
nLineWidth = nNewLineWidth;
maLineJoin = rLineInfo.GetLineJoin();
+ maLineCap = rLineInfo.GetLineCap();
maDash = XDash(XDASH_RECT,
rLineInfo.GetDotCount(), rLineInfo.GetDotLen(),
rLineInfo.GetDashCount(), rLineInfo.GetDashLen(),
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index c311a8d5dc2f..0d3f23a693b0 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -80,6 +80,7 @@ protected:
Color aOldLineColor;
sal_Int32 nLineWidth;
basegfx::B2DLineJoin maLineJoin;
+ com::sun::star::drawing::LineCap maLineCap;
XDash maDash;
sal_Bool bMov;
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 28b22f08e6e0..33ac5abb2835 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/drawing/LineJoint.hpp>
+#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/uno/Any.hxx>
#include <svx/dialogs.hrc>
@@ -309,6 +310,150 @@ sal_uInt16 XLineJointItem::GetValueCount() const
return 5;
}
+//-----------------------
+// class XLineCapItem -
+//-----------------------
+
+TYPEINIT1_AUTOFACTORY(XLineCapItem, SfxEnumItem);
+
+// -----------------------------------------------------------------------------
+
+XLineCapItem::XLineCapItem(com::sun::star::drawing::LineCap eLineCap)
+: SfxEnumItem(XATTR_LINECAP, sal::static_int_cast< sal_uInt16 >(eLineCap))
+{
+}
+
+// -----------------------------------------------------------------------------
+
+XLineCapItem::XLineCapItem( SvStream& rIn )
+: SfxEnumItem(XATTR_LINECAP, rIn)
+{
+}
+
+// -----------------------------------------------------------------------------
+
+sal_uInt16 XLineCapItem::GetVersion( sal_uInt16 /*nFileFormatVersion*/) const
+{
+ return 1;
+}
+
+// -----------------------------------------------------------------------------
+
+SfxPoolItem* XLineCapItem::Create( SvStream& rIn, sal_uInt16 nVer ) const
+{
+ XLineCapItem* pRet = new XLineCapItem( rIn );
+
+ if(nVer < 1)
+ pRet->SetValue(com::sun::star::drawing::LineCap_BUTT);
+
+ return pRet;
+}
+
+// -----------------------------------------------------------------------------
+
+SfxPoolItem* XLineCapItem::Clone(SfxItemPool* /*pPool*/) const
+{
+ return new XLineCapItem( *this );
+}
+
+// -----------------------------------------------------------------------------
+
+SfxItemPresentation XLineCapItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreUnit*/,
+ SfxMapUnit /*ePresUnit*/, XubString& rText, const IntlWrapper*) const
+{
+ rText.Erase();
+
+ switch( ePres )
+ {
+ case SFX_ITEM_PRESENTATION_NONE: return ePres;
+
+ case SFX_ITEM_PRESENTATION_COMPLETE:
+ case SFX_ITEM_PRESENTATION_NAMELESS:
+ {
+ sal_uInt16 nId = 0;
+
+ switch( GetValue() )
+ {
+ default: /*com::sun::star::drawing::LineCap_BUTT*/
+ nId = RID_SVXSTR_LINECAP_BUTT;
+ break;
+
+ case(com::sun::star::drawing::LineCap_ROUND):
+ nId = RID_SVXSTR_LINECAP_ROUND;
+ break;
+
+ case(com::sun::star::drawing::LineCap_SQUARE):
+ nId = RID_SVXSTR_LINECAP_SQUARE;
+ break;
+ }
+
+ if( nId )
+ rText = SVX_RESSTR( nId );
+
+ return ePres;
+ }
+ default:
+ return SFX_ITEM_PRESENTATION_NONE;
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool XLineCapItem::QueryValue( ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/) const
+{
+ const com::sun::star::drawing::LineCap eCap(GetValue());
+ rVal <<= eCap;
+ return true;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool XLineCapItem::PutValue( const ::com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/)
+{
+ com::sun::star::drawing::LineCap eUnoCap;
+
+ if(!(rVal >>= eUnoCap))
+ {
+ // also try an int (for Basic)
+ sal_Int32 nLJ(0);
+
+ if(!(rVal >>= nLJ))
+ {
+ return false;
+ }
+
+ eUnoCap = (com::sun::star::drawing::LineCap)nLJ;
+ }
+
+ OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT == eUnoCap
+ || com::sun::star::drawing::LineCap_ROUND == eUnoCap
+ || com::sun::star::drawing::LineCap_SQUARE == eUnoCap, "Unknown enum value in XATTR_LINECAP (!)");
+
+ SetValue(sal::static_int_cast< sal_uInt16 >(eUnoCap));
+
+ return true;
+}
+
+// -----------------------------------------------------------------------------
+
+sal_uInt16 XLineCapItem::GetValueCount() const
+{
+ // don't forget to update the api interface also
+ return 3;
+}
+
+// -----------------------------------------------------------------------------
+
+com::sun::star::drawing::LineCap XLineCapItem::GetValue() const
+{
+ const com::sun::star::drawing::LineCap eRetval((com::sun::star::drawing::LineCap)SfxEnumItem::GetValue());
+ OSL_ENSURE(com::sun::star::drawing::LineCap_BUTT == eRetval
+ || com::sun::star::drawing::LineCap_ROUND == eRetval
+ || com::sun::star::drawing::LineCap_SQUARE == eRetval, "Unknown enum value in XATTR_LINECAP (!)");
+
+ return (com::sun::star::drawing::LineCap)SfxEnumItem::GetValue();
+}
+
//------------------------------
// class XFillTransparenceItem
//------------------------------
diff --git a/svx/source/xoutdev/xpool.cxx b/svx/source/xoutdev/xpool.cxx
index ab3de0a3659e..f1c8ac9f1ed5 100644
--- a/svx/source/xoutdev/xpool.cxx
+++ b/svx/source/xoutdev/xpool.cxx
@@ -87,6 +87,7 @@ XOutdevItemPool::XOutdevItemPool(
mppLocalPoolDefaults[XATTR_LINEENDCENTER -XATTR_START] = new XLineEndCenterItem;
mppLocalPoolDefaults[XATTR_LINETRANSPARENCE -XATTR_START] = new XLineTransparenceItem;
mppLocalPoolDefaults[XATTR_LINEJOINT -XATTR_START] = new XLineJointItem;
+ mppLocalPoolDefaults[XATTR_LINECAP -XATTR_START] = new XLineCapItem;
mppLocalPoolDefaults[XATTR_FILLSTYLE -XATTR_START] = new XFillStyleItem;
mppLocalPoolDefaults[XATTR_FILLCOLOR -XATTR_START] = new XFillColorItem (aNullStr,aNullFillCol);
mppLocalPoolDefaults[XATTR_FILLGRADIENT -XATTR_START] = new XFillGradientItem(this,aNullGrad);