diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2017-03-16 18:09:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-04-18 16:24:37 +0200 |
commit | e2d3e936ab03274696f235c9d74e247380070f6f (patch) | |
tree | 2737c6251ab44f4b5c772429b7d42a3414d9fb89 /include/sfx2 | |
parent | f3ab7e1403f60ad4f9137e68241e68aa06b2fb1e (diff) |
tdf#95992 "Edit" > "Compare Document..." opens dialog that is...
misnamed "Insert"
Issue is that the caption of the dialog is handled by generic code,
which was not designed with comparison in mind. This fix extends the
captions that can be used by such generic codes, without modifying
the underlaying architecture.
Letting callers directly provide caption text might be more versatile,
though.
The fix is extended to:
* Writer Merge functionality
* Calc Compare/Merge functionalities
which use the same dialog (and thus were also displaying "Insert").
Change-Id: I452b37bf7d0024924c87316cd47572c09b373b65
Reviewed-on: https://gerrit.libreoffice.org/35285
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include/sfx2')
-rw-r--r-- | include/sfx2/docinsert.hxx | 9 | ||||
-rw-r--r-- | include/sfx2/filedlghelper.hxx | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx index 4f47a79bd896..13f210de5b7f 100644 --- a/include/sfx2/docinsert.hxx +++ b/include/sfx2/docinsert.hxx @@ -53,8 +53,13 @@ private: DECL_LINK(DialogClosedHdl, sfx2::FileDialogHelper*, void); public: - DocumentInserter(const OUString& rFactory, - bool const bEnableMultiSelection = false); + enum class Mode { + Insert, + InsertMulti, + Compare, + Merge + }; + DocumentInserter(const OUString& rFactory, const Mode mode = Mode::Insert); ~DocumentInserter(); void StartExecuteModal( const Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink ); diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx index 28159ec0cb45..f2f8ed6356d3 100644 --- a/include/sfx2/filedlghelper.hxx +++ b/include/sfx2/filedlghelper.hxx @@ -67,10 +67,12 @@ enum class FileDialogFlags { MultiSelection = 0x08, Graphic = 0x10, // register graphic formats /// Sign existing PDF. - SignPDF = 0x20 + SignPDF = 0x20, + InsertCompare = 0x40, /// Special insertion ("Compare" caption) + InsertMerge = 0x80, /// Special insertion ("Merge" caption) }; namespace o3tl { - template<> struct typed_flags<FileDialogFlags> : is_typed_flags<FileDialogFlags, 0x3f> {}; + template<> struct typed_flags<FileDialogFlags> : is_typed_flags<FileDialogFlags, 0xFF> {}; } #define FILEDIALOG_FILTER_ALL "*.*" |