mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix windows dll problem due to not exporting vector_streambufs
This commit is contained in:
parent
e26364c388
commit
a5c0d03bcc
@ -124,7 +124,7 @@ private:
|
|||||||
{
|
{
|
||||||
const auto chain = document_.follow_chain(entry_.start, document_.ssat_);
|
const auto chain = document_.follow_chain(entry_.start, document_.ssat_);
|
||||||
auto current_sector = chain[position_ / document_.short_sector_size()];
|
auto current_sector = chain[position_ / document_.short_sector_size()];
|
||||||
auto remaining = std::min(entry_.size - std::uint32_t(position_), std::uint32_t(count));
|
auto remaining = std::min(std::size_t(entry_.size) - position_, std::size_t(count));
|
||||||
|
|
||||||
while (remaining)
|
while (remaining)
|
||||||
{
|
{
|
||||||
@ -142,7 +142,10 @@ private:
|
|||||||
auto start = current_sector_.begin() + position_ % document_.short_sector_size();
|
auto start = current_sector_.begin() + position_ % document_.short_sector_size();
|
||||||
auto end = start + to_read;
|
auto end = start + to_read;
|
||||||
|
|
||||||
c = std::copy(start, end, c);
|
for (auto i = start; i < end; ++i)
|
||||||
|
{
|
||||||
|
*(c++) = *i;
|
||||||
|
}
|
||||||
|
|
||||||
remaining -= to_read;
|
remaining -= to_read;
|
||||||
position_ += to_read;
|
position_ += to_read;
|
||||||
@ -160,7 +163,7 @@ private:
|
|||||||
{
|
{
|
||||||
const auto chain = document_.follow_chain(entry_.start, document_.sat_);
|
const auto chain = document_.follow_chain(entry_.start, document_.sat_);
|
||||||
auto current_sector = chain[position_ / document_.sector_size()];
|
auto current_sector = chain[position_ / document_.sector_size()];
|
||||||
auto remaining = std::min(entry_.size - std::uint32_t(position_), std::uint32_t(count));
|
auto remaining = std::min(std::size_t(entry_.size) - position_, std::size_t(count));
|
||||||
|
|
||||||
while (remaining)
|
while (remaining)
|
||||||
{
|
{
|
||||||
@ -178,7 +181,10 @@ private:
|
|||||||
auto start = current_sector_.begin() + position_ % document_.sector_size();
|
auto start = current_sector_.begin() + position_ % document_.sector_size();
|
||||||
auto end = start + to_read;
|
auto end = start + to_read;
|
||||||
|
|
||||||
c = std::copy(start, end, c);
|
for (auto i = start; i < end; ++i)
|
||||||
|
{
|
||||||
|
*(c++) = *i;
|
||||||
|
}
|
||||||
|
|
||||||
remaining -= to_read;
|
remaining -= to_read;
|
||||||
position_ += to_read;
|
position_ += to_read;
|
||||||
|
@ -35,7 +35,7 @@ namespace detail {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows a std::vector to be read through a std::istream.
|
/// Allows a std::vector to be read through a std::istream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class vector_istreambuf : public std::streambuf
|
class XLNT_API vector_istreambuf : public std::streambuf
|
||||||
{
|
{
|
||||||
using int_type = std::streambuf::int_type;
|
using int_type = std::streambuf::int_type;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ private:
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Allows a std::vector to be written through a std::ostream.
|
/// Allows a std::vector to be written through a std::ostream.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class vector_ostreambuf : public std::streambuf
|
class XLNT_API vector_ostreambuf : public std::streambuf
|
||||||
{
|
{
|
||||||
using int_type = std::streambuf::int_type;
|
using int_type = std::streambuf::int_type;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user