summaryrefslogtreecommitdiff
path: root/sw/source/ui/wrtsh
diff options
context:
space:
mode:
authorAndreas Martens <ama@openoffice.org>2001-07-05 13:43:51 +0000
committerAndreas Martens <ama@openoffice.org>2001-07-05 13:43:51 +0000
commit19ce22b044f9a311079661131adbee2e27cbcb5e (patch)
treece1c97b2ec0348382e84193e530f4f07819f90c1 /sw/source/ui/wrtsh
parent2292ad9ea5461d19d2acb016034596cc2cdaf7d3 (diff)
Chg #89181#: New data exchange
Diffstat (limited to 'sw/source/ui/wrtsh')
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx99
1 files changed, 40 insertions, 59 deletions
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index a965a01913bd..b74aafbecbdb 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: wrtsh1.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: ama $ $Date: 2001-04-24 10:07:58 $
+ * last change: $Author: ama $ $Date: 2001-07-05 14:43:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -544,7 +544,6 @@ void SwWrtShell::Insert( SvInPlaceObjectRef *pRef, SvGlobalName *pName, BOOL bAc
if( InsertOle( xIPObj ) && bActivate && bDoVerb )
{
- ASSERT( !xIPObj->IsLink(), "Link nicht aus Datei?" );
SfxInPlaceClientRef xCli = GetView().FindIPClient( xIPObj,
&GetView().GetEditWin());
if ( !xCli.Is() )
@@ -607,12 +606,6 @@ BOOL SwWrtShell::InsertOle( SvInPlaceObjectRef aRef )
// determine source CLSID
aRef->SvPseudoObject::FillClass( &aCLSID, &lDummy, &aDummy, &aDummy, &aDummy);
bStarMath = SmModuleDummy::HasID( *aRef->GetSvFactory() );
- if ( !bStarMath && aRef->IsLink() && SmModuleDummy::HasID( aCLSID ) )
- {
- //StarMath was the server which did the last recent work on
- //this object.
- bStarMath = TRUE;
- }
if( IsSelection() )
{
@@ -688,53 +681,41 @@ void SwWrtShell::LaunchOLEObj( long nVerb )
SvInPlaceObjectRef xRef = GetOLEObj();
ASSERT( xRef.Is(), "OLE not found" );
SfxInPlaceClientRef xCli;
- if ( !xRef->IsLink() )
+
+ // Link fuer Daten-Highlighting im Chart zuruecksetzen
+ SvtModuleOptions aMOpt;
+ if( aMOpt.IsChart() )
{
- // Link fuer Daten-Highlighting im Chart zuruecksetzen
- SvtModuleOptions aMOpt;
- if( aMOpt.IsChart() )
+ SvGlobalName aObjClsId( *xRef->GetSvFactory() );
+ SchMemChart* pMemChart;
+ if( SchModuleDummy::HasID( aObjClsId ) &&
+ 0 != (pMemChart = SchDLL::GetChartData( xRef ) ))
{
- SvGlobalName aObjClsId( *xRef->GetSvFactory() );
- SchMemChart* pMemChart;
- if( SchModuleDummy::HasID( aObjClsId ) &&
- 0 != (pMemChart = SchDLL::GetChartData( xRef ) ))
- {
- pMemChart->SetSelectionHdl( LINK( this, SwWrtShell,
- ChartSelectionHdl ) );
- //#60043# Damit die DataBrowseBox nicht erscheint wird das
- //Chart auf Readonly gesetzt wenn es eine Verbindung
- //zu einer Tabelle hat.
- if ( GetChartName( xRef ).Len() )
- pMemChart->SetReadOnly( TRUE );
- }
+ pMemChart->SetSelectionHdl( LINK( this, SwWrtShell,
+ ChartSelectionHdl ) );
+ //#60043# Damit die DataBrowseBox nicht erscheint wird das
+ //Chart auf Readonly gesetzt wenn es eine Verbindung
+ //zu einer Tabelle hat.
+ if ( GetChartName( xRef ).Len() )
+ pMemChart->SetReadOnly( TRUE );
}
+ }
- xCli = GetView().FindIPClient( xRef, &GetView().GetEditWin() );
- if ( !xCli.Is() )
- xCli = new SwOleClient( &GetView(), &GetView().GetEditWin() );
-
- ((SwOleClient*)&xCli)->SetInDoVerb( TRUE );
+ xCli = GetView().FindIPClient( xRef, &GetView().GetEditWin() );
+ if ( !xCli.Is() )
+ xCli = new SwOleClient( &GetView(), &GetView().GetEditWin() );
- xRef->DoConnect( xCli );
- SvEmbeddedObjectRef xObj = &xRef;
- CalcAndSetScale( xObj );
- //#50270# Error brauchen wir nicht handeln, das erledigt das
- //DoVerb in der SfxViewShell
- GetView().SfxViewShell::DoVerb( xCli, nVerb );
+ ((SwOleClient*)&xCli)->SetInDoVerb( TRUE );
- ((SwOleClient*)&xCli)->SetInDoVerb( FALSE );
- CalcAndSetScale( xObj );
- }
- else
- {
- ErrCode nErr;
- SfxErrorContext aEc( ERRCTX_SO_DOVERB, &GetView().GetEditWin(),
- RID_SO_ERRCTX );
- nErr = xRef->DoVerb( nVerb );
- if ( nErr )
- ErrorHandler::HandleError( nErr );
- }
+ xRef->DoConnect( xCli );
+ SvEmbeddedObjectRef xObj = &xRef;
+ CalcAndSetScale( xObj );
+ //#50270# Error brauchen wir nicht handeln, das erledigt das
+ //DoVerb in der SfxViewShell
+ GetView().SfxViewShell::DoVerb( xCli, nVerb );
+ ((SwOleClient*)&xCli)->SetInDoVerb( FALSE );
+ CalcAndSetScale( xObj );
}
}
@@ -898,16 +879,13 @@ void SwWrtShell::CalcAndSetScale( SvEmbeddedObjectRef xObj,
void SwWrtShell::ConnectObj( SvInPlaceObjectRef xIPObj, const SwRect &rPrt,
const SwRect &rFrm )
{
- if ( !xIPObj->IsLink() )
- {
- SfxInPlaceClientRef xCli = GetView().FindIPClient( xIPObj,
- &GetView().GetEditWin());
- if ( !xCli.Is() )
- xCli = new SwOleClient( &GetView(), &GetView().GetEditWin() );
- xIPObj->DoConnect( xCli );
- SvEmbeddedObjectRef xObj = &xIPObj;
- CalcAndSetScale( xObj, &rPrt, &rFrm );
- }
+ SfxInPlaceClientRef xCli = GetView().FindIPClient( xIPObj,
+ &GetView().GetEditWin());
+ if ( !xCli.Is() )
+ xCli = new SwOleClient( &GetView(), &GetView().GetEditWin() );
+ xIPObj->DoConnect( xCli );
+ SvEmbeddedObjectRef xObj = &xIPObj;
+ CalcAndSetScale( xObj, &rPrt, &rFrm );
}
IMPL_LINK( SwWrtShell, ChartSelectionHdl, ChartSelectionInfo *, pInfo )
@@ -1578,6 +1556,9 @@ void SwWrtShell::NewCoreSelection()
/*************************************************************************
$Log: not supported by cvs2svn $
+ Revision 1.10 2001/04/24 10:07:58 ama
+ Fix #77923#: Automatic contour refreshing after OLE editing
+
Revision 1.9 2001/03/09 17:16:29 jp
remove SvData usage