tfussell / xlnt

:bar_chart: Cross-platform user-friendly xlsx library for C++11+
Other
1.47k stars 409 forks source link

destination_stream_ problem #627

Open KotleciokORG opened 2 years ago

KotleciokORG commented 2 years ago

Is this xlnt project done right now? It seems to have missing code in source/detail/serialization/zstream.hpp I think it shouldn't be that empty. (code below) I get error: bad zip stream which is being thrown by source code, but I really dont understand why. zstream.cpp throw this when there is not destinationstream, but it isn't set anywhere. I hope for your response, thank you. Except this 'bad zip stream' problem all works really well.

class XLNT_API ozstream
{
public:
    /// <summary>
    /// Construct a new zip_file_writer which writes a ZIP archive to the given stream.
    /// </summary>
    ozstream(std::ostream &stream);

    /// <summary>
    /// Destructor.
    /// </summary>
    virtual ~ozstream();

    /// <summary>
    /// Returns a pointer to a streambuf which compresses the data it receives.
    /// </summary>
    std::unique_ptr<std::streambuf> open(const path &file);

private:
    std::vector<zheader> file_headers_;
    std::ostream &destination_stream_;
};