Kaydet (Commit) 0cb6a92f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Broken cast

All the way back since 2001 (ed53aaf5 "#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
üst 92846996
......@@ -205,7 +205,7 @@ public:
void SetFrame( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & );
SAL_DLLPRIVATE static void InitializeChildWinFactory_Impl(sal_uInt16, SfxChildWinInfo&);
SAL_DLLPRIVATE void SetVisible_Impl( bool bVis );
void SetVisible_Impl( bool bVis );
SAL_DLLPRIVATE void SetWorkWindow_Impl( SfxWorkWindow* );
SAL_DLLPRIVATE void Activate_Impl();
SAL_DLLPRIVATE void Deactivate_Impl();
......
......@@ -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 &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment