Fix #77923#: Automatic contour refreshing after OLE editing
This commit is contained in:
parent
58e6e93d90
commit
f95e1a650d
7 changed files with 49 additions and 20 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: editsh.hxx,v $
|
||||
*
|
||||
* $Revision: 1.14 $
|
||||
* $Revision: 1.15 $
|
||||
*
|
||||
* last change: $Author: tl $ $Date: 2001-04-09 07:17:26 $
|
||||
* last change: $Author: ama $ $Date: 2001-04-24 10:05:31 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -592,6 +592,10 @@ public:
|
|||
const PolyPolygon *GetGraphicPolygon() const;
|
||||
void SetGraphicPolygon( const PolyPolygon *pPoly );
|
||||
|
||||
// If there's an automatic, not manipulated polygon at the selected
|
||||
// notxtnode, it has to be deleted, e.g. cause the object has changed.
|
||||
void ClearAutomaticContour();
|
||||
|
||||
/*
|
||||
* liefert die Groesse einer Graphic in Twips, wenn der Cursor
|
||||
* auf einer Graphic steht; BOOL liefert FALSE, wenn s.o.
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: ndnotxt.hxx,v $
|
||||
*
|
||||
* $Revision: 1.1.1.1 $
|
||||
* $Revision: 1.2 $
|
||||
*
|
||||
* last change: $Author: hr $ $Date: 2000-09-18 17:14:27 $
|
||||
* last change: $Author: ama $ $Date: 2001-04-24 10:06:27 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -77,6 +77,7 @@ class SwNoTxtNode : public SwCntntNode
|
|||
String aAlternateText; // alternativer Text (HTML)
|
||||
|
||||
PolyPolygon *pContour; // Polygon fuer Konturumlauf
|
||||
BOOL bAutomaticContour; // automatic contour polygon, not manipulated
|
||||
|
||||
// erzeugt fuer alle Ableitungen einen AttrSet mit Bereichen
|
||||
// fuer Frame- und Grafik-Attributen (wird nur vom SwCntntNode gerufen)
|
||||
|
@ -105,10 +106,12 @@ public:
|
|||
const String& GetAlternateText() const { return aAlternateText; }
|
||||
void SetAlternateText( const String& rTxt ) { aAlternateText = rTxt; }
|
||||
|
||||
void SetContour( const PolyPolygon *pPoly );
|
||||
void SetContour( const PolyPolygon *pPoly,
|
||||
BOOL bAutomatic = FALSE );
|
||||
const PolyPolygon *HasContour() const { return pContour; }
|
||||
void GetContour( PolyPolygon &rPoly ) const;
|
||||
void CreateContour();
|
||||
const BOOL HasAutomaticContour() const { return bAutomaticContour; }
|
||||
|
||||
//Besorgt die Graphic, mit SwapIn fuer GrfNode, per GetData fuer OLE.
|
||||
Graphic GetGraphic() const;
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: ndnotxt.cxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: jp $ $Date: 2001-03-09 13:53:33 $
|
||||
* last change: $Author: ama $ $Date: 2001-04-24 10:02:09 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -107,7 +107,8 @@ SwNoTxtNode::SwNoTxtNode( const SwNodeIndex & rWhere,
|
|||
SwGrfFmtColl *pGrfColl,
|
||||
SwAttrSet* pAutoAttr ) :
|
||||
SwCntntNode( rWhere, nNdType, pGrfColl ),
|
||||
pContour( 0 )
|
||||
pContour( 0 ),
|
||||
bAutomaticContour( FALSE )
|
||||
{
|
||||
// soll eine Harte-Attributierung gesetzt werden?
|
||||
if( pAutoAttr )
|
||||
|
@ -146,20 +147,22 @@ BOOL SwNoTxtNode::SavePersistentData()
|
|||
}
|
||||
|
||||
|
||||
void SwNoTxtNode::SetContour( const PolyPolygon *pPoly )
|
||||
void SwNoTxtNode::SetContour( const PolyPolygon *pPoly, BOOL bAutomatic )
|
||||
{
|
||||
delete pContour;
|
||||
if ( pPoly )
|
||||
pContour = new PolyPolygon( *pPoly );
|
||||
else
|
||||
pContour = 0;
|
||||
bAutomaticContour = bAutomatic;
|
||||
}
|
||||
|
||||
|
||||
void SwNoTxtNode::CreateContour()
|
||||
{
|
||||
ASSERT( !pContour, "Contour available." );
|
||||
pContour = new PolyPolygon( SvxContourDlg::CreateAutoContour( GetGraphic() ) );
|
||||
pContour = new PolyPolygon(SvxContourDlg::CreateAutoContour(GetGraphic()));
|
||||
bAutomaticContour = TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: editsh.cxx,v $
|
||||
*
|
||||
* $Revision: 1.9 $
|
||||
* $Revision: 1.10 $
|
||||
*
|
||||
* last change: $Author: jp $ $Date: 2001-03-09 15:51:18 $
|
||||
* last change: $Author: ama $ $Date: 2001-04-24 10:02:41 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -414,6 +414,21 @@ void SwEditShell::SetGraphicPolygon( const PolyPolygon *pPoly )
|
|||
EndAllAction();
|
||||
}
|
||||
|
||||
void SwEditShell::ClearAutomaticContour()
|
||||
{
|
||||
SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode();
|
||||
if( pNd->HasAutomaticContour() )
|
||||
{
|
||||
StartAllAction();
|
||||
pNd->SetContour( NULL, FALSE );
|
||||
SwFlyFrm *pFly = (SwFlyFrm*)pNd->GetFrm()->GetUpper();
|
||||
const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround();
|
||||
pFly->GetFmt()->SwModify::Modify( (SwFmtSurround*)&rSur,
|
||||
(SwFmtSurround*)&rSur );
|
||||
GetDoc()->SetModified();
|
||||
EndAllAction();
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* liefert Pointer auf ein SvInPlaceObjectRef, wenn CurCrsr->GetPoint() auf
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: ndgrf.cxx,v $
|
||||
*
|
||||
* $Revision: 1.15 $
|
||||
* $Revision: 1.16 $
|
||||
*
|
||||
* last change: $Author: mib $ $Date: 2001-04-06 10:56:07 $
|
||||
* last change: $Author: ama $ $Date: 2001-04-24 10:04:05 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -1101,7 +1101,7 @@ SwCntntNode* SwGrfNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
|
|||
&aTmpGrf, pColl,
|
||||
(SwAttrSet*)GetpSwAttrSet() );
|
||||
pGrfNd->SetAlternateText( GetAlternateText() );
|
||||
pGrfNd->SetContour( HasContour() );
|
||||
pGrfNd->SetContour( HasContour(), HasAutomaticContour() );
|
||||
return pGrfNd;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: ndole.cxx,v $
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* last change: $Author: jp $ $Date: 2001-03-08 21:20:13 $
|
||||
* last change: $Author: ama $ $Date: 2001-04-24 10:04:40 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -329,7 +329,7 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
|
|||
|
||||
pOLENd->SetChartTblName( GetChartTblName() );
|
||||
pOLENd->SetAlternateText( GetAlternateText() );
|
||||
pOLENd->SetContour( HasContour() );
|
||||
pOLENd->SetContour( HasContour(), HasAutomaticContour() );
|
||||
|
||||
pOLENd->SetOLESizeInvalid( TRUE );
|
||||
pDoc->SetOLEPrtNotifyPending();
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: wrtsh1.cxx,v $
|
||||
*
|
||||
* $Revision: 1.9 $
|
||||
* $Revision: 1.10 $
|
||||
*
|
||||
* last change: $Author: jp $ $Date: 2001-03-09 17:16:29 $
|
||||
* last change: $Author: ama $ $Date: 2001-04-24 10:07:58 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -744,6 +744,7 @@ BOOL SwWrtShell::FinishOLEObj() // Server wird beendet
|
|||
BOOL bRet = pIPClient && pIPClient->IsInPlaceActive();
|
||||
if( bRet )
|
||||
{
|
||||
ClearAutomaticContour();
|
||||
// Link fuer Daten-Highlighting im Chart zuruecksetzen
|
||||
SvtModuleOptions aMOpt;
|
||||
if( aMOpt.IsChart() )
|
||||
|
@ -1577,6 +1578,9 @@ void SwWrtShell::NewCoreSelection()
|
|||
/*************************************************************************
|
||||
|
||||
$Log: not supported by cvs2svn $
|
||||
Revision 1.9 2001/03/09 17:16:29 jp
|
||||
remove SvData usage
|
||||
|
||||
Revision 1.8 2001/03/01 12:33:03 jp
|
||||
Bug #74707#: use new flag CheckForOLEInCaption
|
||||
|
||||
|
|
Loading…
Reference in a new issue