22#include <com/sun/star/embed/ElementModes.hpp>
23#include <com/sun/star/ui/XUIConfigurationManager2.hpp>
30bool UIConfigurationImporterOOo1x::ImportCustomToolbars(
31 const uno::Reference< ui::XUIConfigurationManager2 >& rContainerFactory,
32 std::vector< uno::Reference< container::XIndexContainer > >& rSeqContainer,
33 const uno::Reference< uno::XComponentContext >& rxContext,
34 const uno::Reference< embed::XStorage >& rToolbarStorage )
36 bool bResult (
false );
37 if ( rToolbarStorage.is() && rContainerFactory.is() )
41 for ( sal_uInt16 i = 1;
i <= 4;
i++ )
43 OUString aTbxStreamName =
"userdeftoolbox" + OUString::number(i) +
".xml";
44 uno::Reference< io::XStream >
xStream = rToolbarStorage->openStreamElement( aTbxStreamName, embed::ElementModes::READ );
47 uno::Reference< io::XInputStream > xInputStream =
xStream->getInputStream();
48 if ( xInputStream.is() )
50 uno::Reference< container::XIndexContainer > xContainer = rContainerFactory->createSettings();
53 rSeqContainer.push_back( xContainer );
60 catch (
const uno::RuntimeException& )
64 catch (
const uno::Exception& )