summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-05 12:42:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-05 16:23:08 +0100
commitb51d44462f52188f4e1574168ec759c8008a40b7 (patch)
treeec9582017db100185073c9bf6ace0de570dbb1e0 /svx
parent4377676c353236618d8d8e50649cf0ace8267b3f (diff)
Broken cast
All the way back since 2001 (ed53aaf5842e82f9a8d4d053b39e7db61c6d62ce "#89611# react for (Beamer!)Frame->dispose() from outside," adding member SfxChildWindow_Impl::xListener), that MyStruct hack was not in sync with SfxChildWindow_Impl, so ((MyStruct*)pImp)->bVisible = false; probably corrputed pFact rather than change bVisible. The origin of that MyStruct hack is lost to history, but probably stems from an ancient time when changes across modules where prohibitively expensive, esp. when some feature had to be crammed in shortly before release... Change-Id: I13dc30c96ef70b2cc09dc117231c021910e0ce1e (cherry picked from commit 0cb6a92f86e02f6342be5e8f931dc1849114230c)
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/hyperdlg.cxx15
1 files changed, 1 insertions, 14 deletions
diff --git a/svx/source/dialog/hyperdlg.cxx b/svx/source/dialog/hyperdlg.cxx
index 9aeefe8e85a0..40464de3795b 100644
--- a/svx/source/dialog/hyperdlg.cxx
+++ b/svx/source/dialog/hyperdlg.cxx
@@ -32,19 +32,6 @@
SFX_IMPL_CHILDWINDOW_WITHID(SvxHlinkDlgWrapper, SID_HYPERLINK_DIALOG)
-
-
-struct MyStruct
-{
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame;
- SfxChildWinFactory* pFact;
- bool bHideNotDelete;
- bool bVisible;
- bool bHideAtToggle;
- SfxModule* pContextModule;
- SfxWorkWindow* pWorkWin;
-};
-
SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId,
SfxBindings* pBindings,
SfxChildWinInfo* pInfo ) :
@@ -58,7 +45,7 @@ SvxHlinkDlgWrapper::SvxHlinkDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId,
mpDlg = pFact->CreateSvxHpLinkDlg( _pParent, pBindings, SID_HYPERLINK_DIALOG );
DBG_ASSERT(mpDlg, "Dialog creation failed!");
pWindow = mpDlg->GetWindow();
- ((MyStruct*)pImp)->bVisible = false;
+ SetVisible_Impl(false);
vcl::Window* pTopWindow = 0;
if ( pInfo->aSize.Width() != 0 && pInfo->aSize.Height() != 0 &&