summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-05-28 16:11:38 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-05-29 15:56:50 +0200
commit4eaabc45f76aefe82558b283975ab9df3aea7fce (patch)
tree3839bcef134f473a95f0fcfa2cef8a9cd5ca7c3c /writerfilter/source
parentb2d08d759ee755cb5722553e01fb6d007ac9ffbe (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
Diffstat (limited to 'writerfilter/source')
-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& )