summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-10-13 13:13:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-10-13 13:15:05 +0200
commit8a5382fec79f3a8651b7d4f9f2d6452b5a6d367d (patch)
treeaef60dcefb7339bc19fbe253e2dc781fac1e6e76 /oox
parent949628c412d04a27ef655d4103812b53235a82c1 (diff)
Use nRadius value at least to decide between "rect" and "roundRect" presets
(found by clang-analyzer-deadcode.DeadStores) Change-Id: I27ff1222295a151a7616ed380439b87d27866899
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/shapes.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 2f73d27e02b8..a8464e35071b 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -882,6 +882,8 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
{
nRadius = MapSize( awt::Size( nRadius, 0 ) ).Width;
}
+ //TODO: use nRadius value more precisely than just deciding whether to use
+ // "rect" or "roundRect" preset shape below
// non visual shape properties
if (GetDocumentType() == DOCUMENT_DOCX)
@@ -898,7 +900,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
// visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
WriteShapeTransformation( xShape, XML_a, false, false);
- WritePresetShape( "rect" );
+ WritePresetShape( nRadius == 0 ? "rect" : "roundRect" );
Reference< XPropertySet > xProps( xShape, UNO_QUERY );
if( xProps.is() )
{