Kaydet (Commit) c70fc890 authored tarafından Nicolas Christener's avatar Nicolas Christener Kaydeden (comit) Caolán McNamara

translate DE->EN, minor indentation fixes

Change-Id: Ie4672b41fcd67998187c5766dff8ee340b92e124
Reviewed-on: https://gerrit.libreoffice.org/18841Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8b00ac9b
...@@ -157,8 +157,8 @@ sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId, ...@@ -157,8 +157,8 @@ sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
return nRet; return nRet;
} }
// InsertObj() fuegt das Objekt in die Sw-Page ein und merkt sich die Z-Pos in // InsertObj() adds the object into the Sw-Page and memorize the Z-position
// einem VarArr // in a VarArr
void wwZOrderer::InsertDrawingObject(SdrObject* pObj, short nWwHeight) void wwZOrderer::InsertDrawingObject(SdrObject* pObj, short nWwHeight)
{ {
sal_uLong nPos = GetDrawingObjectPos(nWwHeight); sal_uLong nPos = GetDrawingObjectPos(nWwHeight);
...@@ -204,12 +204,14 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject) ...@@ -204,12 +204,14 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
} }
} }
// Parallel zu dem Obj-Array im Dokument baue ich ein Array auf, /* Parallel to the Obj-array in the document I also build an array which
// dass die Ww-Height ( -> Wer ueberdeckt wen ) beinhaltet. * contains the Ww-height (-> what covers what).
// Anhand dieses VARARR wird die Einfuegeposition ermittelt. * Based on this VARARR the position where the insertion happens is
// Der Offset bei Datei in bestehendes Dokument mit Grafiklayer einfuegen * determined.
// muss der Aufrufer den Index um mnNoInitialObjects erhoeht werden, damit die * When inserting the offset in an existing document with a graphic layer the
// neuen Objekte am Ende landen ( Einfuegen ist dann schneller ) * caller has to increment the index by mnNoInitialObjects, so that the new
* objects are added at the end (inserting is faster then)
*/
sal_uLong wwZOrderer::GetDrawingObjectPos(short nWwHeight) sal_uLong wwZOrderer::GetDrawingObjectPos(short nWwHeight)
{ {
myditer aIter = maDrawHeight.begin(); myditer aIter = maDrawHeight.begin();
...@@ -246,24 +248,24 @@ bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc) ...@@ -246,24 +248,24 @@ bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic, bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic,
const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pbInDoc) const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pbInDoc)
{ // Grafik in File schreiben { // Write the graphic to the file
*pbInDoc = true; // default *pbInDoc = true; // default
sal_uLong nPosFc = nFilePos + rPic.cbHeader; sal_uLong nPosFc = nFilePos + rPic.cbHeader;
switch (rPic.MFP.mm) switch (rPic.MFP.mm)
{ {
case 94: // BMP-File ( nicht embeddet ) oder GIF case 94: // BMP-file ( not embedded ) or GIF
case 99: // TIFF-File ( nicht embeddet ) case 99: // TIFF-file ( not embedded )
pSt->Seek(nPosFc); pSt->Seek(nPosFc);
// Name als P-String einlesen // read name as P-string
rFileName = read_uInt8_PascalString(*pSt, m_eStructCharSet); rFileName = read_uInt8_PascalString(*pSt, m_eStructCharSet);
if (!rFileName.isEmpty()) if (!rFileName.isEmpty())
rFileName = URIHelper::SmartRel2Abs( rFileName = URIHelper::SmartRel2Abs(
INetURLObject(m_sBaseURL), rFileName, INetURLObject(m_sBaseURL), rFileName,
URIHelper::GetMaybeFileHdl()); URIHelper::GetMaybeFileHdl());
*pbInDoc = false; // Datei anschliessend nicht loeschen *pbInDoc = false; // Don't delete the file afterwards
return !rFileName.isEmpty(); // Einlesen OK return !rFileName.isEmpty(); // read was successful
} }
GDIMetaFile aWMF; GDIMetaFile aWMF;
...@@ -273,16 +275,16 @@ bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic, ...@@ -273,16 +275,16 @@ bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic,
if (!bOk || pSt->GetError() || !aWMF.GetActionSize()) if (!bOk || pSt->GetError() || !aWMF.GetActionSize())
return false; return false;
if (m_pWwFib->envr != 1) // !MAC als Creator if (m_pWwFib->envr != 1) // !MAC as creator
{ {
rpGraphic = new Graphic( aWMF ); rpGraphic = new Graphic( aWMF );
return true; return true;
} }
// MAC - Word als Creator // MAC - word as creator
// im WMF steht nur "Benutzen sie Word 6.0c" Mac-Pict steht dahinter // The WMF only says "Please use Word 6.0c" and Mac-Pict follows but without
// allerdings ohne die ersten 512 Bytes, bei einem MAC-PICT egal sind ( // the first 512 Bytes which are not relevant in a MAC-PICT (they are not
// werden nicht ausgewertet ) // interpreted)
bOk = false; bOk = false;
long nData = rPic.lcb - ( pSt->Tell() - nPosFc ); long nData = rPic.lcb - ( pSt->Tell() - nPosFc );
if (nData > 0) if (nData > 0)
...@@ -291,7 +293,7 @@ bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic, ...@@ -291,7 +293,7 @@ bool SwWW8ImplReader::ReadGrafFile(OUString& rFileName, Graphic*& rpGraphic,
if (!(bOk = SwWW8ImplReader::GetPictGrafFromStream(*rpGraphic, *pSt))) if (!(bOk = SwWW8ImplReader::GetPictGrafFromStream(*rpGraphic, *pSt)))
DELETEZ(rpGraphic); DELETEZ(rpGraphic);
} }
return bOk; // Grafik drin return bOk; // Contains graphic
} }
struct WW8PicDesc struct WW8PicDesc
...@@ -326,7 +328,7 @@ WW8PicDesc::WW8PicDesc( const WW8_PIC& rPic ) ...@@ -326,7 +328,7 @@ WW8PicDesc::WW8PicDesc( const WW8_PIC& rPic )
void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj, void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj,
SdrObject &rSubObj) SdrObject &rSubObj)
{ {
// SdrGrafObj anstatt des SdrTextObj in dessen Gruppe einsetzen // Insert SdrGrafObj instead of SdrTextObj into this group
if (SdrObject* pGroupObject = rReplaceObj.GetUpGroup()) if (SdrObject* pGroupObject = rReplaceObj.GetUpGroup())
{ {
SdrObjList* pObjectList = pGroupObject->GetSubList(); SdrObjList* pObjectList = pGroupObject->GetSubList();
...@@ -334,8 +336,8 @@ void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj, ...@@ -334,8 +336,8 @@ void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj,
rSubObj.SetLogicRect(rReplaceObj.GetCurrentBoundRect()); rSubObj.SetLogicRect(rReplaceObj.GetCurrentBoundRect());
rSubObj.SetLayer(rReplaceObj.GetLayer()); rSubObj.SetLayer(rReplaceObj.GetLayer());
// altes Objekt raus aus Gruppen-Liste und neues rein // remove old object from group-list and add new one
// (dies tauscht es ebenfalls in der Drawing-Page aus) // (this also exchanges it in the drwaing page)
pObjectList->ReplaceObject(&rSubObj, rReplaceObj.GetOrdNum()); pObjectList->ReplaceObject(&rSubObj, rReplaceObj.GetOrdNum());
} }
else else
...@@ -344,7 +346,7 @@ void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj, ...@@ -344,7 +346,7 @@ void SwWW8ImplReader::ReplaceObj(const SdrObject &rReplaceObj,
} }
} }
// MakeGrafNotInContent setzt eine nicht-Zeichengebundene Grafik // MakeGrafNotInContent inserts a non character bound graphic
// ( bGrafApo == true) // ( bGrafApo == true)
SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
const Graphic* pGraph, const OUString& rFileName, const SfxItemSet& rGrfSet) const Graphic* pGraph, const OUString& rFileName, const SfxItemSet& rGrfSet)
...@@ -353,7 +355,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, ...@@ -353,7 +355,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
sal_uInt32 nWidth = rPD.nWidth; sal_uInt32 nWidth = rPD.nWidth;
sal_uInt32 nHeight = rPD.nHeight; sal_uInt32 nHeight = rPD.nHeight;
// Vertikale Verschiebung durch Zeilenabstand // Vertical shift through line spacing
sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB; sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
if( m_pSFlyPara->nLineSpace && m_pSFlyPara->nLineSpace > nNetHeight ) if( m_pSFlyPara->nLineSpace && m_pSFlyPara->nLineSpace > nNetHeight )
m_pSFlyPara->nYPos = m_pSFlyPara->nYPos =
...@@ -370,7 +372,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, ...@@ -370,7 +372,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
SwFlyFrameFormat* pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, rFileName, OUString(), pGraph, SwFlyFrameFormat* pFlyFormat = m_rDoc.getIDocumentContentOperations().Insert(*m_pPaM, rFileName, OUString(), pGraph,
&aFlySet, &rGrfSet, NULL); &aFlySet, &rGrfSet, NULL);
// Damit die Frames bei Einfuegen in existierendes Doc erzeugt werden: // So the frames are generated when inserted in an existing doc:
if (m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() && if (m_rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() &&
(FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId())) (FLY_AT_PARA == pFlyFormat->GetAnchor().GetAnchorId()))
{ {
...@@ -379,7 +381,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD, ...@@ -379,7 +381,7 @@ SwFlyFrameFormat* SwWW8ImplReader::MakeGrafNotInContent(const WW8PicDesc& rPD,
return pFlyFormat; return pFlyFormat;
} }
// MakeGrafInContent fuegt zeichengebundene Grafiken ein // MakeGrafInContent inserts a character bound graphic
SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic, SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic,
const WW8PicDesc& rPD, const Graphic* pGraph, const OUString& rFileName, const WW8PicDesc& rPD, const Graphic* pGraph, const OUString& rFileName,
const SfxItemSet& rGrfSet) const SfxItemSet& rGrfSet)
...@@ -398,8 +400,8 @@ SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic, ...@@ -398,8 +400,8 @@ SwFrameFormat* SwWW8ImplReader::MakeGrafInContent(const WW8_PIC& rPic,
&rGrfSet, NULL); &rGrfSet, NULL);
} }
// Grafik im Rahmen ? ok, Rahmen auf Bildgroesse vergroessern // Resize the frame to the size of the picture if graphic is inside a frame
// ( nur wenn Auto-Breite ) // (only if auto-width)
if( m_pSFlyPara ) if( m_pSFlyPara )
m_pSFlyPara->BoxUpWidth( rPD.nWidth ); m_pSFlyPara->BoxUpWidth( rPD.nWidth );
return pFlyFormat; return pFlyFormat;
...@@ -420,7 +422,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt, ...@@ -420,7 +422,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt,
if (!bOk) if (!bOk)
{ {
delete pGraph; delete pGraph;
return 0; // Grafik nicht korrekt eingelesen return 0; // Graphic could not be readed correctly
} }
WW8PicDesc aPD( rPic ); WW8PicDesc aPD( rPic );
...@@ -472,32 +474,31 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -472,32 +474,31 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
GrafikCtor(); GrafikCtor();
/* /*
kleiner Spass von Microsoft: manchmal existiert ein Stream Namens DATA * Little joke from Microsoft: sometimes a stream named DATA exists. This
Dieser enthaelt dann den PICF und die entsprechende Grafik !!! * stream then contains the PICF and the corresponding graphic!
Wir mappen ansonsten die Variable pDataStream auf pStream. * We otherwise map the variable pDataStream to pStream.
*/ */
sal_uLong nOldPos = m_pDataStream->Tell(); sal_uLong nOldPos = m_pDataStream->Tell();
WW8_PIC aPic; WW8_PIC aPic;
m_pDataStream->Seek( m_nPicLocFc ); m_pDataStream->Seek( m_nPicLocFc );
PicRead( m_pDataStream, &aPic, m_bVer67); PicRead( m_pDataStream, &aPic, m_bVer67);
// Plausibilitaetstest ist noetig, da z.B. bei CheckBoxen im // Sanity check is needed because for example check boxes in field results
// Feld-Result ein WMF-aehnliches Struct vorkommt. // contain a WMF-like struct
if ((aPic.lcb >= 58) && !m_pDataStream->GetError()) if ((aPic.lcb >= 58) && !m_pDataStream->GetError())
{ {
if( m_pFlyFormatOfJustInsertedGraphic ) if( m_pFlyFormatOfJustInsertedGraphic )
{ {
// Soeben haben wir einen Grafik-Link ins Doc inserted. // We just added a graphic-link into the doc. Now we need to set
// Wir muessen ihn jetzt noch Positioniern und Skalieren. // its position and scale it.
WW8PicDesc aPD( aPic ); WW8PicDesc aPD( aPic );
WW8FlySet aFlySet( *this, m_pPaM, aPic, aPD.nWidth, aPD.nHeight ); WW8FlySet aFlySet( *this, m_pPaM, aPic, aPD.nWidth, aPD.nHeight );
// the correct anchor is set in Read_F_IncludePicture and the current PaM point // the correct anchor is set in Read_F_IncludePicture and the
// is after the position if it is anchored in content; because this anchor add // current PaM point is after the position if it is anchored in
// a character into the textnode. #i2806# // content; because this anchor add a character into the textnode.
// #i2806#
if (FLY_AS_CHAR == if (FLY_AS_CHAR ==
m_pFlyFormatOfJustInsertedGraphic->GetAnchor().GetAnchorId() ) m_pFlyFormatOfJustInsertedGraphic->GetAnchor().GetAnchorId() )
{ {
...@@ -516,14 +517,13 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -516,14 +517,13 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
WW8PicDesc aPD( aPic ); WW8PicDesc aPD( aPic );
if (!m_pMSDffManager) if (!m_pMSDffManager)
m_pMSDffManager = new SwMSDffManager(*this, m_bSkipImages); m_pMSDffManager = new SwMSDffManager(*this, m_bSkipImages);
/* /* ##835##
##835## * Disable use of main stream as fallback stream for inline direct
Disable use of main stream as fallback stream for inline direct * blips as it is known that they are directly after the record
blips as it is known that they are directly after the record * header, testing for existence in main stream may lead to an
header, testing for existence in main stream may lead to an * incorrect fallback graphic being found if other escher graphics
incorrect fallback graphic being found if other escher graphics * have been inserted in the document
have been inserted in the document */
*/
m_pMSDffManager->DisableFallbackStream(); m_pMSDffManager->DisableFallbackStream();
if( !m_pMSDffManager->GetModel() ) if( !m_pMSDffManager->GetModel() )
m_pMSDffManager->SetModel(m_pDrawModel, 1440); m_pMSDffManager->SetModel(m_pDrawModel, 1440);
...@@ -542,7 +542,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -542,7 +542,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
pObject = m_pMSDffManager->ImportObj(*m_pDataStream, &aData, aClientRect, aChildRect ); pObject = m_pMSDffManager->ImportObj(*m_pDataStream, &aData, aClientRect, aChildRect );
if (pObject) if (pObject)
{ {
// fuer den Rahmen // for the frame
SfxItemSet aAttrSet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN, SfxItemSet aAttrSet( m_rDoc.GetAttrPool(), RES_FRMATR_BEGIN,
RES_FRMATR_END-1 ); RES_FRMATR_END-1 );
...@@ -552,10 +552,11 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -552,10 +552,11 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if( pRecord ) if( pRecord )
{ {
// Horizontal rule may have its width given as % of page width // Horizontal rule may have its width given as % of page
// (-1 is used if not given, 0 means the object has fixed width). // width (-1 is used if not given, 0 means the object has
// Additionally, if it's a horizontal rule without width given, // fixed width).
// assume 100.0% width. // Additionally, if it's a horizontal rule without width
// given, assume 100.0% width.
int relativeWidth = pRecord->relativeHorizontalWidth; int relativeWidth = pRecord->relativeHorizontalWidth;
if( relativeWidth == -1 ) if( relativeWidth == -1 )
relativeWidth = pRecord->isHorizontalRule ? 1000 : 0; relativeWidth = pRecord->isHorizontalRule ? 1000 : 0;
...@@ -566,15 +567,16 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -566,15 +567,16 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
m_aSectionManager.GetPageRight() - m_aSectionManager.GetPageRight() -
m_aSectionManager.GetPageLeft()) * relativeWidth / 1000; m_aSectionManager.GetPageLeft()) * relativeWidth / 1000;
aPD = WW8PicDesc( aPic ); aPD = WW8PicDesc( aPic );
// This SetSnapRect() call adjusts the size of the object itself, // This SetSnapRect() call adjusts the size of the
// no idea why it's this call (or even what the call actually does), // object itself, no idea why it's this call (or even
// but that's what ImportGraf() (called by ImportObj()) uses. // what the call actually does), but that's what
// ImportGraf() (called by ImportObj()) uses.
pObject->SetSnapRect( Rectangle( 0, 0, aPD.nWidth, aPD.nHeight )); pObject->SetSnapRect( Rectangle( 0, 0, aPD.nWidth, aPD.nHeight ));
} }
//A graphic of this type in this location is always // A graphic of this type in this location is always
//inline, and uses the pic in the same module as ww6 // inline, and uses the pic in the same module as ww6
//graphics. // graphics.
if (m_pWFlyPara && m_pWFlyPara->bGrafApo) if (m_pWFlyPara && m_pWFlyPara->bGrafApo)
{ {
WW8FlySet aFlySet(*this, m_pWFlyPara, m_pSFlyPara, true); WW8FlySet aFlySet(*this, m_pWFlyPara, m_pSFlyPara, true);
...@@ -592,20 +594,20 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -592,20 +594,20 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
aAttrSet.Put(aFlySet); aAttrSet.Put(aFlySet);
} }
//Modified for i120716,for graf importing from MS Word 2003 binary format, // Modified for i120716,for graf importing from MS Word 2003
//there is no border distance. // binary format, there is no border distance.
Rectangle aInnerDist(0,0,0,0); Rectangle aInnerDist(0,0,0,0);
MatchSdrItemsIntoFlySet( pObject, aAttrSet, MatchSdrItemsIntoFlySet( pObject, aAttrSet,
pRecord->eLineStyle, pRecord->eLineDashing, pRecord->eLineStyle, pRecord->eLineDashing,
pRecord->eShapeType, aInnerDist ); pRecord->eShapeType, aInnerDist );
//Groesse aus der WinWord PIC-Struktur als // Set the size from the WinWord PIC-structure as graphic
//Grafik-Groesse nehmen // size
aAttrSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, aPD.nWidth, aAttrSet.Put( SwFormatFrmSize( ATT_FIX_SIZE, aPD.nWidth,
aPD.nHeight ) ); aPD.nHeight ) );
} }
// for the Grafik // for the graphic
SfxItemSet aGrSet( m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN, SfxItemSet aGrSet( m_rDoc.GetAttrPool(), RES_GRFATR_BEGIN,
RES_GRFATR_END-1 ); RES_GRFATR_END-1 );
...@@ -618,8 +620,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -618,8 +620,8 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (pRecord) if (pRecord)
MatchEscherMirrorIntoFlySet(*pRecord, aGrSet); MatchEscherMirrorIntoFlySet(*pRecord, aGrSet);
// ggfs. altes AttrSet uebernehmen und // if necessary adopt old AttrSet and correct horizontal
// horiz. Positionierungs-Relation korrigieren // positioning relation
if( pOldFlyFormat ) if( pOldFlyFormat )
{ {
aAttrSet.Put( pOldFlyFormat->GetAttrSet() ); aAttrSet.Put( pOldFlyFormat->GetAttrSet() );
...@@ -648,7 +650,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -648,7 +650,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
{ {
if (SdrGrafObj* pGraphObject = PTR_CAST(SdrGrafObj, pObject)) if (SdrGrafObj* pGraphObject = PTR_CAST(SdrGrafObj, pObject))
{ {
// Nun den Link bzw. die Grafik ins Doc stopfen // Now add the link or rather the graphic to the doc
const Graphic& rGraph = pGraphObject->GetGraphic(); const Graphic& rGraph = pGraphObject->GetGraphic();
if (m_nObjLocFc) // is it a OLE-Object? if (m_nObjLocFc) // is it a OLE-Object?
...@@ -665,20 +667,21 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -665,20 +667,21 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
} }
} }
// also nur, wenn wir ein *Insert* gemacht haben // only if we made an *Insert*
if (pRet) if (pRet)
{ {
if (pRecord) if (pRecord)
SetAttributesAtGrfNode(pRecord, pRet, 0); SetAttributesAtGrfNode(pRecord, pRet, 0);
// #i68101# // #i68101#
// removed pObject->HasSetName() usage since always returned true, // removed pObject->HasSetName() usage since always returned
// also removed else-part and wrote an informing mail to Henning Brinkmann // true, also removed else-part and wrote an informing mail
// about this to clarify. // to Henning Brinkmann about this to clarify.
pRet->SetName(pObject->GetName()); pRet->SetName(pObject->GetName());
// Zeiger auf neues Objekt ermitteln und Z-Order-Liste
// entsprechend korrigieren (oder Eintrag loeschen) // determine the pointer to the new object and update
// Z-order-list accordingly (or delete entry)
if (SdrObject* pOurNewObject = CreateContactObject(pRet)) if (SdrObject* pOurNewObject = CreateContactObject(pRet))
{ {
if (pOurNewObject != pObject) if (pOurNewObject != pObject)
...@@ -686,8 +689,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -686,8 +689,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
m_pMSDffManager->ExchangeInShapeOrder( pObject, 0, 0, m_pMSDffManager->ExchangeInShapeOrder( pObject, 0, 0,
pOurNewObject ); pOurNewObject );
// altes SdrGrafObj aus der Page loeschen und // delete and destroy old SdrGrafObj from page
// zerstoeren
if (pObject->GetPage()) if (pObject->GetPage())
m_pDrawPg->RemoveObject(pObject->GetOrdNum()); m_pDrawPg->RemoveObject(pObject->GetOrdNum());
SdrObject::Free( pObject ); SdrObject::Free( pObject );
...@@ -699,7 +701,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj, ...@@ -699,7 +701,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
else else
m_pMSDffManager->RemoveFromShapeOrder( pObject ); m_pMSDffManager->RemoveFromShapeOrder( pObject );
// auch das ggfs. Page loeschen, falls nicht gruppiert, // also delete this from the page if not grouped
if (pTextObj && !bTextObjWasGrouped && pTextObj->GetPage()) if (pTextObj && !bTextObjWasGrouped && pTextObj->GetPage())
m_pDrawPg->RemoveObject( pTextObj->GetOrdNum() ); m_pDrawPg->RemoveObject( pTextObj->GetOrdNum() );
} }
......
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