[Libreoffice-commits] .: 3 commits - writerfilter/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Sun Nov 20 15:15:32 PST 2011
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit 8731f2554918fe7572f78a21d4b0521d6f27efe4
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon Nov 21 00:13:41 2011 +0100
Related: i#83069 fix crash in DomainMapper_Impl::FindOrCreateFieldMaster
The next line would deference a NULL pointer otherwise, so use UNO_QUERY_THROW.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2d87819..a77d838 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1697,7 +1697,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::FindOrCreateFieldMaster
throw(::com::sun::star::uno::Exception)
{
// query master, create if not available
- uno::Reference< text::XTextFieldsSupplier > xFieldsSupplier( GetTextDocument(), uno::UNO_QUERY );
+ uno::Reference< text::XTextFieldsSupplier > xFieldsSupplier( GetTextDocument(), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xFieldMasterAccess = xFieldsSupplier->getTextFieldMasters();
uno::Reference< beans::XPropertySet > xMaster;
::rtl::OUString sFieldMasterService( ::rtl::OUString::createFromAscii(pFieldMasterService) );
commit 9b78fe962114cffc0d744767bbb3f6a0e8904739
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon Nov 21 00:07:54 2011 +0100
Related: i#60831 fix RTF import of DOCPROPERTY fields
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 1c99ce2..2d87819 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2150,7 +2150,8 @@ void DomainMapper_Impl::handleAuthor
{
sServiceName += sFieldServiceName;
}
- xFieldInterface = m_xTextFactory->createInstance(sServiceName);
+ if (m_xTextFactory.is())
+ xFieldInterface = m_xTextFactory->createInstance(sServiceName);
xFieldProperties =
uno::Reference< beans::XPropertySet >( xFieldInterface,
uno::UNO_QUERY_THROW);
commit 3ece03f3d4b139bbe8e153111a0ff38781d27922
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Mon Nov 21 00:03:42 2011 +0100
Related: i#93039 fix RTF import of MACROBUTTON fields
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index df47858..1c99ce2 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2678,11 +2678,12 @@ void DomainMapper_Impl::CloseFieldCommand()
//extract macro name
sal_Int32 nIndex = sizeof(" MACROBUTTON ");
::rtl::OUString sMacro = pContext->GetCommand().getToken( 0, ' ', nIndex);
- xFieldProperties->setPropertyValue(
- rPropNameSupplier.GetName(PROP_MACRO_NAME), uno::makeAny( sMacro ));
+ if (xFieldProperties.is())
+ xFieldProperties->setPropertyValue(
+ rPropNameSupplier.GetName(PROP_MACRO_NAME), uno::makeAny( sMacro ));
//extract quick help text
- if( pContext->GetCommand().getLength() > nIndex + 1)
+ if(xFieldProperties.is() && pContext->GetCommand().getLength() > nIndex + 1)
{
xFieldProperties->setPropertyValue(
rPropNameSupplier.GetName(PROP_HINT),
More information about the Libreoffice-commits
mailing list