[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - writerfilter/source
Michael Stahl
mstahl at redhat.com
Tue Feb 25 07:35:25 PST 2014
writerfilter/source/rtftok/rtfsdrimport.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 84e8e9f178308f082b0c51c3e33655e3a082c057
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Feb 25 11:55:27 2014 +0100
RTFSdrImport::resolveDhgt(): fix crashing C-cast
Inside DomainMapper::graphicZOrderHelper() this is offset by 0x40 so
whatever that cast does, it's doing it wrong.
Change-Id: Ie48467c12828137a521cba47c2e04cac65201d1d
(cherry picked from commit 8dcb56fdcea455012ef010c343ab036955678f4d)
Reviewed-on: https://gerrit.libreoffice.org/8222
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 8cbdc1b..14e2df2 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -121,7 +121,8 @@ void RTFSdrImport::popParent()
void RTFSdrImport::resolveDhgt(uno::Reference<beans::XPropertySet> xPropertySet, sal_Int32 nZOrder)
{
- writerfilter::dmapper::DomainMapper& rMapper = (writerfilter::dmapper::DomainMapper&)m_rImport.Mapper();
+ writerfilter::dmapper::DomainMapper& rMapper =
+ dynamic_cast<writerfilter::dmapper::DomainMapper&>(m_rImport.Mapper());
writerfilter::dmapper::GraphicZOrderHelper* pHelper = rMapper.graphicZOrderHelper();
xPropertySet->setPropertyValue("ZOrder", uno::makeAny(pHelper->findZOrder(nZOrder)));
pHelper->addItem(xPropertySet, nZOrder);
More information about the Libreoffice-commits
mailing list