summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh4.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2017-03-16 18:09:20 +0100
committerMichael Stahl <mstahl@redhat.com>2017-04-18 16:24:37 +0200
commite2d3e936ab03274696f235c9d74e247380070f6f (patch)
tree2737c6251ab44f4b5c772429b7d42a3414d9fb89 /sc/source/ui/docshell/docsh4.cxx
parentf3ab7e1403f60ad4f9137e68241e68aa06b2fb1e (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 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 5e986635b820..135034c784e7 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -722,13 +722,16 @@ void ScDocShell::Execute( SfxRequest& rReq )
}
else
{
+ const sfx2::DocumentInserter::Mode mode { nSlot==SID_DOCUMENT_COMPARE
+ ? sfx2::DocumentInserter::Mode::Compare
+ : sfx2::DocumentInserter::Mode::Merge};
// start file dialog asynchronous
pImpl->bIgnoreLostRedliningWarning = true;
delete pImpl->pRequest;
pImpl->pRequest = new SfxRequest( rReq );
delete pImpl->pDocInserter;
pImpl->pDocInserter = new ::sfx2::DocumentInserter(
- ScDocShell::Factory().GetFactoryName(), false );
+ ScDocShell::Factory().GetFactoryName(), mode );
pImpl->pDocInserter->StartExecuteModal( LINK( this, ScDocShell, DialogClosedHdl ) );
return ;
}