summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-05-28 16:11:38 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-05-30 14:03:31 +0200
commit0e924f3ef6b6a1ece341774ab5a68dddbc9d70c1 (patch)
tree2fa5baa216aa846bee517107fdf8e3fc2ac4b9cc /writerfilter
parentc962144cff263c2f0fdbe202fb6eaf4c4a1ff37d (diff)
bnc#817956 DOCX import: missing last character of shape text
Make sure writerfilter only removes the last character of the text if it's a newline. Change-Id: I96980e2d148ced93363b3147545afdd0dd070e5d (cherry picked from commit 4eaabc45f76aefe82558b283975ab9df3aea7fce)
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fa6b36d43d93..adf587070097 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -305,7 +305,10 @@ void DomainMapper_Impl::RemoveLastParagraph( )
else
{
xCursor->goLeft( 1, true );
- xCursor->setString(OUString());
+ // If this is a text on a shape, possibly the text has the trailing
+ // newline removed already.
+ if (xCursor->getString() == "\n")
+ xCursor->setString(OUString());
}
}
catch( const uno::Exception& )