update emoji autocorrect entries from po-files
[LibreOffice.git] / include / oox / helper / zipstorage.hxx
blobf643935bb006540e3abd29a133d923525aef02b4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_OOX_HELPER_ZIPSTORAGE_HXX
21 #define INCLUDED_OOX_HELPER_ZIPSTORAGE_HXX
23 #include <oox/helper/storagebase.hxx>
25 namespace com { namespace sun { namespace star {
26 namespace uno { class XComponentContext; }
27 } } }
29 namespace oox {
33 /** Implements stream access for ZIP storages containing XML streams. */
34 class ZipStorage : public StorageBase
36 public:
37 explicit ZipStorage(
38 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
39 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rxInStream );
41 explicit ZipStorage(
42 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
43 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& rxStream );
45 virtual ~ZipStorage();
47 private:
48 explicit ZipStorage(
49 const ZipStorage& rParentStorage,
50 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& rxStorage,
51 const OUString& rElementName );
53 /** Returns true, if the object represents a valid storage. */
54 virtual bool implIsStorage() const SAL_OVERRIDE;
56 /** Returns the com.sun.star.embed.XStorage interface of the current storage. */
57 virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
58 implGetXStorage() const SAL_OVERRIDE;
60 /** Returns the names of all elements of this storage. */
61 virtual void implGetElementNames( ::std::vector< OUString >& orElementNames ) const SAL_OVERRIDE;
63 /** Opens and returns the specified sub storage from the storage. */
64 virtual StorageRef implOpenSubStorage( const OUString& rElementName, bool bCreateMissing ) SAL_OVERRIDE;
66 /** Opens and returns the specified input stream from the storage. */
67 virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
68 implOpenInputStream( const OUString& rElementName ) SAL_OVERRIDE;
70 /** Opens and returns the specified output stream from the storage. */
71 virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
72 implOpenOutputStream( const OUString& rElementName ) SAL_OVERRIDE;
74 /** Commits the current storage. */
75 virtual void implCommit() const SAL_OVERRIDE;
77 private:
78 ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
79 mxStorage; ///< Storage based on input or output stream.
84 } // namespace oox
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */