summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2017-04-19 13:29:21 +0200
committerAndras Timar <andras.timar@collabora.com>2017-04-20 10:06:11 +0200
commitda24355234ec12f2f4c652113dbbb1216ba5492c (patch)
treecf510dd83d5d147fc721c372b5c9f799c2d344b4 /sc
parentb1cd3eebf74345d18b47d2de0d4d0e81ef0d7b96 (diff)
Settings for not showing Merge Cells dialog and for emptying hidden cells
By default nothing changes. But users have the possibility to avoid the confusing (?) Merge Cell dialog. Also, when the dialog is disabled, users may want to set the EmptyMergedCells to true, to mimic Excel's behaviour. Change-Id: I9656ae59199bb697c45786dd478379f5c89eb08f Reviewed-on: https://gerrit.libreoffice.org/36679 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewfun2.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index b7ee8dd55eb6..59609fbebfe0 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -92,6 +92,8 @@
#include <memory>
#include <boost/property_tree/json_parser.hpp>
+#include <officecfg/Office/Calc.hxx>
+
using namespace com::sun::star;
using ::editeng::SvxBorderLine;
@@ -1096,11 +1098,12 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter )
}
bool bOk = true;
- bool bEmptyMergedCells = false;
+ bool bEmptyMergedCells = officecfg::Office::Calc::Compatibility::MergeCells::EmptyMergedCells::get();
if (bAskDialog)
{
- if (!bApi)
+ bool bShowDialog = officecfg::Office::Calc::Compatibility::MergeCells::ShowDialog::get();
+ if (!bApi && bShowDialog)
{
VclPtr<ScMergeCellsDialog> aBox = VclPtr<ScMergeCellsDialog>::Create( GetViewData().GetDialogParent() );
sal_uInt16 nRetVal = aBox->Execute();
@@ -1113,7 +1116,8 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter )
rDoContents = true;
break;
case KeepContentHiddenCells:
- break; // keep default values
+ bEmptyMergedCells = false;
+ break;
case EmptyContentHiddenCells:
bEmptyMergedCells = true;
break;