summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2012-08-25 20:24:57 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2012-08-25 20:24:57 +0400
commit55b79fa2f104e08b940b7019c52dffbafaa13f61 (patch)
tree85fd43ec263dd29c3807c50960bf7989cdd304a2 /sw
parenta5546942ec70fca551401ae61eee00b66a92f81d (diff)
Revert "cast to wrong type, can cause crash when opening Options-Writer-AutoCa
Wrong fix: GetParent can return pointer to SwCaptionOptDlg which is derived from SfxSingleTabDialog. This reverts commit a5546942ec70fca551401ae61eee00b66a92f81d.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/config/optload.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 65752e355de1..19be1a271c00 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -769,6 +769,11 @@ void SwCaptionOptPage::SaveEntry(SvLBoxEntry* pEntry)
IMPL_LINK_NOARG(SwCaptionOptPage, ModifyHdl)
{
String sFldTypeName = aCategoryBox.GetText();
+
+ SfxSingleTabDialog *pDlg = (SfxSingleTabDialog *)GetParent();
+ PushButton *pBtn = pDlg->GetOKButton();
+ if (pBtn)
+ pBtn->Enable(sFldTypeName.Len() != 0);
sal_Bool bEnable = aCategoryBox.IsEnabled() && sFldTypeName != sNone;
aFormatText.Enable(bEnable);