summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/arealink.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2007-07-06 11:41:42 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2007-07-06 11:41:42 +0000
commitf0b27a1df17d977f04fcd5d15fcf1ba3d8758f02 (patch)
tree9a955846c7243d1597130f5a3ae15a2ba509dc7a /sc/source/ui/docshell/arealink.cxx
parentf3e7eb9062dea7bbbe158b4149bace196e0c6d95 (diff)
INTEGRATION: CWS dr55 (1.25.52); FILE MERGED
2007/06/15 19:15:51 nn 1.25.52.1: #i76514# don't access ScLinkedAreaDlg as AbstractScLinkedAreaDlg
Diffstat (limited to 'sc/source/ui/docshell/arealink.cxx')
-rw-r--r--sc/source/ui/docshell/arealink.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 15f255aa0169..ad08bbdc10ed 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: arealink.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: rt $ $Date: 2007-04-26 09:51:40 $
+ * last change: $Author: rt $ $Date: 2007-07-06 12:41:42 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -72,9 +72,9 @@
struct AreaLink_Impl
{
ScDocShell* m_pDocSh;
- Link m_aEndEditLink;
+ AbstractScLinkedAreaDlg* m_pDialog;
- AreaLink_Impl() : m_pDocSh( NULL ) {}
+ AreaLink_Impl() : m_pDocSh( NULL ), m_pDialog( NULL ) {}
};
TYPEINIT1(ScAreaLink,::sfx2::SvBaseLink);
@@ -121,6 +121,7 @@ void __EXPORT ScAreaLink::Edit(Window* pParent, const Link& /* rEndEditHdl */ )
AbstractScLinkedAreaDlg* pDlg = pFact->CreateScLinkedAreaDlg( pParent, RID_SCDLG_LINKAREA);
DBG_ASSERT(pDlg, "Dialog create fail!");//CHINA001
pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, GetRefreshDelay() );
+ pImpl->m_pDialog = pDlg;
pDlg->StartExecuteModal( LINK( this, ScAreaLink, AreaEndEditHdl ) );
}
@@ -507,21 +508,23 @@ IMPL_LINK( ScAreaLink, RefreshHdl, ScAreaLink*, EMPTYARG )
return nRes;
}
-IMPL_LINK( ScAreaLink, AreaEndEditHdl, AbstractScLinkedAreaDlg*, _pDlg )
+IMPL_LINK( ScAreaLink, AreaEndEditHdl, void*, EMPTYARG )
{
- if ( _pDlg->GetResult() == RET_OK )
+ // #i76514# can't use link argument to access the dialog,
+ // because it's the ScLinkedAreaDlg, not AbstractScLinkedAreaDlg
+
+ if ( pImpl->m_pDialog && pImpl->m_pDialog->GetResult() == RET_OK )
{
- aOptions = _pDlg->GetOptions();
- Refresh( _pDlg->GetURL(), _pDlg->GetFilter(), _pDlg->GetSource(), _pDlg->GetRefresh() );
+ aOptions = pImpl->m_pDialog->GetOptions();
+ Refresh( pImpl->m_pDialog->GetURL(), pImpl->m_pDialog->GetFilter(),
+ pImpl->m_pDialog->GetSource(), pImpl->m_pDialog->GetRefresh() );
// copy source data from members (set in Refresh) into link name for dialog
String aNewLinkName;
sfx2::MakeLnkName( aNewLinkName, NULL, aFileName, aSourceArea, &aFilterName );
SetName( aNewLinkName );
}
-
- if ( pImpl->m_aEndEditLink.IsSet() )
- pImpl->m_aEndEditLink.Call( this );
+ pImpl->m_pDialog = NULL; // dialog is deleted with parent
return 0;
}