/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_PACKAGE_INC_ZIPOUTPUTSTREAM_HXX #define INCLUDED_PACKAGE_INC_ZIPOUTPUTSTREAM_HXX #include #include #include "ByteChucker.hxx" #include #include struct ZipEntry; class ZipOutputEntry; class ZipOutputEntryInThread; class ZipPackageStream; class ZipOutputStream { css::uno::Reference< css::io::XOutputStream > m_xStream; ::std::vector < ZipEntry * > m_aZipList; std::shared_ptr mpThreadTaskTag; ByteChucker m_aChucker; ZipEntry *m_pCurrentEntry; std::vector< ZipOutputEntryInThread* > m_aEntries; std::exception_ptr m_aDeflateException; public: ZipOutputStream( const css::uno::Reference< css::io::XOutputStream > &xOStream ); ~ZipOutputStream(); void addDeflatingThreadTask( ZipOutputEntryInThread *pEntry, std::unique_ptr pThreadTask ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeLOC( ZipEntry *pEntry, bool bEncrypt = false ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void rawWrite( const css::uno::Sequence< sal_Int8 >& rBuffer ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void rawCloseEntry( bool bEncrypt = false ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void finish(); const css::uno::Reference< css::io::XOutputStream >& getStream(); static sal_uInt32 getCurrentDosTime(); static void setEntry( ZipEntry *pEntry ); private: /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeEND(sal_uInt32 nOffset, sal_uInt32 nLength); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeCEN( const ZipEntry &rEntry ); /// @throws css::io::IOException /// @throws css::uno::RuntimeException void writeEXT( const ZipEntry &rEntry ); // ScheduledThread handling helpers void consumeScheduledThreadTaskEntry(std::unique_ptr pCandidate); void consumeFinishedScheduledThreadTaskEntries(); public: void reduceScheduledThreadTasksToGivenNumberOrLess( sal_Int32 nThreadTasks); const std::shared_ptr& getThreadTaskTag() { return mpThreadTaskTag; } }; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ > LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2016-11-07improve indentationNoel Grandin
2016-10-05convert MapUnit to scoped enumNoel Grandin
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
2016-09-12loplugin:constantparam in package..stocNoel Grandin
2016-06-28loplugin:singlevalfields in reportdesignNoel Grandin
2016-06-16tdf#42949: clean up includes in include/dbaccess with iwyuJorenz Paragas
2016-03-29Use const_iterator when possible (reportdesign)Julien Nabet
2016-03-09loplugin:constantparam in reportdesignNoel Grandin
2016-03-02loplugin:unuseddefaultparam in reportdesignNoel Grandin
2016-02-09Remove excess newlinesChris Sherlock
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-10-26com::sun::star->css in remotebridges,reportdesignNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-09-29Renamed wrongly prefixed boolean variablesStefan Heinemann
2015-09-03convert Link<> to typedNoel Grandin
2015-08-14loplugin: defaultparamsNoel Grandin
2015-07-24convert WindowAlign to scoped enumNoel Grandin
2015-07-21loplugin:unusedmethods reportdesign,scaddinsNoel Grandin
2015-06-11cppcheck: noExplicitConstructorCaolán McNamara
2015-05-25tdf#91577 - fix unique_ptr conversion bugs in reportdesign.Michael Meeks
2015-05-21convert SWIB constants to scoped enumNoel Grandin
2015-05-10Use IMPL_LINK_NOARG[_TYPED] where applicableStephan Bergmann
2015-05-05Use typed Idle::SetIdleHdl LinkStephan Bergmann
2015-04-17reportdesign: convert new to ::Create.Michael Meeks
2015-04-10vclwidget: fix more places that should be wrapping in VclPtrNoel Grandin
2015-04-10vclwidget: convert lots more sites to use VclPtrNoel Grandin
2015-04-10vclwidget: only call dispose() onceNoel Grandin
2015-04-10vclwidget: change all vcl::window fields to be wrapped in VclPtrNoel Grandin
2015-04-09sw: more double dispose work.Michael Meeks
2015-04-09vcl: VclPtr conversion in reportdesignNoel Grandin
2015-03-06Idle: Changed to new enum nameTobias Madl
2015-03-06Idle: Removed VCL_IDLE_PRIORITY_ prefix of enumTobias Madl
2015-03-06Timer: Adapted all idle includes and enum usesTobias Madl
2015-01-30chisel off some more unused codeCaolán McNamara
2015-01-12convert SETTINGS_ #defines to 'enum class'Noel Grandin
2015-01-12fdo#84938: replace DATACHANGED_ constants with 'enum class'Noel Grandin
2014-12-09changed timers to idleJennifer Liebel
2014-12-01fdo#84938: replace EVENT_ constants with enumTobias Madl
2014-11-06Revert "use the new OUString::fromUtf8 method"Stephan Bergmann
2014-11-06use the new OUString::fromUtf8 methodNoel Grandin
2014-10-23Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"Jan Holesovsky
2014-10-23Fraction: Revert "fdo#84854 it seems long is not enough on 32 bit"Jan Holesovsky
2014-10-16fdo#84854 it seems long is not enough on 32 bitDavid Tardon
2014-10-09fdo#81356: convert Fraction to boost::rational<long> - wipJuan Picca