summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet/ExportDialog.cpp
AgeCommit message (Collapse)Author
2023-01-07LibGUI+Userland: Rename `try_load_from_gml()` -> `load_from_gml()` :^)Sam Atkins
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07Userland: Replace all uses of `load_from_gml` with `try_load_from_gml`Sam Atkins
MOAR FIXMES! ;^)
2023-01-07Spreadsheet: Port ExportDialog to Core::StreamKarol Kosek
2023-01-07Spreadsheet: Port XSV writer to Core::StreamKarol Kosek
2023-01-07Spreadsheet: Make file export functions return ErrorOr<>Karol Kosek
2023-01-07Spreadsheet: Generate file previews in memory and save directly to fileKarol Kosek
When we were asked to make a new preview text, we first generated the whole file in the /tmp directory and then read the first 8 lines to put them in a text box. This was doing a bit of unnecessary work at first, but more importantly, didn't work on a given file descriptor from FileSystemAccessServer as we were copying a file to a filename instead, meaning that we also had to unveil the whole home directory. Anyway, previews will be written now to a MemoryStream by the generator, which will limit to 8 lines. File saves will omit /tmp entirely, allowing us to tighten program unveil list a little. :^)
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-05-22Spreadsheet: Recognize sheets files by mime type, not by file extensionKarol Kosek
These conditions weren't executed since 933a717f3b and always showed a file import/export wizard.
2022-05-13LibGUI+Userland: Make Dialog::ExecResult an enum classSam Atkins
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-01-24Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOrSam Atkins
Apologies for the enormous commit, but I don't see a way to split this up nicely. In the vast majority of cases it's a simple change. A few extra places can use TRY instead of manual error checking though. :^)
2021-11-08LibCore: Use ErrorOr<T> for Core::File::open()Andreas Kling
2021-11-08LibCore: Use ErrorOr<T> for Core::File::copy_file()Andreas Kling
2021-09-07Everywhere: Behaviour => BehaviorAndreas Kling
2021-09-06Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safeAli Mohammad Pur
2021-08-01Applications: Remove unused header includesBrian Gianforcaro
2021-06-30AK+Everywhere: Add and use static APIs for LexicalPathMax Wipfli
The LexicalPath instance methods dirname(), basename(), title() and extension() will be changed to return StringView const& in a further commit. Due to this, users creating temporary LexicalPath objects just to call one of those getters will recieve a StringView const& pointing to a possible freed buffer. To avoid this, static methods for those APIs have been added, which will return a String by value to avoid those problems. All cases where temporary LexicalPath objects have been used as described above haven been changed to use the static APIs.
2021-06-12AK: Rename Vector::append(Vector) => Vector::extend(Vector)Andreas Kling
Let's make it a bit more clear when we're appending the elements from one vector to the end of another vector.
2021-06-06AK+Everywhere: Disallow constructing Functions from incompatible typesAli Mohammad Pur
Previously, AK::Function would accept _any_ callable type, and try to call it when called, first with the given set of arguments, then with zero arguments, and if all of those failed, it would simply not call the function and **return a value-constructed Out type**. This lead to many, many, many hard to debug situations when someone forgot a `const` in their lambda argument types, and many cases of people taking zero arguments in their lambdas to ignore them. This commit reworks the Function interface to not include any such surprising behaviour, if your function instance is not callable with the declared argument set of the Function, it can simply not be assigned to that Function instance, end of story.
2021-05-12LibCore+Everywhere: Move OpenMode out of IODeviceAli Mohammad Pur
...and make it an enum class so people don't omit "OpenMode".
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-04Spreadsheet: Declare the extern GML variable as an array, not a pointerDawid Wolosowicz
Part of #5906 Fixes #5943
2021-03-28Spreadsheet: Show the error (if any) in csv import dialog's previewAnotherTest
...and don't try to read from a CSV that has errors. Fixes #5942.
2021-03-22Spreadsheet: Add an export wizard, and support for custom CSV exportsAnotherTest
Fixes #4269.