summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/inputdlg.cxx
diff options
context:
space:
mode:
authorAkshay Deep <akshaydeepiitr@gmail.com>2016-03-29 03:41:05 +0530
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2016-04-04 09:07:44 +0000
commite099c5bdaa458105148059228ec11c98b9d13029 (patch)
tree2aecedc6780a6f95552095bca50ab64c98967139 /sfx2/source/dialog/inputdlg.cxx
parentd69c03a3520205db549b2c84e7825967c8ea3ac5 (diff)
Make InputDialog class global to reuse it's code and tdf#97425
tdf#97425 -> Use InputDialog to edit Java Class Parameter Change-Id: I41ac9ffbc660c4bbb9d4fd3335e95d64ccdd2842 Reviewed-on: https://gerrit.libreoffice.org/23580 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sfx2/source/dialog/inputdlg.cxx')
-rw-r--r--sfx2/source/dialog/inputdlg.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sfx2/source/dialog/inputdlg.cxx b/sfx2/source/dialog/inputdlg.cxx
index 8aa717d4a56e..427f2862ed5b 100644
--- a/sfx2/source/dialog/inputdlg.cxx
+++ b/sfx2/source/dialog/inputdlg.cxx
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include "inputdlg.hxx"
+#include <sfx2/inputdlg.hxx>
#include <sfx2/sfxresid.hxx>
#include <vcl/button.hxx>
@@ -21,6 +21,7 @@ InputDialog::InputDialog(const OUString &rLabelText, vcl::Window *pParent)
get(m_pLabel, "label");
get(m_pOK, "ok");
get(m_pCancel, "cancel");
+ get(m_pHelp, "help");
m_pLabel->SetText(rLabelText);
m_pOK->SetClickHdl(LINK(this,InputDialog,ClickHdl));
m_pCancel->SetClickHdl(LINK(this,InputDialog,ClickHdl));
@@ -37,14 +38,26 @@ void InputDialog::dispose()
m_pLabel.clear();
m_pOK.clear();
m_pCancel.clear();
+ m_pHelp.clear();
ModalDialog::dispose();
}
-OUString InputDialog::getEntryText() const
+void InputDialog::HideHelpBtn()
+{
+ m_pHelp->Hide();
+}
+
+OUString InputDialog::GetEntryText() const
{
return m_pEntry->GetText();
}
+void InputDialog::SetEntryText( OUString const & sStr)
+{
+ m_pEntry->SetText(sStr);
+ m_pEntry->SetCursorAtLast();
+}
+
IMPL_LINK_TYPED(InputDialog,ClickHdl, Button*, pButton, void)
{
EndDialog(pButton == m_pOK ? RET_OK : RET_CANCEL);