summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet/Writers
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-01-22 05:09:11 +0100
committerAndrew Kaster <andrewdkaster@gmail.com>2023-01-29 19:16:44 -0700
commit8464da143987e290fa3d9ad739b491e6adbffee6 (patch)
tree58905a6ac790d1e2368b9132403b190271617c4b /Userland/Applications/Spreadsheet/Writers
parent5f2ea31816612dead5bc7ac59d27da0bc4b45736 (diff)
downloadserenity-8464da143987e290fa3d9ad739b491e6adbffee6.zip
AK: Move `Stream` and `SeekableStream` from `LibCore`
`Stream` will be qualified as `AK::Stream` until we remove the `Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is defined by `SeekableStream`, since defining its own would require us to qualify it with `AK::SeekMode` everywhere.
Diffstat (limited to 'Userland/Applications/Spreadsheet/Writers')
-rw-r--r--Userland/Applications/Spreadsheet/Writers/CSV.h4
-rw-r--r--Userland/Applications/Spreadsheet/Writers/XSV.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/Spreadsheet/Writers/CSV.h b/Userland/Applications/Spreadsheet/Writers/CSV.h
index fb0cbd4ca7..e8e07341d3 100644
--- a/Userland/Applications/Spreadsheet/Writers/CSV.h
+++ b/Userland/Applications/Spreadsheet/Writers/CSV.h
@@ -15,13 +15,13 @@ namespace Writer {
class CSV {
public:
template<typename ContainerType>
- static ErrorOr<void> generate(Core::Stream::Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
+ static ErrorOr<void> generate(AK::Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
{
return XSV<ContainerType>::generate(output, data, { ",", "\"", WriterTraits::Repeat }, move(headers), behaviors);
}
template<typename ContainerType>
- static ErrorOr<void> generate_preview(Core::Stream::Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
+ static ErrorOr<void> generate_preview(AK::Stream& output, ContainerType const& data, Vector<StringView> headers = {}, WriterBehavior behaviors = default_behaviors())
{
return XSV<ContainerType>::generate_preview(output, data, { ",", "\"", WriterTraits::Repeat }, move(headers), behaviors);
}
diff --git a/Userland/Applications/Spreadsheet/Writers/XSV.h b/Userland/Applications/Spreadsheet/Writers/XSV.h
index f81a17d4ed..818e3d3c1c 100644
--- a/Userland/Applications/Spreadsheet/Writers/XSV.h
+++ b/Userland/Applications/Spreadsheet/Writers/XSV.h
@@ -42,7 +42,7 @@ constexpr WriterBehavior default_behaviors()
template<typename ContainerType, typename HeaderType = Vector<StringView>>
class XSV {
public:
- static ErrorOr<void> generate(Core::Stream::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
+ static ErrorOr<void> generate(AK::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
{
auto writer = XSV(output, data, traits, headers, behaviors);
auto with_headers = has_flag(writer.m_behaviors, WriterBehavior::WriteHeaders);
@@ -63,7 +63,7 @@ public:
return {};
}
- static ErrorOr<void> generate_preview(Core::Stream::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
+ static ErrorOr<void> generate_preview(AK::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
{
auto writer = XSV(output, data, traits, headers, behaviors);
auto lines_written = 0;
@@ -93,7 +93,7 @@ public:
}
private:
- XSV(Core::Stream::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
+ XSV(AK::Stream& output, ContainerType const& data, WriterTraits traits, HeaderType headers = {}, WriterBehavior behaviors = default_behaviors())
: m_data(data)
, m_traits(move(traits))
, m_behaviors(behaviors)
@@ -170,7 +170,7 @@ private:
WriterTraits m_traits;
WriterBehavior m_behaviors;
HeaderType m_names;
- Core::Stream::Stream& m_output;
+ AK::Stream& m_output;
};
}