[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-5' - writerfilter/source
Caolán McNamara
caolanm at redhat.com
Wed Dec 10 12:15:33 PST 2014
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 85e973d3b95e66b7d396d94bf44011b5e8d51b21
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 8 11:24:14 2014 +0000
Resolves: fdo#86662 don't crash on docx load
ok in master, so just don't crash in 4-3 series
Change-Id: I2dcb7b0434341ff8058bdbdfc065ad08bd0600bc
Reviewed-on: https://gerrit.libreoffice.org/13374
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit dcc914ab55feb844d5d71e6568801fa1ffd47f6c)
Reviewed-on: https://gerrit.libreoffice.org/13375
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index c3343f1..2c9740f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3943,10 +3943,13 @@ void DomainMapper_Impl::CloseFieldCommand()
OUString aCode( pContext->GetCommand().trim() );
xFieldInterface = m_xTextFactory->createInstance("com.sun.star.text.Fieldmark");
const uno::Reference<text::XTextContent> xTextContent(xFieldInterface, uno::UNO_QUERY_THROW);
- uno::Reference< text::XTextAppend > xTextAppend;
- xTextAppend = m_aTextAppendStack.top().xTextAppend;
- uno::Reference< text::XTextCursor > xCrsr = xTextAppend->createTextCursorByRange(pContext->GetStartRange());
- if (xTextContent.is())
+ uno::Reference< text::XTextAppend > xTextAppend;
+ if (!m_aTextAppendStack.empty())
+ xTextAppend = m_aTextAppendStack.top().xTextAppend;
+ uno::Reference< text::XTextCursor > xCrsr;
+ if (xTextAppend.is())
+ xCrsr = xTextAppend->createTextCursorByRange(pContext->GetStartRange());
+ if (xTextAppend.is() && xTextContent.is())
{
xTextAppend->insertTextContent(xCrsr,xTextContent, sal_True);
}
More information about the Libreoffice-commits
mailing list