summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-09-28 12:24:49 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-06 14:30:54 +0000
commit8da897574f0a9e40b87944750eec813c428e6a30 (patch)
treefeadde83e31ede1911fd6df56c5ba070bcf7b885 /sw
parentd0f2707c2a649778fe8bc47a187ceb2e6a90aaf7 (diff)
Resolves: tdf#102358 writer cannot save 3d shape inserted from draw
because SwXShape::supportsService always returned true for com.sun.star.drawing.Shape I surmise that getSupportedServiceNames should always list com.sun.star.drawing.Shape as a supported service This went awry with... commit 2f50ce6cfab2871cd879c1429e1938d3642616ef Author: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Date: Thu Dec 5 19:17:18 2013 -0200 fdo#54938: Convert sw to use cppu::supportsService Change-Id: Ic27bf31e5eb991ccceb8b97713d1e50a736709c8 Signed-off-by: Stephan Bergmann <sbergman@redhat.com> Change-Id: I9821a620da8bac3b6b59da976a8c25bb2deafcf1 (cherry picked from commit 5345b1562066d61b9ed79f072f8a953c67f847ed) Reviewed-on: https://gerrit.libreoffice.org/29360 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unodraw.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index 10024027c658..47ebb0b719e5 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2245,18 +2245,15 @@ sal_Bool SwXShape::supportsService(const OUString& rServiceName) throw( uno::Run
uno::Sequence< OUString > SwXShape::getSupportedServiceNames() throw( uno::RuntimeException, std::exception )
{
uno::Sequence< OUString > aSeq;
- if(xShapeAgg.is())
+ if (xShapeAgg.is())
{
uno::Reference< lang::XUnoTunnel > xShapeTunnel(xShapeAgg, uno::UNO_QUERY);
SvxShape* pSvxShape = GetSvxShape();
if(pSvxShape)
aSeq = pSvxShape->getSupportedServiceNames();
}
- else
- {
- aSeq.realloc(1);
- aSeq.getArray()[0] = "com.sun.star.drawing.Shape";
- }
+ aSeq.realloc(aSeq.getLength() + 1);
+ aSeq.getArray()[aSeq.getLength() - 1] = "com.sun.star.drawing.Shape";
return aSeq;
}