summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2013-05-22 14:48:36 +0300
committerTor Lillqvist <tlillqvist@suse.com>2013-05-22 14:48:36 +0300
commit2dec489ebb75030ffaeaa6daf7d42472e23a5eb6 (patch)
treed162430b4ef22ac36b5978c26c0e1ad589b77bc5 /xmloff
parenteed0e18b21cc807b40217d8f4adbfd376cb5d475 (diff)
WaE: function will cause runtime stack overflow
Revert misguided changes from 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 that obviously would cause endless recursion if these functions were ever entered. Thanks to MSVC2012 for the nice warning. Change-Id: I8504aa8ac141164ec6e026cc4fa873f8273f92bd
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/DomExport.cxx2
-rw-r--r--xmloff/source/script/XMLEventExport.cxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index ca1190d6eaae..7e87c621aba2 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -129,7 +129,7 @@ void visitNode( DomVisitor& rVisitor, const Reference<XNode>& xNode )
void visit( DomVisitor& rVisitor, const Reference<XDocument>& xDocument )
{
- visit( rVisitor, xDocument );
+ visit( rVisitor, Reference<XNode>( xDocument, UNO_QUERY_THROW ) );
}
void visit( DomVisitor& rVisitor, const Reference<XNode>& xNode )
diff --git a/xmloff/source/script/XMLEventExport.cxx b/xmloff/source/script/XMLEventExport.cxx
index 4ddde6e61d82..e619d96a6db2 100644
--- a/xmloff/source/script/XMLEventExport.cxx
+++ b/xmloff/source/script/XMLEventExport.cxx
@@ -106,7 +106,8 @@ void XMLEventExport::Export( Reference<XEventsSupplier> & rSupplier,
void XMLEventExport::Export( Reference<XNameReplace> & rReplace,
sal_Bool bWhitespace)
{
- Export(rReplace, bWhitespace);
+ Reference<XNameAccess> xAccess(rReplace, UNO_QUERY);
+ Export(xAccess, bWhitespace);
}
void XMLEventExport::Export( Reference<XNameAccess> & rAccess,