summaryrefslogtreecommitdiff
path: root/oox/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-11-11 11:44:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-11-11 11:55:05 +0000
commit5aea780bfd46a369ed6c8ef3505dcaeb6f44323d (patch)
treeebf59df0ae15ba21752d7bfe77f1a5b446b4bd85 /oox/source
parent2bb0386ecbb6aeebbe7a9390df94ce73457e2fe3 (diff)
This global Reference is problematic, especially for unit tests
The global reference will be torn down after the typelib infrastructure is gone away. Hopefully a WeakReference is sufficient for the original requirements
Diffstat (limited to 'oox/source')
-rw-r--r--oox/source/drawingml/textparagraphproperties.cxx4
-rw-r--r--oox/source/ppt/slidepersist.cxx3
2 files changed, 4 insertions, 3 deletions
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index b6c9178ad008..eeb8409b8e43 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -475,7 +475,9 @@ void TextParagraphProperties::dump() const
Reference< ::com::sun::star::drawing::XShape > xShape( oox::ppt::PowerPointImport::mpDebugFilterBase->getModelFactory()->createInstance( CREATE_OUSTRING( "com.sun.star.presentation.TitleTextShape" ) ), UNO_QUERY );
Reference< ::com::sun::star::text::XText > xText( xShape, UNO_QUERY );
- ppt::SlidePersist::mxDebugPage->add( xShape );
+ Reference< com::sun::star::drawing::XDrawPage > xDebugPage(ppt::SlidePersist::mxDebugPage.get(), UNO_QUERY);
+ if (xDebugPage.is())
+ xDebugPage->add( xShape );
PropertyMap emptyMap;
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index b93ea3c0445c..91f773457a03 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -80,12 +80,11 @@ SlidePersist::SlidePersist( XmlFilterBase& rFilter, sal_Bool bMaster, sal_Bool b
}
#if OSL_DEBUG_LEVEL > 0
- ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SlidePersist::mxDebugPage;
+::com::sun::star::uno::WeakReference< ::com::sun::star::drawing::XDrawPage > SlidePersist::mxDebugPage;
#endif
SlidePersist::~SlidePersist()
{
-
}
sal_Int16 SlidePersist::getLayoutFromValueToken()