Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerfilter / inc / dmapper / DomainMapperFactory.hxx
blobea7ab81e1a1becb5be780d7a09269572bb5dc3ee
1 /*
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 */
9 #pragma once
11 #include <vector>
13 #include <dmapper/resourcemodel.hxx>
14 #include <com/sun/star/io/XInputStream.hpp>
15 #include <com/sun/star/lang/XComponent.hpp>
16 #include <com/sun/star/uno/XComponentContext.hpp>
18 namespace utl
20 class MediaDescriptor;
23 namespace writerfilter::dmapper
25 enum class SourceDocumentType
27 OOXML,
28 RTF
31 /// Interface to create a DomainMapper instance.
32 class DomainMapperFactory
34 public:
35 static Stream::Pointer_t
36 createMapper(css::uno::Reference<css::uno::XComponentContext> const& xContext,
37 css::uno::Reference<css::io::XInputStream> const& xInputStream,
38 css::uno::Reference<css::lang::XComponent> const& xModel, bool bRepairStorage,
39 SourceDocumentType eDocumentType, utl::MediaDescriptor const& rMediaDesc);
42 // export just for test
43 SAL_DLLPUBLIC_EXPORT std::tuple<OUString, std::vector<OUString>, std::vector<OUString>>
44 splitFieldCommand(std::u16string_view rCommand);
46 } // namespace writerfilter::dmapper
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */