summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <bubli@bubli.org>2015-02-10 23:27:28 +0100
committerAndras Timar <andras.timar@collabora.com>2015-02-23 10:33:09 +0100
commit2dbacb1bc92b999537cd59d882ca08548d865143 (patch)
treeed72e1d8df45095eda23373d7af46f6b4300fa5b
parent551d8a2ce7e318c0a99f79c2ea708a909e260c8c (diff)
tdf#79239: make the dialog closable with 'X' button again
that one of window manager, top-right corner mostly. We need to reimplement Close() method for this class - I don't quite get why this has to be the case, but all classes derived from ScAnyRefDlg do it as well. Change-Id: I3e94b7ee09f9b3581d054818d36ea4fb0fd55f78 (cherry picked from commit bd472c8a91976cda5fc5a45fccd2c782c6d44e73)
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx9
-rw-r--r--sc/source/ui/inc/PivotLayoutDialog.hxx1
2 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 67e1907ae6e8..dfe8cdca73e5 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -609,16 +609,21 @@ void ScPivotLayoutDialog::PushDataFieldNames(std::vector<ScDPName>& rDataFieldNa
return mpListBoxData->PushDataFieldNames(rDataFieldNames);
}
+bool ScPivotLayoutDialog::Close()
+{
+ return DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
+}
+
IMPL_LINK( ScPivotLayoutDialog, OKClicked, PushButton*, /*pButton*/ )
{
ApplyChanges();
- DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
+ Close();
return 0;
}
IMPL_LINK( ScPivotLayoutDialog, CancelClicked, PushButton*, /*pButton*/ )
{
- DoClose( ScPivotLayoutWrapper::GetChildWindowId() );
+ Close();
return 0;
}
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx
index c63177b5273e..0d43227f7cc2 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -95,6 +95,7 @@ private:
DECL_LINK(ToggleSource, void*);
DECL_LINK(ToggleDestination, void*);
DECL_LINK(SourceEditModified, void*);
+ virtual bool Close() SAL_OVERRIDE;
ScPivotParam maPivotParameters;