summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-10 11:28:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-10 19:25:41 +0200
commite7d3243d22d6a94930e0cd21721442a2608e03fa (patch)
tree1685044b8a433ef01dbc45f85b63565c25aea30a /basic
parent56810b5b3dcae39dea1462ac1e2a490af375a0c3 (diff)
move creation of xParser to where it is used
Change-Id: I03511a8c7b01b0abb69b276b900bf712549e5873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/namecont.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 86b7d699fe9a..2ff7817dd44a 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -649,8 +649,6 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
maLibraryPath = SvtPathOptions().GetBasicPath();
}
- Reference< XParser > xParser = xml::sax::Parser::create(mxContext);
-
uno::Reference< io::XInputStream > xInput;
mxStorage = xStorage;
@@ -784,6 +782,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
// start parsing
auto pLibArray = std::make_unique<::xmlscript::LibDescriptorArray> ( );
+ Reference< XParser > xParser = xml::sax::Parser::create(mxContext);
try
{
xParser->setDocumentHandler( ::xmlscript::importLibraryContainer( pLibArray.get() ) );